@kenyaemr/esm-express-workflow-app 5.4.3 → 5.4.4-pre.100
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/.turbo/turbo-build.log +7 -12
- package/dist/1074.js +1 -0
- package/dist/1074.js.map +1 -0
- package/dist/12.js +17 -0
- package/dist/12.js.map +1 -0
- package/dist/1311.js +1 -0
- package/dist/1311.js.map +1 -0
- package/dist/1323.js +1 -0
- package/dist/1323.js.map +1 -0
- package/dist/1469.js +1 -0
- package/dist/1469.js.map +1 -0
- package/dist/1506.js +13 -0
- package/dist/1506.js.map +1 -0
- package/dist/1562.js +1 -0
- package/dist/1562.js.map +1 -0
- package/dist/1760.js +1 -0
- package/dist/1760.js.map +1 -0
- package/dist/1780.js +1 -0
- package/dist/1780.js.map +1 -0
- package/dist/1804.js +1 -0
- package/dist/1804.js.map +1 -0
- package/dist/1884.js +1 -0
- package/dist/1884.js.map +1 -0
- package/dist/1972.js +1 -0
- package/dist/1972.js.map +1 -0
- package/dist/1990.js +1 -0
- package/dist/1990.js.map +1 -0
- package/dist/2016.js +1 -0
- package/dist/2016.js.map +1 -0
- package/dist/2024.js +1 -0
- package/dist/2024.js.map +1 -0
- package/dist/2153.js +1 -0
- package/dist/2153.js.map +1 -0
- package/dist/216.js +1 -0
- package/dist/216.js.map +1 -0
- package/dist/2225.js +1 -0
- package/dist/2225.js.map +1 -0
- package/dist/2294.js +1 -0
- package/dist/2294.js.map +1 -0
- package/dist/2345.js +1 -0
- package/dist/2345.js.map +1 -0
- package/dist/2499.js +1 -0
- package/dist/2499.js.map +1 -0
- package/dist/2500.js +1 -0
- package/dist/2500.js.map +1 -0
- package/dist/2586.js +1 -0
- package/dist/2586.js.map +1 -0
- package/dist/2625.js +1 -0
- package/dist/2625.js.map +1 -0
- package/dist/2685.js +1 -0
- package/dist/2685.js.map +1 -0
- package/dist/2809.js +1 -0
- package/dist/2809.js.map +1 -0
- package/dist/2851.js +1 -0
- package/dist/2851.js.map +1 -0
- package/dist/2881.js +1 -0
- package/dist/2881.js.map +1 -0
- package/dist/2948.js +1 -0
- package/dist/2948.js.map +1 -0
- package/dist/2968.js +1 -0
- package/dist/2968.js.map +1 -0
- package/dist/2978.js +1 -0
- package/dist/2978.js.map +1 -0
- package/dist/2998.js +1 -0
- package/dist/2998.js.map +1 -0
- package/dist/3089.js +1 -0
- package/dist/3089.js.map +1 -0
- package/dist/3548.js +1 -0
- package/dist/3548.js.map +1 -0
- package/dist/3567.js +1 -0
- package/dist/3567.js.map +1 -0
- package/dist/3569.js +1 -0
- package/dist/3569.js.map +1 -0
- package/dist/3571.js +1 -0
- package/dist/3571.js.map +1 -0
- package/dist/3691.js +1 -0
- package/dist/3691.js.map +1 -0
- package/dist/3730.js +1 -0
- package/dist/3730.js.map +1 -0
- package/dist/3923.js +1 -0
- package/dist/3923.js.map +1 -0
- package/dist/3963.js +1 -0
- package/dist/3963.js.map +1 -0
- package/dist/4024.js +1 -0
- package/dist/4024.js.map +1 -0
- package/dist/405.js +1 -0
- package/dist/405.js.map +1 -0
- package/dist/4071.js +1 -0
- package/dist/4071.js.map +1 -0
- package/dist/4271.js +1 -0
- package/dist/4271.js.map +1 -0
- package/dist/4296.js +1 -0
- package/dist/4296.js.map +1 -0
- package/dist/4337.js +1 -0
- package/dist/4337.js.map +1 -0
- package/dist/4432.js +1 -0
- package/dist/4432.js.map +1 -0
- package/dist/4581.js +1 -0
- package/dist/4581.js.map +1 -0
- package/dist/4637.js +11 -0
- package/dist/4637.js.map +1 -0
- package/dist/4666.js +1 -0
- package/dist/4666.js.map +1 -0
- package/dist/4680.js +1 -0
- package/dist/4680.js.map +1 -0
- package/dist/4735.js +1 -0
- package/dist/4735.js.map +1 -0
- package/dist/4737.js +1 -0
- package/dist/4737.js.map +1 -0
- package/dist/4744.js +1 -0
- package/dist/4744.js.map +1 -0
- package/dist/4795.js +1 -0
- package/dist/4795.js.map +1 -0
- package/dist/4813.js +2 -0
- package/dist/4813.js.map +1 -0
- package/dist/4818.js +1 -0
- package/dist/4818.js.map +1 -0
- package/dist/4858.js +1 -0
- package/dist/4858.js.map +1 -0
- package/dist/487.js +1 -0
- package/dist/487.js.map +1 -0
- package/dist/4970.js +1 -0
- package/dist/4970.js.map +1 -0
- package/dist/5038.js +1 -0
- package/dist/5038.js.map +1 -0
- package/dist/5202.js +1 -0
- package/dist/5202.js.map +1 -0
- package/dist/5491.js +1 -0
- package/dist/5491.js.map +1 -0
- package/dist/5592.js +1 -0
- package/dist/5592.js.map +1 -0
- package/dist/5669.js +1 -0
- package/dist/5669.js.map +1 -0
- package/dist/586.js +1 -0
- package/dist/586.js.map +1 -0
- package/dist/5932.js +1 -0
- package/dist/5932.js.map +1 -0
- package/dist/5995.js +1 -0
- package/dist/5995.js.map +1 -0
- package/dist/6258.js +1 -0
- package/dist/6258.js.map +1 -0
- package/dist/629.js +1 -0
- package/dist/629.js.map +1 -0
- package/dist/6328.js +1 -0
- package/dist/6328.js.map +1 -0
- package/dist/6355.js +1 -0
- package/dist/6355.js.map +1 -0
- package/dist/6419.js +1 -0
- package/dist/6419.js.map +1 -0
- package/dist/644.js +1 -0
- package/dist/644.js.map +1 -0
- package/dist/6456.js +1 -0
- package/dist/6466.js +3 -0
- package/dist/6466.js.map +1 -0
- package/dist/655.js +1 -0
- package/dist/655.js.map +1 -0
- package/dist/6798.js +66 -0
- package/dist/6798.js.map +1 -0
- package/dist/6910.js +1 -0
- package/dist/6910.js.map +1 -0
- package/dist/6925.js +1 -0
- package/dist/6925.js.map +1 -0
- package/dist/70.js +1 -0
- package/dist/70.js.map +1 -0
- package/dist/7201.js +1 -0
- package/dist/7201.js.map +1 -0
- package/dist/7234.js +1 -0
- package/dist/7234.js.map +1 -0
- package/dist/7261.js +1 -0
- package/dist/7261.js.map +1 -0
- package/dist/7326.js +1 -0
- package/dist/7359.js +1 -0
- package/dist/7487.js +1 -0
- package/dist/7487.js.map +1 -0
- package/dist/7591.js +1 -0
- package/dist/7591.js.map +1 -0
- package/dist/7607.js +1 -0
- package/dist/7701.js +1 -0
- package/dist/7701.js.map +1 -0
- package/dist/7717.js +1 -0
- package/dist/7717.js.map +1 -0
- package/dist/7739.js +1 -0
- package/dist/7739.js.map +1 -0
- package/dist/7788.js +1 -0
- package/dist/7788.js.map +1 -0
- package/dist/7819.js +1 -0
- package/dist/7819.js.map +1 -0
- package/dist/7971.js +1 -0
- package/dist/7971.js.map +1 -0
- package/dist/7983.js +1 -0
- package/dist/7983.js.map +1 -0
- package/dist/807.js +1 -0
- package/dist/807.js.map +1 -0
- package/dist/8159.js +7 -0
- package/dist/8159.js.map +1 -0
- package/dist/8338.js +1 -0
- package/dist/8338.js.map +1 -0
- package/dist/845.js +1 -0
- package/dist/845.js.map +1 -0
- package/dist/8570.js +1 -0
- package/dist/8570.js.map +1 -0
- package/dist/8661.js +1 -0
- package/dist/8661.js.map +1 -0
- package/dist/87.js +1 -0
- package/dist/87.js.map +1 -0
- package/dist/8727.js +1 -0
- package/dist/8766.js +1 -0
- package/dist/8766.js.map +1 -0
- package/dist/8828.js +1 -0
- package/dist/8828.js.map +1 -0
- package/dist/8860.js +1 -0
- package/dist/8860.js.map +1 -0
- package/dist/8911.js +1 -0
- package/dist/8911.js.map +1 -0
- package/dist/8930.js +1 -0
- package/dist/8930.js.map +1 -0
- package/dist/8971.js +1 -0
- package/dist/8971.js.map +1 -0
- package/dist/9124.js +1 -0
- package/dist/9124.js.map +1 -0
- package/dist/9157.js +1 -0
- package/dist/9157.js.map +1 -0
- package/dist/9182.js +1 -0
- package/dist/921.js +1 -0
- package/dist/921.js.map +1 -0
- package/dist/9212.js +1 -0
- package/dist/9212.js.map +1 -0
- package/dist/9255.js +1 -0
- package/dist/9255.js.map +1 -0
- package/dist/9257.js +1 -0
- package/dist/9257.js.map +1 -0
- package/dist/9316.js +1 -0
- package/dist/9316.js.map +1 -0
- package/dist/9333.js +1 -0
- package/dist/9333.js.map +1 -0
- package/dist/9404.js +1 -0
- package/dist/9404.js.map +1 -0
- package/dist/9446.js +1 -0
- package/dist/9446.js.map +1 -0
- package/dist/9447.js +1 -0
- package/dist/9447.js.map +1 -0
- package/dist/9449.js +1 -0
- package/dist/9449.js.map +1 -0
- package/dist/9535.js +1 -0
- package/dist/9535.js.map +1 -0
- package/dist/9606.js +1 -0
- package/dist/9606.js.map +1 -0
- package/dist/973.js +1 -0
- package/dist/973.js.map +1 -0
- package/dist/9845.js +1 -0
- package/dist/9845.js.map +1 -0
- package/dist/kenyaemr-esm-express-workflow-app.js +5 -5
- package/dist/kenyaemr-esm-express-workflow-app.js.buildmanifest.json +3004 -175
- package/dist/kenyaemr-esm-express-workflow-app.js.map +1 -1
- package/dist/main.js +5 -114
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +6 -7
- package/rspack.config.js +1 -1
- package/src/components/accounting/index.tsx +11 -10
- package/src/components/admissions/index.tsx +11 -10
- package/src/components/appointments/index.ts +10 -8
- package/src/components/consultation/clinical-encounter/encounter-details.component.tsx +9 -9
- package/src/components/consultation/clinical-encounter/encounter-details.test.tsx +19 -18
- package/src/components/consultation/consultation-context.tsx +19 -0
- package/src/components/consultation/consultation-summary-cards.component.tsx +124 -0
- package/src/components/consultation/consultation.component.tsx +41 -268
- package/src/components/consultation/consultation.resource.ts +67 -24
- package/src/components/consultation/consultation.scss +5 -0
- package/src/components/consultation/consultation.utils.tsx +222 -0
- package/src/components/consultation/dashboard.component.tsx +0 -2
- package/src/components/consultation/index.ts +27 -20
- package/src/components/facility-dashboard/index.tsx +10 -9
- package/src/components/laboratory/index.ts +11 -10
- package/src/components/laboratory/lab-table.component.tsx +22 -8
- package/src/components/laboratory/laboratory-tabs.component.tsx +2 -2
- package/src/components/mch/dashboard.component.tsx +0 -2
- package/src/components/mch/index.tsx +10 -9
- package/src/components/mch/mch.consultation.component.tsx +27 -15
- package/src/components/mch/mch.triage.component.tsx +42 -33
- package/src/components/pharmacy/index.ts +20 -18
- package/src/components/pharmacy/orders/pharmacy-orders.component.tsx +35 -13
- package/src/components/pharmacy/orders/pharmacy-orders.test.tsx +8 -7
- package/src/components/procedures/index.ts +11 -10
- package/src/components/procedures/procedures-table.component.tsx +44 -13
- package/src/components/procedures/procedures-tabs.component.tsx +2 -2
- package/src/components/radiology-and-imaging/index.ts +14 -10
- package/src/components/radiology-and-imaging/radiology-and-imaging-table.component.tsx +35 -15
- package/src/components/radiology-and-imaging/radiology-and-imaging.component.tsx +2 -2
- package/src/components/registration/card/HIE-card/hie-card.component.tsx +32 -44
- package/src/components/registration/card/Local-card/local-card.component.tsx +22 -24
- package/src/components/registration/dependants/dependants.component.tsx +32 -60
- package/src/components/registration/dependants/dependants.resource.ts +79 -50
- package/src/components/registration/helper/index.ts +4 -0
- package/src/components/registration/index.ts +10 -9
- package/src/components/registration/search-bar/search-bar.resource.ts +32 -93
- package/src/components/registration/start-visit-form/hooks/useDefaultFacilityLocation.tsx +15 -0
- package/src/components/registration/start-visit-form/hooks/useDefaultVisitLocation.tsx +24 -0
- package/src/components/registration/start-visit-form/hooks/useOfflineVisitType.tsx +18 -0
- package/src/components/registration/start-visit-form/hooks/useRecommendedVisitTypes.tsx +36 -0
- package/src/components/registration/start-visit-form/hooks/useVisitAttributeType.tsx +102 -0
- package/src/components/registration/start-visit-form/overflow-menu-extension/overflow-menu-item.extension.tsx +55 -0
- package/src/components/registration/start-visit-form/overflow-menu-extension/overflow-menu-item.scss +3 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/base-visit-type.component.tsx +126 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/base-visit-type.scss +75 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/exported-visit-form.workspace.tsx +743 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/location-selector.component.tsx +86 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/recommended-visit-type.component.tsx +32 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/visit-attribute-type.component.tsx +257 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/visit-attribute-type.scss +5 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/visit-date-time.component.tsx +193 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/visit-form.resource.ts +383 -0
- package/src/components/registration/start-visit-form/start-visit-workspace/visit-form.scss +166 -0
- package/src/components/registration/start-visit-form/visit-form-workspace/visit-form.workspace.tsx +55 -0
- package/src/components/reports/index.ts +10 -9
- package/src/components/triage/dashboard.component.tsx +0 -2
- package/src/components/triage/index.ts +10 -9
- package/src/components/triage/triage.component.tsx +92 -42
- package/src/components/triage/triage.resource.ts +56 -50
- package/src/components/triage/triage.scss +6 -0
- package/src/config-schema.ts +91 -0
- package/src/hooks/useServiceQueues.tsx +95 -25
- package/src/index.ts +32 -13
- package/src/routes.json +53 -254
- package/src/shared/orders/OrdersTabs.tsx +8 -3
- package/src/shared/patient-chart/patient-chart.resources.ts +8 -12
- package/src/shared/patient-chart/patient-summary-dashboard/patient-summary-dashboard.component.tsx +1 -2
- package/src/shared/pin-put/pinput.component.test.tsx +7 -6
- package/src/shared/queue/queue-entry/queue-entry-table.component.tsx +99 -88
- package/src/shared/queue/queue-entry/queue-entry-table.scss +4 -0
- package/src/shared/queue/queue-summary-cards.component.tsx +32 -0
- package/src/shared/queue/queue-tab.component.tsx +182 -70
- package/src/shared/queue/queue-tab.scss +1 -0
- package/src/shared/queue/queue-workflow-context.tsx +90 -0
- package/src/shared/tabs/extension-tabs.component.tsx +9 -6
- package/src/shared/utils/index.ts +1 -2
- package/src/types/index.ts +17 -2
- package/translations/am.json +64 -13
- package/translations/en.json +59 -8
- package/translations/sw.json +58 -7
- package/dist/127.js +0 -1
- package/dist/200.js +0 -1
- package/dist/200.js.map +0 -1
- package/dist/24.js +0 -1
- package/dist/24.js.map +0 -1
- package/dist/267.js +0 -1
- package/dist/267.js.map +0 -1
- package/dist/285.js +0 -1
- package/dist/285.js.map +0 -1
- package/dist/329.js +0 -1
- package/dist/329.js.map +0 -1
- package/dist/40.js +0 -1
- package/dist/466.js +0 -1
- package/dist/466.js.map +0 -1
- package/dist/472.js +0 -66
- package/dist/472.js.map +0 -1
- package/dist/490.js +0 -1
- package/dist/490.js.map +0 -1
- package/dist/54.js +0 -1
- package/dist/54.js.map +0 -1
- package/dist/689.js +0 -1
- package/dist/689.js.map +0 -1
- package/dist/697.js +0 -1
- package/dist/697.js.map +0 -1
- package/dist/704.js +0 -1
- package/dist/704.js.map +0 -1
- package/dist/710.js +0 -1
- package/dist/710.js.map +0 -1
- package/dist/729.js +0 -17
- package/dist/729.js.map +0 -1
- package/dist/805.js +0 -37
- package/dist/805.js.map +0 -1
- package/dist/847.js +0 -1
- package/dist/847.js.map +0 -1
- package/dist/85.js +0 -1
- package/dist/85.js.map +0 -1
- package/dist/882.js +0 -1
- package/dist/91.js +0 -1
- package/dist/91.js.map +0 -1
- package/dist/916.js +0 -1
- package/dist/994.js +0 -1
- package/dist/994.js.map +0 -1
- package/dist/998.js +0 -1
- package/dist/998.js.map +0 -1
- package/jest.config.js +0 -3
- package/src/shared/patient-chart/patient-chart.component.tsx +0 -61
- package/src/shared/patient-chart/patient-chart.scss +0 -15
- package/src/shared/patient-chart/useInitialize.ts +0 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import capitalize from 'lodash-es/capitalize';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import {
|
|
@@ -9,13 +9,14 @@ import {
|
|
|
9
9
|
ExtensionSlot,
|
|
10
10
|
useConfig,
|
|
11
11
|
} from '@openmrs/esm-framework';
|
|
12
|
-
import {
|
|
12
|
+
import { TabsSkeleton } from '@carbon/react';
|
|
13
13
|
|
|
14
14
|
import { useQueues } from '../../hooks/useServiceQueues';
|
|
15
15
|
import QueueTab from '../../shared/queue/queue-tab.component';
|
|
16
|
+
import QueueSummaryCards, { QueueSummaryCard } from '../../shared/queue/queue-summary-cards.component';
|
|
17
|
+
import { QueueWorkflowProvider, useQueueWorkflowContext } from '../../shared/queue/queue-workflow-context';
|
|
16
18
|
import styles from './triage.scss';
|
|
17
|
-
import { Queue
|
|
18
|
-
import { useTriageQueuesMetrics } from './triage.resource';
|
|
19
|
+
import { Queue } from '../../types';
|
|
19
20
|
import { ExpressWorkflowConfig } from '../../config-schema';
|
|
20
21
|
|
|
21
22
|
type TriageProps = {
|
|
@@ -38,55 +39,102 @@ export default Triage;
|
|
|
38
39
|
|
|
39
40
|
const TriageQueueTab: React.FC = () => {
|
|
40
41
|
const { t } = useTranslation();
|
|
41
|
-
const [currQueue, setCurrQueue] = useState<Queue>();
|
|
42
|
-
const { queues, isLoading, error } = useQueues();
|
|
43
|
-
const [filters, setFilters] = useState<Array<QueueFilter>>([]);
|
|
44
42
|
const {
|
|
45
43
|
queueStatusConceptUuids: { finishedStatus, waitingStatus, inServiceStatus },
|
|
46
44
|
queueServiceConceptUuids,
|
|
47
45
|
} = useConfig<ExpressWorkflowConfig>();
|
|
48
46
|
|
|
49
|
-
const
|
|
50
|
-
.filter(
|
|
51
|
-
(queue) =>
|
|
52
|
-
queue.service.uuid === queueServiceConceptUuids.triageService &&
|
|
53
|
-
!queue.location.display.toLowerCase().includes('mch') &&
|
|
54
|
-
queue?.queueRooms?.length > 0,
|
|
55
|
-
)
|
|
56
|
-
.sort((a, b) => a.name.localeCompare(b.name));
|
|
57
|
-
const activeQueue = useMemo(() => currQueue ?? triageQueues[0], [currQueue, triageQueues]);
|
|
47
|
+
const { queues, isLoading: isLoadingQueues, error: errorLoadingQueues } = useQueues();
|
|
58
48
|
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
49
|
+
const triageQueues = useMemo(
|
|
50
|
+
() =>
|
|
51
|
+
queues
|
|
52
|
+
.filter(
|
|
53
|
+
(queue) =>
|
|
54
|
+
queue.service.uuid === queueServiceConceptUuids.triageService &&
|
|
55
|
+
!queue.location.display.toLowerCase().includes('mch') &&
|
|
56
|
+
queue?.queueRooms?.length > 0,
|
|
57
|
+
)
|
|
58
|
+
.sort((a, b) => a.name.localeCompare(b.name)),
|
|
59
|
+
[queues, queueServiceConceptUuids.triageService],
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
if (isLoadingQueues) {
|
|
63
|
+
return (
|
|
64
|
+
<div className={styles.contentArea}>
|
|
65
|
+
<TabsSkeleton />
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (errorLoadingQueues) {
|
|
71
|
+
return (
|
|
72
|
+
<div className={styles.contentArea}>
|
|
73
|
+
<ErrorState error={errorLoadingQueues} headerTitle={t('errorLoadingQueues', 'Error loading queues')} />
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
68
76
|
}
|
|
69
77
|
|
|
70
|
-
if (
|
|
71
|
-
return <
|
|
78
|
+
if (!triageQueues.length) {
|
|
79
|
+
return <div className={styles.contentArea} />;
|
|
72
80
|
}
|
|
73
|
-
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<QueueWorkflowProvider queues={triageQueues}>
|
|
84
|
+
<TriageContent
|
|
85
|
+
triageQueues={triageQueues}
|
|
86
|
+
waitingStatus={waitingStatus}
|
|
87
|
+
finishedStatus={finishedStatus}
|
|
88
|
+
inServiceStatus={inServiceStatus}
|
|
89
|
+
/>
|
|
90
|
+
</QueueWorkflowProvider>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
type TriageContentProps = {
|
|
95
|
+
triageQueues: Queue[];
|
|
96
|
+
waitingStatus: string;
|
|
97
|
+
finishedStatus: string;
|
|
98
|
+
inServiceStatus: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const TriageContent: React.FC<TriageContentProps> = ({
|
|
102
|
+
triageQueues,
|
|
103
|
+
waitingStatus,
|
|
104
|
+
finishedStatus,
|
|
105
|
+
inServiceStatus,
|
|
106
|
+
}) => {
|
|
107
|
+
const { t } = useTranslation();
|
|
108
|
+
const { queueEntries, setFilters, queueEntriesError } = useQueueWorkflowContext();
|
|
109
|
+
|
|
110
|
+
const waitingEntries = useMemo(
|
|
111
|
+
() => queueEntries.filter((entry) => entry?.status?.uuid === waitingStatus),
|
|
112
|
+
[queueEntries, waitingStatus],
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
const attendedToEntries = useMemo(
|
|
116
|
+
() =>
|
|
117
|
+
queueEntries.filter((entry) => entry?.status?.uuid === inServiceStatus || entry?.status?.uuid === finishedStatus),
|
|
118
|
+
[queueEntries, inServiceStatus, finishedStatus],
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
const cards: Array<QueueSummaryCard> = [
|
|
74
122
|
{
|
|
75
123
|
title: t('clientsPatientsWaiting', 'Clients/Patients waiting'),
|
|
76
124
|
value: waitingEntries.length.toString(),
|
|
77
125
|
onClick: () => {
|
|
78
|
-
setFilters((
|
|
79
|
-
...
|
|
126
|
+
setFilters((prev) => [
|
|
127
|
+
...prev.filter((f) => f.key !== 'status'),
|
|
80
128
|
{ key: 'status', value: waitingStatus, label: t('waiting', 'Waiting') },
|
|
81
129
|
]);
|
|
82
130
|
},
|
|
83
131
|
},
|
|
84
132
|
{
|
|
85
133
|
title: t('clientsPatientsAttendedTo', 'Clients/Patients attended to'),
|
|
86
|
-
value:
|
|
134
|
+
value: attendedToEntries.length.toString(),
|
|
87
135
|
onClick: () => {
|
|
88
|
-
setFilters((
|
|
89
|
-
...
|
|
136
|
+
setFilters((prev) => [
|
|
137
|
+
...prev.filter((f) => f.key !== 'status'),
|
|
90
138
|
{ key: 'status', value: `${finishedStatus},${inServiceStatus}`, label: t('attendedTo', 'Attended to') },
|
|
91
139
|
]);
|
|
92
140
|
},
|
|
@@ -94,14 +142,16 @@ const TriageQueueTab: React.FC = () => {
|
|
|
94
142
|
];
|
|
95
143
|
|
|
96
144
|
return (
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
145
|
+
<div className={styles.contentArea}>
|
|
146
|
+
<QueueSummaryCards cards={cards} />
|
|
147
|
+
{queueEntriesError ? (
|
|
148
|
+
<ErrorState
|
|
149
|
+
error={queueEntriesError}
|
|
150
|
+
headerTitle={t('errorLoadingQueueEntries', 'Error loading queue entries')}
|
|
151
|
+
/>
|
|
152
|
+
) : (
|
|
153
|
+
<QueueTab queues={triageQueues} navigatePath="triage" usePatientChart />
|
|
154
|
+
)}
|
|
155
|
+
</div>
|
|
106
156
|
);
|
|
107
157
|
};
|
|
@@ -1,62 +1,68 @@
|
|
|
1
|
-
import { useConfig } from '@openmrs/esm-framework';
|
|
2
1
|
import { useMemo } from 'react';
|
|
3
|
-
import
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import { useConfig } from '@openmrs/esm-framework';
|
|
4
|
+
|
|
5
|
+
import { type ExpressWorkflowConfig } from '../../config-schema';
|
|
4
6
|
import { useQueueEntries } from '../../hooks/useServiceQueues';
|
|
5
|
-
import { Queue } from '../../types';
|
|
7
|
+
import { type Queue } from '../../types';
|
|
6
8
|
|
|
7
9
|
export const useTriageQueuesMetrics = (queue?: Queue) => {
|
|
8
|
-
const {
|
|
9
|
-
|
|
10
|
-
queueEntries: waitingEntries,
|
|
11
|
-
isLoading: isLoadingWaiting,
|
|
12
|
-
error: waitingError,
|
|
13
|
-
} = useQueueEntries({
|
|
14
|
-
service: [queueServiceConceptUuids.triageService],
|
|
15
|
-
statuses: [queueStatusConceptUuids.waitingStatus],
|
|
16
|
-
location: queue?.location?.uuid ? [queue.location.uuid] : undefined,
|
|
17
|
-
});
|
|
18
|
-
const {
|
|
19
|
-
queueEntries: inServiceEntries,
|
|
20
|
-
isLoading: isLoadingInService,
|
|
21
|
-
error: inServiceError,
|
|
22
|
-
} = useQueueEntries({
|
|
23
|
-
service: [queueServiceConceptUuids.triageService],
|
|
24
|
-
statuses: [queueStatusConceptUuids.inServiceStatus],
|
|
25
|
-
location: queue?.location?.uuid ? [queue.location.uuid] : undefined,
|
|
26
|
-
});
|
|
10
|
+
const { queueStatusConceptUuids } = useConfig<ExpressWorkflowConfig>();
|
|
11
|
+
|
|
27
12
|
const {
|
|
28
|
-
queueEntries:
|
|
29
|
-
isLoading
|
|
30
|
-
error
|
|
13
|
+
queueEntries: allTriageEntries,
|
|
14
|
+
isLoading,
|
|
15
|
+
error,
|
|
16
|
+
isValidating: isValidatingQueueEntries,
|
|
31
17
|
} = useQueueEntries({
|
|
32
|
-
service: [queueServiceConceptUuids.triageService],
|
|
33
|
-
statuses: [queueStatusConceptUuids.finishedStatus],
|
|
34
|
-
location: queue?.location?.uuid ? [queue.location.uuid] : undefined,
|
|
35
|
-
});
|
|
36
|
-
const { queueEntries: attendedtoEntries } = useQueueEntries({
|
|
37
|
-
service: [queueServiceConceptUuids.triageService],
|
|
38
|
-
statuses: [queueStatusConceptUuids.inServiceStatus, queueStatusConceptUuids.finishedStatus],
|
|
39
18
|
location: queue?.location?.uuid ? [queue.location.uuid] : undefined,
|
|
19
|
+
startedOnOrAfter: dayjs().subtract(24, 'hour').format('YYYY-MM-DD HH:mm:ss'),
|
|
40
20
|
});
|
|
41
21
|
|
|
22
|
+
const queueUuid = queue?.uuid;
|
|
23
|
+
|
|
24
|
+
const waitingEntries = useMemo(
|
|
25
|
+
() =>
|
|
26
|
+
allTriageEntries.filter(
|
|
27
|
+
(entry) => entry?.queue?.uuid === queueUuid && entry?.status?.uuid === queueStatusConceptUuids.waitingStatus,
|
|
28
|
+
),
|
|
29
|
+
[allTriageEntries, queueUuid, queueStatusConceptUuids.waitingStatus],
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const inServiceEntries = useMemo(
|
|
33
|
+
() =>
|
|
34
|
+
allTriageEntries.filter(
|
|
35
|
+
(entry) => entry?.queue?.uuid === queueUuid && entry?.status?.uuid === queueStatusConceptUuids.inServiceStatus,
|
|
36
|
+
),
|
|
37
|
+
[allTriageEntries, queueUuid, queueStatusConceptUuids.inServiceStatus],
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const finishedEntries = useMemo(
|
|
41
|
+
() =>
|
|
42
|
+
allTriageEntries.filter(
|
|
43
|
+
(entry) => entry?.queue?.uuid === queueUuid && entry?.status?.uuid === queueStatusConceptUuids.finishedStatus,
|
|
44
|
+
),
|
|
45
|
+
[allTriageEntries, queueUuid, queueStatusConceptUuids.finishedStatus],
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const attendedToEntries = useMemo(
|
|
49
|
+
() =>
|
|
50
|
+
allTriageEntries.filter(
|
|
51
|
+
(entry) =>
|
|
52
|
+
entry?.queue?.uuid === queueUuid &&
|
|
53
|
+
(entry?.status?.uuid === queueStatusConceptUuids.inServiceStatus ||
|
|
54
|
+
entry?.status?.uuid === queueStatusConceptUuids.finishedStatus),
|
|
55
|
+
),
|
|
56
|
+
[allTriageEntries, queueUuid, queueStatusConceptUuids.inServiceStatus, queueStatusConceptUuids.finishedStatus],
|
|
57
|
+
);
|
|
58
|
+
|
|
42
59
|
return {
|
|
43
|
-
isLoading
|
|
44
|
-
waitingEntries
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
[inServiceEntries, queue],
|
|
51
|
-
),
|
|
52
|
-
finishedEntries: useMemo(
|
|
53
|
-
() => finishedEntries.filter((entry) => entry?.queue?.uuid === queue?.uuid),
|
|
54
|
-
[finishedEntries, queue],
|
|
55
|
-
),
|
|
56
|
-
attendedtoEntries: useMemo(
|
|
57
|
-
() => attendedtoEntries.filter((entry) => entry?.queue?.uuid === queue?.uuid),
|
|
58
|
-
[attendedtoEntries, queue],
|
|
59
|
-
),
|
|
60
|
-
error: finishedError ?? inServiceError ?? waitingError,
|
|
60
|
+
isLoading,
|
|
61
|
+
waitingEntries,
|
|
62
|
+
inServiceEntries,
|
|
63
|
+
finishedEntries,
|
|
64
|
+
attendedToEntries,
|
|
65
|
+
error,
|
|
66
|
+
isValidating: isValidatingQueueEntries,
|
|
61
67
|
};
|
|
62
68
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use '@carbon/layout';
|
|
2
2
|
@use '@carbon/type';
|
|
3
3
|
@use '@carbon/colors';
|
|
4
|
+
|
|
4
5
|
.pageHeader {
|
|
5
6
|
@include type.type-style('body-compact-02');
|
|
6
7
|
height: layout.$spacing-12;
|
|
@@ -10,3 +11,8 @@
|
|
|
10
11
|
background: colors.$white-0;
|
|
11
12
|
border-bottom: 1px solid colors.$gray-20;
|
|
12
13
|
}
|
|
14
|
+
|
|
15
|
+
.contentArea {
|
|
16
|
+
padding: layout.$spacing-05;
|
|
17
|
+
min-height: 400px;
|
|
18
|
+
}
|
package/src/config-schema.ts
CHANGED
|
@@ -176,6 +176,82 @@ export const configSchema = {
|
|
|
176
176
|
_description: 'The UUID of the outpatient visit type.',
|
|
177
177
|
_default: '3371a4d4-f66f-4454-a86d-92c7b3da990c',
|
|
178
178
|
},
|
|
179
|
+
inPatientVisitTypeUuid: {
|
|
180
|
+
_type: Type.String,
|
|
181
|
+
_description: 'The UUID of the in-patient visit type.',
|
|
182
|
+
_default: 'a73e2ac6-263b-47fc-99fc-e0f2c09fc914',
|
|
183
|
+
},
|
|
184
|
+
defaultFacilityUrl: {
|
|
185
|
+
_type: Type.String,
|
|
186
|
+
_default: '',
|
|
187
|
+
_description: 'Custom URL to load default facility if it is not in the session',
|
|
188
|
+
},
|
|
189
|
+
offlineVisitTypeUuid: {
|
|
190
|
+
_type: Type.UUID,
|
|
191
|
+
_description: 'The UUID of the visit type to be used for the automatically created offline visits.',
|
|
192
|
+
_default: '',
|
|
193
|
+
},
|
|
194
|
+
showRecommendedVisitTypeTab: {
|
|
195
|
+
_type: Type.Boolean,
|
|
196
|
+
_description: 'Whether start visit form should display recommended visit type tab. Requires `visitTypeResourceUrl`',
|
|
197
|
+
_default: false,
|
|
198
|
+
},
|
|
199
|
+
visitTypeResourceUrl: {
|
|
200
|
+
_type: Type.String,
|
|
201
|
+
_default: '',
|
|
202
|
+
_description: 'Custom URL to load resources required for showing recommended visit types',
|
|
203
|
+
},
|
|
204
|
+
disableChangingVisitLocation: {
|
|
205
|
+
_type: Type.Boolean,
|
|
206
|
+
_description: 'Whether the visit location field in the Start Visit form should be view-only.',
|
|
207
|
+
_default: false,
|
|
208
|
+
},
|
|
209
|
+
visitAttributeTypes: {
|
|
210
|
+
_type: Type.Array,
|
|
211
|
+
_elements: {
|
|
212
|
+
_type: Type.Object,
|
|
213
|
+
uuid: {
|
|
214
|
+
_type: Type.UUID,
|
|
215
|
+
_description: 'UUID of the visit attribute type',
|
|
216
|
+
},
|
|
217
|
+
required: {
|
|
218
|
+
_type: Type.Boolean,
|
|
219
|
+
_description: 'Whether the attribute type field is required or not',
|
|
220
|
+
_default: false,
|
|
221
|
+
},
|
|
222
|
+
displayInThePatientBanner: {
|
|
223
|
+
_type: Type.Boolean,
|
|
224
|
+
_description: "Whether we should show this visit attribute's value in the patient banner",
|
|
225
|
+
_default: true,
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
_description: 'List of visit attribute types shown when filling the visit form',
|
|
229
|
+
_default: [
|
|
230
|
+
{
|
|
231
|
+
uuid: '',
|
|
232
|
+
required: false,
|
|
233
|
+
displayInThePatientBanner: true,
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
uuid: '',
|
|
237
|
+
required: false,
|
|
238
|
+
displayInThePatientBanner: true,
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
},
|
|
242
|
+
showUpcomingAppointments: {
|
|
243
|
+
_type: Type.Boolean,
|
|
244
|
+
_description: 'Whether start visit form should display upcoming appointments',
|
|
245
|
+
_default: false,
|
|
246
|
+
},
|
|
247
|
+
excludedVisitTypeUuids: {
|
|
248
|
+
_type: Type.Array,
|
|
249
|
+
_elements: {
|
|
250
|
+
_type: Type.UUID,
|
|
251
|
+
},
|
|
252
|
+
_default: ['02b67c47-6071-4091-953d-ad21452e830c'],
|
|
253
|
+
_description: 'List of visit type UUIDs to exclude from the start visit form',
|
|
254
|
+
},
|
|
179
255
|
};
|
|
180
256
|
|
|
181
257
|
export type ExpressWorkflowConfig = {
|
|
@@ -231,4 +307,19 @@ export type ExpressWorkflowConfig = {
|
|
|
231
307
|
labourWard: string;
|
|
232
308
|
};
|
|
233
309
|
outpatientVisitTypeUuid: string;
|
|
310
|
+
inPatientVisitTypeUuid: string;
|
|
311
|
+
defaultFacilityUrl: string; //done
|
|
312
|
+
offlineVisitTypeUuid: string;
|
|
313
|
+
showRecommendedVisitTypeTab: boolean;
|
|
314
|
+
visitTypeResourceUrl: string;
|
|
315
|
+
disableChangingVisitLocation: boolean;
|
|
316
|
+
restrictByVisitLocationTag: boolean;
|
|
317
|
+
visitAttributeTypes: Array<{
|
|
318
|
+
displayInThePatientBanner: boolean;
|
|
319
|
+
required: boolean;
|
|
320
|
+
showWhenExpression?: string;
|
|
321
|
+
uuid: string;
|
|
322
|
+
}>; // done
|
|
323
|
+
showUpcomingAppointments: boolean; //done
|
|
324
|
+
excludedVisitTypeUuids: Array<string>;
|
|
234
325
|
};
|
|
@@ -1,68 +1,138 @@
|
|
|
1
|
-
import { openmrsFetch, restBaseUrl, useConfig } from '@openmrs/esm-framework';
|
|
2
|
-
import dayjs from 'dayjs';
|
|
3
1
|
import { useMemo } from 'react';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
2
|
+
import useSWRImmutable from 'swr/immutable';
|
|
3
|
+
import dayjs from 'dayjs';
|
|
4
|
+
import { openmrsFetch, restBaseUrl, useConfig, useOpenmrsPagination } from '@openmrs/esm-framework';
|
|
5
|
+
|
|
6
|
+
import { type ExpressWorkflowConfig } from '../config-schema';
|
|
7
|
+
import { QueueEntriesPagination, type Queue, type QueueEntry, type QueueEntryFilters } from '../types/index';
|
|
8
|
+
|
|
9
|
+
const QUEUE_LIST_REP =
|
|
10
|
+
'custom:(uuid,display,name,location:(uuid,display),service:(uuid,display),queueRooms:(uuid,display))';
|
|
11
|
+
|
|
12
|
+
const SWR_QUEUE_OPTIONS = {
|
|
13
|
+
dedupingInterval: 5000,
|
|
14
|
+
revalidateOnFocus: false,
|
|
15
|
+
} as const;
|
|
7
16
|
|
|
8
17
|
export const useQueues = () => {
|
|
9
|
-
const
|
|
10
|
-
|
|
18
|
+
const queueListKey = `/ws/rest/v1/queue?v=${encodeURIComponent(QUEUE_LIST_REP)}`;
|
|
19
|
+
const { data, isLoading, error, isValidating } = useSWRImmutable<{ data: { results: Array<Queue> } }>(
|
|
20
|
+
queueListKey,
|
|
11
21
|
openmrsFetch,
|
|
22
|
+
SWR_QUEUE_OPTIONS,
|
|
12
23
|
);
|
|
13
24
|
|
|
14
25
|
return {
|
|
15
26
|
queues: data?.data?.results || [],
|
|
16
27
|
isLoading,
|
|
17
28
|
error,
|
|
29
|
+
isValidating,
|
|
18
30
|
};
|
|
19
31
|
};
|
|
20
32
|
|
|
21
|
-
export const useQueueEntries = (filters?: QueueEntryFilters) => {
|
|
33
|
+
export const useQueueEntries = (filters?: QueueEntryFilters, defaultPageSize: number = 10) => {
|
|
22
34
|
const { outpatientVisitTypeUuid } = useConfig<ExpressWorkflowConfig>();
|
|
23
35
|
const repString =
|
|
24
|
-
'custom:(uuid,
|
|
36
|
+
'custom:(uuid,queue:(uuid,display,name,location:(uuid,display)),status:(uuid,display),patient:(uuid,person:(uuid,display),identifiers:(uuid,display,identifier,identifierType:(uuid,display))),visit:(uuid,visitType:(uuid),attributes:(uuid,value,attributeType:(uuid))),priority:(uuid,display),priorityComment,startedAt,previousQueueEntry:(uuid,queue:(uuid,display)))';
|
|
25
37
|
|
|
26
|
-
const
|
|
38
|
+
const queryString = useMemo(() => {
|
|
27
39
|
const params = new URLSearchParams();
|
|
28
40
|
params.append('v', repString);
|
|
29
41
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
const merged = {
|
|
43
|
+
...filters,
|
|
44
|
+
status: filters?.statuses ?? [],
|
|
45
|
+
statuses: undefined,
|
|
46
|
+
startedOnOrAfter: filters?.startedOnOrAfter ?? undefined,
|
|
47
|
+
startedOnOrBefore: filters?.startedOnOrBefore ?? undefined,
|
|
48
|
+
queue: filters?.queues ?? [],
|
|
49
|
+
};
|
|
50
|
+
if (merged) {
|
|
51
|
+
Object.entries(merged).forEach(([key, value]) => {
|
|
52
|
+
if (key === 'statuses' || value === undefined || value === null) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (Array.isArray(value)) {
|
|
56
|
+
[...value].sort((a, b) => String(a).localeCompare(String(b))).forEach((v) => params.append(key, v));
|
|
57
|
+
} else {
|
|
58
|
+
params.append(key, String(value));
|
|
38
59
|
}
|
|
39
60
|
});
|
|
40
61
|
}
|
|
41
62
|
|
|
42
|
-
if (
|
|
63
|
+
if (filters?.isEnded == null) {
|
|
43
64
|
params.append('isEnded', 'false');
|
|
44
65
|
}
|
|
45
66
|
|
|
46
67
|
return params.toString();
|
|
47
|
-
}
|
|
68
|
+
}, [
|
|
69
|
+
filters?.location?.join(','),
|
|
70
|
+
filters?.service?.join(','),
|
|
71
|
+
[...(filters?.statuses ?? [])].sort((a, b) => String(a).localeCompare(String(b))).join(','),
|
|
72
|
+
filters?.priorities?.join(','),
|
|
73
|
+
filters?.patient,
|
|
74
|
+
filters?.visit,
|
|
75
|
+
filters?.hasVisit,
|
|
76
|
+
filters?.isEnded,
|
|
77
|
+
filters?.locationsWaitingFor?.join(','),
|
|
78
|
+
filters?.providersWaitingFor?.join(','),
|
|
79
|
+
filters?.queuesComingFrom?.join(','),
|
|
80
|
+
filters?.queues?.join(','),
|
|
81
|
+
]);
|
|
48
82
|
|
|
49
|
-
const
|
|
50
|
-
|
|
83
|
+
const url = queryString ? `/ws/rest/v1/queue-entry?${queryString}` : '/ws/rest/v1/queue-entry';
|
|
84
|
+
|
|
85
|
+
const {
|
|
86
|
+
data,
|
|
87
|
+
isLoading,
|
|
88
|
+
isValidating,
|
|
89
|
+
error,
|
|
90
|
+
totalPages,
|
|
91
|
+
totalCount,
|
|
92
|
+
currentPage,
|
|
93
|
+
currentPageSize,
|
|
94
|
+
paginated,
|
|
95
|
+
showNextButton,
|
|
96
|
+
showPreviousButton,
|
|
97
|
+
goTo,
|
|
98
|
+
goToNext,
|
|
99
|
+
goToPrevious,
|
|
100
|
+
} = useOpenmrsPagination<QueueEntry>(url, defaultPageSize, {
|
|
101
|
+
swrConfig: {
|
|
102
|
+
revalidateOnFocus: true,
|
|
103
|
+
keepPreviousData: true,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
51
106
|
|
|
52
|
-
const { data, isLoading, error } = useSWR<{ data: { results: Array<QueueEntry> } }>(url, openmrsFetch);
|
|
53
107
|
const queueEntries = useMemo(() => {
|
|
54
|
-
return (data
|
|
108
|
+
return (data ?? [])?.filter((entry) => {
|
|
55
109
|
return (
|
|
56
110
|
dayjs(entry.startedAt).isAfter(dayjs().subtract(24, 'hour')) &&
|
|
57
111
|
entry?.visit?.visitType?.uuid === outpatientVisitTypeUuid
|
|
58
112
|
);
|
|
59
113
|
});
|
|
60
|
-
}, [data
|
|
114
|
+
}, [data, outpatientVisitTypeUuid]);
|
|
115
|
+
|
|
116
|
+
const pagination: QueueEntriesPagination = {
|
|
117
|
+
totalPages,
|
|
118
|
+
totalCount,
|
|
119
|
+
currentPage,
|
|
120
|
+
currentPageSize,
|
|
121
|
+
paginated,
|
|
122
|
+
showNextButton,
|
|
123
|
+
showPreviousButton,
|
|
124
|
+
goTo,
|
|
125
|
+
goToNext,
|
|
126
|
+
goToPrevious,
|
|
127
|
+
defaultPageSize,
|
|
128
|
+
};
|
|
61
129
|
|
|
62
130
|
return {
|
|
63
131
|
queueEntries,
|
|
64
132
|
isLoading,
|
|
133
|
+
isValidating,
|
|
65
134
|
error,
|
|
135
|
+
pagination,
|
|
66
136
|
};
|
|
67
137
|
};
|
|
68
138
|
export function serveQueueEntry(servicePointName: string, ticketNumber: string, status: string, locationUuid?: string) {
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle } from '@openmrs/esm-framework';
|
|
2
2
|
import { configSchema } from './config-schema';
|
|
3
|
-
import CheckinFormExtraExtension from './components/registration/checkin-form-extra/checkin-form-extra.extension';
|
|
4
|
-
import { Home } from '@carbon/react/icons';
|
|
5
|
-
|
|
6
|
-
import PatientSummaryDashboard from './shared/patient-chart/patient-summary-dashboard/patient-summary-dashboard.component';
|
|
7
|
-
import { createLeftPanelLink } from './shared/dashboard-link/dashboard-link.component';
|
|
8
3
|
|
|
9
4
|
const moduleName = '@kenyaemr/esm-express-workflow-app';
|
|
10
5
|
|
|
@@ -37,15 +32,39 @@ export const otpVerificationModal = getAsyncLifecycle(
|
|
|
37
32
|
() => import('./shared/otp-verification/otp-verification.modal'),
|
|
38
33
|
options,
|
|
39
34
|
);
|
|
40
|
-
export const checkinFormExtraExtension =
|
|
41
|
-
|
|
35
|
+
export const checkinFormExtraExtension = getAsyncLifecycle(
|
|
36
|
+
() => import('./components/registration/checkin-form-extra/checkin-form-extra.extension'),
|
|
37
|
+
options,
|
|
38
|
+
);
|
|
39
|
+
export const patientSummaryDashboard = getAsyncLifecycle(
|
|
40
|
+
() => import('./shared/patient-chart/patient-summary-dashboard/patient-summary-dashboard.component'),
|
|
41
|
+
options,
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
export const customStartVisitOverflowMenuItem = getAsyncLifecycle(
|
|
45
|
+
() => import('./components/registration/start-visit-form/overflow-menu-extension/overflow-menu-item.extension'),
|
|
46
|
+
{
|
|
47
|
+
featureName: 'patient-actions-slot-deceased-button',
|
|
48
|
+
moduleName,
|
|
49
|
+
},
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export const visitFormWorkspace = getAsyncLifecycle(
|
|
53
|
+
() => import('./components/registration/start-visit-form/visit-form-workspace/visit-form.workspace'),
|
|
54
|
+
options,
|
|
55
|
+
);
|
|
42
56
|
|
|
43
57
|
export const queuesAdminHome = getAsyncLifecycle(() => import('./shared/queue/queues-home.component'), options);
|
|
44
|
-
export const homepageDashboardLink =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
export const homepageDashboardLink = getAsyncLifecycle(
|
|
59
|
+
() =>
|
|
60
|
+
Promise.all([import('./shared/dashboard-link/dashboard-link.component'), import('@carbon/react/icons')]).then(
|
|
61
|
+
([m, icons]) => ({
|
|
62
|
+
default: m.createLeftPanelLink({
|
|
63
|
+
name: 'consultation',
|
|
64
|
+
title: 'Home',
|
|
65
|
+
icon: icons.Home,
|
|
66
|
+
}),
|
|
67
|
+
}),
|
|
68
|
+
),
|
|
50
69
|
options,
|
|
51
70
|
);
|