@ampath/esm-dha-workflow-app 4.0.0-next.4 → 4.0.0-next.41
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/dist/104.js +2 -0
- package/dist/104.js.LICENSE.txt +9 -0
- package/dist/104.js.map +1 -0
- package/dist/15.js +1 -0
- package/dist/15.js.map +1 -0
- package/dist/246.js +2 -0
- package/dist/246.js.LICENSE.txt +54 -0
- package/dist/246.js.map +1 -0
- package/dist/327.js +1 -0
- package/dist/327.js.map +1 -0
- package/dist/339.js +1 -0
- package/dist/339.js.map +1 -0
- package/dist/709.js +1 -0
- package/dist/709.js.map +1 -0
- package/dist/710.js +2 -0
- package/dist/710.js.map +1 -0
- package/dist/729.js +1 -0
- package/dist/729.js.map +1 -0
- package/dist/752.js +1 -0
- package/dist/752.js.map +1 -0
- package/dist/833.js +1 -0
- package/dist/833.js.map +1 -0
- package/dist/91.js +1 -1
- package/dist/91.js.map +1 -1
- package/dist/93.js +1 -0
- package/dist/93.js.map +1 -0
- package/dist/938.js +1 -0
- package/dist/938.js.map +1 -0
- package/dist/esm-dha-workflow-app.js +1 -0
- package/dist/{openmrs-esm-home-app.js.buildmanifest.json → esm-dha-workflow-app.js.buildmanifest.json} +294 -55
- package/dist/{openmrs-esm-home-app.js.map → esm-dha-workflow-app.js.map} +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +3 -3
- package/src/accounting/accounting.component.tsx +13 -0
- package/src/appointments/appointments.component.tsx +13 -0
- package/src/bookings/daily/daily-bookings.component.scss +38 -0
- package/src/bookings/daily/daily-bookings.component.tsx +138 -0
- package/src/bookings/daily/daily-bookings.resource.ts +27 -0
- package/src/bookings/daily/filters/daily-bookings-filter.component.scss +15 -0
- package/src/bookings/daily/filters/daily-bookings-filter.component.tsx +80 -0
- package/src/bookings/daily/patient-list/daily-bookings-patient-list.component.tsx +97 -0
- package/src/bookings/types/index.ts +68 -0
- package/src/config-schema.ts +132 -32
- package/src/dashboard/dashboard.component.scss +7 -0
- package/src/dashboard/dashboard.component.tsx +63 -0
- package/src/dashboard/overview/overview.component.scss +70 -0
- package/src/dashboard/overview/overview.component.tsx +107 -0
- package/src/dashboard/patient-list/patient-list.component.tsx +41 -0
- package/src/hooks/useActions.ts +165 -0
- package/src/index.ts +23 -2
- package/src/laboratory/laboratory.component.tsx +13 -0
- package/src/left-panel/left-panel.component.tsx +20 -0
- package/src/left-panel/left-panel.scss +42 -0
- package/src/mch/queues/consultation/mch-consultation.tsx +18 -0
- package/src/mch/queues/triage/mch-triage.tsx +15 -0
- package/src/modals/sign-off-modal.scss +7 -0
- package/src/modals/sign-off-modal.tsx +52 -0
- package/src/mortuary/mortuary.component.tsx +13 -0
- package/src/pharmacy/pharmacy.component.tsx +13 -0
- package/src/registry/client-details/client-details.tsx +40 -0
- package/src/registry/modal/client-details-modal/client-details-modal.scss +28 -0
- package/src/registry/modal/client-details-modal/client-details-modal.tsx +81 -0
- package/src/registry/modal/otp-verification-modal/otp-verification-modal.scss +31 -0
- package/src/registry/modal/otp-verification-modal/otp-verification-modal.tsx +186 -0
- package/src/registry/modal/send-to-triage/send-to-triage.modal.scss +34 -0
- package/src/registry/modal/send-to-triage/send-to-triage.modal.tsx +302 -0
- package/src/registry/payment-details/payment-options/payment-options.tsx +21 -0
- package/src/registry/registry.component.scss +83 -0
- package/src/registry/registry.component.tsx +397 -2
- package/src/registry/registry.resource.ts +60 -0
- package/src/registry/types/index.ts +309 -0
- package/src/registry/utils/error-handler.ts +37 -0
- package/src/registry/utils/format-dependant-display-data.ts +8 -0
- package/src/registry/utils/hie-adapter.ts +56 -0
- package/src/registry/utils/hie-client-adapter.ts +309 -0
- package/src/registry/utils/mask-data.ts +21 -0
- package/src/resources/hie-amrs-automatic-registration.service.ts +16 -0
- package/src/resources/identifier-types.ts +27 -0
- package/src/resources/patient-resource.ts +62 -0
- package/src/resources/patient-search.resource.ts +22 -0
- package/src/resources/queue.resource.ts +60 -0
- package/src/resources/visit.resource.ts +38 -0
- package/src/root.component.tsx +42 -30
- package/src/root.scss +5 -9
- package/src/routes.json +43 -4
- package/src/service-queues/action-button.component.tsx +34 -0
- package/src/service-queues/action-overflow-menu-item.component.tsx +34 -0
- package/src/service-queues/consultation/consultation.component.scss +7 -0
- package/src/service-queues/consultation/consultation.component.tsx +15 -0
- package/src/service-queues/metrics/metrics-cards/attended-patients.extension.tsx +38 -0
- package/src/service-queues/metrics/metrics-cards/metrics-card.component.tsx +86 -0
- package/src/service-queues/metrics/metrics-cards/metrics-card.scss +106 -0
- package/src/service-queues/metrics/metrics-cards/waiting-patients.extension.tsx +34 -0
- package/src/service-queues/metrics/metrics-container.component.tsx +23 -0
- package/src/service-queues/metrics/metrics-container.scss +36 -0
- package/src/service-queues/metrics/metrics.resource.ts +65 -0
- package/src/service-queues/modals/move/move-patient.component.scss +35 -0
- package/src/service-queues/modals/move/move-patient.component.tsx +138 -0
- package/src/service-queues/modals/serve/serve-patient.comppnent.scss +0 -0
- package/src/service-queues/modals/serve/serve-patient.comppnent.tsx +80 -0
- package/src/service-queues/modals/sign-off/sign-off.modal.scss +0 -0
- package/src/service-queues/modals/sign-off/sign-off.modal.tsx +79 -0
- package/src/service-queues/modals/transition/transition-patient.component.scss +0 -0
- package/src/service-queues/modals/transition/transition-patient.component.tsx +122 -0
- package/src/service-queues/queue-list/queue-list.component.scss +19 -0
- package/src/service-queues/queue-list/queue-list.component.tsx +169 -0
- package/src/service-queues/queue-room.component.tsx +39 -0
- package/src/service-queues/room/room.component.tsx +58 -0
- package/src/service-queues/service-queue/service-queue.component.scss +14 -0
- package/src/service-queues/service-queue/service-queue.component.tsx +245 -0
- package/src/service-queues/service-queue/stats/stat-card/stat-card.component.scss +10 -0
- package/src/service-queues/service-queue/stats/stat-card/stat-card.component.tsx +23 -0
- package/src/service-queues/service-queue/stats/stat-details/stat-details.component.scss +7 -0
- package/src/service-queues/service-queue/stats/stat-details/stat-details.component.tsx +34 -0
- package/src/service-queues/service-queue.scss +27 -0
- package/src/service-queues/service-queue.tsx +31 -0
- package/src/service-queues/service-queues.resource.ts +177 -0
- package/src/service-queues/service.resource.ts +28 -0
- package/src/shared/constants/civil-status.ts +29 -0
- package/src/shared/constants/concepts.ts +30 -0
- package/src/shared/constants/index.ts +1 -0
- package/src/shared/constants/person-attributes.ts +33 -0
- package/src/shared/services/location.resource.ts +9 -0
- package/src/shared/ui/otp-input/otp-input.component.scss +14 -0
- package/src/shared/ui/otp-input/otp-input.component.tsx +90 -0
- package/src/shared/ui/timer/timer.component.scss +5 -0
- package/src/shared/ui/timer/timer.component.tsx +40 -0
- package/src/shared/utils/get-base-url.ts +17 -0
- package/src/side-nav-menu/nav-link-config.ts +82 -0
- package/src/side-nav-menu/nav-links.tsx +31 -11
- package/src/triage/metrics/attended-patients.extension.tsx +42 -0
- package/src/triage/metrics/metrics.scss +36 -0
- package/src/triage/metrics/triage-metrics.component.tsx +21 -0
- package/src/triage/metrics/waiting-patients.extension.tsx +39 -0
- package/src/triage/room/room.scss +29 -0
- package/src/triage/triage.component.tsx +15 -0
- package/src/triage/triage.resource.ts +19 -0
- package/src/triage/types.ts +16 -0
- package/src/types/types.ts +128 -0
- package/dist/561.js +0 -2
- package/dist/561.js.map +0 -1
- package/dist/70.js +0 -1
- package/dist/70.js.map +0 -1
- package/dist/731.js +0 -2
- package/dist/731.js.LICENSE.txt +0 -39
- package/dist/731.js.map +0 -1
- package/dist/819.js +0 -1
- package/dist/819.js.map +0 -1
- package/dist/openmrs-esm-home-app.js +0 -1
- package/src/boxes/extensions/blue-box.component.tsx +0 -15
- package/src/boxes/extensions/box.scss +0 -23
- package/src/boxes/extensions/brand-box.component.tsx +0 -15
- package/src/boxes/extensions/red-box.component.tsx +0 -15
- package/src/boxes/slot/boxes.component.tsx +0 -25
- package/src/boxes/slot/boxes.scss +0 -29
- package/src/greeter/greeter.component.tsx +0 -42
- package/src/greeter/greeter.scss +0 -20
- package/src/greeter/greeter.test.tsx +0 -28
- package/src/patient-getter/patient-getter.component.tsx +0 -40
- package/src/patient-getter/patient-getter.resource.ts +0 -39
- package/src/patient-getter/patient-getter.scss +0 -16
- package/src/patient-getter/patient-getter.test.tsx +0 -40
- package/src/resources/resources.component.tsx +0 -56
- package/src/resources/resources.scss +0 -68
- /package/dist/{561.js.LICENSE.txt → 710.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Checkbox,
|
|
5
|
+
ComboBox,
|
|
6
|
+
InlineLoading,
|
|
7
|
+
Modal,
|
|
8
|
+
ModalBody,
|
|
9
|
+
Select,
|
|
10
|
+
SelectItem,
|
|
11
|
+
Table,
|
|
12
|
+
TableBody,
|
|
13
|
+
TableCell,
|
|
14
|
+
TableHead,
|
|
15
|
+
TableHeader,
|
|
16
|
+
TableRow,
|
|
17
|
+
} from '@carbon/react';
|
|
18
|
+
import styles from './send-to-triage.modal.scss';
|
|
19
|
+
import { type Patient, useVisitTypes, useSession, showSnackbar, type VisitType } from '@openmrs/esm-framework';
|
|
20
|
+
import { type HieClient, type CreateVisitDto, type QueueEntryDto, type ServiceQueue } from '../../types';
|
|
21
|
+
import { createQueueEntry, getFacilityServiceQueues } from '../../../resources/queue.resource';
|
|
22
|
+
import { QUEUE_PRIORITIES_UUIDS, QUEUE_STATUS_UUIDS } from '../../../shared/constants/concepts';
|
|
23
|
+
import { createVisit } from '../../../resources/visit.resource';
|
|
24
|
+
|
|
25
|
+
interface SendToTriageModalProps {
|
|
26
|
+
patients: Patient[];
|
|
27
|
+
open: boolean;
|
|
28
|
+
onModalClose: (modalCloseResp?: { success: boolean }) => void;
|
|
29
|
+
onSubmit: () => void;
|
|
30
|
+
client: HieClient;
|
|
31
|
+
onCreateAmrsPatient: (client: HieClient) => void;
|
|
32
|
+
onManualRegistration: () => void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const SendToTriageModal: React.FC<SendToTriageModalProps> = ({
|
|
36
|
+
patients,
|
|
37
|
+
open,
|
|
38
|
+
onModalClose,
|
|
39
|
+
onSubmit,
|
|
40
|
+
client,
|
|
41
|
+
onCreateAmrsPatient,
|
|
42
|
+
onManualRegistration,
|
|
43
|
+
}) => {
|
|
44
|
+
const [selectedPatient, setSelectedPatient] = useState<Patient>();
|
|
45
|
+
const [selectedVisitType, setSelectedVisitType] = useState<string>();
|
|
46
|
+
const [serviceQueues, setServiceQueues] = useState<ServiceQueue[]>();
|
|
47
|
+
const [selectedServiceQueue, setSelectedServiceQueue] = useState<string>();
|
|
48
|
+
const [selectedPriority, setSelectedPriority] = useState<string>('');
|
|
49
|
+
const [loading, setLoading] = useState<boolean>(false);
|
|
50
|
+
const visitTypes = useVisitTypes();
|
|
51
|
+
const session = useSession();
|
|
52
|
+
const locationUuid = session.sessionLocation.uuid;
|
|
53
|
+
const visitTypeOptions = useMemo(() => generateVisitTypeOptions(), [visitTypes]);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
getServiceQueues();
|
|
56
|
+
}, [patients]);
|
|
57
|
+
if (!patients) {
|
|
58
|
+
return <>No Client data</>;
|
|
59
|
+
}
|
|
60
|
+
const registerOnAfyaYangu = () => {
|
|
61
|
+
window.open('https://afyayangu.go.ke/', '_blank');
|
|
62
|
+
};
|
|
63
|
+
const sendToTriage = async () => {
|
|
64
|
+
setLoading(true);
|
|
65
|
+
try {
|
|
66
|
+
const newVisit = await createPatientVisit();
|
|
67
|
+
if (newVisit) {
|
|
68
|
+
const addToTriageQueueDto: QueueEntryDto = generateAddToTriageDto(newVisit.uuid);
|
|
69
|
+
const queueEntryResp = await createQueueEntry(addToTriageQueueDto);
|
|
70
|
+
if (queueEntryResp) {
|
|
71
|
+
showAlert('success', 'Patient has succesfully been moved to the Triage queue', '');
|
|
72
|
+
onModalClose({ success: true });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
} catch (error) {
|
|
76
|
+
showAlert('error', 'Error creating visit', '');
|
|
77
|
+
} finally {
|
|
78
|
+
setLoading(false);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const generateAddToTriageDto = (newVisitUuid: string): QueueEntryDto => {
|
|
82
|
+
const payload: QueueEntryDto = {
|
|
83
|
+
visit: {
|
|
84
|
+
uuid: newVisitUuid,
|
|
85
|
+
},
|
|
86
|
+
queueEntry: {
|
|
87
|
+
status: {
|
|
88
|
+
uuid: QUEUE_STATUS_UUIDS.WAITING_UUID,
|
|
89
|
+
},
|
|
90
|
+
priority: {
|
|
91
|
+
uuid: selectedPriority ?? QUEUE_PRIORITIES_UUIDS.NORMAL_PRIORITY_UUID,
|
|
92
|
+
},
|
|
93
|
+
queue: {
|
|
94
|
+
uuid: selectedServiceQueue,
|
|
95
|
+
},
|
|
96
|
+
patient: {
|
|
97
|
+
uuid: selectedPatient.uuid,
|
|
98
|
+
},
|
|
99
|
+
startedAt: new Date().toISOString(),
|
|
100
|
+
sortWeight: 0,
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
return payload;
|
|
104
|
+
};
|
|
105
|
+
const onPatientSelect = (patient: Patient) => {
|
|
106
|
+
setSelectedPatient(patient);
|
|
107
|
+
};
|
|
108
|
+
const visitTypeChangeHandler = (selectedVisitType: { selectedItem: { id: string; text: string } }) => {
|
|
109
|
+
const vt = selectedVisitType.selectedItem.id;
|
|
110
|
+
setSelectedVisitType(vt);
|
|
111
|
+
};
|
|
112
|
+
const serviceChangeHandler = ($event: any) => {
|
|
113
|
+
const sq = $event.target.value as unknown as string;
|
|
114
|
+
setSelectedServiceQueue(sq);
|
|
115
|
+
};
|
|
116
|
+
const priorityChangeHandler = (priorityUuid: string) => {
|
|
117
|
+
setSelectedPriority(priorityUuid);
|
|
118
|
+
};
|
|
119
|
+
const createPatientVisit = async () => {
|
|
120
|
+
const visitDto = getCreateVisitDto();
|
|
121
|
+
if (!isValidCreateVisitDto(visitDto)) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const result = await createVisit(visitDto);
|
|
126
|
+
if (result) {
|
|
127
|
+
showAlert('success', 'Visit has been created succesfully', '');
|
|
128
|
+
return result;
|
|
129
|
+
} else {
|
|
130
|
+
showAlert('error', 'Error creating patient visit', '');
|
|
131
|
+
throw new Error('Error creating patient visit');
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const isValidCreateVisitDto = (createVisitDto: CreateVisitDto): boolean => {
|
|
135
|
+
if (!createVisitDto.location) {
|
|
136
|
+
showAlert('error', 'Missing location in create visits', '');
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
if (!createVisitDto.patient) {
|
|
140
|
+
showAlert('error', 'Please select a patient', '');
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (!createVisitDto.visitType) {
|
|
145
|
+
showAlert('error', 'Please select a visit', '');
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
return true;
|
|
149
|
+
};
|
|
150
|
+
const getCreateVisitDto = (): CreateVisitDto => {
|
|
151
|
+
return {
|
|
152
|
+
visitType: selectedVisitType,
|
|
153
|
+
location: locationUuid,
|
|
154
|
+
startDatetime: null,
|
|
155
|
+
stopDatetime: null,
|
|
156
|
+
patient: selectedPatient?.uuid ?? '',
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
const showAlert = (alertType: 'error' | 'success', title: string, subtitle: string) => {
|
|
160
|
+
showSnackbar({
|
|
161
|
+
kind: alertType,
|
|
162
|
+
title: title,
|
|
163
|
+
subtitle: subtitle,
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
function generateVisitTypeOptions() {
|
|
168
|
+
return visitTypes.map((vt: VisitType) => {
|
|
169
|
+
return {
|
|
170
|
+
id: vt.uuid,
|
|
171
|
+
text: vt.display,
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
async function getServiceQueues() {
|
|
176
|
+
try {
|
|
177
|
+
const sqs = await getFacilityServiceQueues(locationUuid);
|
|
178
|
+
if (sqs.length > 0) {
|
|
179
|
+
setServiceQueues(sqs);
|
|
180
|
+
}
|
|
181
|
+
} catch (e) {
|
|
182
|
+
showSnackbar({
|
|
183
|
+
kind: 'error',
|
|
184
|
+
title: 'An error occurred while fetching service queues',
|
|
185
|
+
subtitle: e.message ?? 'An error occurred while fetching service queues, please try agin',
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return (
|
|
191
|
+
<>
|
|
192
|
+
<Modal
|
|
193
|
+
open={open}
|
|
194
|
+
size="md"
|
|
195
|
+
onSecondarySubmit={() => onModalClose({ success: false })}
|
|
196
|
+
onRequestClose={() => onModalClose({ success: false })}
|
|
197
|
+
onRequestSubmit={registerOnAfyaYangu}
|
|
198
|
+
primaryButtonText="Register on Afya Yangu"
|
|
199
|
+
secondaryButtonText="Cancel"
|
|
200
|
+
>
|
|
201
|
+
<ModalBody>
|
|
202
|
+
<div className={styles.clientDetailsLayout}>
|
|
203
|
+
<div className={styles.sectionHeader}>
|
|
204
|
+
<h4 className={styles.sectionTitle}>Send To Triage</h4>
|
|
205
|
+
</div>
|
|
206
|
+
{patients.length > 0 ? (
|
|
207
|
+
<div className={styles.sectionContent}>
|
|
208
|
+
<div className={styles.patientSelect}>
|
|
209
|
+
<Table>
|
|
210
|
+
<TableHead>
|
|
211
|
+
<TableRow>
|
|
212
|
+
<TableHeader>No</TableHeader>
|
|
213
|
+
<TableHeader>Name</TableHeader>
|
|
214
|
+
<TableHeader>Gender</TableHeader>
|
|
215
|
+
<TableHeader>Select Patient</TableHeader>
|
|
216
|
+
</TableRow>
|
|
217
|
+
</TableHead>
|
|
218
|
+
<TableBody>
|
|
219
|
+
{patients.map((p, index) => (
|
|
220
|
+
<TableRow key={p.uuid}>
|
|
221
|
+
<TableCell>{index + 1}</TableCell>
|
|
222
|
+
<TableCell>{p.person.preferredName.display}</TableCell>
|
|
223
|
+
<TableCell>{p.person.gender}</TableCell>
|
|
224
|
+
<TableCell>
|
|
225
|
+
<Checkbox id={p.uuid} labelText="" onChange={() => onPatientSelect(p)} />
|
|
226
|
+
</TableCell>
|
|
227
|
+
</TableRow>
|
|
228
|
+
))}
|
|
229
|
+
</TableBody>
|
|
230
|
+
</Table>
|
|
231
|
+
</div>
|
|
232
|
+
<div className={styles.formSection}>
|
|
233
|
+
<div className={styles.formRow}>
|
|
234
|
+
<div className={styles.formControl}>
|
|
235
|
+
<ComboBox
|
|
236
|
+
onChange={visitTypeChangeHandler}
|
|
237
|
+
id="visit-type-combobox"
|
|
238
|
+
items={visitTypeOptions}
|
|
239
|
+
itemToString={(item) => (item ? item.text : '')}
|
|
240
|
+
titleText="Select a Visit Type"
|
|
241
|
+
/>
|
|
242
|
+
</div>
|
|
243
|
+
<div className={styles.formControl}>
|
|
244
|
+
<Select id="service" labelText="Select a Service" onChange={serviceChangeHandler}>
|
|
245
|
+
<SelectItem value="" text="Select" />;
|
|
246
|
+
{serviceQueues &&
|
|
247
|
+
serviceQueues.map((sq) => {
|
|
248
|
+
return <SelectItem value={sq.uuid} text={`${sq.display} (${sq.location.display ?? ''})`} />;
|
|
249
|
+
})}
|
|
250
|
+
</Select>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
<div className={styles.formRow}>
|
|
254
|
+
<div className={styles.formControl}>
|
|
255
|
+
<Select
|
|
256
|
+
id="priority"
|
|
257
|
+
labelText="Select Priority"
|
|
258
|
+
onChange={($event) => priorityChangeHandler($event.target.value)}
|
|
259
|
+
>
|
|
260
|
+
<SelectItem value="" text="Select" />;
|
|
261
|
+
<SelectItem value={QUEUE_PRIORITIES_UUIDS.NORMAL_PRIORITY_UUID} text="NORMAL" />;
|
|
262
|
+
<SelectItem value={QUEUE_PRIORITIES_UUIDS.EMERGENCY_PRIORITY_UUID} text="EMERGENCY" />;
|
|
263
|
+
</Select>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
) : (
|
|
269
|
+
<></>
|
|
270
|
+
)}
|
|
271
|
+
<div className={styles.actionSection}>
|
|
272
|
+
{patients.length > 0 ? (
|
|
273
|
+
<div className={styles.btnContainer}>
|
|
274
|
+
<Button className={styles.greenBtn} onClick={sendToTriage}>
|
|
275
|
+
{loading ? <InlineLoading description="Sending To Triage..." /> : 'Send To Triage'}
|
|
276
|
+
</Button>
|
|
277
|
+
</div>
|
|
278
|
+
) : (
|
|
279
|
+
<>
|
|
280
|
+
<div className={styles.patientAction}>
|
|
281
|
+
<div className={styles.btnContainer}>
|
|
282
|
+
<Button kind="primary" onClick={() => onCreateAmrsPatient(client)}>
|
|
283
|
+
Automatically Register in AMRS
|
|
284
|
+
</Button>
|
|
285
|
+
</div>
|
|
286
|
+
<div className={styles.btnContainer}>
|
|
287
|
+
<Button kind="secondary" onClick={onManualRegistration}>
|
|
288
|
+
Manually Register
|
|
289
|
+
</Button>
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
|
+
</>
|
|
293
|
+
)}
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
</ModalBody>
|
|
297
|
+
</Modal>
|
|
298
|
+
</>
|
|
299
|
+
);
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
export default SendToTriageModal;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RadioButton, RadioButtonGroup } from '@carbon/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const PaymentOptionsComponent: React.FC = () => {
|
|
4
|
+
const handleSelectedPatientOption = (p: string) => {};
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<RadioButtonGroup
|
|
8
|
+
defaultSelected="sha"
|
|
9
|
+
legendText="Patient"
|
|
10
|
+
onChange={(v) => handleSelectedPatientOption(v as string)}
|
|
11
|
+
name="payment-options-radio-group"
|
|
12
|
+
>
|
|
13
|
+
<RadioButton id="sha" labelText="Social Health Authority" value="sha" />
|
|
14
|
+
<RadioButton id="insurance" labelText="Other Insurance" value="other" />
|
|
15
|
+
<RadioButton id="cash" labelText="Cash" value="cash" />
|
|
16
|
+
</RadioButtonGroup>
|
|
17
|
+
</>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default PaymentOptionsComponent;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.registryLayout{
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
width: 100%;
|
|
5
|
+
row-gap: 10px;
|
|
6
|
+
padding: 2% 2%;
|
|
7
|
+
}
|
|
8
|
+
.mainContent{
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
.registryHeader{
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
row-gap: 10px;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
.registryContent{
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
.formRow{
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: row;
|
|
27
|
+
width: 100%;
|
|
28
|
+
column-gap: 5px;
|
|
29
|
+
margin-top: 10px;
|
|
30
|
+
}
|
|
31
|
+
.formControl{
|
|
32
|
+
width: 30%;
|
|
33
|
+
}
|
|
34
|
+
.hieData{
|
|
35
|
+
margin-top: 15px;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
width: 80%;
|
|
39
|
+
row-gap: 10px;
|
|
40
|
+
}
|
|
41
|
+
.btnContainer{
|
|
42
|
+
padding: 5px 5px;
|
|
43
|
+
}
|
|
44
|
+
.selectionHeader{
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
width: 100%;
|
|
48
|
+
row-gap: 5px;
|
|
49
|
+
}
|
|
50
|
+
.patientSelect{
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: row;
|
|
53
|
+
width: 100%;
|
|
54
|
+
column-gap: 5px;
|
|
55
|
+
}
|
|
56
|
+
.patientSelectRadio{
|
|
57
|
+
width: 70%;
|
|
58
|
+
}
|
|
59
|
+
.patientConfirmSelection{
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: row;
|
|
62
|
+
width: 30%;
|
|
63
|
+
column-gap: 5px;
|
|
64
|
+
}
|
|
65
|
+
.formBtn{
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: row;
|
|
68
|
+
column-gap: 5px;
|
|
69
|
+
}
|
|
70
|
+
.registrySearchBtn{
|
|
71
|
+
height: 30px;
|
|
72
|
+
}
|
|
73
|
+
.principalDependantSection{
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: row;
|
|
76
|
+
width: 100%;
|
|
77
|
+
margin-top: 15px;
|
|
78
|
+
}
|
|
79
|
+
.dependantCard{
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: row;
|
|
82
|
+
width: 30%;
|
|
83
|
+
}
|