@openmrs/esm-patient-immunizations-app 11.3.0 → 11.3.1-patch.9310
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 +25 -22
- package/dist/1119.js +1 -1
- package/dist/1197.js +1 -1
- package/dist/1268.js +2 -0
- package/dist/1268.js.map +1 -0
- package/dist/2146.js +1 -1
- package/dist/2690.js +1 -1
- package/dist/3099.js +1 -1
- package/dist/3176.js +1 -0
- package/dist/3584.js +1 -1
- package/dist/3606.js +1 -1
- package/dist/3606.js.map +1 -1
- package/dist/3677.js +1 -1
- package/dist/3677.js.map +1 -1
- package/dist/3679.js +1 -1
- package/dist/4055.js +1 -1
- package/dist/4132.js +1 -1
- package/dist/4335.js +1 -1
- package/dist/4618.js +1 -1
- package/dist/4652.js +1 -1
- package/dist/4944.js +1 -1
- package/dist/5173.js +1 -1
- package/dist/5241.js +1 -1
- package/dist/5442.js +1 -1
- package/dist/5661.js +1 -1
- package/dist/5670.js +1 -0
- package/dist/5670.js.map +1 -0
- package/dist/6022.js +1 -1
- package/dist/6336.js +1 -0
- package/dist/6336.js.map +1 -0
- package/dist/6468.js +1 -1
- package/dist/6679.js +1 -1
- package/dist/6840.js +1 -1
- package/dist/6859.js +1 -1
- package/dist/7097.js +1 -1
- package/dist/7159.js +1 -1
- package/dist/723.js +1 -1
- package/dist/7617.js +1 -1
- package/dist/795.js +2 -1
- package/dist/795.js.map +1 -0
- package/dist/7955.js +1 -0
- package/dist/7955.js.map +1 -0
- package/dist/8163.js +1 -1
- package/dist/8349.js +1 -1
- package/dist/8618.js +1 -1
- package/dist/890.js +1 -1
- package/dist/9214.js +1 -1
- package/dist/9538.js +1 -1
- package/dist/9569.js +1 -1
- package/dist/986.js +1 -1
- package/dist/9879.js +1 -1
- package/dist/9895.js +1 -1
- package/dist/9900.js +1 -1
- package/dist/9913.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-immunizations-app.js +1 -1
- package/dist/openmrs-esm-patient-immunizations-app.js.buildmanifest.json +243 -264
- package/dist/openmrs-esm-patient-immunizations-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +5 -4
- package/src/dashboard.meta.ts +3 -1
- package/src/immunizations/immunizations-detailed-summary.component.tsx +12 -7
- package/src/immunizations/immunizations-detailed-summary.test.tsx +47 -4
- package/src/immunizations/immunizations-form.test.tsx +166 -25
- package/src/immunizations/immunizations-form.workspace.tsx +155 -160
- package/src/immunizations/immunizations-overview.component.tsx +2 -2
- package/src/routes.json +13 -7
- package/translations/am.json +4 -0
- package/translations/ar.json +4 -0
- package/translations/ar_SY.json +4 -0
- package/translations/bn.json +4 -0
- package/translations/de.json +4 -0
- package/translations/en_US.json +4 -0
- package/translations/es.json +4 -0
- package/translations/es_MX.json +4 -0
- package/translations/fr.json +7 -3
- package/translations/he.json +4 -0
- package/translations/hi.json +4 -0
- package/translations/hi_IN.json +4 -0
- package/translations/id.json +4 -0
- package/translations/it.json +22 -18
- package/translations/ka.json +4 -0
- package/translations/km.json +4 -0
- package/translations/ku.json +4 -0
- package/translations/ky.json +4 -0
- package/translations/lg.json +4 -0
- package/translations/ne.json +4 -0
- package/translations/pl.json +4 -0
- package/translations/pt.json +4 -0
- package/translations/pt_BR.json +4 -0
- package/translations/qu.json +4 -0
- package/translations/ro_RO.json +4 -0
- package/translations/ru_RU.json +4 -0
- package/translations/si.json +4 -0
- package/translations/sw.json +4 -0
- package/translations/sw_KE.json +4 -0
- package/translations/tr.json +4 -0
- package/translations/tr_TR.json +4 -0
- package/translations/uk.json +4 -0
- package/translations/uz.json +4 -0
- package/translations/uz@Latn.json +4 -0
- package/translations/uz_UZ.json +4 -0
- package/translations/vi.json +4 -0
- package/translations/zh.json +4 -0
- package/translations/zh_CN.json +4 -0
- package/dist/1975.js +0 -1
- package/dist/1975.js.map +0 -1
- package/dist/2537.js +0 -1
- package/dist/2537.js.map +0 -1
- package/dist/4918.js +0 -1
- package/dist/4918.js.map +0 -1
- package/dist/717.js +0 -1
- package/dist/717.js.map +0 -1
- package/dist/7817.js +0 -2
- package/dist/7817.js.map +0 -1
- package/dist/8807.js +0 -2
- package/dist/8807.js.map +0 -1
- /package/dist/{7817.js.LICENSE.txt → 1268.js.LICENSE.txt} +0 -0
- /package/dist/{8807.js.LICENSE.txt → 795.js.LICENSE.txt} +0 -0
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
useConfig,
|
|
15
15
|
useLayoutType,
|
|
16
16
|
useSession,
|
|
17
|
-
|
|
17
|
+
Workspace2,
|
|
18
18
|
} from '@openmrs/esm-framework';
|
|
19
|
-
import { type
|
|
19
|
+
import { type PatientWorkspace2DefinitionProps } from '@openmrs/esm-patient-common-lib';
|
|
20
20
|
import { DoseInput } from './components/dose-input.component';
|
|
21
21
|
import { immunizationFormSub } from './utils';
|
|
22
22
|
import { mapToFHIRImmunizationResource } from './immunization-mapper';
|
|
@@ -27,18 +27,14 @@ import { useImmunizations } from '../hooks/useImmunizations';
|
|
|
27
27
|
import { useImmunizationsConceptSet } from '../hooks/useImmunizationsConceptSet';
|
|
28
28
|
import styles from './immunizations-form.scss';
|
|
29
29
|
|
|
30
|
-
const ImmunizationsForm: React.FC<
|
|
31
|
-
patient,
|
|
32
|
-
patientUuid,
|
|
30
|
+
const ImmunizationsForm: React.FC<PatientWorkspace2DefinitionProps<{}, {}>> = ({
|
|
33
31
|
closeWorkspace,
|
|
34
|
-
|
|
35
|
-
promptBeforeClosing,
|
|
32
|
+
groupProps: { patientUuid, patient, visitContext },
|
|
36
33
|
}) => {
|
|
37
34
|
const config = useConfig<ImmunizationConfigObject>();
|
|
38
35
|
const currentUser = useSession();
|
|
39
36
|
const isTablet = useLayoutType() === 'tablet';
|
|
40
37
|
const { t } = useTranslation();
|
|
41
|
-
const { currentVisit } = useVisit(patientUuid);
|
|
42
38
|
const { immunizationsConceptSet } = useImmunizationsConceptSet(config);
|
|
43
39
|
const { mutate } = useImmunizations(patientUuid);
|
|
44
40
|
|
|
@@ -100,11 +96,6 @@ const ImmunizationsForm: React.FC<DefaultPatientWorkspaceProps> = ({
|
|
|
100
96
|
watch,
|
|
101
97
|
} = formProps;
|
|
102
98
|
const vaccinationDate = watch('vaccinationDate');
|
|
103
|
-
|
|
104
|
-
useEffect(() => {
|
|
105
|
-
promptBeforeClosing(() => isDirty);
|
|
106
|
-
}, [isDirty, promptBeforeClosing]);
|
|
107
|
-
|
|
108
99
|
const vaccineUuid = watch('vaccineUuid');
|
|
109
100
|
|
|
110
101
|
useEffect(() => {
|
|
@@ -155,7 +146,7 @@ const ImmunizationsForm: React.FC<DefaultPatientWorkspaceProps> = ({
|
|
|
155
146
|
doseNumber,
|
|
156
147
|
nextDoseDate: nextDoseDate ? dayjs(nextDoseDate).startOf('day').toDate().toISOString() : null,
|
|
157
148
|
note,
|
|
158
|
-
expirationDate: expirationDate ? dayjs(expirationDate).
|
|
149
|
+
expirationDate: expirationDate ? dayjs(expirationDate).format('YYYY-MM-DD') : null,
|
|
159
150
|
lotNumber,
|
|
160
151
|
manufacturer,
|
|
161
152
|
};
|
|
@@ -163,14 +154,14 @@ const ImmunizationsForm: React.FC<DefaultPatientWorkspaceProps> = ({
|
|
|
163
154
|
await savePatientImmunization(
|
|
164
155
|
mapToFHIRImmunizationResource(
|
|
165
156
|
immunization,
|
|
166
|
-
immunizationToEditMeta?.visitUuid ||
|
|
157
|
+
immunizationToEditMeta?.visitUuid || visitContext?.uuid,
|
|
167
158
|
currentUser?.sessionLocation?.uuid,
|
|
168
159
|
currentUser?.currentProvider?.uuid,
|
|
169
160
|
),
|
|
170
161
|
immunizationToEditMeta?.immunizationObsUuid,
|
|
171
162
|
abortController,
|
|
172
163
|
);
|
|
173
|
-
|
|
164
|
+
closeWorkspace({ discardUnsavedChanges: true });
|
|
174
165
|
mutate();
|
|
175
166
|
showSnackbar({
|
|
176
167
|
kind: 'success',
|
|
@@ -190,160 +181,164 @@ const ImmunizationsForm: React.FC<DefaultPatientWorkspaceProps> = ({
|
|
|
190
181
|
currentUser?.sessionLocation?.uuid,
|
|
191
182
|
patientUuid,
|
|
192
183
|
currentUser?.currentProvider?.uuid,
|
|
193
|
-
|
|
184
|
+
visitContext?.uuid,
|
|
194
185
|
immunizationToEditMeta,
|
|
195
186
|
immunizationsConceptSet,
|
|
196
|
-
|
|
187
|
+
closeWorkspace,
|
|
197
188
|
t,
|
|
198
189
|
mutate,
|
|
199
190
|
],
|
|
200
191
|
);
|
|
201
192
|
return (
|
|
202
|
-
<
|
|
203
|
-
<
|
|
204
|
-
<
|
|
205
|
-
<
|
|
206
|
-
<Controller
|
|
207
|
-
name="vaccinationDate"
|
|
208
|
-
control={control}
|
|
209
|
-
render={({ field, fieldState }) => (
|
|
210
|
-
<OpenmrsDatePicker
|
|
211
|
-
{...field}
|
|
212
|
-
className={styles.datePicker}
|
|
213
|
-
id="vaccinationDate"
|
|
214
|
-
invalid={Boolean(fieldState?.error?.message)}
|
|
215
|
-
invalidText={fieldState?.error?.message}
|
|
216
|
-
labelText={t('vaccinationDate', 'Vaccination date')}
|
|
217
|
-
maxDate={new Date()}
|
|
218
|
-
/>
|
|
219
|
-
)}
|
|
220
|
-
/>
|
|
221
|
-
</ResponsiveWrapper>
|
|
222
|
-
<ResponsiveWrapper>
|
|
223
|
-
<Controller
|
|
224
|
-
name="vaccineUuid"
|
|
225
|
-
control={control}
|
|
226
|
-
render={({ field: { onChange, value } }) => (
|
|
227
|
-
<Dropdown
|
|
228
|
-
disabled={!!immunizationToEditMeta}
|
|
229
|
-
id="immunization"
|
|
230
|
-
invalid={!!errors?.vaccineUuid}
|
|
231
|
-
invalidText={errors?.vaccineUuid?.message}
|
|
232
|
-
itemToString={(item) =>
|
|
233
|
-
immunizationsConceptSet?.answers.find((candidate) => candidate.uuid == item)?.display
|
|
234
|
-
}
|
|
235
|
-
items={immunizationsConceptSet?.answers?.map((item) => item.uuid) || []}
|
|
236
|
-
label={t('selectImmunization', 'Select immunization')}
|
|
237
|
-
onChange={(val) => onChange(val.selectedItem)}
|
|
238
|
-
selectedItem={value}
|
|
239
|
-
titleText={t('immunization', 'Immunization')}
|
|
240
|
-
/>
|
|
241
|
-
)}
|
|
242
|
-
/>
|
|
243
|
-
</ResponsiveWrapper>
|
|
244
|
-
{vaccineUuid && (
|
|
193
|
+
<Workspace2 title={t('immunizationWorkspaceTitle', 'Immunization')} hasUnsavedChanges={isDirty}>
|
|
194
|
+
<FormProvider {...formProps}>
|
|
195
|
+
<Form className={styles.form} onSubmit={handleSubmit(onSubmit)}>
|
|
196
|
+
<Stack gap={5} className={styles.container}>
|
|
245
197
|
<ResponsiveWrapper>
|
|
246
|
-
<
|
|
198
|
+
<Controller
|
|
199
|
+
name="vaccinationDate"
|
|
200
|
+
control={control}
|
|
201
|
+
render={({ field, fieldState }) => (
|
|
202
|
+
<OpenmrsDatePicker
|
|
203
|
+
{...field}
|
|
204
|
+
className={styles.datePicker}
|
|
205
|
+
id="vaccinationDate"
|
|
206
|
+
invalid={Boolean(fieldState?.error?.message)}
|
|
207
|
+
invalidText={fieldState?.error?.message}
|
|
208
|
+
labelText={t('vaccinationDate', 'Vaccination date')}
|
|
209
|
+
maxDate={new Date()}
|
|
210
|
+
/>
|
|
211
|
+
)}
|
|
212
|
+
/>
|
|
247
213
|
</ResponsiveWrapper>
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
type="text"
|
|
275
|
-
value={value}
|
|
276
|
-
/>
|
|
277
|
-
)}
|
|
278
|
-
/>
|
|
279
|
-
</ResponsiveWrapper>
|
|
280
|
-
<ResponsiveWrapper>
|
|
281
|
-
<Controller
|
|
282
|
-
name="expirationDate"
|
|
283
|
-
control={control}
|
|
284
|
-
render={({ field, fieldState }) => (
|
|
285
|
-
<OpenmrsDatePicker
|
|
286
|
-
{...field}
|
|
287
|
-
className={styles.datePicker}
|
|
288
|
-
id="vaccinationExpiration"
|
|
289
|
-
invalid={Boolean(fieldState?.error?.message)}
|
|
290
|
-
invalidText={fieldState?.error?.message}
|
|
291
|
-
labelText={t('expirationDate', 'Expiration date')}
|
|
292
|
-
minDate={vaccinationDate}
|
|
293
|
-
/>
|
|
294
|
-
)}
|
|
295
|
-
/>
|
|
296
|
-
</ResponsiveWrapper>
|
|
297
|
-
<ResponsiveWrapper>
|
|
298
|
-
<Controller
|
|
299
|
-
name="note"
|
|
300
|
-
control={control}
|
|
301
|
-
render={({ field: { onChange, value } }) => (
|
|
302
|
-
<TextArea
|
|
303
|
-
enableCounter
|
|
304
|
-
id="note"
|
|
305
|
-
invalidText={errors?.note?.message}
|
|
306
|
-
labelText={t('note', 'Note')}
|
|
307
|
-
maxCount={255}
|
|
308
|
-
onChange={(evt) => onChange(evt.target.value)}
|
|
309
|
-
placeholder={t('immunizationNotePlaceholder', 'For example: mild redness at injection site')}
|
|
310
|
-
value={value}
|
|
311
|
-
/>
|
|
312
|
-
)}
|
|
313
|
-
/>
|
|
314
|
-
</ResponsiveWrapper>
|
|
315
|
-
<ResponsiveWrapper>
|
|
316
|
-
<Controller
|
|
317
|
-
name="nextDoseDate"
|
|
318
|
-
control={control}
|
|
319
|
-
render={({ field, fieldState }) => (
|
|
320
|
-
<OpenmrsDatePicker
|
|
321
|
-
{...field}
|
|
322
|
-
className={styles.datePicker}
|
|
323
|
-
id="nextDoseDate"
|
|
324
|
-
invalid={Boolean(fieldState?.error?.message)}
|
|
325
|
-
invalidText={fieldState?.error?.message}
|
|
326
|
-
labelText={t('nextDoseDate', 'Next dose date')}
|
|
327
|
-
minDate={vaccinationDate}
|
|
328
|
-
/>
|
|
329
|
-
)}
|
|
330
|
-
/>
|
|
331
|
-
</ResponsiveWrapper>
|
|
332
|
-
</Stack>
|
|
333
|
-
<ButtonSet className={isTablet ? styles.tablet : styles.desktop}>
|
|
334
|
-
<Button className={styles.button} kind="secondary" onClick={() => closeWorkspace()}>
|
|
335
|
-
{getCoreTranslation('cancel')}
|
|
336
|
-
</Button>
|
|
337
|
-
<Button className={styles.button} kind="primary" disabled={isSubmitting} type="submit">
|
|
338
|
-
{isSubmitting ? (
|
|
339
|
-
<InlineLoading className={styles.spinner} description={t('saving', 'Saving') + '...'} />
|
|
340
|
-
) : (
|
|
341
|
-
<span>{getCoreTranslation('save')}</span>
|
|
214
|
+
<ResponsiveWrapper>
|
|
215
|
+
<Controller
|
|
216
|
+
name="vaccineUuid"
|
|
217
|
+
control={control}
|
|
218
|
+
render={({ field: { onChange, value } }) => (
|
|
219
|
+
<Dropdown
|
|
220
|
+
disabled={!!immunizationToEditMeta}
|
|
221
|
+
id="immunization"
|
|
222
|
+
invalid={!!errors?.vaccineUuid}
|
|
223
|
+
invalidText={errors?.vaccineUuid?.message}
|
|
224
|
+
itemToString={(item) =>
|
|
225
|
+
immunizationsConceptSet?.answers.find((candidate) => candidate.uuid == item)?.display
|
|
226
|
+
}
|
|
227
|
+
items={immunizationsConceptSet?.answers?.map((item) => item.uuid) || []}
|
|
228
|
+
label={t('selectImmunization', 'Select immunization')}
|
|
229
|
+
onChange={(val) => onChange(val.selectedItem)}
|
|
230
|
+
selectedItem={value}
|
|
231
|
+
titleText={t('immunization', 'Immunization')}
|
|
232
|
+
/>
|
|
233
|
+
)}
|
|
234
|
+
/>
|
|
235
|
+
</ResponsiveWrapper>
|
|
236
|
+
{vaccineUuid && (
|
|
237
|
+
<ResponsiveWrapper>
|
|
238
|
+
<DoseInput vaccine={vaccineUuid} sequences={config.sequenceDefinitions} control={control} />
|
|
239
|
+
</ResponsiveWrapper>
|
|
342
240
|
)}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
241
|
+
<div className={styles.vaccineBatchHeading}>
|
|
242
|
+
{t('vaccineBatchInformation', 'Vaccine Batch Information')}
|
|
243
|
+
</div>
|
|
244
|
+
<ResponsiveWrapper>
|
|
245
|
+
<Controller
|
|
246
|
+
name="manufacturer"
|
|
247
|
+
control={control}
|
|
248
|
+
render={({ field: { onChange, value } }) => (
|
|
249
|
+
<TextInput
|
|
250
|
+
id="manufacturer"
|
|
251
|
+
labelText={t('manufacturer', 'Manufacturer')}
|
|
252
|
+
onChange={(evt) => onChange(evt.target.value)}
|
|
253
|
+
type="text"
|
|
254
|
+
value={value}
|
|
255
|
+
/>
|
|
256
|
+
)}
|
|
257
|
+
/>
|
|
258
|
+
</ResponsiveWrapper>
|
|
259
|
+
<ResponsiveWrapper>
|
|
260
|
+
<Controller
|
|
261
|
+
name="lotNumber"
|
|
262
|
+
control={control}
|
|
263
|
+
render={({ field: { onChange, value } }) => (
|
|
264
|
+
<TextInput
|
|
265
|
+
id="lotNumber"
|
|
266
|
+
labelText={t('lotNumber', 'Lot Number')}
|
|
267
|
+
onChange={(evt) => onChange(evt.target.value)}
|
|
268
|
+
type="text"
|
|
269
|
+
value={value}
|
|
270
|
+
/>
|
|
271
|
+
)}
|
|
272
|
+
/>
|
|
273
|
+
</ResponsiveWrapper>
|
|
274
|
+
<ResponsiveWrapper>
|
|
275
|
+
<Controller
|
|
276
|
+
name="expirationDate"
|
|
277
|
+
control={control}
|
|
278
|
+
render={({ field, fieldState }) => (
|
|
279
|
+
<OpenmrsDatePicker
|
|
280
|
+
{...field}
|
|
281
|
+
className={styles.datePicker}
|
|
282
|
+
id="vaccinationExpiration"
|
|
283
|
+
invalid={Boolean(fieldState?.error?.message)}
|
|
284
|
+
invalidText={fieldState?.error?.message}
|
|
285
|
+
labelText={t('expirationDate', 'Expiration date')}
|
|
286
|
+
minDate={vaccinationDate}
|
|
287
|
+
/>
|
|
288
|
+
)}
|
|
289
|
+
/>
|
|
290
|
+
</ResponsiveWrapper>
|
|
291
|
+
<ResponsiveWrapper>
|
|
292
|
+
<Controller
|
|
293
|
+
name="note"
|
|
294
|
+
control={control}
|
|
295
|
+
render={({ field: { onChange, value } }) => (
|
|
296
|
+
<TextArea
|
|
297
|
+
enableCounter
|
|
298
|
+
id="note"
|
|
299
|
+
invalidText={errors?.note?.message}
|
|
300
|
+
labelText={t('note', 'Note')}
|
|
301
|
+
maxCount={255}
|
|
302
|
+
onChange={(evt) => onChange(evt.target.value)}
|
|
303
|
+
placeholder={t('immunizationNotePlaceholder', 'For example: mild redness at injection site')}
|
|
304
|
+
value={value}
|
|
305
|
+
/>
|
|
306
|
+
)}
|
|
307
|
+
/>
|
|
308
|
+
</ResponsiveWrapper>
|
|
309
|
+
<ResponsiveWrapper>
|
|
310
|
+
<Controller
|
|
311
|
+
name="nextDoseDate"
|
|
312
|
+
control={control}
|
|
313
|
+
render={({ field, fieldState }) => (
|
|
314
|
+
<OpenmrsDatePicker
|
|
315
|
+
{...field}
|
|
316
|
+
className={styles.datePicker}
|
|
317
|
+
id="nextDoseDate"
|
|
318
|
+
invalid={Boolean(fieldState?.error?.message)}
|
|
319
|
+
invalidText={fieldState?.error?.message}
|
|
320
|
+
labelText={t('nextDoseDate', 'Next dose date')}
|
|
321
|
+
minDate={vaccinationDate}
|
|
322
|
+
/>
|
|
323
|
+
)}
|
|
324
|
+
/>
|
|
325
|
+
</ResponsiveWrapper>
|
|
326
|
+
</Stack>
|
|
327
|
+
<ButtonSet className={isTablet ? styles.tablet : styles.desktop}>
|
|
328
|
+
<Button className={styles.button} kind="secondary" onClick={() => closeWorkspace()}>
|
|
329
|
+
{getCoreTranslation('cancel')}
|
|
330
|
+
</Button>
|
|
331
|
+
<Button className={styles.button} kind="primary" disabled={isSubmitting} type="submit">
|
|
332
|
+
{isSubmitting ? (
|
|
333
|
+
<InlineLoading className={styles.spinner} description={t('saving', 'Saving') + '...'} />
|
|
334
|
+
) : (
|
|
335
|
+
<span>{getCoreTranslation('save')}</span>
|
|
336
|
+
)}
|
|
337
|
+
</Button>
|
|
338
|
+
</ButtonSet>
|
|
339
|
+
</Form>
|
|
340
|
+
</FormProvider>
|
|
341
|
+
</Workspace2>
|
|
347
342
|
);
|
|
348
343
|
};
|
|
349
344
|
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
TableHeader,
|
|
15
15
|
TableRow,
|
|
16
16
|
} from '@carbon/react';
|
|
17
|
-
import { AddIcon, formatDate,
|
|
17
|
+
import { AddIcon, formatDate, launchWorkspace2, parseDate, usePagination } from '@openmrs/esm-framework';
|
|
18
18
|
import { CardHeader, EmptyState, ErrorState, PatientChartPagination } from '@openmrs/esm-patient-common-lib';
|
|
19
19
|
import { useImmunizations } from '../hooks/useImmunizations';
|
|
20
20
|
import styles from './immunizations-overview.scss';
|
|
@@ -36,7 +36,7 @@ const ImmunizationsOverview: React.FC<ImmunizationsOverviewProps> = ({ patient,
|
|
|
36
36
|
const { data: immunizations, error, isLoading, isValidating } = useImmunizations(patientUuid);
|
|
37
37
|
const { results: paginatedImmunizations, goTo, currentPage } = usePagination(immunizations ?? [], immunizationsCount);
|
|
38
38
|
|
|
39
|
-
const launchImmunizationsForm = React.useCallback(() =>
|
|
39
|
+
const launchImmunizationsForm = React.useCallback(() => launchWorkspace2('immunization-form-workspace'), []);
|
|
40
40
|
|
|
41
41
|
const tableHeaders = [
|
|
42
42
|
{
|
package/src/routes.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.openmrs.org/routes.schema.json",
|
|
3
3
|
"backendDependencies": {
|
|
4
|
-
"webservices.rest": "
|
|
4
|
+
"webservices.rest": ">=2.2.0"
|
|
5
5
|
},
|
|
6
6
|
"extensions": [
|
|
7
7
|
{
|
|
@@ -37,17 +37,23 @@
|
|
|
37
37
|
}
|
|
38
38
|
],
|
|
39
39
|
"pages": [],
|
|
40
|
-
"
|
|
40
|
+
"modals": [
|
|
41
|
+
{
|
|
42
|
+
"name": "immunization-delete-confirmation-modal",
|
|
43
|
+
"component": "deleteImmunizationConfirmationModal"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"workspaces2": [
|
|
41
47
|
{
|
|
42
48
|
"name": "immunization-form-workspace",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
49
|
+
"component": "immunizationFormWorkspace",
|
|
50
|
+
"window": "immunization-form-window"
|
|
45
51
|
}
|
|
46
52
|
],
|
|
47
|
-
"
|
|
53
|
+
"workspaceWindows2": [
|
|
48
54
|
{
|
|
49
|
-
"name": "immunization-
|
|
50
|
-
"
|
|
55
|
+
"name": "immunization-form-window",
|
|
56
|
+
"group": "patient-chart"
|
|
51
57
|
}
|
|
52
58
|
]
|
|
53
59
|
}
|
package/translations/am.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Dose number within series",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "Error saving vaccination",
|
|
12
13
|
"expirationDate": "Expiration Date",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "Manufacturer",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "Please select",
|
|
30
34
|
"recentVaccination": "Recent vaccination",
|
package/translations/ar.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Dose number within series",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "خطأ في حفظ التطعيم",
|
|
12
13
|
"expirationDate": "تاريخ الانتهاء",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "المصنع",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "يرجى الاختيار",
|
|
30
34
|
"recentVaccination": "تطعيم حديث",
|
package/translations/ar_SY.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Dose number within series",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "Error saving vaccination",
|
|
12
13
|
"expirationDate": "Expiration Date",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "Manufacturer",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "Please select",
|
|
30
34
|
"recentVaccination": "Recent vaccination",
|
package/translations/bn.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Dose number within series",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "Error saving vaccination",
|
|
12
13
|
"expirationDate": "Expiration Date",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "Manufacturer",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "Please select",
|
|
30
34
|
"recentVaccination": "Recent vaccination",
|
package/translations/de.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Dose number within series",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "Error saving vaccination",
|
|
12
13
|
"expirationDate": "Expiration Date",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "Manufacturer",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "Please select",
|
|
30
34
|
"recentVaccination": "Recent vaccination",
|
package/translations/en_US.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Dose number within series",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "Error saving vaccination",
|
|
12
13
|
"expirationDate": "Expiration Date",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "Manufacturer",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "Please select",
|
|
30
34
|
"recentVaccination": "Recent vaccination",
|
package/translations/es.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Número de dosis dentro de la serie",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "Error al guardar la vacunación",
|
|
12
13
|
"expirationDate": "Fecha de Vencimiento",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "Fabricante",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "Por favor, seleccione",
|
|
30
34
|
"recentVaccination": "Vacunación reciente",
|
package/translations/es_MX.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Dose number within series",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "Error saving vaccination",
|
|
12
13
|
"expirationDate": "Expiration Date",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "Manufacturer",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "Please select",
|
|
30
34
|
"recentVaccination": "Recent vaccination",
|
package/translations/fr.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Numéro de la dose dans la série",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Erreur",
|
|
11
12
|
"errorSaving": "Erreur d'enregistrement de la vaccination",
|
|
12
13
|
"expirationDate": "Date d'expiration",
|
|
@@ -15,16 +16,19 @@
|
|
|
15
16
|
"immunizationDeleted": "Vaccination supprimée",
|
|
16
17
|
"immunizationDeletedSuccess": "Dose de vaccination supprimée avec succès",
|
|
17
18
|
"immunizationDeleteError": "Échec de la supprimer de la vaccination :",
|
|
18
|
-
"immunizationHistory": "
|
|
19
|
+
"immunizationHistory": "Historique de vaccination",
|
|
19
20
|
"immunizationNotePlaceholder": "For example: mild redness at injection site",
|
|
20
21
|
"immunizations": "Vaccinations",
|
|
21
22
|
"Immunizations": "Vaccinations",
|
|
22
23
|
"immunizations__lower": "Vaccinations",
|
|
23
|
-
"immunizationsHistory": "
|
|
24
|
+
"immunizationsHistory": "Historique de vaccinations",
|
|
24
25
|
"immunizationWorkspaceTitle": "Formulaire de vaccination",
|
|
25
|
-
"lastDoseOnDate": "
|
|
26
|
+
"lastDoseOnDate": "Dernière dose le {{date}}",
|
|
26
27
|
"lotNumber": "Numéro de lot",
|
|
27
28
|
"manufacturer": "Fabricant",
|
|
29
|
+
"nextDose": "Prochaine dose",
|
|
30
|
+
"nextDoseDate": "Date de la prochaine dose",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "Veuillez sélectionner",
|
|
30
34
|
"recentVaccination": "Vaccination récente",
|
package/translations/he.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Dose number within series",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "שגיאה בשמירת החיסון",
|
|
12
13
|
"expirationDate": "תאריך תפוגה",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "יצרן",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "בחר בבקשה",
|
|
30
34
|
"recentVaccination": "חיסון אחרון",
|
package/translations/hi.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"doseNumber": "Dose {{number}}",
|
|
8
8
|
"doseNumberWithinSeries": "Dose number within series",
|
|
9
9
|
"doses": "Doses",
|
|
10
|
+
"due": "Due",
|
|
10
11
|
"error": "Error",
|
|
11
12
|
"errorSaving": "Error saving vaccination",
|
|
12
13
|
"expirationDate": "Expiration Date",
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
"lastDoseOnDate": "Last dose on {{date}}",
|
|
26
27
|
"lotNumber": "Lot number",
|
|
27
28
|
"manufacturer": "Manufacturer",
|
|
29
|
+
"nextDose": "Next dose",
|
|
30
|
+
"nextDoseDate": "Next dose date",
|
|
31
|
+
"notDue": "Not due",
|
|
28
32
|
"note": "Note",
|
|
29
33
|
"pleaseSelect": "Please select",
|
|
30
34
|
"recentVaccination": "Recent vaccination",
|