@digihmis/esm-patient-registration-app 1.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 +4 -0
- package/dist/117.js +1 -0
- package/dist/117.js.map +1 -0
- package/dist/131.js +1 -0
- package/dist/131.js.map +1 -0
- package/dist/132.js +1 -0
- package/dist/132.js.map +1 -0
- package/dist/152.js +1 -0
- package/dist/152.js.map +1 -0
- package/dist/209.js +1 -0
- package/dist/209.js.map +1 -0
- package/dist/247.js +1 -0
- package/dist/247.js.map +1 -0
- package/dist/28.js +1 -0
- package/dist/28.js.map +1 -0
- package/dist/317.js +1 -0
- package/dist/317.js.map +1 -0
- package/dist/349.js +1 -0
- package/dist/349.js.map +1 -0
- package/dist/371.js +1 -0
- package/dist/371.js.map +1 -0
- package/dist/378.js +1 -0
- package/dist/378.js.map +1 -0
- package/dist/442.js +1 -0
- package/dist/442.js.map +1 -0
- package/dist/45.js +1 -0
- package/dist/45.js.map +1 -0
- package/dist/459.js +12 -0
- package/dist/459.js.map +1 -0
- package/dist/466.js +1 -0
- package/dist/466.js.map +1 -0
- package/dist/508.js +1 -0
- package/dist/508.js.map +1 -0
- package/dist/61.js +1 -0
- package/dist/61.js.map +1 -0
- package/dist/640.js +1 -0
- package/dist/640.js.map +1 -0
- package/dist/689.js +1 -0
- package/dist/689.js.map +1 -0
- package/dist/709.js +1 -0
- package/dist/709.js.map +1 -0
- package/dist/712.js +1 -0
- package/dist/712.js.map +1 -0
- package/dist/720.js +1 -0
- package/dist/720.js.map +1 -0
- package/dist/742.js +1 -0
- package/dist/742.js.map +1 -0
- package/dist/771.js +1 -0
- package/dist/771.js.map +1 -0
- package/dist/806.js +1 -0
- package/dist/806.js.map +1 -0
- package/dist/912.js +1 -0
- package/dist/912.js.map +1 -0
- package/dist/913.js +1 -0
- package/dist/913.js.map +1 -0
- package/dist/940.js +1 -0
- package/dist/940.js.map +1 -0
- package/dist/957.js +15 -0
- package/dist/957.js.map +1 -0
- package/dist/digihmis-esm-patient-registration-app.js +6 -0
- package/dist/digihmis-esm-patient-registration-app.js.buildmanifest.json +827 -0
- package/dist/digihmis-esm-patient-registration-app.js.map +1 -0
- package/dist/main.js +17 -0
- package/dist/main.js.map +1 -0
- package/dist/routes.json +1 -0
- package/jest.config.js +26 -0
- package/package.json +51 -0
- package/rspack.config.js +1 -0
- package/src/active-visit-table/active-visit-table.component.tsx +240 -0
- package/src/active-visit-table/active-visits.resource.ts +338 -0
- package/src/active-visit-table/active-visits.scss +211 -0
- package/src/active-visit-table/empty-data-illustration.component.tsx +39 -0
- package/src/checkin-form/base-visit-type.component.tsx +102 -0
- package/src/checkin-form/base-visit-type.scss +75 -0
- package/src/checkin-form/checkin-form.scss +167 -0
- package/src/checkin-form/checkin-form.workspace.tsx +703 -0
- package/src/checkin-form/hooks/useDefaultFacilityLocation.ts +15 -0
- package/src/checkin-form/hooks/useDefaultVisitLocation.ts +24 -0
- package/src/checkin-form/hooks/useOfflineVisitType.ts +18 -0
- package/src/checkin-form/hooks/usePatientHistory.ts +40 -0
- package/src/checkin-form/hooks/useRecommendedVisitTypes.ts +34 -0
- package/src/checkin-form/hooks/useVisitAttributeType.ts +102 -0
- package/src/checkin-form/location-selector.component.tsx +86 -0
- package/src/checkin-form/recommended-visit-type.component.tsx +32 -0
- package/src/checkin-form/visit-attribute-type.component.tsx +256 -0
- package/src/checkin-form/visit-attribute-type.scss +5 -0
- package/src/checkin-form/visit-date-time.component.tsx +201 -0
- package/src/checkin-form/visit-form.resource.ts +308 -0
- package/src/components/custom-card/compact-patient-banner.component.tsx +70 -0
- package/src/components/custom-card/compact-patient-banner.scss +34 -0
- package/src/components/custom-card/custom-loader.component.tsx +22 -0
- package/src/components/custom-card/patient-search-context.ts +30 -0
- package/src/components/custom-input/autosuggest/autosuggest.component.tsx +213 -0
- package/src/components/custom-input/autosuggest/autosuggest.scss +158 -0
- package/src/components/custom-input/autosuggest/autosuggest.test.tsx +168 -0
- package/src/components/custom-patient-banner/custom-patient-banner.component.tsx +39 -0
- package/src/components/custom-patient-banner/custom-patient-banner.resource.ts +32 -0
- package/src/components/custom-patient-banner/custom-patient-banner.scss +26 -0
- package/src/config-schema.ts +511 -0
- package/src/constant.ts +6 -0
- package/src/constants/index.ts +1 -0
- package/src/dashboard.meta.ts +8 -0
- package/src/declarations.d.ts +6 -0
- package/src/empty-svg/empty-svg.component.tsx +565 -0
- package/src/icon-wrapper/icon-wrapper.extension.tsx +17 -0
- package/src/identifier-workspace/identifier-configure-form.workspace.tsx +278 -0
- package/src/identifier-workspace/identifier-configure.scss +106 -0
- package/src/identifier-workspace/identifier.resource.ts +90 -0
- package/src/index.ts +33 -0
- package/src/left-panel/left-panel.component.tsx +54 -0
- package/src/left-panel/left-panel.scss +13 -0
- package/src/page-header/page-header.component.tsx +35 -0
- package/src/page-header/page-header.scss +76 -0
- package/src/patient-tags/deceased-patient-tag.extension.tsx +41 -0
- package/src/patient-tags/deceased-patient-tag.scss +15 -0
- package/src/patient-tags/patient-tags.resource.ts +30 -0
- package/src/patient-tags/visit-tag.extension.tsx +43 -0
- package/src/patient-tags/visit-tag.scss +19 -0
- package/src/registration-form/form-manager.ts +449 -0
- package/src/registration-form/registration-form.component.tsx +1565 -0
- package/src/registration-form/registration-form.resource.ts +264 -0
- package/src/registration-form/registration-form.scss +282 -0
- package/src/routes.json +62 -0
- package/src/search-bar/search-bar.component.tsx +285 -0
- package/src/search-bar/search-bar.resource.ts +274 -0
- package/src/search-bar/search-bar.scss +427 -0
- package/src/search-dashboard/search-dashboard.component.tsx +17 -0
- package/src/search-dashboard/search-dashboard.scss +13 -0
- package/src/setup-tests.ts +1 -0
- package/src/type/index.ts +463 -0
- package/src/utils/fhir-mapper.ts +73 -0
- package/src/visit-summary/visit-summary.component.tsx +32 -0
- package/src/visit-summary/visit-summary.resource.ts +56 -0
- package/src/visit-summary/visit-summary.scss +74 -0
- package/translations/am.json +112 -0
- package/translations/ar.json +120 -0
- package/translations/en.json +112 -0
- package/translations/es.json +114 -0
- package/translations/fr.json +114 -0
- package/translations/he.json +114 -0
- package/translations/km.json +111 -0
- package/translations/pt.json +114 -0
- package/translations/sw.json +112 -0
- package/translations/vi.json +111 -0
- package/translations/zh.json +111 -0
- package/tsconfig.json +5 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { FetchResponse, openmrsFetch, restBaseUrl, showSnackbar } from '@openmrs/esm-framework';
|
|
2
|
+
import {
|
|
3
|
+
type Patient,
|
|
4
|
+
type Relationship,
|
|
5
|
+
type PatientIdentifier,
|
|
6
|
+
type Encounter,
|
|
7
|
+
ConceptResponse,
|
|
8
|
+
ConceptAnswers,
|
|
9
|
+
} from '../type';
|
|
10
|
+
import dayjs from 'dayjs';
|
|
11
|
+
import useSWRImmutable from 'swr';
|
|
12
|
+
import { useMemo } from 'react';
|
|
13
|
+
|
|
14
|
+
export const uuidIdentifier = '05a29f94-c0ed-11e2-94be-8c13b969e334';
|
|
15
|
+
export const uuidTelephoneNumber = '14d4f066-15f5-102d-96e4-000c29c2a5d7';
|
|
16
|
+
|
|
17
|
+
function dataURItoFile(dataURI: string) {
|
|
18
|
+
const byteString = window.atob(dataURI.split(',')[1]);
|
|
19
|
+
const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
|
|
20
|
+
// write the bytes of the string to a typed array
|
|
21
|
+
const buffer = new Uint8Array(byteString.length);
|
|
22
|
+
|
|
23
|
+
for (let i = 0; i < byteString.length; i++) {
|
|
24
|
+
buffer[i] = byteString.charCodeAt(i);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const blob = new Blob([buffer], { type: mimeString });
|
|
28
|
+
return new File([blob], 'patient-photo.png');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function savePatient(patient: Patient | null, updatePatientUuid?: string) {
|
|
32
|
+
const abortController = new AbortController();
|
|
33
|
+
|
|
34
|
+
return openmrsFetch(`${restBaseUrl}/patient/${updatePatientUuid || ''}`, {
|
|
35
|
+
headers: {
|
|
36
|
+
'Content-Type': 'application/json',
|
|
37
|
+
},
|
|
38
|
+
method: 'POST',
|
|
39
|
+
body: patient,
|
|
40
|
+
signal: abortController.signal,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function saveEncounter(encounter: Encounter) {
|
|
45
|
+
const abortController = new AbortController();
|
|
46
|
+
|
|
47
|
+
return openmrsFetch(`${restBaseUrl}/encounter`, {
|
|
48
|
+
headers: {
|
|
49
|
+
'Content-Type': 'application/json',
|
|
50
|
+
},
|
|
51
|
+
method: 'POST',
|
|
52
|
+
body: encounter,
|
|
53
|
+
signal: abortController.signal,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function generateIdentifier(source: string) {
|
|
58
|
+
const abortController = new AbortController();
|
|
59
|
+
|
|
60
|
+
return openmrsFetch(`${restBaseUrl}/idgen/identifiersource/${source}/identifier`, {
|
|
61
|
+
headers: {
|
|
62
|
+
'Content-Type': 'application/json',
|
|
63
|
+
},
|
|
64
|
+
method: 'POST',
|
|
65
|
+
body: {},
|
|
66
|
+
signal: abortController.signal,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function deletePersonName(nameUuid: string, personUuid: string) {
|
|
71
|
+
const abortController = new AbortController();
|
|
72
|
+
|
|
73
|
+
return openmrsFetch(`${restBaseUrl}/person/${personUuid}/name/${nameUuid}`, {
|
|
74
|
+
method: 'DELETE',
|
|
75
|
+
signal: abortController.signal,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function saveRelationship(relationship: Relationship) {
|
|
80
|
+
const abortController = new AbortController();
|
|
81
|
+
|
|
82
|
+
return openmrsFetch(`${restBaseUrl}/relationship`, {
|
|
83
|
+
headers: {
|
|
84
|
+
'Content-Type': 'application/json',
|
|
85
|
+
},
|
|
86
|
+
method: 'POST',
|
|
87
|
+
body: relationship,
|
|
88
|
+
signal: abortController.signal,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function updateRelationship(relationshipUuid, relationship: { relationshipType: string }) {
|
|
93
|
+
const abortController = new AbortController();
|
|
94
|
+
|
|
95
|
+
return openmrsFetch(`${restBaseUrl}/relationship/${relationshipUuid}`, {
|
|
96
|
+
headers: {
|
|
97
|
+
'Content-Type': 'application/json',
|
|
98
|
+
},
|
|
99
|
+
method: 'POST',
|
|
100
|
+
body: { relationshipType: relationship.relationshipType },
|
|
101
|
+
signal: abortController.signal,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function deleteRelationship(relationshipUuid) {
|
|
106
|
+
const abortController = new AbortController();
|
|
107
|
+
|
|
108
|
+
return openmrsFetch(`${restBaseUrl}/relationship/${relationshipUuid}`, {
|
|
109
|
+
headers: {
|
|
110
|
+
'Content-Type': 'application/json',
|
|
111
|
+
},
|
|
112
|
+
method: 'DELETE',
|
|
113
|
+
signal: abortController.signal,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export async function savePatientPhoto(
|
|
118
|
+
patientUuid: string,
|
|
119
|
+
content: string,
|
|
120
|
+
url: string,
|
|
121
|
+
date: string,
|
|
122
|
+
conceptUuid: string,
|
|
123
|
+
) {
|
|
124
|
+
const abortController = new AbortController();
|
|
125
|
+
|
|
126
|
+
const formData = new FormData();
|
|
127
|
+
formData.append('patient', patientUuid);
|
|
128
|
+
formData.append('file', dataURItoFile(content));
|
|
129
|
+
formData.append(
|
|
130
|
+
'json',
|
|
131
|
+
JSON.stringify({
|
|
132
|
+
person: patientUuid,
|
|
133
|
+
concept: conceptUuid,
|
|
134
|
+
groupMembers: [],
|
|
135
|
+
obsDatetime: date,
|
|
136
|
+
}),
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
return openmrsFetch(url, {
|
|
140
|
+
method: 'POST',
|
|
141
|
+
signal: abortController.signal,
|
|
142
|
+
body: formData,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export async function fetchPerson(query: string, abortController: AbortController) {
|
|
147
|
+
const [patientsRes, personsRes] = await Promise.all([
|
|
148
|
+
openmrsFetch(`${restBaseUrl}/patient?q=${query}`, {
|
|
149
|
+
signal: abortController.signal,
|
|
150
|
+
}),
|
|
151
|
+
openmrsFetch(`${restBaseUrl}/person?q=${query}`, {
|
|
152
|
+
signal: abortController.signal,
|
|
153
|
+
}),
|
|
154
|
+
]);
|
|
155
|
+
|
|
156
|
+
const results = [...patientsRes.data.results];
|
|
157
|
+
|
|
158
|
+
personsRes.data.results.forEach((person) => {
|
|
159
|
+
if (!results.some((patient) => patient.uuid === person.uuid)) {
|
|
160
|
+
results.push(person);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
return results;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export async function addPatientIdentifier(patientUuid: string, patientIdentifier: PatientIdentifier) {
|
|
168
|
+
const abortController = new AbortController();
|
|
169
|
+
return openmrsFetch(`${restBaseUrl}/patient/${patientUuid}/identifier/`, {
|
|
170
|
+
method: 'POST',
|
|
171
|
+
headers: {
|
|
172
|
+
'Content-Type': 'application/json',
|
|
173
|
+
},
|
|
174
|
+
signal: abortController.signal,
|
|
175
|
+
body: patientIdentifier,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export async function updatePatientIdentifier(patientUuid: string, identifierUuid: string, identifier: string) {
|
|
180
|
+
const abortController = new AbortController();
|
|
181
|
+
return openmrsFetch(`${restBaseUrl}/patient/${patientUuid}/identifier/${identifierUuid}`, {
|
|
182
|
+
method: 'POST',
|
|
183
|
+
headers: {
|
|
184
|
+
'Content-Type': 'application/json',
|
|
185
|
+
},
|
|
186
|
+
signal: abortController.signal,
|
|
187
|
+
body: { identifier },
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export async function deletePatientIdentifier(patientUuid: string, patientIdentifierUuid: string) {
|
|
192
|
+
const abortController = new AbortController();
|
|
193
|
+
return openmrsFetch(`${restBaseUrl}/patient/${patientUuid}/identifier/${patientIdentifierUuid}?purge`, {
|
|
194
|
+
method: 'DELETE',
|
|
195
|
+
headers: {
|
|
196
|
+
'Content-Type': 'application/json',
|
|
197
|
+
},
|
|
198
|
+
signal: abortController.signal,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export function getDatetime(date: Date | string, time: string, timeFormat: 'AM' | 'PM') {
|
|
203
|
+
const datetime = new Date(date);
|
|
204
|
+
|
|
205
|
+
// If time is empty or invalid, return date at start of day (midnight)
|
|
206
|
+
if (!time || time.trim() === '') {
|
|
207
|
+
return dayjs(datetime).startOf('day').toDate();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const timeParts = time.split(':');
|
|
211
|
+
|
|
212
|
+
// Validate time format
|
|
213
|
+
if (timeParts.length !== 2) {
|
|
214
|
+
return dayjs(datetime).startOf('day').toDate();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const [hours, minutes] = timeParts.map(Number);
|
|
218
|
+
|
|
219
|
+
// Validate parsed numbers
|
|
220
|
+
if (isNaN(hours) || isNaN(minutes)) {
|
|
221
|
+
return dayjs(datetime).startOf('day').toDate();
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const fullHours = timeFormat === 'PM' ? (hours % 12) + 12 : hours % 12;
|
|
225
|
+
return dayjs(datetime).hour(fullHours).minute(minutes).second(0).millisecond(0).toDate();
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export function useConcept(conceptUuid: string): { data: ConceptResponse; isLoading: boolean } {
|
|
229
|
+
const shouldFetch = typeof conceptUuid === 'string' && conceptUuid !== '';
|
|
230
|
+
const { data, error, isLoading } = useSWRImmutable<FetchResponse<ConceptResponse>, Error>(
|
|
231
|
+
shouldFetch ? `${restBaseUrl}/concept/${conceptUuid}` : null,
|
|
232
|
+
openmrsFetch,
|
|
233
|
+
);
|
|
234
|
+
if (error) {
|
|
235
|
+
showSnackbar({
|
|
236
|
+
title: error.name,
|
|
237
|
+
subtitle: error.message,
|
|
238
|
+
kind: 'error',
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
const results = useMemo(() => ({ data: data?.data, isLoading }), [data, isLoading]);
|
|
242
|
+
return results;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export function useConceptAnswers(conceptUuid: string): {
|
|
246
|
+
data: Array<ConceptAnswers>;
|
|
247
|
+
isLoading: boolean;
|
|
248
|
+
error: Error;
|
|
249
|
+
} {
|
|
250
|
+
const shouldFetch = typeof conceptUuid === 'string' && conceptUuid !== '';
|
|
251
|
+
const { data, error, isLoading } = useSWRImmutable<FetchResponse<ConceptResponse>, Error>(
|
|
252
|
+
shouldFetch ? `${restBaseUrl}/concept/${conceptUuid}` : null,
|
|
253
|
+
openmrsFetch,
|
|
254
|
+
);
|
|
255
|
+
if (error) {
|
|
256
|
+
showSnackbar({
|
|
257
|
+
title: error.name,
|
|
258
|
+
subtitle: error.message,
|
|
259
|
+
kind: 'error',
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
const results = useMemo(() => ({ data: data?.data?.answers, isLoading, error }), [isLoading, error, data]);
|
|
263
|
+
return results;
|
|
264
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@carbon/colors';
|
|
4
|
+
|
|
5
|
+
.FormContainer {
|
|
6
|
+
margin: 0 auto;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.FormHeader {
|
|
10
|
+
background-color: colors.$gray-10;
|
|
11
|
+
border-bottom: 1px solid colors.$gray-20;
|
|
12
|
+
padding: layout.$spacing-05 layout.$spacing-06;
|
|
13
|
+
margin-top: 1rem;
|
|
14
|
+
:global(.omrs-breakpoint-lt-desktop) & {
|
|
15
|
+
margin-top: 3rem;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.identifierLabelText {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
align-items: center;
|
|
23
|
+
margin-bottom: layout.$spacing-03;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.configureIdentifiersButton {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
margin-left: auto;
|
|
30
|
+
|
|
31
|
+
svg {
|
|
32
|
+
margin-left: layout.$spacing-03;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.customField {
|
|
37
|
+
margin-bottom: layout.$spacing-05;
|
|
38
|
+
}
|
|
39
|
+
.arrowRightIcon {
|
|
40
|
+
fill: currentColor !important;
|
|
41
|
+
}
|
|
42
|
+
.identifierLabelText {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.BackButton {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: layout.$spacing-03;
|
|
51
|
+
background: none;
|
|
52
|
+
border: none;
|
|
53
|
+
padding: layout.$spacing-03 layout.$spacing-04;
|
|
54
|
+
border-radius: layout.$spacing-02;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
transition: background-color 0.15s ease;
|
|
57
|
+
margin-bottom: layout.$spacing-04;
|
|
58
|
+
color: colors.$blue-60;
|
|
59
|
+
@include type.type-style('body-compact-01');
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
background-color: colors.$gray-20;
|
|
63
|
+
color: colors.$blue-70;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:focus {
|
|
67
|
+
outline: 2px solid colors.$blue-60;
|
|
68
|
+
outline-offset: 2px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:active {
|
|
72
|
+
background-color: colors.$gray-30;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.BackButtonText {
|
|
77
|
+
font-weight: 500;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.TitleSection {
|
|
81
|
+
margin-left: layout.$spacing-02;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.FormTitle {
|
|
85
|
+
@include type.type-style('productive-heading-04');
|
|
86
|
+
color: colors.$gray-100;
|
|
87
|
+
margin: 0 0 layout.$spacing-02 0;
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.FormSubtitle {
|
|
92
|
+
@include type.type-style('body-01');
|
|
93
|
+
color: colors.$gray-70;
|
|
94
|
+
margin: 0;
|
|
95
|
+
font-weight: 400;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.FormContent {
|
|
99
|
+
padding: layout.$spacing-06;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.PatientDetailsSection,
|
|
103
|
+
.ContactDetailsSection,
|
|
104
|
+
.IsDeadSection,
|
|
105
|
+
.RelationshipSection {
|
|
106
|
+
margin-bottom: layout.$spacing-07;
|
|
107
|
+
padding-bottom: layout.$spacing-05;
|
|
108
|
+
border-bottom: 1px solid colors.$gray-20;
|
|
109
|
+
|
|
110
|
+
&:last-child {
|
|
111
|
+
border-bottom: none;
|
|
112
|
+
margin-bottom: 0;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.PatientDetailsSection,
|
|
117
|
+
.ContactDetailsSection,
|
|
118
|
+
.IsDeadSection,
|
|
119
|
+
.RelationshipSection {
|
|
120
|
+
background: white;
|
|
121
|
+
padding: layout.$spacing-06;
|
|
122
|
+
border-radius: 8px;
|
|
123
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
124
|
+
margin-bottom: layout.$spacing-07;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.SectionTitle {
|
|
128
|
+
@include type.type-style('productive-heading-03');
|
|
129
|
+
color: colors.$gray-100;
|
|
130
|
+
margin: 0 0 layout.$spacing-05 0;
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.FormField {
|
|
135
|
+
margin-bottom: layout.$spacing-05;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.dobContentSwitcherLabel {
|
|
139
|
+
margin-bottom: layout.$spacing-03;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.label01 {
|
|
143
|
+
@include type.type-style('label-01');
|
|
144
|
+
color: colors.$gray-100;
|
|
145
|
+
font-weight: bold;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.noIdentifiersConfiguredText {
|
|
149
|
+
@include type.type-style('label-02');
|
|
150
|
+
color: colors.$red-60;
|
|
151
|
+
font-weight: bold;
|
|
152
|
+
margin-bottom: layout.$spacing-07;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.required {
|
|
156
|
+
color: colors.$red-60;
|
|
157
|
+
margin-left: 2px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.optional {
|
|
161
|
+
color: colors.$gray-70;
|
|
162
|
+
font-weight: normal;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.contentSwitcher {
|
|
166
|
+
width: 14%;
|
|
167
|
+
|
|
168
|
+
:global(.omrs-breakpoint-lt-desktop) & {
|
|
169
|
+
width: 23%;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.nameFieldsContainer {
|
|
174
|
+
display: grid;
|
|
175
|
+
grid-template-columns: repeat(3, 1fr);
|
|
176
|
+
gap: layout.$spacing-03;
|
|
177
|
+
margin-top: layout.$spacing-03;
|
|
178
|
+
|
|
179
|
+
:global(.omrs-breakpoint-lt-desktop) & {
|
|
180
|
+
grid-template-columns: repeat(3, 1fr);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:global(.omrs-breakpoint-lt-tablet) & {
|
|
184
|
+
grid-template-columns: 1fr;
|
|
185
|
+
gap: layout.$spacing-01;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.addressFieldsContainer {
|
|
190
|
+
display: grid;
|
|
191
|
+
grid-template-columns: repeat(3, 1fr);
|
|
192
|
+
gap: layout.$spacing-05;
|
|
193
|
+
margin-top: layout.$spacing-03;
|
|
194
|
+
|
|
195
|
+
:global(.omrs-breakpoint-lt-desktop) & {
|
|
196
|
+
grid-template-columns: repeat(3, 1fr);
|
|
197
|
+
gap: layout.$spacing-04;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:global(.omrs-breakpoint-lt-tablet) & {
|
|
201
|
+
grid-template-columns: 1fr;
|
|
202
|
+
gap: layout.$spacing-04;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.contactFieldsContainer {
|
|
207
|
+
display: grid;
|
|
208
|
+
grid-template-columns: repeat(2, 1fr);
|
|
209
|
+
gap: layout.$spacing-05;
|
|
210
|
+
margin-top: layout.$spacing-03;
|
|
211
|
+
margin-bottom: layout.$spacing-03;
|
|
212
|
+
|
|
213
|
+
:global(.omrs-breakpoint-lt-desktop) & {
|
|
214
|
+
grid-template-columns: repeat(2, 1fr);
|
|
215
|
+
gap: layout.$spacing-04;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:global(.omrs-breakpoint-lt-tablet) & {
|
|
219
|
+
grid-template-columns: 1fr;
|
|
220
|
+
gap: layout.$spacing-04;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.dobField {
|
|
225
|
+
margin-top: layout.$spacing-04;
|
|
226
|
+
width: 100%;
|
|
227
|
+
|
|
228
|
+
:global(.cds--date-picker-container) {
|
|
229
|
+
width: 100%;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:global(.cds--text-input) {
|
|
233
|
+
width: 100%;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.grid {
|
|
238
|
+
display: grid;
|
|
239
|
+
grid-template-columns: repeat(2, 1fr);
|
|
240
|
+
gap: layout.$spacing-05;
|
|
241
|
+
margin-top: layout.$spacing-04;
|
|
242
|
+
width: 50%;
|
|
243
|
+
|
|
244
|
+
:global(.omrs-breakpoint-lt-tablet) & {
|
|
245
|
+
grid-template-columns: 1fr;
|
|
246
|
+
gap: layout.$spacing-04;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.FormActions {
|
|
251
|
+
display: flex;
|
|
252
|
+
justify-content: flex-end;
|
|
253
|
+
gap: layout.$spacing-04;
|
|
254
|
+
margin-top: layout.$spacing-07;
|
|
255
|
+
padding-top: layout.$spacing-05;
|
|
256
|
+
border-top: 1px solid colors.$gray-20;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.inputField {
|
|
260
|
+
width: 100%;
|
|
261
|
+
}
|
|
262
|
+
.radioButtonOption {
|
|
263
|
+
padding: layout.$spacing-02;
|
|
264
|
+
margin-bottom: layout.$spacing-03;
|
|
265
|
+
}
|
|
266
|
+
.deathDateTimeRow {
|
|
267
|
+
display: flex;
|
|
268
|
+
gap: layout.$spacing-05;
|
|
269
|
+
}
|
|
270
|
+
.causeOfDeathField {
|
|
271
|
+
margin-top: layout.$spacing-04;
|
|
272
|
+
width: 30.8%;
|
|
273
|
+
:global(.omrs-breakpoint-lt-desktop) & {
|
|
274
|
+
width: 66%;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
.fullWidthCombobox {
|
|
278
|
+
width: 32.8%;
|
|
279
|
+
:global(.omrs-breakpoint-lt-desktop) & {
|
|
280
|
+
width: 66%;
|
|
281
|
+
}
|
|
282
|
+
}
|
package/src/routes.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.openmrs.org/routes.schema.json",
|
|
3
|
+
"backendDependencies": {
|
|
4
|
+
"fhir2": ">=1.2",
|
|
5
|
+
"webservices.rest": "^2.24.0"
|
|
6
|
+
},
|
|
7
|
+
"extensions": [
|
|
8
|
+
{
|
|
9
|
+
"name": "registration-dashboard-link",
|
|
10
|
+
"slot": "registration-dashboard-slot",
|
|
11
|
+
"component": "leftPanelLink",
|
|
12
|
+
"meta": {
|
|
13
|
+
"name": "patient-registration",
|
|
14
|
+
"slot": "registration-homepage-dashboard-slot",
|
|
15
|
+
"title": "search"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "search-dashboard",
|
|
20
|
+
"slot": "search-dashboard-slot",
|
|
21
|
+
"component": "searchDashboard"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "registration-form",
|
|
25
|
+
"slot": "registration-form-slot",
|
|
26
|
+
"component": "registrationForm"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "visit-tag",
|
|
30
|
+
"slot": "patient-banner-tags-slot",
|
|
31
|
+
"component": "visitTag",
|
|
32
|
+
"online": true,
|
|
33
|
+
"offline": true
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "deceased-patient-tag",
|
|
37
|
+
"slot": "patient-banner-tags-slot",
|
|
38
|
+
"component": "deceasedPatientTag",
|
|
39
|
+
"online": true,
|
|
40
|
+
"offline": true
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"workspaces": [
|
|
44
|
+
{
|
|
45
|
+
"name": "configure-identifiers",
|
|
46
|
+
"component": "identifierConfigureForm",
|
|
47
|
+
"title": "configureIdentifiersForm",
|
|
48
|
+
"type": "other-form",
|
|
49
|
+
"canMaximize": true,
|
|
50
|
+
"width": "extra-wide"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "check-in-form",
|
|
54
|
+
"component": "checkInWorkspace",
|
|
55
|
+
"title": "checkInFormTitle",
|
|
56
|
+
"type": "other-form",
|
|
57
|
+
"canMaximize": true,
|
|
58
|
+
"width": "extra-wide"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
}
|