@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,138 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import styles from './daily-bookings.component.scss';
|
|
3
|
+
import { Button, InlineLoading, Tab, TabList, TabPanel, TabPanels, Tabs } from '@carbon/react';
|
|
4
|
+
import DailyBookingsFilter from './filters/daily-bookings-filter.component';
|
|
5
|
+
import { showSnackbar } from '@openmrs/esm-framework';
|
|
6
|
+
import { type DailyBookingsResult, type BookingFilter, DailyBookingType } from '../types';
|
|
7
|
+
import DailiyBookingsPatientList from './patient-list/daily-bookings-patient-list.component';
|
|
8
|
+
import { getDailyBookings } from './daily-bookings.resource';
|
|
9
|
+
|
|
10
|
+
interface DailyBookingsProps {}
|
|
11
|
+
const DailyBookings: React.FC<DailyBookingsProps> = () => {
|
|
12
|
+
const [filters, setFilters] = useState<BookingFilter>();
|
|
13
|
+
const [appointments, setAppointments] = useState<DailyBookingsResult[]>([]);
|
|
14
|
+
const [visits, setVisits] = useState<DailyBookingsResult[]>([]);
|
|
15
|
+
const [hasNotReturned, setHasNotReturned] = useState<DailyBookingsResult[]>([]);
|
|
16
|
+
const [selectedTab, setSelectedTab] = useState<DailyBookingType>(DailyBookingType.Appointments);
|
|
17
|
+
const [loading, setLoading] = useState<boolean>(false);
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (filters) {
|
|
21
|
+
getDailyBookingsByType(selectedTab);
|
|
22
|
+
}
|
|
23
|
+
}, [filters]);
|
|
24
|
+
|
|
25
|
+
const handleFilterSelected = (filters: BookingFilter) => {
|
|
26
|
+
setFilters(filters);
|
|
27
|
+
};
|
|
28
|
+
const handleSelectedTab = (userSelectedTab: DailyBookingType) => {
|
|
29
|
+
setSelectedTab(userSelectedTab);
|
|
30
|
+
};
|
|
31
|
+
const getDailyBookingsByType = async (dailyBookingType: DailyBookingType) => {
|
|
32
|
+
const isValidFilter = isValidFilterset(filters);
|
|
33
|
+
if (!isValidFilter) return;
|
|
34
|
+
setLoading(true);
|
|
35
|
+
try {
|
|
36
|
+
const resp = await getDailyBookings(filters, dailyBookingType);
|
|
37
|
+
if (selectedTab === DailyBookingType.Appointments) {
|
|
38
|
+
setAppointments(resp);
|
|
39
|
+
}
|
|
40
|
+
if (selectedTab === DailyBookingType.Visits) {
|
|
41
|
+
setVisits(resp);
|
|
42
|
+
}
|
|
43
|
+
if (selectedTab === DailyBookingType.HasNotReturned) {
|
|
44
|
+
setHasNotReturned(resp);
|
|
45
|
+
}
|
|
46
|
+
} catch (e) {
|
|
47
|
+
showSnackbar({
|
|
48
|
+
kind: 'error',
|
|
49
|
+
title: e.message ?? 'An error ocurred while fetching data',
|
|
50
|
+
subtitle: '',
|
|
51
|
+
});
|
|
52
|
+
} finally {
|
|
53
|
+
setLoading(false);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const isValidFilterset = (filters: BookingFilter) => {
|
|
57
|
+
if (!filters) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
if (!filters.startDate) {
|
|
61
|
+
showSnackbar({
|
|
62
|
+
kind: 'error',
|
|
63
|
+
title: 'Start Date not set',
|
|
64
|
+
subtitle: '',
|
|
65
|
+
});
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
if (!filters.locationUuids) {
|
|
69
|
+
showSnackbar({
|
|
70
|
+
kind: 'error',
|
|
71
|
+
title: 'User location not set',
|
|
72
|
+
subtitle: '',
|
|
73
|
+
});
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
if (!filters.department) {
|
|
77
|
+
showSnackbar({
|
|
78
|
+
kind: 'error',
|
|
79
|
+
title: 'Department not set',
|
|
80
|
+
subtitle: '',
|
|
81
|
+
});
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
};
|
|
86
|
+
const handleRefresh = () => {
|
|
87
|
+
getDailyBookingsByType(selectedTab);
|
|
88
|
+
};
|
|
89
|
+
return (
|
|
90
|
+
<>
|
|
91
|
+
<div className={styles.bookingsLayout}>
|
|
92
|
+
<div className={styles.bookingsHeader}>
|
|
93
|
+
<h4>Daily Bookings</h4>
|
|
94
|
+
</div>
|
|
95
|
+
<div className={styles.bookingsFilters}>
|
|
96
|
+
<DailyBookingsFilter filterSelected={handleFilterSelected} />
|
|
97
|
+
</div>
|
|
98
|
+
<div className={styles.bookingsContent}>
|
|
99
|
+
<div className={styles.contentActions}>
|
|
100
|
+
<Button kind="primary" onClick={handleRefresh} disabled={loading}>
|
|
101
|
+
{loading ? <InlineLoading description="Fetching..." /> : 'Refresh'}
|
|
102
|
+
</Button>
|
|
103
|
+
</div>
|
|
104
|
+
<div className={styles.contentData}>
|
|
105
|
+
<Tabs>
|
|
106
|
+
<TabList contained>
|
|
107
|
+
<Tab onClick={() => handleSelectedTab(DailyBookingType.Appointments)}>Appointments</Tab>
|
|
108
|
+
<Tab onClick={() => handleSelectedTab(DailyBookingType.Visits)}>Visits</Tab>
|
|
109
|
+
<Tab onClick={() => handleSelectedTab(DailyBookingType.HasNotReturned)}>Has Not Returned</Tab>
|
|
110
|
+
</TabList>
|
|
111
|
+
<TabPanels>
|
|
112
|
+
<TabPanel>
|
|
113
|
+
{appointments && appointments.length > 0 ? (
|
|
114
|
+
<DailiyBookingsPatientList patientListData={appointments} />
|
|
115
|
+
) : (
|
|
116
|
+
<></>
|
|
117
|
+
)}
|
|
118
|
+
</TabPanel>
|
|
119
|
+
<TabPanel>
|
|
120
|
+
{visits && visits.length > 0 ? <DailiyBookingsPatientList patientListData={visits} /> : <></>}
|
|
121
|
+
</TabPanel>
|
|
122
|
+
<TabPanel>
|
|
123
|
+
{hasNotReturned && hasNotReturned.length > 0 ? (
|
|
124
|
+
<DailiyBookingsPatientList patientListData={hasNotReturned} />
|
|
125
|
+
) : (
|
|
126
|
+
<></>
|
|
127
|
+
)}
|
|
128
|
+
</TabPanel>
|
|
129
|
+
</TabPanels>
|
|
130
|
+
</Tabs>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</>
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export default DailyBookings;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { openmrsFetch } from '@openmrs/esm-framework';
|
|
2
|
+
import { getEtlBaseUrl } from '../../shared/utils/get-base-url';
|
|
3
|
+
import {
|
|
4
|
+
type BookingFilter,
|
|
5
|
+
type BookingDto,
|
|
6
|
+
type DailyBookingsResult,
|
|
7
|
+
type DailyBookingsReponse,
|
|
8
|
+
type DailyBookingType,
|
|
9
|
+
} from '../types';
|
|
10
|
+
|
|
11
|
+
export async function getDailyBookings(
|
|
12
|
+
bookingFilter: BookingFilter,
|
|
13
|
+
bookingType: DailyBookingType,
|
|
14
|
+
): Promise<DailyBookingsResult[]> {
|
|
15
|
+
const etlBaseUrl = await getEtlBaseUrl();
|
|
16
|
+
const params: BookingDto = {
|
|
17
|
+
department: bookingFilter.department,
|
|
18
|
+
startDate: bookingFilter.startDate ?? new Date().toISOString().split('T')[0],
|
|
19
|
+
locationUuids: bookingFilter.locationUuids,
|
|
20
|
+
startIndex: '0',
|
|
21
|
+
limit: '1000',
|
|
22
|
+
};
|
|
23
|
+
const queryString = new URLSearchParams(params).toString();
|
|
24
|
+
const dailyAppUrl = `${etlBaseUrl}/${bookingType}/${bookingFilter.startDate}?&${queryString}`;
|
|
25
|
+
const resp = await openmrsFetch(dailyAppUrl);
|
|
26
|
+
const data: DailyBookingsReponse = await resp.json();
|
|
27
|
+
return data.result ?? [];
|
|
28
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { Button, DatePicker, DatePickerInput, Dropdown, type OnChangeData } from '@carbon/react';
|
|
3
|
+
import styles from './daily-bookings-filter.component.scss';
|
|
4
|
+
import { type BookingFilter } from '../../types';
|
|
5
|
+
import { useSession } from '@openmrs/esm-framework';
|
|
6
|
+
|
|
7
|
+
interface DailyBookingsFilterProps {
|
|
8
|
+
filterSelected: (filters: BookingFilter) => void;
|
|
9
|
+
}
|
|
10
|
+
const DailyBookingsFilter: React.FC<DailyBookingsFilterProps> = ({ filterSelected }) => {
|
|
11
|
+
const dateRef = useRef<string>('');
|
|
12
|
+
const departmentRef = useRef<string>();
|
|
13
|
+
const session = useSession();
|
|
14
|
+
const locationUuid = session.sessionLocation.uuid;
|
|
15
|
+
const handleDateChange = (dateSelected: Date[]) => {
|
|
16
|
+
dateRef.current = new Date(dateSelected[0]).toLocaleDateString('en-CA');
|
|
17
|
+
};
|
|
18
|
+
const handleDepartmentChange = (selectedDept: OnChangeData<{ text: string }>) => {
|
|
19
|
+
departmentRef.current = selectedDept.selectedItem.text;
|
|
20
|
+
};
|
|
21
|
+
const handeleGenerateFilters = () => {
|
|
22
|
+
const filters: BookingFilter = {
|
|
23
|
+
startDate: dateRef.current,
|
|
24
|
+
department: departmentRef.current,
|
|
25
|
+
locationUuids: locationUuid,
|
|
26
|
+
};
|
|
27
|
+
filterSelected(filters);
|
|
28
|
+
};
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
<div className={styles.filterLayout}>
|
|
32
|
+
<div className={styles.filterRow}>
|
|
33
|
+
<div className={styles.filterFormGroup}>
|
|
34
|
+
<DatePicker
|
|
35
|
+
datePickerType="single"
|
|
36
|
+
locale="en"
|
|
37
|
+
onChange={handleDateChange}
|
|
38
|
+
onClose={() => {}}
|
|
39
|
+
onOpen={() => {}}
|
|
40
|
+
>
|
|
41
|
+
<DatePickerInput id="date-picker-single" labelText="Date" placeholder="mm/dd/yyyy" />
|
|
42
|
+
</DatePicker>
|
|
43
|
+
</div>
|
|
44
|
+
<div className={styles.filterFormGroup}>
|
|
45
|
+
<Dropdown
|
|
46
|
+
id="department"
|
|
47
|
+
invalidText="invalid selection"
|
|
48
|
+
itemToString={(item) => item.text}
|
|
49
|
+
onChange={handleDepartmentChange}
|
|
50
|
+
items={[
|
|
51
|
+
{
|
|
52
|
+
text: 'HIV',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
text: 'CDM',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
text: 'ONCOLOGY',
|
|
59
|
+
},
|
|
60
|
+
]}
|
|
61
|
+
label="Select Department"
|
|
62
|
+
titleText="Department"
|
|
63
|
+
type="default"
|
|
64
|
+
warnText=""
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div className={styles.filterRow}>
|
|
69
|
+
<div className={styles.filterFormGroup}>
|
|
70
|
+
<Button kind="primary" onClick={handeleGenerateFilters}>
|
|
71
|
+
Generate
|
|
72
|
+
</Button>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default DailyBookingsFilter;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@carbon/react';
|
|
3
|
+
import { type DailyBookingsResult } from '../../types';
|
|
4
|
+
|
|
5
|
+
interface DailiyBookingsPatientListProps {
|
|
6
|
+
patientListData: DailyBookingsResult[];
|
|
7
|
+
}
|
|
8
|
+
const DailiyBookingsPatientList: React.FC<DailiyBookingsPatientListProps> = ({ patientListData }) => {
|
|
9
|
+
if (!patientListData || patientListData.length === 0) {
|
|
10
|
+
return <>No Data</>;
|
|
11
|
+
}
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<Table>
|
|
15
|
+
<TableHead>
|
|
16
|
+
<TableRow>
|
|
17
|
+
<TableHeader>No</TableHeader>
|
|
18
|
+
<TableHeader>CCC Number</TableHeader>
|
|
19
|
+
<TableHeader>UPI Number</TableHeader>
|
|
20
|
+
<TableHeader>Program</TableHeader>
|
|
21
|
+
<TableHeader>RTC Date</TableHeader>
|
|
22
|
+
<TableHeader>Med Pickup Date</TableHeader>
|
|
23
|
+
<TableHeader>ARV Start Date</TableHeader>
|
|
24
|
+
<TableHeader>HIV Disclosure Status</TableHeader>
|
|
25
|
+
<TableHeader>Height</TableHeader>
|
|
26
|
+
<TableHeader>Weight</TableHeader>
|
|
27
|
+
<TableHeader>Stage</TableHeader>
|
|
28
|
+
<TableHeader>Patient Categorization</TableHeader>
|
|
29
|
+
<TableHeader>Service Delivery Model</TableHeader>
|
|
30
|
+
<TableHeader>DSD Model</TableHeader>
|
|
31
|
+
<TableHeader>CD4 Date</TableHeader>
|
|
32
|
+
<TableHeader>CD4 Results</TableHeader>
|
|
33
|
+
<TableHeader>Gender</TableHeader>
|
|
34
|
+
<TableHeader>Birthdate</TableHeader>
|
|
35
|
+
<TableHeader>Age</TableHeader>
|
|
36
|
+
<TableHeader>Patient Name</TableHeader>
|
|
37
|
+
<TableHeader>Identifiers</TableHeader>
|
|
38
|
+
<TableHeader>Phone Number</TableHeader>
|
|
39
|
+
<TableHeader>Latest RTC Date</TableHeader>
|
|
40
|
+
<TableHeader>Latest VL</TableHeader>
|
|
41
|
+
<TableHeader>VL Category</TableHeader>
|
|
42
|
+
<TableHeader>Latest VL Date</TableHeader>
|
|
43
|
+
<TableHeader>Last Appointment</TableHeader>
|
|
44
|
+
<TableHeader>Visit Type</TableHeader>
|
|
45
|
+
<TableHeader>Current Meds</TableHeader>
|
|
46
|
+
<TableHeader>Covid-19 Vaccination</TableHeader>
|
|
47
|
+
<TableHeader>TB Screening Date</TableHeader>
|
|
48
|
+
<TableHeader>TB Screening Result</TableHeader>
|
|
49
|
+
<TableHeader>Patient Category</TableHeader>
|
|
50
|
+
</TableRow>
|
|
51
|
+
</TableHead>
|
|
52
|
+
|
|
53
|
+
<TableBody>
|
|
54
|
+
{patientListData &&
|
|
55
|
+
patientListData.map((val, index) => (
|
|
56
|
+
<TableRow key={val.patient_uuid ?? index}>
|
|
57
|
+
<TableCell>{index + 1}</TableCell>
|
|
58
|
+
<TableCell>{val.ccc_number}</TableCell>
|
|
59
|
+
<TableCell>{val.upi_number}</TableCell>
|
|
60
|
+
<TableCell>{val.program}</TableCell>
|
|
61
|
+
<TableCell>{val.rtc_date}</TableCell>
|
|
62
|
+
<TableCell>{val.med_pick_up_date}</TableCell>
|
|
63
|
+
<TableCell>{val.arv_first_regimen_start_date}</TableCell>
|
|
64
|
+
<TableCell>{val.hiv_disclosure_status}</TableCell>
|
|
65
|
+
<TableCell>{val.height}</TableCell>
|
|
66
|
+
<TableCell>{val.weight}</TableCell>
|
|
67
|
+
<TableCell>{val.stage}</TableCell>
|
|
68
|
+
<TableCell>{val.patient_categorization}</TableCell>
|
|
69
|
+
<TableCell>{val.service_delivery_model}</TableCell>
|
|
70
|
+
<TableCell>{val.dsd_model}</TableCell>
|
|
71
|
+
<TableCell>{val.cd4_date}</TableCell>
|
|
72
|
+
<TableCell>{val.cd4_results}</TableCell>
|
|
73
|
+
<TableCell>{val.gender}</TableCell>
|
|
74
|
+
<TableCell>{val.birthdate}</TableCell>
|
|
75
|
+
<TableCell>{val.age}</TableCell>
|
|
76
|
+
<TableCell>{val.person_name}</TableCell>
|
|
77
|
+
<TableCell>{val.identifiers}</TableCell>
|
|
78
|
+
<TableCell>{val.phone_number}</TableCell>
|
|
79
|
+
<TableCell>{val.latest_rtc_date}</TableCell>
|
|
80
|
+
<TableCell>{val.latest_vl}</TableCell>
|
|
81
|
+
<TableCell>{val.vl_category}</TableCell>
|
|
82
|
+
<TableCell>{val.latest_vl_date}</TableCell>
|
|
83
|
+
<TableCell>{val.last_appointment}</TableCell>
|
|
84
|
+
<TableCell>{val.visit_type}</TableCell>
|
|
85
|
+
<TableCell>{val.cur_meds}</TableCell>
|
|
86
|
+
<TableCell>{val.covid_19_vaccination_status}</TableCell>
|
|
87
|
+
<TableCell>{val.tb_screening_date}</TableCell>
|
|
88
|
+
<TableCell>{val.tb_screening_result}</TableCell>
|
|
89
|
+
<TableCell>{val.patient_category}</TableCell>
|
|
90
|
+
</TableRow>
|
|
91
|
+
))}
|
|
92
|
+
</TableBody>
|
|
93
|
+
</Table>
|
|
94
|
+
</>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
export default DailiyBookingsPatientList;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type BookingFilter = {
|
|
2
|
+
startDate: string;
|
|
3
|
+
department: string;
|
|
4
|
+
locationUuids: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type BookingDto = BookingFilter & {
|
|
8
|
+
startIndex: string;
|
|
9
|
+
limit: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type DailyBookingsResult = {
|
|
13
|
+
ccc_number: string;
|
|
14
|
+
ovcid_id: string;
|
|
15
|
+
upi_number: string;
|
|
16
|
+
program: string;
|
|
17
|
+
rtc_date: string;
|
|
18
|
+
med_pick_up_date: string;
|
|
19
|
+
arv_first_regimen_start_date: string;
|
|
20
|
+
hiv_disclosure_status: string;
|
|
21
|
+
height: number;
|
|
22
|
+
weight: number;
|
|
23
|
+
stage: number;
|
|
24
|
+
patient_categorization: string;
|
|
25
|
+
service_delivery_model: string;
|
|
26
|
+
dsd_model: string;
|
|
27
|
+
cd4_date: string;
|
|
28
|
+
cd4_results: number;
|
|
29
|
+
patient_uuid: string;
|
|
30
|
+
gender: string;
|
|
31
|
+
birthdate: string;
|
|
32
|
+
age: number;
|
|
33
|
+
person_name: string;
|
|
34
|
+
identifiers: string;
|
|
35
|
+
phone_number: string;
|
|
36
|
+
latest_rtc_date: string;
|
|
37
|
+
latest_vl: number;
|
|
38
|
+
vl_category: string;
|
|
39
|
+
latest_vl_date: string;
|
|
40
|
+
last_appointment: string;
|
|
41
|
+
visit_type: string;
|
|
42
|
+
cur_meds: string;
|
|
43
|
+
previous_vl: number;
|
|
44
|
+
previous_vl_date: string;
|
|
45
|
+
nearest_center: string;
|
|
46
|
+
covid_19_vaccination_status: string;
|
|
47
|
+
sms_consent_provided: string;
|
|
48
|
+
sms_receive_time: string;
|
|
49
|
+
sms_delivery_status: string;
|
|
50
|
+
tb_screening_date: string;
|
|
51
|
+
patient_category: string;
|
|
52
|
+
tb_screening_result: string;
|
|
53
|
+
cervical_screening_date: string;
|
|
54
|
+
cervical_screening_method: string;
|
|
55
|
+
cervical_screening_result: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type DailyBookingsReponse = {
|
|
59
|
+
schemas: any;
|
|
60
|
+
sqlQuery: string;
|
|
61
|
+
result: DailyBookingsResult[];
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export enum DailyBookingType {
|
|
65
|
+
Appointments = 'daily-appointments',
|
|
66
|
+
Visits = 'daily-visits',
|
|
67
|
+
HasNotReturned = 'daily-has-not-returned',
|
|
68
|
+
}
|
package/src/config-schema.ts
CHANGED
|
@@ -1,39 +1,141 @@
|
|
|
1
1
|
import { Type, validator } from '@openmrs/esm-framework';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* This is the config schema. It expects a configuration object which
|
|
5
|
-
* looks like this:
|
|
6
|
-
*
|
|
7
|
-
* ```json
|
|
8
|
-
* { "casualGreeting": true, "whoToGreet": ["Mom"] }
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* In OpenMRS Microfrontends, all config parameters are optional. Thus,
|
|
12
|
-
* all elements must have a reasonable default. A good default is one
|
|
13
|
-
* that works well with the reference application.
|
|
14
|
-
*
|
|
15
|
-
* To understand the schema below, please read the configuration system
|
|
16
|
-
* documentation:
|
|
17
|
-
* https://openmrs.github.io/openmrs-esm-core/#/main/config
|
|
18
|
-
* Note especially the section "How do I make my module configurable?"
|
|
19
|
-
* https://openmrs.github.io/openmrs-esm-core/#/main/config?id=im-developing-an-esm-module-how-do-i-make-it-configurable
|
|
20
|
-
* and the Schema Reference
|
|
21
|
-
* https://openmrs.github.io/openmrs-esm-core/#/main/config?id=schema-reference
|
|
22
|
-
*/
|
|
23
3
|
export const configSchema = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
4
|
+
concepts: {
|
|
5
|
+
defaultPriorityConceptUuid: {
|
|
6
|
+
_type: Type.ConceptUuid,
|
|
7
|
+
_default: false,
|
|
8
|
+
_description: 'The UUID of the default priority for the queues eg Not urgent.',
|
|
9
|
+
},
|
|
10
|
+
defaultStatusConceptUuid: {
|
|
11
|
+
_type: Type.ConceptUuid,
|
|
12
|
+
_default: '51ae5e4d-b72b-4912-bf31-a17efb690aeb',
|
|
13
|
+
_description: 'The UUID of the default status for the queues eg Waiting.',
|
|
14
|
+
},
|
|
15
|
+
defaultTransitionStatus: {
|
|
16
|
+
_type: Type.ConceptUuid,
|
|
17
|
+
_default: 'ca7494ae-437f-4fd0-8aae-b88b9a2ba47d',
|
|
18
|
+
_description: 'The UUID of the default status for attending a service in the queues eg In Service.',
|
|
19
|
+
},
|
|
20
|
+
systolicBloodPressureUuid: {
|
|
21
|
+
_type: Type.ConceptUuid,
|
|
22
|
+
_default: '5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
23
|
+
},
|
|
24
|
+
diastolicBloodPressureUuid: {
|
|
25
|
+
_type: Type.ConceptUuid,
|
|
26
|
+
_default: '5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
27
|
+
},
|
|
28
|
+
emergencyPriorityConceptUuid: {
|
|
29
|
+
_type: Type.ConceptUuid,
|
|
30
|
+
_default: false,
|
|
31
|
+
_description: 'The UUID of the priority with the highest sort weight for the queues eg Emergency.',
|
|
32
|
+
},
|
|
33
|
+
generalPatientNoteConceptUuid: {
|
|
34
|
+
_type: Type.ConceptUuid,
|
|
35
|
+
_default: '162169AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
36
|
+
_description:
|
|
37
|
+
'The UUID of the free text note field intended to capture unstructured description of the patient encounter',
|
|
38
|
+
},
|
|
39
|
+
heightUuid: {
|
|
40
|
+
_type: Type.ConceptUuid,
|
|
41
|
+
_default: '5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
42
|
+
},
|
|
43
|
+
historicalObsConceptUuid: {
|
|
44
|
+
_type: Type.Array,
|
|
45
|
+
_default: ['161643AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'],
|
|
46
|
+
_description: 'The Uuids of the obs that are displayed on the previous visit modal',
|
|
47
|
+
_elements: {
|
|
48
|
+
_type: Type.ConceptUuid,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
oxygenSaturationUuid: {
|
|
52
|
+
_type: Type.ConceptUuid,
|
|
53
|
+
_default: '5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
54
|
+
},
|
|
55
|
+
pulseUuid: {
|
|
56
|
+
_type: Type.ConceptUuid,
|
|
57
|
+
_default: '5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
58
|
+
},
|
|
59
|
+
problemListConceptUuid: {
|
|
60
|
+
_type: Type.ConceptUuid,
|
|
61
|
+
_default: '1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
62
|
+
},
|
|
63
|
+
respiratoryRateUuid: {
|
|
64
|
+
_type: Type.ConceptUuid,
|
|
65
|
+
_default: '5242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
66
|
+
},
|
|
67
|
+
temperatureUuid: {
|
|
68
|
+
_type: Type.ConceptUuid,
|
|
69
|
+
_default: '5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
70
|
+
},
|
|
71
|
+
visitDiagnosesConceptUuid: {
|
|
72
|
+
_type: Type.ConceptUuid,
|
|
73
|
+
_default: '159947AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
35
74
|
},
|
|
36
|
-
|
|
75
|
+
weightUuid: {
|
|
76
|
+
_type: Type.ConceptUuid,
|
|
77
|
+
_default: '5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
subDomainUrl: {
|
|
81
|
+
_type: Type.String,
|
|
82
|
+
_description: 'Subdomain e.g training,staging',
|
|
83
|
+
_default: '',
|
|
84
|
+
},
|
|
85
|
+
etlBaseUrl: {
|
|
86
|
+
_type: Type.String,
|
|
87
|
+
_description: 'ETL Endpoint',
|
|
88
|
+
_default: '',
|
|
89
|
+
},
|
|
90
|
+
hieBaseUrl: {
|
|
91
|
+
_type: Type.String,
|
|
92
|
+
_description: 'HIE Endpoint',
|
|
93
|
+
_default: '',
|
|
94
|
+
},
|
|
95
|
+
claimsBaseUrl: {
|
|
96
|
+
_type: Type.String,
|
|
97
|
+
_description: '',
|
|
98
|
+
_default: '',
|
|
99
|
+
},
|
|
100
|
+
claimsKey: {
|
|
101
|
+
_type: Type.String,
|
|
102
|
+
_description: '',
|
|
103
|
+
_default: '',
|
|
104
|
+
},
|
|
105
|
+
registrationBillableServices: {
|
|
106
|
+
_type: Type.String,
|
|
107
|
+
_description: 'Billable services e.g consultation',
|
|
108
|
+
_default: '',
|
|
109
|
+
},
|
|
110
|
+
cashConsultationOrderTypeUuid: {
|
|
111
|
+
_type: Type.String,
|
|
112
|
+
_description: 'CASH Consultation Order type uuid',
|
|
113
|
+
_default: '',
|
|
114
|
+
},
|
|
115
|
+
shaConsultationOrderTypeUuid: {
|
|
116
|
+
_type: Type.String,
|
|
117
|
+
_description: 'SHA Consultation Order type uuid',
|
|
118
|
+
_default: '',
|
|
119
|
+
},
|
|
120
|
+
cashConsulationConceptUuid: {
|
|
121
|
+
_type: Type.String,
|
|
122
|
+
_description: 'Cash Consultation concept uuid',
|
|
123
|
+
_default: '',
|
|
124
|
+
},
|
|
125
|
+
shaConsulationConceptUuid: {
|
|
126
|
+
_type: Type.String,
|
|
127
|
+
_description: 'SHA Consultation concept uuid',
|
|
128
|
+
_default: '',
|
|
129
|
+
},
|
|
130
|
+
outPatientCareSettingUuid: {
|
|
131
|
+
_type: Type.String,
|
|
132
|
+
_description: 'Outpatient care settings uuid',
|
|
133
|
+
_default: '',
|
|
134
|
+
},
|
|
135
|
+
orderEncounterTypeUuid: {
|
|
136
|
+
_type: Type.String,
|
|
137
|
+
_description: 'Outpatient care settings uuid',
|
|
138
|
+
_default: '',
|
|
37
139
|
},
|
|
38
140
|
};
|
|
39
141
|
|
|
@@ -41,3 +143,55 @@ export type Config = {
|
|
|
41
143
|
casualGreeting: boolean;
|
|
42
144
|
whoToGreet: Array<string>;
|
|
43
145
|
};
|
|
146
|
+
|
|
147
|
+
export interface ConfigObject {
|
|
148
|
+
// priorityConfigs: Array<PriorityConfig>;
|
|
149
|
+
appointmentStatuses: Array<string>;
|
|
150
|
+
// biometrics: BiometricsConfigObject;
|
|
151
|
+
concepts: {
|
|
152
|
+
defaultPriorityConceptUuid: string;
|
|
153
|
+
defaultStatusConceptUuid: string;
|
|
154
|
+
defaultTransitionStatus: string;
|
|
155
|
+
diastolicBloodPressureUuid: string;
|
|
156
|
+
emergencyPriorityConceptUuid: string;
|
|
157
|
+
generalPatientNoteConceptUuid: string;
|
|
158
|
+
heightUuid: string;
|
|
159
|
+
historicalObsConceptUuid: Array<string>;
|
|
160
|
+
oxygenSaturationUuid: string;
|
|
161
|
+
pulseUuid: string;
|
|
162
|
+
problemListConceptUuid: string;
|
|
163
|
+
respiratoryRateUuid: string;
|
|
164
|
+
systolicBloodPressureUuid: string;
|
|
165
|
+
temperatureUuid: string;
|
|
166
|
+
visitDiagnosesConceptUuid: string;
|
|
167
|
+
weightUuid: string;
|
|
168
|
+
};
|
|
169
|
+
defaultInitialServiceQueue: string;
|
|
170
|
+
contactAttributeType: string;
|
|
171
|
+
customPatientChartUrl: string;
|
|
172
|
+
defaultIdentifierTypes: Array<string>;
|
|
173
|
+
dashboardTitle: {
|
|
174
|
+
key: string;
|
|
175
|
+
value: string;
|
|
176
|
+
};
|
|
177
|
+
// queueTables: TablesConfig;
|
|
178
|
+
showRecommendedVisitTypeTab: boolean;
|
|
179
|
+
visitQueueNumberAttributeUuid: string | null;
|
|
180
|
+
visitTypeResourceUrl: string;
|
|
181
|
+
subDomainUrl: string;
|
|
182
|
+
etlBaseUrl: string;
|
|
183
|
+
hieBaseUrl: string;
|
|
184
|
+
claimsBaseUrl: string;
|
|
185
|
+
claimsKey: string;
|
|
186
|
+
registrationBillableServices: Array<string>;
|
|
187
|
+
cashConsultationOrderTypeUuid: string;
|
|
188
|
+
cashConsulationConceptUuid: string;
|
|
189
|
+
shaConsultationOrderTypeUuid: string;
|
|
190
|
+
shaConsulationConceptUuid: string;
|
|
191
|
+
outPatientCareSettingUuid: string;
|
|
192
|
+
orderEncounterTypeUuid: string;
|
|
193
|
+
// vitals: VitalsConfigObject;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const queueEntryActions = ['move', 'call', 'edit', 'transition', 'signOff', 'remove', 'delete', 'undo'] as const;
|
|
197
|
+
export type QueueEntryAction = (typeof queueEntryActions)[number];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
3
|
+
import { DashboardExtension, type DashboardExtensionProps, type IconId } from '@openmrs/esm-framework';
|
|
4
|
+
|
|
5
|
+
export const createDashboardLink = (config: Omit<DashboardExtensionProps, 'icon'> & { icon?: IconId }) => () => (
|
|
6
|
+
<BrowserRouter>
|
|
7
|
+
<DashboardExtension path={config.path} title={config.title} basePath={config.basePath} icon={config.icon} />
|
|
8
|
+
</BrowserRouter>
|
|
9
|
+
);
|