@ampath/esm-dha-workflow-app 4.0.0-next.13 → 4.0.0-next.131

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/dist/1197.js +1 -0
  2. package/dist/1277.js +1 -0
  3. package/dist/1277.js.map +1 -0
  4. package/dist/1558.js +2 -0
  5. package/dist/{198.js.LICENSE.txt → 1558.js.LICENSE.txt} +0 -10
  6. package/dist/1558.js.map +1 -0
  7. package/dist/1729.js +1 -0
  8. package/dist/1729.js.map +1 -0
  9. package/dist/182.js +1 -0
  10. package/dist/182.js.map +1 -0
  11. package/dist/1826.js +1 -0
  12. package/dist/1826.js.map +1 -0
  13. package/dist/1833.js +1 -0
  14. package/dist/1833.js.map +1 -0
  15. package/dist/1856.js +1 -0
  16. package/dist/1856.js.map +1 -0
  17. package/dist/1925.js +1 -0
  18. package/dist/1925.js.map +1 -0
  19. package/dist/2021.js +1 -0
  20. package/dist/2021.js.map +1 -0
  21. package/dist/2054.js +1 -0
  22. package/dist/2054.js.map +1 -0
  23. package/dist/2177.js +2 -0
  24. package/dist/2177.js.LICENSE.txt +9 -0
  25. package/dist/2177.js.map +1 -0
  26. package/dist/2364.js +2 -0
  27. package/dist/{200.js.LICENSE.txt → 2364.js.LICENSE.txt} +15 -0
  28. package/dist/2364.js.map +1 -0
  29. package/dist/2566.js +1 -0
  30. package/dist/2566.js.map +1 -0
  31. package/dist/2801.js +1 -0
  32. package/dist/2801.js.map +1 -0
  33. package/dist/2975.js +1 -0
  34. package/dist/2975.js.map +1 -0
  35. package/dist/3041.js +1 -0
  36. package/dist/3041.js.map +1 -0
  37. package/dist/3099.js +1 -0
  38. package/dist/3184.js +2 -0
  39. package/dist/3184.js.map +1 -0
  40. package/dist/3485.js +1 -0
  41. package/dist/3485.js.map +1 -0
  42. package/dist/3654.js +1 -0
  43. package/dist/3654.js.map +1 -0
  44. package/dist/4055.js +1 -0
  45. package/dist/4205.js +1 -0
  46. package/dist/4205.js.map +1 -0
  47. package/dist/4225.js +1 -0
  48. package/dist/4225.js.map +1 -0
  49. package/dist/4300.js +1 -0
  50. package/dist/4335.js +1 -0
  51. package/dist/4353.js +1 -0
  52. package/dist/4353.js.map +1 -0
  53. package/dist/4517.js +1 -0
  54. package/dist/4517.js.map +1 -0
  55. package/dist/4652.js +1 -0
  56. package/dist/4674.js +1 -0
  57. package/dist/4674.js.map +1 -0
  58. package/dist/4947.js +1 -0
  59. package/dist/4947.js.map +1 -0
  60. package/dist/5015.js +1 -0
  61. package/dist/5015.js.map +1 -0
  62. package/dist/5422.js +1 -0
  63. package/dist/5422.js.map +1 -0
  64. package/dist/5428.js +1 -0
  65. package/dist/5428.js.map +1 -0
  66. package/dist/5752.js +1 -0
  67. package/dist/5752.js.map +1 -0
  68. package/dist/5851.js +1 -0
  69. package/dist/5851.js.map +1 -0
  70. package/dist/6264.js +1 -0
  71. package/dist/6264.js.map +1 -0
  72. package/dist/6540.js +2 -0
  73. package/dist/6540.js.map +1 -0
  74. package/dist/6606.js +1 -0
  75. package/dist/6606.js.map +1 -0
  76. package/dist/693.js +1 -0
  77. package/dist/693.js.map +1 -0
  78. package/dist/6991.js +1 -0
  79. package/dist/6991.js.map +1 -0
  80. package/dist/7199.js +1 -0
  81. package/dist/7199.js.map +1 -0
  82. package/dist/7255.js +1 -0
  83. package/dist/7255.js.map +1 -0
  84. package/dist/7258.js +1 -0
  85. package/dist/7258.js.map +1 -0
  86. package/dist/7420.js +1 -0
  87. package/dist/7420.js.map +1 -0
  88. package/dist/8114.js +1 -0
  89. package/dist/8114.js.map +1 -0
  90. package/dist/8339.js +1 -0
  91. package/dist/8339.js.map +1 -0
  92. package/dist/8865.js +1 -0
  93. package/dist/8865.js.map +1 -0
  94. package/dist/8895.js +1 -0
  95. package/dist/8895.js.map +1 -0
  96. package/dist/9037.js +1 -0
  97. package/dist/9037.js.map +1 -0
  98. package/dist/9091.js +1 -0
  99. package/dist/9091.js.map +1 -0
  100. package/dist/9093.js +1 -0
  101. package/dist/9093.js.map +1 -0
  102. package/dist/9117.js +1 -0
  103. package/dist/9117.js.map +1 -0
  104. package/dist/9721.js +1 -0
  105. package/dist/9721.js.map +1 -0
  106. package/dist/esm-dha-workflow-app.js +1 -0
  107. package/dist/esm-dha-workflow-app.js.buildmanifest.json +1546 -0
  108. package/dist/esm-dha-workflow-app.js.map +1 -0
  109. package/dist/main.js +1 -1
  110. package/dist/main.js.map +1 -1
  111. package/dist/routes.json +1 -1
  112. package/package.json +11 -4
  113. package/src/accounting/accounting.component.tsx +13 -0
  114. package/src/admissions/admission-request-list/admission-request-list.scss +0 -0
  115. package/src/admissions/admission-request-list/admission-request-list.tsx +134 -0
  116. package/src/admissions/admissions-dashboard.component.scss +15 -0
  117. package/src/admissions/admissions-dashboard.component.tsx +160 -0
  118. package/src/admissions/admissions.resource.ts +101 -0
  119. package/src/admissions/admitted-list/admitted-patients-list.tsx +141 -0
  120. package/src/admissions/constants/index.ts +33 -0
  121. package/src/admissions/discharged-list/discharged-list.scss +0 -0
  122. package/src/admissions/discharged-list/discharged-list.tsx +58 -0
  123. package/src/admissions/inpatient/admission-history/patient-admission-history.tsx +76 -0
  124. package/src/admissions/inpatient/admission-requests/patient-admission-requests.scss +19 -0
  125. package/src/admissions/inpatient/admission-requests/patient-admission-requests.tsx +72 -0
  126. package/src/admissions/inpatient/inpatient-admissions.component.scss +7 -0
  127. package/src/admissions/inpatient/inpatient-admissions.component.tsx +46 -0
  128. package/src/admissions/modal/admit-elsewhere/admit-elsewhere.modal.scss +23 -0
  129. package/src/admissions/modal/admit-elsewhere/admit-elsewhere.modal.tsx +156 -0
  130. package/src/admissions/modal/admit-patient/admit-patient.modal.scss +0 -0
  131. package/src/admissions/modal/admit-patient/admit-patient.modal.tsx +109 -0
  132. package/src/admissions/modal/bed-swap/bed-swap.modal.scss +0 -0
  133. package/src/admissions/modal/bed-swap/bed-swap.modal.tsx +102 -0
  134. package/src/admissions/modal/cancel-admission-request/cancel-admission-request.scss +11 -0
  135. package/src/admissions/modal/cancel-admission-request/cancel-admission-request.tsx +105 -0
  136. package/src/admissions/modal/discharge/discharge-patient.modal.scss +13 -0
  137. package/src/admissions/modal/discharge/discharge-patient.modal.tsx +84 -0
  138. package/src/admissions/types/index.ts +192 -0
  139. package/src/appointments/appointments.component.tsx +13 -0
  140. package/src/billing/api/billing.api.ts +95 -0
  141. package/src/billing/billing-root.tsx +20 -0
  142. package/src/billing/dashboard/billingDashboard.component.scss +0 -0
  143. package/src/billing/dashboard/billingDashboard.component.tsx +25 -0
  144. package/src/billing/extensions/visit-billing/visit-billing.extension.scss +0 -0
  145. package/src/billing/extensions/visit-billing/visit-billing.extension.tsx +409 -0
  146. package/src/billing/invoice/bill.resource.ts +47 -0
  147. package/src/billing/invoice/invoice-header/header-card/header-card.scss +17 -0
  148. package/src/billing/invoice/invoice-header/header-card/header-card.tsx +21 -0
  149. package/src/billing/invoice/invoice.scss +113 -0
  150. package/src/billing/invoice/invoice.tsx +1371 -0
  151. package/src/billing/invoice/line-items/line-items.scss +0 -0
  152. package/src/billing/invoice/line-items/line-items.tsx +120 -0
  153. package/src/billing/invoice/modal/delete-bill-item/delete-bill-item.modal.scss +23 -0
  154. package/src/billing/invoice/modal/delete-bill-item/delete-bill-item.modal.tsx +114 -0
  155. package/src/billing/invoice/modal/edit-bill-item/edit-bill-item.modal.scss +0 -0
  156. package/src/billing/invoice/modal/edit-bill-item/edit-bill-item.modal.tsx +122 -0
  157. package/src/billing/invoice/payment-details/payment-details.scss +0 -0
  158. package/src/billing/invoice/payment-details/payment-details.tsx +43 -0
  159. package/src/billing/invoice/print-invoice/print-receipt.component.tsx +44 -0
  160. package/src/billing/invoice/print-invoice/print-receipt.scss +14 -0
  161. package/src/billing/types/index.ts +84 -0
  162. package/src/billing/utils/index.ts +17 -0
  163. package/src/billing/widgets/billingTotalsRow.component.scss +0 -0
  164. package/src/billing/widgets/billingTotalsRow.component.tsx +712 -0
  165. package/src/billing/workspaces/create-order-bill-form-workspace/create-order-bill-form.resource.ts +85 -0
  166. package/src/billing/workspaces/create-order-bill-form-workspace/create-order-bill-form.scss +58 -0
  167. package/src/billing/workspaces/create-order-bill-form-workspace/create-order-bill-form.workspace.tsx +330 -0
  168. package/src/billing/workspaces/create-order-bill-form-workspace/schema.ts +11 -0
  169. package/src/bookings/bookings.component.scss +7 -0
  170. package/src/bookings/bookings.component.tsx +31 -0
  171. package/src/bookings/daily/daily-bookings.component.scss +38 -0
  172. package/src/bookings/daily/daily-bookings.component.tsx +138 -0
  173. package/src/bookings/daily/daily-bookings.resource.ts +28 -0
  174. package/src/bookings/daily/filters/daily-bookings-filter.component.scss +15 -0
  175. package/src/bookings/daily/filters/daily-bookings-filter.component.tsx +80 -0
  176. package/src/bookings/daily/patient-list/daily-bookings-patient-list.component.tsx +97 -0
  177. package/src/bookings/types/index.ts +68 -0
  178. package/src/config-schema.ts +186 -32
  179. package/src/createDashboardLink.tsx +9 -0
  180. package/src/dashboard/charts/chart.component.scss +13 -0
  181. package/src/dashboard/charts/chart.component.tsx +54 -0
  182. package/src/dashboard/dashboard.component.scss +7 -0
  183. package/src/dashboard/dashboard.component.tsx +51 -0
  184. package/src/dashboard/overview/overview.component.scss +147 -0
  185. package/src/dashboard/overview/overview.component.tsx +115 -0
  186. package/src/dashboard/patient-list/patient-list.component.tsx +41 -0
  187. package/src/dashboard-meta/accounting-dashboard.meta.ts +6 -0
  188. package/src/dashboard-meta/admissions-dashboard.meta.ts +6 -0
  189. package/src/dashboard-meta/billing-dashboard.meta.ts +6 -0
  190. package/src/dashboard-meta/bookings-dashboard.meta.ts +6 -0
  191. package/src/dashboard-meta/consultation-dashboard.meta.ts +6 -0
  192. package/src/dashboard-meta/dha-workflow-dashboard.meta.ts +6 -0
  193. package/src/dashboard-meta/inpatient-admissions.meta.ts +6 -0
  194. package/src/dashboard-meta/mch-dashboard.meta.ts +6 -0
  195. package/src/dashboard-meta/pharmacy-dashboard.meta.ts +6 -0
  196. package/src/dashboard-meta/queue-dashboard.meta.ts +6 -0
  197. package/src/dashboard-meta/registers-dashboard.meta.ts +6 -0
  198. package/src/dashboard-meta/registry-dashboard.meta.ts +6 -0
  199. package/src/dashboard-meta/service-queue-admin.meta.ts +6 -0
  200. package/src/dashboard-meta/triage-dashboard.meta.ts +6 -0
  201. package/src/hooks/useActions.ts +165 -0
  202. package/src/index.ts +113 -1
  203. package/src/laboratory/laboratory.component.tsx +13 -0
  204. package/src/left-panel/left-panel.component.tsx +0 -2
  205. package/src/mch/mch-queues.component.scss +7 -0
  206. package/src/mch/mch-queues.component.tsx +32 -0
  207. package/src/mch/queues/consultation/mch-consultation.tsx +18 -0
  208. package/src/mch/queues/triage/mch-triage.tsx +15 -0
  209. package/src/modals/sign-off-modal.scss +7 -0
  210. package/src/modals/sign-off-modal.tsx +52 -0
  211. package/src/mortuary/mortuary.component.tsx +13 -0
  212. package/src/pharmacy/pharmacy.component.tsx +13 -0
  213. package/src/registers/registers.component.tsx +8 -0
  214. package/src/registry/eligibility/eliigibility-tags/eligibility-tags.scss +6 -0
  215. package/src/registry/eligibility/eliigibility-tags/eligibility-tags.tsx +137 -0
  216. package/src/registry/eligibility/modal/eligibility-details.modal.scss +38 -0
  217. package/src/registry/eligibility/modal/eligibility-details.modal.tsx +131 -0
  218. package/src/registry/modal/client-details-modal/client-details-modal.tsx +9 -26
  219. package/src/registry/modal/otp-verification-modal/otp-verification-modal.scss +31 -1
  220. package/src/registry/modal/otp-verification-modal/otp-verification-modal.tsx +145 -58
  221. package/src/registry/modal/send-to-triage/send-to-triage.modal.scss +16 -1
  222. package/src/registry/modal/send-to-triage/send-to-triage.modal.tsx +681 -97
  223. package/src/registry/payment-details/payment-options/payment-options.scss +13 -0
  224. package/src/registry/payment-details/payment-options/payment-options.tsx +61 -14
  225. package/src/registry/registry.component.scss +18 -1
  226. package/src/registry/registry.component.tsx +242 -111
  227. package/src/registry/registry.resource.ts +8 -5
  228. package/src/registry/types/index.ts +179 -1
  229. package/src/registry/utils/error-handler.ts +33 -0
  230. package/src/registry/utils/format-dependant-display-data.ts +8 -0
  231. package/src/registry/utils/hie-client-adapter.ts +312 -0
  232. package/src/registry/utils/mask-data.ts +11 -0
  233. package/src/resources/dashboard.resource.ts +20 -0
  234. package/src/resources/hie-amrs-automatic-registration.service.ts +16 -0
  235. package/src/resources/identifier-types.ts +29 -0
  236. package/src/resources/patient-resource.ts +62 -0
  237. package/src/resources/queue.resource.ts +23 -0
  238. package/src/resources/superset.resource.ts +20 -0
  239. package/src/resources/visit.resource.ts +19 -1
  240. package/src/root.component.tsx +32 -6
  241. package/src/routes.json +215 -7
  242. package/src/service-queues/action-button.component.tsx +34 -0
  243. package/src/service-queues/action-overflow-menu-item.component.tsx +34 -0
  244. package/src/service-queues/admin/queue/modal/create-queue/create-queue.modal.scss +31 -0
  245. package/src/service-queues/admin/queue/modal/create-queue/create-queue.modal.tsx +142 -0
  246. package/src/service-queues/admin/queue/modal/edit-queue/edit-queue.modal.scss +0 -0
  247. package/src/service-queues/admin/queue/modal/edit-queue/edit-queue.modal.tsx +150 -0
  248. package/src/service-queues/admin/queue/queue-list/queue-list.scss +33 -0
  249. package/src/service-queues/admin/queue/queue-list/queue-list.tsx +113 -0
  250. package/src/service-queues/admin/queue-entry/queue-entry-list.component.scss +6 -0
  251. package/src/service-queues/admin/queue-entry/queue-entry-list.component.tsx +137 -0
  252. package/src/service-queues/admin/queue-room/modal/create-queue-room/create-queue-room.modal.scss +31 -0
  253. package/src/service-queues/admin/queue-room/modal/create-queue-room/create-queue-room.modal.tsx +137 -0
  254. package/src/service-queues/admin/queue-room/modal/edit-queue-room/edit-queue-room.modal.scss +0 -0
  255. package/src/service-queues/admin/queue-room/modal/edit-queue-room/edit-queue-room.modal.tsx +146 -0
  256. package/src/service-queues/admin/queue-room/queue-room-list/queue-room-list.scss +22 -0
  257. package/src/service-queues/admin/queue-room/queue-room-list/queue-room-list.tsx +120 -0
  258. package/src/service-queues/admin/service-queue-admin-dashboard.component.scss +6 -0
  259. package/src/service-queues/admin/service-queue-admin-dashboard.component.tsx +34 -0
  260. package/src/service-queues/consultation/consultation.component.scss +7 -0
  261. package/src/service-queues/consultation/consultation.component.tsx +15 -0
  262. package/src/service-queues/extensions/service-queue-patient-banner/service-queue-patient-banner.scss +30 -0
  263. package/src/service-queues/extensions/service-queue-patient-banner/service-queue-patient-banner.tsx +108 -0
  264. package/src/service-queues/metrics/metrics-cards/attended-patients.extension.tsx +38 -0
  265. package/src/service-queues/metrics/metrics-cards/metrics-card.component.tsx +86 -0
  266. package/src/service-queues/metrics/metrics-cards/metrics-card.scss +106 -0
  267. package/src/service-queues/metrics/metrics-cards/waiting-patients.extension.tsx +34 -0
  268. package/src/service-queues/metrics/metrics-container.component.tsx +23 -0
  269. package/src/service-queues/metrics/metrics-container.scss +36 -0
  270. package/src/service-queues/metrics/metrics.resource.ts +65 -0
  271. package/src/service-queues/modals/daily-report-patient-list/daily-report-patient-list.scss +26 -0
  272. package/src/service-queues/modals/daily-report-patient-list/daily-report-patient-list.tsx +108 -0
  273. package/src/service-queues/modals/move/move-patient.component.scss +35 -0
  274. package/src/service-queues/modals/move/move-patient.component.tsx +152 -0
  275. package/src/service-queues/modals/serve/serve-patient.comppnent.scss +0 -0
  276. package/src/service-queues/modals/serve/serve-patient.comppnent.tsx +80 -0
  277. package/src/service-queues/modals/sign-off/sign-off.modal.scss +0 -0
  278. package/src/service-queues/modals/sign-off/sign-off.modal.tsx +79 -0
  279. package/src/service-queues/modals/transition/transition-patient.component.scss +0 -0
  280. package/src/service-queues/modals/transition/transition-patient.component.tsx +122 -0
  281. package/src/service-queues/queue-list/check-in.service.ts +26 -0
  282. package/src/service-queues/queue-list/queue-list.component.scss +36 -0
  283. package/src/service-queues/queue-list/queue-list.component.tsx +249 -0
  284. package/src/service-queues/queue-room.component.tsx +39 -0
  285. package/src/service-queues/room/room.component.tsx +58 -0
  286. package/src/service-queues/service-queue/service-queue.component.scss +14 -0
  287. package/src/service-queues/service-queue/service-queue.component.tsx +399 -0
  288. package/src/service-queues/service-queue/stats/stat-details/stat-details.component.scss +12 -0
  289. package/src/service-queues/service-queue/stats/stat-details/stat-details.component.tsx +63 -0
  290. package/src/service-queues/service-queue.scss +27 -0
  291. package/src/service-queues/service-queue.tsx +37 -0
  292. package/src/service-queues/service-queues.resource.ts +361 -0
  293. package/src/service-queues/service.resource.ts +28 -0
  294. package/src/shared/constants/civil-status.ts +29 -0
  295. package/src/shared/constants/concepts.ts +15 -0
  296. package/src/shared/constants/index.ts +1 -2
  297. package/src/shared/constants/patient-category.ts +6 -0
  298. package/src/shared/constants/person-attributes.ts +33 -0
  299. package/src/shared/constants/visit-types.ts +7 -0
  300. package/src/shared/services/billing.resource.ts +38 -0
  301. package/src/shared/services/client-payment-mode.resource.ts +27 -0
  302. package/src/shared/services/client-payment.resource.ts +17 -0
  303. package/src/shared/services/eligibility.resource.ts +19 -0
  304. package/src/shared/services/encounters.resource.ts +27 -0
  305. package/src/shared/services/location.resource.ts +9 -0
  306. package/src/shared/types/index.ts +152 -0
  307. package/src/shared/ui/aggregate-stat-card/aggregate-stat-card.scss +42 -0
  308. package/src/shared/ui/aggregate-stat-card/aggregate-stat-card.tsx +42 -0
  309. package/src/shared/ui/confirm-modal/confirm.modal.scss +18 -0
  310. package/src/shared/ui/confirm-modal/confirm.modal.tsx +38 -0
  311. package/src/shared/ui/otp-input/otp-input.component.scss +14 -0
  312. package/src/shared/ui/otp-input/otp-input.component.tsx +90 -0
  313. package/src/shared/ui/stat-card/stat-card.component.scss +10 -0
  314. package/src/shared/ui/stat-card/stat-card.component.tsx +26 -0
  315. package/src/shared/ui/timer/timer.component.scss +5 -0
  316. package/src/shared/ui/timer/timer.component.tsx +40 -0
  317. package/src/shared/utils/get-base-url.ts +27 -0
  318. package/src/shared/utils/get-tag-type.ts +66 -0
  319. package/src/side-nav-menu/nav-link-config.ts +6 -4
  320. package/src/triage/metrics/attended-patients.extension.tsx +42 -0
  321. package/src/triage/metrics/metrics.scss +36 -0
  322. package/src/triage/metrics/triage-metrics.component.tsx +21 -0
  323. package/src/triage/metrics/waiting-patients.extension.tsx +39 -0
  324. package/src/triage/room/room.scss +29 -0
  325. package/src/triage/triage.component.tsx +15 -0
  326. package/src/triage/triage.resource.ts +19 -0
  327. package/src/triage/types.ts +16 -0
  328. package/src/types/types.ts +180 -0
  329. package/dist/16.js +0 -1
  330. package/dist/16.js.map +0 -1
  331. package/dist/184.js +0 -2
  332. package/dist/184.js.map +0 -1
  333. package/dist/197.js +0 -1
  334. package/dist/198.js +0 -2
  335. package/dist/198.js.map +0 -1
  336. package/dist/200.js +0 -2
  337. package/dist/200.js.map +0 -1
  338. package/dist/255.js +0 -1
  339. package/dist/255.js.map +0 -1
  340. package/dist/300.js +0 -1
  341. package/dist/335.js +0 -1
  342. package/dist/353.js +0 -1
  343. package/dist/353.js.map +0 -1
  344. package/dist/420.js +0 -1
  345. package/dist/420.js.map +0 -1
  346. package/dist/540.js +0 -2
  347. package/dist/540.js.map +0 -1
  348. package/dist/55.js +0 -1
  349. package/dist/652.js +0 -1
  350. package/dist/860.js +0 -1
  351. package/dist/860.js.map +0 -1
  352. package/dist/91.js +0 -1
  353. package/dist/91.js.map +0 -1
  354. package/dist/93.js +0 -1
  355. package/dist/93.js.map +0 -1
  356. package/dist/99.js +0 -1
  357. package/dist/openmrs-esm-home-app.js +0 -1
  358. package/dist/openmrs-esm-home-app.js.buildmanifest.json +0 -626
  359. package/dist/openmrs-esm-home-app.js.map +0 -1
  360. package/src/consultation/consultation.tsx +0 -7
  361. /package/dist/{184.js.LICENSE.txt → 3184.js.LICENSE.txt} +0 -0
  362. /package/dist/{540.js.LICENSE.txt → 6540.js.LICENSE.txt} +0 -0
@@ -0,0 +1,106 @@
1
+ @use '@carbon/layout';
2
+ @use '@carbon/type';
3
+ @use '@carbon/colors';
4
+ @use '@openmrs/esm-styleguide/src/vars' as *;
5
+
6
+ .tileContainer {
7
+ border: 1px solid $ui-03;
8
+ min-height: 7.875rem;
9
+ height: 100%;
10
+ padding: layout.$spacing-05;
11
+ }
12
+
13
+ .tileHeader {
14
+ display: flex;
15
+ justify-content: space-between;
16
+ align-items: baseline;
17
+ margin-bottom: layout.$spacing-03;
18
+ }
19
+
20
+ .headerLabelContainer {
21
+ display: flex;
22
+ height: layout.$spacing-07;
23
+ align-items: center;
24
+
25
+ :global(.cds--dropdown__wrapper--inline) {
26
+ gap: 0;
27
+
28
+ label {
29
+ @include type.type-style('heading-compact-01');
30
+ color: $text-02;
31
+ margin-right: layout.$spacing-03;
32
+ }
33
+ }
34
+
35
+ :global(.cds--list-box__menu-icon) {
36
+ height: layout.$spacing-05;
37
+ }
38
+ }
39
+
40
+ .link {
41
+ text-decoration: none;
42
+ display: flex;
43
+ align-items: center;
44
+ color: $interactive-01;
45
+
46
+ svg {
47
+ margin-left: layout.$spacing-03;
48
+ }
49
+ }
50
+
51
+ .headerLabel {
52
+ @include type.type-style('heading-compact-01');
53
+ color: $text-02;
54
+ }
55
+
56
+ .metricsContainer {
57
+ display: flex;
58
+ gap: layout.$spacing-07;
59
+ align-items: stretch;
60
+ flex-wrap: wrap;
61
+ }
62
+
63
+ .metricItem {
64
+ display: inline-block;
65
+ flex-direction: column;
66
+ }
67
+
68
+ .metricLabel {
69
+ @include type.type-style('label-01');
70
+ color: $text-02;
71
+ margin-bottom: layout.$spacing-02;
72
+ }
73
+
74
+ .metricValue {
75
+ @include type.type-style('heading-04');
76
+ color: $ui-05;
77
+ margin: 0;
78
+ }
79
+
80
+ .mainItem {
81
+ margin-right: layout.$spacing-07;
82
+ }
83
+
84
+ .smallItem {
85
+ flex-direction: row;
86
+ }
87
+
88
+ .smallValue {
89
+ font-size: 1rem !important;
90
+ margin-top: layout.$spacing-02;
91
+ }
92
+
93
+ .red {
94
+ color: colors.$red-50;
95
+ }
96
+
97
+ // Overriding styles for RTL support
98
+ html[dir='rtl'] {
99
+ .link {
100
+ svg {
101
+ margin-right: layout.$spacing-03;
102
+ margin-left: unset;
103
+ transform: scale(-1, 1);
104
+ }
105
+ }
106
+ }
@@ -0,0 +1,34 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { useTranslation } from 'react-i18next';
3
+ import { MetricsCard, MetricsCardHeader, MetricsCardBody, MetricsCardItem } from './metrics-card.component';
4
+ import { getServiceQueueByLocationUuid } from '../../service-queues.resource';
5
+ import { QUEUE_SERVICE_UUIDS } from '../../../shared/constants/concepts';
6
+ import { useSession } from '@openmrs/esm-framework';
7
+ import { type QueueEntryResult } from '../../../registry/types';
8
+
9
+ export default function WaitingPatientsExtension() {
10
+ const { t } = useTranslation();
11
+ const [consultationQueueEntries, setConsultationQueueEntries] = useState<QueueEntryResult[]>([]);
12
+ const session = useSession();
13
+ const locationUuid = session.sessionLocation.uuid;
14
+ const consultationServiceUuid = QUEUE_SERVICE_UUIDS.CLINICAL_CONSULTATION_SERVICE_UUID;
15
+ useEffect(() => {
16
+ getConsultationEntryQueues();
17
+ }, []);
18
+
19
+ const getConsultationEntryQueues = async () => {
20
+ const res = await getServiceQueueByLocationUuid(consultationServiceUuid, locationUuid);
21
+ setConsultationQueueEntries(res);
22
+ };
23
+
24
+ const waitingPatientsCount = consultationQueueEntries?.filter((p) => p.status === 'WAITING').length ?? 0;
25
+
26
+ return (
27
+ <MetricsCard>
28
+ <MetricsCardHeader title={t('patientsInWaiting', 'Patients in waiting')} />
29
+ <MetricsCardBody>
30
+ <MetricsCardItem label={t('patients', 'Patients')} value={waitingPatientsCount ? waitingPatientsCount : '--'} />
31
+ </MetricsCardBody>
32
+ </MetricsCard>
33
+ );
34
+ }
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { ExtensionSlot } from '@openmrs/esm-framework';
3
+ import styles from './metrics-container.scss';
4
+ import AttendedToPatientsExtension from './metrics-cards/attended-patients.extension';
5
+ import WaitingPatientsExtension from './metrics-cards/waiting-patients.extension';
6
+
7
+ export interface Service {
8
+ display: string;
9
+ uuid?: string;
10
+ }
11
+
12
+ function MetricsContainer() {
13
+ return (
14
+ <>
15
+ <div className={styles.cardContainer}>
16
+ <WaitingPatientsExtension />
17
+ <AttendedToPatientsExtension />;
18
+ </div>
19
+ </>
20
+ );
21
+ }
22
+
23
+ export default MetricsContainer;
@@ -0,0 +1,36 @@
1
+ @use '@carbon/layout';
2
+ @use '@openmrs/esm-styleguide/src/vars' as *;
3
+
4
+ .cardContainer {
5
+ background-color: $ui-02;
6
+ display: flex;
7
+ padding: layout.$spacing-05;
8
+ flex-flow: row wrap;
9
+ gap: layout.$spacing-05;
10
+ align-items: stretch;
11
+ }
12
+
13
+ .cardContainer > * {
14
+ flex: 1 0 0%;
15
+ min-width: 16rem;
16
+ }
17
+
18
+ // If we're on tablet and the screen is too small for 3 cards across
19
+ // @TODO: This will do nonsense things if there are not exactly 3 cards
20
+ @media (max-width: calc(layout.$spacing-05 * 4 + 18.75rem * 3)) {
21
+ :global(.omrs-breakpoint-lt-desktop) {
22
+ .cardContainer > *:has(:global(.cardWithChildren)) {
23
+ order: 999;
24
+ }
25
+ }
26
+ }
27
+
28
+ // If we're on desktop and the screen is too small for the left nav bar
29
+ // plus 3 cards across
30
+ @media (max-width: calc(16rem + layout.$spacing-05 * 4 + 18.75rem * 3)) {
31
+ :global(.omrs-breakpoint-gt-tablet) {
32
+ .cardContainer > *:has(:global(.cardWithChildren)) {
33
+ order: 999;
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,65 @@
1
+ import { useSession, type Visit, openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
2
+ import dayjs from 'dayjs';
3
+ import useSWR from 'swr';
4
+
5
+ // export function useActiveVisits() {
6
+ // const currentUserSession = useSession();
7
+ // const startDate = dayjs().format('YYYY-MM-DD');
8
+ // const sessionLocation = currentUserSession?.sessionLocation?.uuid;
9
+
10
+ // const customRepresentation =
11
+ // 'custom:(uuid,patient:(uuid,identifiers:(identifier,uuid),person:(age,display,gender,uuid)),' +
12
+ // 'visitType:(uuid,name,display),location:(uuid,name,display),startDatetime,' +
13
+ // 'stopDatetime)&fromStartDate=' +
14
+ // startDate +
15
+ // '&location=' +
16
+ // sessionLocation;
17
+ // const url = `${restBaseUrl}/visit?includeInactive=false&v=${customRepresentation}`;
18
+ // const { data, error, isLoading, isValidating } = useSWR<{ data: { results: Array<Visit> } }, Error>(
19
+ // sessionLocation ? url : null,
20
+ // openmrsFetch,
21
+ // );
22
+
23
+ // // Create a Set to store unique patient UUIDs
24
+ // const uniquePatientUUIDs = new Set();
25
+
26
+ // data?.data?.results.forEach((visit) => {
27
+ // const patientUUID = visit.patient?.uuid;
28
+ // const isToday = dayjs(visit.startDatetime).isToday();
29
+ // if (patientUUID && isToday) {
30
+ // uniquePatientUUIDs.add(patientUUID);
31
+ // }
32
+ // });
33
+
34
+ // return {
35
+ // activeVisitsCount: uniquePatientUUIDs.size,
36
+ // isLoading,
37
+ // error,
38
+ // isValidating,
39
+ // };
40
+ // }
41
+
42
+ // Statuses: Waiting, Finished Service, In Service
43
+ export function useServiceMetricsCount(status: string = 'Waiting', service: string = "7f7ec7ad-cdd7-4ed9-bc2e-5c5bd9f065b2") {
44
+ const currentUserSession = useSession();
45
+ const location = currentUserSession?.sessionLocation?.uuid;
46
+
47
+ const apiUrl =
48
+ `${restBaseUrl}/queue-entry-metrics?status=${status}&isEnded=false` +
49
+ (service ? `&service=${service}` : '') +
50
+ (location ? `&location=${location}` : '');
51
+
52
+ const { data, isLoading } = useSWR<
53
+ {
54
+ data: {
55
+ count: number;
56
+ };
57
+ },
58
+ Error
59
+ >(service ? apiUrl : null, openmrsFetch);
60
+
61
+ return {
62
+ serviceCount: data ? data?.data?.count : 0,
63
+ isLoading
64
+ };
65
+ }
@@ -0,0 +1,26 @@
1
+ .checkedInlLayout {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 100%;
5
+ row-gap: 10px;
6
+
7
+ .actionHeaderSection {
8
+ display: flex;
9
+ flex-direction: row;
10
+ justify-content: flex-end;
11
+ width: 100%;
12
+ column-gap: 15px;
13
+
14
+ .searchInput {
15
+ width: 40%;
16
+ }
17
+ }
18
+
19
+ .serveModalContentSection {
20
+ display: flex;
21
+ flex-direction: column;
22
+ width: 100%;
23
+ row-gap: 10px;
24
+ }
25
+
26
+ }
@@ -0,0 +1,108 @@
1
+ import React, { useMemo, useState } from 'react';
2
+ import {
3
+ Modal,
4
+ ModalBody,
5
+ Table,
6
+ TableBody,
7
+ TableCell,
8
+ TableHead,
9
+ TableHeader,
10
+ TableRow,
11
+ Tag,
12
+ TextInput,
13
+ } from '@carbon/react';
14
+ import styles from './daily-report-patient-list.scss';
15
+ import { type ServiceQueueReportPatientList } from '../../../shared/types';
16
+
17
+ interface DailyReportPatientListModalProps {
18
+ open: boolean;
19
+ onModalClose: () => void;
20
+ patientList: ServiceQueueReportPatientList[];
21
+ }
22
+
23
+ const DailyReportPatientListModal: React.FC<DailyReportPatientListModalProps> = ({
24
+ open,
25
+ onModalClose,
26
+ patientList,
27
+ }) => {
28
+ const [searchString, setSearchString] = useState<string>();
29
+ const filteredPatientList = useMemo(() => filterQueueBySearchString(), [patientList, searchString]);
30
+
31
+ function filterQueueBySearchString(): ServiceQueueReportPatientList[] {
32
+ if (!searchString) {
33
+ return patientList;
34
+ }
35
+ return patientList.filter((p) => {
36
+ return p.person_name.trim().toLowerCase().includes(searchString.trim().toLowerCase());
37
+ });
38
+ }
39
+
40
+ const handlePatientListSearch = (searchTerm: string) => {
41
+ setSearchString(searchTerm);
42
+ };
43
+ return (
44
+ <>
45
+ <Modal
46
+ modalHeading="Checked In Patient List"
47
+ open={open}
48
+ size="lg"
49
+ onSecondarySubmit={() => onModalClose()}
50
+ onRequestClose={() => onModalClose()}
51
+ onRequestSubmit={onModalClose}
52
+ primaryButtonText="Close"
53
+ secondaryButtonText="Cancel"
54
+ >
55
+ <ModalBody>
56
+ <div className={styles.checkedInlLayout}>
57
+ <div className={styles.actionHeaderSection}>
58
+ <div className={styles.searchInput}>
59
+ <TextInput
60
+ id="queue-search"
61
+ labelText=""
62
+ onChange={(e) => handlePatientListSearch(e.target.value)}
63
+ placeholder="Enter patient name to filter"
64
+ />
65
+ </div>
66
+ </div>
67
+ <div className={styles.serveModalContentSection}>
68
+ <Table>
69
+ <TableHead>
70
+ <TableRow>
71
+ <TableHeader>No</TableHeader>
72
+ <TableHeader>Name</TableHeader>
73
+ <TableHeader>Age</TableHeader>
74
+ <TableHeader>Gender</TableHeader>
75
+ <TableHeader>Phone Number</TableHeader>
76
+ <TableHeader>Identifiers</TableHeader>
77
+ <TableHeader>Queue Room</TableHeader>
78
+ <TableHeader>Status</TableHeader>
79
+ </TableRow>
80
+ </TableHead>
81
+ <TableBody>
82
+ {filteredPatientList.map((val, index) => (
83
+ <TableRow id={`${val.queue_entry_id}`}>
84
+ <TableCell>{index + 1}</TableCell>
85
+ <TableCell>{val.person_name}</TableCell>
86
+ <TableCell>{val.age}</TableCell>
87
+ <TableCell>{val.gender}</TableCell>
88
+ <TableCell>{val.phone_number}</TableCell>
89
+ <TableCell>{val.identifiers}</TableCell>
90
+ <TableCell>{val.queue_room_name}</TableCell>
91
+ <TableCell>
92
+ <Tag size="md" type={val.served_status === 'SERVED' ? 'blue' : 'gray'}>
93
+ {val.served_status}
94
+ </Tag>
95
+ </TableCell>
96
+ </TableRow>
97
+ ))}
98
+ </TableBody>
99
+ </Table>
100
+ </div>
101
+ </div>
102
+ </ModalBody>
103
+ </Modal>
104
+ </>
105
+ );
106
+ };
107
+
108
+ export default DailyReportPatientListModal;
@@ -0,0 +1,35 @@
1
+ .modelLayout{
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 100%;
5
+ padding: 15px 15px;
6
+ }
7
+ .formSection{
8
+ display: flex;
9
+ flex-direction: column;
10
+ width: 100%;
11
+ row-gap: 5px;
12
+ }
13
+ .sectionHeader{
14
+ display: flex;
15
+ flex-direction: column;
16
+ width: 100%;
17
+ row-gap: 5px;
18
+ }
19
+ .formRow{
20
+ display: flex;
21
+ flex-direction: row;
22
+ width: 100%;
23
+ column-gap: 5px;
24
+ }
25
+ .formControl{
26
+ display: flex;
27
+ flex-direction: column;
28
+ width: 100%;
29
+ }
30
+ .actionSection{
31
+ display: flex;
32
+ flex-direction: row;
33
+ width: 100%;
34
+ column-gap: 5px;
35
+ }
@@ -0,0 +1,152 @@
1
+ import { Button, InlineLoading, Modal, ModalBody, Select, SelectItem, TextArea } from '@carbon/react';
2
+ import React, { useEffect, useState } from 'react';
3
+ import styles from './move-patient.component.scss';
4
+ import { type ServiceQueue } from '../../../registry/types';
5
+ import { getServiceQueueByLocation, transitionQueueEntry } from '../../service.resource';
6
+ import { type TransitionQueueEntryDto } from '../../../types/types';
7
+ import { QUEUE_PRIORITIES_UUIDS, QUEUE_STATUS_UUIDS } from '../../../shared/constants/concepts';
8
+ import { showSnackbar } from '@openmrs/esm-framework';
9
+ interface MovePatientModalProps {
10
+ open: boolean;
11
+ onModalClose: () => void;
12
+ locationUuid: string;
13
+ currentQueueEntryUuid: string;
14
+ onTransferSuccess?: () => void;
15
+ }
16
+ const MovePatientModal: React.FC<MovePatientModalProps> = ({
17
+ open,
18
+ onModalClose,
19
+ locationUuid,
20
+ currentQueueEntryUuid,
21
+ onTransferSuccess,
22
+ }) => {
23
+ const [serviceQueues, setServiceQueues] = useState<ServiceQueue[]>([]);
24
+ const [selectedComment, setSelectedComment] = useState<string>();
25
+ const [selectedPriority, setSelectedPriority] = useState<string>();
26
+ const [selectedNewService, setSelectedNewService] = useState<ServiceQueue>();
27
+ const [loading, setLoading] = useState<boolean>(false);
28
+ useEffect(() => {
29
+ getQueues();
30
+ }, [locationUuid]);
31
+ const serviceChangeHandler = (serviceQueueUuid: string) => {
32
+ const serviceQueue = serviceQueues.find((sq) => {
33
+ return sq.uuid === serviceQueueUuid;
34
+ });
35
+ setSelectedNewService(serviceQueue);
36
+ };
37
+ const getQueues = async () => {
38
+ const res = await getServiceQueueByLocation(locationUuid);
39
+ setServiceQueues(res);
40
+ };
41
+ const transtionQueueEntry = async () => {
42
+ if (loading) {
43
+ showAlert('error', 'Trsnefering patient', 'Transfering patient...please wait');
44
+ }
45
+ setLoading(true);
46
+ const payload = getTransitionQueueEntryPayload();
47
+ try {
48
+ const resp = await transitionQueueEntry(payload);
49
+ showAlert('success', 'Client succesfully moved', '');
50
+ onTransferSuccess();
51
+ } catch (e) {
52
+ showAlert('error', e.message, '');
53
+ setLoading(false);
54
+ }
55
+ };
56
+
57
+ const showAlert = (alertType: 'error' | 'success', title: string, subtitle: string) => {
58
+ showSnackbar({
59
+ kind: alertType,
60
+ title: title,
61
+ subtitle: subtitle,
62
+ });
63
+ };
64
+ const getTransitionQueueEntryPayload = (): TransitionQueueEntryDto => {
65
+ const payload: TransitionQueueEntryDto = {
66
+ queueEntryToTransition: currentQueueEntryUuid,
67
+ newQueue: selectedNewService.uuid,
68
+ newStatus: QUEUE_STATUS_UUIDS.WAITING_UUID,
69
+ newPriority: selectedPriority,
70
+ newPriorityComment: selectedComment,
71
+ };
72
+
73
+ return payload;
74
+ };
75
+ const priorityChangeHandler = (priorityUuid: string) => {
76
+ setSelectedPriority(priorityUuid);
77
+ };
78
+ const handleCommentChange = (comment: string) => {
79
+ setSelectedComment(comment);
80
+ };
81
+ const placeHolderFunction = () => {};
82
+ return (
83
+ <>
84
+ <Modal
85
+ modalHeading="Transfer Client"
86
+ open={open}
87
+ size="md"
88
+ onSecondarySubmit={() => onModalClose()}
89
+ onRequestClose={() => onModalClose()}
90
+ onRequestSubmit={loading ? placeHolderFunction : transtionQueueEntry}
91
+ primaryButtonText={loading ? <InlineLoading description="Transfering..." /> : 'Transfer'}
92
+ secondaryButtonText="Cancel"
93
+ >
94
+ <ModalBody>
95
+ <div className={styles.modelLayout}>
96
+ <div className={styles.formSection}>
97
+ <div className={styles.formRow}>
98
+ <div className={styles.formControl}>
99
+ <Select
100
+ id="service-queue"
101
+ labelText="Select the new Queue"
102
+ onChange={(e) => serviceChangeHandler(e.target.value)}
103
+ >
104
+ <SelectItem value="" text="" />;
105
+ {serviceQueues &&
106
+ serviceQueues
107
+ .filter((qe) => {
108
+ return qe.uuid !== currentQueueEntryUuid;
109
+ })
110
+ .map((vt) => {
111
+ return <SelectItem value={vt.uuid} text={`${vt.name} (${vt.location.display})`} />;
112
+ })}
113
+ </Select>
114
+ </div>
115
+ </div>
116
+ <div className={styles.formRow}>
117
+ <div className={styles.formControl}>
118
+ <Select
119
+ id="priority"
120
+ labelText="Select a Priority"
121
+ onChange={(e) => priorityChangeHandler(e.target.value)}
122
+ >
123
+ <SelectItem value="" text="Select" />;
124
+ <SelectItem value={QUEUE_PRIORITIES_UUIDS.NORMAL_PRIORITY_UUID} text="PRIORITY" />;
125
+ <SelectItem value={QUEUE_PRIORITIES_UUIDS.NOT_URGENT_PRIORITY_UUID} text="NON URGENT" />;
126
+ <SelectItem value={QUEUE_PRIORITIES_UUIDS.EMERGENCY_PRIORITY_UUID} text="EMERGENCY" />;
127
+ </Select>
128
+ </div>
129
+ </div>
130
+ <div className={styles.formRow}>
131
+ <div className={styles.formControl}>
132
+ <TextArea
133
+ enableCounter
134
+ helperText=""
135
+ id="comment"
136
+ labelText="Comment"
137
+ maxCount={500}
138
+ placeholder=""
139
+ onChange={(e) => handleCommentChange(e.target.value)}
140
+ rows={4}
141
+ />
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </ModalBody>
147
+ </Modal>
148
+ </>
149
+ );
150
+ };
151
+
152
+ export default MovePatientModal;
@@ -0,0 +1,80 @@
1
+ import React from 'react';
2
+ import { Modal, ModalBody } from '@carbon/react';
3
+ import { type QueueEntryResult } from '../../../registry/types';
4
+ import styles from './serve-patient.comppnent.scss';
5
+ import { type TransitionQueueEntryDto } from '../../../types/types';
6
+ import { QUEUE_STATUS_UUIDS } from '../../../shared/constants/concepts';
7
+ import { transitionQueueEntry } from '../../service.resource';
8
+ import { showSnackbar } from '@openmrs/esm-framework';
9
+
10
+ interface ServePatientModal {
11
+ open: boolean;
12
+ onModalClose: () => void;
13
+ currentQueueEntry: QueueEntryResult;
14
+ onSuccessfullServe: () => void;
15
+ }
16
+
17
+ const ServePatientModal: React.FC<ServePatientModal> = ({
18
+ open,
19
+ onModalClose,
20
+ currentQueueEntry,
21
+ onSuccessfullServe,
22
+ }) => {
23
+ const servePatient = async () => {
24
+ const payload = getServePatientPayload();
25
+ try {
26
+ await transitionQueueEntry(payload);
27
+ showAlert('success', 'Client succesfully served', '');
28
+ onSuccessfullServe();
29
+ } catch (e) {
30
+ showAlert('error', e.message, '');
31
+ }
32
+ };
33
+ const showAlert = (alertType: 'error' | 'success', title: string, subtitle: string) => {
34
+ showSnackbar({
35
+ kind: alertType,
36
+ title: title,
37
+ subtitle: subtitle,
38
+ });
39
+ };
40
+ const getServePatientPayload = (): TransitionQueueEntryDto => {
41
+ const payload: TransitionQueueEntryDto = {
42
+ queueEntryToTransition: currentQueueEntry.queue_entry_uuid,
43
+ newQueue: currentQueueEntry.service_uuid,
44
+ newStatus: QUEUE_STATUS_UUIDS.IN_SERVICE_UUID,
45
+ };
46
+
47
+ return payload;
48
+ };
49
+ return (
50
+ <>
51
+ <Modal
52
+ modalHeading="Serve Client"
53
+ open={open}
54
+ size="md"
55
+ onSecondarySubmit={() => onModalClose()}
56
+ onRequestClose={() => onModalClose()}
57
+ onRequestSubmit={servePatient}
58
+ primaryButtonText="Serve"
59
+ secondaryButtonText="Cancel"
60
+ >
61
+ <ModalBody>
62
+ <div className={styles.serveModalLayout}>
63
+ <div className={styles.serveModalContentSection}>
64
+ <div className={styles.formRow}>
65
+ <p>
66
+ Name: {currentQueueEntry.family_name} {currentQueueEntry.middle_name} {currentQueueEntry.given_name}
67
+ </p>
68
+ <p>Ticket No: {currentQueueEntry.queue_entry_id}</p>
69
+ <p>Status: {currentQueueEntry.status}</p>
70
+ <p>Priority: {currentQueueEntry.priority}</p>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </ModalBody>
75
+ </Modal>
76
+ </>
77
+ );
78
+ };
79
+
80
+ export default ServePatientModal;