@ampath/esm-laboratory-app 1.3.0-next.2

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 (251) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc +68 -0
  4. package/.husky/pre-commit +7 -0
  5. package/.husky/pre-push +6 -0
  6. package/.prettierignore +12 -0
  7. package/.prettierrc +8 -0
  8. package/.tx/config +11 -0
  9. package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
  10. package/README.md +54 -0
  11. package/__mocks__/react-i18next.js +50 -0
  12. package/assets/screenshots/labs_enter_results.png +0 -0
  13. package/assets/screenshots/labs_general_dashboard.png +0 -0
  14. package/dist/1119.js +1 -0
  15. package/dist/1197.js +1 -0
  16. package/dist/1222.js +1 -0
  17. package/dist/1222.js.map +1 -0
  18. package/dist/1243.js +1 -0
  19. package/dist/1243.js.map +1 -0
  20. package/dist/2146.js +1 -0
  21. package/dist/2690.js +1 -0
  22. package/dist/3099.js +1 -0
  23. package/dist/3106.js +1 -0
  24. package/dist/3106.js.map +1 -0
  25. package/dist/312.js +1 -0
  26. package/dist/312.js.map +1 -0
  27. package/dist/3352.js +1 -0
  28. package/dist/3352.js.map +1 -0
  29. package/dist/3535.js +1 -0
  30. package/dist/3535.js.map +1 -0
  31. package/dist/3584.js +1 -0
  32. package/dist/4044.js +1 -0
  33. package/dist/4044.js.map +1 -0
  34. package/dist/4055.js +1 -0
  35. package/dist/4132.js +1 -0
  36. package/dist/4300.js +1 -0
  37. package/dist/4335.js +1 -0
  38. package/dist/439.js +1 -0
  39. package/dist/4535.js +1 -0
  40. package/dist/4535.js.map +1 -0
  41. package/dist/4618.js +1 -0
  42. package/dist/4652.js +1 -0
  43. package/dist/4748.js +2 -0
  44. package/dist/4748.js.LICENSE.txt +9 -0
  45. package/dist/4748.js.map +1 -0
  46. package/dist/4920.js +1 -0
  47. package/dist/4920.js.map +1 -0
  48. package/dist/4944.js +1 -0
  49. package/dist/5048.js +2 -0
  50. package/dist/5048.js.LICENSE.txt +29 -0
  51. package/dist/5048.js.map +1 -0
  52. package/dist/5088.js +1 -0
  53. package/dist/5088.js.map +1 -0
  54. package/dist/5173.js +1 -0
  55. package/dist/5241.js +1 -0
  56. package/dist/53.js +1 -0
  57. package/dist/53.js.map +1 -0
  58. package/dist/5339.js +1 -0
  59. package/dist/5339.js.map +1 -0
  60. package/dist/5348.js +1 -0
  61. package/dist/5348.js.map +1 -0
  62. package/dist/5380.js +1 -0
  63. package/dist/5380.js.map +1 -0
  64. package/dist/5442.js +1 -0
  65. package/dist/5661.js +1 -0
  66. package/dist/5780.js +2 -0
  67. package/dist/5780.js.LICENSE.txt +9 -0
  68. package/dist/5780.js.map +1 -0
  69. package/dist/6022.js +1 -0
  70. package/dist/6468.js +1 -0
  71. package/dist/6589.js +1 -0
  72. package/dist/6679.js +1 -0
  73. package/dist/6753.js +1 -0
  74. package/dist/6753.js.map +1 -0
  75. package/dist/6777.js +2 -0
  76. package/dist/6777.js.LICENSE.txt +19 -0
  77. package/dist/6777.js.map +1 -0
  78. package/dist/679.js +2 -0
  79. package/dist/679.js.LICENSE.txt +9 -0
  80. package/dist/679.js.map +1 -0
  81. package/dist/6840.js +1 -0
  82. package/dist/6859.js +1 -0
  83. package/dist/7097.js +1 -0
  84. package/dist/7129.js +1 -0
  85. package/dist/7129.js.map +1 -0
  86. package/dist/7159.js +1 -0
  87. package/dist/723.js +1 -0
  88. package/dist/7617.js +1 -0
  89. package/dist/791.js +1 -0
  90. package/dist/791.js.map +1 -0
  91. package/dist/795.js +1 -0
  92. package/dist/8163.js +1 -0
  93. package/dist/8349.js +1 -0
  94. package/dist/8371.js +1 -0
  95. package/dist/841.js +1 -0
  96. package/dist/841.js.map +1 -0
  97. package/dist/8618.js +1 -0
  98. package/dist/8627.js +2 -0
  99. package/dist/8627.js.LICENSE.txt +25 -0
  100. package/dist/8627.js.map +1 -0
  101. package/dist/8898.js +2 -0
  102. package/dist/8898.js.LICENSE.txt +32 -0
  103. package/dist/8898.js.map +1 -0
  104. package/dist/890.js +1 -0
  105. package/dist/9214.js +1 -0
  106. package/dist/9321.js +1 -0
  107. package/dist/9321.js.map +1 -0
  108. package/dist/9452.js +1 -0
  109. package/dist/9452.js.map +1 -0
  110. package/dist/9538.js +1 -0
  111. package/dist/9569.js +1 -0
  112. package/dist/9695.js +1 -0
  113. package/dist/9695.js.map +1 -0
  114. package/dist/986.js +1 -0
  115. package/dist/9879.js +1 -0
  116. package/dist/9895.js +1 -0
  117. package/dist/9900.js +1 -0
  118. package/dist/9910.js +1 -0
  119. package/dist/9910.js.map +1 -0
  120. package/dist/9913.js +1 -0
  121. package/dist/main.js +2 -0
  122. package/dist/main.js.LICENSE.txt +45 -0
  123. package/dist/main.js.map +1 -0
  124. package/dist/openmrs-esm-laboratory-app.js +1 -0
  125. package/dist/openmrs-esm-laboratory-app.js.buildmanifest.json +1744 -0
  126. package/dist/openmrs-esm-laboratory-app.js.map +1 -0
  127. package/dist/routes.json +1 -0
  128. package/e2e/README.md +117 -0
  129. package/e2e/commands/encounter-operations.ts +63 -0
  130. package/e2e/commands/index.ts +5 -0
  131. package/e2e/commands/patient-operations.ts +109 -0
  132. package/e2e/commands/provider-operations.ts +9 -0
  133. package/e2e/commands/test-order-operations.ts +46 -0
  134. package/e2e/commands/types/index.ts +157 -0
  135. package/e2e/commands/visit-operations.ts +38 -0
  136. package/e2e/core/global-setup.ts +32 -0
  137. package/e2e/core/index.ts +1 -0
  138. package/e2e/core/test.ts +31 -0
  139. package/e2e/fixtures/api.ts +27 -0
  140. package/e2e/fixtures/fhirApi.ts +28 -0
  141. package/e2e/fixtures/index.ts +2 -0
  142. package/e2e/pages/index.ts +1 -0
  143. package/e2e/pages/laboratory-page.ts +28 -0
  144. package/e2e/specs/add-lab-results.spec.ts +111 -0
  145. package/e2e/specs/reject-lab-request.spec.ts +88 -0
  146. package/e2e/specs/test-orders.spec.ts +69 -0
  147. package/e2e/support/github/Dockerfile +34 -0
  148. package/e2e/support/github/docker-compose.yml +24 -0
  149. package/e2e/support/github/run-e2e-docker-env.sh +58 -0
  150. package/example.env +7 -0
  151. package/jest.config.js +35 -0
  152. package/package.json +105 -0
  153. package/playwright.config.ts +42 -0
  154. package/src/components/create-dashboard-link.component.tsx +37 -0
  155. package/src/components/loader/loader.component.tsx +11 -0
  156. package/src/components/loader/loader.scss +9 -0
  157. package/src/components/orders-table/list-order-details.component.tsx +143 -0
  158. package/src/components/orders-table/list-order-details.scss +136 -0
  159. package/src/components/orders-table/order-detail.scss +18 -0
  160. package/src/components/orders-table/orders-data-table.component.tsx +349 -0
  161. package/src/components/orders-table/orders-data-table.scss +129 -0
  162. package/src/components/orders-table/orders-data-table.test.tsx +214 -0
  163. package/src/components/orders-table/orders-date-range-picker.component.tsx +32 -0
  164. package/src/components/orders-table/orders-date-range-picker.scss +7 -0
  165. package/src/components/summary-tile/lab-summary-tile.component.tsx +31 -0
  166. package/src/components/summary-tile/lab-summary-tile.scss +64 -0
  167. package/src/config-schema.ts +39 -0
  168. package/src/constants.ts +2 -0
  169. package/src/declarations.d.ts +2 -0
  170. package/src/index.ts +123 -0
  171. package/src/lab-tabs/actions/actions.scss +26 -0
  172. package/src/lab-tabs/actions/add-lab-request-results-action.component.tsx +46 -0
  173. package/src/lab-tabs/actions/amend-lab-results-action.component.tsx +40 -0
  174. package/src/lab-tabs/actions/approve-lab-results-action.component.tsx +36 -0
  175. package/src/lab-tabs/actions/pickup-lab-request-action.component.tsx +36 -0
  176. package/src/lab-tabs/actions/reject-lab-request-action.component.tsx +36 -0
  177. package/src/lab-tabs/data-table-extensions/completed-lab-requests-table.extension.tsx +8 -0
  178. package/src/lab-tabs/data-table-extensions/declined-lab-requests-table-extension.tsx +8 -0
  179. package/src/lab-tabs/data-table-extensions/in-progress-lab-requests-table.extension.tsx +8 -0
  180. package/src/lab-tabs/data-table-extensions/pending-review-lab-request-table.extension.tsx +8 -0
  181. package/src/lab-tabs/data-table-extensions/tests-ordered-table.extension.tsx +8 -0
  182. package/src/lab-tabs/laboratory-tabs.component.tsx +81 -0
  183. package/src/lab-tabs/laboratory-tabs.scss +38 -0
  184. package/src/lab-tabs/modals/approval-lab-results-modal.component.tsx +70 -0
  185. package/src/lab-tabs/modals/pickup-lab-request-modal.component.tsx +67 -0
  186. package/src/lab-tabs/modals/pickup-lab-request-modal.test.tsx +127 -0
  187. package/src/lab-tabs/modals/reject-lab-request-modal.component.tsx +86 -0
  188. package/src/lab-tabs/modals/reject-lab-request-modal.scss +13 -0
  189. package/src/lab-tabs/modals/reject-lab-request-modal.test.tsx +152 -0
  190. package/src/lab-tiles/all-lab-requests-tile.component.tsx +19 -0
  191. package/src/lab-tiles/completed-lab-requests-tile.component.tsx +19 -0
  192. package/src/lab-tiles/in-progress-lab-requests-tile.component.tsx +19 -0
  193. package/src/lab-tiles/laboratory-summary-tiles.component.tsx +52 -0
  194. package/src/lab-tiles/laboratory-summary-tiles.scss +16 -0
  195. package/src/lab-tiles/pending-review-lab-results-tile.component.tsx +22 -0
  196. package/src/laboratory-dashboard.component.tsx +30 -0
  197. package/src/laboratory-dashboard.scss +5 -0
  198. package/src/laboratory.resource.ts +108 -0
  199. package/src/root.component.tsx +15 -0
  200. package/src/routes.json +204 -0
  201. package/src/types.ts +39 -0
  202. package/tools/i18next-parser.config.js +93 -0
  203. package/tools/index.ts +1 -0
  204. package/tools/setup-tests.ts +8 -0
  205. package/tools/test-utils.ts +44 -0
  206. package/tools/update-openmrs-deps.mjs +42 -0
  207. package/translations/am.json +79 -0
  208. package/translations/ar.json +79 -0
  209. package/translations/ar_SY.json +79 -0
  210. package/translations/bn.json +79 -0
  211. package/translations/cs.json +79 -0
  212. package/translations/de.json +79 -0
  213. package/translations/en.json +79 -0
  214. package/translations/en_US.json +79 -0
  215. package/translations/es.json +79 -0
  216. package/translations/es_MX.json +79 -0
  217. package/translations/fr.json +79 -0
  218. package/translations/he.json +79 -0
  219. package/translations/hi.json +79 -0
  220. package/translations/hi_IN.json +79 -0
  221. package/translations/id.json +79 -0
  222. package/translations/it.json +79 -0
  223. package/translations/ka.json +79 -0
  224. package/translations/km.json +79 -0
  225. package/translations/ku.json +79 -0
  226. package/translations/ky.json +79 -0
  227. package/translations/lg.json +79 -0
  228. package/translations/ne.json +79 -0
  229. package/translations/pl.json +79 -0
  230. package/translations/pt.json +79 -0
  231. package/translations/pt_BR.json +79 -0
  232. package/translations/qu.json +79 -0
  233. package/translations/ro_RO.json +79 -0
  234. package/translations/ru_RU.json +79 -0
  235. package/translations/si.json +79 -0
  236. package/translations/sq.json +79 -0
  237. package/translations/sw.json +79 -0
  238. package/translations/sw_KE.json +79 -0
  239. package/translations/tr.json +79 -0
  240. package/translations/tr_TR.json +79 -0
  241. package/translations/uk.json +79 -0
  242. package/translations/uz.json +79 -0
  243. package/translations/uz@Latn.json +79 -0
  244. package/translations/uz_UZ.json +79 -0
  245. package/translations/vi.json +79 -0
  246. package/translations/zh.json +79 -0
  247. package/translations/zh_CN.json +79 -0
  248. package/translations/zh_TW.json +79 -0
  249. package/tsconfig.json +28 -0
  250. package/turbo.json +15 -0
  251. package/webpack.config.js +25 -0
@@ -0,0 +1,37 @@
1
+ import React, { useMemo } from 'react';
2
+ import { ConfigurableLink } from '@openmrs/esm-framework';
3
+ import { BrowserRouter, useLocation } from 'react-router-dom';
4
+ import { useTranslation } from 'react-i18next';
5
+
6
+ export interface DashboardLinkConfig {
7
+ name: string;
8
+ title: string;
9
+ }
10
+
11
+ function DashboardExtension({ dashboardLinkConfig }: { dashboardLinkConfig: DashboardLinkConfig }) {
12
+ const { t } = useTranslation();
13
+ const { name, title } = dashboardLinkConfig;
14
+ const location = useLocation();
15
+ const spaBasePath = `${window.spaBase}/home`;
16
+
17
+ const isActive = useMemo(() => {
18
+ const pathSegments = location.pathname.split('/').map((segment) => decodeURIComponent(segment));
19
+ return pathSegments.includes(name);
20
+ }, [location.pathname, name]);
21
+
22
+ return (
23
+ <ConfigurableLink
24
+ to={`${spaBasePath}/${name}`}
25
+ className={`cds--side-nav__link ${isActive ? 'active-left-nav-link' : ''}`}
26
+ >
27
+ {t(title)}
28
+ </ConfigurableLink>
29
+ );
30
+ }
31
+
32
+ export const createHomeDashboardLink = (dashboardLinkConfig: DashboardLinkConfig) => () =>
33
+ (
34
+ <BrowserRouter>
35
+ <DashboardExtension dashboardLinkConfig={dashboardLinkConfig} />
36
+ </BrowserRouter>
37
+ );
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { useTranslation } from 'react-i18next';
3
+ import { InlineLoading } from '@carbon/react';
4
+ import styles from './loader.scss';
5
+
6
+ const Loader: React.FC = () => {
7
+ const { t } = useTranslation();
8
+ return <InlineLoading className={styles.loading} description={`${t('loading', 'Loading')} ...`} />;
9
+ };
10
+
11
+ export default Loader;
@@ -0,0 +1,9 @@
1
+ @use '@carbon/layout';
2
+ @use '@openmrs/esm-styleguide/src/vars' as *;
3
+
4
+ .loading {
5
+ display: flex;
6
+ background-color: $openmrs-background-grey;
7
+ justify-content: center;
8
+ min-height: layout.$spacing-09;
9
+ }
@@ -0,0 +1,143 @@
1
+ import React from 'react';
2
+ import { useTranslation } from 'react-i18next';
3
+ import type { ReactNode } from 'react';
4
+ import {
5
+ Accordion,
6
+ AccordionItem,
7
+ StructuredListBody,
8
+ StructuredListCell,
9
+ StructuredListRow,
10
+ StructuredListWrapper,
11
+ } from '@carbon/react';
12
+ import { capitalize } from 'lodash-es';
13
+ import { ExtensionSlot, formatDate, parseDate } from '@openmrs/esm-framework';
14
+ import { type GroupedOrders } from '../../types';
15
+ import styles from './list-order-details.scss';
16
+
17
+ type OrderDetailsRowProps = {
18
+ label: ReactNode;
19
+ value: ReactNode;
20
+ };
21
+
22
+ export interface ListOrdersDetailsProps {
23
+ groupedOrders: GroupedOrders;
24
+ }
25
+
26
+ const OrderDetailRow = ({ label, value }: OrderDetailsRowProps) => {
27
+ return (
28
+ <StructuredListRow className={styles.orderDetailsRow}>
29
+ <StructuredListCell className={styles.orderDetailsCell}>
30
+ <span className={styles.orderDetailsTextBold}>{label}</span>
31
+ </StructuredListCell>
32
+ <StructuredListCell className={styles.orderDetailsCell}>
33
+ <span className={styles.orderDetailsText}>{value}</span>
34
+ </StructuredListCell>
35
+ </StructuredListRow>
36
+ );
37
+ };
38
+ const ListOrderDetails: React.FC<ListOrdersDetailsProps> = ({ groupedOrders }) => {
39
+ const { t } = useTranslation();
40
+ const originalOrders = groupedOrders?.originalOrders ?? [];
41
+
42
+ return (
43
+ <div>
44
+ {originalOrders.map((order) => (
45
+ <div key={order.orderNumber} className={styles.orderDetailsContainer}>
46
+ <StructuredListWrapper className={styles.orderDetailsWrapper}>
47
+ <StructuredListBody>
48
+ <OrderDetailRow
49
+ label={t('urgencyStatus', 'Urgency:')}
50
+ value={
51
+ <div className={styles.priorityPill} data-urgency={order.urgency?.replace('_', ' ')}>
52
+ {capitalize(order.urgency?.replace(/_/g, ' '))}
53
+ </div>
54
+ }
55
+ />
56
+ <OrderDetailRow label={t('testOrdered', 'Test ordered:')} value={order.display} />
57
+ <OrderDetailRow
58
+ label={t('orderStatus', 'Status:')}
59
+ value={
60
+ <div
61
+ className={styles.statusPill}
62
+ data-status={(order.fulfillerStatus ?? 'Order not picked').replace('_', ' ')}
63
+ >
64
+ {capitalize(order.fulfillerStatus?.replace('_', ' ')) || t('orderNotPicked', 'Order not picked')}
65
+ </div>
66
+ }
67
+ />
68
+ <OrderDetailRow label={t('orderNumbers', 'Order number:')} value={order.orderNumber} />
69
+ <OrderDetailRow
70
+ label={t('orderDate', 'Order date:')}
71
+ value={formatDate(parseDate(order.dateActivated))}
72
+ />
73
+ <OrderDetailRow label={t('orderedBy', 'Ordered By:')} value={order.orderer?.display} />
74
+ <OrderDetailRow
75
+ label={t('orderInstructions', 'Instructions:')}
76
+ value={order.instructions ?? t('NoInstructionLeft', 'No instructions are provided.')}
77
+ />
78
+
79
+ {order.fulfillerStatus === 'DECLINED' && (
80
+ <OrderDetailRow label={t('reasonForDecline', 'Reason for decline:')} value={order.fulfillerComment} />
81
+ )}
82
+ </StructuredListBody>
83
+ </StructuredListWrapper>
84
+ {(order.fulfillerStatus === 'COMPLETED' || order.fulfillerStatus === 'DRAFT') && (
85
+ <Accordion>
86
+ <AccordionItem
87
+ open={order.fulfillerStatus === 'COMPLETED'}
88
+ title={<span className={styles.accordionTitle}>{t('viewTestResults', 'View test results')}</span>}
89
+ >
90
+ <div className={styles.viewResults}>
91
+ <ExtensionSlot
92
+ className={styles.labResultSlot}
93
+ state={{ order: order }}
94
+ name="completed-lab-order-results-slot"
95
+ />
96
+ </div>
97
+ </AccordionItem>
98
+ </Accordion>
99
+ )}
100
+
101
+ <div className={styles.buttonSection}>
102
+ {order.fulfillerStatus === 'RECEIVED' || order.fulfillerStatus == null ? (
103
+ <>
104
+ <div className={styles.testsOrderedActions}>
105
+ <ExtensionSlot state={{ order: order }} name="rejected-ordered-actions-slot" />
106
+ <ExtensionSlot state={{ order: order }} name="tests-ordered-actions-slot" />
107
+ <ExtensionSlot state={{ order: order }} name="add-lab-order-details-slot" />
108
+ </div>
109
+ </>
110
+ ) : order.fulfillerStatus === 'IN_PROGRESS' ? (
111
+ <>
112
+ <div className={styles.testsOrderedActions}>
113
+ <ExtensionSlot
114
+ className={styles.menuLink}
115
+ state={{ order: order }}
116
+ name="inprogress-tests-actions-slot"
117
+ />
118
+ </div>
119
+ </>
120
+ ) : order.fulfillerStatus === 'DRAFT' ? (
121
+ <>
122
+ <div className={styles.testsOrderedActions}>
123
+ <ExtensionSlot
124
+ className={styles.menuLink}
125
+ state={{ order: order }}
126
+ name="amended-ordered-actions-slot"
127
+ />
128
+ <ExtensionSlot
129
+ className={styles.menuLink}
130
+ state={{ order: order }}
131
+ name="approved-ordered-actions-slot"
132
+ />
133
+ </div>
134
+ </>
135
+ ) : null}
136
+ </div>
137
+ </div>
138
+ ))}
139
+ </div>
140
+ );
141
+ };
142
+
143
+ export default ListOrderDetails;
@@ -0,0 +1,136 @@
1
+ @use '@carbon/colors';
2
+ @use '@carbon/layout';
3
+ @use '@carbon/type';
4
+ @use '@openmrs/esm-styleguide/src/vars' as *;
5
+
6
+ .buttonSection {
7
+ display: flex;
8
+ flex-direction: column;
9
+ align-items: flex-start;
10
+ width: 100%;
11
+ }
12
+
13
+ .testsOrderedActions {
14
+ display: flex;
15
+ justify-content: flex-end;
16
+ padding: layout.$spacing-03 0;
17
+ width: 100%;
18
+ }
19
+
20
+ .menuLink {
21
+ display: inline-flex;
22
+ }
23
+
24
+ .orderDetailsContainer {
25
+ width: 80%;
26
+ display: flex;
27
+ flex-direction: column;
28
+ background-color: colors.$white-0;
29
+ padding: layout.$spacing-03;
30
+ gap: layout.$spacing-03;
31
+ margin-bottom: layout.$spacing-05;
32
+ }
33
+
34
+ .orderDetailsContainer:last-child {
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ .orderDetailsRow {
39
+ &:first-child {
40
+ border-top: none !important;
41
+ }
42
+ }
43
+
44
+ .orderDetailsWrapper {
45
+ :global(.cds--structured-list) {
46
+ table-layout: fixed;
47
+ width: 100%;
48
+ }
49
+
50
+ :global(.cds--structured-list-td) {
51
+ align-content: center;
52
+ padding: layout.$spacing-03 !important;
53
+ vertical-align: middle !important;
54
+ }
55
+
56
+ :global(.cds--structured-list-td:first-child) {
57
+ width: 40%;
58
+ }
59
+ }
60
+
61
+ .textBold {
62
+ font-weight: bold;
63
+ }
64
+
65
+ .orderDetailsTextBold {
66
+ @extend .textBold;
67
+ }
68
+
69
+ .labResultSlot {
70
+ text-align: center;
71
+ margin-bottom: layout.$spacing-03;
72
+ }
73
+
74
+ .accordionTitle {
75
+ @extend .textBold;
76
+ }
77
+
78
+ .instructionLabelContainer {
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ }
83
+
84
+ .pill {
85
+ @include type.type-style('label-01');
86
+ display: inline-block;
87
+ background-color: colors.$gray-20;
88
+ border-radius: layout.$spacing-03;
89
+ padding: layout.$spacing-02;
90
+ padding-inline: layout.$spacing-03;
91
+ text-align: center;
92
+ white-space: nowrap;
93
+ overflow: hidden;
94
+ text-overflow: ellipsis;
95
+ }
96
+
97
+ .priorityPill {
98
+ @extend .pill;
99
+
100
+ &[data-urgency='ROUTINE'] {
101
+ background-color: colors.$green-20;
102
+ }
103
+
104
+ &[data-urgency='ON SCHEDULED_DATE'] {
105
+ background-color: colors.$red-20;
106
+ }
107
+ }
108
+
109
+ .statusPill {
110
+ @extend .pill;
111
+
112
+ &[data-status='RECEIVED'] {
113
+ background-color: colors.$blue-20;
114
+ }
115
+
116
+ &[data-status='IN PROGRESS'] {
117
+ background-color: colors.$cyan-20;
118
+ }
119
+
120
+ &[data-status='ON HOLD'] {
121
+ background-color: colors.$teal-20;
122
+ }
123
+
124
+ &[data-status='EXCEPTION'] {
125
+ background-color: colors.$magenta-20;
126
+ }
127
+
128
+ &[data-status='COMPLETED'] {
129
+ background-color: colors.$green-20;
130
+ }
131
+
132
+ &[data-status='DECLINED'],
133
+ &[data-status='Order not picked'] {
134
+ background-color: colors.$red-20;
135
+ }
136
+ }
@@ -0,0 +1,18 @@
1
+ @use '@carbon/layout';
2
+ @use '@carbon/type';
3
+ @use '@openmrs/esm-styleguide/src/vars' as *;
4
+
5
+ .bodyLong01 {
6
+ @include type.type-style('body-01');
7
+ }
8
+
9
+ .label01 {
10
+ @include type.type-style('label-01');
11
+ }
12
+
13
+ .displayValue {
14
+ color: $text-02;
15
+ font-weight: bold;
16
+ width: layout.$spacing-05;
17
+ height: layout.$spacing-05;
18
+ }