@openmrs/esm-laboratory-app 1.0.1-pre.96
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/.editorconfig +12 -0
- package/.eslintignore +2 -0
- package/.eslintrc +32 -0
- package/.husky/pre-commit +4 -0
- package/.husky/pre-push +6 -0
- package/.prettierignore +14 -0
- package/.turbo/turbo-build.log +30 -0
- package/.turbo/turbo-lint.log +12 -0
- package/.turbo/turbo-typescript.log +0 -0
- package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +541 -0
- package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
- package/.yarn/plugins/@yarnpkg/plugin-version.cjs +550 -0
- package/.yarn/versions/1bd1bb50.yml +0 -0
- package/README.md +39 -0
- package/__mocks__/react-i18next.js +50 -0
- package/assets/logo/logo.png +0 -0
- package/assets/logo/moh_logo_without_word.png +0 -0
- package/assets/screenshots/labs_enter_results.png +0 -0
- package/assets/screenshots/labs_general_dashboard.png +0 -0
- package/dist/142.js +1 -0
- package/dist/142.js.map +1 -0
- package/dist/319.js +1 -0
- package/dist/36.js +1 -0
- package/dist/36.js.map +1 -0
- package/dist/395.js +1 -0
- package/dist/395.js.map +1 -0
- package/dist/453.js +1 -0
- package/dist/453.js.map +1 -0
- package/dist/533.js +1 -0
- package/dist/533.js.map +1 -0
- package/dist/56.js +2 -0
- package/dist/56.js.LICENSE.txt +32 -0
- package/dist/56.js.map +1 -0
- package/dist/572.js +1 -0
- package/dist/572.js.map +1 -0
- package/dist/574.js +1 -0
- package/dist/581.js +1 -0
- package/dist/581.js.map +1 -0
- package/dist/66.js +1 -0
- package/dist/66.js.map +1 -0
- package/dist/757.js +1 -0
- package/dist/769.js +1 -0
- package/dist/769.js.map +1 -0
- package/dist/770.js +1 -0
- package/dist/770.js.map +1 -0
- package/dist/800.js +2 -0
- package/dist/800.js.LICENSE.txt +3 -0
- package/dist/800.js.map +1 -0
- package/dist/809.js +1 -0
- package/dist/809.js.map +1 -0
- package/dist/889.js +1 -0
- package/dist/889.js.map +1 -0
- package/dist/894.js +2 -0
- package/dist/894.js.LICENSE.txt +48 -0
- package/dist/894.js.map +1 -0
- package/dist/924.js +1 -0
- package/dist/924.js.map +1 -0
- package/dist/928.js +1 -0
- package/dist/928.js.map +1 -0
- package/dist/967b98e46b0984c4.png +0 -0
- package/dist/97.js +1 -0
- package/dist/97.js.map +1 -0
- package/dist/983.js +1 -0
- package/dist/983.js.map +1 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +48 -0
- package/dist/main.js.map +1 -0
- package/dist/openmrs-esm-laboratory-app.js +1 -0
- package/dist/openmrs-esm-laboratory-app.js.buildmanifest.json +628 -0
- package/dist/openmrs-esm-laboratory-app.js.map +1 -0
- package/dist/routes.json +1 -0
- package/i18next-parser.config.js +89 -0
- package/jest.config.js +16 -0
- package/package.json +121 -0
- package/src/completed-list/completed-list.component.tsx +234 -0
- package/src/completed-list/completed-list.resource.ts +0 -0
- package/src/completed-list/completed-list.scss +232 -0
- package/src/components/create-dashboard-link.component.tsx +44 -0
- package/src/components/overlay/hook.ts +47 -0
- package/src/components/overlay/overlay.component.tsx +52 -0
- package/src/components/overlay/overlay.scss +93 -0
- package/src/config-schema.ts +36 -0
- package/src/constants.ts +5 -0
- package/src/declarations.d.ts +6 -0
- package/src/header/laboratory-header.component.tsx +35 -0
- package/src/header/laboratory-header.scss +68 -0
- package/src/header/laboratory-illustration.component.tsx +13 -0
- package/src/index.ts +92 -0
- package/src/laboratory.component.tsx +18 -0
- package/src/patient-chart/laboratory-item/view-laboratory-item.component.tsx +39 -0
- package/src/patient-chart/laboratory-item/view-laboratory-item.resource.ts +290 -0
- package/src/patient-chart/laboratory-item/view-laboratory-item.scss +0 -0
- package/src/patient-chart/laboratory-order.component.tsx +453 -0
- package/src/patient-chart/laboratory-order.resource.ts +437 -0
- package/src/patient-chart/laboratory-order.scss +66 -0
- package/src/patient-chart/results-summary/print-results-summary.component.tsx +240 -0
- package/src/patient-chart/results-summary/print-results-summary.scss +105 -0
- package/src/patient-chart/results-summary/print-results-table.component.tsx +163 -0
- package/src/patient-chart/results-summary/results/results.component.tsx +25 -0
- package/src/patient-chart/results-summary/results/results.resource.ts +50 -0
- package/src/patient-chart/results-summary/results/results.scss +0 -0
- package/src/patient-chart/results-summary/results-dialog/edit-results-dialog.component.tsx +46 -0
- package/src/patient-chart/results-summary/results-summary.component.tsx +98 -0
- package/src/patient-chart/results-summary/results-summary.resource.tsx +185 -0
- package/src/patient-chart/results-summary/results-summary.scss +154 -0
- package/src/patient-chart/results-summary/send-email-dialog.component.tsx +111 -0
- package/src/patient-chart/results-summary/test-children-results.component.tsx +221 -0
- package/src/patient-chart/results-summary/test-print-results-table.component.tsx +148 -0
- package/src/patient-chart/results-summary/test-results-delete-action-menu.component.tsx +27 -0
- package/src/patient-chart/results-summary/test-results-rescend-action-menu.component.tsx +26 -0
- package/src/patient-chart/results-summary/test-results-table.component.tsx +153 -0
- package/src/patient-chart/results-summary/tests-children-detail.component.tsx +54 -0
- package/src/patient-chart/results-summary/views/email.handlebars +13 -0
- package/src/queue-list/lab-dialogs/add-to-worklist-dialog.component.tsx +323 -0
- package/src/queue-list/lab-dialogs/add-to-worklist-dialog.resource.ts +155 -0
- package/src/queue-list/lab-dialogs/add-to-worklist-dialog.scss +20 -0
- package/src/queue-list/lab-tests/lab-tests.component.tsx +116 -0
- package/src/queue-list/lab-tests/lab-tests.resource.ts +17 -0
- package/src/queue-list/lab-tests/lab-tests.scss +12 -0
- package/src/queue-list/laboratory-patient-list.component.tsx +268 -0
- package/src/queue-list/laboratory-patient-list.resource.ts +86 -0
- package/src/queue-list/laboratory-queue.component.tsx +120 -0
- package/src/queue-list/laboratory-queue.scss +213 -0
- package/src/queue-list/laboratory-tabs.component.tsx +81 -0
- package/src/queue-list/pick-lab-request-menu.component.tsx +38 -0
- package/src/reject-order/reject-order-dialog.component.tsx +114 -0
- package/src/reject-order/reject-order-dialog.resource.ts +14 -0
- package/src/reject-order/reject-order-dialog.scss +14 -0
- package/src/results/result-form.component.tsx +223 -0
- package/src/results/result-form.resource.ts +328 -0
- package/src/results/result-form.scss +19 -0
- package/src/review-list/dialog/review-item.component.tsx +283 -0
- package/src/review-list/dialog/review-item.resource.ts +14 -0
- package/src/review-list/dialog/review-item.scss +0 -0
- package/src/review-list/review-list.component.tsx +269 -0
- package/src/review-list/review-list.resource.ts +0 -0
- package/src/review-list/review-list.scss +189 -0
- package/src/root.component.tsx +15 -0
- package/src/root.scss +50 -0
- package/src/routes.json +72 -0
- package/src/setup-tests.ts +1 -0
- package/src/summary-tiles/laboratory-summary-tiles.component.tsx +53 -0
- package/src/summary-tiles/laboratory-summary-tiles.scss +12 -0
- package/src/summary-tiles/laboratory-summary.resource.tsx +50 -0
- package/src/summary-tiles/summary-tile.component.tsx +48 -0
- package/src/summary-tiles/summary-tile.scss +43 -0
- package/src/types/index.ts +412 -0
- package/src/types/patient-queues.ts +189 -0
- package/src/utils/functions.ts +246 -0
- package/src/work-list/work-list.component.tsx +302 -0
- package/src/work-list/work-list.resource.ts +136 -0
- package/src/work-list/work-list.scss +215 -0
- package/translations/en.json +16 -0
- package/translations/es.json +3 -0
- package/translations/fr.json +3 -0
- package/tsconfig.json +23 -0
- package/webpack.config.js +29 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
useState,
|
|
3
|
+
useMemo,
|
|
4
|
+
AnchorHTMLAttributes,
|
|
5
|
+
useCallback,
|
|
6
|
+
} from "react";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
8
|
+
import { EmptyState, ErrorState } from "@openmrs/esm-patient-common-lib";
|
|
9
|
+
import { Microscope, TrashCan } from "@carbon/react/icons";
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
DataTable,
|
|
13
|
+
DataTableHeader,
|
|
14
|
+
DataTableSkeleton,
|
|
15
|
+
Pagination,
|
|
16
|
+
Table,
|
|
17
|
+
TableBody,
|
|
18
|
+
TableCell,
|
|
19
|
+
TableContainer,
|
|
20
|
+
TableExpandHeader,
|
|
21
|
+
TableExpandRow,
|
|
22
|
+
TableHead,
|
|
23
|
+
TableHeader,
|
|
24
|
+
TableRow,
|
|
25
|
+
TabPanel,
|
|
26
|
+
TableToolbar,
|
|
27
|
+
TableToolbarContent,
|
|
28
|
+
TableToolbarSearch,
|
|
29
|
+
Layer,
|
|
30
|
+
Tag,
|
|
31
|
+
TableExpandedRow,
|
|
32
|
+
Button,
|
|
33
|
+
Tile,
|
|
34
|
+
DatePicker,
|
|
35
|
+
DatePickerInput,
|
|
36
|
+
Select,
|
|
37
|
+
SelectItem,
|
|
38
|
+
} from "@carbon/react";
|
|
39
|
+
import { Result, useGetOrdersWorklist } from "./work-list.resource";
|
|
40
|
+
import styles from "./work-list.scss";
|
|
41
|
+
import {
|
|
42
|
+
formatDate,
|
|
43
|
+
parseDate,
|
|
44
|
+
showModal,
|
|
45
|
+
usePagination,
|
|
46
|
+
} from "@openmrs/esm-framework";
|
|
47
|
+
import { launchOverlay } from "../components/overlay/hook";
|
|
48
|
+
import ResultForm from "../results/result-form.component";
|
|
49
|
+
import { getStatusColor } from "../utils/functions";
|
|
50
|
+
|
|
51
|
+
interface WorklistProps {
|
|
52
|
+
fulfillerStatus: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface ResultsOrderProps {
|
|
56
|
+
order: Result;
|
|
57
|
+
patientUuid: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface RejectOrderProps {
|
|
61
|
+
order: Result;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const WorkList: React.FC<WorklistProps> = ({ fulfillerStatus }) => {
|
|
65
|
+
const { t } = useTranslation();
|
|
66
|
+
|
|
67
|
+
const [activatedOnOrAfterDate, setActivatedOnOrAfterDate] = useState("");
|
|
68
|
+
|
|
69
|
+
const { workListEntries, isLoading } = useGetOrdersWorklist(
|
|
70
|
+
activatedOnOrAfterDate,
|
|
71
|
+
fulfillerStatus
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const pageSizes = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50];
|
|
75
|
+
const [currentPageSize, setPageSize] = useState(10);
|
|
76
|
+
|
|
77
|
+
const {
|
|
78
|
+
goTo,
|
|
79
|
+
results: paginatedWorkListEntries,
|
|
80
|
+
currentPage,
|
|
81
|
+
} = usePagination(workListEntries, currentPageSize);
|
|
82
|
+
|
|
83
|
+
const RejectOrder: React.FC<RejectOrderProps> = ({ order }) => {
|
|
84
|
+
const launchRejectOrderModal = useCallback(() => {
|
|
85
|
+
const dispose = showModal("reject-order-dialog", {
|
|
86
|
+
closeModal: () => dispose(),
|
|
87
|
+
order,
|
|
88
|
+
});
|
|
89
|
+
}, [order]);
|
|
90
|
+
return (
|
|
91
|
+
<Button
|
|
92
|
+
kind="ghost"
|
|
93
|
+
onClick={launchRejectOrderModal}
|
|
94
|
+
renderIcon={(props) => <TrashCan size={16} {...props} />}
|
|
95
|
+
/>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// get picked orders
|
|
100
|
+
let columns = [
|
|
101
|
+
{ id: 0, header: t("date", "Date"), key: "date" },
|
|
102
|
+
|
|
103
|
+
{ id: 1, header: t("orderNumber", "Order Number"), key: "orderNumber" },
|
|
104
|
+
{
|
|
105
|
+
id: 2,
|
|
106
|
+
header: t("accessionNumber", "Accession Number"),
|
|
107
|
+
key: "accessionNumber",
|
|
108
|
+
},
|
|
109
|
+
{ id: 3, header: t("test", "Test"), key: "test" },
|
|
110
|
+
{ id: 4, header: t("action", "Action"), key: "action" },
|
|
111
|
+
{ id: 5, header: t("status", "Status"), key: "status" },
|
|
112
|
+
{ id: 6, header: t("orderer", "Orderer"), key: "orderer" },
|
|
113
|
+
{ id: 7, header: t("orderType", "Order Type"), key: "orderType" },
|
|
114
|
+
{ id: 8, header: t("urgency", "Urgency"), key: "urgency" },
|
|
115
|
+
{ id: 9, header: t("actions", "Actions"), key: "actions" },
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
const ResultsOrder: React.FC<ResultsOrderProps> = ({
|
|
119
|
+
order,
|
|
120
|
+
patientUuid,
|
|
121
|
+
}) => {
|
|
122
|
+
return (
|
|
123
|
+
<Button
|
|
124
|
+
kind="ghost"
|
|
125
|
+
onClick={() => {
|
|
126
|
+
launchOverlay(
|
|
127
|
+
t("resultForm", "Result Tests"),
|
|
128
|
+
<ResultForm patientUuid={patientUuid} order={order} />
|
|
129
|
+
);
|
|
130
|
+
}}
|
|
131
|
+
renderIcon={(props) => <Microscope size={16} {...props} />}
|
|
132
|
+
/>
|
|
133
|
+
);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const tableRows = useMemo(() => {
|
|
137
|
+
return paginatedWorkListEntries
|
|
138
|
+
?.filter((item) => item.action === "REVISE")
|
|
139
|
+
.map((entry, index) => ({
|
|
140
|
+
...entry,
|
|
141
|
+
id: entry.uuid,
|
|
142
|
+
date: {
|
|
143
|
+
content: (
|
|
144
|
+
<>
|
|
145
|
+
<span>{formatDate(parseDate(entry.dateActivated))}</span>
|
|
146
|
+
</>
|
|
147
|
+
),
|
|
148
|
+
},
|
|
149
|
+
orderNumber: { content: <span>{entry.orderNumber}</span> },
|
|
150
|
+
accessionNumber: { content: <span>{entry.accessionNumber}</span> },
|
|
151
|
+
test: { content: <span>{entry.concept.display}</span> },
|
|
152
|
+
action: { content: <span>{entry.action}</span> },
|
|
153
|
+
status: {
|
|
154
|
+
content: (
|
|
155
|
+
<>
|
|
156
|
+
<Tag>
|
|
157
|
+
<span
|
|
158
|
+
className={styles.statusContainer}
|
|
159
|
+
style={{ color: `${getStatusColor(entry.fulfillerStatus)}` }}
|
|
160
|
+
>
|
|
161
|
+
<span>{entry.fulfillerStatus}</span>
|
|
162
|
+
</span>
|
|
163
|
+
</Tag>
|
|
164
|
+
</>
|
|
165
|
+
),
|
|
166
|
+
},
|
|
167
|
+
orderer: { content: <span>{entry.orderer.display}</span> },
|
|
168
|
+
orderType: { content: <span>{entry.orderType.display}</span> },
|
|
169
|
+
urgency: { content: <span>{entry.urgency}</span> },
|
|
170
|
+
actions: {
|
|
171
|
+
content: (
|
|
172
|
+
<>
|
|
173
|
+
<ResultsOrder
|
|
174
|
+
patientUuid={entry.patient.uuid}
|
|
175
|
+
order={paginatedWorkListEntries[index]}
|
|
176
|
+
/>
|
|
177
|
+
<RejectOrder order={paginatedWorkListEntries[index]} />
|
|
178
|
+
</>
|
|
179
|
+
),
|
|
180
|
+
},
|
|
181
|
+
}));
|
|
182
|
+
}, [ResultsOrder, paginatedWorkListEntries]);
|
|
183
|
+
|
|
184
|
+
if (isLoading) {
|
|
185
|
+
return <DataTableSkeleton role="progressbar" />;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (paginatedWorkListEntries?.length >= 0) {
|
|
189
|
+
return (
|
|
190
|
+
<div>
|
|
191
|
+
<div className={styles.headerBtnContainer}></div>
|
|
192
|
+
<DataTable rows={tableRows} headers={columns} useZebraStyles>
|
|
193
|
+
{({
|
|
194
|
+
rows,
|
|
195
|
+
headers,
|
|
196
|
+
getHeaderProps,
|
|
197
|
+
getTableProps,
|
|
198
|
+
getRowProps,
|
|
199
|
+
onInputChange,
|
|
200
|
+
}) => (
|
|
201
|
+
<TableContainer className={styles.tableContainer}>
|
|
202
|
+
<TableToolbar
|
|
203
|
+
style={{
|
|
204
|
+
position: "static",
|
|
205
|
+
height: "3rem",
|
|
206
|
+
overflow: "visible",
|
|
207
|
+
backgroundColor: "color",
|
|
208
|
+
}}
|
|
209
|
+
>
|
|
210
|
+
<TableToolbarContent>
|
|
211
|
+
<Layer style={{ margin: "5px" }}>
|
|
212
|
+
<DatePicker dateFormat="Y-m-d" datePickerType="single">
|
|
213
|
+
<DatePickerInput
|
|
214
|
+
labelText={""}
|
|
215
|
+
id="activatedOnOrAfterDate"
|
|
216
|
+
placeholder="YYYY-MM-DD"
|
|
217
|
+
onChange={(event) => {
|
|
218
|
+
setActivatedOnOrAfterDate(event.target.value);
|
|
219
|
+
}}
|
|
220
|
+
type="date"
|
|
221
|
+
value={activatedOnOrAfterDate}
|
|
222
|
+
/>
|
|
223
|
+
</DatePicker>
|
|
224
|
+
</Layer>
|
|
225
|
+
<Layer>
|
|
226
|
+
<TableToolbarSearch
|
|
227
|
+
onChange={onInputChange}
|
|
228
|
+
placeholder={t("searchThisList", "Search this list")}
|
|
229
|
+
size="sm"
|
|
230
|
+
/>
|
|
231
|
+
</Layer>
|
|
232
|
+
</TableToolbarContent>
|
|
233
|
+
</TableToolbar>
|
|
234
|
+
<Table
|
|
235
|
+
{...getTableProps()}
|
|
236
|
+
className={styles.activePatientsTable}
|
|
237
|
+
>
|
|
238
|
+
<TableHead>
|
|
239
|
+
<TableRow>
|
|
240
|
+
{headers.map((header) => (
|
|
241
|
+
<TableHeader {...getHeaderProps({ header })}>
|
|
242
|
+
{header.header?.content ?? header.header}
|
|
243
|
+
</TableHeader>
|
|
244
|
+
))}
|
|
245
|
+
</TableRow>
|
|
246
|
+
</TableHead>
|
|
247
|
+
<TableBody>
|
|
248
|
+
{rows.map((row, index) => {
|
|
249
|
+
return (
|
|
250
|
+
<React.Fragment key={row.id}>
|
|
251
|
+
<TableRow {...getRowProps({ row })} key={row.id}>
|
|
252
|
+
{row.cells.map((cell) => (
|
|
253
|
+
<TableCell key={cell.id}>
|
|
254
|
+
{cell.value?.content ?? cell.value}
|
|
255
|
+
</TableCell>
|
|
256
|
+
))}
|
|
257
|
+
</TableRow>
|
|
258
|
+
</React.Fragment>
|
|
259
|
+
);
|
|
260
|
+
})}
|
|
261
|
+
</TableBody>
|
|
262
|
+
</Table>
|
|
263
|
+
{rows.length === 0 ? (
|
|
264
|
+
<div className={styles.tileContainer}>
|
|
265
|
+
<Tile className={styles.tile}>
|
|
266
|
+
<div className={styles.tileContent}>
|
|
267
|
+
<p className={styles.content}>
|
|
268
|
+
{t(
|
|
269
|
+
"noWorklistsToDisplay",
|
|
270
|
+
"No workists orders to display"
|
|
271
|
+
)}
|
|
272
|
+
</p>
|
|
273
|
+
</div>
|
|
274
|
+
</Tile>
|
|
275
|
+
</div>
|
|
276
|
+
) : null}
|
|
277
|
+
<Pagination
|
|
278
|
+
forwardText="Next page"
|
|
279
|
+
backwardText="Previous page"
|
|
280
|
+
page={currentPage}
|
|
281
|
+
pageSize={currentPageSize}
|
|
282
|
+
pageSizes={pageSizes}
|
|
283
|
+
totalItems={workListEntries?.length}
|
|
284
|
+
className={styles.pagination}
|
|
285
|
+
onChange={({ pageSize, page }) => {
|
|
286
|
+
if (pageSize !== currentPageSize) {
|
|
287
|
+
setPageSize(pageSize);
|
|
288
|
+
}
|
|
289
|
+
if (page !== currentPage) {
|
|
290
|
+
goTo(page);
|
|
291
|
+
}
|
|
292
|
+
}}
|
|
293
|
+
/>
|
|
294
|
+
</TableContainer>
|
|
295
|
+
)}
|
|
296
|
+
</DataTable>
|
|
297
|
+
</div>
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
export default WorkList;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { openmrsFetch } from "@openmrs/esm-framework";
|
|
2
|
+
import useSWR from "swr";
|
|
3
|
+
|
|
4
|
+
export interface Result {
|
|
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: any;
|
|
31
|
+
clinicalHistory: any;
|
|
32
|
+
frequency: any;
|
|
33
|
+
numberOfRepeats: any;
|
|
34
|
+
links: Link[];
|
|
35
|
+
type: string;
|
|
36
|
+
resourceVersion: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface Patient {
|
|
40
|
+
uuid: string;
|
|
41
|
+
display: string;
|
|
42
|
+
links: Link[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface Link {
|
|
46
|
+
rel: string;
|
|
47
|
+
uri: string;
|
|
48
|
+
resourceAlias: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface Concept {
|
|
52
|
+
uuid: string;
|
|
53
|
+
display: string;
|
|
54
|
+
links: Link[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface CareSetting {
|
|
58
|
+
uuid: string;
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
retired: boolean;
|
|
62
|
+
careSettingType: string;
|
|
63
|
+
display: string;
|
|
64
|
+
links: Link[];
|
|
65
|
+
resourceVersion: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface PreviousOrder {
|
|
69
|
+
uuid: string;
|
|
70
|
+
display: string;
|
|
71
|
+
links: Link[];
|
|
72
|
+
type: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface Encounter {
|
|
76
|
+
uuid: string;
|
|
77
|
+
display: string;
|
|
78
|
+
links: Link[];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface Orderer {
|
|
82
|
+
uuid: string;
|
|
83
|
+
display: string;
|
|
84
|
+
links: Link[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface OrderType {
|
|
88
|
+
uuid: string;
|
|
89
|
+
display: string;
|
|
90
|
+
name: string;
|
|
91
|
+
javaClassName: string;
|
|
92
|
+
retired: boolean;
|
|
93
|
+
description: string;
|
|
94
|
+
conceptClasses: any[];
|
|
95
|
+
parent: any;
|
|
96
|
+
links: Link[];
|
|
97
|
+
resourceVersion: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface AuditInfo {
|
|
101
|
+
creator: Creator;
|
|
102
|
+
dateCreated: string;
|
|
103
|
+
changedBy: any;
|
|
104
|
+
dateChanged: any;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface Creator {
|
|
108
|
+
uuid: string;
|
|
109
|
+
display: string;
|
|
110
|
+
links: Link[];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface SpecimenSource {
|
|
114
|
+
uuid: string;
|
|
115
|
+
display: string;
|
|
116
|
+
links: Link[];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function useGetOrdersWorklist(
|
|
120
|
+
activatedOnOrAfterDate: string,
|
|
121
|
+
fulfillerStatus: string
|
|
122
|
+
) {
|
|
123
|
+
const apiUrl = `/ws/rest/v1/order?orderTypes=52a447d3-a64a-11e3-9aeb-50e549534c5e&activatedOnOrAfterDate=${activatedOnOrAfterDate}&isStopped=false&fulfillerStatus=${fulfillerStatus}&v=full
|
|
124
|
+
`;
|
|
125
|
+
|
|
126
|
+
const { data, error, isLoading } = useSWR<
|
|
127
|
+
{ data: { results: Array<Result> } },
|
|
128
|
+
Error
|
|
129
|
+
>(apiUrl, openmrsFetch);
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
workListEntries: data?.data ? data.data.results : [],
|
|
133
|
+
isLoading,
|
|
134
|
+
isError: error,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
3
|
+
@import "~@openmrs/esm-styleguide/src/vars";
|
|
4
|
+
@import '../root.scss';
|
|
5
|
+
|
|
6
|
+
title {
|
|
7
|
+
width: 6.938rem;
|
|
8
|
+
height: 1.75rem;
|
|
9
|
+
margin: 0.438rem 22.875rem 0.813rem 0;
|
|
10
|
+
font-family: IBMPlexSans;
|
|
11
|
+
font-size: 1.25rem;
|
|
12
|
+
font-weight: normal;
|
|
13
|
+
font-stretch: normal;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
line-height: 1.4;
|
|
16
|
+
letter-spacing: normal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.link {
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.breadcrumbsSlot {
|
|
24
|
+
grid-row: 1 / 2;
|
|
25
|
+
grid-column: 1 / 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.orderTabsContainer {
|
|
29
|
+
height: 100%;
|
|
30
|
+
width: 100%;
|
|
31
|
+
|
|
32
|
+
:global(.cds--tab-content) {
|
|
33
|
+
padding: 0 !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.orderTabs {
|
|
38
|
+
grid-column: 'span 2';
|
|
39
|
+
padding: 0 spacing.$spacing-05;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.newListButton {
|
|
43
|
+
width: fit-content;
|
|
44
|
+
justify-self: end;
|
|
45
|
+
align-self: center;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tabsContainer {
|
|
49
|
+
background-color: $ui-02;
|
|
50
|
+
|
|
51
|
+
:global(.cds--tabs__nav-item--selected) {
|
|
52
|
+
box-shadow: inset 0 2px 0 0 var(--brand-03) !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:global(.cds--tab--list) button {
|
|
56
|
+
max-width: 12rem !important;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.hiddenTabsContent,
|
|
61
|
+
.tabs .hiddenTabsContent {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.patientListTableContainer {
|
|
66
|
+
grid-row: 3 / 4;
|
|
67
|
+
grid-column: 1 / 2;
|
|
68
|
+
height: 100%;
|
|
69
|
+
margin: 0.5rem spacing.$spacing-05;
|
|
70
|
+
background-color: $ui-01;
|
|
71
|
+
border: 0.5px solid #e0e0e0;
|
|
72
|
+
|
|
73
|
+
:global(.cds--data-table-container) {
|
|
74
|
+
padding-top: 0 !important;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
tbody>tr>:nth-child(2) {
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:global(.cds--data-table td) {
|
|
82
|
+
height: unset !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:global(.cds--data-table--zebra) tbody tr[data-parent-row]:nth-child(4n + 1) td {
|
|
86
|
+
background-color: $ui-02;
|
|
87
|
+
border-bottom: 1px solid $ui-03;
|
|
88
|
+
border-top: 1px solid $ui-03;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:global(.cds--data-table--zebra) tbody tr[data-parent-row]:nth-child(4n + 3) td {
|
|
92
|
+
background-color: $ui-01;
|
|
93
|
+
border-bottom: 1px solid $ui-03;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.tableContainer {
|
|
98
|
+
background-color: $ui-01;
|
|
99
|
+
margin: 0 spacing.$spacing-05;
|
|
100
|
+
padding: 0;
|
|
101
|
+
|
|
102
|
+
a {
|
|
103
|
+
text-decoration: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
th {
|
|
107
|
+
color: $text-02;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:global(.cds--data-table) {
|
|
111
|
+
background-color: $ui-03;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.toolbarContent {
|
|
115
|
+
height: spacing.$spacing-07;
|
|
116
|
+
margin-bottom: spacing.$spacing-02;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.activePatientsTable tr:last-of-type {
|
|
121
|
+
td {
|
|
122
|
+
border-bottom: none;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.headerBtnContainer {
|
|
127
|
+
background-color: $ui-background;
|
|
128
|
+
padding: spacing.$spacing-05;
|
|
129
|
+
text-align: right;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.searchContainer {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
flex-direction: row-reverse;
|
|
136
|
+
padding-top: 0.5rem;
|
|
137
|
+
|
|
138
|
+
:global(.cds--search-magnifier-icon) {
|
|
139
|
+
z-index: 0 !important;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
input {
|
|
143
|
+
background-color: #fff;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.addOrderBtn {
|
|
148
|
+
width: 10rem !important;
|
|
149
|
+
padding: 0.5rem !important;
|
|
150
|
+
margin-left: 1rem;
|
|
151
|
+
margin-right: 1rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.patientSearch {
|
|
155
|
+
width: 25rem;
|
|
156
|
+
border-bottom-color: $ui-03;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.locationFilter {
|
|
160
|
+
width: 25rem;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.search {
|
|
164
|
+
width: 100%;
|
|
165
|
+
max-width: 16rem;
|
|
166
|
+
background-color: $ui-02;
|
|
167
|
+
border-bottom-color: $ui-03;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.container {
|
|
171
|
+
background-color: $ui-01;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.expandedLabQueueVisitRow {
|
|
175
|
+
:global(.cds--tab-content) {
|
|
176
|
+
padding: 0.5rem 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
td {
|
|
180
|
+
padding: 0.5rem;
|
|
181
|
+
|
|
182
|
+
>div {
|
|
183
|
+
max-height: max-content !important;
|
|
184
|
+
background-color: $ui-02;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
th[colspan] td[colspan]>div:first-child {
|
|
189
|
+
padding: 0 1rem;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
.tileContainer {
|
|
195
|
+
background-color: $ui-02;
|
|
196
|
+
border-top: 1px solid $ui-03;
|
|
197
|
+
padding: 5rem 0;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.tile {
|
|
201
|
+
margin: auto;
|
|
202
|
+
width: fit-content;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.tileContent {
|
|
206
|
+
display: flex;
|
|
207
|
+
flex-direction: column;
|
|
208
|
+
align-items: center;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.content {
|
|
212
|
+
@include type.type-style('heading-compact-02');
|
|
213
|
+
color: $text-02;
|
|
214
|
+
margin-bottom: 0.5rem;
|
|
215
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"age": "Age",
|
|
3
|
+
"completed": "Completed",
|
|
4
|
+
"inProgress": "In progress",
|
|
5
|
+
"laboratory": "Laboratory",
|
|
6
|
+
"loading": "Loading",
|
|
7
|
+
"names": "Names",
|
|
8
|
+
"orderedFrom": "Ordered from",
|
|
9
|
+
"referredTests": "Referred tests",
|
|
10
|
+
"results": "Results",
|
|
11
|
+
"testsOrdered": "Tests ordered",
|
|
12
|
+
"transferred": "Transferred",
|
|
13
|
+
"visitId": "Visit ID",
|
|
14
|
+
"waitingTime": "Waiting time",
|
|
15
|
+
"worklist": "Worklist"
|
|
16
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"esModuleInterop": true,
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"allowSyntheticDefaultImports": true,
|
|
6
|
+
"jsx": "react",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"lib": [
|
|
10
|
+
"dom",
|
|
11
|
+
"es5",
|
|
12
|
+
"scripthost",
|
|
13
|
+
"es2015",
|
|
14
|
+
"es2015.promise",
|
|
15
|
+
"es2016.array.include",
|
|
16
|
+
"es2018",
|
|
17
|
+
"es2020"
|
|
18
|
+
],
|
|
19
|
+
"resolveJsonModule": true,
|
|
20
|
+
"noEmit": true,
|
|
21
|
+
"target": "esnext"
|
|
22
|
+
}
|
|
23
|
+
}
|