From 338f905c407af89f269c965b17b5102b57e23a7c Mon Sep 17 00:00:00 2001 From: Rugute Date: Tue, 23 Jul 2024 13:34:47 +0300 Subject: [PATCH 1/2] sorted forms orders --- .DS_Store | Bin 6148 -> 6148 bytes .editorconfig | 0 .env | 0 .eslintignore | 0 .eslintrc | 0 .github/pull_request_template.md | 0 .github/workflows/bundle-size.yml | 0 .github/workflows/ci.yml | 0 .github/workflows/tx-pull.yml | 0 .github/workflows/tx-push.yml | 0 .gitignore | 0 .husky/.gitignore | 0 .prettierignore | 0 .tx/config | 0 .vscode/settings.json | 0 .yarnrc.yml | 0 LICENSE.md | 0 README.md | 0 __mocks__/active-visits.mock.ts | 0 __mocks__/address.mock.ts | 0 __mocks__/appointments.mock.ts | 0 __mocks__/auto-generation-options.mock.ts | 0 __mocks__/identifier-types.mock.ts | 0 __mocks__/identifiers.mock.ts | 0 __mocks__/index.ts | 0 __mocks__/locations.mock.ts | 0 __mocks__/metrics.mock.ts | 0 __mocks__/patient-registration.mock.ts | 0 __mocks__/patient-visits.mock.ts | 0 __mocks__/patient.mock.ts | 0 __mocks__/search.mock.ts | 0 __mocks__/session.mock.ts | 0 __mocks__/visits.mock.ts | 0 e2e/commands/cohort-operations.ts | 0 e2e/commands/encounter-operations.ts | 0 e2e/commands/index.ts | 0 e2e/commands/patient-operations.ts | 0 e2e/commands/provider-operations.ts | 0 e2e/commands/visit-operations.ts | 0 e2e/core/global-setup.ts | 0 e2e/core/index.ts | 0 e2e/core/test.ts | 0 e2e/fixtures/api.ts | 0 e2e/fixtures/index.ts | 0 e2e/pages/appointments-page.ts | 0 e2e/pages/home-page.ts | 0 e2e/pages/index.ts | 0 e2e/pages/patient-lists-page.ts | 0 e2e/pages/registration-and-edit-page.ts | 0 e2e/specs/active-visits.spec.ts | 0 e2e/specs/appointments.spec.ts | 0 e2e/specs/edit-patient.spec.ts | 0 e2e/specs/patient-list.spec.ts | 0 e2e/specs/patient-search.spec.ts | 0 e2e/specs/register-new-patient.spec.ts | 0 e2e/specs/return-to-patient-list.spec.ts | 0 e2e/support/bamboo/docker-compose.yml | 0 e2e/support/bamboo/e2e-test-runner.sh | 0 e2e/support/bamboo/playwright.Dockerfile | 0 e2e/support/github/Dockerfile | 0 e2e/support/github/docker-compose.yml | 0 e2e/support/github/run-e2e-docker-env.sh | 0 example.env | 0 jest.config.js | 0 package.json | 6 +- packages/esm-billing-app/README.md | 1 + .../esm-billing-app/__mocks__/visit.mock.ts | 0 packages/esm-billing-app/jest.config.js | 0 packages/esm-billing-app/package.json | 10 +- .../bill-history/bill-history.component.tsx | 24 +- .../src/bill-history/bill-history.scss | 0 ...ble-services-admin-card-link.component.tsx | 0 .../bill-waiver/bill-selection.component.tsx | 0 .../bill-waiver-form.component.tsx | 4 +- .../bill-waiver/bill-waiver-form.scss | 0 .../bill-waiver/bill-waiver.component.tsx | 0 .../bill-waiver/bill-waiver.scss | 0 .../bill-waiver/patient-bills.component.tsx | 3 +- .../billable-services/bill-waiver/utils.ts | 38 - .../billable-service.resource.tsx | 8 +- .../billable-services-home.component.tsx | 11 +- .../billable-services.component.tsx | 0 .../billable-services/billable-services.scss | 0 .../{ => drug-order}/drug-order.component.tsx | 30 +- .../{ => drug-order}/drug-order.scss | 5 + .../billiable-item/lab-order.component.tsx | 34 - .../test-order/imaging-order.component.tsx | 33 + .../test-order/lab-order.component.tsx | 33 + .../test-order/price-info-order.componet.tsx | 62 + .../test-order/price-info-order.scss | 20 + .../test-order/procedure-order.component.tsx | 33 + .../test-order-action.component.tsx | 50 + .../test-order/test-order-action.resource.tsx | 54 + ...eBilliableItem.tsx => useBillableItem.tsx} | 11 +- .../add-billing-tariffs-service.scss | 164 ++ ...add-billings-tariffs-service.component.tsx | 183 +++ .../billing-tariffs-admin-card.tsx | 0 .../billing-tariffs-services.scss | 219 +++ .../billing-tariffs.component.tsx | 286 ++++ .../billing-tariffs.resource.tsx | 55 + .../add-billable-service.component.tsx | 451 +++--- .../create-edit/add-billable-service.scss | 40 +- .../dashboard/dashboard.component.tsx | 0 .../dashboard/dashboard.scss | 0 .../dashboard/service-metrics.component.tsx | 0 .../billing-dashboard.component.tsx | 5 +- .../billing-dashboard/billing-dashboard.scss | 0 .../billing-checkin-form.component.tsx | 46 +- .../billing-form/billing-checkin-form.scss | 0 .../billing-form/billing-form.component.tsx | 16 +- .../src/billing-form/billing-form.scss | 0 .../src/billing-form/helper.ts | 0 .../sha-number-validity.component.tsx | 0 .../visit-attributes-form.component.tsx | 140 +- .../visit-attributes-form.scss | 0 .../billing-header.component.tsx | 0 .../src/billing-header/billing-header.scss | 0 .../billing-illustration.component.tsx | 0 .../billing-prompt.resource.tsx | 0 .../src/billing-tabs/billing-tab.scss | 0 .../billing-tabs/billling-tabs.component.tsx | 38 + .../esm-billing-app/src/billing.resource.ts | 9 +- .../src/bills-table/bills-table.component.tsx | 0 .../src/bills-table/bills-table.scss | 0 .../claims-wrap/claims-main-component.tsx | 35 + .../src/claims/claims-wrap/claims-main.scss | 25 + .../claims-breakdown.component.tsx | 0 .../claims-breakdown/claims-breakdown.scss | 0 .../dashboard/claims-dashboard.component.tsx | 41 + .../dashboard/form/claims-form.component.tsx | 396 +++++ .../dashboard/form/claims-form.resource.ts | 49 + .../dashboard/form}/claims-form.scss | 85 +- .../header/claims-header.component.tsx | 23 + .../dashboard/header/claims-header.scss | 23 + .../table}/claims-table.component.tsx | 64 +- .../dashboard/table}/claims-table.scss | 17 +- .../claims/make-claims.component.tsx | 7 +- .../src/{invoice => }/claims/make-claims.scss | 0 .../claims/metrics/metrics-card.component.tsx | 36 + .../src/claims/metrics/metrics-card.scss | 76 + .../metrics/metrics-header.component.tsx | 16 + .../src/claims/metrics/metrics-header.scss | 16 + .../src/claims/metrics/metrics.component.tsx | 47 + .../src/claims/metrics/metrics.scss | 10 + packages/esm-billing-app/src/config-schema.ts | 18 + packages/esm-billing-app/src/constants.ts | 0 .../esm-billing-app/src/dashboard.meta.ts | 0 .../esm-billing-app/src/declarations.d.ts | 0 .../esm-billing-app/src/helpers/functions.ts | 14 + packages/esm-billing-app/src/helpers/index.ts | 0 .../esm-billing-app/src/hooks/getMflCode.tsx | 0 .../src/hooks/usePatientAttributes.tsx | 26 + .../src/hooks/useRequestStatus.tsx | 55 + packages/esm-billing-app/src/index.ts | 12 +- .../claims-dashboard.component.tsx | 15 - .../claims-form/claims-form.component.tsx | 129 -- .../claims-header/claims-header.component.tsx | 63 - .../claims-header/claims-header.scss | 51 - .../src/invoice/invoice-table.component.tsx | 0 .../src/invoice/invoice-table.scss | 2 +- .../src/invoice/invoice.component.tsx | 115 +- .../esm-billing-app/src/invoice/invoice.scss | 14 + .../src/invoice/invoice.test.tsx | 237 +++ .../initiate-payment.component.tsx | 120 +- .../initiate-payment/initiate-payment.scss | 5 + .../invoice-breakdown.component.tsx | 0 .../invoice-breakdown/invoice-breakdown.scss | 0 .../payment-form/payment-form.component.tsx | 42 +- .../payments/payment-form/payment-form.scss | 0 .../payment-history.component.tsx | 4 - .../invoice/payments/payments.component.tsx | 65 +- .../src/invoice/payments/payments.resource.ts | 35 + .../src/invoice/payments/payments.scss | 0 .../src/invoice/payments/utils.ts | 5 +- .../visit-tags/visit-attribute.component.tsx | 0 .../print-receipt.component.tsx | 0 .../printable-invoice/print-receipt.scss | 4 - .../printable-footer.component.tsx | 29 +- .../printable-invoice/printable-footer.scss | 11 +- .../printable-footer.test.tsx | 13 +- .../printable-invoice-header.component.tsx | 14 +- .../printable-invoice-header.scss | 0 .../printable-invoice-header.test.tsx | 14 +- .../printable-invoice.component.tsx | 204 ++- .../printable-invoice/printable-invoice.scss | 20 +- .../src/left-panel-link.component.tsx | 0 .../src/m-pesa/mpesa-resource.tsx | 133 +- .../src/metrics-cards/card.component.tsx | 0 .../src/metrics-cards/card.scss | 0 .../metrics-cards/metrics-cards.component.tsx | 0 .../src/metrics-cards/metrics-cards.scss | 0 .../src/metrics-cards/metrics.resource.ts | 0 .../modal/require-payment-modal.component.tsx | 0 .../src/modal/require-payment.scss | 0 .../filtered-patient-bills.component.tsx | 119 ++ .../patient-bills-dashboard.scss | 11 + .../patient-bills-dashboard.tsx | 34 + .../src/past-patient-bills/patient-bills.scss | 11 + .../esm-billing-app/src/root.component.tsx | 4 +- packages/esm-billing-app/src/root.scss | 0 packages/esm-billing-app/src/routes.json | 23 +- packages/esm-billing-app/src/types/index.ts | 43 +- packages/esm-billing-app/src/utils.ts | 87 + packages/esm-billing-app/translations/en.json | 50 +- packages/esm-billing-app/tsconfig.json | 0 packages/esm-billing-app/webpack.config.js | 0 packages/esm-care-panel-app/README.md | 0 .../currentProphylaxisUsed/en.json | 0 packages/esm-care-panel-app/hivStatus/en.json | 0 packages/esm-care-panel-app/jest.config.js | 0 packages/esm-care-panel-app/package.json | 0 .../care-panel-dashboard.component.tsx | 0 .../care-panel-dashboard.scss | 0 .../src/care-panel/care-panel.component.tsx | 0 .../src/care-panel/care-panel.scss | 0 .../care-programs/care-programs.component.tsx | 0 .../src/care-programs/care-programs.scss | 0 .../esm-care-panel-app/src/config-schema.ts | 0 .../esm-care-panel-app/src/dashboard.meta.ts | 0 .../esm-care-panel-app/src/declarations.d.ts | 0 .../src/hooks/useCarePrograms.tsx | 0 .../src/hooks/useEnrollmentHistory.ts | 0 .../src/hooks/useNonStandardRegimen.ts | 0 .../src/hooks/usePatientSummary.ts | 0 .../src/hooks/useProgramSummary.ts | 0 .../src/hooks/useRegimenEncounter.ts | 0 .../src/hooks/useRegimenHistory.ts | 0 .../src/hooks/useRegimenReason.ts | 0 .../src/hooks/useStandardRegimen.ts | 0 packages/esm-care-panel-app/src/index.ts | 0 .../patient-summary.component.tsx | 0 .../src/patient-summary/patient-summary.scss | 0 .../src/print-layout/print.component.tsx | 0 .../src/print-layout/print.scss | 0 .../program-enrollment.component.tsx | 0 .../program-enrollment.scss | 0 .../program-summary.component.tsx | 0 .../src/program-summary/program-summary.scss | 0 .../delete-regimen-modal.component.tsx | 0 .../non-standard-regimen.component.tsx | 0 .../regimen-button.component.tsx | 0 .../regimen-editor/regimen-form.component.tsx | 0 .../regimen-reason.component.tsx | 0 .../src/regimen-editor/regimen.resource.tsx | 0 .../standard-regimen.component.tsx | 0 .../src/regimen-editor/standard-regimen.scss | 0 .../src/regimen-editor/utils.tsx | 0 .../src/regimen/regimen-history.component.tsx | 0 .../src/regimen/regimen-history.scss | 0 packages/esm-care-panel-app/src/routes.json | 0 .../esm-care-panel-app/src/types/index.ts | 0 .../esm-care-panel-app/translations/en.json | 0 .../treatmentNumber/en.json | 0 packages/esm-care-panel-app/tsconfig.json | 0 packages/esm-care-panel-app/webpack.config.js | 0 packages/esm-hts-app/jest.config.js | 0 packages/esm-hts-app/package.json | 0 packages/esm-hts-app/src/config-schema.ts | 0 packages/esm-hts-app/src/dashboard.meta.tsx | 0 packages/esm-hts-app/src/dashboard.scss | 0 packages/esm-hts-app/src/declarations.d.ts | 0 .../src/header/hts-header.component.tsx | 0 .../esm-hts-app/src/header/hts-header.scss | 0 .../src/header/hts-illustration.component.tsx | 0 packages/esm-hts-app/src/hts.component.tsx | 0 packages/esm-hts-app/src/hts.scss | 0 packages/esm-hts-app/src/index.ts | 0 .../src/left-panel-link.component.tsx | 0 packages/esm-hts-app/src/root.component.tsx | 0 packages/esm-hts-app/src/root.scss | 0 packages/esm-hts-app/src/routes.json | 0 .../src/views/dashboard/common.scss | 0 .../hts-program-services/common.scss | 0 .../hts-initial.component.tsx | 0 .../hts-linkage.component.tsx | 0 .../hts-program-services.tsx | 0 .../hts-program-services/hts-program.scss | 0 .../hts-referred.component.tsx | 0 .../hts-retest.component.tsx | 0 .../hts-screening.component.tsx | 0 .../empty-data-illustration.component.tsx | 0 .../empty-state/empty-state.component.tsx | 0 .../empty-state/empty-state.scss | 0 .../due-for-linkage.component.tsx | 0 .../due-for-retest.component.tsx | 0 .../eligible.component.tsx | 0 .../hts-screening.component.tsx | 0 .../invalid-result.component.tsx | 0 .../module-uptake.component.tsx | 0 .../tested.component.tsx | 0 .../hts-patient-list-tabs.component.tsx | 0 .../hts-patient-list-tabs.scss | 0 .../patient-summary/hts-patientsummary.scss | 0 .../patient-summary.component.tsx | 0 .../summary-tiles/hts-summary-tile.scss | 0 ...summary-tiles-overall-uptake.component.tsx | 0 .../hts-summary-tiles.component.tsx | 0 packages/esm-hts-app/translations/en.json | 0 packages/esm-hts-app/tsconfig.json | 0 packages/esm-hts-app/webpack.config.js | 0 .../dialog/verification-modal.scss | 0 .../dialog/verification.component.tsx | 0 packages/esm-morgue-app/jest.config.js | 0 packages/esm-morgue-app/package.json | 0 packages/esm-morgue-app/src/config-schema.ts | 0 packages/esm-morgue-app/src/declarations.d.ts | 0 packages/esm-morgue-app/src/index.ts | 0 .../src/morgue-component/morgue.component.tsx | 0 .../morgue-header/morgue-header.component.tsx | 0 .../src/morgue-header/morgue-header.scss | 0 .../morgue-illustration.component.tsx | 0 .../morgue-left-panel-link.component.tsx | 0 .../morgue-metrics/morgue-card.component.tsx | 0 .../src/morgue-metrics/morgue-card.scss | 0 .../src/morgue-metrics/morgue-header.scss | 0 .../morgue-metrics-header.component.tsx | 0 .../morgue-metrics.component.tsx | 0 .../src/morgue-metrics/morgue-metrics.scss | 0 .../morgue-admission.component.tsx | 0 .../morgue-admitted.component.tsx | 0 .../morgue-discharged.component.tsx | 0 .../src/morgue-tabs/morgue-tabs-component.tsx | 0 .../src/morgue-tabs/morgue-tabs.scss | 0 .../esm-morgue-app/src/root.component.tsx | 0 packages/esm-morgue-app/src/root.scss | 0 packages/esm-morgue-app/src/routes.json | 0 packages/esm-morgue-app/src/setup-tests.ts | 0 packages/esm-morgue-app/translations/en.json | 0 packages/esm-morgue-app/tsconfig.json | 0 packages/esm-morgue-app/webpack.config.js | 0 packages/esm-otz-app/jest.config.js | 0 packages/esm-otz-app/package.json | 0 packages/esm-otz-app/src/config-schema.ts | 0 packages/esm-otz-app/src/dashboard.meta.tsx | 0 packages/esm-otz-app/src/dashboard.scss | 0 packages/esm-otz-app/src/declarations.d.ts | 0 .../src/header/otz-header.component.tsx | 0 .../esm-otz-app/src/header/otz-header.scss | 0 .../src/header/otz-illustration.component.tsx | 0 packages/esm-otz-app/src/index.ts | 0 .../src/left-panel-link.component.tsx | 0 packages/esm-otz-app/src/otz.component.tsx | 0 packages/esm-otz-app/src/otz.scss | 0 packages/esm-otz-app/src/root.component.tsx | 0 packages/esm-otz-app/src/root.scss | 0 packages/esm-otz-app/src/routes.json | 0 .../src/views/dashboard/common.scss | 0 .../otz-program-services/common.scss | 0 .../otz-enrolment.component.tsx | 0 .../otz-program-services.tsx | 0 .../otz-program-services/otz-program.scss | 0 .../empty-data-illustration.component.tsx | 0 .../empty-state/empty-state.component.tsx | 0 .../empty-state/empty-state.scss | 0 .../eligible-for-vl-testing.component.tsx | 0 .../eligible-not-enrolled.component.tsx | 0 .../missed-appointments.component.tsx | 0 .../total-active.component.tsx | 0 .../total-enrolled.component.tsx | 0 .../otz-patient-list-tabs.component.tsx | 0 .../otz-patient-list-tabs.scss | 0 .../patient-summary/otz-patientsummary.scss | 0 .../patient-summary.component.tsx | 0 .../summary-tiles/otz-summary-tile.scss | 0 .../otz-summary-tiles.component.tsx | 0 packages/esm-otz-app/translations/en.json | 0 packages/esm-otz-app/tsconfig.json | 0 packages/esm-otz-app/webpack.config.js | 0 .../jest.config.js | 0 .../package.json | 0 .../header/case-management-header.scss | 0 .../header/case-management-header.tsx | 0 .../header/case-management-illustration.tsx | 0 .../case-management-header.component.tsx | 0 .../metrics/case-management-header.scss | 0 .../case-management-list-active-component.tsx | 0 ...ase-management-list-inactive-component.tsx | 0 .../table/case-management-list.scss | 0 .../tabs/case-management-tabs.component.tsx | 0 .../tabs/case-management-tabs.scss | 0 .../workspace/case-management-concept-map.ts | 0 .../workspace/case-management.resource.ts | 0 .../workspace/case-management.scss | 0 .../workspace/case-management.workspace.tsx | 0 .../workspace/patient-info.component.tsx | 0 .../workspace/patient-info.scss | 0 .../case-management/wrap/wrap.component.tsx | 0 .../clinical-enc.component.tsx | 0 .../clinical-encounter-dashboard-meta.tsx | 0 ...clinical-encounter-dashboard.component.tsx | 0 .../dashboard/in-patient.scss | 0 .../in-patient-medical-summary.component.tsx | 0 .../maternal-summary.component.tsx | 0 .../neonatal-summary.component.tsx | 0 .../out-patient-summary.scss | 0 .../patient-medical-history.component.tsx | 0 .../patient-social-history.component.tsx | 0 .../summary/summary-card.component.tsx | 0 .../summary/summary-card.scss | 0 .../surgical-summary.component.tsx | 0 .../clinical-view-section.component.tsx | 0 .../clinical-view-section.scss | 0 .../createDashboardGroup.tsx | 0 .../dashboard-group.component.tsx | 0 .../clinical-view-group/dashboard-group.scss | 0 .../src/config-schema.ts | 10 +- .../birthdate-calculator.component.tsx | 0 .../contact-actions.component.tsx | 0 .../contact-list/contact-list-concept-map.ts | 0 .../src/contact-list/contact-list-form.scss | 0 .../contact-list/contact-list.component.tsx | 0 .../contact-list/contact-list.resource.tsx | 0 .../src/contact-list/contact-list.scss | 0 .../contact-list/contact-list.workspace.tsx | 0 .../src/contact-list/hiv-status.component.tsx | 0 .../src/dashboard.meta.tsx | 0 .../src/declarations.d.ts | 0 .../concept-obs.component.tsx | 0 .../family-history.component.tsx | 0 .../family-history.scss | 0 .../family-partner-dashboard.meta.tsx | 0 .../relationships.resource.tsx | 0 .../src/hooks/useClinicalEncounter.ts | 0 .../src/hooks/useContacts.ts | 0 .../src/hooks/useEncounterRows.ts | 0 .../src/hooks/useNeonatalSummary.ts | 0 .../src/hooks/usePartograph.ts | 0 .../src/hooks/usePatientTracing.ts | 0 .../src/hooks/useRelationshipTypes.ts | 0 .../src/hooks/useRelativeHTSEncounter.ts | 0 .../src/hooks/useRelativeHivEnrollment.ts | 0 .../src/index.ts | 0 .../src/left-panel-link.component.tsx | 0 .../antenatal-care.component.tsx | 0 .../antenatal-care-concepts-map.ts | 0 .../labour-and-delivery-care-concepts-map.ts | 0 .../postnatal-care-concepts-map.ts | 0 .../concepts/mch-concepts.ts | 0 .../labour-delivery.component.tsx | 0 .../maternal-health-component.scss | 0 .../mch-dashboard.meta.tsx | 0 .../partography/labour-delivery.scss | 0 .../partography/partograph-chart.scss | 0 .../partography/partograph-chart.tsx | 0 .../partography/partograph.component.tsx | 0 .../postnatal-care.component.tsx | 0 .../src/root.component.tsx | 0 .../src/root.scss | 0 .../src/routes.json | 0 .../encounter-observations.component.tsx | 0 .../encounter-observations/styles.scss | 0 .../generic-dashboard.component.tsx | 0 .../generic-nav-links.component.tsx | 0 .../generic-nav-links/useEncounters.tsx | 0 .../defaulter-tracing.component.tsx | 0 .../hiv-care-and-treatment-dashboard.meta.tsx | 2 +- .../hiv-testing-services/constants.ts | 0 .../hiv-testing-component.scss | 0 .../mch-clinical-view.meta.tsx | 0 .../hiv-testing/hiv-screening-constants.ts | 0 .../hiv-testing/hiv-testing-constants.ts | 0 .../hiv-testing-services.component.tsx | 0 .../tabs/hiv-screening.component.tsx | 0 .../tabs/hiv-testing.component.tsx | 0 .../special-clinic-dashboard.meta.tsx | 0 .../src/types/index.ts | 0 .../src/ui/data-table/o-table.component.tsx | 0 .../src/ui/data-table/o-table.scss | 0 .../ui/encounter-list/encounter-list-utils.ts | 0 .../encounter-list.component.tsx | 0 .../src/ui/encounter-list/encounter-list.scss | 0 .../ui/encounter-list/encounter.resource.tsx | 0 .../encounter-observation-component.scss | 0 .../encounter-observation.component.tsx | 0 .../src/utils/constants.ts | 0 .../src/utils/expression-helper.ts | 0 .../translations/en.json | 0 .../translations/es.json | 0 .../translations/fr.json | 0 .../translations/km.json | 0 .../tsconfig.json | 0 .../webpack.config.js | 0 packages/esm-patient-flags-app/jest.config.js | 0 packages/esm-patient-flags-app/package.json | 0 .../amrs-link/amrs-chart-link.component.tsx | 0 .../src/amrs-link/amrs-link.component.tsx | 0 .../src/config-schema.ts | 0 .../src/declarations.d.ts | 0 .../src/hooks/usePatientFlags.tsx | 2 +- .../src/hooks/usePatientId.tsx | 0 packages/esm-patient-flags-app/src/index.ts | 0 .../src/navbar/nav-utils.tsx | 0 .../navbar/navbar-action-button.component.tsx | 0 .../src/navbar/navbar-action-button.scss | 0 .../src/navbar/navbar-link.component.tsx | 0 .../src/navbar/navbar-link.scss | 0 .../src/navbar/navbar-overlay.component.tsx | 0 .../patient-flags/patient-flags.component.tsx | 0 .../src/patient-flags/patient-flags.scss | 0 .../src/patient-flags/patient-flags.test.tsx | 0 .../esm-patient-flags-app/src/routes.json | 0 .../esm-patient-flags-app/src/types/index.ts | 0 .../translations/en.json | 0 .../translations/es.json | 0 .../translations/fr.json | 0 .../translations/km.json | 0 packages/esm-patient-flags-app/tsconfig.json | 0 .../esm-patient-flags-app/webpack.config.js | 0 .../esm-patient-registration-app/README.md | 0 .../images/patient-registration-hierarchy.png | Bin .../jest.config.js | 0 .../esm-patient-registration-app/package.json | 0 .../src/add-patient-link.scss | 0 .../src/add-patient-link.test.tsx | 0 .../src/add-patient-link.tsx | 0 .../src/config-schema.ts | 0 .../src/constants.ts | 0 .../src/declarations.d.ts | 0 .../esm-patient-registration-app/src/index.ts | 0 .../src/nav-link.test.tsx | 0 .../src/nav-link.tsx | 0 .../src/offline.resources.ts | 0 .../src/offline.ts | 0 .../src/patient-photo.extension.tsx | 0 .../before-save-prompt.tsx | 0 .../src/patient-registration/date-util.ts | 0 .../field/__mocks__/field.resource.ts | 0 .../field/address/address-field.component.tsx | 0 .../address-hierarchy-levels.component.tsx | 0 .../address/address-hierarchy.resource.tsx | 0 .../address/address-search.component.tsx | 0 .../field/address/address-search.scss | 0 .../custom-address-field.component.tsx | 0 .../field/custom-field.component.tsx | 0 .../field/dob/dob.component.tsx | 0 .../field/field.component.tsx | 0 .../field/field.resource.ts | 0 .../src/patient-registration/field/field.scss | 0 .../field/gender/gender-field.component.tsx | 0 .../field/gender/gender-field.test.tsx | 0 .../field/id/id-field.component.tsx | 0 ...identifier-selection-overlay.component.tsx | 0 .../field/id/identifier-selection.scss | 0 .../field/name/name-field.component.tsx | 0 .../field/obs/obs-field.component.tsx | 2 +- .../field/obs/obs-field.test.tsx | 0 ...coded-person-attribute-field.component.tsx | 0 ...ustom-person-attribute-field.component.tsx | 0 .../person-attribute-field.component.tsx | 0 .../person-attributes.resource.ts | 0 .../text-person-attribute-field.component.tsx | 0 .../field/phone/phone-field.component.tsx | 0 .../src/patient-registration/form-manager.ts | 0 .../basic-input/input/input.component.tsx | 0 .../input/basic-input/input/input.test.tsx | 0 .../select/select-input.component.tsx | 0 .../combo-input/combo-input.component.tsx | 0 .../combo-input/selection-tick.component.tsx | 0 .../autosuggest/autosuggest.component.tsx | 0 .../custom-input/autosuggest/autosuggest.scss | 0 .../identifier/identifier-input.component.tsx | 0 .../custom-input/identifier/utils.testt.ts | 0 .../input/custom-input/identifier/utils.ts | 0 .../dummy-data/dummy-data-input.component.tsx | 0 .../dummy-data/dummy-data-input.test.tsx | 0 .../src/patient-registration/input/input.scss | 0 .../patient-registration-context.ts | 0 .../patient-registration-hooks.ts | 0 .../patient-registration-utils.ts | 0 .../patient-registration.component.tsx | 0 .../patient-registration.resource.testt.tsx | 0 .../patient-registration.resource.ts | 0 .../patient-registration.scss | 0 .../patient-registration.types.ts | 0 .../death-info-section.component.tsx | 0 .../demographics-section.component.tsx | 0 .../section/generic-section.component.tsx | 0 .../relationships-section.component.tsx | 0 .../relationships.resource.tsx | 0 .../patient-relationships/relationships.scss | 0 .../section/section-wrapper.component.tsx | 0 .../section/section.component.tsx | 0 .../patient-registration/section/section.scss | 0 .../overlay/overlay.component.tsx | 0 .../ui-components/overlay/overlay.scss | 0 .../patient-registration-validation.test.tsx | 0 .../patient-registration-validation.tsx | 0 .../assets/counties.json | 0 .../assets/verification-assets.ts | 0 .../patient-verification-hook.tsx | 0 .../patient-verification-utils.ts | 4 +- .../patient-verification.component.tsx | 0 .../patient-verification.scss | 0 .../confirm-prompt.component.tsx | 0 .../empty-prompt.component.tsx | 0 .../verification-types.ts | 0 .../patient-verification/assets/counties.json | 0 .../assets/verification-assets.ts | 0 .../patient-verification-hook.tsx | 0 .../patient-verification-utils.ts | 4 +- .../patient-verification.component.tsx | 0 .../patient-verification.scss | 0 .../confirm-prompt.component.tsx | 0 .../empty-prompt.component.tsx | 0 .../verification-types.ts | 0 .../src/resource.ts | 0 .../src/root.component.tsx | 0 .../src/root.scss | 0 .../src/routes.json | 0 .../widgets/cancel-patient-edit.component.tsx | 0 ...te-identifier-confirmation-modal.testt.tsx | 0 .../delete-identifier-confirmation-modal.tsx | 0 .../src/widgets/delete-identifier-modal.scss | 0 .../edit-patient-details-button.component.tsx | 0 .../widgets/edit-patient-details-button.scss | 0 .../translations/am.json | 0 .../translations/ar.json | 0 .../translations/en.json | 0 .../translations/es.json | 0 .../translations/fr.json | 0 .../translations/he.json | 0 .../translations/km.json | 0 .../translations/zh.json | 0 .../translations/zh_CN.json | 0 .../tsconfig.json | 0 .../webpack.config.js | 0 .../esm-preappointment-app/jest.config.js | 0 packages/esm-preappointment-app/package.json | 0 .../src/config-schema.ts | 0 .../src/custom-pagination.component.tsx | 0 .../src/custom-pagination.scss | 0 .../src/declarations.d.ts | 0 packages/esm-preappointment-app/src/index.ts | 0 .../pre-appointment.component.tsx | 0 .../pre-appointment.resource.tsx | 0 .../src/pre-appointments/pre-appointment.scss | 0 .../src/root.component.tsx | 0 packages/esm-preappointment-app/src/root.scss | 0 .../esm-preappointment-app/src/routes.json | 0 .../esm-preappointment-app/src/types/index.ts | 0 .../src/use-pagination-info.component.ts | 0 .../translations/en.json | 0 packages/esm-preappointment-app/tsconfig.json | 0 .../esm-preappointment-app/webpack.config.js | 0 packages/esm-providers-app/jest.config.js | 0 packages/esm-providers-app/package.json | 0 .../esm-providers-app/src/config-schema.ts | 0 .../esm-providers-app/src/declarations.d.ts | 0 packages/esm-providers-app/src/index.ts | 0 .../providers.component.tsx | 0 .../providers-header.component.tsx | 0 .../providers-header/providers-header.scss | 0 .../providers-illustration.component.tsx | 0 .../providers-left-panel-link.component.tsx | 0 .../providers-card.component.tsx | 0 .../src/providers-metrics/providers-card.scss | 0 .../providers-metrics/providers-header.scss | 0 .../providers-metrics-header.component.tsx | 28 +- .../providers-metrics.component.tsx | 0 .../providers-metrics/providers-metrics.scss | 0 .../providers-active.component.tsx | 0 .../providers-admission.component.tsx | 0 .../providers-admitted.component.tsx | 0 .../providers-discharged.component.tsx | 0 .../providers-tabs-component.tsx | 0 .../src/providers-tabs/providers-tabs.scss | 0 .../esm-providers-app/src/root.component.tsx | 0 packages/esm-providers-app/src/root.scss | 0 packages/esm-providers-app/src/routes.json | 0 packages/esm-providers-app/src/setup-tests.ts | 0 .../esm-providers-app/translations/en.json | 0 packages/esm-providers-app/tsconfig.json | 0 packages/esm-providers-app/webpack.config.js | 0 packages/esm-report-app/src/api/api.ts | 0 .../src/headers/report-header-component.tsx | 0 .../src/headers/report-header.scss | 0 .../headers/report-illustration-component.tsx | 0 .../src/hooks/useSelectedLocations.tsx | 0 .../Care_and_Treatment.scss | 0 .../CARE_AND_TREATMENT/Care_and_Treatment.tsx | 0 .../Jua_Mtoto_Wako/Jua_Mtoto_Wako.scss | 0 .../Jua_Mtoto_Wako/Jua_Mtoto_Wako.tsx | 0 .../prep-activity-register.component.tsx | 0 .../src/registers/MOH-267/prep.scss | 0 .../src/registers/MOH-362/MOH-362.scss | 0 .../MOH-362/moh-362a/MOH_362A_component.tsx | 0 .../MOH-362/moh-362b/MOH_362B_component.tsx | 0 .../src/registers/MOH-405/MOH-405.scss | 0 .../registers/MOH-405/MOH_405_component.tsx | 0 .../src/registers/MOH-406/MOH_406.scss | 0 .../registers/MOH-406/MOH_406_component.tsx | 0 .../ClientFollowUp_component.tsx | 0 .../src/registers/MOH-407/nutrition.scss | 0 .../MOH-407/nutrition/Nutrition_component.tsx | 0 .../registers/MOH-408/MOH-408-component.tsx | 0 .../src/registers/MOH-408/MOH-408.scss | 0 .../src/registers/MOH-731/MOH_731.scss | 0 .../src/registers/MOH-731/MOH_731.tsx | 0 .../src/registers/MOH-731/PartOne.tsx | 0 .../src/registers/MOH-731/PartThree.tsx | 0 .../src/registers/MOH-731/PartTwo.tsx | 0 .../registers/MOH_333_MATERNITY/MOH_333.scss | 0 .../MOH_333_MATERNITY/MOH_333_component.tsx | 0 .../Defaulter_Tracing_Register.tsx | 0 .../Defaulter_tracing_register.scss | 0 .../src/registers/OTZ/MOH_otz.scss | 0 .../src/registers/OTZ/MOH_otz_component.tsx | 0 .../PBC/Project_Beyond_Clients.scss | 0 .../PBC/Project_Beyond_Clients.tsx | 0 .../PBD/Project_Beyond_Deliveries.scss | 0 .../PBD/Project_Beyond_Deliveries.tsx | 0 .../breadcrumb/bread-crumb.scss | 0 .../breadcrumb/bread-crumb.tsx | 0 .../report-dashboard-component.tsx | 0 .../dynamic-report-loader-component.tsx | 0 .../report-loader/dynamic-report-loader.scss | 0 .../report-loader/reportMapping.json | 0 .../report-summary/ReportSummary.css | 0 .../report-summary/ReportSummary.tsx | 0 .../report-tab/report-tabs.scss | 0 .../report-tab/report-tabs.tsx | 0 .../report-table/report-table-component.tsx | 0 .../tab-panel/tab-panel-component.tsx | 0 .../tab-panel/tab-panel.scss | 0 packages/esm-version-app/increment-version.js | 0 packages/esm-version-app/jest.config.js | 0 packages/esm-version-app/package.json | 0 .../src/about-link.component.tsx | 0 .../src/about/about.component.tsx | 0 packages/esm-version-app/src/about/about.scss | 0 packages/esm-version-app/src/config-schema.ts | 0 .../esm-version-app/src/declarations.d.ts | 0 .../frontend-modules.component.tsx | 0 .../src/hooks/useFrontendModules.tsx | 0 .../esm-version-app/src/hooks/useModules.tsx | 0 .../src/hooks/useSystemSetting.tsx | 0 packages/esm-version-app/src/index.ts | 0 .../esm-version-app/src/release-version.js | 0 .../esm-version-app/src/root.component.tsx | 0 packages/esm-version-app/src/root.scss | 0 packages/esm-version-app/src/routes.json | 0 packages/esm-version-app/src/types/index.ts | 0 packages/esm-version-app/src/version.js | 0 packages/esm-version-app/translations/en.json | 0 packages/esm-version-app/tsconfig.json | 0 packages/esm-version-app/webpack.config.js | 0 playwright.config.ts | 0 prettier.config.js | 0 react-i18next.js | 0 tools/i18next-parser.config.js | 0 tools/index.ts | 0 tools/setup-tests.ts | 0 tools/test-utils.tsx | 0 tsconfig.json | 0 turbo.json | 0 yarn.lock | 1393 +++++++---------- 756 files changed, 4387 insertions(+), 1997 deletions(-) mode change 100644 => 100755 .DS_Store mode change 100644 => 100755 .editorconfig mode change 100644 => 100755 .env mode change 100644 => 100755 .eslintignore mode change 100644 => 100755 .eslintrc mode change 100644 => 100755 .github/pull_request_template.md mode change 100644 => 100755 .github/workflows/bundle-size.yml mode change 100644 => 100755 .github/workflows/ci.yml mode change 100644 => 100755 .github/workflows/tx-pull.yml mode change 100644 => 100755 .github/workflows/tx-push.yml mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .husky/.gitignore mode change 100644 => 100755 .prettierignore mode change 100644 => 100755 .tx/config mode change 100644 => 100755 .vscode/settings.json mode change 100644 => 100755 .yarnrc.yml mode change 100644 => 100755 LICENSE.md mode change 100644 => 100755 README.md mode change 100644 => 100755 __mocks__/active-visits.mock.ts mode change 100644 => 100755 __mocks__/address.mock.ts mode change 100644 => 100755 __mocks__/appointments.mock.ts mode change 100644 => 100755 __mocks__/auto-generation-options.mock.ts mode change 100644 => 100755 __mocks__/identifier-types.mock.ts mode change 100644 => 100755 __mocks__/identifiers.mock.ts mode change 100644 => 100755 __mocks__/index.ts mode change 100644 => 100755 __mocks__/locations.mock.ts mode change 100644 => 100755 __mocks__/metrics.mock.ts mode change 100644 => 100755 __mocks__/patient-registration.mock.ts mode change 100644 => 100755 __mocks__/patient-visits.mock.ts mode change 100644 => 100755 __mocks__/patient.mock.ts mode change 100644 => 100755 __mocks__/search.mock.ts mode change 100644 => 100755 __mocks__/session.mock.ts mode change 100644 => 100755 __mocks__/visits.mock.ts mode change 100644 => 100755 e2e/commands/cohort-operations.ts mode change 100644 => 100755 e2e/commands/encounter-operations.ts mode change 100644 => 100755 e2e/commands/index.ts mode change 100644 => 100755 e2e/commands/patient-operations.ts mode change 100644 => 100755 e2e/commands/provider-operations.ts mode change 100644 => 100755 e2e/commands/visit-operations.ts mode change 100644 => 100755 e2e/core/global-setup.ts mode change 100644 => 100755 e2e/core/index.ts mode change 100644 => 100755 e2e/core/test.ts mode change 100644 => 100755 e2e/fixtures/api.ts mode change 100644 => 100755 e2e/fixtures/index.ts mode change 100644 => 100755 e2e/pages/appointments-page.ts mode change 100644 => 100755 e2e/pages/home-page.ts mode change 100644 => 100755 e2e/pages/index.ts mode change 100644 => 100755 e2e/pages/patient-lists-page.ts mode change 100644 => 100755 e2e/pages/registration-and-edit-page.ts mode change 100644 => 100755 e2e/specs/active-visits.spec.ts mode change 100644 => 100755 e2e/specs/appointments.spec.ts mode change 100644 => 100755 e2e/specs/edit-patient.spec.ts mode change 100644 => 100755 e2e/specs/patient-list.spec.ts mode change 100644 => 100755 e2e/specs/patient-search.spec.ts mode change 100644 => 100755 e2e/specs/register-new-patient.spec.ts mode change 100644 => 100755 e2e/specs/return-to-patient-list.spec.ts mode change 100644 => 100755 e2e/support/bamboo/docker-compose.yml mode change 100644 => 100755 e2e/support/bamboo/e2e-test-runner.sh mode change 100644 => 100755 e2e/support/bamboo/playwright.Dockerfile mode change 100644 => 100755 e2e/support/github/Dockerfile mode change 100644 => 100755 e2e/support/github/docker-compose.yml mode change 100644 => 100755 e2e/support/github/run-e2e-docker-env.sh mode change 100644 => 100755 example.env mode change 100644 => 100755 jest.config.js mode change 100644 => 100755 package.json mode change 100644 => 100755 packages/esm-billing-app/README.md mode change 100644 => 100755 packages/esm-billing-app/__mocks__/visit.mock.ts mode change 100644 => 100755 packages/esm-billing-app/jest.config.js mode change 100644 => 100755 packages/esm-billing-app/package.json mode change 100644 => 100755 packages/esm-billing-app/src/bill-history/bill-history.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/bill-history/bill-history.scss mode change 100644 => 100755 packages/esm-billing-app/src/billable-services-admin-card-link.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/bill-waiver/bill-selection.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver-form.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver-form.scss mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver.scss mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/bill-waiver/patient-bills.component.tsx delete mode 100644 packages/esm-billing-app/src/billable-services/bill-waiver/utils.ts mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/billable-service.resource.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/billable-services-home.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/billable-services.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/billable-services.scss rename packages/esm-billing-app/src/billable-services/billiable-item/{ => drug-order}/drug-order.component.tsx (65%) mode change 100644 => 100755 rename packages/esm-billing-app/src/billable-services/billiable-item/{ => drug-order}/drug-order.scss (89%) mode change 100644 => 100755 delete mode 100644 packages/esm-billing-app/src/billable-services/billiable-item/lab-order.component.tsx create mode 100755 packages/esm-billing-app/src/billable-services/billiable-item/test-order/imaging-order.component.tsx create mode 100755 packages/esm-billing-app/src/billable-services/billiable-item/test-order/lab-order.component.tsx create mode 100755 packages/esm-billing-app/src/billable-services/billiable-item/test-order/price-info-order.componet.tsx create mode 100755 packages/esm-billing-app/src/billable-services/billiable-item/test-order/price-info-order.scss create mode 100755 packages/esm-billing-app/src/billable-services/billiable-item/test-order/procedure-order.component.tsx create mode 100755 packages/esm-billing-app/src/billable-services/billiable-item/test-order/test-order-action.component.tsx create mode 100755 packages/esm-billing-app/src/billable-services/billiable-item/test-order/test-order-action.resource.tsx rename packages/esm-billing-app/src/billable-services/billiable-item/{useBilliableItem.tsx => useBillableItem.tsx} (83%) mode change 100644 => 100755 create mode 100755 packages/esm-billing-app/src/billable-services/billing-tariffs/add-billing-tariffs-service.scss create mode 100755 packages/esm-billing-app/src/billable-services/billing-tariffs/add-billings-tariffs-service.component.tsx create mode 100644 packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs-admin-card.tsx create mode 100755 packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs-services.scss create mode 100755 packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs.component.tsx create mode 100755 packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs.resource.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.scss mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/dashboard/dashboard.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/dashboard/dashboard.scss mode change 100644 => 100755 packages/esm-billing-app/src/billable-services/dashboard/service-metrics.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billing-dashboard/billing-dashboard.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billing-dashboard/billing-dashboard.scss mode change 100644 => 100755 packages/esm-billing-app/src/billing-form/billing-checkin-form.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billing-form/billing-checkin-form.scss mode change 100644 => 100755 packages/esm-billing-app/src/billing-form/billing-form.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billing-form/billing-form.scss mode change 100644 => 100755 packages/esm-billing-app/src/billing-form/helper.ts mode change 100644 => 100755 packages/esm-billing-app/src/billing-form/social-health-authority/sha-number-validity.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billing-form/visit-attributes/visit-attributes-form.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billing-form/visit-attributes/visit-attributes-form.scss mode change 100644 => 100755 packages/esm-billing-app/src/billing-header/billing-header.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billing-header/billing-header.scss mode change 100644 => 100755 packages/esm-billing-app/src/billing-header/billing-illustration.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billing-prompt/billing-prompt.resource.tsx create mode 100755 packages/esm-billing-app/src/billing-tabs/billing-tab.scss create mode 100755 packages/esm-billing-app/src/billing-tabs/billling-tabs.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/billing.resource.ts mode change 100644 => 100755 packages/esm-billing-app/src/bills-table/bills-table.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/bills-table/bills-table.scss create mode 100755 packages/esm-billing-app/src/claims/claims-wrap/claims-main-component.tsx create mode 100755 packages/esm-billing-app/src/claims/claims-wrap/claims-main.scss rename packages/esm-billing-app/src/{invoice/claims/claims-dashboard => claims/dashboard}/claims-breakdown/claims-breakdown.component.tsx (100%) mode change 100644 => 100755 rename packages/esm-billing-app/src/{invoice/claims/claims-dashboard => claims/dashboard}/claims-breakdown/claims-breakdown.scss (100%) mode change 100644 => 100755 create mode 100755 packages/esm-billing-app/src/claims/dashboard/claims-dashboard.component.tsx create mode 100755 packages/esm-billing-app/src/claims/dashboard/form/claims-form.component.tsx create mode 100755 packages/esm-billing-app/src/claims/dashboard/form/claims-form.resource.ts rename packages/esm-billing-app/src/{invoice/claims/claims-dashboard/claims-form => claims/dashboard/form}/claims-form.scss (57%) mode change 100644 => 100755 create mode 100755 packages/esm-billing-app/src/claims/dashboard/header/claims-header.component.tsx create mode 100755 packages/esm-billing-app/src/claims/dashboard/header/claims-header.scss rename packages/esm-billing-app/src/{invoice/claims/claims-dashboard/claims-table.component.tsx => claims/dashboard/table}/claims-table.component.tsx (76%) mode change 100644 => 100755 rename packages/esm-billing-app/src/{invoice/claims/claims-dashboard/claims-table.component.tsx => claims/dashboard/table}/claims-table.scss (91%) mode change 100644 => 100755 rename packages/esm-billing-app/src/{invoice => }/claims/make-claims.component.tsx (72%) mode change 100644 => 100755 rename packages/esm-billing-app/src/{invoice => }/claims/make-claims.scss (100%) mode change 100644 => 100755 create mode 100755 packages/esm-billing-app/src/claims/metrics/metrics-card.component.tsx create mode 100755 packages/esm-billing-app/src/claims/metrics/metrics-card.scss create mode 100755 packages/esm-billing-app/src/claims/metrics/metrics-header.component.tsx create mode 100755 packages/esm-billing-app/src/claims/metrics/metrics-header.scss create mode 100755 packages/esm-billing-app/src/claims/metrics/metrics.component.tsx create mode 100755 packages/esm-billing-app/src/claims/metrics/metrics.scss mode change 100644 => 100755 packages/esm-billing-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-billing-app/src/constants.ts mode change 100644 => 100755 packages/esm-billing-app/src/dashboard.meta.ts mode change 100644 => 100755 packages/esm-billing-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-billing-app/src/helpers/functions.ts mode change 100644 => 100755 packages/esm-billing-app/src/helpers/index.ts mode change 100644 => 100755 packages/esm-billing-app/src/hooks/getMflCode.tsx create mode 100755 packages/esm-billing-app/src/hooks/usePatientAttributes.tsx create mode 100755 packages/esm-billing-app/src/hooks/useRequestStatus.tsx mode change 100644 => 100755 packages/esm-billing-app/src/index.ts delete mode 100644 packages/esm-billing-app/src/invoice/claims/claims-dashboard/claims-dashboard.component.tsx delete mode 100644 packages/esm-billing-app/src/invoice/claims/claims-dashboard/claims-form/claims-form.component.tsx delete mode 100644 packages/esm-billing-app/src/invoice/claims/claims-dashboard/claims-header/claims-header.component.tsx delete mode 100644 packages/esm-billing-app/src/invoice/claims/claims-dashboard/claims-header/claims-header.scss mode change 100644 => 100755 packages/esm-billing-app/src/invoice/invoice-table.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/invoice-table.scss mode change 100644 => 100755 packages/esm-billing-app/src/invoice/invoice.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/invoice.scss create mode 100755 packages/esm-billing-app/src/invoice/invoice.test.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/initiate-payment/initiate-payment.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/initiate-payment/initiate-payment.scss mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/invoice-breakdown/invoice-breakdown.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/invoice-breakdown/invoice-breakdown.scss mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/payment-form/payment-form.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/payment-form/payment-form.scss mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/payment-history/payment-history.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/payments.component.tsx create mode 100755 packages/esm-billing-app/src/invoice/payments/payments.resource.ts mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/payments.scss mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/utils.ts mode change 100644 => 100755 packages/esm-billing-app/src/invoice/payments/visit-tags/visit-attribute.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/print-receipt.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/print-receipt.scss mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/printable-footer.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/printable-footer.scss mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/printable-footer.test.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/printable-invoice-header.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/printable-invoice-header.scss mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/printable-invoice-header.test.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/printable-invoice.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/invoice/printable-invoice/printable-invoice.scss mode change 100644 => 100755 packages/esm-billing-app/src/left-panel-link.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/m-pesa/mpesa-resource.tsx mode change 100644 => 100755 packages/esm-billing-app/src/metrics-cards/card.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/metrics-cards/card.scss mode change 100644 => 100755 packages/esm-billing-app/src/metrics-cards/metrics-cards.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/metrics-cards/metrics-cards.scss mode change 100644 => 100755 packages/esm-billing-app/src/metrics-cards/metrics.resource.ts mode change 100644 => 100755 packages/esm-billing-app/src/modal/require-payment-modal.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/modal/require-payment.scss create mode 100755 packages/esm-billing-app/src/past-patient-bills/filtered-patient-bills.component.tsx create mode 100755 packages/esm-billing-app/src/past-patient-bills/patient-bills-dashboard/patient-bills-dashboard.scss create mode 100755 packages/esm-billing-app/src/past-patient-bills/patient-bills-dashboard/patient-bills-dashboard.tsx create mode 100755 packages/esm-billing-app/src/past-patient-bills/patient-bills.scss mode change 100644 => 100755 packages/esm-billing-app/src/root.component.tsx mode change 100644 => 100755 packages/esm-billing-app/src/root.scss mode change 100644 => 100755 packages/esm-billing-app/src/routes.json mode change 100644 => 100755 packages/esm-billing-app/src/types/index.ts create mode 100755 packages/esm-billing-app/src/utils.ts mode change 100644 => 100755 packages/esm-billing-app/translations/en.json mode change 100644 => 100755 packages/esm-billing-app/tsconfig.json mode change 100644 => 100755 packages/esm-billing-app/webpack.config.js mode change 100644 => 100755 packages/esm-care-panel-app/README.md mode change 100644 => 100755 packages/esm-care-panel-app/currentProphylaxisUsed/en.json mode change 100644 => 100755 packages/esm-care-panel-app/hivStatus/en.json mode change 100644 => 100755 packages/esm-care-panel-app/jest.config.js mode change 100644 => 100755 packages/esm-care-panel-app/package.json mode change 100644 => 100755 packages/esm-care-panel-app/src/care-panel-dashboard/care-panel-dashboard.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/care-panel-dashboard/care-panel-dashboard.scss mode change 100644 => 100755 packages/esm-care-panel-app/src/care-panel/care-panel.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/care-panel/care-panel.scss mode change 100644 => 100755 packages/esm-care-panel-app/src/care-programs/care-programs.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/care-programs/care-programs.scss mode change 100644 => 100755 packages/esm-care-panel-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/dashboard.meta.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/hooks/useCarePrograms.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/hooks/useEnrollmentHistory.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/hooks/useNonStandardRegimen.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/hooks/usePatientSummary.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/hooks/useProgramSummary.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/hooks/useRegimenEncounter.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/hooks/useRegimenHistory.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/hooks/useRegimenReason.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/hooks/useStandardRegimen.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/index.ts mode change 100644 => 100755 packages/esm-care-panel-app/src/patient-summary/patient-summary.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/patient-summary/patient-summary.scss mode change 100644 => 100755 packages/esm-care-panel-app/src/print-layout/print.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/print-layout/print.scss mode change 100644 => 100755 packages/esm-care-panel-app/src/program-enrollment/program-enrollment.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/program-enrollment/program-enrollment.scss mode change 100644 => 100755 packages/esm-care-panel-app/src/program-summary/program-summary.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/program-summary/program-summary.scss mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen-editor/delete-regimen-modal.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen-editor/non-standard-regimen.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen-editor/regimen-button.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen-editor/regimen-form.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen-editor/regimen-reason.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen-editor/regimen.resource.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen-editor/standard-regimen.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen-editor/standard-regimen.scss mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen-editor/utils.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen/regimen-history.component.tsx mode change 100644 => 100755 packages/esm-care-panel-app/src/regimen/regimen-history.scss mode change 100644 => 100755 packages/esm-care-panel-app/src/routes.json mode change 100644 => 100755 packages/esm-care-panel-app/src/types/index.ts mode change 100644 => 100755 packages/esm-care-panel-app/translations/en.json mode change 100644 => 100755 packages/esm-care-panel-app/treatmentNumber/en.json mode change 100644 => 100755 packages/esm-care-panel-app/tsconfig.json mode change 100644 => 100755 packages/esm-care-panel-app/webpack.config.js mode change 100644 => 100755 packages/esm-hts-app/jest.config.js mode change 100644 => 100755 packages/esm-hts-app/package.json mode change 100644 => 100755 packages/esm-hts-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-hts-app/src/dashboard.meta.tsx mode change 100644 => 100755 packages/esm-hts-app/src/dashboard.scss mode change 100644 => 100755 packages/esm-hts-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-hts-app/src/header/hts-header.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/header/hts-header.scss mode change 100644 => 100755 packages/esm-hts-app/src/header/hts-illustration.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/hts.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/hts.scss mode change 100644 => 100755 packages/esm-hts-app/src/index.ts mode change 100644 => 100755 packages/esm-hts-app/src/left-panel-link.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/root.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/root.scss mode change 100644 => 100755 packages/esm-hts-app/src/routes.json mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/common.scss mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/hts-program-services/common.scss mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/hts-program-services/hts-initial.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/hts-program-services/hts-linkage.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/hts-program-services/hts-program-services.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/hts-program-services/hts-program.scss mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/hts-program-services/hts-referred.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/hts-program-services/hts-retest.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/hts-program-services/hts-screening.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/empty-state/empty-data-illustration.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/empty-state/empty-state.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/empty-state/empty-state.scss mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/hts-patient-list-tables/due-for-linkage.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/hts-patient-list-tables/due-for-retest.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/hts-patient-list-tables/eligible.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/hts-patient-list-tables/hts-screening.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/hts-patient-list-tables/invalid-result.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/hts-patient-list-tables/module-uptake.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/hts-patient-list-tables/tested.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/hts-patient-list-tabs.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-list-tabs/hts-patient-list-tabs.scss mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-summary/hts-patientsummary.scss mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/patient-summary/patient-summary.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/summary-tiles/hts-summary-tile.scss mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/summary-tiles/hts-summary-tiles-overall-uptake.component.tsx mode change 100644 => 100755 packages/esm-hts-app/src/views/dashboard/summary-tiles/hts-summary-tiles.component.tsx mode change 100644 => 100755 packages/esm-hts-app/translations/en.json mode change 100644 => 100755 packages/esm-hts-app/tsconfig.json mode change 100644 => 100755 packages/esm-hts-app/webpack.config.js mode change 100644 => 100755 packages/esm-lab-order-manifest-app/src/lab-order-manifest/dialog/verification-modal.scss mode change 100644 => 100755 packages/esm-lab-order-manifest-app/src/lab-order-manifest/dialog/verification.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/jest.config.js mode change 100644 => 100755 packages/esm-morgue-app/package.json mode change 100644 => 100755 packages/esm-morgue-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-morgue-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-morgue-app/src/index.ts mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-component/morgue.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-header/morgue-header.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-header/morgue-header.scss mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-header/morgue-illustration.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-left-panel/morgue-left-panel-link.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-metrics/morgue-card.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-metrics/morgue-card.scss mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-metrics/morgue-header.scss mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-metrics/morgue-metrics-header.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-metrics/morgue-metrics.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-metrics/morgue-metrics.scss mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-tables/morgue-admission.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-tables/morgue-admitted.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-tables/morgue-discharged.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-tabs/morgue-tabs-component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/morgue-tabs/morgue-tabs.scss mode change 100644 => 100755 packages/esm-morgue-app/src/root.component.tsx mode change 100644 => 100755 packages/esm-morgue-app/src/root.scss mode change 100644 => 100755 packages/esm-morgue-app/src/routes.json mode change 100644 => 100755 packages/esm-morgue-app/src/setup-tests.ts mode change 100644 => 100755 packages/esm-morgue-app/translations/en.json mode change 100644 => 100755 packages/esm-morgue-app/tsconfig.json mode change 100644 => 100755 packages/esm-morgue-app/webpack.config.js mode change 100644 => 100755 packages/esm-otz-app/jest.config.js mode change 100644 => 100755 packages/esm-otz-app/package.json mode change 100644 => 100755 packages/esm-otz-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-otz-app/src/dashboard.meta.tsx mode change 100644 => 100755 packages/esm-otz-app/src/dashboard.scss mode change 100644 => 100755 packages/esm-otz-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-otz-app/src/header/otz-header.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/header/otz-header.scss mode change 100644 => 100755 packages/esm-otz-app/src/header/otz-illustration.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/index.ts mode change 100644 => 100755 packages/esm-otz-app/src/left-panel-link.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/otz.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/otz.scss mode change 100644 => 100755 packages/esm-otz-app/src/root.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/root.scss mode change 100644 => 100755 packages/esm-otz-app/src/routes.json mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/common.scss mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/otz-program-services/common.scss mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/otz-program-services/otz-enrolment.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/otz-program-services/otz-program-services.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/otz-program-services/otz-program.scss mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/empty-state/empty-data-illustration.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/empty-state/empty-state.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/empty-state/empty-state.scss mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/otz-patient-list-tables/eligible-for-vl-testing.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/otz-patient-list-tables/eligible-not-enrolled.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/otz-patient-list-tables/missed-appointments.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/otz-patient-list-tables/total-active.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/otz-patient-list-tables/total-enrolled.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/otz-patient-list-tabs.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-list-tabs/otz-patient-list-tabs.scss mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-summary/otz-patientsummary.scss mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/patient-summary/patient-summary.component.tsx mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/summary-tiles/otz-summary-tile.scss mode change 100644 => 100755 packages/esm-otz-app/src/views/dashboard/summary-tiles/otz-summary-tiles.component.tsx mode change 100644 => 100755 packages/esm-otz-app/translations/en.json mode change 100644 => 100755 packages/esm-otz-app/tsconfig.json mode change 100644 => 100755 packages/esm-otz-app/webpack.config.js mode change 100644 => 100755 packages/esm-patient-clinical-view-app/jest.config.js mode change 100644 => 100755 packages/esm-patient-clinical-view-app/package.json mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/header/case-management-header.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/header/case-management-header.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/header/case-management-illustration.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/metrics/case-management-header.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/metrics/case-management-header.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/table/case-management-list-active-component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/table/case-management-list-inactive-component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/table/case-management-list.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/tabs/case-management-tabs.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/tabs/case-management-tabs.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/workspace/case-management-concept-map.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/workspace/case-management.resource.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/workspace/case-management.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/workspace/case-management.workspace.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/workspace/patient-info.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/workspace/patient-info.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/case-management/wrap/wrap.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/clinical-enc.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/clinical-encounter-dashboard-meta.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/dashboard/clinical-encounter-dashboard.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/dashboard/in-patient.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/summary/in-patient-medical-summary/in-patient-medical-summary.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/summary/maternal-summary/maternal-summary.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/summary/neonatal summary/neonatal-summary.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/summary/out-patient-summary/out-patient-summary.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/summary/out-patient-summary/patient-medical-history.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/summary/out-patient-summary/patient-social-history.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/summary/summary-card.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/summary/summary-card.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-encounter/summary/surgical summary/surgical-summary.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-view-group/clinical-view-section.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-view-group/clinical-view-section.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-view-group/createDashboardGroup.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-view-group/dashboard-group.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/clinical-view-group/dashboard-group.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/contact-list/birthdate-calculator.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/contact-list/contact-actions.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/contact-list/contact-list-concept-map.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/contact-list/contact-list-form.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/contact-list/contact-list.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/contact-list/contact-list.resource.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/contact-list/contact-list.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/contact-list/contact-list.workspace.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/contact-list/hiv-status.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/dashboard.meta.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/family-partner-history/concept-obs.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/family-partner-history/family-history.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/family-partner-history/family-history.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/family-partner-history/family-partner-dashboard.meta.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/family-partner-history/relationships.resource.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/hooks/useClinicalEncounter.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/hooks/useContacts.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/hooks/useEncounterRows.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/hooks/useNeonatalSummary.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/hooks/usePartograph.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/hooks/usePatientTracing.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/hooks/useRelationshipTypes.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/hooks/useRelativeHTSEncounter.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/hooks/useRelativeHivEnrollment.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/index.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/left-panel-link.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/antenatal-care.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/concept-maps/antenatal-care-concepts-map.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/concept-maps/labour-and-delivery-care-concepts-map.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/concept-maps/postnatal-care-concepts-map.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/concepts/mch-concepts.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/labour-delivery.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/maternal-health-component.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/mch-dashboard.meta.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/partography/labour-delivery.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/partography/partograph-chart.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/partography/partograph-chart.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/partography/partograph.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/maternal-and-child-health/postnatal-care.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/root.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/root.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/routes.json mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/generic-nav-links/encounter-observations/encounter-observations.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/generic-nav-links/encounter-observations/styles.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/generic-nav-links/generic-dashboard.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/generic-nav-links/generic-nav-links.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/generic-nav-links/useEncounters.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/defaulter-tracing/defaulter-tracing.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/hiv-care-and-treatment-dashboard.meta.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/constants.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/hiv-testing-component.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/mch-clinical-view.meta.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/views/hiv-testing/hiv-screening-constants.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/views/hiv-testing/hiv-testing-constants.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/views/hiv-testing/hiv-testing-services.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/views/hiv-testing/tabs/hiv-screening.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/views/hiv-testing/tabs/hiv-testing.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/specialized-clinics/special-clinic-dashboard.meta.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/types/index.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/ui/data-table/o-table.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/ui/data-table/o-table.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/ui/encounter-list/encounter-list-utils.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/ui/encounter-list/encounter-list.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/ui/encounter-list/encounter-list.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/ui/encounter-list/encounter.resource.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/ui/encounter-observation/encounter-observation-component.scss mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/ui/encounter-observation/encounter-observation.component.tsx mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/utils/constants.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/src/utils/expression-helper.ts mode change 100644 => 100755 packages/esm-patient-clinical-view-app/translations/en.json mode change 100644 => 100755 packages/esm-patient-clinical-view-app/translations/es.json mode change 100644 => 100755 packages/esm-patient-clinical-view-app/translations/fr.json mode change 100644 => 100755 packages/esm-patient-clinical-view-app/translations/km.json mode change 100644 => 100755 packages/esm-patient-clinical-view-app/tsconfig.json mode change 100644 => 100755 packages/esm-patient-clinical-view-app/webpack.config.js mode change 100644 => 100755 packages/esm-patient-flags-app/jest.config.js mode change 100644 => 100755 packages/esm-patient-flags-app/package.json mode change 100644 => 100755 packages/esm-patient-flags-app/src/amrs-link/amrs-chart-link.component.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/amrs-link/amrs-link.component.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-patient-flags-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-patient-flags-app/src/hooks/usePatientFlags.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/hooks/usePatientId.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/index.ts mode change 100644 => 100755 packages/esm-patient-flags-app/src/navbar/nav-utils.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/navbar/navbar-action-button.component.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/navbar/navbar-action-button.scss mode change 100644 => 100755 packages/esm-patient-flags-app/src/navbar/navbar-link.component.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/navbar/navbar-link.scss mode change 100644 => 100755 packages/esm-patient-flags-app/src/navbar/navbar-overlay.component.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/patient-flags/patient-flags.component.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/patient-flags/patient-flags.scss mode change 100644 => 100755 packages/esm-patient-flags-app/src/patient-flags/patient-flags.test.tsx mode change 100644 => 100755 packages/esm-patient-flags-app/src/routes.json mode change 100644 => 100755 packages/esm-patient-flags-app/src/types/index.ts mode change 100644 => 100755 packages/esm-patient-flags-app/translations/en.json mode change 100644 => 100755 packages/esm-patient-flags-app/translations/es.json mode change 100644 => 100755 packages/esm-patient-flags-app/translations/fr.json mode change 100644 => 100755 packages/esm-patient-flags-app/translations/km.json mode change 100644 => 100755 packages/esm-patient-flags-app/tsconfig.json mode change 100644 => 100755 packages/esm-patient-flags-app/webpack.config.js mode change 100644 => 100755 packages/esm-patient-registration-app/README.md mode change 100644 => 100755 packages/esm-patient-registration-app/docs/images/patient-registration-hierarchy.png mode change 100644 => 100755 packages/esm-patient-registration-app/jest.config.js mode change 100644 => 100755 packages/esm-patient-registration-app/package.json mode change 100644 => 100755 packages/esm-patient-registration-app/src/add-patient-link.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/add-patient-link.test.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/add-patient-link.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/constants.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/index.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/nav-link.test.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/nav-link.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/offline.resources.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/offline.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-photo.extension.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/before-save-prompt.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/date-util.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/__mocks__/field.resource.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/address/address-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/address/address-hierarchy-levels.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/address/address-hierarchy.resource.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/address/address-search.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/address/address-search.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/address/custom-address-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/custom-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/field.resource.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/field.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.test.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/id/id-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/id/identifier-selection-overlay.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/id/identifier-selection.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/name/name-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.test.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/custom-person-attribute-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/person-attribute-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/person-attributes.resource.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/text-person-attribute-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/field/phone/phone-field.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/form-manager.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/basic-input/input/input.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/basic-input/input/input.test.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/basic-input/select/select-input.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/combo-input/combo-input.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/combo-input/selection-tick.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/custom-input/autosuggest/autosuggest.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/custom-input/autosuggest/autosuggest.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/custom-input/identifier/identifier-input.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/custom-input/identifier/utils.testt.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/custom-input/identifier/utils.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/dummy-data/dummy-data-input.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/dummy-data/dummy-data-input.test.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/input/input.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/patient-registration-context.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/patient-registration-hooks.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/patient-registration-utils.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/patient-registration.resource.testt.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/patient-registration.resource.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/patient-registration.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/patient-registration.types.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/section/death-info/death-info-section.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/section/demographics/demographics-section.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/section/generic-section.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/section/patient-relationships/relationships-section.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/section/patient-relationships/relationships.resource.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/section/patient-relationships/relationships.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/section/section-wrapper.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/section/section.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/section/section.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/ui-components/overlay/overlay.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/ui-components/overlay/overlay.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/validation/patient-registration-validation.test.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-registration/validation/patient-registration-validation.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification-HIE/assets/counties.json mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification-HIE/assets/verification-assets.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification-HIE/patient-verification-hook.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification-HIE/patient-verification-utils.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification-HIE/patient-verification.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification-HIE/patient-verification.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification-HIE/verification-modal/confirm-prompt.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification-HIE/verification-modal/empty-prompt.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification-HIE/verification-types.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification/assets/counties.json mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification/assets/verification-assets.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification/patient-verification-hook.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification/patient-verification-utils.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification/patient-verification.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification/patient-verification.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification/verification-modal/confirm-prompt.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification/verification-modal/empty-prompt.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/patient-verification/verification-types.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/resource.ts mode change 100644 => 100755 packages/esm-patient-registration-app/src/root.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/root.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/routes.json mode change 100644 => 100755 packages/esm-patient-registration-app/src/widgets/cancel-patient-edit.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation-modal.testt.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation-modal.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/widgets/delete-identifier-modal.scss mode change 100644 => 100755 packages/esm-patient-registration-app/src/widgets/edit-patient-details-button.component.tsx mode change 100644 => 100755 packages/esm-patient-registration-app/src/widgets/edit-patient-details-button.scss mode change 100644 => 100755 packages/esm-patient-registration-app/translations/am.json mode change 100644 => 100755 packages/esm-patient-registration-app/translations/ar.json mode change 100644 => 100755 packages/esm-patient-registration-app/translations/en.json mode change 100644 => 100755 packages/esm-patient-registration-app/translations/es.json mode change 100644 => 100755 packages/esm-patient-registration-app/translations/fr.json mode change 100644 => 100755 packages/esm-patient-registration-app/translations/he.json mode change 100644 => 100755 packages/esm-patient-registration-app/translations/km.json mode change 100644 => 100755 packages/esm-patient-registration-app/translations/zh.json mode change 100644 => 100755 packages/esm-patient-registration-app/translations/zh_CN.json mode change 100644 => 100755 packages/esm-patient-registration-app/tsconfig.json mode change 100644 => 100755 packages/esm-patient-registration-app/webpack.config.js mode change 100644 => 100755 packages/esm-preappointment-app/jest.config.js mode change 100644 => 100755 packages/esm-preappointment-app/package.json mode change 100644 => 100755 packages/esm-preappointment-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-preappointment-app/src/custom-pagination.component.tsx mode change 100644 => 100755 packages/esm-preappointment-app/src/custom-pagination.scss mode change 100644 => 100755 packages/esm-preappointment-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-preappointment-app/src/index.ts mode change 100644 => 100755 packages/esm-preappointment-app/src/pre-appointments/pre-appointment.component.tsx mode change 100644 => 100755 packages/esm-preappointment-app/src/pre-appointments/pre-appointment.resource.tsx mode change 100644 => 100755 packages/esm-preappointment-app/src/pre-appointments/pre-appointment.scss mode change 100644 => 100755 packages/esm-preappointment-app/src/root.component.tsx mode change 100644 => 100755 packages/esm-preappointment-app/src/root.scss mode change 100644 => 100755 packages/esm-preappointment-app/src/routes.json mode change 100644 => 100755 packages/esm-preappointment-app/src/types/index.ts mode change 100644 => 100755 packages/esm-preappointment-app/src/use-pagination-info.component.ts mode change 100644 => 100755 packages/esm-preappointment-app/translations/en.json mode change 100644 => 100755 packages/esm-preappointment-app/tsconfig.json mode change 100644 => 100755 packages/esm-preappointment-app/webpack.config.js mode change 100644 => 100755 packages/esm-providers-app/jest.config.js mode change 100644 => 100755 packages/esm-providers-app/package.json mode change 100644 => 100755 packages/esm-providers-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-providers-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-providers-app/src/index.ts mode change 100644 => 100755 packages/esm-providers-app/src/providers-component/providers.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-header/providers-header.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-header/providers-header.scss mode change 100644 => 100755 packages/esm-providers-app/src/providers-header/providers-illustration.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-left-panel/providers-left-panel-link.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-metrics/providers-card.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-metrics/providers-card.scss mode change 100644 => 100755 packages/esm-providers-app/src/providers-metrics/providers-header.scss mode change 100644 => 100755 packages/esm-providers-app/src/providers-metrics/providers-metrics-header.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-metrics/providers-metrics.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-metrics/providers-metrics.scss mode change 100644 => 100755 packages/esm-providers-app/src/providers-tables/providers-active.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-tables/providers-admission.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-tables/providers-admitted.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-tables/providers-discharged.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-tabs/providers-tabs-component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/providers-tabs/providers-tabs.scss mode change 100644 => 100755 packages/esm-providers-app/src/root.component.tsx mode change 100644 => 100755 packages/esm-providers-app/src/root.scss mode change 100644 => 100755 packages/esm-providers-app/src/routes.json mode change 100644 => 100755 packages/esm-providers-app/src/setup-tests.ts mode change 100644 => 100755 packages/esm-providers-app/translations/en.json mode change 100644 => 100755 packages/esm-providers-app/tsconfig.json mode change 100644 => 100755 packages/esm-providers-app/webpack.config.js mode change 100644 => 100755 packages/esm-report-app/src/api/api.ts mode change 100644 => 100755 packages/esm-report-app/src/headers/report-header-component.tsx mode change 100644 => 100755 packages/esm-report-app/src/headers/report-header.scss mode change 100644 => 100755 packages/esm-report-app/src/headers/report-illustration-component.tsx mode change 100644 => 100755 packages/esm-report-app/src/hooks/useSelectedLocations.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/CARE_AND_TREATMENT/Care_and_Treatment.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/CARE_AND_TREATMENT/Care_and_Treatment.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/Jua_Mtoto_Wako/Jua_Mtoto_Wako.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/Jua_Mtoto_Wako/Jua_Mtoto_Wako.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-267/prep-activity-register.component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-267/prep.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-362/MOH-362.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-362/moh-362a/MOH_362A_component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-362/moh-362b/MOH_362B_component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-405/MOH-405.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-405/MOH_405_component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-406/MOH_406.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-406/MOH_406_component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-407/clientFollowUp/ClientFollowUp_component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-407/nutrition.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-407/nutrition/Nutrition_component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-408/MOH-408-component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-408/MOH-408.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-731/MOH_731.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-731/MOH_731.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-731/PartOne.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-731/PartThree.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH-731/PartTwo.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH_333_MATERNITY/MOH_333.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH_333_MATERNITY/MOH_333_component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH_Defaulter_Tracing/Defaulter_Tracing_Register.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/MOH_Defaulter_Tracing/Defaulter_tracing_register.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/OTZ/MOH_otz.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/OTZ/MOH_otz_component.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/Project_Beyond/PBC/Project_Beyond_Clients.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/Project_Beyond/PBC/Project_Beyond_Clients.tsx mode change 100644 => 100755 packages/esm-report-app/src/registers/Project_Beyond/PBD/Project_Beyond_Deliveries.scss mode change 100644 => 100755 packages/esm-report-app/src/registers/Project_Beyond/PBD/Project_Beyond_Deliveries.tsx mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/breadcrumb/bread-crumb.scss mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/breadcrumb/bread-crumb.tsx mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/report-dashboard-component.tsx mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/report-loader/dynamic-report-loader-component.tsx mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/report-loader/dynamic-report-loader.scss mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/report-loader/reportMapping.json mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/report-summary/ReportSummary.css mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/report-summary/ReportSummary.tsx mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/report-tab/report-tabs.scss mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/report-tab/report-tabs.tsx mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/report-table/report-table-component.tsx mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/tab-panel/tab-panel-component.tsx mode change 100644 => 100755 packages/esm-report-app/src/reports-dashboard/tab-panel/tab-panel.scss mode change 100644 => 100755 packages/esm-version-app/increment-version.js mode change 100644 => 100755 packages/esm-version-app/jest.config.js mode change 100644 => 100755 packages/esm-version-app/package.json mode change 100644 => 100755 packages/esm-version-app/src/about-link.component.tsx mode change 100644 => 100755 packages/esm-version-app/src/about/about.component.tsx mode change 100644 => 100755 packages/esm-version-app/src/about/about.scss mode change 100644 => 100755 packages/esm-version-app/src/config-schema.ts mode change 100644 => 100755 packages/esm-version-app/src/declarations.d.ts mode change 100644 => 100755 packages/esm-version-app/src/frontend-modules/frontend-modules.component.tsx mode change 100644 => 100755 packages/esm-version-app/src/hooks/useFrontendModules.tsx mode change 100644 => 100755 packages/esm-version-app/src/hooks/useModules.tsx mode change 100644 => 100755 packages/esm-version-app/src/hooks/useSystemSetting.tsx mode change 100644 => 100755 packages/esm-version-app/src/index.ts mode change 100644 => 100755 packages/esm-version-app/src/release-version.js mode change 100644 => 100755 packages/esm-version-app/src/root.component.tsx mode change 100644 => 100755 packages/esm-version-app/src/root.scss mode change 100644 => 100755 packages/esm-version-app/src/routes.json mode change 100644 => 100755 packages/esm-version-app/src/types/index.ts mode change 100644 => 100755 packages/esm-version-app/src/version.js mode change 100644 => 100755 packages/esm-version-app/translations/en.json mode change 100644 => 100755 packages/esm-version-app/tsconfig.json mode change 100644 => 100755 packages/esm-version-app/webpack.config.js mode change 100644 => 100755 playwright.config.ts mode change 100644 => 100755 prettier.config.js mode change 100644 => 100755 react-i18next.js mode change 100644 => 100755 tools/i18next-parser.config.js mode change 100644 => 100755 tools/index.ts mode change 100644 => 100755 tools/setup-tests.ts mode change 100644 => 100755 tools/test-utils.tsx mode change 100644 => 100755 tsconfig.json mode change 100644 => 100755 turbo.json mode change 100644 => 100755 yarn.lock diff --git a/.DS_Store b/.DS_Store old mode 100644 new mode 100755 index 381f991bd2106ce73f6634753358f6fbc6dacfd8..a821b6129e0e94e2b6ee75a7df0c232271fbc912 GIT binary patch delta 67 zcmZoMXfc@J&&aniU^g=(-(((^$qIQ4`3xxxsSNQ9xnNc)Lk^HvoKl>ela!yI!#H^s TOA908W_i}bOq = ({ patientUuid }) => { const { t } = useTranslation(); const { bills, isLoading, error } = useBills(patientUuid); + const launchPatientWorkspace = useLaunchWorkspaceRequiringVisit('billing-form'); const layout = useLayoutType(); const [pageSize, setPageSize] = React.useState(10); const responsiveSize = isDesktop(layout) ? 'sm' : 'lg'; const { paginated, goTo, results, currentPage } = usePagination(bills, pageSize); const { pageSizes } = usePaginationInfo(pageSize, bills?.length, currentPage, results?.length); + const handleLaunchBillForm = () => { + launchPatientWorkspace({ workspaceTitle: t('billingForm', 'Billing Form') }); + }; + const headerData = [ { header: t('visitTime', 'Visit time'), @@ -58,7 +69,7 @@ const BillHistory: React.FC = ({ patientUuid }) => { ]; const setBilledItems = (bill) => - bill.lineItems.reduce( + bill.lineItems?.reduce( (acc, item) => acc + (acc ? ' & ' : '') + (item.billableService?.split(':')[1] || item.item?.split(':')[1] || ''), '', ); @@ -102,7 +113,7 @@ const BillHistory: React.FC = ({ patientUuid }) => {

There are no bills to display.

- @@ -114,10 +125,7 @@ const BillHistory: React.FC = ({ patientUuid }) => { return (
- diff --git a/packages/esm-billing-app/src/bill-history/bill-history.scss b/packages/esm-billing-app/src/bill-history/bill-history.scss old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services-admin-card-link.component.tsx b/packages/esm-billing-app/src/billable-services-admin-card-link.component.tsx old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services/bill-waiver/bill-selection.component.tsx b/packages/esm-billing-app/src/billable-services/bill-waiver/bill-selection.component.tsx old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver-form.component.tsx b/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver-form.component.tsx old mode 100644 new mode 100755 index 0ca92071..5c0dd522 --- a/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver-form.component.tsx +++ b/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver-form.component.tsx @@ -4,7 +4,7 @@ import { TaskAdd } from '@carbon/react/icons'; import { useTranslation } from 'react-i18next'; import styles from './bill-waiver-form.scss'; import { type LineItem, type MappedBill } from '../../types'; -import { createBillWaiverPayload } from './utils'; +import { createBillWaiverPayload, extractErrorMessagesFromResponse } from '../../utils'; import { convertToCurrency, extractString } from '../../helpers'; import { processBillPayment, usePaymentModes } from '../../billing.resource'; import { showSnackbar } from '@openmrs/esm-framework'; @@ -48,7 +48,7 @@ const BillWaiverForm: React.FC = ({ bill, lineItems, setPat showSnackbar({ title: t('billWaiver', 'Bill waiver'), subtitle: t('billWaiverError', 'Bill waiver failed {{error}}', { - error: error?.responseBody?.error?.message ?? error.message, + error: extractErrorMessagesFromResponse(error?.responseBody), }), kind: 'error', timeoutInMs: 3500, diff --git a/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver-form.scss b/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver-form.scss old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver.component.tsx b/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver.component.tsx old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver.scss b/packages/esm-billing-app/src/billable-services/bill-waiver/bill-waiver.scss old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services/bill-waiver/patient-bills.component.tsx b/packages/esm-billing-app/src/billable-services/bill-waiver/patient-bills.component.tsx old mode 100644 new mode 100755 index b459e1e1..93070d0e --- a/packages/esm-billing-app/src/billable-services/bill-waiver/patient-bills.component.tsx +++ b/packages/esm-billing-app/src/billable-services/bill-waiver/patient-bills.component.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { useBills } from '../../billing.resource'; import { Layer, DataTable, @@ -57,7 +56,7 @@ const PatientBills: React.FC = ({ patientUuid, bills, setPati
-

{t('noBilltoDisplay', 'There are no bills to display for this patient')}

+

{t('noBillDisplay', 'There are no bills to display for this patient')}

diff --git a/packages/esm-billing-app/src/billable-services/bill-waiver/utils.ts b/packages/esm-billing-app/src/billable-services/bill-waiver/utils.ts deleted file mode 100644 index f850b352..00000000 --- a/packages/esm-billing-app/src/billable-services/bill-waiver/utils.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { type OpenmrsResource } from '@openmrs/esm-framework'; -import { type LineItem, type MappedBill } from '../../types'; - -export const createBillWaiverPayload = ( - bill: MappedBill, - amountWaived: number, - totalAmount: number, - lineItems: Array, - paymentModes: Array, -) => { - const { cashier } = bill; - - const billPayment = { - amount: parseFloat(totalAmount.toFixed(2)), - amountTendered: parseFloat(Number(amountWaived).toFixed(2)), - attributes: [], - instanceType: paymentModes?.find((mode) => mode.name.toLowerCase().includes('waiver'))?.uuid, - }; - - const processedLineItems = lineItems.map((lineItem) => ({ - ...lineItem, - billableService: processBillItem(lineItem), - item: processBillItem(lineItem), - paymentStatus: 'PAID', - })); - - const processedPayment = { - cashPoint: bill.cashPointUuid, - cashier: cashier.uuid, - lineItems: processedLineItems, - payments: [...bill.payments, billPayment], - patient: bill.patientUuid, - }; - - return processedPayment; -}; - -const processBillItem = (item) => (item.item || item.billableService)?.split(':')[0]; diff --git a/packages/esm-billing-app/src/billable-services/billable-service.resource.tsx b/packages/esm-billing-app/src/billable-services/billable-service.resource.tsx old mode 100644 new mode 100755 index d0296721..c19a27fd --- a/packages/esm-billing-app/src/billable-services/billable-service.resource.tsx +++ b/packages/esm-billing-app/src/billable-services/billable-service.resource.tsx @@ -6,6 +6,10 @@ type ResponseObject = { results: Array; }; +type ServiceTypesResponse = { + setMembers: { uuid: string; display: string }[]; +}; + export const useBillableServices = () => { const url = `/ws/rest/v1/cashier/billableService?v=custom:(uuid,name,shortName,serviceStatus,serviceType:(display),servicePrices:(uuid,name,price))`; const { data, isLoading, isValidating, error, mutate } = useSWR<{ data: ResponseObject }>(url, openmrsFetch, {}); @@ -13,8 +17,8 @@ export const useBillableServices = () => { }; export function useServiceTypes() { - const url = `/ws/rest/v1/concept/d7bd4cc0-90b1-4f22-90f2-ab7fde936727?v=custom:(setMembers:(uuid,display))`; - const { data, error, isLoading } = useSWR<{ data: any }>(url, openmrsFetch, {}); + const url = `/ws/rest/v1/concept/d2ece9e9-3907-440d-b5c3-5d3b148594f5?v=custom:(setMembers:(uuid,display))`; + const { data, error, isLoading } = useSWR<{ data: ServiceTypesResponse }>(url, openmrsFetch, {}); return { serviceTypes: data?.data.setMembers ?? [], error, isLoading }; } diff --git a/packages/esm-billing-app/src/billable-services/billable-services-home.component.tsx b/packages/esm-billing-app/src/billable-services/billable-services-home.component.tsx old mode 100644 new mode 100755 index af50fe2a..ee6c8856 --- a/packages/esm-billing-app/src/billable-services/billable-services-home.component.tsx +++ b/packages/esm-billing-app/src/billable-services/billable-services-home.component.tsx @@ -9,6 +9,8 @@ import BillingHeader from '../billing-header/billing-header.component'; import { Wallet, Money } from '@carbon/react/icons'; import { UserHasAccess, navigate } from '@openmrs/esm-framework'; import BillWaiver from './bill-waiver/bill-waiver.component'; +import BillingTariffs from './billing-tariffs/billing-tariffs.component'; +import AddTariffsService from './billing-tariffs/add-billings-tariffs-service.component'; const basePath = `${window.spaBase}/billable-services`; const BillableServiceHome: React.FC = () => { const { t } = useTranslation(); @@ -28,7 +30,12 @@ const BillableServiceHome: React.FC = () => { handleNavigation('waive-bill')} renderIcon={Money}> - {t('billWaiver', 'Bill waiver')} + {t('billWaiver', 'Bill Waiver')} + + + + handleNavigation('bill-tariffs')} renderIcon={Money}> + {t('billTariffs', 'Insurance Tariffs')} @@ -40,6 +47,8 @@ const BillableServiceHome: React.FC = () => { } /> } /> } /> + } /> + } /> diff --git a/packages/esm-billing-app/src/billable-services/billable-services.component.tsx b/packages/esm-billing-app/src/billable-services/billable-services.component.tsx old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services/billable-services.scss b/packages/esm-billing-app/src/billable-services/billable-services.scss old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/drug-order.component.tsx b/packages/esm-billing-app/src/billable-services/billiable-item/drug-order/drug-order.component.tsx old mode 100644 new mode 100755 similarity index 65% rename from packages/esm-billing-app/src/billable-services/billiable-item/drug-order.component.tsx rename to packages/esm-billing-app/src/billable-services/billiable-item/drug-order/drug-order.component.tsx index c4f2160a..66cd0c63 --- a/packages/esm-billing-app/src/billable-services/billiable-item/drug-order.component.tsx +++ b/packages/esm-billing-app/src/billable-services/billiable-item/drug-order/drug-order.component.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { type Drug } from '@openmrs/esm-patient-common-lib'; -import { type DosingUnit, type MedicationFrequency, type MedicationRoute, type QuantityUnit } from '../../types'; -import { useBillableItem, useSockItemInventory } from './useBilliableItem'; +import { type DosingUnit, type MedicationFrequency, type MedicationRoute, type QuantityUnit } from '../../../types'; +import { useBillableItem, useSockItemInventory } from '../useBillableItem'; import { useTranslation } from 'react-i18next'; import styles from './drug-order.scss'; -import { convertToCurrency } from '../../helpers'; +import { convertToCurrency } from '../../../helpers'; type DrugOrderProps = { order: { @@ -25,21 +25,29 @@ const DrugOrder: React.FC = ({ order }) => { const { t } = useTranslation(); const { stockItem, isLoading: isLoadingInventory } = useSockItemInventory(order?.drug?.uuid); const { billableItem, isLoading } = useBillableItem(order?.drug.concept.uuid); - if (isLoading || isLoadingInventory) { return null; } return (
- {stockItem && ( -
- - {t('inStock', '{{quantityUoM}}(s) In stock ', { quantityUoM: stockItem?.quantityUoM })} - - {Math.round(stockItem?.quantity)} -
+ {stockItem && stockItem.length > 0 ? ( + <> +
{'In Stock'}
+ {stockItem.map((item, index) => ( +
+ {item.partyName} + + {' '} + {Math.round(item.quantity)} {item.quantityUoM}(s){' '} + +
+ ))} + + ) : ( +
{'Drug Is Not Available / Out of Stock'}
)} +
{billableItem && billableItem?.servicePrices.map((item) => ( diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/drug-order.scss b/packages/esm-billing-app/src/billable-services/billiable-item/drug-order/drug-order.scss old mode 100644 new mode 100755 similarity index 89% rename from packages/esm-billing-app/src/billable-services/billiable-item/drug-order.scss rename to packages/esm-billing-app/src/billable-services/billiable-item/drug-order/drug-order.scss index f40a9fd7..d969ad7e --- a/packages/esm-billing-app/src/billable-services/billiable-item/drug-order.scss +++ b/packages/esm-billing-app/src/billable-services/billiable-item/drug-order/drug-order.scss @@ -24,3 +24,8 @@ grid-template-columns: 1fr 1fr; padding-left: spacing.$spacing-03; } + +.red { + color: red; + font-weight: normal; +} diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/lab-order.component.tsx b/packages/esm-billing-app/src/billable-services/billiable-item/lab-order.component.tsx deleted file mode 100644 index 58a93b5f..00000000 --- a/packages/esm-billing-app/src/billable-services/billiable-item/lab-order.component.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; -import { convertToCurrency } from '../../helpers'; -import { useBillableItem } from './useBilliableItem'; - -type LabOrderProps = { - order: { - testType?: { - label: string; - conceptUuid: string; - }; - }; -}; - -const LabOrder: React.FC = ({ order }) => { - // TODO: Implement logic to display whether the lab order service is available to ensure clinicians can order the service - - const { billableItem, error, isLoading } = useBillableItem(order?.testType?.conceptUuid); - - const billItems = billableItem?.servicePrices - .map((servicePrice) => `${servicePrice?.paymentMode?.name} - ${convertToCurrency(servicePrice?.price)}`) - .join(' '); - - if (isLoading) { - return null; - } - - if (error) { - return null; - } - - return

{billItems}

; -}; - -export default LabOrder; diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/test-order/imaging-order.component.tsx b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/imaging-order.component.tsx new file mode 100755 index 00000000..1cb55343 --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/imaging-order.component.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import { useBillableItem } from '../useBillableItem'; +import { useTranslation } from 'react-i18next'; +import { InlineLoading } from '@carbon/react'; +import PriceInfoOrder from './price-info-order.componet'; + +type ImagingOrderProps = { + order: { + testType?: { + label: string; + conceptUuid: string; + }; + }; +}; + +const ImagingOrder: React.FC = ({ order }) => { + const { t } = useTranslation(); + const { billableItem, isLoading, error } = useBillableItem(order?.testType?.conceptUuid); + + if (isLoading) { + return ( + + ); + } + + return ; +}; + +export default ImagingOrder; diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/test-order/lab-order.component.tsx b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/lab-order.component.tsx new file mode 100755 index 00000000..4a0003b2 --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/lab-order.component.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import { useBillableItem } from '../useBillableItem'; +import { useTranslation } from 'react-i18next'; +import { InlineLoading } from '@carbon/react'; +import PriceInfoOrder from './price-info-order.componet'; + +type LabOrderProps = { + order: { + testType?: { + label: string; + conceptUuid: string; + }; + }; +}; + +const LabOrder: React.FC = ({ order }) => { + const { t } = useTranslation(); + const { billableItem, isLoading, error } = useBillableItem(order?.testType?.conceptUuid); + + if (isLoading) { + return ( + + ); + } + + return ; +}; + +export default LabOrder; diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/test-order/price-info-order.componet.tsx b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/price-info-order.componet.tsx new file mode 100755 index 00000000..658cc991 --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/price-info-order.componet.tsx @@ -0,0 +1,62 @@ +import React from 'react'; +import { convertToCurrency } from '../../../helpers'; +import { useTranslation } from 'react-i18next'; +import styles from './price-info-order.scss'; +import { + StructuredListWrapper, + StructuredListHead, + StructuredListRow, + StructuredListCell, + StructuredListBody, + Tile, + InlineNotification, +} from '@carbon/react'; + +type PriceInfoOrderProps = { + billableItem: any; + error?: boolean; +}; + +const PriceInfoOrder: React.FC = ({ billableItem, error }) => { + const { t } = useTranslation(); + + if (error || !billableItem) { + return ( + + ); + } + + return ( + +
+ + + + + {t('paymentMethods', 'Payment methods')} + + + {t('prices', 'Prices(Ksh)')} + + + + + {billableItem.servicePrices.map((priceItem) => ( + + {priceItem.paymentMode.name} + {convertToCurrency(priceItem.price)} + + ))} + + +
+
+ ); +}; + +export default PriceInfoOrder; diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/test-order/price-info-order.scss b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/price-info-order.scss new file mode 100755 index 00000000..00a745b4 --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/price-info-order.scss @@ -0,0 +1,20 @@ +@use '@carbon/styles/scss/type'; +@use '@carbon/styles/scss/spacing'; +@use '@carbon/layout'; +@use '@carbon/colors'; + +.prices { + justify-content: center; + align-items: center; + margin: layout.$spacing-03; +} + +.listContainer { + display: flex; + flex-direction: column; + align-items: center; +} + +.cell { + padding: spacing.$spacing-05; +} diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/test-order/procedure-order.component.tsx b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/procedure-order.component.tsx new file mode 100755 index 00000000..92291e00 --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/procedure-order.component.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import { useBillableItem } from '../useBillableItem'; +import { useTranslation } from 'react-i18next'; +import { InlineLoading } from '@carbon/react'; +import PriceInfoOrder from './price-info-order.componet'; + +type ProcedureOrderProps = { + order: { + testType?: { + label: string; + conceptUuid: string; + }; + }; +}; + +const ProcedureOrder: React.FC = ({ order }) => { + const { t } = useTranslation(); + const { billableItem, isLoading, error } = useBillableItem(order?.testType?.conceptUuid); + + if (isLoading) { + return ( + + ); + } + + return ; +}; + +export default ProcedureOrder; diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/test-order/test-order-action.component.tsx b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/test-order-action.component.tsx new file mode 100755 index 00000000..1e8b4ee0 --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/test-order-action.component.tsx @@ -0,0 +1,50 @@ +import { OverflowMenuItem } from '@carbon/react'; +import { type Order } from '@openmrs/esm-patient-common-lib'; +import React, { useCallback } from 'react'; +import { useTranslation } from 'react-i18next'; +import { useTestOrderBillStatus } from './test-order-action.resource'; +import { showModal } from '@openmrs/esm-framework'; + +type TestOrderProps = { order: Order }; + +enum FulfillerStatus { + IN_PROGRESS = 'IN_PROGRESS', +} + +const TestOrderAction: React.FC = ({ order }) => { + const { t } = useTranslation(); + const { isLoading, hasPendingPayment } = useTestOrderBillStatus(order.uuid, order.patient.uuid); + + const launchModal = useCallback(() => { + const dispose = showModal('pickup-lab-request-modal', { + closeModal: () => dispose(), + order, + }); + }, [order]); + + // Show the test order if the following conditions are met: + // 1. The current visit is in-patient + // 2. The test order has been paid in full + // 3. The patient is an emergency patient + + // If the order is in progress, do not show the action + if (order.fulfillerStatus === FulfillerStatus.IN_PROGRESS) { + return null; + } + + if (isLoading) { + return ; + } + + return ( + + ); +}; + +export default TestOrderAction; diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/test-order/test-order-action.resource.tsx b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/test-order-action.resource.tsx new file mode 100755 index 00000000..7a23f550 --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billiable-item/test-order/test-order-action.resource.tsx @@ -0,0 +1,54 @@ +import { openmrsFetch, restBaseUrl, useConfig, useVisit } from '@openmrs/esm-framework'; +import useSWR from 'swr'; +import { type LineItem, type QueueEntry } from '../../../types'; +import { type BillingConfig } from '../../../config-schema'; + +export const useTestOrderBillStatus = (orderUuid: string, patientUuid: string) => { + const config = useConfig(); + const { currentVisit } = useVisit(patientUuid); + const { isEmergencyPatient, isLoading: isLoadingQueue } = usePatientQueue(patientUuid); + const { isLoading: isLoadingBill, hasPendingPayment } = usePatientBill(orderUuid); + + if (isLoadingQueue || isLoadingBill) { + return { hasPendingPayment: false, isLoading: true }; + } + + // If current visit type is inpatient or the patient is in the emergency queue, we should allow the patient to receive services without paying the bill + if (currentVisit?.visitType?.uuid === config?.inPatientVisitTypeUuid || isEmergencyPatient) { + return { hasPendingPayment: false, isLoading: false }; + } + + // If the patient is not in the queue then we should check if the patient has a pending bill + return { hasPendingPayment, isLoading: false }; +}; + +export const usePatientQueue = (patientUuid: string) => { + const config = useConfig({ externalModuleName: '@ampath/esm-service-queues-app' }); + const url = `${restBaseUrl}/visit-queue-entry?patient=${patientUuid}`; + const { data, isLoading, error } = useSWR<{ + data: { results: Array }; + }>(url, openmrsFetch); + + const isEmergencyPatient = + data?.data?.results?.[0]?.queueEntry?.priority?.uuid === config?.concepts?.emergencyPriorityConceptUuid; + const isInQueue = data?.data?.results?.length > 0; + return { isInQueue, isLoading, error, isEmergencyPatient }; +}; + +export const usePatientBill = (orderUuid: string) => { + const { billingStatusQueryUrl } = useConfig(); + const billUrl = createUrl(restBaseUrl, orderUuid, billingStatusQueryUrl); + const { data, isLoading, error } = useSWR<{ + data: { results: Array }; + }>(billUrl, openmrsFetch); + + const hasPendingPayment = data?.data?.results?.some( + (lineItem) => lineItem.paymentStatus === 'PENDING' || lineItem.paymentStatus === 'POSTED', + ); + + return { hasPendingPayment, isLoading, error }; +}; + +function createUrl(restBaseUrl: string, orderUuid: string, templateUrl: string): string { + return templateUrl.replace('${restBaseUrl}', restBaseUrl).replace('${orderUuid}', orderUuid); +} diff --git a/packages/esm-billing-app/src/billable-services/billiable-item/useBilliableItem.tsx b/packages/esm-billing-app/src/billable-services/billiable-item/useBillableItem.tsx old mode 100644 new mode 100755 similarity index 83% rename from packages/esm-billing-app/src/billable-services/billiable-item/useBilliableItem.tsx rename to packages/esm-billing-app/src/billable-services/billiable-item/useBillableItem.tsx index 50393f05..44eaa26c --- a/packages/esm-billing-app/src/billable-services/billiable-item/useBilliableItem.tsx +++ b/packages/esm-billing-app/src/billable-services/billiable-item/useBillableItem.tsx @@ -37,13 +37,12 @@ export const useBillableItem = (billableItemId: string) => { export const useSockItemInventory = (stockItemId: string) => { const url = `/ws/rest/v1/stockmanagement/stockiteminventory?v=default&limit=10&totalCount=true&drugUuid=${stockItemId}`; - const { data, error, isLoading } = useSWR<{ data: { results: Array<{ quantityUoM: string; quantity: number }> } }>( - url, - openmrsFetch, - ); - const stockItemsInfo = first(data?.data?.results ?? []); + const { data, error, isLoading } = useSWR<{ + data: { results: Array<{ quantityUoM: string; quantity: number; partyName: string }> }; + }>(url, openmrsFetch); + return { - stockItem: stockItemsInfo, + stockItem: (data?.data?.results as Array) ?? [], isLoading: isLoading, error, }; diff --git a/packages/esm-billing-app/src/billable-services/billing-tariffs/add-billing-tariffs-service.scss b/packages/esm-billing-app/src/billable-services/billing-tariffs/add-billing-tariffs-service.scss new file mode 100755 index 00000000..5c52a1ca --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billing-tariffs/add-billing-tariffs-service.scss @@ -0,0 +1,164 @@ +@use '@carbon/styles/scss/spacing'; +@use '@carbon/styles/scss/type'; +@use '@carbon/colors'; +@use '@carbon/layout'; +@import '~@openmrs/esm-styleguide/src/vars'; + +.form { + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100%; + padding: spacing.$spacing-06; +} + +.subTitle { + font-weight: 600; + font-size: 14px; +} + +.sectionTitle { + @include type.type-style('heading-compact-02'); + color: $text-02; + margin-bottom: spacing.$spacing-04; +} + +.modalBody { + padding-bottom: spacing.$spacing-05; +} + +.container { + margin: 1rem; +} + +.paymentContainer { + margin: layout.$layout-01; + padding: layout.$layout-01; + width: 70%; + border-right: 1px solid colors.$cool-gray-40; +} + +.paymentButtons { + margin: layout.$layout-01 0; +} + +.paymentMethodContainer { + display: grid; + grid-template-columns: repeat(4, minmax(auto, 1fr)); + column-gap: 1rem; + margin: 0.625rem 0; + width: 100%; +} + +.paymentTotals { + margin-top: layout.$spacing-01; +} + +.processPayments { + display: flex; + justify-content: flex-end; + margin: layout.$spacing-05; + column-gap: layout.$spacing-04; +} + +.errorPaymentContainer { + margin: layout.$spacing-04; + min-height: layout.$spacing-09; +} + +.removeButtonContainer { + display: flex; + align-self: center; + cursor: pointer; + margin-left: layout.$spacing-07; +} + +.removeButton { + color: colors.$red-60; +} + +.service { + padding: 1rem 0.75rem; +} + +.conceptsList { + background-color: $ui-02; + max-height: 14rem; + overflow-y: auto; + border: 1px solid $ui-03; + + li:hover { + background-color: $ui-03; + } +} + +.emptyResults { + @include type.type-style('body-compact-01'); + color: $text-02; + min-height: 1rem; + border: 1px solid $ui-03; +} + +.conceptLabel { + @include type.type-style('label-02'); + margin-bottom: 0.6rem; +} + +.errorContainer { + margin: 1rem; +} + +.serviceError { + :global(.cds--search-input):focus { + outline: 2.5px solid $danger; + } + + :global(.cds--search-magnifier) { + svg { + fill: $danger; + } + } +} + +.errorMessage { + @include type.type-style('label-02'); + color: $danger; + margin-top: 0.5rem; +} + +.spinner { + &:global(.cds--inline-loading) { + min-height: 1rem; + } +} + +.loader { + margin-top: 1rem; + margin-bottom: 1rem; + margin-left: auto; + margin-right: auto; + width: max-content; +} + +.searchWrapper { + display: flex; + flex-direction: column; + align-items: center; + justify-items: center; +} + +.nameSection { + display: flex; + gap: 20px; + align-items: flex-start; +} + +.secondSection { + display: flex; + gap: 20px; + align-items: flex-start; +} + +.serviceName { + width: 50%; +} diff --git a/packages/esm-billing-app/src/billable-services/billing-tariffs/add-billings-tariffs-service.component.tsx b/packages/esm-billing-app/src/billable-services/billing-tariffs/add-billings-tariffs-service.component.tsx new file mode 100755 index 00000000..93795538 --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billing-tariffs/add-billings-tariffs-service.component.tsx @@ -0,0 +1,183 @@ +import React, { useCallback, useRef, useState } from 'react'; +import styles from './add-billing-tariffs-service.scss'; +import { + Form, + Button, + TextInput, + ComboBox, + Dropdown, + Layer, + InlineLoading, + Search, + Tile, + FormLabel, + NumberInput, +} from '@carbon/react'; +import { useTranslation } from 'react-i18next'; +import { + createBillableService, + useConceptsSearch, + usePaymentModes, + useServiceTypes, +} from '../billable-service.resource'; +import { Controller, useFieldArray, useForm } from 'react-hook-form'; +import { Add, TrashCan, WarningFilled } from '@carbon/react/icons'; +import { z } from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { navigate, showSnackbar, useDebounce, useLayoutType } from '@openmrs/esm-framework'; +import { type ServiceConcept } from '../../types'; +import { extractErrorMessagesFromResponse } from '../../utils'; + +const servicePriceSchema = z.object({ + paymentMode: z.string({ required_error: 'Payment method is required' }), + price: z + .string() + .refine((value) => !isNaN(Number(value)), 'Value must be a number') + .refine((value) => parseInt(value) > 0, 'Price should be a number more than zero') + .refine((value) => !!value, 'Price is required'), +}); + +const paymentFormSchema = z.object({ + payment: z.array(servicePriceSchema).min(1, 'At least one payment method is required'), + serviceName: z.string({ + required_error: 'Service name is required', + }), + shortName: z.string({ required_error: 'A valid short name is required.' }), + serviceTypeName: z.string({ required_error: 'A service type is required' }), + concept: z.string({ required_error: 'Concept search is required.' }), +}); + +type FormData = z.infer; +const DEFAULT_PAYMENT_OPTION = { paymentMode: '', price: '1' }; + +const AddTariffsService: React.FC = () => { + const { t } = useTranslation(); + + const { paymentModes, isLoading: isLoadingPaymentModes } = usePaymentModes(); + const { serviceTypes, isLoading: isLoadingServicesTypes } = useServiceTypes(); + + const { + control, + handleSubmit, + formState: { errors, isValid }, + } = useForm({ + mode: 'all', + defaultValues: {}, + resolver: zodResolver(paymentFormSchema), + }); + + const { fields, remove, append } = useFieldArray({ name: 'payment', control: control }); + + const handleAppendPaymentMode = useCallback(() => append(DEFAULT_PAYMENT_OPTION), [append]); + const handleRemovePaymentMode = useCallback((index) => remove(index), [remove]); + + const isTablet = useLayoutType() === 'tablet'; + const searchInputRef = useRef(null); + const handleSearchTermChange = (event: React.ChangeEvent) => setSearchTerm(event.target.value); + + const [selectedConcept, setSelectedConcept] = useState(null); + const [searchTerm, setSearchTerm] = useState(''); + const debouncedSearchTerm = useDebounce(searchTerm); + const { searchResults, isSearching } = useConceptsSearch(debouncedSearchTerm); + + const handleConceptChange = useCallback((selectedConcept: ServiceConcept) => { + setSelectedConcept(selectedConcept); + }, []); + + const handleNavigateToServiceDashboard = () => + navigate({ + to: window.getOpenmrsSpaBase() + 'billable-services', + }); + + const onSubmit = (data: FormData) => { + const payload: any = {}; + + let servicePrices = data.payment.map((element) => { + return { + name: paymentModes.filter((p) => p.uuid === element.paymentMode)[0].name, + price: element.price, + paymentMode: element.paymentMode, + }; + }); + + payload.name = data.serviceName; + payload.shortName = data.shortName; + payload.serviceType = data.serviceTypeName; + payload.servicePrices = servicePrices; + payload.serviceStatus = 'ENABLED'; + payload.concept = selectedConcept?.concept?.uuid; + + createBillableService(payload).then( + (resp) => { + showSnackbar({ + title: t('billableService', 'Billable service'), + subtitle: 'Billable service created successfully', + kind: 'success', + isLowContrast: true, + timeoutInMs: 3000, + }); + handleNavigateToServiceDashboard(); + }, + (error) => { + showSnackbar({ + title: 'Error adding billable service', + kind: 'error', + subtitle: extractErrorMessagesFromResponse(error.responseBody), + isLowContrast: true, + }); + }, + ); + }; + + if (isLoadingServicesTypes || isLoadingPaymentModes) { + return ( +
+ +
+ ); + } + + return ( +
+

{t('addTariffsServices', 'Add Insurance Tariffs')}

+ +
+
+ ( + (item ? item.display : '')} + placeholder="Select service type" + required + {...field} + onChange={({ selectedItem }) => field.onChange(selectedItem ? selectedItem.display : '')} + invalidText={errors.serviceTypeName?.message || ''} + invalid={!!errors.serviceTypeName} + /> + )} + /> +
+
+ +
+ + +
+
+ ); +}; + +function ResponsiveWrapper({ children, isTablet }: { children: React.ReactNode; isTablet: boolean }) { + return isTablet ? {children} : <>{children}; +} + +export default AddTariffsService; diff --git a/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs-admin-card.tsx b/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs-admin-card.tsx new file mode 100644 index 00000000..e69de29b diff --git a/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs-services.scss b/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs-services.scss new file mode 100755 index 00000000..2f2691ff --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs-services.scss @@ -0,0 +1,219 @@ +@use '@carbon/layout'; +@use '@carbon/type'; +@use '@carbon/styles/scss/spacing'; +@import '~@openmrs/esm-styleguide/src/vars'; + +.container { + margin: 2rem 0; +} + +.emptyStateContainer, +.loaderContainer { + @extend .container; +} + +.serviceContainer { + background-color: $ui-02; + border: 1px solid $ui-03; + width: 100%; + margin: 0 auto; + max-width: 95vw; + padding-bottom: 0; + + :has(.filterEmptyState) { + border-bottom: none; + } +} +.left-justified-items { + display: flex; + flex-direction: row; + align-items: center; + cursor: pointer; + align-items: center; +} + +.filterContainer { + flex: 1; + + :global(.cds--dropdown__wrapper--inline) { + gap: 0; + } + + :global(.cds--list-box__menu-icon) { + height: 1rem; + } + + :global(.cds--list-box__menu) { + min-width: max-content; + } + + :global(.cds--list-box) { + margin-left: layout.$spacing-03; + } +} + +.menu { + margin-left: layout.$spacing-03; +} + +.headerContainer { + display: flex; + justify-content: space-between; + align-items: center; + padding: layout.$spacing-04 layout.$spacing-05; + background-color: $ui-02; +} + +.backgroundDataFetchingIndicator { + align-items: center; + display: flex; + flex: 1; + justify-content: space-between; + + &:global(.cds--inline-loading) { + max-height: 1rem; + } +} + +.tableContainer section { + position: relative; +} + +.tableContainer a { + text-decoration: none; +} + +.pagination { + overflow: hidden; + + &:global(.cds--pagination) { + border-top: none; + } +} + +.hiddenRow { + display: none; +} + +.emptyRow { + padding: 0 1rem; + display: flex; + align-items: center; +} + +.visitSummaryContainer { + width: 100%; + max-width: 768px; + margin: 1rem auto; +} + +.expandedActiveVisitRow > td > div { + max-height: max-content !important; +} + +.expandedActiveVisitRow td { + padding: 0 2rem; +} + +.expandedActiveVisitRow th[colspan] td[colspan] > div:first-child { + padding: 0 1rem; +} + +.action { + margin-bottom: layout.$spacing-03; +} + +.illo { + margin-top: layout.$spacing-05; +} + +.content { + @include type.type-style('heading-compact-01'); + color: $text-02; + margin-top: layout.$spacing-05; + margin-bottom: layout.$spacing-03; +} + +.desktopHeading, +.tabletHeading { + text-align: left; + text-transform: capitalize; + flex: 1; + + h4 { + @include type.type-style('heading-compact-02'); + color: $text-02; + + &:after { + content: ''; + display: block; + width: 2rem; + padding-top: 3px; + border-bottom: 0.375rem solid; + @include brand-03(border-bottom-color); + } + } +} + +.tile { + text-align: center; + border: 1px solid $ui-03; +} + +.menuitem { + max-width: none; +} + +.filterEmptyState { + display: flex; + justify-content: center; + align-items: center; + padding: layout.$spacing-05; + margin: layout.$spacing-09; + text-align: center; +} + +.filterEmptyStateTile { + margin: auto; +} + +.filterEmptyStateContent { + @include type.type-style('heading-compact-02'); + color: $text-02; + margin-bottom: 0.5rem; +} + +.filterEmptyStateHelper { + @include type.type-style('body-compact-01'); + color: $text-02; +} + +.metricsContainer { + display: flex; + justify-content: space-between; + background-color: $ui-02; + height: spacing.$spacing-10; + align-items: center; + padding: 0 spacing.$spacing-05; +} + +.metricsTitle { + @include type.type-style('heading-03'); + color: $ui-05; +} + +.actionsContainer { + display: flex; + justify-content: space-between; + align-items: center; + background-color: $ui-02; +} +.actionBtn { + display: flex; + column-gap: 0.5rem; +} + +.mainSection { + display: grid; + grid-template-columns: 16rem 1fr; +} diff --git a/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs.component.tsx b/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs.component.tsx new file mode 100755 index 00000000..e1923f91 --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs.component.tsx @@ -0,0 +1,286 @@ +import React, { useCallback, useMemo, useState } from 'react'; +import classNames from 'classnames'; +import { + DataTable, + InlineLoading, + Layer, + Pagination, + Search, + Table, + TableBody, + TableCell, + TableContainer, + TableHead, + TableHeader, + TableRow, + Tile, + Button, +} from '@carbon/react'; +import { useLayoutType, isDesktop, useConfig, usePagination, ErrorState, navigate } from '@openmrs/esm-framework'; +import { EmptyState } from '@openmrs/esm-patient-common-lib'; +import styles from './billing-tariffs-services.scss'; +import { useTranslation } from 'react-i18next'; +import { useBillableServices } from './billing-tariffs.resource'; +import { ArrowRight, RadioButton } from '@carbon/react/icons'; +import { RadioButtonGroup } from '@carbon/react'; +import { OverflowMenu, OverflowMenuItem } from '@carbon/react'; + +const BillingTariffs = () => { + const { t } = useTranslation(); + const { billableServices, isLoading, isValidating, error, mutate } = useBillableServices(); + const layout = useLayoutType(); + const config = useConfig(); + const [searchString, setSearchString] = useState(''); + const responsiveSize = isDesktop(layout) ? 'lg' : 'sm'; + const pageSizes = config?.billableServices?.pageSizes ?? [10, 20, 30, 40, 50]; + const [pageSize, setPageSize] = useState(config?.billableServices?.pageSize ?? 10); + + //creating service state + const [showOverlay, setShowOverlay] = useState(false); + const [overlayHeader, setOverlayTitle] = useState(''); + const [category, setCategory] = useState(''); + + const toggleSearch = (choiceSelected) => { + (document.getElementById('searchField') as HTMLInputElement).disabled = false; + + if (choiceSelected == 'Stock Item') { + setCategory('Stock Item'); + } else { + setCategory('Service'); + } + }; + + const headerData = [ + { + header: t('serviceName', 'Service Name'), + key: 'serviceName', + }, + { + header: t('shortName', 'Short Name'), + key: 'shortName', + }, + { + header: t('serviceType', 'Service Type'), + key: 'serviceType', + }, + { + header: t('status', 'Service Status'), + key: 'status', + }, + { + header: t('prices', 'Prices'), + key: 'prices', + }, + { + header: t('tariffs', 'Tariffs'), + key: 'tariffs', + }, + { + header: t('actions', 'Actions'), + key: 'actions', + }, + ]; + + const launchBillableServiceForm = useCallback(() => { + navigate({ to: window.getOpenmrsSpaBase() + 'billable-services/add-service' }); + }, []); + + const searchResults = useMemo(() => { + if (billableServices !== undefined && billableServices.length > 0) { + if (searchString && searchString.trim() !== '') { + const search = searchString.toLowerCase(); + return billableServices?.filter((service) => + Object.entries(service).some(([header, value]) => { + return header === 'uuid' ? false : `${value}`.toLowerCase().includes(search); + }), + ); + } + } + return billableServices; + }, [searchString, billableServices]); + + const { paginated, goTo, results, currentPage } = usePagination(searchResults, pageSize); + + let rowData = []; + if (results) { + results.forEach((service, index) => { + const s = { + id: `${index}`, + uuid: service.uuid, + serviceName: service.name, + shortName: service.shortName, + serviceType: service?.serviceType?.display, + status: service.serviceStatus, + prices: '--', + tariffs: 'T1, T2, T3', + actions: ( + + + + + ), + }; + let cost = ''; + service.servicePrices.forEach((price) => { + cost += `${price.name} (${price.price}) `; + }); + s.prices = cost; + rowData.push(s); + }); + } + + const handleSearch = useCallback( + (e) => { + goTo(1); + setSearchString(e.target.value); + }, + [goTo, setSearchString], + ); + + if (isLoading) { + ; + } + if (error) { + ; + } + if (billableServices.length === 0) { + ; + } + + function filterItems(value: any) { + throw new Error('Function not implemented.'); + } + + return ( + <> + {billableServices?.length > 0 ? ( +
+ + + + + +
+ 1 ? true : false}> + {({ rows, headers, getRowProps, getTableProps }) => ( + + + + + {headers.map((header) => ( + {header.header} + ))} + + + + {rows.map((row) => ( + + {row.cells.map((cell) => ( + {cell.value} + ))} + + ))} + +
+
+ )} +
+ {searchResults?.length === 0 && ( +
+ + +

+ {t('noMatchingServicesToDisplay', 'No matching services to display')} +

+

{t('checkFilters', 'Check the filters above')}

+
+
+
+ )} + {paginated && ( + { + if (newPageSize !== pageSize) { + setPageSize(newPageSize); + } + if (newPage !== currentPage) { + goTo(newPage); + } + }} + /> + )} +
+ ) : ( + + )} + + ); +}; + +function FilterableTableHeader({ layout, handleSearch, isValidating, responsiveSize, t }) { + return ( + <> +
+
+

{t('servicesList', 'Services list')}

+
+
+ {isValidating ? : null} +
+
+
+ + +
+ + ); +} +export default BillingTariffs; diff --git a/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs.resource.tsx b/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs.resource.tsx new file mode 100755 index 00000000..90cba6ed --- /dev/null +++ b/packages/esm-billing-app/src/billable-services/billing-tariffs/billing-tariffs.resource.tsx @@ -0,0 +1,55 @@ +import { type OpenmrsResource, openmrsFetch } from '@openmrs/esm-framework'; +import useSWR from 'swr'; +import { type ServiceConcept } from '../../types'; + +type ResponseObject = { + results: Array; +}; + +type ServiceTypesResponse = { + setMembers: { uuid: string; display: string }[]; +}; + +export const useBillableServices = () => { + const url = `/ws/rest/v1/cashier/billableService?v=custom:(uuid,name,shortName,serviceStatus,serviceType:(display),servicePrices:(uuid,name,price))`; + const { data, isLoading, isValidating, error, mutate } = useSWR<{ data: ResponseObject }>(url, openmrsFetch, {}); + return { billableServices: data?.data.results ?? [], isLoading, isValidating, error, mutate }; +}; + +export function useServiceTypes() { + const url = `/ws/rest/v1/concept/d7bd4cc0-90b1-4f22-90f2-ab7fde936727?v=custom:(setMembers:(uuid,display))`; + const { data, error, isLoading } = useSWR<{ data: ServiceTypesResponse }>(url, openmrsFetch, {}); + return { serviceTypes: data?.data.setMembers ?? [], error, isLoading }; +} + +export const usePaymentModes = () => { + const url = `/ws/rest/v1/cashier/paymentMode`; + const { data, error, isLoading } = useSWR<{ data: ResponseObject }>(url, openmrsFetch, {}); + return { paymentModes: data?.data.results ?? [], error, isLoading }; +}; + +export const createBillableService = (payload: any) => { + const url = `/ws/rest/v1/cashier/api/billable-service`; + return openmrsFetch(url, { + method: 'POST', + body: payload, + headers: { + 'Content-Type': 'application/json', + }, + }); +}; + +export function useConceptsSearch(conceptToLookup: string) { + const conditionsSearchUrl = `/ws/rest/v1/conceptsearch?q=${conceptToLookup}`; + + const { data, error, isLoading } = useSWR<{ data: { results: Array } }, Error>( + conceptToLookup ? conditionsSearchUrl : null, + openmrsFetch, + ); + + return { + searchResults: data?.data?.results ?? [], + error: error, + isSearching: isLoading, + }; +} diff --git a/packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.component.tsx b/packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.component.tsx old mode 100644 new mode 100755 index 83ed659c..aaed930c --- a/packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.component.tsx +++ b/packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.component.tsx @@ -1,4 +1,3 @@ -/* eslint-disable curly */ import React, { useCallback, useRef, useState } from 'react'; import styles from './add-billable-service.scss'; import { @@ -12,6 +11,7 @@ import { Search, Tile, FormLabel, + NumberInput, } from '@carbon/react'; import { useTranslation } from 'react-i18next'; import { @@ -24,43 +24,48 @@ import { Controller, useFieldArray, useForm } from 'react-hook-form'; import { Add, TrashCan, WarningFilled } from '@carbon/react/icons'; import { z } from 'zod'; import { zodResolver } from '@hookform/resolvers/zod'; -import { navigate, showSnackbar, useDebounce, useLayoutType, useSession } from '@openmrs/esm-framework'; +import { navigate, showSnackbar, useDebounce, useLayoutType } from '@openmrs/esm-framework'; import { type ServiceConcept } from '../../types'; +import { extractErrorMessagesFromResponse } from '../../utils'; const servicePriceSchema = z.object({ - paymentMode: z.string().refine((value) => !!value, 'Payment method is required'), - price: z.union([ - z.number().refine((value) => !!value, 'Price is required'), - z.string().refine((value) => !!value, 'Price is required'), - ]), + paymentMode: z.string({ required_error: 'Payment method is required' }), + price: z + .string() + .refine((value) => !isNaN(Number(value)), 'Value must be a number') + .refine((value) => parseInt(value) > 0, 'Price should be a number more than zero') + .refine((value) => !!value, 'Price is required'), }); -const paymentFormSchema = z.object({ payment: z.array(servicePriceSchema) }); -type PaymentMode = { - paymentMode: string; - price: string | number; -}; -type PaymentModeFormValue = { - payment: Array; -}; -const DEFAULT_PAYMENT_OPTION = { paymentMode: '', price: 0 }; +const paymentFormSchema = z.object({ + payment: z.array(servicePriceSchema).min(1, 'At least one payment method is required'), + serviceName: z.string({ + required_error: 'Service name is required', + }), + shortName: z.string({ required_error: 'A valid short name is required.' }), + serviceTypeName: z.string({ required_error: 'A service type is required' }), + concept: z.string({ required_error: 'Concept search is required.' }), +}); + +type FormData = z.infer; +const DEFAULT_PAYMENT_OPTION = { paymentMode: '', price: '1' }; const AddBillableService: React.FC = () => { const { t } = useTranslation(); const { paymentModes, isLoading: isLoadingPaymentModes } = usePaymentModes(); const { serviceTypes, isLoading: isLoadingServicesTypes } = useServiceTypes(); - const [billableServicePayload, setBillableServicePayload] = useState({}); const { control, handleSubmit, - formState: { errors }, - } = useForm({ + formState: { errors, isValid }, + } = useForm({ mode: 'all', defaultValues: {}, resolver: zodResolver(paymentFormSchema), }); + const { fields, remove, append } = useFieldArray({ name: 'payment', control: control }); const handleAppendPaymentMode = useCallback(() => append(DEFAULT_PAYMENT_OPTION), [append]); @@ -74,7 +79,8 @@ const AddBillableService: React.FC = () => { const [searchTerm, setSearchTerm] = useState(''); const debouncedSearchTerm = useDebounce(searchTerm); const { searchResults, isSearching } = useConceptsSearch(debouncedSearchTerm); - const handleConceptChange = useCallback((selectedConcept: any) => { + + const handleConceptChange = useCallback((selectedConcept: ServiceConcept) => { setSelectedConcept(selectedConcept); }, []); @@ -83,27 +89,20 @@ const AddBillableService: React.FC = () => { to: window.getOpenmrsSpaBase() + 'billable-services', }); - if (isLoadingPaymentModes && isLoadingServicesTypes) { - return ( - - ); - } - - const onSubmit = (data) => { + const onSubmit = (data: FormData) => { const payload: any = {}; - let servicePrices = []; - data.payment.forEach((element) => { - element.name = paymentModes.filter((p) => p.uuid === element.paymentMode)[0].name; - servicePrices.push(element); + let servicePrices = data.payment.map((element) => { + return { + name: paymentModes.filter((p) => p.uuid === element.paymentMode)[0].name, + price: element.price, + paymentMode: element.paymentMode, + }; }); - payload.name = billableServicePayload.serviceName; - payload.shortName = billableServicePayload.shortName; - payload.serviceType = billableServicePayload.serviceType.uuid; + + payload.name = data.serviceName; + payload.shortName = data.shortName; + payload.serviceType = data.serviceTypeName; payload.servicePrices = servicePrices; payload.serviceStatus = 'ENABLED'; payload.concept = selectedConcept?.concept?.uuid; @@ -114,205 +113,233 @@ const AddBillableService: React.FC = () => { title: t('billableService', 'Billable service'), subtitle: 'Billable service created successfully', kind: 'success', + isLowContrast: true, timeoutInMs: 3000, }); handleNavigateToServiceDashboard(); }, (error) => { - showSnackbar({ title: 'Bill payment error', kind: 'error', subtitle: error }); + showSnackbar({ + title: 'Error adding billable service', + kind: 'error', + subtitle: extractErrorMessagesFromResponse(error.responseBody), + isLowContrast: true, + }); }, ); }; + if (isLoadingServicesTypes || isLoadingPaymentModes) { + return ( +
+ +
+ ); + } + return (
-

{t('addBillableServices', 'Add Billable Services')}

-
- - - setBillableServicePayload({ - ...billableServicePayload, - serviceName: e.target.value, - }) - } - placeholder="Enter service name" +

{t('addBillableServices', 'Add Billable Services')}

+
+
+ ( + + + + )} /> - -
-
- - - setBillableServicePayload({ - ...billableServicePayload, - shortName: e.target.value, - }) - } - placeholder="Enter service short name" +
+
+ ( + + + + )} /> - +
-
- Associated Concept - ( - - { - onChange(e); - handleSearchTermChange(e); - }} - renderIcon={errors?.search && } - onBlur={onBlur} - onClear={() => { - setSearchTerm(''); - setSelectedConcept(null); - }} - value={(() => { - if (selectedConcept) { - return selectedConcept.display; - } - if (debouncedSearchTerm) { - return value; - } - })()} - /> - - )} - /> - {(() => { - if (!debouncedSearchTerm || selectedConcept) return null; - if (isSearching) - return ; - if (searchResults && searchResults.length) { +
+
+ Associated Concept + ( + + { + onChange(e); + handleSearchTermChange(e); + }} + renderIcon={errors?.concept && } + onBlur={onBlur} + onClear={() => { + setSearchTerm(''); + setSelectedConcept(null); + }} + value={(() => { + if (selectedConcept) { + return selectedConcept.display; + } + if (debouncedSearchTerm) { + return value; + } + })()} + /> + + )} + /> + {(() => { + if (!debouncedSearchTerm || selectedConcept) { + return null; + } + if (isSearching) { + return ( +
+ +
+ ); + } + if (searchResults && searchResults.length) { + return ( +
    + {searchResults?.map((searchResult, index) => ( +
  • handleConceptChange(searchResult)}> + {searchResult.display} +
  • + ))} +
+ ); + } return ( -
    - {/*TODO: use uuid instead of index as the key*/} - {searchResults?.map((searchResult, index) => ( -
  • handleConceptChange(searchResult)}> - {searchResult.display} -
  • - ))} -
+ + + + {t('noResultsFor', 'No results for')} "{debouncedSearchTerm}" + + + ); - } - return ( - - - - {t('noResultsFor', 'No results for')} "{debouncedSearchTerm}" - - - - ); - })()} -
-
- - item?.display} - onChange={({ selectedItem }) => { - setBillableServicePayload({ - ...billableServicePayload, - display: selectedItem?.display, - serviceType: selectedItem, - }); - }} - placeholder="Select service type" - required + })()} +
+
+ ( + (item ? item.display : '')} + placeholder="Select service type" + required + {...field} + onChange={({ selectedItem }) => field.onChange(selectedItem ? selectedItem.display : '')} + invalidText={errors.serviceTypeName?.message || ''} + invalid={!!errors.serviceTypeName} + /> + )} /> - +
- -
-
- {fields.map((field, index) => ( -
- ( - - field.onChange(selectedItem?.uuid)} - titleText={t('paymentMode', 'Payment Mode')} - label={t('selectPaymentMethod', 'Select payment method')} - items={paymentModes ?? []} - itemToString={(item) => (item ? item.name : '')} - invalid={!!errors?.payment?.[index]?.paymentMode} - invalidText={errors?.payment?.[index]?.paymentMode?.message} - /> - - )} +
+ {fields.map((field, index) => ( +
+ ( + + field.onChange(selectedItem?.uuid)} + titleText={t('paymentMode', 'Payment Mode')} + label={t('selectPaymentMethod', 'Select payment method')} + items={paymentModes ?? []} + itemToString={(item) => (item ? item.name : '')} + invalid={!!errors?.payment?.[index]?.paymentMode} + invalidText={errors?.payment?.[index]?.paymentMode?.message} + /> + + )} + /> + ( + + + + )} + /> +
+ handleRemovePaymentMode(index)} + className={styles.removeButton} + size={20} /> - ( - - - - )} - /> -
- handleRemovePaymentMode(index)} - className={styles.removeButton} - size={20} - /> -
- ))} - -
-
+ + ))} + +
-
diff --git a/packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.scss b/packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.scss old mode 100644 new mode 100755 index 3b1f8c83..5c52a1ca --- a/packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.scss +++ b/packages/esm-billing-app/src/billable-services/create-edit/add-billable-service.scss @@ -9,10 +9,12 @@ flex-direction: column; justify-content: space-between; height: 100%; + padding: spacing.$spacing-06; } -.section { - margin: spacing.$spacing-03; +.subTitle { + font-weight: 600; + font-size: 14px; } .sectionTitle { @@ -43,7 +45,6 @@ .paymentMethodContainer { display: grid; grid-template-columns: repeat(4, minmax(auto, 1fr)); - align-items: flex-start; column-gap: 1rem; margin: 0.625rem 0; width: 100%; @@ -100,7 +101,7 @@ .conceptLabel { @include type.type-style('label-02'); - margin: 1rem; + margin-bottom: 0.6rem; } .errorContainer { @@ -130,3 +131,34 @@ min-height: 1rem; } } + +.loader { + margin-top: 1rem; + margin-bottom: 1rem; + margin-left: auto; + margin-right: auto; + width: max-content; +} + +.searchWrapper { + display: flex; + flex-direction: column; + align-items: center; + justify-items: center; +} + +.nameSection { + display: flex; + gap: 20px; + align-items: flex-start; +} + +.secondSection { + display: flex; + gap: 20px; + align-items: flex-start; +} + +.serviceName { + width: 50%; +} diff --git a/packages/esm-billing-app/src/billable-services/dashboard/dashboard.component.tsx b/packages/esm-billing-app/src/billable-services/dashboard/dashboard.component.tsx old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services/dashboard/dashboard.scss b/packages/esm-billing-app/src/billable-services/dashboard/dashboard.scss old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billable-services/dashboard/service-metrics.component.tsx b/packages/esm-billing-app/src/billable-services/dashboard/service-metrics.component.tsx old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billing-dashboard/billing-dashboard.component.tsx b/packages/esm-billing-app/src/billing-dashboard/billing-dashboard.component.tsx old mode 100644 new mode 100755 index 8235f6c8..6008d2a9 --- a/packages/esm-billing-app/src/billing-dashboard/billing-dashboard.component.tsx +++ b/packages/esm-billing-app/src/billing-dashboard/billing-dashboard.component.tsx @@ -4,6 +4,7 @@ import BillingHeader from '../billing-header/billing-header.component'; import MetricsCards from '../metrics-cards/metrics-cards.component'; import BillsTable from '../bills-table/bills-table.component'; import styles from './billing-dashboard.scss'; +import BillingTabs from '../billing-tabs/billling-tabs.component'; export function BillingDashboard() { const { t } = useTranslation(); @@ -12,9 +13,7 @@ export function BillingDashboard() {
-
- -
+
); } diff --git a/packages/esm-billing-app/src/billing-dashboard/billing-dashboard.scss b/packages/esm-billing-app/src/billing-dashboard/billing-dashboard.scss old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billing-form/billing-checkin-form.component.tsx b/packages/esm-billing-app/src/billing-form/billing-checkin-form.component.tsx old mode 100644 new mode 100755 index c2994c3f..24595d94 --- a/packages/esm-billing-app/src/billing-form/billing-checkin-form.component.tsx +++ b/packages/esm-billing-app/src/billing-form/billing-checkin-form.component.tsx @@ -25,7 +25,7 @@ const BillingCheckInForm: React.FC = ({ patientUuid, se const { lineItems, isLoading: isLoadingLineItems, error: lineError } = useBillableItems(); const [attributes, setAttributes] = useState([]); const [paymentMethod, setPaymentMethod] = useState(); - let lineList = []; + const [isPatientExemptedValue, setIsPatientExemptedValue] = useState(null); const handleCreateBill = useCallback((createBillPayload) => { createPatientBill(createBillPayload).then( @@ -51,7 +51,6 @@ const BillingCheckInForm: React.FC = ({ patientUuid, se : PENDING_PAYMENT_STATUS; const lineItems = selectedItems.map((item, index) => { - // // should default to first price if check returns empty. todo - update backend to return default price const priceForPaymentMode = item.servicePrices.find((p) => p.paymentMode?.uuid === paymentMethod) || item?.servicePrices[0]; return { @@ -84,7 +83,7 @@ const BillingCheckInForm: React.FC = ({ patientUuid, se handleCreateExtraVisitInfo: () => {}, attributes, }); - }, []); + }, [attributes, setExtraVisitInfo]); if (isLoadingLineItems || isLoadingCashPoints) { return ( @@ -96,13 +95,6 @@ const BillingCheckInForm: React.FC = ({ patientUuid, se ); } - if (paymentMethod) { - lineList = []; - lineList = lineItems.filter((e) => - e.servicePrices.some((p) => p.paymentMode && p.paymentMode.uuid === paymentMethod?.uuid), - ); - } - if (cashError || lineError) { return ( = ({ patientUuid, se return ( <> - + -
-
{t('billing', 'Billing')}
-
- (item ? item?.name : '')} - onChange={({ selectedItems }) => handleBillingService(selectedItems)} - /> -
-
+ {paymentMethod && ( +
+
{t('billing', 'Billing')}
+
+ (item ? item?.name : '')} + onChange={({ selectedItems }) => handleBillingService(selectedItems)} + disabled={isPatientExemptedValue === ''} + /> +
+
+ )} ); }; diff --git a/packages/esm-billing-app/src/billing-form/billing-checkin-form.scss b/packages/esm-billing-app/src/billing-form/billing-checkin-form.scss old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billing-form/billing-form.component.tsx b/packages/esm-billing-app/src/billing-form/billing-form.component.tsx old mode 100644 new mode 100755 index ee60e514..cbeb959a --- a/packages/esm-billing-app/src/billing-form/billing-form.component.tsx +++ b/packages/esm-billing-app/src/billing-form/billing-form.component.tsx @@ -97,7 +97,7 @@ const BillingForm: React.FC = ({ closeWorkspace }) => { const filterItems = (val) => { setsearchVal(val); - if (!isLoading) { + if (isLoading) { /* empty */ } else { if (typeof data !== 'undefined') { @@ -109,13 +109,17 @@ const BillingForm: React.FC = ({ closeWorkspace }) => { const res = data as { results: any[] }; res.results.map((o) => { - if (o.commonName && (o.commonName != '' || o.commonName != null)) { + if ( + o.commonName && + (o.commonName != '' || o.commonName != null) && + (o.purchasePrice != '' || o.purchasePrice != null) + ) { searchOptions.push({ uuid: o.uuid, Item: o.commonName, Qnty: 1, - Price: 10, - Total: 10, + Price: o?.purchasePrice, + Total: o?.purchasePrice, category: 'StockItem', }); } else { @@ -124,8 +128,8 @@ const BillingForm: React.FC = ({ closeWorkspace }) => { uuid: o.uuid, Item: o.name, Qnty: 1, - Price: o.servicePrices[0].price, - Total: o.servicePrices[0].price, + Price: o.servicePrices[0]?.price, + Total: o.servicePrices[0]?.price, category: 'Service', }); } diff --git a/packages/esm-billing-app/src/billing-form/billing-form.scss b/packages/esm-billing-app/src/billing-form/billing-form.scss old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billing-form/helper.ts b/packages/esm-billing-app/src/billing-form/helper.ts old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billing-form/social-health-authority/sha-number-validity.component.tsx b/packages/esm-billing-app/src/billing-form/social-health-authority/sha-number-validity.component.tsx old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/billing-form/visit-attributes/visit-attributes-form.component.tsx b/packages/esm-billing-app/src/billing-form/visit-attributes/visit-attributes-form.component.tsx old mode 100644 new mode 100755 index 96a59ec6..71db914c --- a/packages/esm-billing-app/src/billing-form/visit-attributes/visit-attributes-form.component.tsx +++ b/packages/esm-billing-app/src/billing-form/visit-attributes/visit-attributes-form.component.tsx @@ -1,6 +1,5 @@ -import React, { useCallback } from 'react'; +import React, { useCallback, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import styles from './visit-attributes-form.scss'; import { TextInput, InlineLoading, ComboBox, RadioButtonGroup, RadioButton } from '@carbon/react'; import { Controller, useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; @@ -8,15 +7,17 @@ import { z } from 'zod'; import { useConfig } from '@openmrs/esm-framework'; import { type BillingConfig } from '../../config-schema'; import { usePaymentModes } from '../../billing.resource'; +import styles from './visit-attributes-form.scss'; type VisitAttributesFormProps = { setAttributes: (state) => void; setPaymentMethod?: (value: any) => void; + setIsPatientExempted: (value: string) => void; }; type VisitAttributesFormValue = { isPatientExempted: string; - paymentMethods: { uuid: string; name: string }; + paymentMethods: { uuid: string; name: string } | null; insuranceScheme: string; policyNumber: string; exemptionCategory: string; @@ -24,70 +25,70 @@ type VisitAttributesFormValue = { const visitAttributesFormSchema = z.object({ isPatientExempted: z.string(), - paymentMethods: z.object({ uuid: z.string(), name: z.string() }), - insuranceSchema: z.string(), - policyNumber: z.string(), - exemptionCategory: z.string(), + paymentMethods: z.object({ uuid: z.string(), name: z.string() }).nullable(), + insuranceScheme: z.string().optional(), + policyNumber: z.string().optional(), + exemptionCategory: z.string().optional(), }); -const VisitAttributesForm: React.FC = ({ setAttributes, setPaymentMethod }) => { +const VisitAttributesForm: React.FC = ({ + setAttributes, + setPaymentMethod, + setIsPatientExempted, +}) => { const { t } = useTranslation(); const { visitAttributeTypes, patientExemptionCategories } = useConfig(); const { control, getValues, watch, setValue } = useForm({ mode: 'all', - defaultValues: {}, + defaultValues: { + isPatientExempted: '', + paymentMethods: null, + insuranceScheme: '', + policyNumber: '', + exemptionCategory: '', + }, resolver: zodResolver(visitAttributesFormSchema), }); - const [isPatientExempted, paymentMethods, insuranceSchema, policyNumber, exemptionCategory] = watch([ - 'isPatientExempted', - 'paymentMethods', - 'insuranceScheme', - 'policyNumber', - 'exemptionCategory', - ]); const { paymentModes, isLoading: isLoadingPaymentModes } = usePaymentModes(); + const [isPatientExempted, paymentMethods] = watch(['isPatientExempted', 'paymentMethods']); const resetFormFieldsForNonExemptedPatients = useCallback(() => { - if ((isPatientExempted && paymentMethods !== null) || paymentMethods !== undefined) { - setValue('insuranceScheme', ''); - setValue('policyNumber', ''); + setValue('insuranceScheme', ''); + setValue('policyNumber', ''); + setValue('exemptionCategory', ''); + setValue('paymentMethods', null); + }, [setValue]); + + useEffect(() => { + if (isPatientExempted === 'true') { + resetFormFieldsForNonExemptedPatients(); } - }, [isPatientExempted, paymentMethods, setValue]); + setIsPatientExempted(isPatientExempted); + }, [isPatientExempted, resetFormFieldsForNonExemptedPatients, setIsPatientExempted]); const createVisitAttributesPayload = useCallback(() => { - const { exemptionCategory, paymentMethods, policyNumber, isPatientExempted } = getValues(); - setPaymentMethod(paymentMethods); - resetFormFieldsForNonExemptedPatients(); + const values = getValues(); + setPaymentMethod?.(values.paymentMethods); const formPayload = [ - { uuid: visitAttributeTypes.isPatientExempted, value: isPatientExempted }, - { uuid: visitAttributeTypes.paymentMethods, value: paymentMethods?.uuid }, - { uuid: visitAttributeTypes.policyNumber, value: policyNumber }, - { uuid: visitAttributeTypes.insuranceScheme, value: insuranceSchema }, - { uuid: visitAttributeTypes.exemptionCategory, value: exemptionCategory }, + { uuid: visitAttributeTypes.isPatientExempted, value: values.isPatientExempted }, + { uuid: visitAttributeTypes.paymentMethods, value: values.paymentMethods?.uuid }, + { uuid: visitAttributeTypes.policyNumber, value: values.policyNumber }, + { uuid: visitAttributeTypes.insuranceScheme, value: values.insuranceScheme }, + { uuid: visitAttributeTypes.exemptionCategory, value: values.exemptionCategory }, ]; const visitAttributesPayload = formPayload.filter( (item) => item.value !== undefined && item.value !== null && item.value !== '', ); - return Object.entries(visitAttributesPayload).map(([key, value]) => ({ - attributeType: value.uuid, - value: value.value, + return visitAttributesPayload.map(({ uuid, value }) => ({ + attributeType: uuid, + value, })); - }, [ - visitAttributeTypes.insuranceScheme, - visitAttributeTypes.isPatientExempted, - visitAttributeTypes.exemptionCategory, - visitAttributeTypes.paymentMethods, - visitAttributeTypes.policyNumber, - getValues, - insuranceSchema, - resetFormFieldsForNonExemptedPatients, - setPaymentMethod, - ]); + }, [getValues, visitAttributeTypes, setPaymentMethod]); - React.useEffect(() => { + useEffect(() => { setAttributes(createVisitAttributesPayload()); - }, [paymentMethods, insuranceSchema, policyNumber, exemptionCategory, setAttributes, createVisitAttributesPayload]); + }, [isPatientExempted, paymentMethods, getValues, createVisitAttributesPayload, setAttributes]); if (isLoadingPaymentModes) { return ( @@ -109,17 +110,21 @@ const VisitAttributesForm: React.FC = ({ setAttributes control={control} render={({ field }) => ( field.onChange(selected)} + onChange={(selected) => { + field.onChange(selected); + setValue('isPatientExempted', selected); + }} orientation="horizontal" legendText={t('isPatientExemptedLegend', 'Is patient exempted from payment?')} name="patientExemption"> - - + + )} /> - {isPatientExempted && ( + + {isPatientExempted === 'true' && (
= ({ setAttributes />
)} -
- ( - field.onChange(selectedItem)} - id="paymentMethods" - items={paymentModes} - itemToString={(item) => (item ? item.name : '')} - titleText={t('paymentMethodsTitle', 'Payment methods')} - placeholder={t('selectPaymentMethodPlaceholder', 'Select payment method')} - /> - )} - /> -
- {paymentMethods?.name?.toLocaleLowerCase() === 'insurance' && ( + {isPatientExempted === 'false' && ( +
+ ( + field.onChange(selectedItem)} + id="paymentMethods" + items={paymentModes} + itemToString={(item) => (item ? item.name : '')} + titleText={t('paymentMethodsTitle', 'Payment method')} + placeholder={t('selectPaymentMethod', 'Select payment method')} + /> + )} + /> +
+ )} + + {paymentMethods?.name?.toLowerCase() === 'insurance' && isPatientExempted === 'false' && ( <>
{ + const { t } = useTranslation(); + const [activeTabIndex, setActiveTabIndex] = useState(0); + + const handleTabChange = ({ selectedIndex }: { selectedIndex: number }) => { + setActiveTabIndex(selectedIndex); + }; + + return ( +
+ +
+ + {"Today's bills"} + {t('patientBills', 'Patient Bill')} + +
+ + + + + + + + +
+
+ ); +}; + +export default BillingTabs; diff --git a/packages/esm-billing-app/src/billing.resource.ts b/packages/esm-billing-app/src/billing.resource.ts old mode 100644 new mode 100755 index a8a42ce0..d9c3c1ca --- a/packages/esm-billing-app/src/billing.resource.ts +++ b/packages/esm-billing-app/src/billing.resource.ts @@ -97,7 +97,7 @@ export const useBill = (billUuid: string) => { cashPointUuid: bill?.cashPoint?.uuid, cashPointName: bill?.cashPoint?.name, cashPointLocation: bill?.cashPoint?.location?.display, - dateCreated: bill?.dateCreated ? formatDate(parseDate(bill.dateCreated), { mode: 'wide' }) : '--', + dateCreated: bill?.dateCreated ?? '--', lineItems: bill.lineItems, billingService: bill.lineItems.map((bill) => bill.item).join(' '), payments: bill.payments, @@ -132,7 +132,7 @@ export const processBillPayment = (payload, billUuid: string) => { export function useDefaultFacility() { const { authenticated } = useSession(); - const url = '/ws/rest/v1/amrs/default-facility'; + const url = '/ws/rest/v1/kenyaemr/default-facility'; const { data, isLoading } = useSWR<{ data: FacilityDetail }>(authenticated ? url : null, openmrsFetch, {}); return { data: data?.data, isLoading: isLoading }; } @@ -181,8 +181,9 @@ export const usePaymentModes = (excludeWaiver: boolean = true) => { }); const allowedPaymentModes = excludedPaymentMode?.length > 0 - ? data?.data?.results.filter((mode) => !excludedPaymentMode.some((excluded) => excluded.uuid === mode.uuid)) ?? [] - : data?.data?.results ?? []; + ? (data?.data?.results.filter((mode) => !excludedPaymentMode.some((excluded) => excluded.uuid === mode.uuid)) ?? + []) + : (data?.data?.results ?? []); return { paymentModes: excludeWaiver ? allowedPaymentModes : data?.data?.results, isLoading, diff --git a/packages/esm-billing-app/src/bills-table/bills-table.component.tsx b/packages/esm-billing-app/src/bills-table/bills-table.component.tsx old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/bills-table/bills-table.scss b/packages/esm-billing-app/src/bills-table/bills-table.scss old mode 100644 new mode 100755 diff --git a/packages/esm-billing-app/src/claims/claims-wrap/claims-main-component.tsx b/packages/esm-billing-app/src/claims/claims-wrap/claims-main-component.tsx new file mode 100755 index 00000000..65b5fd69 --- /dev/null +++ b/packages/esm-billing-app/src/claims/claims-wrap/claims-main-component.tsx @@ -0,0 +1,35 @@ +import React, { useEffect, useState } from 'react'; +import styles from './claims-main.scss'; +import { type LineItem, type MappedBill } from '../../types'; +import ClaimsTable from '../dashboard/table/claims-table.component'; +import { useBill } from '../../billing.resource'; +import { useTranslation } from 'react-i18next'; +import ClaimsForm from '../dashboard/form/claims-form.component'; +import MainMetrics from '../metrics/metrics.component'; + +interface ClaimsMainProps { + bill: MappedBill; +} + +const ClaimMainComponent: React.FC = ({ bill }) => { + const [selectedLineItems, setSelectedLineItems] = useState([]); + const { isLoading: isLoadingBill, error } = useBill(bill.uuid); + + const handleSelectItem = (lineItems: Array) => { + setSelectedLineItems(lineItems); + }; + + return ( + <> + +
+
+ + +
+
+ + ); +}; + +export default ClaimMainComponent; diff --git a/packages/esm-billing-app/src/claims/claims-wrap/claims-main.scss b/packages/esm-billing-app/src/claims/claims-wrap/claims-main.scss new file mode 100755 index 00000000..001553fa --- /dev/null +++ b/packages/esm-billing-app/src/claims/claims-wrap/claims-main.scss @@ -0,0 +1,25 @@ +.mainContainer { + display: flex; + margin: 0 auto; + padding: 0 1rem; +} + +.content { + display: flex; + width: 100%; +} + +:global(.omrs-breakpoint-lt-desktop) { + .mainContainer { + flex-direction: column; + } + + .content { + flex-direction: column; + } +} + +.claimContainer, +.form { + flex: 1; +} diff --git a/packages/esm-billing-app/src/invoice/claims/claims-dashboard/claims-breakdown/claims-breakdown.component.tsx b/packages/esm-billing-app/src/claims/dashboard/claims-breakdown/claims-breakdown.component.tsx old mode 100644 new mode 100755 similarity index 100% rename from packages/esm-billing-app/src/invoice/claims/claims-dashboard/claims-breakdown/claims-breakdown.component.tsx rename to packages/esm-billing-app/src/claims/dashboard/claims-breakdown/claims-breakdown.component.tsx diff --git a/packages/esm-billing-app/src/invoice/claims/claims-dashboard/claims-breakdown/claims-breakdown.scss b/packages/esm-billing-app/src/claims/dashboard/claims-breakdown/claims-breakdown.scss old mode 100644 new mode 100755 similarity index 100% rename from packages/esm-billing-app/src/invoice/claims/claims-dashboard/claims-breakdown/claims-breakdown.scss rename to packages/esm-billing-app/src/claims/dashboard/claims-breakdown/claims-breakdown.scss diff --git a/packages/esm-billing-app/src/claims/dashboard/claims-dashboard.component.tsx b/packages/esm-billing-app/src/claims/dashboard/claims-dashboard.component.tsx new file mode 100755 index 00000000..dc87cbeb --- /dev/null +++ b/packages/esm-billing-app/src/claims/dashboard/claims-dashboard.component.tsx @@ -0,0 +1,41 @@ +import React from 'react'; +import { useParams } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { usePatient, ErrorState } from '@openmrs/esm-framework'; +import styles from './header/claims-header.scss'; +import { InlineLoading } from '@carbon/react'; +import { useBill } from '../../billing.resource'; +import ClaimsHeader from './header/claims-header.component'; + +const ClaimScreen: React.FC = () => { + const { billUuid, patientUuid } = useParams(); + const { t } = useTranslation(); + + const { patient, isLoading: isLoadingPatient } = usePatient(patientUuid); + const { bill, isLoading: isLoadingBill, error } = useBill(billUuid); + + if (isLoadingPatient && isLoadingBill) { + return ( +
+ +
+ ); + } + + if (error) { + return ( +
+ +
+ ); + } + + return ; +}; + +export default ClaimScreen; diff --git a/packages/esm-billing-app/src/claims/dashboard/form/claims-form.component.tsx b/packages/esm-billing-app/src/claims/dashboard/form/claims-form.component.tsx new file mode 100755 index 00000000..8c315d94 --- /dev/null +++ b/packages/esm-billing-app/src/claims/dashboard/form/claims-form.component.tsx @@ -0,0 +1,396 @@ +import React, { useEffect, useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { + Column, + TextArea, + Form, + Layer, + Stack, + TextInput, + Row, + ButtonSet, + Button, + FilterableMultiSelect, + MultiSelect, + InlineLoading, +} from '@carbon/react'; +import styles from './claims-form.scss'; +import { type MappedBill, type LineItem } from '../../../types'; +import { navigate, showSnackbar } from '@openmrs/esm-framework'; +import { useSystemSetting } from '../../../hooks/getMflCode'; +import { useParams } from 'react-router-dom'; +import { processClaims, useProviders, useVisit } from './claims-form.resource'; +import { useForm, Controller } from 'react-hook-form'; +import { z } from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { extractNameString, formatDate } from '../../../helpers/functions'; + +type ClaimsFormProps = { + bill: MappedBill; + selectedLineItems: LineItem[]; +}; + +const ClaimsFormSchema = z.object({ + claimCode: z.string().nonempty({ message: 'Claim code is required' }), + guaranteeId: z.string().nonempty({ message: 'Guarantee Id is required' }), + claimExplanation: z.string().nonempty({ message: 'Claim explanation is required' }), + claimJustification: z.string().nonempty({ message: 'Claim justification is required' }), + providerName: z + .array( + z.object({ + id: z.string(), + text: z.string(), + }), + ) + .nonempty({ message: 'At least one provider is required' }), + diagnoses: z + .array( + z.object({ + id: z.string(), + text: z.string(), + }), + ) + .nonempty({ message: 'At least one diagnosis is required' }), + visitType: z.string().nonempty({ message: 'Visit type is required' }), + facility: z.string().nonempty({ message: 'Facility is required' }), + treatmentStart: z.string().nonempty({ message: 'Treatment start date is required' }), + treatmentEnd: z.string().nonempty({ message: 'Treatment end date is required' }), +}); + +const ClaimsForm: React.FC = ({ bill, selectedLineItems }) => { + const { t } = useTranslation(); + const { mflCodeValue } = useSystemSetting('facility.mflcode'); + const { patientUuid, billUuid } = useParams(); + const { visits: recentVisit } = useVisit(patientUuid); + const visitUuid = recentVisit?.visitType.uuid; + + const { data } = useProviders(); + const [loading, setLoading] = useState(false); + const providers = data?.data.results.map((provider) => ({ id: provider.uuid, text: provider.display })) || []; + + const handleNavigateToBillingOptions = () => + navigate({ + to: window.getOpenmrsSpaBase() + `home/billing/patient/${patientUuid}/${billUuid}`, + }); + + const diagnoses = useMemo(() => { + return ( + recentVisit?.encounters?.flatMap( + (encounter) => + encounter.diagnoses.map((diagnosis) => ({ + id: diagnosis.diagnosis.coded.uuid, + text: diagnosis.display, + certainty: diagnosis.certainty, + })) || [], + ) || [] + ); + }, [recentVisit]); + + const confirmedDiagnoses = useMemo(() => { + return diagnoses.filter((diagnosis) => diagnosis.certainty === 'CONFIRMED'); + }, [diagnoses]); + + const { + control, + handleSubmit, + formState: { errors, isValid }, + setValue, + reset, + } = useForm({ + mode: 'all', + resolver: zodResolver(ClaimsFormSchema), + defaultValues: { + claimCode: '', + guaranteeId: '', + claimExplanation: '', + claimJustification: '', + providerName: [], + diagnoses: [], + visitType: recentVisit?.visitType?.display || '', + facility: `${recentVisit?.location?.display || ''} - ${mflCodeValue || ''}`, + treatmentStart: recentVisit?.startDatetime ? formatDate(recentVisit.startDatetime) : '', + treatmentEnd: recentVisit?.stopDatetime ? formatDate(recentVisit.stopDatetime) : '', + }, + }); + + const onSubmit = async (data) => { + setLoading(true); + const providedItems = selectedLineItems.reduce((acc, item) => { + acc[item.uuid] = { + items: [ + { + uuid: item.itemOrServiceConceptUuid, + price: item.price, + quantity: item.quantity, + }, + ], + explanation: data.claimExplanation, + justification: data.claimJustification, + }; + return acc; + }, {}); + + const payload = { + providedItems, + claimExplanation: data.claimExplanation, + claimJustification: data.claimJustification, + startDate: data.treatmentStart, + endDate: data.treatmentEnd, + location: mflCodeValue, + diagnoses: data.diagnoses.map((diagnosis) => diagnosis.id), + paidInFacility: true, + patient: patientUuid, + visitType: visitUuid, + guaranteeId: data.guaranteeId, + providers: data.providerName.map((provider) => provider.id), + claimCode: data.claimCode, + use: 'claim', + insurer: 'SHA', + billNumber: billUuid, + }; + try { + await processClaims(payload); + showSnackbar({ + kind: 'success', + title: t('processClaim', 'Process Claim'), + subtitle: t('sendClaim', 'Claim sent successfully'), + timeoutInMs: 3000, + isLowContrast: true, + }); + reset(); + setTimeout(() => { + navigate({ + to: window.getOpenmrsSpaBase() + `home/billing/`, + }); + }, 2000); + } catch (err) { + console.error(err); + showSnackbar({ + kind: 'error', + title: t('claimError', 'Claim Error'), + subtitle: t('sendClaimError', 'Request Failed, Please try later........'), + timeoutInMs: 2500, + isLowContrast: true, + }); + } finally { + setLoading(false); + } + }; + + useEffect(() => { + setValue('diagnoses', confirmedDiagnoses); + setValue('visitType', recentVisit?.visitType?.display || ''); + setValue('facility', `${recentVisit?.location?.display || ''} - ${mflCodeValue || ''}`); + setValue('treatmentStart', recentVisit?.startDatetime ? formatDate(recentVisit.startDatetime) : ''); + setValue('treatmentEnd', recentVisit?.stopDatetime ? formatDate(recentVisit.stopDatetime) : ''); + }, [confirmedDiagnoses, recentVisit, mflCodeValue, setValue]); + return ( + + + {t('formTitle', 'Fill in the form details')} + + + + ( + + )} + /> + + + + + ( + + )} + /> + + + + + + + ( + + )} + /> + + + + + ( + + )} + /> + + + + + + ( + (item ? item.text : '')} + selectionFeedback="top-after-reopen" + selectedItems={field.value} + onChange={({ selectedItems }) => field.onChange(selectedItems)} + /> + )} + /> + + + + + ( + (item ? extractNameString(item.text) : '')} + selectionFeedback="top-after-reopen" + selectedItems={field.value} + onChange={({ selectedItems }) => field.onChange(selectedItems)} + /> + )} + /> + + + + + + ( + + )} + /> + + + + + ( + + )} + /> + + + + + + ( +