@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,78 @@
|
|
|
1
|
+
export const navLinksConfig = [
|
|
2
|
+
{
|
|
3
|
+
to: 'dashboard',
|
|
4
|
+
title: 'Dashboard',
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
to: 'registry',
|
|
8
|
+
title: 'Registry',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
to: 'appointments',
|
|
12
|
+
title: 'Appointments',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
to: 'triage',
|
|
16
|
+
title: 'Triage',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
to: 'consultation',
|
|
20
|
+
title: 'Consultation',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
to: 'mch',
|
|
24
|
+
title: 'MCH',
|
|
25
|
+
children: [
|
|
26
|
+
{
|
|
27
|
+
to: 'triage',
|
|
28
|
+
title: 'Triage',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
to: 'consultation',
|
|
32
|
+
title: 'Consultation',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
to: 'admissions',
|
|
38
|
+
title: 'Admissions',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
to: 'procedures',
|
|
42
|
+
title: 'Procedures',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
to: 'radiology-imaging',
|
|
46
|
+
title: 'Radiology and Imaging',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
to: 'laboratory',
|
|
50
|
+
title: 'Laboratory',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
to: 'pharmacy',
|
|
54
|
+
title: 'Pharmacy',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
to: 'mortuary',
|
|
58
|
+
title: 'Mortuary',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
to: 'accounting',
|
|
62
|
+
title: 'Accounting',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
to: 'reports',
|
|
66
|
+
title: 'Reports',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
to: 'bookings',
|
|
70
|
+
title: 'Bookings',
|
|
71
|
+
children: [
|
|
72
|
+
{
|
|
73
|
+
to: 'daily',
|
|
74
|
+
title: 'Daily',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { navLinksConfig } from './nav-link-config';
|
|
5
|
+
import { SideNavMenu } from '@carbon/react';
|
|
6
|
+
|
|
7
|
+
interface NavLinksProps {}
|
|
8
|
+
const NavLinks: React.FC<NavLinksProps> = () => {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
{navLinksConfig.map((n) => {
|
|
12
|
+
if (n.children && n.children.length > 0) {
|
|
13
|
+
return (
|
|
14
|
+
<SideNavMenu title={n.title}>
|
|
15
|
+
{n.children.map((c) => {
|
|
16
|
+
return (
|
|
17
|
+
<ConfigurableLink
|
|
18
|
+
to={`${window.getOpenmrsSpaBase()}home/${n.to}/${c.to}`}
|
|
19
|
+
className={classNames('cds--side-nav__link', '')}
|
|
20
|
+
>
|
|
21
|
+
{c.title}
|
|
22
|
+
</ConfigurableLink>
|
|
23
|
+
);
|
|
24
|
+
})}
|
|
25
|
+
</SideNavMenu>
|
|
26
|
+
);
|
|
27
|
+
} else {
|
|
28
|
+
return (
|
|
29
|
+
<ConfigurableLink
|
|
30
|
+
to={`${window.getOpenmrsSpaBase()}home/${n.to}`}
|
|
31
|
+
className={classNames('cds--side-nav__link', '')}
|
|
32
|
+
>
|
|
33
|
+
{n.title}
|
|
34
|
+
</ConfigurableLink>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
})}
|
|
38
|
+
</>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default NavLinks;
|
|
@@ -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;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 TriageWaitingPatientsExtension() {
|
|
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 waitingPatientsCount = triageQueueEntries?.filter((p) => p.status === 'WAITING').length ?? 0;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<MetricsCard>
|
|
33
|
+
<MetricsCardHeader title={t('patientsInWaiting', 'Patients in waiting')} />
|
|
34
|
+
<MetricsCardBody>
|
|
35
|
+
<MetricsCardItem label={t('patients', 'Patients')} value={waitingPatientsCount ? waitingPatientsCount : '--'} />
|
|
36
|
+
</MetricsCardBody>
|
|
37
|
+
</MetricsCard>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
border: 1px solid #9e9e9e;
|
|
3
|
+
padding: 1rem;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 0.5rem;
|
|
7
|
+
width: fit-content;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.room {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
margin: 1rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.roomName {
|
|
18
|
+
margin-bottom: 0.5rem;
|
|
19
|
+
font-size: large;
|
|
20
|
+
font-weight: bold;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.field {
|
|
24
|
+
margin: 0.25rem 0 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.button {
|
|
28
|
+
margin-top: 0.5rem;
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ServiceQueueComponent from '../service-queues/service-queue/service-queue.component';
|
|
3
|
+
import { QUEUE_SERVICE_UUIDS } from '../shared/constants/concepts';
|
|
4
|
+
|
|
5
|
+
interface TriageProps {}
|
|
6
|
+
const Triage: React.FC<TriageProps> = () => {
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<div>
|
|
10
|
+
<ServiceQueueComponent serviceTypeUuid={QUEUE_SERVICE_UUIDS.TRIAGE_SERVICE_UUID} title="Triage" />
|
|
11
|
+
</div>
|
|
12
|
+
</>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
export default Triage;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import useSWR from 'swr';
|
|
2
|
+
import { openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
|
|
3
|
+
|
|
4
|
+
import { type Patient } from './types';
|
|
5
|
+
export default function useTriagePatients(locationUuid: string) {
|
|
6
|
+
const { data, error, isLoading } = useSWR(
|
|
7
|
+
`${restBaseUrl}/queue-entry?v=custom:(uuid,display,queue:(display,uuid,location:(display,uuid)),status:(display),patient:(uuid,person:(gender,age)))&totalCount=true&isEnded=false&location=${locationUuid}`,
|
|
8
|
+
(url: string) =>
|
|
9
|
+
openmrsFetch<{
|
|
10
|
+
results: Array<Patient>;
|
|
11
|
+
}>(url).then((res) => res.data.results),
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
return {
|
|
15
|
+
patients: data,
|
|
16
|
+
isLoading,
|
|
17
|
+
isError: error,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Patient {
|
|
2
|
+
uuid: string;
|
|
3
|
+
middle_name: string;
|
|
4
|
+
given_name: string;
|
|
5
|
+
family_name: string;
|
|
6
|
+
queue_room: string;
|
|
7
|
+
status: string | number;
|
|
8
|
+
patient_name: string;
|
|
9
|
+
patient_uuid: string;
|
|
10
|
+
priority: string | number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface Room {
|
|
14
|
+
name: string;
|
|
15
|
+
patients: Patient[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Visit,
|
|
3
|
+
type Location,
|
|
4
|
+
type Concept,
|
|
5
|
+
type Patient,
|
|
6
|
+
type OpenmrsResource,
|
|
7
|
+
type Obs,
|
|
8
|
+
type FetchResponse,
|
|
9
|
+
} from '@openmrs/esm-framework';
|
|
10
|
+
|
|
11
|
+
export interface QueueEntry {
|
|
12
|
+
uuid: string;
|
|
13
|
+
display: string;
|
|
14
|
+
endedAt: string;
|
|
15
|
+
locationWaitingFor: Location;
|
|
16
|
+
patient: Patient;
|
|
17
|
+
priority: Concept;
|
|
18
|
+
priorityComment: string | null;
|
|
19
|
+
providerWaitingFor: Provider;
|
|
20
|
+
queue: Queue;
|
|
21
|
+
startedAt: string;
|
|
22
|
+
status: Concept;
|
|
23
|
+
visit: Visit;
|
|
24
|
+
sortWeight: number;
|
|
25
|
+
queueComingFrom: Queue;
|
|
26
|
+
previousQueueEntry: QueueEntry;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Provider {
|
|
30
|
+
uuid: string;
|
|
31
|
+
display: string;
|
|
32
|
+
comments: string;
|
|
33
|
+
response?: string;
|
|
34
|
+
person: OpenmrsResource;
|
|
35
|
+
location: string;
|
|
36
|
+
serviceType: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type QueueService = {
|
|
40
|
+
uuid: string;
|
|
41
|
+
display: string;
|
|
42
|
+
name: string;
|
|
43
|
+
description: string;
|
|
44
|
+
location: Location;
|
|
45
|
+
service: QueueService;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export interface Queue {
|
|
49
|
+
uuid: string;
|
|
50
|
+
display: string;
|
|
51
|
+
name: string;
|
|
52
|
+
description: string;
|
|
53
|
+
location: Location;
|
|
54
|
+
service: Concept;
|
|
55
|
+
allowedPriorities: Array<Concept>;
|
|
56
|
+
allowedStatuses: Array<Concept>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface Identifer {
|
|
60
|
+
identifier: string;
|
|
61
|
+
display: string;
|
|
62
|
+
uuid: string;
|
|
63
|
+
identifierType: {
|
|
64
|
+
uuid: string;
|
|
65
|
+
display: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface Encounter {
|
|
70
|
+
diagnoses?: Array<any>;
|
|
71
|
+
encounterDatetime?: string;
|
|
72
|
+
encounterProviders?: Array<{ provider?: { person?: { display?: string } } }>;
|
|
73
|
+
encounterType?: { display: string; uuid: string };
|
|
74
|
+
obs?: Array<Obs>;
|
|
75
|
+
uuid: string;
|
|
76
|
+
voided?: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface MappedEncounter extends Omit<Encounter, 'encounterType' | 'provider'> {
|
|
80
|
+
encounterType: string;
|
|
81
|
+
provider: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface MappedVisitQueueEntry {
|
|
85
|
+
id: string;
|
|
86
|
+
encounters: Array<MappedEncounter>;
|
|
87
|
+
name: string;
|
|
88
|
+
patientAge: string;
|
|
89
|
+
patientDob: string;
|
|
90
|
+
patientGender: string;
|
|
91
|
+
patientUuid: string;
|
|
92
|
+
queue: Queue;
|
|
93
|
+
priority: Concept;
|
|
94
|
+
priorityComment: string;
|
|
95
|
+
status: Concept;
|
|
96
|
+
startedAt: Date;
|
|
97
|
+
endedAt: Date;
|
|
98
|
+
visitType: string;
|
|
99
|
+
visitUuid: string;
|
|
100
|
+
visitTypeUuid: string;
|
|
101
|
+
queueUuid: string;
|
|
102
|
+
queueEntryUuid: string;
|
|
103
|
+
queueLocation: string;
|
|
104
|
+
sortWeight: number;
|
|
105
|
+
visitQueueNumber: string;
|
|
106
|
+
identifiers: Array<Identifer>;
|
|
107
|
+
queueComingFrom: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type QueueEntryResponse = FetchResponse<{
|
|
111
|
+
results: Array<QueueEntry>;
|
|
112
|
+
links: Array<{
|
|
113
|
+
rel: 'prev' | 'next';
|
|
114
|
+
uri: string;
|
|
115
|
+
}>;
|
|
116
|
+
totalCount: number;
|
|
117
|
+
}>;
|
|
118
|
+
|
|
119
|
+
export type TransitionQueueEntryDto = {
|
|
120
|
+
queueEntryToTransition: string;
|
|
121
|
+
newQueue?: string;
|
|
122
|
+
newStatus?: string;
|
|
123
|
+
newPriority?: string;
|
|
124
|
+
newPriorityComment?: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export type TagColor = 'green' | 'gray' | 'blue' | 'red';
|
|
128
|
+
|
|
129
|
+
export enum QueueEntryStatus {
|
|
130
|
+
Completed = 'COMPLETED',
|
|
131
|
+
Waiting = 'WAITING',
|
|
132
|
+
InService = 'IN SERVICE',
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export enum QueueEntryPriority {
|
|
136
|
+
Emergency = 'EMERGENCY',
|
|
137
|
+
Priority = 'PRIORITY',
|
|
138
|
+
NonUrgent = 'NON-URGENT',
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type CreateQueueDto = {
|
|
142
|
+
name: string;
|
|
143
|
+
description: string;
|
|
144
|
+
service: {
|
|
145
|
+
uuid: string;
|
|
146
|
+
};
|
|
147
|
+
location: {
|
|
148
|
+
uuid: string;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export type QueueRoom = {
|
|
153
|
+
uuid: string;
|
|
154
|
+
display: string;
|
|
155
|
+
name: string;
|
|
156
|
+
description: string;
|
|
157
|
+
queue: Queue;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export type CreateQueueRoomDto = {
|
|
161
|
+
name: string;
|
|
162
|
+
description: string;
|
|
163
|
+
queue: {
|
|
164
|
+
uuid: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export type TagType =
|
|
169
|
+
| 'red'
|
|
170
|
+
| 'magenta'
|
|
171
|
+
| 'purple'
|
|
172
|
+
| 'blue'
|
|
173
|
+
| 'cyan'
|
|
174
|
+
| 'teal'
|
|
175
|
+
| 'green'
|
|
176
|
+
| 'gray'
|
|
177
|
+
| 'cool-gray'
|
|
178
|
+
| 'warm-gray'
|
|
179
|
+
| 'high-contrast'
|
|
180
|
+
| 'outline';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
4
|
+
|
|
5
|
+
export const spaBasePath = `${window.spaBase}/workflow`;
|
|
6
|
+
|
|
7
|
+
const WorkflowRegistryLink = () => {
|
|
8
|
+
const { t } = useTranslation();
|
|
9
|
+
return <ConfigurableLink to={`${spaBasePath}/registry`}>Registry</ConfigurableLink>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default WorkflowRegistryLink;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
contextSeparator: '_',
|
|
3
|
+
// Key separator used in your translation keys
|
|
4
|
+
|
|
5
|
+
createOldCatalogs: false,
|
|
6
|
+
// Save the \_old files
|
|
7
|
+
|
|
8
|
+
defaultNamespace: 'translations',
|
|
9
|
+
// Default namespace used in your i18next config
|
|
10
|
+
|
|
11
|
+
defaultValue: '',
|
|
12
|
+
// Default value to give to empty keys
|
|
13
|
+
// You may also specify a function accepting the locale, namespace, and key as arguments
|
|
14
|
+
|
|
15
|
+
indentation: 2,
|
|
16
|
+
// Indentation of the catalog files
|
|
17
|
+
|
|
18
|
+
keepRemoved: false,
|
|
19
|
+
// Keep keys from the catalog that are no longer in code
|
|
20
|
+
|
|
21
|
+
keySeparator: '.',
|
|
22
|
+
// Key separator used in your translation keys
|
|
23
|
+
// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.
|
|
24
|
+
|
|
25
|
+
// see below for more details
|
|
26
|
+
lexers: {
|
|
27
|
+
hbs: ['HandlebarsLexer'],
|
|
28
|
+
handlebars: ['HandlebarsLexer'],
|
|
29
|
+
|
|
30
|
+
htm: ['HTMLLexer'],
|
|
31
|
+
html: ['HTMLLexer'],
|
|
32
|
+
|
|
33
|
+
mjs: ['JavascriptLexer'],
|
|
34
|
+
js: ['JavascriptLexer'], // if you're writing jsx inside .js files, change this to JsxLexer
|
|
35
|
+
ts: ['JavascriptLexer'],
|
|
36
|
+
jsx: ['JsxLexer'],
|
|
37
|
+
tsx: ['JsxLexer'],
|
|
38
|
+
|
|
39
|
+
default: ['JavascriptLexer'],
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
lineEnding: 'auto',
|
|
43
|
+
// Control the line ending. See options at https://github.com/ryanve/eol
|
|
44
|
+
|
|
45
|
+
locales: ['en'],
|
|
46
|
+
// An array of the locales in your applications
|
|
47
|
+
|
|
48
|
+
namespaceSeparator: ':',
|
|
49
|
+
// Namespace separator used in your translation keys
|
|
50
|
+
// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.
|
|
51
|
+
|
|
52
|
+
output: '$NAMESPACE/$LOCALE.json',
|
|
53
|
+
// Supports $LOCALE and $NAMESPACE injection
|
|
54
|
+
// Supports JSON (.json) and YAML (.yml) file formats
|
|
55
|
+
// Where to write the locale files relative to process.cwd()
|
|
56
|
+
|
|
57
|
+
pluralSeparator: '_',
|
|
58
|
+
// Plural separator used in your translation keys
|
|
59
|
+
// If you want to use plain english keys, separators such as `_` might conflict. You might want to set `pluralSeparator` to a different string that does not occur in your keys.
|
|
60
|
+
|
|
61
|
+
input: undefined,
|
|
62
|
+
// An array of globs that describe where to look for source files
|
|
63
|
+
// relative to the location of the configuration file
|
|
64
|
+
|
|
65
|
+
sort: true,
|
|
66
|
+
// Whether or not to sort the catalog
|
|
67
|
+
|
|
68
|
+
useKeysAsDefaultValue: false,
|
|
69
|
+
// Whether to use the keys as the default value; ex. "Hello": "Hello", "World": "World"
|
|
70
|
+
// This option takes precedence over the `defaultValue` and `skipDefaultValues` options
|
|
71
|
+
// You may also specify a function accepting the locale and namespace as arguments
|
|
72
|
+
|
|
73
|
+
verbose: false,
|
|
74
|
+
// Display info about the parsing including some stats
|
|
75
|
+
|
|
76
|
+
failOnWarnings: false,
|
|
77
|
+
// Exit with an exit code of 1 on warnings
|
|
78
|
+
|
|
79
|
+
customValueTemplate: null,
|
|
80
|
+
// If you wish to customize the value output the value as an object, you can set your own format.
|
|
81
|
+
// ${defaultValue} is the default value you set in your translation function.
|
|
82
|
+
// Any other custom property will be automatically extracted.
|
|
83
|
+
//
|
|
84
|
+
// Example:
|
|
85
|
+
// {
|
|
86
|
+
// message: "${defaultValue}",
|
|
87
|
+
// description: "${maxLength}", // t('my-key', {maxLength: 150})
|
|
88
|
+
// }
|
|
89
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
|
|
3
|
+
try {
|
|
4
|
+
// NB for other places use '@openmrs/*@next'; here we want to ignore patient-common-lib
|
|
5
|
+
execSync(`yarn up --fixed '@openmrs/*@next' 'openmrs@next'`, {
|
|
6
|
+
stdio: ['ignore', 'inherit', 'inherit'],
|
|
7
|
+
windowsHide: true,
|
|
8
|
+
});
|
|
9
|
+
} catch (error) {
|
|
10
|
+
console.error(`Error while updating dependencies: ${error.message ?? error}`);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
execSync(`yarn dedupe`, {
|
|
16
|
+
stdio: ['ignore', 'inherit', 'inherit'],
|
|
17
|
+
windowsHide: true,
|
|
18
|
+
});
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error(`Error while deduplicating dependencies: ${error.message ?? error}`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
execSync(`git diff-index --quiet HEAD --`, {
|
|
26
|
+
stdio: 'ignore',
|
|
27
|
+
windowsHide: true,
|
|
28
|
+
});
|
|
29
|
+
process.exit(0);
|
|
30
|
+
} catch (error) {
|
|
31
|
+
// git diff-index --quite HEAD --
|
|
32
|
+
// exits with status 1 if there are changes; we only need to run yarn verify if there are changes
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
execSync(`yarn verify`, {
|
|
37
|
+
stdio: ['ignore', 'inherit', 'inherit'],
|
|
38
|
+
windowsHide: true,
|
|
39
|
+
});
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error(`Error while running yarn verify: ${error.message ?? error}. Updates require manual intervention.`);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|