@ampath/esm-dha-workflow-app 4.0.0-next.13 → 4.0.0-next.130
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.
- package/dist/1197.js +1 -0
- package/dist/1277.js +1 -0
- package/dist/1277.js.map +1 -0
- package/dist/1558.js +2 -0
- package/dist/{198.js.LICENSE.txt → 1558.js.LICENSE.txt} +0 -10
- package/dist/1558.js.map +1 -0
- package/dist/1729.js +1 -0
- package/dist/1729.js.map +1 -0
- package/dist/182.js +1 -0
- package/dist/182.js.map +1 -0
- package/dist/1826.js +1 -0
- package/dist/1826.js.map +1 -0
- package/dist/1833.js +1 -0
- package/dist/1833.js.map +1 -0
- package/dist/1856.js +1 -0
- package/dist/1856.js.map +1 -0
- package/dist/1925.js +1 -0
- package/dist/1925.js.map +1 -0
- package/dist/2021.js +1 -0
- package/dist/2021.js.map +1 -0
- package/dist/2054.js +1 -0
- package/dist/2054.js.map +1 -0
- package/dist/2177.js +2 -0
- package/dist/2177.js.LICENSE.txt +9 -0
- package/dist/2177.js.map +1 -0
- package/dist/2364.js +2 -0
- package/dist/{200.js.LICENSE.txt → 2364.js.LICENSE.txt} +15 -0
- package/dist/2364.js.map +1 -0
- package/dist/2566.js +1 -0
- package/dist/2566.js.map +1 -0
- package/dist/2801.js +1 -0
- package/dist/2801.js.map +1 -0
- package/dist/2975.js +1 -0
- package/dist/2975.js.map +1 -0
- package/dist/3041.js +1 -0
- package/dist/3041.js.map +1 -0
- package/dist/3099.js +1 -0
- package/dist/3184.js +2 -0
- package/dist/3184.js.map +1 -0
- package/dist/3654.js +1 -0
- package/dist/3654.js.map +1 -0
- package/dist/4055.js +1 -0
- package/dist/4205.js +1 -0
- package/dist/4205.js.map +1 -0
- package/dist/4225.js +1 -0
- package/dist/4225.js.map +1 -0
- package/dist/4300.js +1 -0
- package/dist/4335.js +1 -0
- package/dist/4353.js +1 -0
- package/dist/4353.js.map +1 -0
- package/dist/4517.js +1 -0
- package/dist/4517.js.map +1 -0
- package/dist/4652.js +1 -0
- package/dist/4674.js +1 -0
- package/dist/4674.js.map +1 -0
- package/dist/4947.js +1 -0
- package/dist/4947.js.map +1 -0
- package/dist/5015.js +1 -0
- package/dist/5015.js.map +1 -0
- package/dist/5422.js +1 -0
- package/dist/5422.js.map +1 -0
- package/dist/5428.js +1 -0
- package/dist/5428.js.map +1 -0
- package/dist/5752.js +1 -0
- package/dist/5752.js.map +1 -0
- package/dist/5851.js +1 -0
- package/dist/5851.js.map +1 -0
- package/dist/6264.js +1 -0
- package/dist/6264.js.map +1 -0
- package/dist/6540.js +2 -0
- package/dist/6540.js.map +1 -0
- package/dist/6606.js +1 -0
- package/dist/6606.js.map +1 -0
- package/dist/693.js +1 -0
- package/dist/693.js.map +1 -0
- package/dist/6991.js +1 -0
- package/dist/6991.js.map +1 -0
- package/dist/7076.js +1 -0
- package/dist/7076.js.map +1 -0
- package/dist/7199.js +1 -0
- package/dist/7199.js.map +1 -0
- package/dist/7255.js +1 -0
- package/dist/7255.js.map +1 -0
- package/dist/7258.js +1 -0
- package/dist/7258.js.map +1 -0
- package/dist/7420.js +1 -0
- package/dist/7420.js.map +1 -0
- package/dist/7523.js +1 -0
- package/dist/7523.js.map +1 -0
- package/dist/8114.js +1 -0
- package/dist/8114.js.map +1 -0
- package/dist/8339.js +1 -0
- package/dist/8339.js.map +1 -0
- package/dist/8865.js +1 -0
- package/dist/8865.js.map +1 -0
- package/dist/8895.js +1 -0
- package/dist/8895.js.map +1 -0
- package/dist/9037.js +1 -0
- package/dist/9037.js.map +1 -0
- package/dist/9091.js +1 -0
- package/dist/9091.js.map +1 -0
- package/dist/9093.js +1 -0
- package/dist/9093.js.map +1 -0
- package/dist/9117.js +1 -0
- package/dist/9117.js.map +1 -0
- package/dist/9721.js +1 -0
- package/dist/9721.js.map +1 -0
- package/dist/esm-dha-workflow-app.js +1 -0
- package/dist/esm-dha-workflow-app.js.buildmanifest.json +1570 -0
- package/dist/esm-dha-workflow-app.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +11 -4
- package/src/accounting/accounting.component.tsx +13 -0
- package/src/admissions/admission-request-list/admission-request-list.scss +0 -0
- package/src/admissions/admission-request-list/admission-request-list.tsx +134 -0
- package/src/admissions/admissions-dashboard.component.scss +15 -0
- package/src/admissions/admissions-dashboard.component.tsx +160 -0
- package/src/admissions/admissions.resource.ts +101 -0
- package/src/admissions/admitted-list/admitted-patients-list.tsx +141 -0
- package/src/admissions/constants/index.ts +33 -0
- package/src/admissions/discharged-list/discharged-list.scss +0 -0
- package/src/admissions/discharged-list/discharged-list.tsx +58 -0
- package/src/admissions/inpatient/admission-history/patient-admission-history.tsx +76 -0
- package/src/admissions/inpatient/admission-requests/patient-admission-requests.scss +19 -0
- package/src/admissions/inpatient/admission-requests/patient-admission-requests.tsx +72 -0
- package/src/admissions/inpatient/inpatient-admissions.component.scss +7 -0
- package/src/admissions/inpatient/inpatient-admissions.component.tsx +46 -0
- package/src/admissions/modal/admit-elsewhere/admit-elsewhere.modal.scss +23 -0
- package/src/admissions/modal/admit-elsewhere/admit-elsewhere.modal.tsx +156 -0
- package/src/admissions/modal/admit-patient/admit-patient.modal.scss +0 -0
- package/src/admissions/modal/admit-patient/admit-patient.modal.tsx +109 -0
- package/src/admissions/modal/bed-swap/bed-swap.modal.scss +0 -0
- package/src/admissions/modal/bed-swap/bed-swap.modal.tsx +102 -0
- package/src/admissions/modal/cancel-admission-request/cancel-admission-request.scss +11 -0
- package/src/admissions/modal/cancel-admission-request/cancel-admission-request.tsx +105 -0
- package/src/admissions/modal/discharge/discharge-patient.modal.scss +13 -0
- package/src/admissions/modal/discharge/discharge-patient.modal.tsx +84 -0
- package/src/admissions/types/index.ts +192 -0
- package/src/appointments/appointments.component.tsx +13 -0
- package/src/billing/api/billing.api.ts +95 -0
- package/src/billing/billing-root.tsx +20 -0
- package/src/billing/dashboard/billingDashboard.component.scss +0 -0
- package/src/billing/dashboard/billingDashboard.component.tsx +25 -0
- package/src/billing/extensions/visit-billing/visit-billing.extension.scss +0 -0
- package/src/billing/extensions/visit-billing/visit-billing.extension.tsx +409 -0
- package/src/billing/invoice/bill.resource.ts +47 -0
- package/src/billing/invoice/invoice-header/header-card/header-card.scss +17 -0
- package/src/billing/invoice/invoice-header/header-card/header-card.tsx +21 -0
- package/src/billing/invoice/invoice.scss +113 -0
- package/src/billing/invoice/invoice.tsx +1371 -0
- package/src/billing/invoice/line-items/line-items.scss +0 -0
- package/src/billing/invoice/line-items/line-items.tsx +120 -0
- package/src/billing/invoice/modal/delete-bill-item/delete-bill-item.modal.scss +23 -0
- package/src/billing/invoice/modal/delete-bill-item/delete-bill-item.modal.tsx +114 -0
- package/src/billing/invoice/modal/edit-bill-item/edit-bill-item.modal.scss +0 -0
- package/src/billing/invoice/modal/edit-bill-item/edit-bill-item.modal.tsx +122 -0
- package/src/billing/invoice/payment-details/payment-details.scss +0 -0
- package/src/billing/invoice/payment-details/payment-details.tsx +43 -0
- package/src/billing/invoice/print-invoice/print-receipt.component.tsx +44 -0
- package/src/billing/invoice/print-invoice/print-receipt.scss +14 -0
- package/src/billing/types/index.ts +84 -0
- package/src/billing/utils/index.ts +17 -0
- package/src/billing/widgets/billingTotalsRow.component.scss +0 -0
- package/src/billing/widgets/billingTotalsRow.component.tsx +712 -0
- package/src/billing/workspaces/create-order-bill-form-workspace/create-order-bill-form.resource.ts +85 -0
- package/src/billing/workspaces/create-order-bill-form-workspace/create-order-bill-form.scss +58 -0
- package/src/billing/workspaces/create-order-bill-form-workspace/create-order-bill-form.workspace.tsx +330 -0
- package/src/billing/workspaces/create-order-bill-form-workspace/schema.ts +11 -0
- package/src/bookings/bookings.component.scss +7 -0
- package/src/bookings/bookings.component.tsx +31 -0
- package/src/bookings/daily/daily-bookings.component.scss +38 -0
- package/src/bookings/daily/daily-bookings.component.tsx +138 -0
- package/src/bookings/daily/daily-bookings.resource.ts +28 -0
- package/src/bookings/daily/filters/daily-bookings-filter.component.scss +15 -0
- package/src/bookings/daily/filters/daily-bookings-filter.component.tsx +80 -0
- package/src/bookings/daily/patient-list/daily-bookings-patient-list.component.tsx +97 -0
- package/src/bookings/types/index.ts +68 -0
- package/src/config-schema.ts +186 -32
- package/src/createDashboardLink.tsx +9 -0
- package/src/dashboard/charts/chart.component.scss +13 -0
- package/src/dashboard/charts/chart.component.tsx +54 -0
- package/src/dashboard/dashboard.component.scss +7 -0
- package/src/dashboard/dashboard.component.tsx +51 -0
- package/src/dashboard/overview/overview.component.scss +147 -0
- package/src/dashboard/overview/overview.component.tsx +115 -0
- package/src/dashboard/patient-list/patient-list.component.tsx +41 -0
- package/src/dashboard-meta/accounting-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/admissions-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/billing-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/bookings-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/consultation-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/dha-workflow-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/inpatient-admissions.meta.ts +6 -0
- package/src/dashboard-meta/mch-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/pharmacy-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/queue-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/registers-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/registry-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/service-queue-admin.meta.ts +6 -0
- package/src/dashboard-meta/triage-dashboard.meta.ts +6 -0
- package/src/hooks/useActions.ts +165 -0
- package/src/index.ts +118 -1
- package/src/laboratory/laboratory.component.tsx +13 -0
- package/src/left-panel/left-panel.component.tsx +0 -2
- package/src/mch/mch-queues.component.scss +7 -0
- package/src/mch/mch-queues.component.tsx +32 -0
- package/src/mch/queues/consultation/mch-consultation.tsx +18 -0
- package/src/mch/queues/triage/mch-triage.tsx +15 -0
- package/src/modals/sign-off-modal.scss +7 -0
- package/src/modals/sign-off-modal.tsx +52 -0
- package/src/mortuary/mortuary.component.tsx +13 -0
- package/src/pharmacy/pharmacy.component.tsx +13 -0
- package/src/registers/registers.component.tsx +8 -0
- package/src/registry/eligibility/eliigibility-tags/eligibility-tags.scss +6 -0
- package/src/registry/eligibility/eliigibility-tags/eligibility-tags.tsx +137 -0
- package/src/registry/eligibility/modal/eligibility-details.modal.scss +38 -0
- package/src/registry/eligibility/modal/eligibility-details.modal.tsx +131 -0
- package/src/registry/modal/client-details-modal/client-details-modal.tsx +9 -26
- package/src/registry/modal/otp-verification-modal/otp-verification-modal.scss +31 -1
- package/src/registry/modal/otp-verification-modal/otp-verification-modal.tsx +145 -58
- package/src/registry/modal/send-to-triage/send-to-triage.modal.scss +16 -1
- package/src/registry/modal/send-to-triage/send-to-triage.modal.tsx +681 -97
- package/src/registry/payment-details/payment-options/payment-options.scss +13 -0
- package/src/registry/payment-details/payment-options/payment-options.tsx +61 -14
- package/src/registry/registry.component.scss +18 -1
- package/src/registry/registry.component.tsx +242 -111
- package/src/registry/registry.resource.ts +8 -5
- package/src/registry/types/index.ts +179 -1
- package/src/registry/utils/error-handler.ts +33 -0
- package/src/registry/utils/format-dependant-display-data.ts +8 -0
- package/src/registry/utils/hie-client-adapter.ts +312 -0
- package/src/registry/utils/mask-data.ts +11 -0
- package/src/resources/dashboard.resource.ts +20 -0
- package/src/resources/hie-amrs-automatic-registration.service.ts +16 -0
- package/src/resources/identifier-types.ts +29 -0
- package/src/resources/patient-resource.ts +62 -0
- package/src/resources/queue.resource.ts +23 -0
- package/src/resources/superset.resource.ts +20 -0
- package/src/resources/visit.resource.ts +19 -1
- package/src/root.component.tsx +32 -6
- package/src/routes.json +232 -7
- package/src/service-queues/action-button.component.tsx +34 -0
- package/src/service-queues/action-overflow-menu-item.component.tsx +34 -0
- package/src/service-queues/admin/queue/modal/create-queue/create-queue.modal.scss +31 -0
- package/src/service-queues/admin/queue/modal/create-queue/create-queue.modal.tsx +142 -0
- package/src/service-queues/admin/queue/modal/edit-queue/edit-queue.modal.scss +0 -0
- package/src/service-queues/admin/queue/modal/edit-queue/edit-queue.modal.tsx +150 -0
- package/src/service-queues/admin/queue/queue-list/queue-list.scss +33 -0
- package/src/service-queues/admin/queue/queue-list/queue-list.tsx +113 -0
- package/src/service-queues/admin/queue-entry/queue-entry-list.component.scss +6 -0
- package/src/service-queues/admin/queue-entry/queue-entry-list.component.tsx +137 -0
- package/src/service-queues/admin/queue-room/modal/create-queue-room/create-queue-room.modal.scss +31 -0
- package/src/service-queues/admin/queue-room/modal/create-queue-room/create-queue-room.modal.tsx +137 -0
- package/src/service-queues/admin/queue-room/modal/edit-queue-room/edit-queue-room.modal.scss +0 -0
- package/src/service-queues/admin/queue-room/modal/edit-queue-room/edit-queue-room.modal.tsx +146 -0
- package/src/service-queues/admin/queue-room/queue-room-list/queue-room-list.scss +22 -0
- package/src/service-queues/admin/queue-room/queue-room-list/queue-room-list.tsx +120 -0
- package/src/service-queues/admin/service-queue-admin-dashboard.component.scss +6 -0
- package/src/service-queues/admin/service-queue-admin-dashboard.component.tsx +34 -0
- package/src/service-queues/consultation/consultation.component.scss +7 -0
- package/src/service-queues/consultation/consultation.component.tsx +15 -0
- package/src/service-queues/extensions/service-queue-patient-banner/service-queue-patient-banner.scss +30 -0
- package/src/service-queues/extensions/service-queue-patient-banner/service-queue-patient-banner.tsx +108 -0
- package/src/service-queues/metrics/metrics-cards/attended-patients.extension.tsx +38 -0
- package/src/service-queues/metrics/metrics-cards/metrics-card.component.tsx +86 -0
- package/src/service-queues/metrics/metrics-cards/metrics-card.scss +106 -0
- package/src/service-queues/metrics/metrics-cards/waiting-patients.extension.tsx +34 -0
- package/src/service-queues/metrics/metrics-container.component.tsx +23 -0
- package/src/service-queues/metrics/metrics-container.scss +36 -0
- package/src/service-queues/metrics/metrics.resource.ts +65 -0
- package/src/service-queues/modals/daily-report-patient-list/daily-report-patient-list.scss +26 -0
- package/src/service-queues/modals/daily-report-patient-list/daily-report-patient-list.tsx +108 -0
- package/src/service-queues/modals/move/move-patient.component.scss +35 -0
- package/src/service-queues/modals/move/move-patient.component.tsx +152 -0
- package/src/service-queues/modals/serve/serve-patient.comppnent.scss +0 -0
- package/src/service-queues/modals/serve/serve-patient.comppnent.tsx +80 -0
- package/src/service-queues/modals/sign-off/sign-off.modal.scss +0 -0
- package/src/service-queues/modals/sign-off/sign-off.modal.tsx +79 -0
- package/src/service-queues/modals/transition/transition-patient.component.scss +0 -0
- package/src/service-queues/modals/transition/transition-patient.component.tsx +122 -0
- package/src/service-queues/queue-list/check-in.service.ts +26 -0
- package/src/service-queues/queue-list/queue-list.component.scss +36 -0
- package/src/service-queues/queue-list/queue-list.component.tsx +249 -0
- package/src/service-queues/queue-room.component.tsx +39 -0
- package/src/service-queues/room/room.component.tsx +58 -0
- package/src/service-queues/service-queue/service-queue.component.scss +14 -0
- package/src/service-queues/service-queue/service-queue.component.tsx +399 -0
- package/src/service-queues/service-queue/stats/stat-details/stat-details.component.scss +12 -0
- package/src/service-queues/service-queue/stats/stat-details/stat-details.component.tsx +63 -0
- package/src/service-queues/service-queue.scss +27 -0
- package/src/service-queues/service-queue.tsx +37 -0
- package/src/service-queues/service-queues.resource.ts +361 -0
- package/src/service-queues/service.resource.ts +28 -0
- package/src/shared/constants/civil-status.ts +29 -0
- package/src/shared/constants/concepts.ts +15 -0
- package/src/shared/constants/index.ts +1 -2
- package/src/shared/constants/patient-category.ts +6 -0
- package/src/shared/constants/person-attributes.ts +33 -0
- package/src/shared/constants/visit-types.ts +7 -0
- package/src/shared/services/billing.resource.ts +38 -0
- package/src/shared/services/client-payment-mode.resource.ts +27 -0
- package/src/shared/services/client-payment.resource.ts +17 -0
- package/src/shared/services/eligibility.resource.ts +19 -0
- package/src/shared/services/encounters.resource.ts +27 -0
- package/src/shared/services/location.resource.ts +9 -0
- package/src/shared/types/index.ts +152 -0
- package/src/shared/ui/aggregate-stat-card/aggregate-stat-card.scss +42 -0
- package/src/shared/ui/aggregate-stat-card/aggregate-stat-card.tsx +42 -0
- package/src/shared/ui/confirm-modal/confirm.modal.scss +18 -0
- package/src/shared/ui/confirm-modal/confirm.modal.tsx +38 -0
- package/src/shared/ui/otp-input/otp-input.component.scss +14 -0
- package/src/shared/ui/otp-input/otp-input.component.tsx +90 -0
- package/src/shared/ui/stat-card/stat-card.component.scss +10 -0
- package/src/shared/ui/stat-card/stat-card.component.tsx +26 -0
- package/src/shared/ui/timer/timer.component.scss +5 -0
- package/src/shared/ui/timer/timer.component.tsx +40 -0
- package/src/shared/utils/get-base-url.ts +27 -0
- package/src/shared/utils/get-tag-type.ts +66 -0
- package/src/side-nav-menu/nav-link-config.ts +6 -0
- package/src/triage/metrics/attended-patients.extension.tsx +42 -0
- package/src/triage/metrics/metrics.scss +36 -0
- package/src/triage/metrics/triage-metrics.component.tsx +21 -0
- package/src/triage/metrics/waiting-patients.extension.tsx +39 -0
- package/src/triage/room/room.scss +29 -0
- package/src/triage/triage.component.tsx +15 -0
- package/src/triage/triage.resource.ts +19 -0
- package/src/triage/types.ts +16 -0
- package/src/types/types.ts +180 -0
- package/dist/16.js +0 -1
- package/dist/16.js.map +0 -1
- package/dist/184.js +0 -2
- package/dist/184.js.map +0 -1
- package/dist/197.js +0 -1
- package/dist/198.js +0 -2
- package/dist/198.js.map +0 -1
- package/dist/200.js +0 -2
- package/dist/200.js.map +0 -1
- package/dist/255.js +0 -1
- package/dist/255.js.map +0 -1
- package/dist/300.js +0 -1
- package/dist/335.js +0 -1
- package/dist/353.js +0 -1
- package/dist/353.js.map +0 -1
- package/dist/420.js +0 -1
- package/dist/420.js.map +0 -1
- package/dist/540.js +0 -2
- package/dist/540.js.map +0 -1
- package/dist/55.js +0 -1
- package/dist/652.js +0 -1
- package/dist/860.js +0 -1
- package/dist/860.js.map +0 -1
- package/dist/91.js +0 -1
- package/dist/91.js.map +0 -1
- package/dist/93.js +0 -1
- package/dist/93.js.map +0 -1
- package/dist/99.js +0 -1
- package/dist/openmrs-esm-home-app.js +0 -1
- package/dist/openmrs-esm-home-app.js.buildmanifest.json +0 -626
- package/dist/openmrs-esm-home-app.js.map +0 -1
- package/src/consultation/consultation.tsx +0 -7
- /package/dist/{184.js.LICENSE.txt → 3184.js.LICENSE.txt} +0 -0
- /package/dist/{540.js.LICENSE.txt → 6540.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { type Location } from '@openmrs/esm-framework';
|
|
2
|
+
|
|
3
|
+
export type BillableService = {
|
|
4
|
+
uuid: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
display?: string;
|
|
7
|
+
shortName: string;
|
|
8
|
+
serviceStatus: 'ENABLED' | 'DISABLED';
|
|
9
|
+
serviceType: ServiceType | null;
|
|
10
|
+
servicePrices: ServicePrice[];
|
|
11
|
+
resourceVersion: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type ServiceType = {
|
|
15
|
+
display: string;
|
|
16
|
+
resourceVersion: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type ServicePrice = {
|
|
20
|
+
uuid: string;
|
|
21
|
+
name: string;
|
|
22
|
+
price: number;
|
|
23
|
+
item: string;
|
|
24
|
+
paymentMode: PaymentMode;
|
|
25
|
+
billableService: BillableService;
|
|
26
|
+
resourceVersion: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type PaymentMode = {
|
|
30
|
+
uuid: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string | null;
|
|
33
|
+
retired: boolean;
|
|
34
|
+
retireReason: string;
|
|
35
|
+
attributeTypes: unknown[];
|
|
36
|
+
sortOrder: number | null;
|
|
37
|
+
resourceVersion: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type PayableBillableService = ServicePrice & {
|
|
41
|
+
billableService: BillableService;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type PaymentStatus = 'PENDING' | 'PAID' | 'FAILED' | 'CANCELLED';
|
|
45
|
+
|
|
46
|
+
export type LineItem = {
|
|
47
|
+
uuid?: string;
|
|
48
|
+
billableService: string;
|
|
49
|
+
quantity: number;
|
|
50
|
+
price: number;
|
|
51
|
+
priceName: string;
|
|
52
|
+
priceUuid: string;
|
|
53
|
+
lineItemOrder: number;
|
|
54
|
+
paymentStatus: PaymentStatus;
|
|
55
|
+
voided?: boolean;
|
|
56
|
+
voidedReason?: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type CreateBillDto = {
|
|
60
|
+
lineItems: LineItem[];
|
|
61
|
+
cashPoint: string;
|
|
62
|
+
patient: string;
|
|
63
|
+
status: PaymentStatus;
|
|
64
|
+
payments: any[];
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export type CashPoint = {
|
|
68
|
+
uuid: string;
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
retired: boolean;
|
|
72
|
+
location: Location;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type CreateClientPaymentModeDto = {
|
|
76
|
+
clientId: string;
|
|
77
|
+
paymentModeUuid: string;
|
|
78
|
+
};
|
|
79
|
+
export type HieClientPaymentMode = {
|
|
80
|
+
client_id: string;
|
|
81
|
+
payment_mode_uuid: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export type HieBillPayment = {
|
|
85
|
+
billUuid: string;
|
|
86
|
+
paymentUuid: string;
|
|
87
|
+
referenceNo: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type ServiceQueueDailyReport = {
|
|
91
|
+
queue_room_name: string;
|
|
92
|
+
patients: number;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export type ServiceQueueDailyReportResp = {
|
|
96
|
+
schemas: any;
|
|
97
|
+
sqlQuery: string;
|
|
98
|
+
size: number;
|
|
99
|
+
result: ServiceQueueDailyReport[];
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export type ServiceQueueReportPatientList = {
|
|
103
|
+
queue_entry_id: number;
|
|
104
|
+
patient_id: number;
|
|
105
|
+
queue_id: number;
|
|
106
|
+
queue_room_name: string;
|
|
107
|
+
queue_room_id: number;
|
|
108
|
+
service_name: string;
|
|
109
|
+
patient_uuid: string;
|
|
110
|
+
uuid: string;
|
|
111
|
+
person_id: number;
|
|
112
|
+
gender: string;
|
|
113
|
+
birthdate: string;
|
|
114
|
+
age: number;
|
|
115
|
+
person_name: string;
|
|
116
|
+
identifiers: string;
|
|
117
|
+
phone_number: string;
|
|
118
|
+
served_status: string;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export type ServiceQueueDailyPatientListReportResp = {
|
|
122
|
+
schemas: any;
|
|
123
|
+
sqlQuery: string;
|
|
124
|
+
size: number;
|
|
125
|
+
results: {
|
|
126
|
+
results: ServiceQueueReportPatientList[];
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export type OrderAction = 'NEW';
|
|
131
|
+
export type OrderUrgency = 'ROUTINE';
|
|
132
|
+
export type Order = {
|
|
133
|
+
action: OrderAction;
|
|
134
|
+
type: string;
|
|
135
|
+
patient: string;
|
|
136
|
+
careSetting: string;
|
|
137
|
+
orderer: string;
|
|
138
|
+
encounter: string;
|
|
139
|
+
concept: string;
|
|
140
|
+
accessionNumber: string;
|
|
141
|
+
urgency: OrderUrgency;
|
|
142
|
+
scheduledDate: null;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export type CreateOrderEncounterDto = {
|
|
146
|
+
patient: string;
|
|
147
|
+
location: string;
|
|
148
|
+
encounterType: string;
|
|
149
|
+
visit: string;
|
|
150
|
+
obs: any[];
|
|
151
|
+
orders: Order[];
|
|
152
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.aggregateStatsCard{
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
width: 100%;
|
|
5
|
+
border-radius: 12px;
|
|
6
|
+
border: 1px solid #d2d2d2;
|
|
7
|
+
min-height: 100px;
|
|
8
|
+
padding: 10px 10px;
|
|
9
|
+
column-gap: 10px;
|
|
10
|
+
.aggregateStatsCardHeader{
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
width: 50%;
|
|
14
|
+
column-gap: 3px;
|
|
15
|
+
}
|
|
16
|
+
.stats{
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
width: 50%;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
row-gap: 5px;
|
|
22
|
+
.statDetails{
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: row;
|
|
25
|
+
width: 100%;
|
|
26
|
+
.title{
|
|
27
|
+
width: 90%;
|
|
28
|
+
}
|
|
29
|
+
.count{
|
|
30
|
+
width: 10%;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.totalCount{
|
|
37
|
+
color: rgb(15, 98, 254);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.totalCount:hover{
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './aggregate-stat-card.scss';
|
|
3
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@carbon/react';
|
|
4
|
+
|
|
5
|
+
interface AgregateStatCardProps {
|
|
6
|
+
title: string;
|
|
7
|
+
totalCount: number;
|
|
8
|
+
stats: { title: string; count: number }[];
|
|
9
|
+
onStatDetailsRequest: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const AgregateStatCard: React.FC<AgregateStatCardProps> = ({ title, totalCount, stats, onStatDetailsRequest }) => {
|
|
13
|
+
if (!title) {
|
|
14
|
+
return <></>;
|
|
15
|
+
}
|
|
16
|
+
return (
|
|
17
|
+
<div className={styles.aggregateStatsCard}>
|
|
18
|
+
<div className={styles.aggregateStatsCardHeader}>
|
|
19
|
+
<h5>{title}</h5>
|
|
20
|
+
<h1 className={styles.totalCount} onClick={onStatDetailsRequest}>
|
|
21
|
+
{totalCount}
|
|
22
|
+
</h1>
|
|
23
|
+
</div>
|
|
24
|
+
<div className={styles.stats}>
|
|
25
|
+
{stats.map((val, index) => {
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
<div className={styles.statDetails}>
|
|
29
|
+
<div className={styles.title}>{val.title} :</div>
|
|
30
|
+
<div className={styles.count}>
|
|
31
|
+
<strong>{val.count}</strong>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</>
|
|
35
|
+
);
|
|
36
|
+
})}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default AgregateStatCard;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.modalLayout{
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
row-gap: 15px;
|
|
5
|
+
padding: 15px 15px;
|
|
6
|
+
}
|
|
7
|
+
.modalTitle{
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
}
|
|
12
|
+
.modalContentSection{
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
row-gap: 15px;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Modal, ModalBody } from '@carbon/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styles from './confirm.modal.scss';
|
|
4
|
+
interface ConfirmModal {
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle: string;
|
|
7
|
+
open: boolean;
|
|
8
|
+
onModalClose: () => void;
|
|
9
|
+
onConfirm: () => void;
|
|
10
|
+
}
|
|
11
|
+
const ConfirmModal: React.FC<ConfirmModal> = ({ open, title, subtitle, onConfirm, onModalClose }) => {
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<Modal
|
|
15
|
+
modalHeading=""
|
|
16
|
+
open={open}
|
|
17
|
+
size="md"
|
|
18
|
+
onSecondarySubmit={onModalClose}
|
|
19
|
+
onRequestClose={() => onModalClose()}
|
|
20
|
+
onRequestSubmit={onConfirm}
|
|
21
|
+
primaryButtonText="Confirm"
|
|
22
|
+
secondaryButtonText="Cancel"
|
|
23
|
+
>
|
|
24
|
+
<ModalBody>
|
|
25
|
+
<div className={styles.modalLayout}>
|
|
26
|
+
<div className={styles.modalTitle}>
|
|
27
|
+
<h4>{title}</h4>
|
|
28
|
+
</div>
|
|
29
|
+
<div className={styles.modalContentSection}>
|
|
30
|
+
<h6>{subtitle}</h6>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</ModalBody>
|
|
34
|
+
</Modal>
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
export default ConfirmModal;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
|
+
import { TextInput } from '@carbon/react';
|
|
3
|
+
import styles from './otp-input.component.scss';
|
|
4
|
+
|
|
5
|
+
interface OTPInputProps {
|
|
6
|
+
onChange: (otp: string) => void;
|
|
7
|
+
otpLength: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const OTPInput: React.FC<OTPInputProps> = ({ onChange, otpLength }) => {
|
|
11
|
+
const [otp, setOtp] = useState(Array(otpLength).fill(''));
|
|
12
|
+
const inputsRef = useRef([]);
|
|
13
|
+
|
|
14
|
+
if (!otpLength) {
|
|
15
|
+
return <>OTP Length not defined</>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const focusInput = (index) => {
|
|
19
|
+
if (inputsRef.current[index]) {
|
|
20
|
+
inputsRef.current[index].focus();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const handleChange = (value, index) => {
|
|
25
|
+
if (!/^\d?$/.test(value)) return;
|
|
26
|
+
|
|
27
|
+
const newOtp = [...otp];
|
|
28
|
+
newOtp[index] = value;
|
|
29
|
+
setOtp(newOtp);
|
|
30
|
+
|
|
31
|
+
if (value && index < otpLength - 1) {
|
|
32
|
+
focusInput(index + 1);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
onChange?.(newOtp.join(''));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const handleKeyDown = (e, index) => {
|
|
39
|
+
if (e.key === 'Backspace' && !otp[index] && index > 0) {
|
|
40
|
+
focusInput(index - 1);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const handlePaste = (e) => {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
const pasted = e.clipboardData.getData('text').replace(/\D/g, '').slice(0, otpLength);
|
|
47
|
+
|
|
48
|
+
if (!pasted) return;
|
|
49
|
+
|
|
50
|
+
const newOtp = [...otp];
|
|
51
|
+
pasted.split('').forEach((digit, i) => {
|
|
52
|
+
newOtp[i] = digit;
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
setOtp(newOtp);
|
|
56
|
+
onChange?.(newOtp.join(''));
|
|
57
|
+
focusInput(pasted.length - 1);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<div className={styles.otpInputContainer} onPaste={handlePaste}>
|
|
62
|
+
{otp.map((digit, index) => (
|
|
63
|
+
<div className={styles.otpDataInputContainer}>
|
|
64
|
+
<TextInput
|
|
65
|
+
className={styles.otpDataInput}
|
|
66
|
+
key={index}
|
|
67
|
+
id={`otp-${index}`}
|
|
68
|
+
value={digit}
|
|
69
|
+
labelText=""
|
|
70
|
+
hideLabel
|
|
71
|
+
maxLength={1}
|
|
72
|
+
inputMode="numeric"
|
|
73
|
+
pattern="[0-9]*"
|
|
74
|
+
ref={(el) => (inputsRef.current[index] = el)}
|
|
75
|
+
onChange={(e) => handleChange(e.target.value, index)}
|
|
76
|
+
onKeyDown={(e) => handleKeyDown(e, index)}
|
|
77
|
+
style={{
|
|
78
|
+
height: '4rem',
|
|
79
|
+
width: '4rem',
|
|
80
|
+
borderStyle: 'solid grey',
|
|
81
|
+
backgroundColor: '#e5ebf7',
|
|
82
|
+
}}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
))}
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export default OTPInput;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './stat-card.component.scss';
|
|
3
|
+
|
|
4
|
+
interface StatCardProps {
|
|
5
|
+
title: string;
|
|
6
|
+
count?: number;
|
|
7
|
+
other?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const StatCard: React.FC<StatCardProps> = ({ title, count, other }) => {
|
|
11
|
+
if (!title) {
|
|
12
|
+
return <></>;
|
|
13
|
+
}
|
|
14
|
+
return (
|
|
15
|
+
<div className={styles.statsCard}>
|
|
16
|
+
<div className={styles.statsCardHeader}>
|
|
17
|
+
<h5>{title}</h5>
|
|
18
|
+
<h1>
|
|
19
|
+
{count} {other}
|
|
20
|
+
</h1>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default StatCard;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import styles from './timer.component.scss';
|
|
3
|
+
|
|
4
|
+
interface TimerProps {
|
|
5
|
+
durationInSeconds: number;
|
|
6
|
+
resetTimer: () => void;
|
|
7
|
+
onTimeUp: () => void;
|
|
8
|
+
}
|
|
9
|
+
const Timer: React.FC<TimerProps> = ({ durationInSeconds, resetTimer, onTimeUp }) => {
|
|
10
|
+
const [timeLeft, setTimeLeft] = useState(durationInSeconds);
|
|
11
|
+
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (timeLeft <= 0) {
|
|
14
|
+
onTimeUp?.();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const intervalId = setInterval(() => {
|
|
19
|
+
setTimeLeft((prev) => prev - 1);
|
|
20
|
+
}, 1000);
|
|
21
|
+
|
|
22
|
+
return () => clearInterval(intervalId);
|
|
23
|
+
}, [timeLeft]);
|
|
24
|
+
|
|
25
|
+
const convertToMinsAndSeconds = (timeInSeconds: number) => {
|
|
26
|
+
const min = Math.floor(timeInSeconds / 60);
|
|
27
|
+
const seconds = timeInSeconds % 60;
|
|
28
|
+
const formatedMin = min > 9 ? min : `0${min}`;
|
|
29
|
+
const formattedSec = seconds > 9 ? seconds : `0${seconds}`;
|
|
30
|
+
return `${formatedMin}:${formattedSec}`;
|
|
31
|
+
};
|
|
32
|
+
return (
|
|
33
|
+
<>
|
|
34
|
+
<div className={styles.timerData}>
|
|
35
|
+
<b>{convertToMinsAndSeconds(timeLeft)}</b>
|
|
36
|
+
</div>
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
export default Timer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getConfig } from '@openmrs/esm-framework';
|
|
2
|
+
import { moduleName } from '../..';
|
|
3
|
+
|
|
4
|
+
export async function getSubDomainUrl() {
|
|
5
|
+
const { subDomainUrl } = await getConfig(moduleName);
|
|
6
|
+
return subDomainUrl ?? null;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export async function getEtlBaseUrl() {
|
|
10
|
+
const { etlBaseUrl } = await getConfig(moduleName);
|
|
11
|
+
return etlBaseUrl ?? null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export async function getHieBaseUrl() {
|
|
15
|
+
const { hieBaseUrl } = await getConfig(moduleName);
|
|
16
|
+
return hieBaseUrl ?? null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export async function getClaimsUrl() {
|
|
20
|
+
const { claimsBaseUrl } = await getConfig(moduleName);
|
|
21
|
+
return claimsBaseUrl ?? null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export async function getClaimsKey() {
|
|
25
|
+
const { claimsKey } = await getConfig(moduleName);
|
|
26
|
+
return claimsKey ?? null;
|
|
27
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { QueueEntryPriority, type TagColor, type TagType } from '../../types/types';
|
|
2
|
+
|
|
3
|
+
export function getTagType(val: number | string): TagType {
|
|
4
|
+
if (val === 1 || val === '1') {
|
|
5
|
+
return 'green';
|
|
6
|
+
} else {
|
|
7
|
+
return 'red';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const getTagTypeByPriority = (priority: string): TagColor => {
|
|
12
|
+
let type: TagColor;
|
|
13
|
+
switch (priority) {
|
|
14
|
+
case QueueEntryPriority.Emergency:
|
|
15
|
+
type = 'red';
|
|
16
|
+
break;
|
|
17
|
+
case QueueEntryPriority.Priority:
|
|
18
|
+
type = 'blue';
|
|
19
|
+
break;
|
|
20
|
+
case QueueEntryPriority.NonUrgent:
|
|
21
|
+
type = 'green';
|
|
22
|
+
break;
|
|
23
|
+
case `${QueueEntryPriority.Emergency} PRIORITY`:
|
|
24
|
+
type = 'red';
|
|
25
|
+
break;
|
|
26
|
+
case `${QueueEntryPriority.NonUrgent} PRIORITY`:
|
|
27
|
+
type = 'green';
|
|
28
|
+
break;
|
|
29
|
+
default:
|
|
30
|
+
type = 'gray';
|
|
31
|
+
}
|
|
32
|
+
return type;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const getTagClassByPriority = (priority: string): string => {
|
|
36
|
+
let className: string;
|
|
37
|
+
switch (priority) {
|
|
38
|
+
case QueueEntryPriority.Emergency:
|
|
39
|
+
className = 'emergencyTag';
|
|
40
|
+
break;
|
|
41
|
+
case QueueEntryPriority.Priority:
|
|
42
|
+
className = 'priorityTag';
|
|
43
|
+
break;
|
|
44
|
+
case QueueEntryPriority.NonUrgent:
|
|
45
|
+
className = 'nonUrgentTag';
|
|
46
|
+
break;
|
|
47
|
+
case `${QueueEntryPriority.Emergency} PRIORITY`:
|
|
48
|
+
className = 'emergencyTag';
|
|
49
|
+
break;
|
|
50
|
+
case `${QueueEntryPriority.NonUrgent} PRIORITY`:
|
|
51
|
+
className = 'nonUrgentTag';
|
|
52
|
+
break;
|
|
53
|
+
case `${QueueEntryPriority.Priority} PRIORITY`:
|
|
54
|
+
className = 'priorityTag';
|
|
55
|
+
break;
|
|
56
|
+
case 'NORMAL PRIORITY':
|
|
57
|
+
className = 'priorityTag';
|
|
58
|
+
break;
|
|
59
|
+
case 'NOT URGENT':
|
|
60
|
+
className = 'nonUrgentTag';
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
className = 'gray';
|
|
64
|
+
}
|
|
65
|
+
return className;
|
|
66
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import {
|
|
4
|
+
MetricsCard,
|
|
5
|
+
MetricsCardHeader,
|
|
6
|
+
MetricsCardBody,
|
|
7
|
+
MetricsCardItem,
|
|
8
|
+
} from '../../service-queues/metrics/metrics-cards/metrics-card.component';
|
|
9
|
+
import { useSession } from '@openmrs/esm-framework';
|
|
10
|
+
import { QUEUE_SERVICE_UUIDS } from '../../shared/constants/concepts';
|
|
11
|
+
import { getServiceQueueByLocationUuid } from '../../service-queues/service-queues.resource';
|
|
12
|
+
import { type QueueEntryResult } from '../../registry/types';
|
|
13
|
+
|
|
14
|
+
export default function TriageAttendedToPatientsExtension() {
|
|
15
|
+
const { t } = useTranslation();
|
|
16
|
+
const [triageQueueEntries, setTriageQueueEntries] = useState<QueueEntryResult[]>([]);
|
|
17
|
+
const session = useSession();
|
|
18
|
+
const locationUuid = session.sessionLocation.uuid;
|
|
19
|
+
const triageServiceUuid = QUEUE_SERVICE_UUIDS.TRIAGE_SERVICE_UUID;
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
getTriageEntryQueues();
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
const getTriageEntryQueues = async () => {
|
|
25
|
+
const res = await getServiceQueueByLocationUuid(triageServiceUuid, locationUuid);
|
|
26
|
+
setTriageQueueEntries(res);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const attendedToPatientsCount = triageQueueEntries?.filter((p) => p.status === 'COMPLETED').length ?? 0;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<MetricsCard>
|
|
33
|
+
<MetricsCardHeader title={t('patientsAttendedTo', 'Patients attended to')} />
|
|
34
|
+
<MetricsCardBody>
|
|
35
|
+
<MetricsCardItem
|
|
36
|
+
label={t('patients', 'Patients')}
|
|
37
|
+
value={attendedToPatientsCount ? attendedToPatientsCount : '--'}
|
|
38
|
+
/>
|
|
39
|
+
</MetricsCardBody>
|
|
40
|
+
</MetricsCard>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -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,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExtensionSlot } from '@openmrs/esm-framework';
|
|
3
|
+
import styles from './metrics.scss';
|
|
4
|
+
import TriageWaitingPatientsExtension from './waiting-patients.extension';
|
|
5
|
+
import TriageAttendedToPatientsExtension from './attended-patients.extension';
|
|
6
|
+
|
|
7
|
+
export interface Service {
|
|
8
|
+
display: string;
|
|
9
|
+
uuid?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function TriageMetricsContainer() {
|
|
13
|
+
return (
|
|
14
|
+
<div className={styles.cardContainer}>
|
|
15
|
+
<TriageWaitingPatientsExtension />
|
|
16
|
+
<TriageAttendedToPatientsExtension />
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default TriageMetricsContainer;
|