@bathiran212/esm-patient-chart-app 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/108.js +1 -0
- package/dist/108.js.map +1 -0
- package/dist/1339.js +1 -0
- package/dist/1339.js.map +1 -0
- package/dist/1480.js +1 -0
- package/dist/1480.js.map +1 -0
- package/dist/1543.js +1 -0
- package/dist/1543.js.map +1 -0
- package/dist/1582.js +1 -0
- package/dist/1582.js.map +1 -0
- package/dist/1646.js +1 -0
- package/dist/1646.js.map +1 -0
- package/dist/1797.js +1 -0
- package/dist/1797.js.map +1 -0
- package/dist/1869.js +1 -0
- package/dist/1869.js.map +1 -0
- package/dist/1877.js +1 -0
- package/dist/1877.js.map +1 -0
- package/dist/2020.js +1 -0
- package/dist/2020.js.map +1 -0
- package/dist/2246.js +1 -0
- package/dist/2246.js.map +1 -0
- package/dist/2317.js +1 -0
- package/dist/2317.js.map +1 -0
- package/dist/2416.js +1 -0
- package/dist/2416.js.map +1 -0
- package/dist/2790.js +1 -0
- package/dist/2790.js.map +1 -0
- package/dist/282.js +1 -0
- package/dist/282.js.map +1 -0
- package/dist/2881.js +1 -0
- package/dist/2881.js.map +1 -0
- package/dist/3137.js +1 -0
- package/dist/3137.js.map +1 -0
- package/dist/3378.js +1 -0
- package/dist/3378.js.map +1 -0
- package/dist/3390.js +1 -0
- package/dist/3390.js.map +1 -0
- package/dist/3536.js +1 -0
- package/dist/3536.js.map +1 -0
- package/dist/3720.js +1 -0
- package/dist/3720.js.map +1 -0
- package/dist/3857.js +1 -0
- package/dist/3857.js.map +1 -0
- package/dist/3925.js +1 -0
- package/dist/3925.js.map +1 -0
- package/dist/3963.js +1 -0
- package/dist/3963.js.map +1 -0
- package/dist/3989.js +1 -0
- package/dist/3989.js.map +1 -0
- package/dist/4092.js +1 -0
- package/dist/4092.js.map +1 -0
- package/dist/4106.js +1 -0
- package/dist/4106.js.map +1 -0
- package/dist/4111.js +1 -0
- package/dist/4111.js.map +1 -0
- package/dist/4145.js +1 -0
- package/dist/4145.js.map +1 -0
- package/dist/434.js +1 -0
- package/dist/434.js.map +1 -0
- package/dist/4348.js +1 -0
- package/dist/4348.js.map +1 -0
- package/dist/4383.js +1 -0
- package/dist/4383.js.map +1 -0
- package/dist/4540.js +1 -0
- package/dist/4540.js.map +1 -0
- package/dist/4658.js +1 -0
- package/dist/4658.js.map +1 -0
- package/dist/466.js +1 -0
- package/dist/466.js.map +1 -0
- package/dist/4913.js +1 -0
- package/dist/4913.js.map +1 -0
- package/dist/4928.js +1 -0
- package/dist/4928.js.map +1 -0
- package/dist/5069.js +1 -0
- package/dist/5069.js.map +1 -0
- package/dist/5117.js +1 -0
- package/dist/5117.js.map +1 -0
- package/dist/5132.js +1 -0
- package/dist/5132.js.map +1 -0
- package/dist/5145.js +1 -0
- package/dist/5145.js.map +1 -0
- package/dist/52.js +1 -0
- package/dist/52.js.map +1 -0
- package/dist/5422.js +1 -0
- package/dist/5422.js.map +1 -0
- package/dist/5503.js +1 -0
- package/dist/5503.js.map +1 -0
- package/dist/5549.js +1 -0
- package/dist/5549.js.map +1 -0
- package/dist/556.js +1 -0
- package/dist/556.js.map +1 -0
- package/dist/5644.js +1 -0
- package/dist/5644.js.map +1 -0
- package/dist/5697.js +1 -0
- package/dist/5697.js.map +1 -0
- package/dist/5793.js +1 -0
- package/dist/5793.js.map +1 -0
- package/dist/5940.js +1 -0
- package/dist/5940.js.map +1 -0
- package/dist/5952.js +1 -0
- package/dist/5952.js.map +1 -0
- package/dist/6047.js +1 -0
- package/dist/6047.js.map +1 -0
- package/dist/6371.js +1 -0
- package/dist/6371.js.map +1 -0
- package/dist/6377.js +1 -0
- package/dist/6377.js.map +1 -0
- package/dist/6444.js +1 -0
- package/dist/6444.js.map +1 -0
- package/dist/6479.js +1 -0
- package/dist/6479.js.map +1 -0
- package/dist/6508.js +1 -0
- package/dist/6508.js.map +1 -0
- package/dist/6724.js +1 -0
- package/dist/6724.js.map +1 -0
- package/dist/6759.js +27 -0
- package/dist/6759.js.map +1 -0
- package/dist/689.js +1 -0
- package/dist/689.js.map +1 -0
- package/dist/6904.js +1 -0
- package/dist/6904.js.map +1 -0
- package/dist/7045.js +1 -0
- package/dist/7045.js.map +1 -0
- package/dist/7175.js +1 -0
- package/dist/7175.js.map +1 -0
- package/dist/7182.js +1 -0
- package/dist/7182.js.map +1 -0
- package/dist/7302.js +1 -0
- package/dist/7302.js.map +1 -0
- package/dist/7646.js +17 -0
- package/dist/7646.js.map +1 -0
- package/dist/7742.js +1 -0
- package/dist/7742.js.map +1 -0
- package/dist/7912.js +1 -0
- package/dist/7912.js.map +1 -0
- package/dist/8105.js +21 -0
- package/dist/8105.js.map +1 -0
- package/dist/8202.js +1 -0
- package/dist/8202.js.map +1 -0
- package/dist/8349.js +1 -0
- package/dist/8349.js.map +1 -0
- package/dist/8358.js +1 -0
- package/dist/8358.js.map +1 -0
- package/dist/8359.js +1 -0
- package/dist/8359.js.map +1 -0
- package/dist/8695.js +1 -0
- package/dist/8695.js.map +1 -0
- package/dist/8702.js +1 -0
- package/dist/8702.js.map +1 -0
- package/dist/8894.js +1 -0
- package/dist/8894.js.map +1 -0
- package/dist/8958.js +1 -0
- package/dist/8958.js.map +1 -0
- package/dist/903.js +1 -0
- package/dist/903.js.map +1 -0
- package/dist/9061.js +1 -0
- package/dist/9061.js.map +1 -0
- package/dist/9072.js +1 -0
- package/dist/9072.js.map +1 -0
- package/dist/9105.js +1 -0
- package/dist/9105.js.map +1 -0
- package/dist/9107.js +1 -0
- package/dist/9107.js.map +1 -0
- package/dist/9456.js +1 -0
- package/dist/9456.js.map +1 -0
- package/dist/9586.js +1 -0
- package/dist/9586.js.map +1 -0
- package/dist/9712.js +1 -0
- package/dist/9712.js.map +1 -0
- package/dist/9771.js +1 -0
- package/dist/9771.js.map +1 -0
- package/dist/9806.js +1 -0
- package/dist/9806.js.map +1 -0
- package/dist/9873.js +1 -0
- package/dist/9873.js.map +1 -0
- package/dist/9927.js +1 -0
- package/dist/9927.js.map +1 -0
- package/dist/main.js +6 -0
- package/dist/main.js.map +1 -0
- package/dist/openmrs-esm-patient-chart-app.js +6 -0
- package/dist/openmrs-esm-patient-chart-app.js.buildmanifest.json +2386 -0
- package/dist/openmrs-esm-patient-chart-app.js.map +1 -0
- package/dist/routes.json +1 -0
- package/package.json +63 -0
- package/rspack.config.js +1 -0
- package/src/actions-buttons/action-button.scss +3 -0
- package/src/actions-buttons/delete-visit.component.tsx +41 -0
- package/src/actions-buttons/delete-visit.test.tsx +26 -0
- package/src/actions-buttons/mark-patient-alive.component.tsx +42 -0
- package/src/actions-buttons/mark-patient-deceased.component.tsx +35 -0
- package/src/actions-buttons/start-visit.component.tsx +41 -0
- package/src/actions-buttons/start-visit.test.tsx +44 -0
- package/src/actions-buttons/stop-visit.component.tsx +39 -0
- package/src/actions-buttons/stop-visit.test.tsx +27 -0
- package/src/clinical-views/encounter-list/encounter-list-tabs.extension.tsx +78 -0
- package/src/clinical-views/encounter-list/encounter-list-tabs.scss +7 -0
- package/src/clinical-views/encounter-list/encounter-list.component.tsx +306 -0
- package/src/clinical-views/encounter-list/encounter-list.scss +36 -0
- package/src/clinical-views/encounter-list/table.component.tsx +63 -0
- package/src/clinical-views/encounter-list/table.scss +11 -0
- package/src/clinical-views/encounter-list/tag.component.test.tsx +307 -0
- package/src/clinical-views/encounter-list/tag.component.tsx +43 -0
- package/src/clinical-views/encounter-tile/clinical-views-summary.component.tsx +40 -0
- package/src/clinical-views/encounter-tile/encounter-tile.component.tsx +94 -0
- package/src/clinical-views/encounter-tile/tile.scss +82 -0
- package/src/clinical-views/hooks/index.ts +3 -0
- package/src/clinical-views/hooks/useEncounterRows.ts +60 -0
- package/src/clinical-views/hooks/useEncountersByVisit.ts +13 -0
- package/src/clinical-views/hooks/useFormsJson.ts +15 -0
- package/src/clinical-views/hooks/useLastEncounter.ts +29 -0
- package/src/clinical-views/types.ts +305 -0
- package/src/clinical-views/utils/concept-utils.ts +24 -0
- package/src/clinical-views/utils/encounter-list-config-builder.ts +160 -0
- package/src/clinical-views/utils/encounter-list.resource.ts +26 -0
- package/src/clinical-views/utils/helpers.ts +226 -0
- package/src/clinical-views/utils/index.ts +90 -0
- package/src/config-schema.ts +235 -0
- package/src/constants.ts +11 -0
- package/src/dashboard.meta.ts +15 -0
- package/src/data.resource.ts +117 -0
- package/src/declarations.d.ts +4 -0
- package/src/index.ts +204 -0
- package/src/loader/loader.component.tsx +11 -0
- package/src/loader/loader.scss +9 -0
- package/src/mark-patient-alive/mark-patient-alive.modal.tsx +54 -0
- package/src/mark-patient-deceased/mark-patient-deceased-form.scss +175 -0
- package/src/mark-patient-deceased/mark-patient-deceased-form.test.tsx +203 -0
- package/src/mark-patient-deceased/mark-patient-deceased-form.workspace.tsx +295 -0
- package/src/offline.ts +41 -0
- package/src/patient-banner-tags/visit-attribute-tags.extension.tsx +62 -0
- package/src/patient-banner-tags/visit-attribute-tags.scss +8 -0
- package/src/patient-chart/chart-review/chart-review.component.tsx +138 -0
- package/src/patient-chart/chart-review/chart-review.test.tsx +77 -0
- package/src/patient-chart/chart-review/dashboard-view.component.tsx +85 -0
- package/src/patient-chart/chart-review/dashboard-view.scss +84 -0
- package/src/patient-chart/patient-chart.component.tsx +71 -0
- package/src/patient-chart/patient-chart.resources.test.ts +238 -0
- package/src/patient-chart/patient-chart.resources.ts +231 -0
- package/src/patient-chart/patient-chart.scss +65 -0
- package/src/patient-details-tile/patient-details-tile.component.tsx +25 -0
- package/src/patient-details-tile/patient-details-tile.scss +24 -0
- package/src/root.component.tsx +35 -0
- package/src/root.scss +54 -0
- package/src/routes.json +267 -0
- package/src/side-nav/side-menu.component.tsx +10 -0
- package/src/side-nav/side-menu.scss +38 -0
- package/src/side-nav/side-menu.test.tsx +27 -0
- package/src/utils.test.ts +17 -0
- package/src/utils.ts +5 -0
- package/src/visit/hooks/useDefaultFacilityLocation.tsx +15 -0
- package/src/visit/hooks/useDefaultVisitLocation.tsx +24 -0
- package/src/visit/hooks/useDeleteVisit.test.tsx +267 -0
- package/src/visit/hooks/useDeleteVisit.tsx +103 -0
- package/src/visit/hooks/useOfflineVisitType.tsx +18 -0
- package/src/visit/hooks/useRecommendedVisitTypes.tsx +34 -0
- package/src/visit/hooks/useVisitAttributeType.tsx +102 -0
- package/src/visit/start-visit-button.component.tsx +47 -0
- package/src/visit/start-visit-button.test.tsx +32 -0
- package/src/visit/visit-action-items/delete-visit-action-item.component.tsx +60 -0
- package/src/visit/visit-action-items/delete-visit-action-item.test.tsx +48 -0
- package/src/visit/visit-action-items/edit-visit-details.component.tsx +79 -0
- package/src/visit/visit-form/base-visit-type.component.tsx +121 -0
- package/src/visit/visit-form/base-visit-type.scss +75 -0
- package/src/visit/visit-form/base-visit-type.test.tsx +153 -0
- package/src/visit/visit-form/exported-visit-form.workspace.tsx +755 -0
- package/src/visit/visit-form/location-selector.component.tsx +86 -0
- package/src/visit/visit-form/location-selector.test.tsx +146 -0
- package/src/visit/visit-form/recommended-visit-type.component.tsx +32 -0
- package/src/visit/visit-form/visit-attribute-type.component.tsx +258 -0
- package/src/visit/visit-form/visit-attribute-type.scss +5 -0
- package/src/visit/visit-form/visit-date-time.component.tsx +206 -0
- package/src/visit/visit-form/visit-form.resource.ts +401 -0
- package/src/visit/visit-form/visit-form.scss +167 -0
- package/src/visit/visit-form/visit-form.test.tsx +1233 -0
- package/src/visit/visit-form/visit-form.workspace.tsx +61 -0
- package/src/visit/visit-form/visit-type.test.tsx +88 -0
- package/src/visit/visit-history-table/visit-actions-cell.component.tsx +20 -0
- package/src/visit/visit-history-table/visit-actions-cell.scss +4 -0
- package/src/visit/visit-history-table/visit-date-cell.component.tsx +19 -0
- package/src/visit/visit-history-table/visit-diagnoses-cell.component.tsx +18 -0
- package/src/visit/visit-history-table/visit-history-table.component.tsx +145 -0
- package/src/visit/visit-history-table/visit-history-table.scss +25 -0
- package/src/visit/visit-history-table/visit-type-cell.component.tsx +15 -0
- package/src/visit/visit-prompt/delete-visit-dialog.modal.tsx +46 -0
- package/src/visit/visit-prompt/delete-visit-dialog.test.tsx +79 -0
- package/src/visit/visit-prompt/end-visit-dialog.modal.tsx +82 -0
- package/src/visit/visit-prompt/end-visit-dialog.scss +7 -0
- package/src/visit/visit-prompt/end-visit-dialog.test.tsx +131 -0
- package/src/visit/visit-prompt/modify-visit-date.modal.tsx +40 -0
- package/src/visit/visit-prompt/start-visit-dialog.modal.tsx +64 -0
- package/src/visit/visit-prompt/start-visit-dialog.scss +10 -0
- package/src/visit/visit-prompt/start-visit-dialog.test.tsx +40 -0
- package/src/visit/visits-widget/active-visit-buttons/active-visit-buttons.scss +7 -0
- package/src/visit/visits-widget/active-visit-buttons/active-visit-buttons.tsx +178 -0
- package/src/visit/visits-widget/current-visit-summary.extension.tsx +48 -0
- package/src/visit/visits-widget/current-visit-summary.scss +10 -0
- package/src/visit/visits-widget/current-visit-summary.test.tsx +85 -0
- package/src/visit/visits-widget/encounter-observations/encounter-observations.component.tsx +67 -0
- package/src/visit/visits-widget/encounter-observations/index.ts +3 -0
- package/src/visit/visits-widget/encounter-observations/styles.scss +22 -0
- package/src/visit/visits-widget/past-visits-components/delete-encounter.modal.tsx +47 -0
- package/src/visit/visits-widget/past-visits-components/delete-encounter.scss +9 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/all-encounters-table.component.tsx +49 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/completed-forms-table.component.tsx +67 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/completed-forms-table.test.tsx +146 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/encounters-table.component.tsx +452 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/encounters-table.resource.test.ts +156 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/encounters-table.resource.ts +215 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/encounters-table.scss +113 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/encounters-table.test.tsx +432 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/visit-completed-forms-table.component.tsx +61 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/visit-completed-forms-table.test.tsx +125 -0
- package/src/visit/visits-widget/past-visits-components/encounters-table/visit-encounters-table.component.tsx +47 -0
- package/src/visit/visits-widget/past-visits-components/medications-summary.component.tsx +163 -0
- package/src/visit/visits-widget/past-visits-components/notes-summary.component.tsx +66 -0
- package/src/visit/visits-widget/past-visits-components/patient-notes-summary.component.tsx +318 -0
- package/src/visit/visits-widget/past-visits-components/tests-summary.component.tsx +16 -0
- package/src/visit/visits-widget/past-visits-components/visit-summary.component.tsx +192 -0
- package/src/visit/visits-widget/past-visits-components/visit-summary.scss +72 -0
- package/src/visit/visits-widget/past-visits-components/visit-summary.test.tsx +105 -0
- package/src/visit/visits-widget/single-visit-details/visit-timeline/visit-timeline.component.tsx +94 -0
- package/src/visit/visits-widget/single-visit-details/visit-timeline/visit-timeline.scss +60 -0
- package/src/visit/visits-widget/visit-context/retrospective-data-date-time-picker/restrospective-date-time-picker.scss +35 -0
- package/src/visit/visits-widget/visit-context/retrospective-data-date-time-picker/retrospective-date-time-picker.component.tsx +140 -0
- package/src/visit/visits-widget/visit-context/visit-context-header.extension.tsx +61 -0
- package/src/visit/visits-widget/visit-context/visit-context-header.scss +45 -0
- package/src/visit/visits-widget/visit-context/visit-context-header.test.tsx +59 -0
- package/src/visit/visits-widget/visit-context/visit-context-info.component.tsx +37 -0
- package/src/visit/visits-widget/visit-context/visit-context-info.scss +12 -0
- package/src/visit/visits-widget/visit-context/visit-context-switcher.modal.tsx +166 -0
- package/src/visit/visits-widget/visit-context/visit-context-switcher.scss +83 -0
- package/src/visit/visits-widget/visit-context/visit-context-switcher.test.tsx +79 -0
- package/src/visit/visits-widget/visit-detail-overview.component.tsx +67 -0
- package/src/visit/visits-widget/visit-detail-overview.scss +301 -0
- package/src/visit/visits-widget/visit-detail-overview.test.tsx +205 -0
- package/src/visit/visits-widget/visit.resource.tsx +146 -0
- package/translations/am.json +209 -0
- package/translations/ar.json +209 -0
- package/translations/ar_SY.json +209 -0
- package/translations/bn.json +209 -0
- package/translations/cs.json +209 -0
- package/translations/de.json +209 -0
- package/translations/en.json +209 -0
- package/translations/en_US.json +209 -0
- package/translations/es.json +209 -0
- package/translations/es_MX.json +209 -0
- package/translations/fr.json +209 -0
- package/translations/he.json +209 -0
- package/translations/hi.json +209 -0
- package/translations/hi_IN.json +209 -0
- package/translations/id.json +209 -0
- package/translations/it.json +209 -0
- package/translations/ka.json +209 -0
- package/translations/km.json +209 -0
- package/translations/ku.json +209 -0
- package/translations/ky.json +209 -0
- package/translations/lg.json +209 -0
- package/translations/ne.json +209 -0
- package/translations/pl.json +209 -0
- package/translations/pt.json +209 -0
- package/translations/pt_BR.json +209 -0
- package/translations/qu.json +209 -0
- package/translations/ro_RO.json +209 -0
- package/translations/ru_RU.json +209 -0
- package/translations/si.json +209 -0
- package/translations/sq.json +209 -0
- package/translations/sw.json +209 -0
- package/translations/sw_KE.json +209 -0
- package/translations/tr.json +209 -0
- package/translations/tr_TR.json +209 -0
- package/translations/uk.json +209 -0
- package/translations/uz.json +209 -0
- package/translations/uz@Latn.json +209 -0
- package/translations/uz_UZ.json +209 -0
- package/translations/vi.json +209 -0
- package/translations/zh.json +209 -0
- package/translations/zh_CN.json +209 -0
- package/translations/zh_TW.json +209 -0
- package/tsconfig.json +4 -0
- package/vitest.config.ts +4 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import useSWR from 'swr';
|
|
4
|
+
import {
|
|
5
|
+
launchWorkspaceGroup2,
|
|
6
|
+
openmrsFetch,
|
|
7
|
+
restBaseUrl,
|
|
8
|
+
showSnackbar,
|
|
9
|
+
usePatient,
|
|
10
|
+
useVisit,
|
|
11
|
+
type Visit,
|
|
12
|
+
} from '@openmrs/esm-framework';
|
|
13
|
+
import { type PatientWorkspaceGroupProps, usePatientChartStore } from '@openmrs/esm-patient-common-lib';
|
|
14
|
+
|
|
15
|
+
const defaultVisitCustomRepresentation =
|
|
16
|
+
'custom:(uuid,display,voided,indication,startDatetime,stopDatetime,' +
|
|
17
|
+
'encounters:(uuid,display,encounterDatetime,' +
|
|
18
|
+
'form:(uuid,name),location:ref,' +
|
|
19
|
+
'encounterType:ref,' +
|
|
20
|
+
'encounterProviders:(uuid,display,' +
|
|
21
|
+
'provider:(uuid,display))),' +
|
|
22
|
+
'patient:(uuid,display),' +
|
|
23
|
+
'visitType:(uuid,name,display),' +
|
|
24
|
+
'attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),' +
|
|
25
|
+
'location:(uuid,name,display))';
|
|
26
|
+
|
|
27
|
+
type WorkspaceGroupLaunchKey = {
|
|
28
|
+
patientUuid: string | null;
|
|
29
|
+
visitContextUuid: string | null;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// The workspace group is current only when it was launched for this patient and visit context.
|
|
33
|
+
function getWorkspaceGroupLaunchKey(groupProps: PatientWorkspaceGroupProps | null): WorkspaceGroupLaunchKey {
|
|
34
|
+
return {
|
|
35
|
+
patientUuid: groupProps?.patientUuid ?? null,
|
|
36
|
+
visitContextUuid: groupProps?.visitContext?.uuid ?? null,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function workspaceGroupLaunchKeysEqual(a: WorkspaceGroupLaunchKey | null, b: WorkspaceGroupLaunchKey | null) {
|
|
41
|
+
return a?.patientUuid === b?.patientUuid && a?.visitContextUuid === b?.visitContextUuid;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function useVisitByUuid(visitUuid: string | null, representation: string = defaultVisitCustomRepresentation) {
|
|
45
|
+
const url = `${restBaseUrl}/visit/${visitUuid}?v=${representation}`;
|
|
46
|
+
const { data, ...rest } = useSWR<{ data: Visit }>(visitUuid ? url : null, openmrsFetch);
|
|
47
|
+
return { visit: data?.data, ...rest };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* This hook manages fetching of the patient and the visitContext
|
|
52
|
+
* when entering the patient chart, and the associated updated to patient chart store.
|
|
53
|
+
*
|
|
54
|
+
* The patient chart store sets the patient when we enter the patient chart
|
|
55
|
+
* and unsets the patient when we leave. (This gives extensions and workspaces a way
|
|
56
|
+
* to check whether they are rendered within the patient chart app.)
|
|
57
|
+
* Note: We do not unset visitContext when leaving the chart, so it persists across
|
|
58
|
+
* in‑app navigation. On a full page reload, visitContext is rehydrated by refetching
|
|
59
|
+
* (via useVisit/useVisitByUuId) rather than restored from storage.
|
|
60
|
+
* When we enter the chart, we want to update the visit context as follows:
|
|
61
|
+
* does the the stored visitContext exist and belong to the patient?
|
|
62
|
+
* 1. If so, the visitContext should be valid but possibly stale; fetch the visit again
|
|
63
|
+
* and update the context
|
|
64
|
+
* 2. If not, fetch the active visit of the patient, If it exists, set it as the
|
|
65
|
+
* visitContext; otherwise, clear it.
|
|
66
|
+
* @param patientUuid
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
export function usePatientChartPatientAndVisit(patientUuid: string) {
|
|
70
|
+
const { t } = useTranslation();
|
|
71
|
+
const { isLoading: isLoadingPatient, patient } = usePatient(patientUuid);
|
|
72
|
+
const {
|
|
73
|
+
patientUuid: storePatientUuid,
|
|
74
|
+
setPatient,
|
|
75
|
+
visitContext,
|
|
76
|
+
mutateVisitContext,
|
|
77
|
+
setVisitContext,
|
|
78
|
+
} = usePatientChartStore(patientUuid);
|
|
79
|
+
|
|
80
|
+
const isVisitContextValid = visitContext?.patient.uuid === patientUuid;
|
|
81
|
+
const {
|
|
82
|
+
visit: newVisitContext,
|
|
83
|
+
mutate: newMutateVisitContext,
|
|
84
|
+
isValidating: isValidatingVisitContext,
|
|
85
|
+
} = useVisitByUuid(isVisitContextValid ? visitContext.uuid : null);
|
|
86
|
+
const {
|
|
87
|
+
activeVisit,
|
|
88
|
+
isValidating: isValidatingActiveVisit,
|
|
89
|
+
mutate: mutateActiveVisit,
|
|
90
|
+
} = useVisit(isVisitContextValid ? null : patientUuid);
|
|
91
|
+
|
|
92
|
+
const launchedWorkspaceGroupKey = useRef<WorkspaceGroupLaunchKey | null>(null);
|
|
93
|
+
const latestWorkspaceGroupProps = useRef<PatientWorkspaceGroupProps | null>(null);
|
|
94
|
+
const isWorkspaceGroupLaunchPending = useRef(false);
|
|
95
|
+
const isMounted = useRef(false);
|
|
96
|
+
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
isMounted.current = true;
|
|
99
|
+
return () => {
|
|
100
|
+
isMounted.current = false;
|
|
101
|
+
};
|
|
102
|
+
}, []);
|
|
103
|
+
|
|
104
|
+
const launchLatestWorkspaceGroup = useCallback(async () => {
|
|
105
|
+
if (isWorkspaceGroupLaunchPending.current) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
isWorkspaceGroupLaunchPending.current = true;
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
let needsLaunch = true;
|
|
113
|
+
while (needsLaunch) {
|
|
114
|
+
const groupProps = latestWorkspaceGroupProps.current;
|
|
115
|
+
const launchKey = getWorkspaceGroupLaunchKey(groupProps);
|
|
116
|
+
|
|
117
|
+
if (workspaceGroupLaunchKeysEqual(launchKey, launchedWorkspaceGroupKey.current)) {
|
|
118
|
+
needsLaunch = false;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (!isMounted.current) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const launched = await launchWorkspaceGroup2('patient-chart', groupProps);
|
|
127
|
+
|
|
128
|
+
if (!isMounted.current) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// launchWorkspaceGroup2 returns false when the user keeps the current workspace group open.
|
|
133
|
+
if (!launched) {
|
|
134
|
+
needsLaunch = false;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
launchedWorkspaceGroupKey.current = launchKey;
|
|
139
|
+
|
|
140
|
+
const latestLaunchKey = getWorkspaceGroupLaunchKey(latestWorkspaceGroupProps.current);
|
|
141
|
+
if (workspaceGroupLaunchKeysEqual(latestLaunchKey, launchedWorkspaceGroupKey.current)) {
|
|
142
|
+
needsLaunch = false;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
} finally {
|
|
146
|
+
isWorkspaceGroupLaunchPending.current = false;
|
|
147
|
+
}
|
|
148
|
+
}, []);
|
|
149
|
+
|
|
150
|
+
useEffect(() => {
|
|
151
|
+
const initializeWorkspaceGroup = async () => {
|
|
152
|
+
if (!isValidatingVisitContext && !isValidatingActiveVisit && patient) {
|
|
153
|
+
let groupProps: PatientWorkspaceGroupProps = null;
|
|
154
|
+
if (activeVisit) {
|
|
155
|
+
groupProps = {
|
|
156
|
+
patientUuid: patient.id,
|
|
157
|
+
patient,
|
|
158
|
+
visitContext: activeVisit,
|
|
159
|
+
mutateVisitContext: mutateActiveVisit,
|
|
160
|
+
};
|
|
161
|
+
} else if (newVisitContext) {
|
|
162
|
+
groupProps = {
|
|
163
|
+
patientUuid: patient.id,
|
|
164
|
+
patient,
|
|
165
|
+
visitContext: newVisitContext,
|
|
166
|
+
mutateVisitContext: newMutateVisitContext,
|
|
167
|
+
};
|
|
168
|
+
} else {
|
|
169
|
+
groupProps = {
|
|
170
|
+
patientUuid: patient.id,
|
|
171
|
+
patient,
|
|
172
|
+
visitContext: null,
|
|
173
|
+
mutateVisitContext: null,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
setVisitContext(groupProps.visitContext, groupProps.mutateVisitContext);
|
|
178
|
+
|
|
179
|
+
latestWorkspaceGroupProps.current = groupProps;
|
|
180
|
+
await launchLatestWorkspaceGroup();
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
initializeWorkspaceGroup().catch((error) => {
|
|
185
|
+
showSnackbar({
|
|
186
|
+
title: t('errorLaunchingWorkspaceGroup', 'Error launching workspace group'),
|
|
187
|
+
subtitle: error.message,
|
|
188
|
+
kind: 'error',
|
|
189
|
+
isLowContrast: false,
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
return () => {};
|
|
194
|
+
}, [
|
|
195
|
+
newVisitContext,
|
|
196
|
+
isValidatingVisitContext,
|
|
197
|
+
newMutateVisitContext,
|
|
198
|
+
setVisitContext,
|
|
199
|
+
activeVisit,
|
|
200
|
+
isValidatingActiveVisit,
|
|
201
|
+
storePatientUuid,
|
|
202
|
+
mutateActiveVisit,
|
|
203
|
+
patient,
|
|
204
|
+
t,
|
|
205
|
+
launchLatestWorkspaceGroup,
|
|
206
|
+
]);
|
|
207
|
+
|
|
208
|
+
useEffect(() => {
|
|
209
|
+
if (!isLoadingPatient) {
|
|
210
|
+
setPatient(patient);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return () => {
|
|
214
|
+
setPatient(null);
|
|
215
|
+
};
|
|
216
|
+
}, [patient, setPatient, isLoadingPatient]);
|
|
217
|
+
|
|
218
|
+
const state = useMemo(
|
|
219
|
+
() => ({
|
|
220
|
+
patientUuid,
|
|
221
|
+
patient: patient ?? {},
|
|
222
|
+
visitContext,
|
|
223
|
+
mutateVisitContext,
|
|
224
|
+
isLoadingPatient,
|
|
225
|
+
setPatient,
|
|
226
|
+
}),
|
|
227
|
+
[patient, patientUuid, visitContext, mutateVisitContext, isLoadingPatient, setPatient],
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
return state;
|
|
231
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/colors';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
|
+
|
|
5
|
+
$actionNavOffset: 45px;
|
|
6
|
+
$actionPanelOffset: 256px;
|
|
7
|
+
$actionPanelExpandedOffset: $actionNavOffset + $actionPanelOffset;
|
|
8
|
+
|
|
9
|
+
.patientInfoSlot {
|
|
10
|
+
> div:not(:last-child) {
|
|
11
|
+
border-bottom: 1px solid colors.$gray-20;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.grid {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: 1fr min-content;
|
|
18
|
+
grid-template-rows: 1fr;
|
|
19
|
+
align-items: stretch;
|
|
20
|
+
width: inherit;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.chartReview {
|
|
24
|
+
grid-row: 1;
|
|
25
|
+
grid-column: 1;
|
|
26
|
+
align-self: start;
|
|
27
|
+
height: 90%;
|
|
28
|
+
width: 100%;
|
|
29
|
+
margin: 0 auto;
|
|
30
|
+
padding-bottom: layout.$spacing-10;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.widthContained {
|
|
34
|
+
max-width: 60rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:global(.omrs-breakpoint-gt-small-desktop) .widthContained {
|
|
38
|
+
max-width: 80rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.chartContainer {
|
|
42
|
+
flex: 1;
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: flex-start;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.innerChartContainer {
|
|
49
|
+
display: flex;
|
|
50
|
+
width: 100%;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Overriding styles for RTL support
|
|
55
|
+
html[dir='rtl'] {
|
|
56
|
+
.chartContainer {
|
|
57
|
+
padding-right: unset;
|
|
58
|
+
padding-left: layout.$spacing-01;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:global(.omrs-breakpoint-lt-desktop) .innerChartContainer {
|
|
62
|
+
padding-left: 0;
|
|
63
|
+
margin-right: unset;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { capitalize } from 'lodash-es';
|
|
4
|
+
import { age, getPatientName, formatDate, parseDate } from '@openmrs/esm-framework';
|
|
5
|
+
import styles from './patient-details-tile.scss';
|
|
6
|
+
|
|
7
|
+
interface PatientDetailsTileInterface {
|
|
8
|
+
patient?: fhir.Patient;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const PatientDetailsTile: React.FC<PatientDetailsTileInterface> = ({ patient }) => {
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className={styles.container}>
|
|
16
|
+
<p className={styles.name}>{patient ? getPatientName(patient) : ''}</p>
|
|
17
|
+
<div className={styles.details}>
|
|
18
|
+
<span>{capitalize(patient?.gender)}</span> · <span>{age(patient?.birthDate)}</span> ·{' '}
|
|
19
|
+
<span>{formatDate(parseDate(patient?.birthDate), { mode: 'wide', time: false })}</span>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default PatientDetailsTile;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
|
+
|
|
5
|
+
.container:after {
|
|
6
|
+
content: '';
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: 1px;
|
|
9
|
+
position: absolute;
|
|
10
|
+
right: 0;
|
|
11
|
+
top: 0;
|
|
12
|
+
background-color: $color-gray-30;
|
|
13
|
+
margin: 0 layout.$spacing-05;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.details {
|
|
17
|
+
margin-top: 5px;
|
|
18
|
+
@include type.type-style('body-compact-01');
|
|
19
|
+
color: $text-02;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.name {
|
|
23
|
+
@include type.type-style('body-compact-02');
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
|
3
|
+
import { dashboardPath, spaRoot, basePath } from './constants';
|
|
4
|
+
import PatientChart from './patient-chart/patient-chart.component';
|
|
5
|
+
import styles from './root.scss';
|
|
6
|
+
|
|
7
|
+
export default function Root() {
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<div className={styles.patientChartWrapper}>
|
|
11
|
+
<BrowserRouter basename={spaRoot}>
|
|
12
|
+
<Routes>
|
|
13
|
+
<Route path={basePath} element={<PatientChart />} />
|
|
14
|
+
<Route path={dashboardPath} element={<PatientChart />} />
|
|
15
|
+
</Routes>
|
|
16
|
+
</BrowserRouter>
|
|
17
|
+
</div>
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* DO NOT REMOVE THIS COMMENT
|
|
24
|
+
* THE TRANSLATION KEYS AND VALUES USED IN THE COMMON LIB IS WRITTEN HERE
|
|
25
|
+
* t('paginationPageText', 'of {{count}} pages', {count})
|
|
26
|
+
* t("emptyStateText", 'There are no {{displayText}} to display for this patient', {displayText: "sample text"})
|
|
27
|
+
* t('record', 'Record')
|
|
28
|
+
* t('errorCopy','Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.')
|
|
29
|
+
* t('error', 'Error')
|
|
30
|
+
* t('seeAll', 'See all')
|
|
31
|
+
* t('paginationItemsCount', `{{pageItemsCount}} / {{count}} items`, { count: totalItems, pageItemsCount });
|
|
32
|
+
* t('Routine')
|
|
33
|
+
* t('Stat')
|
|
34
|
+
* t('On scheduled date')
|
|
35
|
+
*/
|
package/src/root.scss
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@use '@carbon/colors';
|
|
2
|
+
@use '@carbon/layout';
|
|
3
|
+
@use '@carbon/type';
|
|
4
|
+
|
|
5
|
+
.patientChartWrapper {
|
|
6
|
+
display: flex;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.patientChartWrapper {
|
|
11
|
+
& > nav {
|
|
12
|
+
padding-bottom: layout.$spacing-09;
|
|
13
|
+
scrollbar-width: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:global(.cds--side-nav__overlay-active) {
|
|
17
|
+
background-color: transparent;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:global(.omrs-breakpoint-gt-tablet) .patientChartWrapper {
|
|
22
|
+
margin-left: var(--omrs-sidenav-width);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Tablet side nav scrolling
|
|
26
|
+
:global(.omrs-breakpoint-lt-desktop) {
|
|
27
|
+
.patientChartWrapper {
|
|
28
|
+
:global(.cds--side-nav) {
|
|
29
|
+
height: calc(100vh - layout.$spacing-09 - var(--bottom-nav-height));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Overriding styles for RTL support
|
|
35
|
+
html[dir='rtl'] {
|
|
36
|
+
:global(.cds--date-picker-input__wrapper) {
|
|
37
|
+
svg {
|
|
38
|
+
left: layout.$spacing-05;
|
|
39
|
+
right: unset;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
:global(.cds--side-nav) {
|
|
43
|
+
right: 0;
|
|
44
|
+
:global(.active-left-nav-link) {
|
|
45
|
+
border-right: layout.$spacing-02 solid var(--brand-01);
|
|
46
|
+
border-left: unset;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:global(.omrs-breakpoint-gt-tablet) .patientChartWrapper {
|
|
51
|
+
margin-right: var(--omrs-sidenav-width);
|
|
52
|
+
margin-left: unset;
|
|
53
|
+
}
|
|
54
|
+
}
|
package/src/routes.json
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.openmrs.org/routes.schema.json",
|
|
3
|
+
"optionalBackendDependencies": {
|
|
4
|
+
"emrapi": {
|
|
5
|
+
"version": ">=2.0.0 <4.0.0",
|
|
6
|
+
"feature": {
|
|
7
|
+
"flagName": "emrapi-module",
|
|
8
|
+
"label": "EMR API Module",
|
|
9
|
+
"description": "This module, if installed, provides core EMR business logic."
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"extensions": [
|
|
14
|
+
{
|
|
15
|
+
"name": "charts-summary-dashboard",
|
|
16
|
+
"component": "patientSummaryDashboardLink",
|
|
17
|
+
"slot": "patient-chart-dashboard-slot",
|
|
18
|
+
"order": 0,
|
|
19
|
+
"meta": {
|
|
20
|
+
"slot": "patient-chart-summary-dashboard-slot",
|
|
21
|
+
"path": "patient-summary"
|
|
22
|
+
},
|
|
23
|
+
"online": true,
|
|
24
|
+
"offline": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "encounter-list",
|
|
28
|
+
"component": "encounterListTableTabs",
|
|
29
|
+
"online": true,
|
|
30
|
+
"offline": true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "start-visit-button",
|
|
34
|
+
"component": "startVisitActionButton",
|
|
35
|
+
"slot": "patient-actions-slot",
|
|
36
|
+
"online": true,
|
|
37
|
+
"offline": true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "clinical-views-summary",
|
|
41
|
+
"component": "clinicalViewsSummary",
|
|
42
|
+
"online": true,
|
|
43
|
+
"offline": true
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "stop-visit-button",
|
|
47
|
+
"component": "stopVisitActionButton",
|
|
48
|
+
"slot": "patient-actions-slot",
|
|
49
|
+
"online": true,
|
|
50
|
+
"offline": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "mark-alive-button",
|
|
54
|
+
"slot": "patient-actions-slot",
|
|
55
|
+
"component": "markPatientAliveActionButton",
|
|
56
|
+
"online": true,
|
|
57
|
+
"offline": true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "stop-visit-button-patient-search",
|
|
61
|
+
"slot": "patient-search-actions-slot",
|
|
62
|
+
"component": "stopVisitPatientSearchActionButton",
|
|
63
|
+
"online": true,
|
|
64
|
+
"offline": true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "delete-visit-button",
|
|
68
|
+
"slot": "patient-actions-slot",
|
|
69
|
+
"component": "deleteVisitActionMenuButton",
|
|
70
|
+
"online": true,
|
|
71
|
+
"offline": true,
|
|
72
|
+
"order": 1100
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "delete-visit-button",
|
|
76
|
+
"slot": "patient-search-actions-slot",
|
|
77
|
+
"component": "deleteVisitActionMenuButton",
|
|
78
|
+
"online": true,
|
|
79
|
+
"offline": true,
|
|
80
|
+
"order": 1100
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "mark-patient-deceased-button",
|
|
84
|
+
"slot": "patient-actions-slot",
|
|
85
|
+
"component": "markPatientDeceasedActionButton",
|
|
86
|
+
"online": true,
|
|
87
|
+
"offline": true
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "encounters-summary-dashboard",
|
|
91
|
+
"slot": "patient-chart-dashboard-slot",
|
|
92
|
+
"component": "encountersSummaryDashboardLink",
|
|
93
|
+
"meta": {
|
|
94
|
+
"slot": "patient-chart-encounters-dashboard-slot",
|
|
95
|
+
"path": "visits",
|
|
96
|
+
"layoutMode": "anchored"
|
|
97
|
+
},
|
|
98
|
+
"order": 5,
|
|
99
|
+
"online": true,
|
|
100
|
+
"offline": true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "past-visits-detail-overview",
|
|
104
|
+
"slot": "patient-chart-encounters-dashboard-slot",
|
|
105
|
+
"component": "pastVisitsDetailOverview",
|
|
106
|
+
"order": 1,
|
|
107
|
+
"meta": {
|
|
108
|
+
"title": "Visits",
|
|
109
|
+
"view": "visits"
|
|
110
|
+
},
|
|
111
|
+
"online": true,
|
|
112
|
+
"offline": true
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "patient-details-tile",
|
|
116
|
+
"slot": "visit-form-header-slot",
|
|
117
|
+
"component": "patientDetailsTile",
|
|
118
|
+
"order": 1,
|
|
119
|
+
"online": true,
|
|
120
|
+
"offline": true
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "start-visit-button-patient-search",
|
|
124
|
+
"slot": "start-visit-button-slot",
|
|
125
|
+
"component": "startVisitPatientSearchActionButton",
|
|
126
|
+
"online": true,
|
|
127
|
+
"offline": true
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "visit-attribute-tags",
|
|
131
|
+
"slot": "patient-banner-tags-slot",
|
|
132
|
+
"component": "visitAttributeTags",
|
|
133
|
+
"online": true,
|
|
134
|
+
"offline": true
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "current-visit-summary",
|
|
138
|
+
"component": "currentVisitSummary",
|
|
139
|
+
"online": true,
|
|
140
|
+
"offline": true,
|
|
141
|
+
"meta": {
|
|
142
|
+
"fullWidth": true
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "edit-visit-action-button",
|
|
147
|
+
"slot": "visit-detail-overview-actions",
|
|
148
|
+
"component": "editVisitDetailsActionButton",
|
|
149
|
+
"online": true,
|
|
150
|
+
"offline": true,
|
|
151
|
+
"order": 0
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "delete-visit-action-button",
|
|
155
|
+
"slot": "visit-detail-overview-actions",
|
|
156
|
+
"component": "deleteVisitActionButton",
|
|
157
|
+
"online": true,
|
|
158
|
+
"offline": true,
|
|
159
|
+
"order": 1
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "active-visit-action-button",
|
|
163
|
+
"slot": "active-visit-actions",
|
|
164
|
+
"component": "activeVisitActionsComponent",
|
|
165
|
+
"online": true,
|
|
166
|
+
"offline": true,
|
|
167
|
+
"order": 1
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "visit-context-header",
|
|
171
|
+
"slot": "visit-context-header-slot",
|
|
172
|
+
"component": "visitContextHeader"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "retrospective-date-time-picker",
|
|
176
|
+
"slot": "restrospective-date-time-picker-slot",
|
|
177
|
+
"component": "retrospectiveDateTimePicker"
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"featureFlags": [
|
|
181
|
+
{
|
|
182
|
+
"description": "Features to enter data for past visits. Includes the 'Edit Past Visit' button in the start visit dialog, and the 'Add Past Visit' button in the patient header",
|
|
183
|
+
"flagName": "rde",
|
|
184
|
+
"label": "Retrospective Data Entry"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"description": "When enabled, encounter summaries will display the full form layout instead of a simple observation list.",
|
|
188
|
+
"flagName": "enable-embedded-form-view",
|
|
189
|
+
"label": "Enable Embedded Form View"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"modals": [
|
|
193
|
+
{
|
|
194
|
+
"name": "delete-encounter-modal",
|
|
195
|
+
"component": "deleteEncounterModal"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "delete-visit-dialog",
|
|
199
|
+
"component": "deleteVisitModal"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "end-visit-dialog",
|
|
203
|
+
"component": "endVisitModal"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "mark-patient-alive-modal",
|
|
207
|
+
"component": "markPatientAliveModal"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "modify-visit-date-dialog",
|
|
211
|
+
"component": "modifyVisitDateModal"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "start-visit-dialog",
|
|
215
|
+
"component": "startVisitModal"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "visit-context-switcher",
|
|
219
|
+
"component": "visitContextSwitcherModal"
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"pages": [
|
|
223
|
+
{
|
|
224
|
+
"component": "root",
|
|
225
|
+
"routeRegex": "^patient\/.+\/chart",
|
|
226
|
+
"online": true,
|
|
227
|
+
"offline": true
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"workspaces2": [
|
|
231
|
+
{
|
|
232
|
+
"name": "mark-patient-deceased-workspace-form",
|
|
233
|
+
"component": "markPatientDeceasedForm",
|
|
234
|
+
"window": "mark-patient-deceased"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "start-visit-workspace-form",
|
|
238
|
+
"component": "startVisitWorkspace",
|
|
239
|
+
"window": "start-visit"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "patient-chart-appointments-form-workspace",
|
|
243
|
+
"component": "@openmrs/esm-appointments-app#exportedAppointmentsFormWorkspace",
|
|
244
|
+
"window": "patient-chart-appointment-form"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
"workspaceWindows2": [
|
|
248
|
+
{
|
|
249
|
+
"name": "start-visit",
|
|
250
|
+
"group": "patient-chart"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"name": "mark-patient-deceased",
|
|
254
|
+
"group": "patient-chart"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"name": "patient-chart-appointment-form",
|
|
258
|
+
"group": "patient-chart"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
"workspaceGroups2": [
|
|
262
|
+
{
|
|
263
|
+
"name": "patient-chart",
|
|
264
|
+
"scopePattern": "/patient/([^/]+)/chart"
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|