@openmrs/esm-dispensing-app 1.6.2 → 1.6.3-pre.3
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/cache/3973258467ef7c66-meta.json +1 -0
- package/.turbo/cache/3973258467ef7c66.tar.zst +0 -0
- package/.turbo/turbo-build.log +44 -0
- package/dist/1616.js +2 -0
- package/dist/{524.js.LICENSE.txt → 1616.js.LICENSE.txt} +9 -14
- package/dist/1616.js.map +1 -0
- package/dist/1637.js +1 -0
- package/dist/1637.js.map +1 -0
- package/dist/1644.js +1 -0
- package/dist/1901.js +1 -0
- package/dist/1905.js +1 -0
- package/dist/1905.js.map +1 -0
- package/dist/2016.js +1 -0
- package/dist/2511.js +1 -0
- package/dist/2511.js.map +1 -0
- package/dist/2757.js +1 -0
- package/dist/3574.js +1 -0
- package/dist/3652.js +1 -0
- package/dist/3935.js +2 -0
- package/dist/3935.js.map +1 -0
- package/dist/4272.js +1 -0
- package/dist/4378.js +1 -0
- package/dist/4460.js +1 -0
- package/dist/4705.js +1 -0
- package/dist/5240.js +1 -0
- package/dist/5336.js +1 -0
- package/dist/5673.js +1 -0
- package/dist/5711.js +1 -0
- package/dist/5737.js +1 -0
- package/dist/5833.js +1 -0
- package/dist/5962.js +1 -0
- package/dist/6497.js +1 -0
- package/dist/6566.js +1 -0
- package/dist/6582.js +1 -0
- package/dist/6582.js.map +1 -0
- package/dist/6727.js +1 -0
- package/dist/6868.js +2 -0
- package/dist/6868.js.LICENSE.txt +14 -0
- package/dist/6868.js.map +1 -0
- package/dist/6936.js +1 -0
- package/dist/6936.js.map +1 -0
- package/dist/6973.js +1 -0
- package/dist/6973.js.map +1 -0
- package/dist/7294.js +2 -0
- package/dist/7294.js.map +1 -0
- package/dist/7484.js +1 -0
- package/dist/7484.js.map +1 -0
- package/dist/7626.js +1 -0
- package/dist/7626.js.map +1 -0
- package/dist/7687.js +1 -0
- package/dist/7687.js.map +1 -0
- package/dist/7807.js +1 -0
- package/dist/7998.js +1 -0
- package/dist/8077.js +1 -0
- package/dist/8077.js.map +1 -0
- package/dist/8271.js +1 -0
- package/dist/8319.js +1 -0
- package/dist/8323.js +1 -0
- package/dist/8788.js +1 -0
- package/dist/8949.js +1 -0
- package/dist/8949.js.map +1 -0
- package/dist/9204.js +2 -0
- package/dist/{204.js.LICENSE.txt → 9204.js.LICENSE.txt} +2 -0
- package/dist/9204.js.map +1 -0
- package/dist/9261.js +1 -0
- package/dist/9579.js +1 -0
- package/dist/9870.js +2 -0
- package/dist/9870.js.LICENSE.txt +9 -0
- package/dist/9870.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +21 -11
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-dispensing-app.js +1 -1
- package/dist/openmrs-esm-dispensing-app.js.buildmanifest.json +455 -244
- package/dist/openmrs-esm-dispensing-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/jest.config.js +3 -1
- package/package.json +7 -4
- package/src/components/{action-buttons.component.test.tsx → action-buttons.test.tsx} +7 -7
- package/src/components/medication-card.component.tsx +3 -3
- package/src/components/medication-card.scss +8 -8
- package/src/components/medication-dispense-review.scss +10 -10
- package/src/components/medication-event.component.tsx +4 -4
- package/src/components/medication-event.scss +10 -5
- package/src/components/patient-details.component.tsx +4 -4
- package/src/components/patient-details.scss +12 -12
- package/src/components/prescription-actions/close-action-button.component.tsx +1 -1
- package/src/components/prescription-actions/dispense-action-button.component.tsx +1 -1
- package/src/components/prescription-actions/pause-action-button.component.tsx +1 -1
- package/src/conditions/conditions.component.tsx +93 -0
- package/src/conditions/conditions.resource.ts +100 -0
- package/src/conditions/conditions.scss +9 -0
- package/src/config-schema.ts +8 -0
- package/src/dashboard/dispensing-dashboard-link.component.tsx +1 -1
- package/src/dashboard/dispensing-dashboard.component.tsx +10 -4
- package/src/declarations.d.ts +0 -1
- package/src/diagnoses/diagnoses.component.tsx +92 -0
- package/src/diagnoses/diagnoses.resource.ts +30 -0
- package/src/diagnoses/diagnoses.scss +9 -0
- package/src/dispensing-tiles/dispensing-tile.component.tsx +20 -17
- package/src/dispensing-tiles/dispensing-tile.scss +8 -8
- package/src/dispensing-tiles/dispensing-tiles.scss +4 -5
- package/src/forms/close-dispense-form.workspace.tsx +25 -23
- package/src/forms/forms.scss +5 -9
- package/src/forms/medication-dispense-review.component.tsx +211 -196
- package/src/forms/pause-dispense-form.workspace.tsx +25 -23
- package/src/forms/stock-dispense/stock-dispense.component.tsx +10 -10
- package/src/history/history-and-comments.scss +15 -15
- package/src/index.ts +3 -0
- package/src/location/location.resource.test.tsx +1 -0
- package/src/medication/medication.resource.tsx +1 -1
- package/src/patient/patient-info-cell.component.tsx +1 -1
- package/src/pharmacy-header/pharmacy-header.scss +11 -11
- package/src/prescriptions/prescription-actions.scss +0 -1
- package/src/prescriptions/prescription-details.component.tsx +6 -6
- package/src/prescriptions/prescription-details.scss +10 -10
- package/src/prescriptions/prescription-expanded.component.tsx +5 -9
- package/src/prescriptions/prescription-expanded.scss +6 -7
- package/src/prescriptions/prescription-tab-lists.component.tsx +5 -5
- package/src/prescriptions/prescriptions.scss +15 -29
- package/src/print-prescription/prescription-printout.component.tsx +1 -1
- package/src/routes.json +14 -0
- package/src/utils.ts +1 -1
- package/tools/setup-tests.ts +1 -0
- package/tools/update-openmrs-deps.mjs +42 -0
- package/translations/en.json +9 -1
- package/translations/es.json +23 -23
- package/translations/it.json +87 -87
- package/translations/ky.json +92 -0
- package/tsconfig.json +3 -2
- package/dist/16.js +0 -1
- package/dist/204.js +0 -2
- package/dist/204.js.map +0 -1
- package/dist/240.js +0 -1
- package/dist/261.js +0 -1
- package/dist/271.js +0 -1
- package/dist/272.js +0 -1
- package/dist/294.js +0 -2
- package/dist/294.js.map +0 -1
- package/dist/319.js +0 -1
- package/dist/323.js +0 -1
- package/dist/336.js +0 -1
- package/dist/378.js +0 -1
- package/dist/460.js +0 -1
- package/dist/484.js +0 -1
- package/dist/484.js.map +0 -1
- package/dist/497.js +0 -1
- package/dist/524.js +0 -2
- package/dist/524.js.map +0 -1
- package/dist/566.js +0 -1
- package/dist/574.js +0 -1
- package/dist/579.js +0 -1
- package/dist/626.js +0 -1
- package/dist/626.js.map +0 -1
- package/dist/637.js +0 -1
- package/dist/637.js.map +0 -1
- package/dist/644.js +0 -1
- package/dist/652.js +0 -1
- package/dist/673.js +0 -1
- package/dist/705.js +0 -1
- package/dist/711.js +0 -1
- package/dist/727.js +0 -1
- package/dist/737.js +0 -1
- package/dist/749.js +0 -1
- package/dist/749.js.map +0 -1
- package/dist/757.js +0 -1
- package/dist/77.js +0 -1
- package/dist/77.js.map +0 -1
- package/dist/788.js +0 -1
- package/dist/803.js +0 -1
- package/dist/803.js.map +0 -1
- package/dist/807.js +0 -1
- package/dist/833.js +0 -1
- package/dist/888.js +0 -1
- package/dist/888.js.map +0 -1
- package/dist/890.js +0 -1
- package/dist/890.js.map +0 -1
- package/dist/901.js +0 -1
- package/dist/905.js +0 -1
- package/dist/905.js.map +0 -1
- package/dist/935.js +0 -2
- package/dist/935.js.map +0 -1
- package/dist/962.js +0 -1
- package/src/root.scss +0 -50
- package/src/setup-tests.ts +0 -1
- package/dist/{935.js.LICENSE.txt → 3935.js.LICENSE.txt} +0 -0
- package/dist/{294.js.LICENSE.txt → 7294.js.LICENSE.txt} +0 -0
- package/src/components/{medication-card.component.test.tsx → medication-card.test.tsx} +0 -0
- package/src/forms/{medication-dispense-review.component.test.tsx → medication-dispense-review.test.tsx} +1 -1
- /package/{i18next-parser.config.js → tools/i18next-parser.config.js} +0 -0
package/src/config-schema.ts
CHANGED
|
@@ -113,6 +113,12 @@ export const configSchema = {
|
|
|
113
113
|
'Enable or disable stock deduction during the dispensing process. Requires the stock management module to be installed and configured.',
|
|
114
114
|
_default: false,
|
|
115
115
|
},
|
|
116
|
+
validateBatch: {
|
|
117
|
+
_type: Type.Boolean,
|
|
118
|
+
_description:
|
|
119
|
+
'Enable or disable stock item batch number validation. Requires the stock management module to be installed and configured.',
|
|
120
|
+
_default: true,
|
|
121
|
+
},
|
|
116
122
|
};
|
|
117
123
|
|
|
118
124
|
export interface PharmacyConfig {
|
|
@@ -156,4 +162,6 @@ export interface PharmacyConfig {
|
|
|
156
162
|
};
|
|
157
163
|
};
|
|
158
164
|
enableStockDispense: boolean;
|
|
165
|
+
|
|
166
|
+
validateBatch: boolean;
|
|
159
167
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
3
|
import { BrowserRouter } from 'react-router-dom';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
6
6
|
|
|
7
7
|
const DispensingDashboardLink = () => {
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { InlineNotification } from '@carbon/react';
|
|
4
|
+
import { setLeftNav, unsetLeftNav, useConfig, WorkspaceContainer } from '@openmrs/esm-framework';
|
|
5
|
+
import { type PharmacyConfig } from '../config-schema';
|
|
3
6
|
import { PharmacyHeader } from '../pharmacy-header/pharmacy-header.component';
|
|
4
7
|
import PrescriptionTabLists from '../prescriptions/prescription-tab-lists.component';
|
|
5
|
-
import { useConfig, WorkspaceContainer } from '@openmrs/esm-framework';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { type PharmacyConfig } from '../config-schema';
|
|
8
8
|
|
|
9
9
|
export default function DispensingDashboard() {
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const basePath = window.spaBase + '/dispensing';
|
|
12
|
+
setLeftNav({ name: 'homepage-dashboard-slot', basePath, mode: 'collapsed' });
|
|
13
|
+
return () => unsetLeftNav('homepage-dashboard-slot');
|
|
14
|
+
}, []);
|
|
15
|
+
|
|
10
16
|
const config = useConfig<PharmacyConfig>();
|
|
11
17
|
const { t } = useTranslation();
|
|
12
18
|
if (config.dispenseBehavior.restrictTotalQuantityDispensed && config.dispenseBehavior.allowModifyingPrescription) {
|
package/src/declarations.d.ts
CHANGED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React, { useMemo, useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import {
|
|
4
|
+
DataTable,
|
|
5
|
+
DataTableSkeleton,
|
|
6
|
+
Layer,
|
|
7
|
+
Pagination,
|
|
8
|
+
Table,
|
|
9
|
+
TableBody,
|
|
10
|
+
TableCell,
|
|
11
|
+
TableHead,
|
|
12
|
+
TableHeader,
|
|
13
|
+
TableRow,
|
|
14
|
+
} from '@carbon/react';
|
|
15
|
+
import { ErrorState, usePagination } from '@openmrs/esm-framework';
|
|
16
|
+
import { CardHeader, EmptyState } from '@openmrs/esm-patient-common-lib';
|
|
17
|
+
import { usePatientDiagnosis } from './diagnoses.resource';
|
|
18
|
+
import styles from './diagnoses.scss';
|
|
19
|
+
|
|
20
|
+
type PatientDiagnosesProps = {
|
|
21
|
+
patientUuid: string;
|
|
22
|
+
encounterUuid: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const PatientDiagnoses: React.FC<PatientDiagnosesProps> = ({ encounterUuid, patientUuid }) => {
|
|
26
|
+
const { diagnoses, isLoading, error } = usePatientDiagnosis(encounterUuid);
|
|
27
|
+
const [pageSize, setPageSize] = useState(3);
|
|
28
|
+
const pageSizesOptions = useMemo(() => [3, 5, 10, 20, 50, 100], []);
|
|
29
|
+
const { results, totalPages, currentPage, goTo } = usePagination(diagnoses, pageSize);
|
|
30
|
+
const { t } = useTranslation();
|
|
31
|
+
const title = t('finalDiagnoses', 'Final Diagnoses');
|
|
32
|
+
const headers = useMemo(() => {
|
|
33
|
+
return [
|
|
34
|
+
{ header: t('diagnosis', 'Diagnosis'), key: 'text' },
|
|
35
|
+
{ header: t('status', 'Status'), key: 'certainty' },
|
|
36
|
+
];
|
|
37
|
+
}, [t]);
|
|
38
|
+
if (isLoading) return <DataTableSkeleton />;
|
|
39
|
+
|
|
40
|
+
if (error) return <ErrorState headerTitle={title} error={error} />;
|
|
41
|
+
|
|
42
|
+
if (!diagnoses?.length)
|
|
43
|
+
return (
|
|
44
|
+
<Layer className={styles.diagnosesContainer}>
|
|
45
|
+
<EmptyState headerTitle={title} displayText={t('visitFinalDiagnoses', 'Visit final diagnoses')} />
|
|
46
|
+
</Layer>
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Layer className={styles.diagnosesContainer}>
|
|
51
|
+
<CardHeader title={title}>
|
|
52
|
+
<React.Fragment />
|
|
53
|
+
</CardHeader>
|
|
54
|
+
<DataTable useZebraStyles rows={results} headers={headers}>
|
|
55
|
+
{({ rows, headers, getTableProps, getHeaderProps, getRowProps }) => (
|
|
56
|
+
<Table {...getTableProps()}>
|
|
57
|
+
<TableHead>
|
|
58
|
+
<TableRow>
|
|
59
|
+
{headers.map((header, i) => (
|
|
60
|
+
<TableHeader {...getHeaderProps({ header })} key={i}>
|
|
61
|
+
{header.header}
|
|
62
|
+
</TableHeader>
|
|
63
|
+
))}
|
|
64
|
+
</TableRow>
|
|
65
|
+
</TableHead>
|
|
66
|
+
<TableBody>
|
|
67
|
+
{rows.map((row, i) => (
|
|
68
|
+
<TableRow {...getRowProps({ row })} key={i}>
|
|
69
|
+
{row.cells.map((cell) => (
|
|
70
|
+
<TableCell key={cell.id}>{cell.value}</TableCell>
|
|
71
|
+
))}
|
|
72
|
+
</TableRow>
|
|
73
|
+
))}
|
|
74
|
+
</TableBody>
|
|
75
|
+
</Table>
|
|
76
|
+
)}
|
|
77
|
+
</DataTable>
|
|
78
|
+
<Pagination
|
|
79
|
+
page={currentPage}
|
|
80
|
+
pageSize={pageSize}
|
|
81
|
+
pageSizes={pageSizesOptions}
|
|
82
|
+
totalItems={diagnoses.length}
|
|
83
|
+
onChange={({ page, pageSize }) => {
|
|
84
|
+
goTo(page);
|
|
85
|
+
setPageSize(pageSize);
|
|
86
|
+
}}
|
|
87
|
+
/>
|
|
88
|
+
</Layer>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export default PatientDiagnoses;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import useSWR from 'swr';
|
|
3
|
+
import { type FetchResponse, openmrsFetch, restBaseUrl, type Visit } from '@openmrs/esm-framework';
|
|
4
|
+
|
|
5
|
+
export const usePatientDiagnosis = (encounterUuid: string) => {
|
|
6
|
+
const customRepresentation =
|
|
7
|
+
'custom:(uuid,display,visit:(uuid,encounters:(uuid,diagnoses:(uuid,display,certainty,diagnosis:(coded:(uuid,display))))))';
|
|
8
|
+
const url = `${restBaseUrl}/encounter/${encounterUuid}?v=${customRepresentation}`;
|
|
9
|
+
|
|
10
|
+
const { data, error, isLoading } = useSWR<FetchResponse<{ visit: Visit }>>(url, openmrsFetch);
|
|
11
|
+
|
|
12
|
+
const diagnoses = useMemo(() => {
|
|
13
|
+
return (
|
|
14
|
+
data?.data?.visit?.encounters?.flatMap(
|
|
15
|
+
(encounter) =>
|
|
16
|
+
encounter.diagnoses.map((diagnosis) => ({
|
|
17
|
+
id: diagnosis.diagnosis.coded.uuid,
|
|
18
|
+
text: diagnosis.display,
|
|
19
|
+
certainty: diagnosis.certainty,
|
|
20
|
+
})) || [],
|
|
21
|
+
) || []
|
|
22
|
+
);
|
|
23
|
+
}, [data]);
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
error,
|
|
27
|
+
isLoading,
|
|
28
|
+
diagnoses: (diagnoses ?? []) as Array<{ id: string; text: string; certainty: string }>,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Tile, Button } from '@carbon/react';
|
|
4
4
|
import { ArrowRight } from '@carbon/react/icons';
|
|
5
|
+
import { ResponsiveWrapper } from '@openmrs/esm-framework';
|
|
5
6
|
import styles from './dispensing-tile.scss';
|
|
6
7
|
|
|
7
8
|
interface DispensingTileProps {
|
|
@@ -15,24 +16,26 @@ const DispensingTile: React.FC<DispensingTileProps> = ({ label, value, headerLab
|
|
|
15
16
|
const { t } = useTranslation();
|
|
16
17
|
|
|
17
18
|
return (
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
<div className={styles.
|
|
21
|
-
<
|
|
22
|
-
|
|
19
|
+
<ResponsiveWrapper>
|
|
20
|
+
<Tile className={styles.tileContainer}>
|
|
21
|
+
<div className={styles.tileHeader}>
|
|
22
|
+
<div className={styles.headerLabelContainer}>
|
|
23
|
+
<label className={styles.headerLabel}>{headerLabel}</label>
|
|
24
|
+
{children}
|
|
25
|
+
</div>
|
|
26
|
+
<Button
|
|
27
|
+
kind="ghost"
|
|
28
|
+
renderIcon={(props) => <ArrowRight size={16} className={styles.arrowIcon} />}
|
|
29
|
+
iconDescription={t('view', 'View')}>
|
|
30
|
+
{t('view', 'View')}
|
|
31
|
+
</Button>
|
|
23
32
|
</div>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</div>
|
|
31
|
-
<div>
|
|
32
|
-
<label className={styles.totalsLabel}>{label}</label>
|
|
33
|
-
<p className={styles.totalsValue}>{value}</p>
|
|
34
|
-
</div>
|
|
35
|
-
</Tile>
|
|
33
|
+
<div>
|
|
34
|
+
<label className={styles.totalsLabel}>{label}</label>
|
|
35
|
+
<p className={styles.totalsValue}>{value}</p>
|
|
36
|
+
</div>
|
|
37
|
+
</Tile>
|
|
38
|
+
</ResponsiveWrapper>
|
|
36
39
|
);
|
|
37
40
|
};
|
|
38
41
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
4
|
|
|
5
5
|
.tileContainer {
|
|
6
|
-
border:
|
|
6
|
+
border: 1px solid $ui-03;
|
|
7
7
|
flex-grow: 1;
|
|
8
8
|
height: 7.875rem;
|
|
9
|
-
padding: 0
|
|
10
|
-
margin:
|
|
9
|
+
padding: 0 layout.$spacing-05;
|
|
10
|
+
margin: layout.$spacing-03 layout.$spacing-03;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.tileHeader {
|
|
14
14
|
display: flex;
|
|
15
15
|
justify-content: space-between;
|
|
16
16
|
align-items: center;
|
|
17
|
-
margin-bottom:
|
|
17
|
+
margin-bottom: layout.$spacing-03;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.headerLabel {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
.headerLabelContainer {
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
38
|
-
height:
|
|
38
|
+
height: layout.$spacing-07;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.arrowIcon {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@
|
|
3
|
-
@import '~@openmrs/esm-styleguide/src/vars';
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
3
|
|
|
5
4
|
.cardContainer {
|
|
6
5
|
background-color: $ui-02;
|
|
7
6
|
display: flex;
|
|
8
7
|
justify-content: space-between;
|
|
9
|
-
padding: 0
|
|
8
|
+
padding: 0 layout.$spacing-05 layout.$spacing-10 layout.$spacing-03;
|
|
10
9
|
flex-flow: row wrap;
|
|
11
|
-
margin-top: -
|
|
10
|
+
margin-top: -layout.$spacing-03;
|
|
12
11
|
}
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
type DefaultWorkspaceProps,
|
|
6
6
|
ExtensionSlot,
|
|
7
7
|
getCoreTranslation,
|
|
8
|
+
ResponsiveWrapper,
|
|
8
9
|
showSnackbar,
|
|
9
10
|
useConfig,
|
|
10
11
|
useLayoutType,
|
|
@@ -152,29 +153,30 @@ const CloseDispenseForm: React.FC<CloseDispenseFormProps> = ({
|
|
|
152
153
|
)}
|
|
153
154
|
{patient && <ExtensionSlot name="patient-header-slot" state={bannerState} />}
|
|
154
155
|
<section className={styles.formGroup}>
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
156
|
+
<ResponsiveWrapper>
|
|
157
|
+
<ComboBox
|
|
158
|
+
id="reasonForPause"
|
|
159
|
+
items={reasonsForClose}
|
|
160
|
+
titleText={t('reasonForClose', 'Reason for close')}
|
|
161
|
+
itemToString={(item) => item?.text}
|
|
162
|
+
initialSelectedItem={{
|
|
163
|
+
id: medicationDispense.statusReasonCodeableConcept?.coding[0]?.code,
|
|
164
|
+
text: medicationDispense.statusReasonCodeableConcept?.text,
|
|
165
|
+
}}
|
|
166
|
+
onChange={({ selectedItem }) => {
|
|
167
|
+
setMedicationDispensePayload({
|
|
168
|
+
...medicationDispensePayload,
|
|
169
|
+
statusReasonCodeableConcept: {
|
|
170
|
+
coding: [
|
|
171
|
+
{
|
|
172
|
+
code: selectedItem?.id,
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
});
|
|
177
|
+
}}
|
|
178
|
+
/>
|
|
179
|
+
</ResponsiveWrapper>
|
|
178
180
|
</section>
|
|
179
181
|
</div>
|
|
180
182
|
<section className={styles.buttonGroup}>
|
package/src/forms/forms.scss
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
.productiveHeading02 {
|
|
7
7
|
color: $color-gray-70;
|
|
8
|
-
@include type.type-style('
|
|
8
|
+
@include type.type-style('heading-02');
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.formWrapper {
|
|
@@ -37,10 +37,6 @@
|
|
|
37
37
|
flex: 3;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.formGroup span {
|
|
41
|
-
@extend .productiveHeading02;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
40
|
.bannerLoading {
|
|
45
41
|
width: 100%;
|
|
46
42
|
display: flex;
|
|
@@ -51,13 +47,13 @@
|
|
|
51
47
|
position: sticky;
|
|
52
48
|
z-index: 1000;
|
|
53
49
|
background-color: $ui-02;
|
|
54
|
-
top:
|
|
50
|
+
top: layout.$spacing-09;
|
|
55
51
|
overflow-y: auto;
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
.dateTimeContainer {
|
|
59
55
|
display: flex;
|
|
60
|
-
margin:
|
|
56
|
+
margin: layout.$spacing-05 0;
|
|
61
57
|
}
|
|
62
58
|
|
|
63
59
|
.timePickersContainer,
|
|
@@ -65,7 +61,7 @@
|
|
|
65
61
|
display: flex;
|
|
66
62
|
|
|
67
63
|
> div {
|
|
68
|
-
margin-right:
|
|
64
|
+
margin-right: layout.$spacing-03;
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
67
|
|
|
@@ -74,7 +70,7 @@
|
|
|
74
70
|
flex-direction: column;
|
|
75
71
|
|
|
76
72
|
> div {
|
|
77
|
-
margin-bottom:
|
|
73
|
+
margin-bottom: layout.$spacing-05;
|
|
78
74
|
}
|
|
79
75
|
}
|
|
80
76
|
|