@kenyaemr/esm-imaging-orders-app 4.0.1-pre.1

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 (110) hide show
  1. package/.turbo/turbo-build.log +188 -0
  2. package/README.md +8 -0
  3. package/dist/123.js +2 -0
  4. package/dist/123.js.LICENSE.txt +40 -0
  5. package/dist/123.js.map +1 -0
  6. package/dist/144.js +2 -0
  7. package/dist/144.js.LICENSE.txt +19 -0
  8. package/dist/144.js.map +1 -0
  9. package/dist/225.js +1 -0
  10. package/dist/225.js.map +1 -0
  11. package/dist/300.js +1 -0
  12. package/dist/364.js +1 -0
  13. package/dist/364.js.map +1 -0
  14. package/dist/372.js +1 -0
  15. package/dist/372.js.map +1 -0
  16. package/dist/41.js +2 -0
  17. package/dist/41.js.LICENSE.txt +9 -0
  18. package/dist/41.js.map +1 -0
  19. package/dist/495.js +1 -0
  20. package/dist/495.js.map +1 -0
  21. package/dist/606.js +1 -0
  22. package/dist/606.js.map +1 -0
  23. package/dist/831.js +2 -0
  24. package/dist/831.js.LICENSE.txt +5 -0
  25. package/dist/831.js.map +1 -0
  26. package/dist/876.js +2 -0
  27. package/dist/876.js.LICENSE.txt +9 -0
  28. package/dist/876.js.map +1 -0
  29. package/dist/913.js +2 -0
  30. package/dist/913.js.LICENSE.txt +32 -0
  31. package/dist/913.js.map +1 -0
  32. package/dist/kenyaemr-esm-imaging-orders-app.js +1 -0
  33. package/dist/kenyaemr-esm-imaging-orders-app.js.buildmanifest.json +401 -0
  34. package/dist/kenyaemr-esm-imaging-orders-app.js.map +1 -0
  35. package/dist/main.js +2 -0
  36. package/dist/main.js.LICENSE.txt +60 -0
  37. package/dist/main.js.map +1 -0
  38. package/dist/routes.json +1 -0
  39. package/jest.config.js +8 -0
  40. package/package.json +55 -0
  41. package/src/config-schema.ts +51 -0
  42. package/src/constants.ts +3 -0
  43. package/src/declarations.d.ts +6 -0
  44. package/src/form/imaging-orders/add-imaging-orders/add-imaging-order.scss +44 -0
  45. package/src/form/imaging-orders/add-imaging-orders/add-imaging-order.workspace.tsx +86 -0
  46. package/src/form/imaging-orders/add-imaging-orders/imaging-order-form.component.tsx +354 -0
  47. package/src/form/imaging-orders/add-imaging-orders/imaging-order-form.scss +79 -0
  48. package/src/form/imaging-orders/add-imaging-orders/imaging-order.ts +19 -0
  49. package/src/form/imaging-orders/add-imaging-orders/imaging-type-search.scss +115 -0
  50. package/src/form/imaging-orders/add-imaging-orders/imaging-type-search.tsx +235 -0
  51. package/src/form/imaging-orders/add-imaging-orders/useImagingTypes.ts +89 -0
  52. package/src/form/imaging-orders/api.ts +230 -0
  53. package/src/form/imaging-orders/imaging-order-basket-panel/imaging-icon.component.tsx +40 -0
  54. package/src/form/imaging-orders/imaging-order-basket-panel/imaging-order-basket-item-tile.component.tsx +96 -0
  55. package/src/form/imaging-orders/imaging-order-basket-panel/imaging-order-basket-item-tile.scss +72 -0
  56. package/src/form/imaging-orders/imaging-order-basket-panel/imaging-order-basket-panel.extension.tsx +191 -0
  57. package/src/form/imaging-orders/imaging-order-basket-panel/imaging-order-basket-panel.scss +74 -0
  58. package/src/form/imaging-orders/useOrderConfig.ts +48 -0
  59. package/src/form/imaging-report-form/imaging-report-form.component.tsx +161 -0
  60. package/src/form/imaging-report-form/imaging-report-form.scss +30 -0
  61. package/src/form/imaging-report-form/imaging.resource.ts +360 -0
  62. package/src/header/imagining-header.component.tsx +17 -0
  63. package/src/header/imagining-header.scss +5 -0
  64. package/src/hooks/useOrdersWorklist.ts +59 -0
  65. package/src/hooks/useSearchGroupedResults.ts +27 -0
  66. package/src/hooks/useSearchResults.ts +51 -0
  67. package/src/imaging-orders.component.tsx +14 -0
  68. package/src/imaging-tabs/approved/approved-orders.component.tsx +31 -0
  69. package/src/imaging-tabs/approved/approved-orders.scss +0 -0
  70. package/src/imaging-tabs/imaging-tabs.component.tsx +79 -0
  71. package/src/imaging-tabs/imaging-tabs.scss +5 -0
  72. package/src/imaging-tabs/orders-not-done/orders-not-done.component.tsx +42 -0
  73. package/src/imaging-tabs/referred-test/referred-ordered.component.tsx +26 -0
  74. package/src/imaging-tabs/referred-test/referred-ordered.scss +6 -0
  75. package/src/imaging-tabs/review-ordered/review-imaging-report-modal/review-imaging-report-dialog.component.tsx +138 -0
  76. package/src/imaging-tabs/review-ordered/review-imaging-report-modal/review-imaging-report-dialog.scss +5 -0
  77. package/src/imaging-tabs/review-ordered/review-ordered.component.tsx +28 -0
  78. package/src/imaging-tabs/review-ordered/review-ordered.scss +0 -0
  79. package/src/imaging-tabs/test-ordered/pick-imaging-order/add-to-worklist-dialog.component.tsx +94 -0
  80. package/src/imaging-tabs/test-ordered/pick-imaging-order/add-to-worklist-dialog.resource.ts +137 -0
  81. package/src/imaging-tabs/test-ordered/pick-imaging-order/add-to-worklist-dialog.scss +38 -0
  82. package/src/imaging-tabs/test-ordered/reject-order-dialog/radiology-reject-reason.component.tsx +40 -0
  83. package/src/imaging-tabs/test-ordered/reject-order-dialog/reject-order-dialog.component.tsx +95 -0
  84. package/src/imaging-tabs/test-ordered/reject-order-dialog/reject-order-dialog.scss +14 -0
  85. package/src/imaging-tabs/test-ordered/tests-ordered.component.tsx +35 -0
  86. package/src/imaging-tabs/test-ordered/tests-ordered.scss +13 -0
  87. package/src/imaging-tabs/test-ordered/transition-patient-new-queue/transition-latest-queue-entry-button.component.tsx +34 -0
  88. package/src/imaging-tabs/test-ordered/transition-patient-new-queue/transition-latest-queue-entry-button.scss +14 -0
  89. package/src/imaging-tabs/work-list/work-list.component.tsx +45 -0
  90. package/src/imaging-tabs/work-list/work-list.resource.ts +150 -0
  91. package/src/imaging-tabs/work-list/work-list.scss +207 -0
  92. package/src/index.ts +45 -0
  93. package/src/left-panel-link.tsx +42 -0
  94. package/src/root.component.tsx +19 -0
  95. package/src/routes.json +58 -0
  96. package/src/shared/imaging.resource.tsx +65 -0
  97. package/src/shared/ui/common/action-button/action-button.component.tsx +66 -0
  98. package/src/shared/ui/common/action-button/order-action-extension.component.tsx +21 -0
  99. package/src/shared/ui/common/grouped-imaging-types.ts +48 -0
  100. package/src/shared/ui/common/grouped-orders-table.component.tsx +154 -0
  101. package/src/shared/ui/common/grouped-orders-table.scss +13 -0
  102. package/src/shared/ui/common/list-order-details.component.tsx +72 -0
  103. package/src/shared/ui/common/list-order-details.scss +52 -0
  104. package/src/shared/ui/common/order-detail.component.tsx +14 -0
  105. package/src/shared/ui/common/order-detail.scss +14 -0
  106. package/src/types/index.ts +49 -0
  107. package/src/utils/functions.ts +238 -0
  108. package/translations/en.json +69 -0
  109. package/tsconfig.json +5 -0
  110. package/webpack.config.js +1 -0
@@ -0,0 +1,38 @@
1
+ @use '@carbon/styles/scss/spacing';
2
+ @use '@carbon/styles/scss/type';
3
+
4
+ .radioButton {
5
+ padding: spacing.$spacing-02 spacing.$spacing-02;
6
+ margin: spacing.$spacing-03 0;
7
+ }
8
+
9
+ .section {
10
+ margin: spacing.$spacing-03;
11
+ }
12
+
13
+ .sectionTitle {
14
+ margin-bottom: spacing.$spacing-04;
15
+ }
16
+
17
+ .modalBody {
18
+ padding-bottom: spacing.$spacing-05;
19
+ }
20
+
21
+ .container {
22
+ display: 'flex';
23
+ align-items: 'center';
24
+ justify-content: 'space-between';
25
+ align-content: 'stretch';
26
+ }
27
+
28
+ .specimenContainer {
29
+ display: 'flex';
30
+ align-items: 'center';
31
+ justify-content: 'space-between';
32
+ column-gap: '10px';
33
+ }
34
+
35
+ .inputText {
36
+ display: 'flex';
37
+ align-items: 'center';
38
+ }
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { Button, ModalBody, ModalFooter, ModalHeader, Tile } from '@carbon/react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import styles from './reject-order-dialog.scss';
5
+ import { Result } from '../../work-list/work-list.resource';
6
+
7
+ interface RejectImagingOrderModalProps {
8
+ order: Result;
9
+ closeModal: () => void;
10
+ }
11
+
12
+ const RejectImagingOrderModal: React.FC<RejectImagingOrderModalProps> = ({ order, closeModal }) => {
13
+ const { t } = useTranslation();
14
+
15
+ return (
16
+ <div>
17
+ <ModalHeader closeModal={closeModal} title={t('rejectImagingOrder', 'Reject Imaging Order')} />
18
+ <ModalBody>
19
+ <div className={styles.modalBody}>
20
+ <section className={styles.section}>
21
+ <b />
22
+ <Tile>
23
+ <p>
24
+ <b>{t('rejectionReason', 'Rejection Reason:')}</b>
25
+ </p>
26
+ <p className={styles.instructions}>{order.fulfillerComment}</p>
27
+ </Tile>
28
+ </section>
29
+ </div>
30
+ </ModalBody>
31
+ <ModalFooter>
32
+ <Button kind="secondary" onClick={closeModal}>
33
+ {t('cancel', 'Cancel')}
34
+ </Button>
35
+ </ModalFooter>
36
+ </div>
37
+ );
38
+ };
39
+
40
+ export default RejectImagingOrderModal;
@@ -0,0 +1,95 @@
1
+ import React, { useState } from 'react';
2
+
3
+ import { Button, Form, ModalBody, ModalFooter, ModalHeader, TextArea } from '@carbon/react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import styles from './reject-order-dialog.scss';
6
+ import { Result } from '../../work-list/work-list.resource';
7
+ import { showNotification, showSnackbar } from '@openmrs/esm-framework';
8
+ import { mutate } from 'swr';
9
+ import { updateOrder } from '../pick-imaging-order/add-to-worklist-dialog.resource';
10
+ interface RejectOrderModalProps {
11
+ order: Result;
12
+ closeModal: () => void;
13
+ }
14
+
15
+ const RejectOrderModal: React.FC<RejectOrderModalProps> = ({ order, closeModal }) => {
16
+ const { t } = useTranslation();
17
+ const [notes, setNotes] = useState('');
18
+
19
+ const rejectOrder = async (event) => {
20
+ event.preventDefault();
21
+
22
+ const payload = {
23
+ fulfillerStatus: 'DECLINED',
24
+ fulfillerComment: notes,
25
+ };
26
+ updateOrder(order.uuid, payload).then(
27
+ () => {
28
+ showSnackbar({
29
+ isLowContrast: true,
30
+ title: t('rejectOrder', 'Rejected Order'),
31
+ kind: 'success',
32
+ subtitle: t(
33
+ 'successfullyRejected',
34
+ `You have successfully rejected an Order with OrderNumber {{orderNumber}} `,
35
+ { orderNumber: order.orderNumber },
36
+ ),
37
+ });
38
+ closeModal();
39
+ mutate((key) => typeof key === 'string' && key.startsWith('/ws/rest/v1/order'), undefined, {
40
+ revalidate: true,
41
+ });
42
+ },
43
+ (err) => {
44
+ showNotification({
45
+ title: t(`errorRejecting order', 'Error Rejecting a order`),
46
+ kind: 'error',
47
+ critical: true,
48
+ description: err?.message,
49
+ });
50
+ },
51
+ );
52
+ };
53
+
54
+ return (
55
+ <div>
56
+ <Form onSubmit={rejectOrder}>
57
+ <ModalHeader closeModal={closeModal} title={t('rejectImagingOrder', 'Reject Imaging Order')} />
58
+ <ModalBody>
59
+ <div className={styles.modalBody}>
60
+ <section className={styles.section}>
61
+ <h5 className={styles.section}>
62
+ {order?.concept?.display} &nbsp; · &nbsp;{order?.fulfillerStatus ?? '--'} &nbsp; · &nbsp;
63
+ {order?.orderNumber}
64
+ &nbsp;
65
+ </h5>
66
+ </section>
67
+ <br />
68
+ <section className={styles.section}>
69
+ <TextArea
70
+ labelText={t('notes', 'Enter Comments ')}
71
+ id="nextNotes"
72
+ name="nextNotes"
73
+ invalidText="Required"
74
+ helperText="Please enter comment"
75
+ maxCount={500}
76
+ enableCounter
77
+ onChange={(e) => setNotes(e.target.value)}
78
+ />
79
+ </section>
80
+ </div>
81
+ </ModalBody>
82
+ <ModalFooter>
83
+ <Button kind="secondary" onClick={closeModal}>
84
+ {t('cancel', 'Cancel')}
85
+ </Button>
86
+ <Button kind="danger" type="submit">
87
+ {t('rejectOrder', 'Reject Order')}
88
+ </Button>
89
+ </ModalFooter>
90
+ </Form>
91
+ </div>
92
+ );
93
+ };
94
+
95
+ export default RejectOrderModal;
@@ -0,0 +1,14 @@
1
+ @use '@carbon/styles/scss/spacing';
2
+ @use '@carbon/styles/scss/type';
3
+
4
+ .section {
5
+ margin: spacing.$spacing-03;
6
+ }
7
+
8
+ .sectionTitle {
9
+ margin-bottom: spacing.$spacing-04;
10
+ }
11
+
12
+ .modalBody {
13
+ padding-bottom: spacing.$spacing-05;
14
+ }
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { DataTableSkeleton } from '@carbon/react';
3
+ import { useOrdersWorkList } from '../../hooks/useOrdersWorklist';
4
+ import { useTranslation } from 'react-i18next';
5
+ import GroupedOrdersTable from '../../shared/ui/common/grouped-orders-table.component';
6
+
7
+ export const TestsOrdered: React.FC = () => {
8
+ const { t } = useTranslation();
9
+ const { workListEntries, isLoading } = useOrdersWorkList('', '');
10
+
11
+ const testOrderAction = [
12
+ {
13
+ actionName: 'add-imaging-to-work-list-modal',
14
+ order: 1,
15
+ },
16
+ { actionName: 'reject-imaging-order-modal', order: 2 },
17
+ ];
18
+
19
+ if (isLoading) {
20
+ return <DataTableSkeleton />;
21
+ }
22
+ return (
23
+ <div>
24
+ <GroupedOrdersTable
25
+ orders={workListEntries}
26
+ showStatus={true}
27
+ showStartButton={false}
28
+ showActions={true}
29
+ showOrderType={false}
30
+ actions={testOrderAction}
31
+ title={t('testOrdered', 'Test Ordered')}
32
+ />
33
+ </div>
34
+ );
35
+ };
@@ -0,0 +1,13 @@
1
+ @use '@carbon/colors';
2
+ @import '~@openmrs/esm-styleguide/src/vars';
3
+
4
+ .rejectOrders {
5
+ &:hover {
6
+ background-color: colors.$red-70-hover;
7
+ color: colors.$white;
8
+ }
9
+ }
10
+
11
+ .single-line-display {
12
+ white-space: nowrap;
13
+ }
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { useTranslation } from 'react-i18next';
3
+ import styles from './transition-latest-queue-entry-button.scss';
4
+ import { showModal } from '@openmrs/esm-framework';
5
+ import { Button } from '@carbon/react';
6
+ import { AirlineManageGates } from '@carbon/react/icons';
7
+
8
+ interface TransitionLatestQueueEntryButtonProps {
9
+ patientUuid: string;
10
+ }
11
+
12
+ const TransitionLatestQueueEntryButton: React.FC<TransitionLatestQueueEntryButtonProps> = ({ patientUuid }) => {
13
+ const { t } = useTranslation();
14
+
15
+ const launchModal = () => {
16
+ const dispose = showModal('transition-patient-to-latest-queue-modal', {
17
+ closeModal: () => dispose(),
18
+ patientUuid,
19
+ });
20
+ };
21
+
22
+ return (
23
+ <Button
24
+ kind="tertiary"
25
+ className={styles.addPatientToQueue}
26
+ onClick={launchModal}
27
+ size="sm"
28
+ renderIcon={() => <AirlineManageGates size={18} />}>
29
+ {t('transition', 'Transition')}
30
+ </Button>
31
+ );
32
+ };
33
+
34
+ export default TransitionLatestQueueEntryButton;
@@ -0,0 +1,14 @@
1
+ @use '@carbon/layout';
2
+ @use '@carbon/styles/scss/type';
3
+
4
+ // TODO: refactor to use esm-style-guide
5
+ .addPatientToQueue {
6
+ --cds-layout-size-height-context: var(--cds-layout-size-height-sm, 2rem);
7
+ --cds-layout-size-height: var(--cds-layout-size-height-context);
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ text-align: center;
12
+ padding: 0 layout.$spacing-04;
13
+ gap: layout.$spacing-05;
14
+ }
@@ -0,0 +1,45 @@
1
+ import React, { useState } from 'react';
2
+ import { useTranslation } from 'react-i18next';
3
+ import { DataTableSkeleton } from '@carbon/react';
4
+ import styles from './work-list.scss';
5
+ import { useOrdersWorkList } from '../../hooks/useOrdersWorklist';
6
+ import { WorkListProps } from '../../shared/ui/common/grouped-imaging-types';
7
+ import GroupedOrdersTable from '../../shared/ui/common/grouped-orders-table.component';
8
+
9
+ const WorkList: React.FC<WorkListProps> = ({ fulfillerStatus }) => {
10
+ const { t } = useTranslation();
11
+ const [activatedOnOrAfterDate, setActivatedOnOrAfterDate] = useState('');
12
+
13
+ const { workListEntries, isLoading } = useOrdersWorkList(activatedOnOrAfterDate, fulfillerStatus);
14
+
15
+ if (isLoading) {
16
+ return <DataTableSkeleton role="progressbar" />;
17
+ }
18
+
19
+ if (workListEntries?.length >= 0) {
20
+ return (
21
+ <>
22
+ <div>
23
+ <div className={styles.headerBtnContainer}></div>
24
+ <GroupedOrdersTable
25
+ orders={workListEntries}
26
+ showStatus={true}
27
+ showStartButton={true}
28
+ showActions={true}
29
+ showOrderType={false}
30
+ actions={[
31
+ { actionName: 'imaging-report-form', order: 1 },
32
+ {
33
+ actionName: 'reject-imaging-order-modal',
34
+ order: 2,
35
+ },
36
+ ]}
37
+ title={t('workList', 'Work List')}
38
+ />
39
+ </div>
40
+ </>
41
+ );
42
+ }
43
+ };
44
+
45
+ export default WorkList;
@@ -0,0 +1,150 @@
1
+ import { openmrsFetch } from '@openmrs/esm-framework';
2
+ import useSWR from 'swr';
3
+ export interface Result {
4
+ [x: string]: any;
5
+ uuid: string;
6
+ orderNumber: string;
7
+ accessionNumber: string;
8
+ patient: Patient;
9
+ concept: Concept;
10
+ action: string;
11
+ careSetting: CareSetting;
12
+ previousOrder: PreviousOrder;
13
+ dateActivated: string;
14
+ scheduledDate: any;
15
+ dateStopped: any;
16
+ autoExpireDate: any;
17
+ encounter: Encounter;
18
+ orderer: Orderer;
19
+ orderReason: any;
20
+ orderReasonNonCoded: any;
21
+ orderType: OrderType;
22
+ urgency: string;
23
+ instructions: any;
24
+ commentToFulfiller: any;
25
+ display: string;
26
+ auditInfo: AuditInfo;
27
+ fulfillerStatus: string;
28
+ fulfillerComment: any;
29
+ specimenSource: SpecimenSource;
30
+ laterality: string;
31
+ bodySite: Concept;
32
+ clinicalHistory: any;
33
+ frequency: any;
34
+ numberOfRepeats: any;
35
+ links: Link[];
36
+ type: string;
37
+ resourceVersion: string;
38
+ procedures: Procedure[];
39
+ }
40
+
41
+ export interface Procedure {
42
+ uuid: string;
43
+ outcome: string;
44
+ procedureReport: string;
45
+ }
46
+ export interface Patient {
47
+ uuid: string;
48
+ display: string;
49
+ links: Link[];
50
+ }
51
+
52
+ export interface Link {
53
+ rel: string;
54
+ uri: string;
55
+ resourceAlias: string;
56
+ }
57
+
58
+ export interface Concept {
59
+ conceptClass: ConceptClass;
60
+ uuid: string;
61
+ display: string;
62
+ links: Link[];
63
+ }
64
+
65
+ export interface ConceptClass {
66
+ uuid: string;
67
+ }
68
+
69
+ export interface CareSetting {
70
+ uuid: string;
71
+ name: string;
72
+ description: string;
73
+ retired: boolean;
74
+ careSettingType: string;
75
+ display: string;
76
+ links: Link[];
77
+ resourceVersion: string;
78
+ }
79
+
80
+ export interface PreviousOrder {
81
+ uuid: string;
82
+ display: string;
83
+ links: Link[];
84
+ type: string;
85
+ }
86
+
87
+ export interface Encounter {
88
+ uuid: string;
89
+ display: string;
90
+ links: Link[];
91
+ }
92
+
93
+ export interface Orderer {
94
+ uuid: string;
95
+ display: string;
96
+ links: Link[];
97
+ }
98
+
99
+ export interface OrderType {
100
+ uuid: string;
101
+ display: string;
102
+ name: string;
103
+ javaClassName: string;
104
+ retired: boolean;
105
+ description: string;
106
+ conceptClasses: any[];
107
+ parent: any;
108
+ links: Link[];
109
+ resourceVersion: string;
110
+ }
111
+
112
+ export interface AuditInfo {
113
+ creator: Creator;
114
+ dateCreated: string;
115
+ changedBy: any;
116
+ dateChanged: any;
117
+ }
118
+
119
+ export interface Creator {
120
+ uuid: string;
121
+ display: string;
122
+ links: Link[];
123
+ }
124
+
125
+ export interface SpecimenSource {
126
+ uuid: string;
127
+ display: string;
128
+ links: Link[];
129
+ }
130
+
131
+ export function useGetOrdersWorklist(activatedOnOrAfterDate: string, fulfillerStatus: string) {
132
+ const apiUrl = `/ws/rest/v1/order?orderTypes=52a447d3-a64a-11e3-9aeb-50e549534c5e&activatedOnOrAfterDate=${activatedOnOrAfterDate}&isStopped=false&fulfillerStatus=${fulfillerStatus}&v=full
133
+ `;
134
+
135
+ const { data, error, isLoading } = useSWR<{ data: { results: Array<Result> } }, Error>(apiUrl, openmrsFetch);
136
+
137
+ const orders = data?.data?.results?.filter((order) => {
138
+ if (fulfillerStatus === '') {
139
+ return order.fulfillerStatus === null && order.dateStopped === null && order.action === 'NEW';
140
+ } else if (fulfillerStatus === 'IN_PROGRESS') {
141
+ return order.fulfillerStatus === 'IN_PROGRESS' && order.dateStopped === null && order.action !== 'DISCONTINUE';
142
+ }
143
+ });
144
+
145
+ return {
146
+ workListEntries: orders?.length > 0 ? orders : [],
147
+ isLoading,
148
+ isError: error,
149
+ };
150
+ }
@@ -0,0 +1,207 @@
1
+ @use '@carbon/styles/scss/spacing';
2
+ @use '@carbon/styles/scss/type';
3
+ @import '~@openmrs/esm-styleguide/src/vars';
4
+
5
+ title {
6
+ width: 6.938rem;
7
+ height: 1.75rem;
8
+ margin: 0.438rem 22.875rem 0.813rem 0;
9
+ font-family: IBMPlexSans;
10
+ font-size: 1.25rem;
11
+ font-weight: normal;
12
+ font-stretch: normal;
13
+ font-style: normal;
14
+ line-height: 1.4;
15
+ letter-spacing: normal;
16
+ }
17
+
18
+ .link {
19
+ text-decoration: none;
20
+ }
21
+
22
+ .breadcrumbsSlot {
23
+ grid-row: 1 / 2;
24
+ grid-column: 1 / 2;
25
+ }
26
+
27
+ .orderTabsContainer {
28
+ height: 100%;
29
+ width: 100%;
30
+
31
+ :global(.cds--tab-content) {
32
+ padding: 0 !important;
33
+ }
34
+ }
35
+
36
+ .orderTabs {
37
+ grid-column: 'span 2';
38
+ padding: 0 spacing.$spacing-05;
39
+ }
40
+
41
+ .newListButton {
42
+ width: fit-content;
43
+ justify-self: end;
44
+ align-self: center;
45
+ }
46
+
47
+ .tabsContainer {
48
+ background-color: $ui-02;
49
+
50
+ :global(.cds--tabs__nav-item--selected) {
51
+ box-shadow: inset 0 2px 0 0 var(--brand-03) !important;
52
+ }
53
+
54
+ :global(.cds--tab--list) button {
55
+ max-width: 12rem !important;
56
+ }
57
+ }
58
+
59
+ .hiddenTabsContent,
60
+ .tabs .hiddenTabsContent {
61
+ display: none;
62
+ }
63
+
64
+ .patientListTableContainer {
65
+ grid-row: 3 / 4;
66
+ grid-column: 1 / 2;
67
+ height: 100%;
68
+ margin: 0.5rem spacing.$spacing-05;
69
+ background-color: $ui-01;
70
+ border: 0.5px solid #e0e0e0;
71
+
72
+ :global(.cds--data-table-container) {
73
+ padding-top: 0 !important;
74
+ }
75
+
76
+ tbody > tr > :nth-child(2) {
77
+ white-space: nowrap;
78
+ }
79
+
80
+ :global(.cds--data-table td) {
81
+ height: unset !important;
82
+ }
83
+
84
+ :global(.cds--data-table--zebra) tbody tr[data-parent-row]:nth-child(4n + 1) td {
85
+ background-color: $ui-02;
86
+ border-bottom: 1px solid $ui-03;
87
+ border-top: 1px solid $ui-03;
88
+ }
89
+
90
+ :global(.cds--data-table--zebra) tbody tr[data-parent-row]:nth-child(4n + 3) td {
91
+ background-color: $ui-01;
92
+ border-bottom: 1px solid $ui-03;
93
+ }
94
+ }
95
+
96
+ .tableContainer {
97
+ background-color: $ui-01;
98
+ margin: 0 spacing.$spacing-05;
99
+ padding: 0;
100
+
101
+ a {
102
+ text-decoration: none;
103
+ }
104
+
105
+ th {
106
+ color: $text-02;
107
+ }
108
+
109
+ :global(.cds--data-table) {
110
+ background-color: $ui-03;
111
+ }
112
+
113
+ .toolbarContent {
114
+ height: spacing.$spacing-07;
115
+ margin-bottom: spacing.$spacing-02;
116
+ }
117
+ }
118
+
119
+ .activePatientsTable tr:last-of-type {
120
+ td {
121
+ border-bottom: none;
122
+ }
123
+ }
124
+
125
+ .searchContainer {
126
+ display: flex;
127
+ align-items: center;
128
+ flex-direction: row-reverse;
129
+ padding-top: 0.5rem;
130
+
131
+ :global(.cds--search-magnifier-icon) {
132
+ z-index: 0 !important;
133
+ }
134
+
135
+ input {
136
+ background-color: #fff;
137
+ }
138
+ }
139
+
140
+ .addOrderBtn {
141
+ width: 10rem !important;
142
+ padding: 0.5rem !important;
143
+ margin-left: 1rem;
144
+ margin-right: 1rem;
145
+ }
146
+
147
+ .patientSearch {
148
+ width: 25rem;
149
+ border-bottom-color: $ui-03;
150
+ }
151
+
152
+ .locationFilter {
153
+ width: 25rem;
154
+ }
155
+
156
+ .search {
157
+ width: 100%;
158
+ max-width: 16rem;
159
+ background-color: $ui-02;
160
+ border-bottom-color: $ui-03;
161
+ }
162
+
163
+ .container {
164
+ background-color: $ui-01;
165
+ }
166
+
167
+ .expandedLabQueueVisitRow {
168
+ :global(.cds--tab-content) {
169
+ padding: 0.5rem 0;
170
+ }
171
+
172
+ td {
173
+ padding: 0.5rem;
174
+
175
+ > div {
176
+ max-height: max-content !important;
177
+ background-color: $ui-02;
178
+ }
179
+ }
180
+
181
+ th[colspan] td[colspan] > div:first-child {
182
+ padding: 0 1rem;
183
+ }
184
+ }
185
+
186
+ .tileContainer {
187
+ background-color: $ui-02;
188
+ border-top: 1px solid $ui-03;
189
+ padding: 5rem 0;
190
+ }
191
+
192
+ .tile {
193
+ margin: auto;
194
+ width: fit-content;
195
+ }
196
+
197
+ .tileContent {
198
+ display: flex;
199
+ flex-direction: column;
200
+ align-items: center;
201
+ }
202
+
203
+ .content {
204
+ @include type.type-style('heading-compact-02');
205
+ color: $text-02;
206
+ margin-bottom: 0.5rem;
207
+ }