@openmrs/esm-patient-allergies-app 11.3.1-patch.9064 → 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 +23 -19
- package/dist/3357.js +1 -1
- package/dist/3357.js.map +1 -1
- package/dist/3753.js +2 -0
- package/dist/3753.js.map +1 -0
- package/dist/4055.js +1 -1
- package/dist/4341.js +1 -0
- package/dist/4341.js.map +1 -0
- package/dist/5563.js +1 -1
- package/dist/5563.js.map +1 -1
- package/dist/5670.js +1 -1
- package/dist/5670.js.map +1 -1
- package/dist/6336.js +1 -0
- package/dist/6336.js.map +1 -0
- package/dist/6884.js +1 -1
- package/dist/9540.js +2 -0
- package/dist/9540.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 +122 -143
- package/dist/openmrs-esm-patient-allergies-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +3 -3
- package/src/allergies/allergies-action-menu.component.tsx +3 -4
- package/src/allergies/allergies-detailed-summary.component.tsx +2 -2
- package/src/allergies/allergies-form/allergy-form.test.tsx +29 -12
- package/src/allergies/allergies-form/allergy-form.workspace.tsx +204 -193
- package/src/allergies/allergies-list.extension.tsx +14 -9
- package/src/allergies/allergies-list.scss +4 -0
- package/src/allergies/allergies-overview.component.tsx +2 -2
- package/src/index.ts +0 -1
- package/src/routes.json +9 -4
- package/translations/fr.json +1 -1
- package/dist/1533.js +0 -2
- package/dist/1533.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/5836.js +0 -2
- package/dist/5836.js.map +0 -1
- package/dist/8803.js +0 -1
- package/dist/8803.js.map +0 -1
- /package/dist/{1533.js.LICENSE.txt → 3753.js.LICENSE.txt} +0 -0
- /package/dist/{5836.js.LICENSE.txt → 9540.js.LICENSE.txt} +0 -0
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import classNames from 'classnames';
|
|
3
3
|
import { Tag, TagSkeleton, Tooltip } from '@carbon/react';
|
|
4
|
-
import { getCoreTranslation } from '@openmrs/esm-framework';
|
|
4
|
+
import { getCoreTranslation, translateFrom } from '@openmrs/esm-framework';
|
|
5
5
|
import { useAllergies } from './allergy-intolerance.resource';
|
|
6
6
|
import { severityOrder } from '../utils';
|
|
7
7
|
import styles from './allergies-list.scss';
|
|
8
8
|
|
|
9
|
+
const moduleName = '@openmrs/esm-patient-allergies-app';
|
|
10
|
+
|
|
9
11
|
interface AllergyListProps {
|
|
10
12
|
patientUuid: string;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
const AllergyList: React.FC<AllergyListProps> = ({ patientUuid }) => {
|
|
14
|
-
const { t } = useTranslation();
|
|
15
16
|
const { allergies, isLoading } = useAllergies(patientUuid);
|
|
16
17
|
|
|
17
18
|
const sortedAllergies = allergies?.sort(
|
|
@@ -19,18 +20,22 @@ const AllergyList: React.FC<AllergyListProps> = ({ patientUuid }) => {
|
|
|
19
20
|
);
|
|
20
21
|
|
|
21
22
|
if (isLoading) {
|
|
22
|
-
return
|
|
23
|
+
return (
|
|
24
|
+
<div className={styles.container}>
|
|
25
|
+
<TagSkeleton />
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
if (sortedAllergies?.length) {
|
|
26
31
|
return (
|
|
27
|
-
<div className={styles.label}>
|
|
28
|
-
<span>{
|
|
32
|
+
<div className={classNames(styles.label, styles.container)}>
|
|
33
|
+
<span>{translateFrom(moduleName, 'allergies', 'Allergies')}:</span>
|
|
29
34
|
{sortedAllergies.map((allergy) => (
|
|
30
35
|
<Tooltip
|
|
31
36
|
align="bottom"
|
|
32
37
|
key={allergy.id}
|
|
33
|
-
label={`${allergy.reactionToSubstance} - ${allergy.reactionSeverity
|
|
38
|
+
label={`${allergy.reactionToSubstance} - ${allergy.reactionSeverity ? translateFrom(moduleName, allergy.reactionSeverity) : getCoreTranslation('unknown')}`}
|
|
34
39
|
>
|
|
35
40
|
<Tag
|
|
36
41
|
className={styles.allergyLabel}
|
|
@@ -46,8 +51,8 @@ const AllergyList: React.FC<AllergyListProps> = ({ patientUuid }) => {
|
|
|
46
51
|
}
|
|
47
52
|
|
|
48
53
|
return (
|
|
49
|
-
<div className={styles.label}>
|
|
50
|
-
{
|
|
54
|
+
<div className={classNames(styles.label, styles.container)}>
|
|
55
|
+
{translateFrom(moduleName, 'allergies', 'Allergies')}: {getCoreTranslation('unknown')}
|
|
51
56
|
</div>
|
|
52
57
|
);
|
|
53
58
|
};
|
|
@@ -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, launchWorkspace2, 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(() => launchWorkspace2(patientAllergiesFormWorkspace), []);
|
|
61
61
|
|
|
62
62
|
if (isLoading) {
|
|
63
63
|
return <DataTableSkeleton role="progressbar" compact={isDesktop} zebra />;
|
package/src/index.ts
CHANGED
|
@@ -51,7 +51,6 @@ export const allergiesDashboardLink = getSyncLifecycle(
|
|
|
51
51
|
options,
|
|
52
52
|
);
|
|
53
53
|
|
|
54
|
-
// t('recordNewAllergy', "Record a new allergy")
|
|
55
54
|
export const allergyFormWorkspace = getAsyncLifecycle(
|
|
56
55
|
() => import('./allergies/allergies-form/allergy-form.workspace'),
|
|
57
56
|
options,
|
package/src/routes.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.openmrs.org/routes.schema.json",
|
|
3
3
|
"backendDependencies": {
|
|
4
4
|
"fhir2": ">=1.2",
|
|
5
|
-
"webservices.rest": "
|
|
5
|
+
"webservices.rest": ">=2.2.0"
|
|
6
6
|
},
|
|
7
7
|
"extensions": [
|
|
8
8
|
{
|
|
@@ -44,12 +44,17 @@
|
|
|
44
44
|
"component": "deleteAllergyModal"
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
|
-
"
|
|
47
|
+
"workspaces2": [
|
|
48
48
|
{
|
|
49
49
|
"name": "patient-allergy-form-workspace",
|
|
50
|
-
"title": "recordNewAllergy",
|
|
51
50
|
"component": "allergyFormWorkspace",
|
|
52
|
-
"
|
|
51
|
+
"window": "patient-allergy-form-window"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"workspaceWindows2": [
|
|
55
|
+
{
|
|
56
|
+
"name": "patient-allergy-form-window",
|
|
57
|
+
"group": "patient-chart"
|
|
53
58
|
}
|
|
54
59
|
]
|
|
55
60
|
}
|
package/translations/fr.json
CHANGED
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"typeAdditionalComments": "Ajouter ici tous commentaires additionnels",
|
|
49
49
|
"typeAllergenName": "Veuillez saisir le nom de l'allergène",
|
|
50
50
|
"typeAllergicReactionName": "Veuillez saisir le nom de la réaction allergique",
|
|
51
|
-
"unknown": "
|
|
51
|
+
"unknown": "Inconnu(e)"
|
|
52
52
|
}
|