@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.
Files changed (190) hide show
  1. package/.turbo/cache/3973258467ef7c66-meta.json +1 -0
  2. package/.turbo/cache/3973258467ef7c66.tar.zst +0 -0
  3. package/.turbo/turbo-build.log +44 -0
  4. package/dist/1616.js +2 -0
  5. package/dist/{524.js.LICENSE.txt → 1616.js.LICENSE.txt} +9 -14
  6. package/dist/1616.js.map +1 -0
  7. package/dist/1637.js +1 -0
  8. package/dist/1637.js.map +1 -0
  9. package/dist/1644.js +1 -0
  10. package/dist/1901.js +1 -0
  11. package/dist/1905.js +1 -0
  12. package/dist/1905.js.map +1 -0
  13. package/dist/2016.js +1 -0
  14. package/dist/2511.js +1 -0
  15. package/dist/2511.js.map +1 -0
  16. package/dist/2757.js +1 -0
  17. package/dist/3574.js +1 -0
  18. package/dist/3652.js +1 -0
  19. package/dist/3935.js +2 -0
  20. package/dist/3935.js.map +1 -0
  21. package/dist/4272.js +1 -0
  22. package/dist/4378.js +1 -0
  23. package/dist/4460.js +1 -0
  24. package/dist/4705.js +1 -0
  25. package/dist/5240.js +1 -0
  26. package/dist/5336.js +1 -0
  27. package/dist/5673.js +1 -0
  28. package/dist/5711.js +1 -0
  29. package/dist/5737.js +1 -0
  30. package/dist/5833.js +1 -0
  31. package/dist/5962.js +1 -0
  32. package/dist/6497.js +1 -0
  33. package/dist/6566.js +1 -0
  34. package/dist/6582.js +1 -0
  35. package/dist/6582.js.map +1 -0
  36. package/dist/6727.js +1 -0
  37. package/dist/6868.js +2 -0
  38. package/dist/6868.js.LICENSE.txt +14 -0
  39. package/dist/6868.js.map +1 -0
  40. package/dist/6936.js +1 -0
  41. package/dist/6936.js.map +1 -0
  42. package/dist/6973.js +1 -0
  43. package/dist/6973.js.map +1 -0
  44. package/dist/7294.js +2 -0
  45. package/dist/7294.js.map +1 -0
  46. package/dist/7484.js +1 -0
  47. package/dist/7484.js.map +1 -0
  48. package/dist/7626.js +1 -0
  49. package/dist/7626.js.map +1 -0
  50. package/dist/7687.js +1 -0
  51. package/dist/7687.js.map +1 -0
  52. package/dist/7807.js +1 -0
  53. package/dist/7998.js +1 -0
  54. package/dist/8077.js +1 -0
  55. package/dist/8077.js.map +1 -0
  56. package/dist/8271.js +1 -0
  57. package/dist/8319.js +1 -0
  58. package/dist/8323.js +1 -0
  59. package/dist/8788.js +1 -0
  60. package/dist/8949.js +1 -0
  61. package/dist/8949.js.map +1 -0
  62. package/dist/9204.js +2 -0
  63. package/dist/{204.js.LICENSE.txt → 9204.js.LICENSE.txt} +2 -0
  64. package/dist/9204.js.map +1 -0
  65. package/dist/9261.js +1 -0
  66. package/dist/9579.js +1 -0
  67. package/dist/9870.js +2 -0
  68. package/dist/9870.js.LICENSE.txt +9 -0
  69. package/dist/9870.js.map +1 -0
  70. package/dist/main.js +1 -1
  71. package/dist/main.js.LICENSE.txt +21 -11
  72. package/dist/main.js.map +1 -1
  73. package/dist/openmrs-esm-dispensing-app.js +1 -1
  74. package/dist/openmrs-esm-dispensing-app.js.buildmanifest.json +455 -244
  75. package/dist/openmrs-esm-dispensing-app.js.map +1 -1
  76. package/dist/routes.json +1 -1
  77. package/jest.config.js +3 -1
  78. package/package.json +7 -4
  79. package/src/components/{action-buttons.component.test.tsx → action-buttons.test.tsx} +7 -7
  80. package/src/components/medication-card.component.tsx +3 -3
  81. package/src/components/medication-card.scss +8 -8
  82. package/src/components/medication-dispense-review.scss +10 -10
  83. package/src/components/medication-event.component.tsx +4 -4
  84. package/src/components/medication-event.scss +10 -5
  85. package/src/components/patient-details.component.tsx +4 -4
  86. package/src/components/patient-details.scss +12 -12
  87. package/src/components/prescription-actions/close-action-button.component.tsx +1 -1
  88. package/src/components/prescription-actions/dispense-action-button.component.tsx +1 -1
  89. package/src/components/prescription-actions/pause-action-button.component.tsx +1 -1
  90. package/src/conditions/conditions.component.tsx +93 -0
  91. package/src/conditions/conditions.resource.ts +100 -0
  92. package/src/conditions/conditions.scss +9 -0
  93. package/src/config-schema.ts +8 -0
  94. package/src/dashboard/dispensing-dashboard-link.component.tsx +1 -1
  95. package/src/dashboard/dispensing-dashboard.component.tsx +10 -4
  96. package/src/declarations.d.ts +0 -1
  97. package/src/diagnoses/diagnoses.component.tsx +92 -0
  98. package/src/diagnoses/diagnoses.resource.ts +30 -0
  99. package/src/diagnoses/diagnoses.scss +9 -0
  100. package/src/dispensing-tiles/dispensing-tile.component.tsx +20 -17
  101. package/src/dispensing-tiles/dispensing-tile.scss +8 -8
  102. package/src/dispensing-tiles/dispensing-tiles.scss +4 -5
  103. package/src/forms/close-dispense-form.workspace.tsx +25 -23
  104. package/src/forms/forms.scss +5 -9
  105. package/src/forms/medication-dispense-review.component.tsx +211 -196
  106. package/src/forms/pause-dispense-form.workspace.tsx +25 -23
  107. package/src/forms/stock-dispense/stock-dispense.component.tsx +10 -10
  108. package/src/history/history-and-comments.scss +15 -15
  109. package/src/index.ts +3 -0
  110. package/src/location/location.resource.test.tsx +1 -0
  111. package/src/medication/medication.resource.tsx +1 -1
  112. package/src/patient/patient-info-cell.component.tsx +1 -1
  113. package/src/pharmacy-header/pharmacy-header.scss +11 -11
  114. package/src/prescriptions/prescription-actions.scss +0 -1
  115. package/src/prescriptions/prescription-details.component.tsx +6 -6
  116. package/src/prescriptions/prescription-details.scss +10 -10
  117. package/src/prescriptions/prescription-expanded.component.tsx +5 -9
  118. package/src/prescriptions/prescription-expanded.scss +6 -7
  119. package/src/prescriptions/prescription-tab-lists.component.tsx +5 -5
  120. package/src/prescriptions/prescriptions.scss +15 -29
  121. package/src/print-prescription/prescription-printout.component.tsx +1 -1
  122. package/src/routes.json +14 -0
  123. package/src/utils.ts +1 -1
  124. package/tools/setup-tests.ts +1 -0
  125. package/tools/update-openmrs-deps.mjs +42 -0
  126. package/translations/en.json +9 -1
  127. package/translations/es.json +23 -23
  128. package/translations/it.json +87 -87
  129. package/translations/ky.json +92 -0
  130. package/tsconfig.json +3 -2
  131. package/dist/16.js +0 -1
  132. package/dist/204.js +0 -2
  133. package/dist/204.js.map +0 -1
  134. package/dist/240.js +0 -1
  135. package/dist/261.js +0 -1
  136. package/dist/271.js +0 -1
  137. package/dist/272.js +0 -1
  138. package/dist/294.js +0 -2
  139. package/dist/294.js.map +0 -1
  140. package/dist/319.js +0 -1
  141. package/dist/323.js +0 -1
  142. package/dist/336.js +0 -1
  143. package/dist/378.js +0 -1
  144. package/dist/460.js +0 -1
  145. package/dist/484.js +0 -1
  146. package/dist/484.js.map +0 -1
  147. package/dist/497.js +0 -1
  148. package/dist/524.js +0 -2
  149. package/dist/524.js.map +0 -1
  150. package/dist/566.js +0 -1
  151. package/dist/574.js +0 -1
  152. package/dist/579.js +0 -1
  153. package/dist/626.js +0 -1
  154. package/dist/626.js.map +0 -1
  155. package/dist/637.js +0 -1
  156. package/dist/637.js.map +0 -1
  157. package/dist/644.js +0 -1
  158. package/dist/652.js +0 -1
  159. package/dist/673.js +0 -1
  160. package/dist/705.js +0 -1
  161. package/dist/711.js +0 -1
  162. package/dist/727.js +0 -1
  163. package/dist/737.js +0 -1
  164. package/dist/749.js +0 -1
  165. package/dist/749.js.map +0 -1
  166. package/dist/757.js +0 -1
  167. package/dist/77.js +0 -1
  168. package/dist/77.js.map +0 -1
  169. package/dist/788.js +0 -1
  170. package/dist/803.js +0 -1
  171. package/dist/803.js.map +0 -1
  172. package/dist/807.js +0 -1
  173. package/dist/833.js +0 -1
  174. package/dist/888.js +0 -1
  175. package/dist/888.js.map +0 -1
  176. package/dist/890.js +0 -1
  177. package/dist/890.js.map +0 -1
  178. package/dist/901.js +0 -1
  179. package/dist/905.js +0 -1
  180. package/dist/905.js.map +0 -1
  181. package/dist/935.js +0 -2
  182. package/dist/935.js.map +0 -1
  183. package/dist/962.js +0 -1
  184. package/src/root.scss +0 -50
  185. package/src/setup-tests.ts +0 -1
  186. package/dist/{935.js.LICENSE.txt → 3935.js.LICENSE.txt} +0 -0
  187. package/dist/{294.js.LICENSE.txt → 7294.js.LICENSE.txt} +0 -0
  188. package/src/components/{medication-card.component.test.tsx → medication-card.test.tsx} +0 -0
  189. package/src/forms/{medication-dispense-review.component.test.tsx → medication-dispense-review.test.tsx} +1 -1
  190. /package/{i18next-parser.config.js → tools/i18next-parser.config.js} +0 -0
@@ -0,0 +1,9 @@
1
+ @use '@carbon/colors';
2
+ @use '@carbon/layout';
3
+ @use '@openmrs/esm-styleguide/src/vars' as *;
4
+
5
+ .conditionContainer {
6
+ background-color: colors.$white-0;
7
+ border: 1px solid colors.$gray-20;
8
+ margin-bottom: layout.$spacing-05;
9
+ }
@@ -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) {
@@ -1,4 +1,3 @@
1
1
  declare module '*.css';
2
2
  declare module '*.scss';
3
3
  declare module '*.svg';
4
- declare module '@carbon/react';
@@ -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
+ };
@@ -0,0 +1,9 @@
1
+ @use '@carbon/layout';
2
+ @use '@carbon/colors';
3
+ @use '@openmrs/esm-styleguide/src/vars' as *;
4
+
5
+ .diagnosesContainer {
6
+ background-color: colors.$white-0;
7
+ border: 1px solid colors.$gray-20;
8
+ margin-bottom: layout.$spacing-05;
9
+ }
@@ -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
- <Tile className={styles.tileContainer} light={true}>
19
- <div className={styles.tileHeader}>
20
- <div className={styles.headerLabelContainer}>
21
- <label className={styles.headerLabel}>{headerLabel}</label>
22
- {children}
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
- <Button
25
- kind="ghost"
26
- renderIcon={(props) => <ArrowRight size={16} className={styles.arrowIcon} />}
27
- iconDescription={t('view', 'View')}>
28
- {t('view', 'View')}
29
- </Button>
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/styles/scss/spacing';
2
- @use '@carbon/styles/scss/type';
3
- @import '~@openmrs/esm-styleguide/src/vars';
1
+ @use '@carbon/layout';
2
+ @use '@carbon/type';
3
+ @use '@openmrs/esm-styleguide/src/vars' as *;
4
4
 
5
5
  .tileContainer {
6
- border: 0.0625rem solid $ui-03;
6
+ border: 1px solid $ui-03;
7
7
  flex-grow: 1;
8
8
  height: 7.875rem;
9
- padding: 0 spacing.$spacing-05;
10
- margin: spacing.$spacing-03 spacing.$spacing-03;
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: spacing.$spacing-03;
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: spacing.$spacing-07;
38
+ height: layout.$spacing-07;
39
39
  }
40
40
 
41
41
  .arrowIcon {
@@ -1,12 +1,11 @@
1
- @use '@carbon/styles/scss/spacing';
2
- @use '@carbon/styles/scss/type';
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 spacing.$spacing-05 spacing.$spacing-10 spacing.$spacing-03;
8
+ padding: 0 layout.$spacing-05 layout.$spacing-10 layout.$spacing-03;
10
9
  flex-flow: row wrap;
11
- margin-top: -spacing.$spacing-03;
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
- <ComboBox
156
- id="reasonForPause"
157
- light={isTablet}
158
- items={reasonsForClose}
159
- titleText={t('reasonForClose', 'Reason for close')}
160
- itemToString={(item) => item?.text}
161
- initialSelectedItem={{
162
- id: medicationDispense.statusReasonCodeableConcept?.coding[0]?.code,
163
- text: medicationDispense.statusReasonCodeableConcept?.text,
164
- }}
165
- onChange={({ selectedItem }) => {
166
- setMedicationDispensePayload({
167
- ...medicationDispensePayload,
168
- statusReasonCodeableConcept: {
169
- coding: [
170
- {
171
- code: selectedItem?.id,
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}>
@@ -5,7 +5,7 @@
5
5
 
6
6
  .productiveHeading02 {
7
7
  color: $color-gray-70;
8
- @include type.type-style('productive-heading-02');
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: 3rem;
50
+ top: layout.$spacing-09;
55
51
  overflow-y: auto;
56
52
  }
57
53
 
58
54
  .dateTimeContainer {
59
55
  display: flex;
60
- margin: 1rem 0;
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: 0.5rem;
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: 1rem;
73
+ margin-bottom: layout.$spacing-05;
78
74
  }
79
75
  }
80
76