@ampath/esm-dha-workflow-app 4.0.0-claim-workflows.159
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/.editorconfig +12 -0
- package/.eslintignore +2 -0
- package/.eslintrc +57 -0
- package/.husky/pre-commit +7 -0
- package/.husky/pre-push +6 -0
- package/.prettierignore +14 -0
- package/.turbo.json +18 -0
- package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
- package/LICENSE +401 -0
- package/README.md +37 -0
- package/__mocks__/react-i18next.js +50 -0
- 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/1558.js.LICENSE.txt +14 -0
- 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/2333.js +1 -0
- package/dist/2333.js.map +1 -0
- package/dist/2801.js +1 -0
- package/dist/2801.js.map +1 -0
- package/dist/282.js +2 -0
- package/dist/282.js.LICENSE.txt +32 -0
- package/dist/282.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.LICENSE.txt +14 -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/6260.js +1 -0
- package/dist/6260.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.LICENSE.txt +9 -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/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/8114.js +1 -0
- package/dist/8114.js.map +1 -0
- package/dist/8321.js +1 -0
- package/dist/8321.js.map +1 -0
- package/dist/8339.js +1 -0
- package/dist/8339.js.map +1 -0
- package/dist/8558.js +1 -0
- package/dist/8558.js.map +1 -0
- package/dist/8778.js +1 -0
- package/dist/8778.js.map +1 -0
- package/dist/8803.js +2 -0
- package/dist/8803.js.LICENSE.txt +54 -0
- package/dist/8803.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/961.js +2 -0
- package/dist/961.js.LICENSE.txt +19 -0
- package/dist/961.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 +1594 -0
- package/dist/esm-dha-workflow-app.js.map +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -0
- package/dist/routes.json +1 -0
- package/e2e/README.md +115 -0
- package/e2e/core/global-setup.ts +32 -0
- package/e2e/core/index.ts +1 -0
- package/e2e/core/test.ts +20 -0
- package/e2e/fixtures/api.ts +26 -0
- package/e2e/fixtures/index.ts +1 -0
- package/e2e/pages/index.ts +1 -0
- package/e2e/pages/root-page.ts +32 -0
- package/e2e/specs/template-app.spec.ts +23 -0
- package/e2e/support/github/Dockerfile +34 -0
- package/e2e/support/github/docker-compose.yml +24 -0
- package/e2e/support/github/run-e2e-docker-env.sh +37 -0
- package/example.env +6 -0
- package/jest.config.js +33 -0
- package/package.json +117 -0
- package/playwright.config.ts +32 -0
- package/prettier.config.js +8 -0
- 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 +107 -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 +508 -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 +1441 -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 +103 -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 +357 -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/claims/claims.component.tsx +142 -0
- package/src/claims/claims.resource.ts +168 -0
- package/src/claims/index.ts +206 -0
- package/src/claims/interventions.resource.ts +49 -0
- package/src/claims/utils.ts +59 -0
- package/src/config-schema.ts +215 -0
- package/src/createDashboardLink.tsx +9 -0
- package/src/dashboard/charts/chart.component.scss +13 -0
- package/src/dashboard/charts/chart.component.tsx +56 -0
- package/src/dashboard/dashboard.component.scss +7 -0
- package/src/dashboard/dashboard.component.tsx +51 -0
- package/src/dashboard/overview/overview.component.scss +150 -0
- package/src/dashboard/overview/overview.component.tsx +134 -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/maternity-dashboard.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/declarations.d.ts +5 -0
- package/src/hooks/useActions.ts +165 -0
- package/src/index.ts +161 -0
- package/src/laboratory/laboratory.component.tsx +13 -0
- package/src/left-panel/left-panel.component.tsx +20 -0
- package/src/left-panel/left-panel.scss +42 -0
- package/src/mnch/maternity/maternity-queues.component.scss +7 -0
- package/src/mnch/maternity/maternity-queues.component.tsx +28 -0
- package/src/mnch/maternity/queues/triage/maternity-triage.tsx +15 -0
- package/src/mnch/mch/mch-queues.component.scss +7 -0
- package/src/mnch/mch/mch-queues.component.tsx +32 -0
- package/src/mnch/mch/queues/consultation/mch-consultation.tsx +18 -0
- package/src/mnch/mch/queues/triage/mch-triage.tsx +15 -0
- package/src/mnch/mnch-root.tsx +17 -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/client-details/client-details.tsx +40 -0
- package/src/registry/eligibility/eligibility-details/eligibility-details.scss +38 -0
- package/src/registry/eligibility/eligibility-details/eligibility-details.tsx +101 -0
- package/src/registry/eligibility/eliigibility-tags/eligibility-tags.scss +6 -0
- package/src/registry/eligibility/eliigibility-tags/eligibility-tags.tsx +120 -0
- package/src/registry/eligibility/modal/eligibility-details.modal.scss +0 -0
- package/src/registry/eligibility/modal/eligibility-details.modal.tsx +45 -0
- package/src/registry/modal/client-details-modal/client-details-modal.scss +28 -0
- package/src/registry/modal/client-details-modal/client-details-modal.tsx +119 -0
- package/src/registry/modal/otp-verification-modal/otp-verification-modal.scss +43 -0
- package/src/registry/modal/otp-verification-modal/otp-verification-modal.tsx +280 -0
- package/src/registry/modal/send-to-triage/send-to-triage.modal.scss +39 -0
- package/src/registry/modal/send-to-triage/send-to-triage.modal.tsx +921 -0
- package/src/registry/payment-details/payment-options/payment-options.scss +13 -0
- package/src/registry/payment-details/payment-options/payment-options.tsx +68 -0
- package/src/registry/registry.component.scss +89 -0
- package/src/registry/registry.component.tsx +490 -0
- package/src/registry/registry.resource.ts +62 -0
- package/src/registry/types/index.ts +401 -0
- package/src/registry/utils/error-handler.ts +37 -0
- package/src/registry/utils/format-dependant-display-data.ts +8 -0
- package/src/registry/utils/hie-adapter.ts +56 -0
- package/src/registry/utils/hie-client-adapter.ts +312 -0
- package/src/registry/utils/mask-data.ts +32 -0
- package/src/registry/utils/phone-number-formatter.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/patient-search.resource.ts +22 -0
- package/src/resources/queue.resource.ts +60 -0
- package/src/resources/superset.resource.ts +21 -0
- package/src/resources/visit.resource.ts +38 -0
- package/src/root.component.tsx +48 -0
- package/src/root.scss +11 -0
- package/src/root.test.tsx +51 -0
- package/src/routes.json +292 -0
- 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 +143 -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 +154 -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 +110 -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 +56 -0
- package/src/service-queues/queue-list/queue-list.component.tsx +311 -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 +387 -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 +35 -0
- package/src/shared/constants/index.ts +1 -0
- package/src/shared/constants/patient-category.ts +6 -0
- package/src/shared/constants/patient-type.ts +10 -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 +20 -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 +153 -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/side-menu.scss +38 -0
- package/src/side-nav-menu/mnch-nav-link-config.ts +16 -0
- package/src/side-nav-menu/mnch-nav-links.tsx +42 -0
- package/src/side-nav-menu/nav-link-config.ts +78 -0
- package/src/side-nav-menu/nav-links.tsx +42 -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/src/widgets/workflow-registry-link.extension.tsx +12 -0
- package/tools/i18next-parser.config.js +89 -0
- package/tools/setup-tests.ts +1 -0
- package/tools/update-openmrs-deps.mjs +43 -0
- package/translations/am.json +24 -0
- package/translations/en.json +24 -0
- package/translations/es.json +24 -0
- package/translations/fr.json +24 -0
- package/translations/he.json +24 -0
- package/translations/km.json +24 -0
- package/tsconfig.json +24 -0
- package/webpack.config.js +1 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { AdmitPatientDto, AssignBedToPatientDto, BedLayout, Disposition } from "../../types";
|
|
3
|
+
import { Modal, ModalBody, Select, SelectItem } from "@carbon/react";
|
|
4
|
+
import { Encounter, Patient, showSnackbar, useSession } from "@openmrs/esm-framework";
|
|
5
|
+
import styles from './admit-patient.modal.scss';
|
|
6
|
+
import { AdmissionEncounterTypeUuids } from "../../constants";
|
|
7
|
+
import { admitPatientToWard, assignBedToPatient } from "../../admissions.resource";
|
|
8
|
+
interface AdmitPatientModalProps {
|
|
9
|
+
open: boolean;
|
|
10
|
+
disposition: Disposition;
|
|
11
|
+
onModalClose: () => void;
|
|
12
|
+
bedLayouts: BedLayout[];
|
|
13
|
+
onSuccessfullAdmission: () => void;
|
|
14
|
+
}
|
|
15
|
+
const AdmitPatientModal: React.FC<AdmitPatientModalProps> = ({ onModalClose, open, disposition, bedLayouts, onSuccessfullAdmission }) => {
|
|
16
|
+
const [selectedBedId, setSelectedBedId] = useState<number>();
|
|
17
|
+
const session = useSession();
|
|
18
|
+
const location = session.sessionLocation;
|
|
19
|
+
|
|
20
|
+
const admitPatient = async () => {
|
|
21
|
+
try{
|
|
22
|
+
const admitPatientDto = generateAdmitPatientPayload();
|
|
23
|
+
const resp = await admitPatientToWard(admitPatientDto);
|
|
24
|
+
|
|
25
|
+
showSnackbar({
|
|
26
|
+
kind: 'success',
|
|
27
|
+
title: 'Admission Successfull',
|
|
28
|
+
subtitle: 'Patient Successfully Admitted',
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
//assign bed to patient
|
|
32
|
+
const assignBedDto = generateAssignBedPayload(resp);
|
|
33
|
+
await assignBedToPatient(selectedBedId,assignBedDto);
|
|
34
|
+
|
|
35
|
+
showSnackbar({
|
|
36
|
+
kind: 'success',
|
|
37
|
+
title: 'Bed Assignment Successfull',
|
|
38
|
+
subtitle: `Patient Successfully assigned bed ${selectedBedId}`,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
onSuccessfullAdmission();
|
|
42
|
+
|
|
43
|
+
}catch(error){
|
|
44
|
+
console.log({error});
|
|
45
|
+
showSnackbar({
|
|
46
|
+
kind: 'error',
|
|
47
|
+
title: 'Bed Assignment failed',
|
|
48
|
+
subtitle: error.message ?? 'Bed Assignment failed'
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
};
|
|
54
|
+
const bedSelectedHandler = (bedId: number) => {
|
|
55
|
+
setSelectedBedId(bedId);
|
|
56
|
+
};
|
|
57
|
+
const generateAdmitPatientPayload = (): AdmitPatientDto=>{
|
|
58
|
+
return {
|
|
59
|
+
patient: disposition.patient.uuid,
|
|
60
|
+
encounterType: {
|
|
61
|
+
uuid: AdmissionEncounterTypeUuids.ADMIT_ENCOUNTER_TYPE_UUID
|
|
62
|
+
},
|
|
63
|
+
location: location.uuid,
|
|
64
|
+
obs: [],
|
|
65
|
+
visit: disposition.visit.uuid
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const generateAssignBedPayload = (admissionEncounter: Encounter): AssignBedToPatientDto=>{
|
|
69
|
+
return {
|
|
70
|
+
patientUuid: disposition.patient.uuid,
|
|
71
|
+
encounterUuid: admissionEncounter.uuid
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return <>
|
|
75
|
+
<Modal
|
|
76
|
+
modalHeading="Admit Patient"
|
|
77
|
+
open={open}
|
|
78
|
+
size="md"
|
|
79
|
+
onSecondarySubmit={() => onModalClose()}
|
|
80
|
+
onRequestClose={() => onModalClose()}
|
|
81
|
+
onRequestSubmit={admitPatient}
|
|
82
|
+
primaryButtonText="Admit"
|
|
83
|
+
secondaryButtonText="Cancel"
|
|
84
|
+
>
|
|
85
|
+
<ModalBody>
|
|
86
|
+
<div className={styles.serveModalLayout}>
|
|
87
|
+
<div className={styles.serveModalContentSection}>
|
|
88
|
+
<div className={styles.formRow}>
|
|
89
|
+
<Select
|
|
90
|
+
id="ward-beds"
|
|
91
|
+
labelText="Beds"
|
|
92
|
+
onChange={($event) => bedSelectedHandler(parseInt($event.target.value))}
|
|
93
|
+
>
|
|
94
|
+
<SelectItem value="" text="Select" />;
|
|
95
|
+
{bedLayouts &&
|
|
96
|
+
bedLayouts.filter((bl)=>{
|
|
97
|
+
return bl.status === 'AVAILABLE'
|
|
98
|
+
}).map((bl) => {
|
|
99
|
+
return <SelectItem value={bl.bedId} text={`${bl.bedNumber} (${bl.status})`} />;
|
|
100
|
+
})}
|
|
101
|
+
</Select>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</ModalBody>
|
|
106
|
+
</Modal>
|
|
107
|
+
</>
|
|
108
|
+
}
|
|
109
|
+
export default AdmitPatientModal;
|
|
File without changes
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Modal, ModalBody, Select, SelectItem } from "@carbon/react";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { AssignBedToPatientDto, BedLayout, BedSwapDto, Disposition } from "../../types";
|
|
4
|
+
import styles from './bed-swap.modal.scss';
|
|
5
|
+
import { AdmissionEncounterTypeUuids } from "../../constants";
|
|
6
|
+
import { Encounter,Person, showSnackbar, useSession } from "@openmrs/esm-framework";
|
|
7
|
+
import { assignBedToPatient, bedSwapRequest } from "../../admissions.resource";
|
|
8
|
+
interface BedSwapModalProps {
|
|
9
|
+
open: boolean;
|
|
10
|
+
disposition: Disposition;
|
|
11
|
+
person: Person;
|
|
12
|
+
onModalClose: () => void;
|
|
13
|
+
bedLayouts: BedLayout[];
|
|
14
|
+
onSuccessfullBedSwap: () => void;
|
|
15
|
+
}
|
|
16
|
+
const BedSwapModal: React.FC<BedSwapModalProps> = ({open,onModalClose,onSuccessfullBedSwap,bedLayouts,disposition,person})=>{
|
|
17
|
+
const [selectedBedId, setSelectedBedId] = useState<number>();
|
|
18
|
+
const session = useSession();
|
|
19
|
+
const location = session.sessionLocation;
|
|
20
|
+
|
|
21
|
+
const swapBed = async ()=>{
|
|
22
|
+
|
|
23
|
+
try{
|
|
24
|
+
const bedSwapPayload = generateBedSwapRequestDto();
|
|
25
|
+
const resp = await bedSwapRequest(bedSwapPayload);
|
|
26
|
+
|
|
27
|
+
//assign bed to patient
|
|
28
|
+
const assignBedDto = generateAssignBedPayload(resp);
|
|
29
|
+
await assignBedToPatient(selectedBedId,assignBedDto);
|
|
30
|
+
showSnackbar({
|
|
31
|
+
kind: 'success',
|
|
32
|
+
title: 'Bed swap Successfull',
|
|
33
|
+
subtitle: `Patient Successfully assigned bed ${selectedBedId}`,
|
|
34
|
+
});
|
|
35
|
+
onSuccessfullBedSwap();
|
|
36
|
+
}catch(error){
|
|
37
|
+
console.log({error});
|
|
38
|
+
showSnackbar({
|
|
39
|
+
kind: 'error',
|
|
40
|
+
title: 'Bed Assignment failed',
|
|
41
|
+
subtitle: error.message ?? 'Bed Assignment failed'
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
const generateAssignBedPayload = (assignEncounter: Encounter): AssignBedToPatientDto=>{
|
|
48
|
+
return {
|
|
49
|
+
patientUuid: person.uuid,
|
|
50
|
+
encounterUuid: assignEncounter.uuid
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const handleBedChange = (bedId: number)=>{
|
|
54
|
+
setSelectedBedId(bedId);
|
|
55
|
+
}
|
|
56
|
+
const generateBedSwapRequestDto = (): BedSwapDto => {
|
|
57
|
+
return {
|
|
58
|
+
"patient": person.uuid,
|
|
59
|
+
"encounterType": {
|
|
60
|
+
"uuid": AdmissionEncounterTypeUuids.BED_ASSIGNMENT_ENCOUNTER_TYPE_UUID,
|
|
61
|
+
},
|
|
62
|
+
"location": location.uuid,
|
|
63
|
+
"obs": [],
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return <>
|
|
68
|
+
<Modal
|
|
69
|
+
modalHeading="Swap Beds"
|
|
70
|
+
open={open}
|
|
71
|
+
size="md"
|
|
72
|
+
onSecondarySubmit={() => onModalClose()}
|
|
73
|
+
onRequestClose={() => onModalClose()}
|
|
74
|
+
onRequestSubmit={swapBed}
|
|
75
|
+
primaryButtonText="Swap Beds"
|
|
76
|
+
secondaryButtonText="Cancel"
|
|
77
|
+
>
|
|
78
|
+
<ModalBody>
|
|
79
|
+
<div className={styles.serveModalLayout}>
|
|
80
|
+
<div className={styles.serveModalContentSection}>
|
|
81
|
+
<div className={styles.formRow}>
|
|
82
|
+
<Select
|
|
83
|
+
id="ward-beds"
|
|
84
|
+
labelText="Beds"
|
|
85
|
+
onChange={($event) => handleBedChange(parseInt($event.target.value))}
|
|
86
|
+
>
|
|
87
|
+
<SelectItem value="" text="Select" />;
|
|
88
|
+
{bedLayouts &&
|
|
89
|
+
bedLayouts.filter((bl)=>{
|
|
90
|
+
return bl.status === 'AVAILABLE'
|
|
91
|
+
}).map((bl) => {
|
|
92
|
+
return <SelectItem value={bl.bedId} text={`${bl.bedNumber} (${bl.status})`} />;
|
|
93
|
+
})}
|
|
94
|
+
</Select>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</ModalBody>
|
|
99
|
+
</Modal>
|
|
100
|
+
</>
|
|
101
|
+
}
|
|
102
|
+
export default BedSwapModal;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import styles from './cancel-admission-request.scss';
|
|
3
|
+
import { Modal, ModalBody, TextArea } from '@carbon/react';
|
|
4
|
+
import { type CancelAdmissionDto, type Disposition } from '../../types';
|
|
5
|
+
import { showSnackbar, useSession } from '@openmrs/esm-framework';
|
|
6
|
+
import { AdmissionConcepts, AdmissionEncounterTypeUuids } from '../../constants';
|
|
7
|
+
import { cancelAdmissionRequest } from '../../admissions.resource';
|
|
8
|
+
|
|
9
|
+
interface CancelAdmissionRequestModalProps {
|
|
10
|
+
open: boolean;
|
|
11
|
+
admissionRequest: Disposition;
|
|
12
|
+
onModalClose: () => void;
|
|
13
|
+
onCancelAdmission: () => void;
|
|
14
|
+
}
|
|
15
|
+
const CancelAdmissionRequestModal: React.FC<CancelAdmissionRequestModalProps> = ({
|
|
16
|
+
open,
|
|
17
|
+
admissionRequest,
|
|
18
|
+
onCancelAdmission,
|
|
19
|
+
onModalClose,
|
|
20
|
+
}) => {
|
|
21
|
+
const reasonRef = useRef<string>();
|
|
22
|
+
const session = useSession();
|
|
23
|
+
const location = session.sessionLocation;
|
|
24
|
+
const handleReasonText = (reason: string) => {
|
|
25
|
+
reasonRef.current = reason;
|
|
26
|
+
};
|
|
27
|
+
const handleCancelRequest = async () => {
|
|
28
|
+
try {
|
|
29
|
+
const cancelAdmissionDto = generateCancelAdmissionRequestDto();
|
|
30
|
+
const resp = await cancelAdmissionRequest(cancelAdmissionDto);
|
|
31
|
+
if (resp) {
|
|
32
|
+
showSnackbar({
|
|
33
|
+
kind: 'success',
|
|
34
|
+
title: 'Cancel request successfull',
|
|
35
|
+
subtitle: 'Admission request succesfully cancelled',
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
onCancelAdmission();
|
|
39
|
+
} catch (error) {
|
|
40
|
+
showSnackbar({
|
|
41
|
+
kind: 'error',
|
|
42
|
+
title: 'Bed Assignment failed',
|
|
43
|
+
subtitle: error.message ?? 'Bed Assignment failed',
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const generateCancelAdmissionRequestDto = (): CancelAdmissionDto => {
|
|
48
|
+
return {
|
|
49
|
+
patient: admissionRequest.patient.uuid,
|
|
50
|
+
encounterType: {
|
|
51
|
+
uuid: AdmissionEncounterTypeUuids.CANCEL_ADT_ENCOUNTER_TYPE_UUID,
|
|
52
|
+
},
|
|
53
|
+
location: location.uuid,
|
|
54
|
+
obs: [
|
|
55
|
+
{
|
|
56
|
+
concept: AdmissionConcepts.CLINICAL_NOTES_UUID,
|
|
57
|
+
value: reasonRef.current,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
concept: AdmissionConcepts.ADMISSION_TO_HOSPITAL_DECISION_UUID,
|
|
61
|
+
value: {
|
|
62
|
+
uuid: AdmissionConcepts.ADMISSION_DENIED_UUID,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
visit: admissionRequest.visit.uuid,
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<>
|
|
72
|
+
<Modal
|
|
73
|
+
modalHeading="Cancel Admission Request"
|
|
74
|
+
open={open}
|
|
75
|
+
size="md"
|
|
76
|
+
onSecondarySubmit={onModalClose}
|
|
77
|
+
onRequestClose={onModalClose}
|
|
78
|
+
onRequestSubmit={handleCancelRequest}
|
|
79
|
+
primaryButtonText="Cancel Admission Request"
|
|
80
|
+
secondaryButtonText="Cancel"
|
|
81
|
+
>
|
|
82
|
+
<ModalBody>
|
|
83
|
+
<div className={styles.cancelAdmissionLayout}>
|
|
84
|
+
<div className={styles.contentSection}>
|
|
85
|
+
<div className={styles.formRow}>
|
|
86
|
+
<TextArea
|
|
87
|
+
enableCounter
|
|
88
|
+
helperText=""
|
|
89
|
+
id="cancel-reason"
|
|
90
|
+
labelText="Cancel Reason"
|
|
91
|
+
maxCount={500}
|
|
92
|
+
placeholder=""
|
|
93
|
+
rows={4}
|
|
94
|
+
onChange={(e) => handleReasonText(e.target.value)}
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</ModalBody>
|
|
100
|
+
</Modal>
|
|
101
|
+
</>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export default CancelAdmissionRequestModal;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DischargePatientDto, type Disposition, type UnAssignBedDto } from '../../types';
|
|
3
|
+
import { Modal, ModalBody } from '@carbon/react';
|
|
4
|
+
import styles from './discharge-patient.modal.scss';
|
|
5
|
+
import { AdmissionEncounterTypeUuids } from '../../constants';
|
|
6
|
+
import { type Person, showSnackbar, useSession } from '@openmrs/esm-framework';
|
|
7
|
+
import { dischargePatientFromWard, unassignBed } from '../../admissions.resource';
|
|
8
|
+
interface DischargeModalProps {
|
|
9
|
+
open: boolean;
|
|
10
|
+
admissionRequest: Disposition & { bedId: number; person: Person };
|
|
11
|
+
onModalClose: () => void;
|
|
12
|
+
onDischarge: () => void;
|
|
13
|
+
}
|
|
14
|
+
const DischargeModal: React.FC<DischargeModalProps> = ({ open, admissionRequest, onModalClose, onDischarge }) => {
|
|
15
|
+
const session = useSession();
|
|
16
|
+
const location = session.sessionLocation;
|
|
17
|
+
const handleDischarge = async () => {
|
|
18
|
+
try {
|
|
19
|
+
const dischargeDto = generateDischargePatientRequestDto();
|
|
20
|
+
await dischargePatientFromWard(dischargeDto);
|
|
21
|
+
showSnackbar({
|
|
22
|
+
kind: 'success',
|
|
23
|
+
title: 'Discharge request successfull',
|
|
24
|
+
subtitle: 'Patient Succesfully discharged from ward',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// unassign bed
|
|
28
|
+
const unAssignBedDto = generateUnassignBedDto();
|
|
29
|
+
await unassignBed(unAssignBedDto);
|
|
30
|
+
|
|
31
|
+
showSnackbar({
|
|
32
|
+
kind: 'success',
|
|
33
|
+
title: 'Bed Unassigned successfull',
|
|
34
|
+
subtitle: `Bed ${admissionRequest.bedId} successfully unassigned`,
|
|
35
|
+
});
|
|
36
|
+
onDischarge();
|
|
37
|
+
} catch (error) {
|
|
38
|
+
showSnackbar({
|
|
39
|
+
kind: 'error',
|
|
40
|
+
title: 'Patient Discharge failed',
|
|
41
|
+
subtitle: 'Patient Discharge failed',
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const generateDischargePatientRequestDto = (): DischargePatientDto => {
|
|
46
|
+
return {
|
|
47
|
+
patient: admissionRequest.person.uuid,
|
|
48
|
+
encounterType: {
|
|
49
|
+
uuid: AdmissionEncounterTypeUuids.DISCHARGE_ENCOUNTER_TYPE_UUID,
|
|
50
|
+
},
|
|
51
|
+
location: location.uuid,
|
|
52
|
+
obs: [],
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
const generateUnassignBedDto = (): UnAssignBedDto => {
|
|
56
|
+
return {
|
|
57
|
+
patientUuid: admissionRequest.person.uuid,
|
|
58
|
+
bedId: admissionRequest.bedId,
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
return (
|
|
62
|
+
<>
|
|
63
|
+
<Modal
|
|
64
|
+
modalHeading="Discharge"
|
|
65
|
+
open={open}
|
|
66
|
+
size="md"
|
|
67
|
+
onSecondarySubmit={onModalClose}
|
|
68
|
+
onRequestClose={onModalClose}
|
|
69
|
+
onRequestSubmit={handleDischarge}
|
|
70
|
+
primaryButtonText="Discharge"
|
|
71
|
+
secondaryButtonText="Cancel"
|
|
72
|
+
>
|
|
73
|
+
<ModalBody>
|
|
74
|
+
<div className={styles.dischargeLayout}>
|
|
75
|
+
<div className={styles.contentSection}>
|
|
76
|
+
<h5>Are you sure you want to discharge Patient from Ward?</h5>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</ModalBody>
|
|
80
|
+
</Modal>
|
|
81
|
+
</>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
export default DischargeModal;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { Concept, Encounter, Obs, Patient, Visit, type Location } from "@openmrs/esm-framework";
|
|
2
|
+
|
|
3
|
+
export type DispositionType = 'ADMIT' | 'TRANSFER';
|
|
4
|
+
export type DispositionResponse = {
|
|
5
|
+
results: Disposition[];
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type Disposition = {
|
|
9
|
+
dispositionLocation: Location;
|
|
10
|
+
dispositionType: DispositionType;
|
|
11
|
+
disposition: Concept;
|
|
12
|
+
dispositionEncounter: Encounter;
|
|
13
|
+
patient: Patient;
|
|
14
|
+
dispositionObsGroup: Obs;
|
|
15
|
+
visit: Visit;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface BedTag {
|
|
19
|
+
id: number;
|
|
20
|
+
name: string;
|
|
21
|
+
uuid: string;
|
|
22
|
+
resourceVersion: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface BedTagMap {
|
|
26
|
+
uuid: string;
|
|
27
|
+
bedTag: BedTag;
|
|
28
|
+
resourceVersion: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface BedType {
|
|
32
|
+
uuid: string;
|
|
33
|
+
name: string;
|
|
34
|
+
displayName: string;
|
|
35
|
+
description: string;
|
|
36
|
+
resourceVersion: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type BedStatus = 'OCCUPIED' | 'AVAILABLE';
|
|
40
|
+
|
|
41
|
+
export interface BedLayout {
|
|
42
|
+
rowNumber: number;
|
|
43
|
+
columnNumber: number;
|
|
44
|
+
bedNumber: string;
|
|
45
|
+
bedId: number;
|
|
46
|
+
bedUuid: string;
|
|
47
|
+
status: BedStatus;
|
|
48
|
+
location: string;
|
|
49
|
+
bedType: BedType | null;
|
|
50
|
+
patients: Patient[];
|
|
51
|
+
bedTagMaps: BedTagMap[];
|
|
52
|
+
resourceVersion: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface AdmissionLocationData {
|
|
56
|
+
ward: Location;
|
|
57
|
+
totalBeds: number;
|
|
58
|
+
occupiedBeds: number;
|
|
59
|
+
bedLayouts: BedLayout[];
|
|
60
|
+
resourceVersion: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface EncounterDto {
|
|
64
|
+
patient: string;
|
|
65
|
+
encounterType: {
|
|
66
|
+
uuid: string;
|
|
67
|
+
},
|
|
68
|
+
location: string;
|
|
69
|
+
obs: any[];
|
|
70
|
+
visit?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface AdmitPatientDto extends EncounterDto{
|
|
74
|
+
}
|
|
75
|
+
export type AssignBedToPatientDto = {
|
|
76
|
+
patientUuid:string;
|
|
77
|
+
encounterUuid: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface CancelAdmissionDto extends EncounterDto{
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface BedSwapDto extends EncounterDto {
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface DischargePatientDto extends EncounterDto {
|
|
87
|
+
}
|
|
88
|
+
export interface TransferPatientDto extends EncounterDto {
|
|
89
|
+
}
|
|
90
|
+
export type UnAssignBedDto = {
|
|
91
|
+
patientUuid: string;
|
|
92
|
+
bedId: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface FhirEncounterBundle {
|
|
96
|
+
resourceType: 'Bundle';
|
|
97
|
+
id: string;
|
|
98
|
+
meta: FhirBundleMeta;
|
|
99
|
+
type: 'searchset';
|
|
100
|
+
total: number;
|
|
101
|
+
link: FhirBundleLink[];
|
|
102
|
+
entry: FhirBundleEntry<FhirEncounter>[];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface FhirBundleMeta {
|
|
106
|
+
lastUpdated: string;
|
|
107
|
+
tag: FhirMetaTag[];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface FhirMetaTag {
|
|
111
|
+
system: string;
|
|
112
|
+
code: string;
|
|
113
|
+
display: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface FhirBundleLink {
|
|
117
|
+
relation: string;
|
|
118
|
+
url: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface FhirBundleEntry<TResource> {
|
|
122
|
+
fullUrl: string;
|
|
123
|
+
resource: TResource;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
export interface FhirEncounter {
|
|
128
|
+
resourceType: 'Encounter';
|
|
129
|
+
id: string;
|
|
130
|
+
meta: FhirEncounterMeta;
|
|
131
|
+
status: string;
|
|
132
|
+
class: FhirEncounterClass;
|
|
133
|
+
type: FhirEncounterType[];
|
|
134
|
+
subject: FhirReferenceWithDisplay<'Patient'>;
|
|
135
|
+
participant: FhirEncounterParticipant[];
|
|
136
|
+
period: FhirPeriod;
|
|
137
|
+
location: FhirEncounterLocationComponent[];
|
|
138
|
+
partOf: FhirReference<'Encounter'>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface FhirEncounterMeta {
|
|
142
|
+
versionId: string;
|
|
143
|
+
lastUpdated: string;
|
|
144
|
+
tag: FhirMetaTag[];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface FhirEncounterClass {
|
|
148
|
+
system: string;
|
|
149
|
+
code: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface FhirEncounterType {
|
|
153
|
+
coding: FhirCoding[];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface FhirCoding {
|
|
157
|
+
system?: string;
|
|
158
|
+
code?: string;
|
|
159
|
+
display?: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
export interface FhirEncounterParticipant {
|
|
164
|
+
individual: FhirParticipantIndividual;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface FhirParticipantIndividual {
|
|
168
|
+
reference: string;
|
|
169
|
+
type: 'Practitioner';
|
|
170
|
+
identifier?: {
|
|
171
|
+
value: string;
|
|
172
|
+
};
|
|
173
|
+
display: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface FhirPeriod {
|
|
177
|
+
start: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface FhirEncounterLocationComponent {
|
|
181
|
+
location: FhirReferenceWithDisplay<'Location'>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
export interface FhirReference<TType extends string> {
|
|
186
|
+
reference: string; // e.g. "Encounter/..."
|
|
187
|
+
type: TType;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface FhirReferenceWithDisplay<TType extends string> extends FhirReference<TType> {
|
|
191
|
+
display: string;
|
|
192
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { ExtensionSlot, WorkspaceContainer } from '@openmrs/esm-framework';
|
|
3
|
+
|
|
4
|
+
const AppointmentsComponent: React.FC = () => {
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<div>
|
|
8
|
+
<ExtensionSlot name="clinical-appointments-dashboard-slot" />
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default AppointmentsComponent;
|