@openmrs/esm-patient-allergies-app 11.3.1-patch.9310 → 11.3.1-patch.9508
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 +15 -18
- package/dist/3357.js +1 -1
- package/dist/3357.js.map +1 -1
- package/dist/439.js +1 -0
- package/dist/5563.js +1 -1
- package/dist/5563.js.map +1 -1
- package/dist/5670.js +1 -1
- package/dist/6589.js +1 -0
- package/dist/8371.js +1 -0
- package/dist/8555.js +2 -0
- package/dist/8555.js.map +1 -0
- package/dist/8803.js +1 -0
- package/dist/8803.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-allergies-app.js +1 -1
- package/dist/openmrs-esm-patient-allergies-app.js.buildmanifest.json +123 -57
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/allergies/allergies-action-menu.component.tsx +4 -3
- package/src/allergies/allergies-detailed-summary.component.tsx +2 -2
- package/src/allergies/allergies-form/allergy-form.test.tsx +14 -29
- package/src/allergies/allergies-form/allergy-form.workspace.tsx +192 -202
- package/src/allergies/allergies-overview.component.tsx +2 -2
- package/src/index.ts +1 -0
- package/src/routes.json +3 -8
- package/translations/cs.json +52 -0
- package/translations/sq.json +52 -0
- package/translations/zh_TW.json +52 -0
- package/dist/4341.js +0 -1
- package/dist/4341.js.map +0 -1
- package/dist/9540.js +0 -2
- package/dist/9540.js.map +0 -1
- /package/dist/{9540.js.LICENSE.txt → 8555.js.LICENSE.txt} +0 -0
|
@@ -23,14 +23,8 @@ import {
|
|
|
23
23
|
import { z } from 'zod';
|
|
24
24
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
25
25
|
import { Controller, useForm, useWatch } from 'react-hook-form';
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
showSnackbar,
|
|
29
|
-
useConfig,
|
|
30
|
-
useLayoutType,
|
|
31
|
-
ResponsiveWrapper,
|
|
32
|
-
Workspace2,
|
|
33
|
-
} from '@openmrs/esm-framework';
|
|
26
|
+
import { ExtensionSlot, showSnackbar, useConfig, useLayoutType, ResponsiveWrapper } from '@openmrs/esm-framework';
|
|
27
|
+
import { type DefaultPatientWorkspaceProps } from '@openmrs/esm-patient-common-lib';
|
|
34
28
|
import {
|
|
35
29
|
type Allergen,
|
|
36
30
|
type NewAllergy,
|
|
@@ -43,7 +37,6 @@ import { useAllergies } from '../allergy-intolerance.resource';
|
|
|
43
37
|
import { type AllergiesConfigObject } from '../../config-schema';
|
|
44
38
|
import { ALLERGEN_TYPES, type Allergy } from '../../types';
|
|
45
39
|
import styles from './allergy-form.scss';
|
|
46
|
-
import { type PatientWorkspace2DefinitionProps } from '@openmrs/esm-patient-common-lib';
|
|
47
40
|
|
|
48
41
|
interface AllergyFormData {
|
|
49
42
|
allergen: Allergen;
|
|
@@ -54,7 +47,7 @@ interface AllergyFormData {
|
|
|
54
47
|
severityOfWorstReaction: string;
|
|
55
48
|
}
|
|
56
49
|
|
|
57
|
-
|
|
50
|
+
interface AllergyFormProps extends DefaultPatientWorkspaceProps {
|
|
58
51
|
allergy?: Allergy;
|
|
59
52
|
formContext: 'creating' | 'editing';
|
|
60
53
|
}
|
|
@@ -118,11 +111,14 @@ const allergyFormSchema = (t: TFunction, otherConceptUuid: string) =>
|
|
|
118
111
|
}
|
|
119
112
|
});
|
|
120
113
|
|
|
121
|
-
function
|
|
114
|
+
function AllergyForm({
|
|
122
115
|
closeWorkspace,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
116
|
+
patient,
|
|
117
|
+
patientUuid,
|
|
118
|
+
allergy,
|
|
119
|
+
formContext,
|
|
120
|
+
promptBeforeClosing,
|
|
121
|
+
}: AllergyFormProps) {
|
|
126
122
|
const { allergens } = useAllergens();
|
|
127
123
|
const { allergicReactions, isLoading: isLoadingReactions } = useAllergicReactions();
|
|
128
124
|
const { concepts } = useConfig<AllergiesConfigObject>();
|
|
@@ -289,6 +285,10 @@ function AllergyFormWorkspace({
|
|
|
289
285
|
}
|
|
290
286
|
}, [allergy, formContext, getAllergyFormDefaultValues, inEditMode, isLoadingReactions, setValue]);
|
|
291
287
|
|
|
288
|
+
useEffect(() => {
|
|
289
|
+
promptBeforeClosing(() => isDirty);
|
|
290
|
+
}, [promptBeforeClosing, isDirty]);
|
|
291
|
+
|
|
292
292
|
const selectedAllergen = useWatch({
|
|
293
293
|
control,
|
|
294
294
|
name: 'allergen',
|
|
@@ -345,7 +345,7 @@ function AllergyFormWorkspace({
|
|
|
345
345
|
|
|
346
346
|
const handleSuccess = () => {
|
|
347
347
|
mutate();
|
|
348
|
-
closeWorkspace({
|
|
348
|
+
closeWorkspace({ ignoreChanges: true });
|
|
349
349
|
showSnackbar({
|
|
350
350
|
isLowContrast: true,
|
|
351
351
|
kind: 'success',
|
|
@@ -399,210 +399,200 @@ function AllergyFormWorkspace({
|
|
|
399
399
|
);
|
|
400
400
|
|
|
401
401
|
return (
|
|
402
|
-
<
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
402
|
+
<Form className={styles.formContainer} onSubmit={handleSubmit(onSubmit)}>
|
|
403
|
+
{isTablet ? (
|
|
404
|
+
<Row className={styles.header}>
|
|
405
|
+
<ExtensionSlot className={styles.content} name="patient-details-header-slot" state={extensionSlotState} />
|
|
406
|
+
</Row>
|
|
407
|
+
) : null}
|
|
408
|
+
<div className={styles.form}>
|
|
409
|
+
{isLoadingReactions ? (
|
|
410
|
+
<div className={styles.loaderContainer}>
|
|
411
|
+
<InlineLoading className={styles.loading} description={`${t('loading', 'Loading')} ...`} />
|
|
412
|
+
</div>
|
|
413
|
+
) : (
|
|
414
|
+
<Stack gap={5} className={styles.formContent}>
|
|
415
|
+
{selectedAllergen?.uuid === otherConceptUuid && (
|
|
416
|
+
<InlineNotification
|
|
417
|
+
hideCloseButton
|
|
418
|
+
kind="warning"
|
|
419
|
+
lowContrast
|
|
420
|
+
style={{ minWidth: '100%' }}
|
|
421
|
+
subtitle={t(
|
|
422
|
+
'nonCodedAllergenWarningDescription',
|
|
423
|
+
"Adding a custom allergen may impact system-wide allergy notifications. It's recommended to choose from the provided list for accurate alerts. Custom entries may not trigger notifications in all relevant contexts.",
|
|
424
|
+
)}
|
|
425
|
+
title={t('nonCodedAllergenWarningTitle', 'Warning: Custom Allergen Entry')}
|
|
426
|
+
/>
|
|
427
|
+
)}
|
|
428
|
+
<ResponsiveWrapper>
|
|
429
|
+
<FormGroup legendText="">
|
|
430
|
+
<Controller
|
|
431
|
+
name="allergen"
|
|
432
|
+
control={control}
|
|
433
|
+
render={({ field: { onChange, value } }) => (
|
|
434
|
+
<ComboBox
|
|
435
|
+
id="allergen"
|
|
436
|
+
invalid={!!errors.allergen}
|
|
437
|
+
invalidText={errors.allergen?.message}
|
|
438
|
+
itemToString={(item: unknown) => (item as Allergen)?.display}
|
|
439
|
+
items={allergenItems as unknown as Array<Record<string, unknown>>}
|
|
440
|
+
onChange={(props: { selectedItem?: unknown }) => {
|
|
441
|
+
if (typeof props?.selectedItem !== 'undefined') {
|
|
442
|
+
onChange(props.selectedItem as Allergen);
|
|
443
|
+
}
|
|
444
|
+
}}
|
|
445
|
+
readOnly={inEditMode}
|
|
446
|
+
placeholder={t('selectAllergen', 'Select the allergen')}
|
|
447
|
+
selectedItem={value as unknown as Allergen}
|
|
448
|
+
titleText={t('allergen', 'Allergen')}
|
|
449
|
+
/>
|
|
428
450
|
)}
|
|
429
|
-
title={t('nonCodedAllergenWarningTitle', 'Warning: Custom Allergen Entry')}
|
|
430
451
|
/>
|
|
431
|
-
|
|
452
|
+
</FormGroup>
|
|
453
|
+
</ResponsiveWrapper>
|
|
454
|
+
{selectedAllergen?.uuid === otherConceptUuid && (
|
|
432
455
|
<ResponsiveWrapper>
|
|
433
|
-
<
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
placeholder={t('selectAllergen', 'Select the allergen')}
|
|
451
|
-
selectedItem={value as unknown as Allergen}
|
|
452
|
-
titleText={t('allergen', 'Allergen')}
|
|
453
|
-
/>
|
|
454
|
-
)}
|
|
455
|
-
/>
|
|
456
|
-
</FormGroup>
|
|
456
|
+
<Controller
|
|
457
|
+
name="nonCodedAllergen"
|
|
458
|
+
control={control}
|
|
459
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
460
|
+
<TextInput
|
|
461
|
+
id="nonCodedAllergen"
|
|
462
|
+
invalid={!!errors.nonCodedAllergen}
|
|
463
|
+
invalidText={errors.nonCodedAllergen?.message}
|
|
464
|
+
labelText={t('otherNonCodedAllergen', 'Other non-coded allergen')}
|
|
465
|
+
onBlur={onBlur}
|
|
466
|
+
onChange={onChange}
|
|
467
|
+
placeholder={t('typeAllergenName', 'Please type in the name of the allergen')}
|
|
468
|
+
readOnly={inEditMode}
|
|
469
|
+
value={value}
|
|
470
|
+
/>
|
|
471
|
+
)}
|
|
472
|
+
/>
|
|
457
473
|
</ResponsiveWrapper>
|
|
458
|
-
|
|
474
|
+
)}
|
|
475
|
+
<>
|
|
476
|
+
<div className={classNames({ [styles.checkboxContainer]: isTablet })}>
|
|
477
|
+
<FormGroup legendText="" data-testid="allergic-reactions-container">
|
|
478
|
+
{isLoadingReactions ? (
|
|
479
|
+
<>
|
|
480
|
+
{Array.from({ length: 10 }).map((_, index) => (
|
|
481
|
+
<CheckboxSkeleton key={`checkbox-skeleton-${index}`} />
|
|
482
|
+
))}
|
|
483
|
+
</>
|
|
484
|
+
) : (
|
|
485
|
+
<Controller
|
|
486
|
+
name="allergicReactions"
|
|
487
|
+
control={control}
|
|
488
|
+
render={({ field: { onChange, value } }) => (
|
|
489
|
+
<CheckboxGroup
|
|
490
|
+
invalid={!!errors.allergicReactions}
|
|
491
|
+
invalidText={errors.allergicReactions?.message}
|
|
492
|
+
legendText={t('selectReactions', 'Select the reactions')}
|
|
493
|
+
>
|
|
494
|
+
{allergicReactionsItems.map(({ id, labelText }) => (
|
|
495
|
+
<Checkbox
|
|
496
|
+
checked={Array.isArray(value) && value.includes(id)}
|
|
497
|
+
className={styles.checkbox}
|
|
498
|
+
id={id}
|
|
499
|
+
key={id}
|
|
500
|
+
labelText={labelText}
|
|
501
|
+
onChange={(_, { checked, id }) => {
|
|
502
|
+
const currentValue = Array.isArray(value) ? value : [];
|
|
503
|
+
onChange(checked ? [...currentValue, id] : currentValue.filter((item) => item !== id));
|
|
504
|
+
}}
|
|
505
|
+
/>
|
|
506
|
+
))}
|
|
507
|
+
</CheckboxGroup>
|
|
508
|
+
)}
|
|
509
|
+
/>
|
|
510
|
+
)}
|
|
511
|
+
</FormGroup>
|
|
512
|
+
</div>
|
|
513
|
+
{selectedAllergicReactions?.includes(otherConceptUuid) ? (
|
|
459
514
|
<ResponsiveWrapper>
|
|
460
515
|
<Controller
|
|
461
|
-
name="
|
|
516
|
+
name="nonCodedAllergicReaction"
|
|
462
517
|
control={control}
|
|
463
518
|
render={({ field: { onBlur, onChange, value } }) => (
|
|
464
519
|
<TextInput
|
|
465
|
-
id="
|
|
466
|
-
invalid={!!errors.
|
|
467
|
-
invalidText={errors.
|
|
468
|
-
labelText={t('
|
|
520
|
+
id="nonCodedAllergicReaction"
|
|
521
|
+
invalid={!!errors.nonCodedAllergicReaction}
|
|
522
|
+
invalidText={errors.nonCodedAllergicReaction?.message}
|
|
523
|
+
labelText={t('otherNonCodedAllergicReaction', 'Other non-coded allergic reaction')}
|
|
469
524
|
onBlur={onBlur}
|
|
470
525
|
onChange={onChange}
|
|
471
|
-
placeholder={t('
|
|
472
|
-
readOnly={inEditMode}
|
|
526
|
+
placeholder={t('typeAllergicReactionName', 'Please type in the name of the allergic reaction')}
|
|
473
527
|
value={value}
|
|
474
528
|
/>
|
|
475
529
|
)}
|
|
476
530
|
/>
|
|
477
531
|
</ResponsiveWrapper>
|
|
478
|
-
)}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
onChange={onChange}
|
|
532
|
-
placeholder={t(
|
|
533
|
-
'typeAllergicReactionName',
|
|
534
|
-
'Please type in the name of the allergic reaction',
|
|
535
|
-
)}
|
|
536
|
-
value={value}
|
|
537
|
-
/>
|
|
538
|
-
)}
|
|
539
|
-
/>
|
|
540
|
-
</ResponsiveWrapper>
|
|
541
|
-
) : null}
|
|
542
|
-
</>
|
|
543
|
-
<FormGroup legendText={t('severityOfWorstReaction', 'Severity of worst reaction')}>
|
|
544
|
-
<Controller
|
|
545
|
-
name="severityOfWorstReaction"
|
|
546
|
-
control={control}
|
|
547
|
-
render={({ field: { onBlur, onChange, value } }) => (
|
|
548
|
-
<RadioButtonGroup
|
|
549
|
-
name="severity-of-worst-reaction"
|
|
550
|
-
invalid={!!errors.severityOfWorstReaction}
|
|
551
|
-
invalidText={errors.severityOfWorstReaction?.message}
|
|
552
|
-
onBlur={onBlur}
|
|
553
|
-
onChange={(event) => onChange(event.toString())}
|
|
554
|
-
valueSelected={value}
|
|
555
|
-
>
|
|
556
|
-
{severityLevels.map(({ key, display, uuid }) => (
|
|
557
|
-
<RadioButton id={key} key={key} labelText={display} value={uuid} />
|
|
558
|
-
))}
|
|
559
|
-
</RadioButtonGroup>
|
|
560
|
-
)}
|
|
561
|
-
/>
|
|
562
|
-
</FormGroup>
|
|
563
|
-
|
|
564
|
-
<ResponsiveWrapper>
|
|
565
|
-
<Controller
|
|
566
|
-
name="comment"
|
|
567
|
-
control={control}
|
|
568
|
-
render={({ field: { onBlur, onChange, value } }) => (
|
|
569
|
-
<TextArea
|
|
570
|
-
id="comments"
|
|
571
|
-
labelText={t('comments', 'Comments')}
|
|
572
|
-
onChange={onChange}
|
|
573
|
-
placeholder={t('typeAdditionalComments', 'Type any additional comments here')}
|
|
574
|
-
onBlur={onBlur}
|
|
575
|
-
value={value}
|
|
576
|
-
rows={4}
|
|
577
|
-
/>
|
|
578
|
-
)}
|
|
579
|
-
/>
|
|
580
|
-
</ResponsiveWrapper>
|
|
581
|
-
</Stack>
|
|
582
|
-
)}
|
|
583
|
-
<ButtonSet
|
|
584
|
-
className={classNames(styles.actionButtons, isTablet ? styles.tabletButtons : styles.desktopButtons)}
|
|
532
|
+
) : null}
|
|
533
|
+
</>
|
|
534
|
+
<FormGroup legendText={t('severityOfWorstReaction', 'Severity of worst reaction')}>
|
|
535
|
+
<Controller
|
|
536
|
+
name="severityOfWorstReaction"
|
|
537
|
+
control={control}
|
|
538
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
539
|
+
<RadioButtonGroup
|
|
540
|
+
name="severity-of-worst-reaction"
|
|
541
|
+
invalid={!!errors.severityOfWorstReaction}
|
|
542
|
+
invalidText={errors.severityOfWorstReaction?.message}
|
|
543
|
+
onBlur={onBlur}
|
|
544
|
+
onChange={(event) => onChange(event.toString())}
|
|
545
|
+
valueSelected={value}
|
|
546
|
+
>
|
|
547
|
+
{severityLevels.map(({ key, display, uuid }) => (
|
|
548
|
+
<RadioButton id={key} key={key} labelText={display} value={uuid} />
|
|
549
|
+
))}
|
|
550
|
+
</RadioButtonGroup>
|
|
551
|
+
)}
|
|
552
|
+
/>
|
|
553
|
+
</FormGroup>
|
|
554
|
+
|
|
555
|
+
<ResponsiveWrapper>
|
|
556
|
+
<Controller
|
|
557
|
+
name="comment"
|
|
558
|
+
control={control}
|
|
559
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
560
|
+
<TextArea
|
|
561
|
+
id="comments"
|
|
562
|
+
labelText={t('comments', 'Comments')}
|
|
563
|
+
onChange={onChange}
|
|
564
|
+
placeholder={t('typeAdditionalComments', 'Type any additional comments here')}
|
|
565
|
+
onBlur={onBlur}
|
|
566
|
+
value={value}
|
|
567
|
+
rows={4}
|
|
568
|
+
/>
|
|
569
|
+
)}
|
|
570
|
+
/>
|
|
571
|
+
</ResponsiveWrapper>
|
|
572
|
+
</Stack>
|
|
573
|
+
)}
|
|
574
|
+
<ButtonSet
|
|
575
|
+
className={classNames(styles.actionButtons, isTablet ? styles.tabletButtons : styles.desktopButtons)}
|
|
576
|
+
>
|
|
577
|
+
<Button className={styles.button} onClick={() => closeWorkspace()} kind="secondary">
|
|
578
|
+
{t('discard', 'Discard')}
|
|
579
|
+
</Button>
|
|
580
|
+
<Button
|
|
581
|
+
className={styles.button}
|
|
582
|
+
disabled={isSubmitting || (inEditMode && isLoadingReactions)}
|
|
583
|
+
kind="primary"
|
|
584
|
+
type="submit"
|
|
585
585
|
>
|
|
586
|
-
|
|
587
|
-
{t('
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
{isSubmitting ? (
|
|
596
|
-
<InlineLoading description={t('saving', 'Saving') + '...'} />
|
|
597
|
-
) : (
|
|
598
|
-
<span>{t('saveAndClose', 'Save and close')}</span>
|
|
599
|
-
)}
|
|
600
|
-
</Button>
|
|
601
|
-
</ButtonSet>
|
|
602
|
-
</div>
|
|
603
|
-
</Form>
|
|
604
|
-
</Workspace2>
|
|
586
|
+
{isSubmitting ? (
|
|
587
|
+
<InlineLoading description={t('saving', 'Saving') + '...'} />
|
|
588
|
+
) : (
|
|
589
|
+
<span>{t('saveAndClose', 'Save and close')}</span>
|
|
590
|
+
)}
|
|
591
|
+
</Button>
|
|
592
|
+
</ButtonSet>
|
|
593
|
+
</div>
|
|
594
|
+
</Form>
|
|
605
595
|
);
|
|
606
596
|
}
|
|
607
597
|
|
|
608
|
-
export default
|
|
598
|
+
export default AllergyForm;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TableRow,
|
|
14
14
|
} from '@carbon/react';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import { AddIcon,
|
|
16
|
+
import { AddIcon, launchWorkspace, useLayoutType, usePagination } from '@openmrs/esm-framework';
|
|
17
17
|
import { CardHeader, EmptyState, ErrorState, PatientChartPagination } from '@openmrs/esm-patient-common-lib';
|
|
18
18
|
import { allergiesCount, patientAllergiesFormWorkspace } from '../constants';
|
|
19
19
|
import { useAllergies } from './allergy-intolerance.resource';
|
|
@@ -57,7 +57,7 @@ const AllergiesOverview: React.FC<AllergiesOverviewProps> = ({ patient }) => {
|
|
|
57
57
|
}));
|
|
58
58
|
}, [paginatedAllergies]);
|
|
59
59
|
|
|
60
|
-
const launchAllergiesForm = useCallback(() =>
|
|
60
|
+
const launchAllergiesForm = useCallback(() => launchWorkspace(patientAllergiesFormWorkspace), []);
|
|
61
61
|
|
|
62
62
|
if (isLoading) {
|
|
63
63
|
return <DataTableSkeleton role="progressbar" compact={isDesktop} zebra />;
|
package/src/index.ts
CHANGED
|
@@ -51,6 +51,7 @@ export const allergiesDashboardLink = getSyncLifecycle(
|
|
|
51
51
|
options,
|
|
52
52
|
);
|
|
53
53
|
|
|
54
|
+
// t('recordNewAllergy', "Record a new allergy")
|
|
54
55
|
export const allergyFormWorkspace = getAsyncLifecycle(
|
|
55
56
|
() => import('./allergies/allergies-form/allergy-form.workspace'),
|
|
56
57
|
options,
|
package/src/routes.json
CHANGED
|
@@ -44,17 +44,12 @@
|
|
|
44
44
|
"component": "deleteAllergyModal"
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
|
-
"
|
|
47
|
+
"workspaces": [
|
|
48
48
|
{
|
|
49
49
|
"name": "patient-allergy-form-workspace",
|
|
50
|
+
"title": "recordNewAllergy",
|
|
50
51
|
"component": "allergyFormWorkspace",
|
|
51
|
-
"
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"workspaceWindows2": [
|
|
55
|
-
{
|
|
56
|
-
"name": "patient-allergy-form-window",
|
|
57
|
-
"group": "patient-chart"
|
|
52
|
+
"type": "form"
|
|
58
53
|
}
|
|
59
54
|
]
|
|
60
55
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"add": "Add",
|
|
3
|
+
"allergen": "Allergen",
|
|
4
|
+
"allergenRequired": "Allergen is required",
|
|
5
|
+
"allergies": "Allergies",
|
|
6
|
+
"Allergies": "Allergies",
|
|
7
|
+
"allergyDeleted": "Allergy deleted",
|
|
8
|
+
"allergyIntolerances": "allergy intolerances",
|
|
9
|
+
"allergyNowVisible": "It is now visible on the Allergies page",
|
|
10
|
+
"allergySaved": "Allergy saved",
|
|
11
|
+
"allergySaveError": "Error saving allergy",
|
|
12
|
+
"allergyUpdated": "Allergy updated",
|
|
13
|
+
"atLeastOneReactionRequired": "At least one reaction is required",
|
|
14
|
+
"cancel": "Cancel",
|
|
15
|
+
"comments": "Comments",
|
|
16
|
+
"delete": "Delete",
|
|
17
|
+
"deleteModalConfirmationText": "Are you sure you want to delete this allergy?",
|
|
18
|
+
"deletePatientAllergy": "Delete allergy",
|
|
19
|
+
"deleting": "Deleting",
|
|
20
|
+
"discard": "Discard",
|
|
21
|
+
"edit": "Edit",
|
|
22
|
+
"editAllergy": "Edit an Allergy",
|
|
23
|
+
"editOrDeleteAllergy": "Edit or delete allergy",
|
|
24
|
+
"errorDeletingAllergy": "Error deleting allergy",
|
|
25
|
+
"loading": "Loading",
|
|
26
|
+
"mild": "Mild",
|
|
27
|
+
"moderate": "Moderate",
|
|
28
|
+
"name": "Name",
|
|
29
|
+
"nonCodedAllergenRequired": "Please specify the non-coded allergen",
|
|
30
|
+
"nonCodedAllergenWarningDescription": "Adding a custom allergen may impact system-wide allergy notifications. It's recommended to choose from the provided list for accurate alerts. Custom entries may not trigger notifications in all relevant contexts.",
|
|
31
|
+
"nonCodedAllergenWarningTitle": "Warning: Custom Allergen Entry",
|
|
32
|
+
"nonCodedAllergicReactionRequired": "Please specify the non-coded allergic reaction",
|
|
33
|
+
"other": "Other",
|
|
34
|
+
"otherNonCodedAllergen": "Other non-coded allergen",
|
|
35
|
+
"otherNonCodedAllergicReaction": "Other non-coded allergic reaction",
|
|
36
|
+
"reaction": "Reaction",
|
|
37
|
+
"reactions": "Reactions",
|
|
38
|
+
"recordNewAllergy": "Record a new allergy",
|
|
39
|
+
"saveAndClose": "Save and close",
|
|
40
|
+
"saving": "Saving",
|
|
41
|
+
"seeAll": "See all",
|
|
42
|
+
"selectAllergen": "Select the allergen",
|
|
43
|
+
"selectReactions": "Select the reactions",
|
|
44
|
+
"severe": "Severe",
|
|
45
|
+
"severityandReaction": "Severity",
|
|
46
|
+
"severityOfWorstReaction": "Severity of worst reaction",
|
|
47
|
+
"severityRequired": "Severity is required",
|
|
48
|
+
"typeAdditionalComments": "Type any additional comments here",
|
|
49
|
+
"typeAllergenName": "Please type in the name of the allergen",
|
|
50
|
+
"typeAllergicReactionName": "Please type in the name of the allergic reaction",
|
|
51
|
+
"unknown": "Unknown"
|
|
52
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"add": "Add",
|
|
3
|
+
"allergen": "Allergen",
|
|
4
|
+
"allergenRequired": "Allergen is required",
|
|
5
|
+
"allergies": "Allergies",
|
|
6
|
+
"Allergies": "Allergies",
|
|
7
|
+
"allergyDeleted": "Allergy deleted",
|
|
8
|
+
"allergyIntolerances": "allergy intolerances",
|
|
9
|
+
"allergyNowVisible": "It is now visible on the Allergies page",
|
|
10
|
+
"allergySaved": "Allergy saved",
|
|
11
|
+
"allergySaveError": "Error saving allergy",
|
|
12
|
+
"allergyUpdated": "Allergy updated",
|
|
13
|
+
"atLeastOneReactionRequired": "At least one reaction is required",
|
|
14
|
+
"cancel": "Cancel",
|
|
15
|
+
"comments": "Comments",
|
|
16
|
+
"delete": "Delete",
|
|
17
|
+
"deleteModalConfirmationText": "Are you sure you want to delete this allergy?",
|
|
18
|
+
"deletePatientAllergy": "Delete allergy",
|
|
19
|
+
"deleting": "Deleting",
|
|
20
|
+
"discard": "Discard",
|
|
21
|
+
"edit": "Edit",
|
|
22
|
+
"editAllergy": "Edit an Allergy",
|
|
23
|
+
"editOrDeleteAllergy": "Edit or delete allergy",
|
|
24
|
+
"errorDeletingAllergy": "Error deleting allergy",
|
|
25
|
+
"loading": "Loading",
|
|
26
|
+
"mild": "Mild",
|
|
27
|
+
"moderate": "Moderate",
|
|
28
|
+
"name": "Name",
|
|
29
|
+
"nonCodedAllergenRequired": "Please specify the non-coded allergen",
|
|
30
|
+
"nonCodedAllergenWarningDescription": "Adding a custom allergen may impact system-wide allergy notifications. It's recommended to choose from the provided list for accurate alerts. Custom entries may not trigger notifications in all relevant contexts.",
|
|
31
|
+
"nonCodedAllergenWarningTitle": "Warning: Custom Allergen Entry",
|
|
32
|
+
"nonCodedAllergicReactionRequired": "Please specify the non-coded allergic reaction",
|
|
33
|
+
"other": "Other",
|
|
34
|
+
"otherNonCodedAllergen": "Other non-coded allergen",
|
|
35
|
+
"otherNonCodedAllergicReaction": "Other non-coded allergic reaction",
|
|
36
|
+
"reaction": "Reaction",
|
|
37
|
+
"reactions": "Reactions",
|
|
38
|
+
"recordNewAllergy": "Record a new allergy",
|
|
39
|
+
"saveAndClose": "Save and close",
|
|
40
|
+
"saving": "Saving",
|
|
41
|
+
"seeAll": "See all",
|
|
42
|
+
"selectAllergen": "Select the allergen",
|
|
43
|
+
"selectReactions": "Select the reactions",
|
|
44
|
+
"severe": "Severe",
|
|
45
|
+
"severityandReaction": "Severity",
|
|
46
|
+
"severityOfWorstReaction": "Severity of worst reaction",
|
|
47
|
+
"severityRequired": "Severity is required",
|
|
48
|
+
"typeAdditionalComments": "Type any additional comments here",
|
|
49
|
+
"typeAllergenName": "Please type in the name of the allergen",
|
|
50
|
+
"typeAllergicReactionName": "Please type in the name of the allergic reaction",
|
|
51
|
+
"unknown": "Unknown"
|
|
52
|
+
}
|