@openmrs/esm-laboratory-app 1.0.2 → 1.0.3-pre.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +2 -2
- package/.turbo/cache/6164ea036ee7e282-meta.json +1 -0
- package/.turbo/cache/6164ea036ee7e282.tar.zst +0 -0
- package/.turbo/turbo-build.log +44 -0
- package/dist/1448.js +1 -1
- package/dist/1800.js +1 -1
- package/dist/2156.js +1 -1
- package/dist/2260.js +2 -0
- package/dist/{1556.js.LICENSE.txt → 2260.js.LICENSE.txt} +10 -0
- package/dist/2260.js.map +1 -0
- package/dist/2328.js +1 -1
- package/dist/2636.js +1 -1
- package/dist/2664.js +1 -1
- package/dist/2816.js +1 -1
- package/dist/3240.js +1 -1
- package/dist/3264.js +1 -1
- package/dist/370.js +1 -1
- package/dist/3872.js +1 -1
- package/dist/3956.js +1 -0
- package/dist/3956.js.map +1 -0
- package/dist/4412.js +1 -1
- package/dist/4592.js +1 -1
- package/dist/464.js +1 -1
- package/dist/4744.js +1 -1
- package/dist/5028.js +1 -1
- package/dist/5086.js +1 -1
- package/dist/5136.js +1 -1
- package/dist/5144.js +1 -1
- package/dist/5144.js.map +1 -1
- package/dist/552.js +1 -1
- package/dist/6048.js +1 -1
- package/dist/6048.js.map +1 -1
- package/dist/6092.js +1 -1
- package/dist/6352.js +1 -1
- package/dist/6504.js +1 -1
- package/dist/6676.js +1 -1
- package/dist/6676.js.map +1 -1
- package/dist/6856.js +1 -1
- package/dist/6936.js +1 -1
- package/dist/7295.js +1 -1
- package/dist/7295.js.map +1 -1
- package/dist/7328.js +1 -1
- package/dist/7540.js +1 -1
- package/dist/8064.js +1 -1
- package/dist/8170.js +1 -1
- package/dist/8256.js +1 -1
- package/dist/8320.js +1 -0
- package/dist/8320.js.map +1 -0
- package/dist/8570.js +1 -1
- package/dist/8684.js +1 -1
- package/dist/8698.js +1 -1
- package/dist/8720.js +1 -1
- package/dist/8728.js +1 -1
- package/dist/8728.js.LICENSE.txt +2 -0
- package/dist/8728.js.map +1 -1
- package/dist/8936.js +1 -1
- package/dist/9372.js +1 -0
- package/dist/9464.js +1 -1
- package/dist/9656.js +1 -1
- package/dist/9832.js +1 -1
- package/dist/9864.js +1 -1
- package/dist/9960.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +10 -0
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-laboratory-app.js +1 -1
- package/dist/openmrs-esm-laboratory-app.js.buildmanifest.json +198 -176
- package/dist/routes.json +1 -1
- package/jest.config.js +8 -0
- package/package.json +4 -3
- package/src/components/orders-table/list-order-details.scss +1 -4
- package/src/components/orders-table/orders-data-table.component.tsx +38 -20
- package/src/components/orders-table/orders-data-table.scss +2 -1
- package/src/declarations.d.ts +0 -1
- package/src/lab-tabs/modals/pickup-lab-request-modal.component.tsx +1 -6
- package/src/lab-tabs/modals/reject-lab-request-modal.component.tsx +2 -2
- package/src/lab-tabs/modals/reject-lab-request-modal.scss +0 -28
- package/src/setup-tests.ts +1 -1
- package/tools/index.ts +1 -0
- package/tools/test-utils.ts +44 -0
- package/tools/update-openmrs-deps.mjs +43 -0
- package/translations/am.json +2 -2
- package/translations/ar.json +2 -2
- package/translations/bn.json +2 -2
- package/translations/de.json +2 -2
- package/translations/en.json +2 -2
- package/translations/es.json +27 -27
- package/translations/fr.json +2 -2
- package/translations/he.json +2 -2
- package/translations/hi.json +2 -2
- package/translations/hi_IN.json +2 -2
- package/translations/id.json +2 -2
- package/translations/it.json +2 -2
- package/translations/km.json +2 -2
- package/translations/ku.json +2 -2
- package/translations/ky.json +68 -0
- package/translations/lg.json +2 -2
- package/translations/ne.json +2 -2
- package/translations/pt.json +2 -2
- package/translations/pt_BR.json +2 -2
- package/translations/qu.json +2 -2
- package/translations/ru_RU.json +2 -2
- package/translations/si.json +2 -2
- package/translations/sw.json +2 -2
- package/translations/sw_KE.json +2 -2
- package/translations/tr.json +2 -2
- package/translations/tr_TR.json +2 -2
- package/translations/uk.json +2 -2
- package/translations/uz.json +2 -2
- package/translations/uz_UZ.json +2 -2
- package/translations/vi.json +2 -2
- package/translations/zh.json +2 -2
- package/translations/zh_CN.json +2 -2
- package/tsconfig.json +4 -0
- package/dist/1556.js +0 -2
- package/dist/1556.js.map +0 -1
- package/dist/744.js +0 -1
- package/dist/744.js.map +0 -1
- package/dist/9288.js +0 -1
- package/dist/9288.js.map +0 -1
- package/src/lab-tabs/actions/transition-patient-to-new-queue/transition-patient-to-new-queue.component.tsx +0 -35
- package/src/lab-tabs/actions/transition-patient-to-new-queue/transition-patient-to-new-queue.scss +0 -13
- package/src/lab-tabs/actions/transition-patient-to-new-queue/transition-patient-to-new-queue.test.tsx +0 -64
- package/src/lab-tabs/modals/pickup-lab-request-modal.scss +0 -29
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.24.0"},"pages":[{"component":"root","route":"laboratory"}],"extensions":[{"name":"laboratory-dashboard","slot":"laboratory-dashboard-slot","component":"root"},{"name":"laboratory-dashboard-link","slot":"homepage-dashboard-slot","component":"laboratoryDashboardLink","meta":{"name":"laboratory","slot":"laboratory-dashboard-slot","title":"Laboratory"}},{"name":"pickup-lab-request-modal","component":"pickupLabRequestModal"},{"name":"reject-lab-request-modal","component":"rejectLabRequestModal"},{"name":"all-lab-requests-table","slot":"lab-panels-slot","component":"allLabRequestsTable","meta":{"name":"inprogressPanel","title":"Tests ordered"}},{"name":"inprogress-lab-requests-table","slot":"lab-panels-slot","component":"inprogressLabRequestsTable","meta":{"name":"inprogressPanel","title":"In progress"}},{"name":"completed-lab-requests-table","slot":"lab-panels-slot","component":"completedLabRequestsTable","meta":{"name":"completedPanel","title":"Completed"}},{"name":"tests-ordered-tile-component","slot":"lab-tiles-slot","component":"testOrderedTile","meta":{"name":"testsOrderedTileSlot","title":"Ordered tests"}},{"name":"worklist-tile-component","slot":"lab-tiles-slot","component":"worklistTile","meta":{"name":"worklisTileSlot","title":"Worklist"}},{"name":"completed-tile-component","slot":"lab-tiles-slot","component":"completedTile","meta":{"name":"referredPanleSlot","title":"Referred tests"}},{"name":"declined-tile-component","slot":"lab-panels-slot","component":"declinedLabRequestsTable","meta":{"name":"declinedPanel","title":"Declined tests"}},{"name":"pick-lab-request-action","component":"pickupLabRequestAction","slot":"tests-ordered-actions-slot"},{"name":"reject-lab-request-tests-ordered-action","component":"rejectLabRequestAction","slot":"rejected-ordered-actions-slot"},{"name":"edit-lab-request-tests-ordered-action","component":"editLabRequestAction","slot":"completed-ordered-actions-slot"},{"name":"add-lab-request-results-action","component":"addLabRequestResultsAction","slot":"inprogress-tests-actions-slot"},{"name":"reject-lab-request-worklist-action","component":"rejectLabRequestAction","slot":"inprogress-tests-actions-slot"}],"version":"1.0.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.24.0"},"pages":[{"component":"root","route":"laboratory"}],"extensions":[{"name":"laboratory-dashboard","slot":"laboratory-dashboard-slot","component":"root"},{"name":"laboratory-dashboard-link","slot":"homepage-dashboard-slot","component":"laboratoryDashboardLink","meta":{"name":"laboratory","slot":"laboratory-dashboard-slot","title":"Laboratory"}},{"name":"pickup-lab-request-modal","component":"pickupLabRequestModal"},{"name":"reject-lab-request-modal","component":"rejectLabRequestModal"},{"name":"all-lab-requests-table","slot":"lab-panels-slot","component":"allLabRequestsTable","meta":{"name":"inprogressPanel","title":"Tests ordered"}},{"name":"inprogress-lab-requests-table","slot":"lab-panels-slot","component":"inprogressLabRequestsTable","meta":{"name":"inprogressPanel","title":"In progress"}},{"name":"completed-lab-requests-table","slot":"lab-panels-slot","component":"completedLabRequestsTable","meta":{"name":"completedPanel","title":"Completed"}},{"name":"tests-ordered-tile-component","slot":"lab-tiles-slot","component":"testOrderedTile","meta":{"name":"testsOrderedTileSlot","title":"Ordered tests"}},{"name":"worklist-tile-component","slot":"lab-tiles-slot","component":"worklistTile","meta":{"name":"worklisTileSlot","title":"Worklist"}},{"name":"completed-tile-component","slot":"lab-tiles-slot","component":"completedTile","meta":{"name":"referredPanleSlot","title":"Referred tests"}},{"name":"declined-tile-component","slot":"lab-panels-slot","component":"declinedLabRequestsTable","meta":{"name":"declinedPanel","title":"Declined tests"}},{"name":"pick-lab-request-action","component":"pickupLabRequestAction","slot":"tests-ordered-actions-slot"},{"name":"reject-lab-request-tests-ordered-action","component":"rejectLabRequestAction","slot":"rejected-ordered-actions-slot"},{"name":"edit-lab-request-tests-ordered-action","component":"editLabRequestAction","slot":"completed-ordered-actions-slot"},{"name":"add-lab-request-results-action","component":"addLabRequestResultsAction","slot":"inprogress-tests-actions-slot"},{"name":"reject-lab-request-worklist-action","component":"rejectLabRequestAction","slot":"inprogress-tests-actions-slot"}],"version":"1.0.3-pre.3"}
|
package/jest.config.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/** @type {import('jest').Config} */
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
1
5
|
module.exports = {
|
|
2
6
|
clearMocks: true,
|
|
3
7
|
transform: {
|
|
@@ -5,10 +9,14 @@ module.exports = {
|
|
|
5
9
|
},
|
|
6
10
|
transformIgnorePatterns: ['/node_modules/(?!@openmrs)'],
|
|
7
11
|
moduleNameMapper: {
|
|
12
|
+
'^dexie$': require.resolve('dexie'),
|
|
8
13
|
'@openmrs/esm-framework': '@openmrs/esm-framework/mock',
|
|
9
14
|
'\\.(s?css)$': 'identity-obj-proxy',
|
|
10
15
|
'^lodash-es/(.*)$': 'lodash/$1',
|
|
11
16
|
'^lodash-es$': 'lodash',
|
|
17
|
+
'^@tools$': path.resolve(__dirname, 'tools'),
|
|
18
|
+
'^@tools/(.*)$': path.resolve(__dirname, 'tools', '$1'),
|
|
19
|
+
'^@mocks/(.*)$': path.resolve(__dirname, '__mocks__', '$1'),
|
|
12
20
|
},
|
|
13
21
|
setupFilesAfterEnv: ['<rootDir>/src/setup-tests.ts'],
|
|
14
22
|
testEnvironment: 'jsdom',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-laboratory-app",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-pre.3",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "An O3 frontend module for managing laboratory requests and queues",
|
|
6
6
|
"browser": "dist/openmrs-esm-laboratory-app.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"*.{css,scss,ts,tsx}": "prettier --write --list-different"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@carbon/react": "^1.
|
|
47
|
+
"@carbon/react": "^1.76.0",
|
|
48
48
|
"lodash-es": "^4.17.21",
|
|
49
49
|
"react-hook-form": "^7.52.1"
|
|
50
50
|
},
|
|
@@ -102,5 +102,6 @@
|
|
|
102
102
|
"webpack": "^5.88.1",
|
|
103
103
|
"webpack-cli": "^5.1.3"
|
|
104
104
|
},
|
|
105
|
-
"packageManager": "yarn@4.6.0"
|
|
105
|
+
"packageManager": "yarn@4.6.0",
|
|
106
|
+
"stableVersion": "1.0.2"
|
|
106
107
|
}
|
|
@@ -4,6 +4,8 @@ import {
|
|
|
4
4
|
DataTableSkeleton,
|
|
5
5
|
Dropdown,
|
|
6
6
|
Layer,
|
|
7
|
+
OverflowMenu,
|
|
8
|
+
OverflowMenuItem,
|
|
7
9
|
Pagination,
|
|
8
10
|
Table,
|
|
9
11
|
TableBody,
|
|
@@ -20,15 +22,14 @@ import {
|
|
|
20
22
|
TableToolbarSearch,
|
|
21
23
|
Tile,
|
|
22
24
|
} from '@carbon/react';
|
|
23
|
-
import {
|
|
24
|
-
import { formatDate, parseDate, usePagination } from '@openmrs/esm-framework';
|
|
25
|
+
import { formatDate, parseDate, showModal, usePagination } from '@openmrs/esm-framework';
|
|
25
26
|
import { type Order } from '@openmrs/esm-patient-common-lib';
|
|
27
|
+
import { useTranslation } from 'react-i18next';
|
|
26
28
|
import { useLabOrders, useSearchGroupedResults } from '../../laboratory-resource';
|
|
27
29
|
import type { FulfillerStatus, OrdersDataTableProps } from '../../types';
|
|
28
|
-
import { OrdersDateRangePicker } from './orders-date-range-picker.component';
|
|
29
30
|
import ListOrderDetails from './list-order-details.component';
|
|
30
|
-
import TransitionLatestQueueEntryButton from '../../lab-tabs/actions/transition-patient-to-new-queue/transition-patient-to-new-queue.component';
|
|
31
31
|
import styles from './orders-data-table.scss';
|
|
32
|
+
import { OrdersDateRangePicker } from './orders-date-range-picker.component';
|
|
32
33
|
|
|
33
34
|
const OrdersDataTable: React.FC<OrdersDataTableProps> = (props) => {
|
|
34
35
|
const { t } = useTranslation();
|
|
@@ -41,17 +42,19 @@ const OrdersDataTable: React.FC<OrdersDataTableProps> = (props) => {
|
|
|
41
42
|
);
|
|
42
43
|
|
|
43
44
|
const flattenedLabOrders: Order[] = useMemo(() => {
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
return (
|
|
46
|
+
labOrders?.map((order) => {
|
|
47
|
+
return {
|
|
48
|
+
...order,
|
|
49
|
+
dateActivated: formatDate(parseDate(order.dateActivated)),
|
|
50
|
+
patientName: order.patient?.display.split('-')[1],
|
|
51
|
+
patientUuid: order.patient?.uuid,
|
|
52
|
+
patientAge: order.patient?.person?.age,
|
|
53
|
+
status: order.fulfillerStatus ?? '--',
|
|
54
|
+
orderer: order.orderer,
|
|
55
|
+
};
|
|
56
|
+
}) ?? []
|
|
57
|
+
);
|
|
55
58
|
}, [labOrders]);
|
|
56
59
|
|
|
57
60
|
function groupOrdersById(orders) {
|
|
@@ -107,19 +110,34 @@ const OrdersDataTable: React.FC<OrdersDataTableProps> = (props) => {
|
|
|
107
110
|
|
|
108
111
|
const handleOrderStatusChange = ({ selectedItem }) => setFilter(selectedItem.value);
|
|
109
112
|
|
|
113
|
+
const handlePrintModal = (orders: Array<Order>) => {
|
|
114
|
+
const completedOrders = orders.filter((order) => order.fulfillerStatus === 'COMPLETED');
|
|
115
|
+
const dispose = showModal('print-lab-results-modal', {
|
|
116
|
+
closeModal: () => dispose(),
|
|
117
|
+
orders: completedOrders,
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
110
121
|
const tableRows = useMemo(() => {
|
|
111
122
|
return paginatedLabOrders.map((order) => ({
|
|
112
123
|
id: order.patientId,
|
|
113
|
-
patientName: order.orders[0]?.patient?.display?.split('-')[1],
|
|
124
|
+
patientName: order.orders[0]?.patient?.display?.split('-')[1]?.trim() || '',
|
|
114
125
|
orders: order.orders,
|
|
115
126
|
totalOrders: order.orders?.length,
|
|
116
127
|
patientAge: order.orders[0]?.patient?.person?.age,
|
|
117
|
-
patientGender: order.orders[0]?.patient?.person?.gender,
|
|
128
|
+
patientGender: order.orders[0]?.patient?.person?.gender || '',
|
|
118
129
|
action: order.orders.some((o) => o.fulfillerStatus === 'COMPLETED') ? (
|
|
119
|
-
<
|
|
130
|
+
<div className={styles.actionCell}>
|
|
131
|
+
<OverflowMenu aria-label="Actions" iconDescription="Actions" flipped>
|
|
132
|
+
<OverflowMenuItem
|
|
133
|
+
itemText={t('printTestResults', 'Print test results')}
|
|
134
|
+
onClick={() => handlePrintModal(order?.orders)}
|
|
135
|
+
/>
|
|
136
|
+
</OverflowMenu>
|
|
137
|
+
</div>
|
|
120
138
|
) : null,
|
|
121
139
|
}));
|
|
122
|
-
}, [paginatedLabOrders]);
|
|
140
|
+
}, [paginatedLabOrders, t]);
|
|
123
141
|
|
|
124
142
|
if (isLoading) {
|
|
125
143
|
return <DataTableSkeleton className={styles.loader} role="progressbar" showHeader={false} showToolbar={false} />;
|
|
@@ -192,7 +210,7 @@ const OrdersDataTable: React.FC<OrdersDataTableProps> = (props) => {
|
|
|
192
210
|
<div className={styles.tileContainer}>
|
|
193
211
|
<Tile className={styles.tile}>
|
|
194
212
|
<div className={styles.tileContent}>
|
|
195
|
-
<p className={styles.content}>{t('
|
|
213
|
+
<p className={styles.content}>{t('noLabRequestsFound', 'No lab requests found')}</p>
|
|
196
214
|
<p className={styles.emptyStateHelperText}>
|
|
197
215
|
{t('checkFilters', 'Please check the filters above and try again')}
|
|
198
216
|
</p>
|
package/src/declarations.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { type Order } from '@openmrs/esm-patient-common-lib';
|
|
|
6
6
|
import { restBaseUrl, showNotification, showSnackbar, useAbortController, useConfig } from '@openmrs/esm-framework';
|
|
7
7
|
import { type Config } from '../../config-schema';
|
|
8
8
|
import { setFulfillerStatus } from '../../laboratory-resource';
|
|
9
|
-
import styles from './pickup-lab-request-modal.scss';
|
|
10
9
|
|
|
11
10
|
interface PickupLabRequestModal {
|
|
12
11
|
closeModal: () => void;
|
|
@@ -52,11 +51,7 @@ const PickupLabRequestModal: React.FC<PickupLabRequestModal> = ({ order, closeMo
|
|
|
52
51
|
|
|
53
52
|
return (
|
|
54
53
|
<div>
|
|
55
|
-
<ModalHeader
|
|
56
|
-
closeModal={closeModal}
|
|
57
|
-
title={t('pickRequest', 'Pick lab request')}
|
|
58
|
-
className={styles.modalHeader}
|
|
59
|
-
/>
|
|
54
|
+
<ModalHeader closeModal={closeModal} title={t('pickRequest', 'Pick lab request')} />
|
|
60
55
|
<ModalBody>
|
|
61
56
|
<p>
|
|
62
57
|
{t(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Button, Form, ModalBody, ModalFooter, ModalHeader, TextArea, Layer } from '@carbon/react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { mutate } from 'swr';
|
|
4
5
|
import { type Order } from '@openmrs/esm-patient-common-lib';
|
|
5
6
|
import {
|
|
6
7
|
type Config,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
} from '@openmrs/esm-framework';
|
|
13
14
|
import { rejectLabOrder } from '../../laboratory-resource';
|
|
14
15
|
import styles from './reject-lab-request-modal.scss';
|
|
15
|
-
|
|
16
|
+
|
|
16
17
|
interface RejectLabRequestModalProps {
|
|
17
18
|
order: Order;
|
|
18
19
|
closeModal: () => void;
|
|
@@ -66,7 +67,6 @@ const RejectLabRequestModal: React.FC<RejectLabRequestModalProps> = ({ order, cl
|
|
|
66
67
|
<ModalHeader
|
|
67
68
|
closeModal={closeModal}
|
|
68
69
|
title={`${t('rejectLabRequest', 'Reject lab request')} [${order.orderNumber}]`}
|
|
69
|
-
className={styles.modalHeader}
|
|
70
70
|
/>
|
|
71
71
|
<ModalBody>
|
|
72
72
|
<div className={styles.modalBody}>
|
|
@@ -11,31 +11,3 @@ section {
|
|
|
11
11
|
.modalBody {
|
|
12
12
|
padding-bottom: layout.$spacing-05;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
.modalHeader {
|
|
16
|
-
:global {
|
|
17
|
-
.cds--modal-close-button {
|
|
18
|
-
position: absolute;
|
|
19
|
-
inset-block-start: 0;
|
|
20
|
-
inset-inline-end: 0;
|
|
21
|
-
margin: 0;
|
|
22
|
-
margin-top: calc(-1 * #{layout.$spacing-05});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.cds--modal-close {
|
|
26
|
-
background-color: rgba(0, 0, 0, 0);
|
|
27
|
-
|
|
28
|
-
&:hover {
|
|
29
|
-
background-color: var(--cds-layer-hover);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.cds--popover--left > .cds--popover > .cds--popover-content {
|
|
34
|
-
transform: translate(-4rem, 0.85rem);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.cds--popover--left > .cds--popover > .cds--popover-caret {
|
|
38
|
-
transform: translate(-3.75rem, 1.25rem);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
package/src/setup-tests.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/tools/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { mockPatient } from './test-utils';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const mockPatient = {
|
|
2
|
+
resourceType: 'Patient',
|
|
3
|
+
id: '8673ee4f-e2ab-4077-ba55-4980f408773e',
|
|
4
|
+
extension: [
|
|
5
|
+
{
|
|
6
|
+
url: 'http://fhir-es.transcendinsights.com/stu3/StructureDefinition/resource-date-created',
|
|
7
|
+
valueDateTime: '2017-01-18T09:42:40+00:00',
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
url: 'https://purl.org/elab/fhir/StructureDefinition/Creator-crew-version1',
|
|
11
|
+
valueString: 'daemon',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
identifier: [
|
|
15
|
+
{
|
|
16
|
+
id: '1f0ad7a1-430f-4397-b571-59ea654a52db',
|
|
17
|
+
use: 'secondary',
|
|
18
|
+
system: 'Old Identification Number',
|
|
19
|
+
value: '100732HE',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: '1f0ad7a1-430f-4397-b571-59ea654a52db',
|
|
23
|
+
use: 'usual',
|
|
24
|
+
system: 'OpenMRS ID',
|
|
25
|
+
value: '100GEJ',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
active: true,
|
|
29
|
+
name: [
|
|
30
|
+
{
|
|
31
|
+
id: 'efdb246f-4142-4c12-a27a-9be60b9592e9',
|
|
32
|
+
use: 'usual',
|
|
33
|
+
family: 'Wilson',
|
|
34
|
+
given: ['John'],
|
|
35
|
+
text: 'Wilson, John',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
gender: 'male',
|
|
39
|
+
birthDate: '1972-04-04',
|
|
40
|
+
deceasedBoolean: false,
|
|
41
|
+
address: [],
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { mockPatient };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
|
|
3
|
+
try {
|
|
4
|
+
// NB for other places use '@openmrs/*@next'; here we want to ignore patient-common-lib
|
|
5
|
+
execSync(`yarn up --fixed '@openmrs/esm-framework@next' '@openmrs/esm-form-engine-lib@next' 'openmrs@next'`, {
|
|
6
|
+
stdio: ['ignore', 'inherit', 'inherit'],
|
|
7
|
+
windowsHide: true,
|
|
8
|
+
});
|
|
9
|
+
} catch (error) {
|
|
10
|
+
console.error(`Error while updating dependencies: ${error.message ?? error}`);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
execSync(`yarn dedupe`, {
|
|
16
|
+
stdio: ['ignore', 'inherit', 'inherit'],
|
|
17
|
+
windowsHide: true,
|
|
18
|
+
});
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error(`Error while deduplicating dependencies: ${error.message ?? error}`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
execSync(`git diff-index --quiet HEAD --`, {
|
|
26
|
+
stdio: 'ignore',
|
|
27
|
+
windowsHide: true,
|
|
28
|
+
});
|
|
29
|
+
process.exit(0);
|
|
30
|
+
} catch (error) {
|
|
31
|
+
// git diff-index --quite HEAD --
|
|
32
|
+
// exits with status 1 if there are changes; we only need to run yarn verify if there are changes
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
execSync(`yarn verify`, {
|
|
37
|
+
stdio: ['ignore', 'inherit', 'inherit'],
|
|
38
|
+
windowsHide: true,
|
|
39
|
+
});
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error(`Error while running yarn verify: ${error.message ?? error}. Updates require manual intervention.`);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
package/translations/am.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"newStatus": "NEW",
|
|
28
28
|
"nextPage": "Next page",
|
|
29
29
|
"NoInstructionLeft": "No instructions are provided.",
|
|
30
|
-
"
|
|
30
|
+
"noLabRequestsFound": "No lab requests found",
|
|
31
31
|
"onHoldStatus": "ON_HOLD",
|
|
32
32
|
"orderDate": "Order Date:",
|
|
33
33
|
"Ordered tests": "Ordered tests",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"pickRequestConfirmationText": "Continuing will update the request status to \"In Progress\" and advance it to the next stage. Are you sure you want to proceed?",
|
|
46
46
|
"pickupLabRequest": "Pick up lab request",
|
|
47
47
|
"previousPage": "Previous page",
|
|
48
|
+
"printTestResults": "Print results",
|
|
48
49
|
"reasonForDecline": "Reason for decline",
|
|
49
50
|
"receivedStatus": "RECEIVED",
|
|
50
51
|
"Referred tests": "Referred tests",
|
|
@@ -60,7 +61,6 @@
|
|
|
60
61
|
"testsOrdered": "Tests ordered",
|
|
61
62
|
"testType": "Test type",
|
|
62
63
|
"totalOrders": "Total orders",
|
|
63
|
-
"transition": "Transition",
|
|
64
64
|
"urgencyStatus": "Urgency: ",
|
|
65
65
|
"viewTestResults": "View test results",
|
|
66
66
|
"worklist": "Worklist",
|
package/translations/ar.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"newStatus": "NEW",
|
|
28
28
|
"nextPage": "الصفحة التالية",
|
|
29
29
|
"NoInstructionLeft": "No instructions are provided.",
|
|
30
|
-
"
|
|
30
|
+
"noLabRequestsFound": "No lab requests found",
|
|
31
31
|
"onHoldStatus": "ON_HOLD",
|
|
32
32
|
"orderDate": "Order Date:",
|
|
33
33
|
"Ordered tests": "Ordered tests",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"pickRequestConfirmationText": "Continuing will update the request status to \"In Progress\" and advance it to the next stage. Are you sure you want to proceed?",
|
|
46
46
|
"pickupLabRequest": "Pick up lab request",
|
|
47
47
|
"previousPage": "الصفحة السابقة",
|
|
48
|
+
"printTestResults": "Print results",
|
|
48
49
|
"reasonForDecline": "Reason for decline",
|
|
49
50
|
"receivedStatus": "RECEIVED",
|
|
50
51
|
"Referred tests": "Referred tests",
|
|
@@ -60,7 +61,6 @@
|
|
|
60
61
|
"testsOrdered": "Tests ordered",
|
|
61
62
|
"testType": "Test type",
|
|
62
63
|
"totalOrders": "Total orders",
|
|
63
|
-
"transition": "Transition",
|
|
64
64
|
"urgencyStatus": "Urgency: ",
|
|
65
65
|
"viewTestResults": "View test results",
|
|
66
66
|
"worklist": "Worklist",
|
package/translations/bn.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"newStatus": "নতুন",
|
|
28
28
|
"nextPage": "পরবর্তী পৃষ্ঠা",
|
|
29
29
|
"NoInstructionLeft": "No instructions are provided.",
|
|
30
|
-
"
|
|
30
|
+
"noLabRequestsFound": "No lab requests found",
|
|
31
31
|
"onHoldStatus": "ON_HOLD",
|
|
32
32
|
"orderDate": "Order Date:",
|
|
33
33
|
"Ordered tests": "Ordered tests",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"pickRequestConfirmationText": "Continuing will update the request status to \"In Progress\" and advance it to the next stage. Are you sure you want to proceed?",
|
|
46
46
|
"pickupLabRequest": "Pick up lab request",
|
|
47
47
|
"previousPage": "পূর্ববর্তী পৃষ্ঠা",
|
|
48
|
+
"printTestResults": "Print results",
|
|
48
49
|
"reasonForDecline": "Reason for decline",
|
|
49
50
|
"receivedStatus": "RECEIVED",
|
|
50
51
|
"Referred tests": "Referred tests",
|
|
@@ -60,7 +61,6 @@
|
|
|
60
61
|
"testsOrdered": "Tests ordered",
|
|
61
62
|
"testType": "Test type",
|
|
62
63
|
"totalOrders": "Total orders",
|
|
63
|
-
"transition": "Transition",
|
|
64
64
|
"urgencyStatus": "Urgency: ",
|
|
65
65
|
"viewTestResults": "View test results",
|
|
66
66
|
"worklist": "Worklist",
|
package/translations/de.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"newStatus": "NEW",
|
|
28
28
|
"nextPage": "Next page",
|
|
29
29
|
"NoInstructionLeft": "No instructions are provided.",
|
|
30
|
-
"
|
|
30
|
+
"noLabRequestsFound": "No lab requests found",
|
|
31
31
|
"onHoldStatus": "ON_HOLD",
|
|
32
32
|
"orderDate": "Order Date:",
|
|
33
33
|
"Ordered tests": "Ordered tests",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"pickRequestConfirmationText": "Continuing will update the request status to \"In Progress\" and advance it to the next stage. Are you sure you want to proceed?",
|
|
46
46
|
"pickupLabRequest": "Pick up lab request",
|
|
47
47
|
"previousPage": "Previous page",
|
|
48
|
+
"printTestResults": "Print results",
|
|
48
49
|
"reasonForDecline": "Reason for decline",
|
|
49
50
|
"receivedStatus": "RECEIVED",
|
|
50
51
|
"Referred tests": "Referred tests",
|
|
@@ -60,7 +61,6 @@
|
|
|
60
61
|
"testsOrdered": "Tests ordered",
|
|
61
62
|
"testType": "Test type",
|
|
62
63
|
"totalOrders": "Total orders",
|
|
63
|
-
"transition": "Transition",
|
|
64
64
|
"urgencyStatus": "Urgency: ",
|
|
65
65
|
"viewTestResults": "View test results",
|
|
66
66
|
"worklist": "Worklist",
|
package/translations/en.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"newStatus": "NEW",
|
|
28
28
|
"nextPage": "Next page",
|
|
29
29
|
"NoInstructionLeft": "No instructions are provided.",
|
|
30
|
-
"
|
|
30
|
+
"noLabRequestsFound": "No lab requests found",
|
|
31
31
|
"onHoldStatus": "ON_HOLD",
|
|
32
32
|
"orderDate": "Order Date:",
|
|
33
33
|
"Ordered tests": "Ordered tests",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"pickRequestConfirmationText": "Continuing will update the request status to \"In Progress\" and advance it to the next stage. Are you sure you want to proceed?",
|
|
46
46
|
"pickupLabRequest": "Pick up lab request",
|
|
47
47
|
"previousPage": "Previous page",
|
|
48
|
+
"printTestResults": "Print results",
|
|
48
49
|
"reasonForDecline": "Reason for decline",
|
|
49
50
|
"receivedStatus": "RECEIVED",
|
|
50
51
|
"Referred tests": "Referred tests",
|
|
@@ -60,7 +61,6 @@
|
|
|
60
61
|
"testsOrdered": "Tests ordered",
|
|
61
62
|
"testType": "Test type",
|
|
62
63
|
"totalOrders": "Total orders",
|
|
63
|
-
"transition": "Transition",
|
|
64
64
|
"urgencyStatus": "Urgency: ",
|
|
65
65
|
"viewTestResults": "View test results",
|
|
66
66
|
"worklist": "Worklist",
|
package/translations/es.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"action": "
|
|
3
|
-
"addLabResult": "
|
|
2
|
+
"action": "Acción",
|
|
3
|
+
"addLabResult": "Agregar resultados de laboratorio",
|
|
4
4
|
"age": "Edad",
|
|
5
5
|
"all": "Todo",
|
|
6
6
|
"cancel": "Cancelar",
|
|
7
7
|
"checkFilters": "Por favor, revise los filtros arriba y vuelva a intentarlo",
|
|
8
8
|
"completed": "Completado",
|
|
9
|
-
"Completed": "
|
|
9
|
+
"Completed": "Completado",
|
|
10
10
|
"completedStatus": "COMPLETADO",
|
|
11
|
-
"dateRange": "
|
|
11
|
+
"dateRange": "Rango de fechas",
|
|
12
12
|
"declinedStatus": "DECLINADO",
|
|
13
13
|
"discard": "Descartar",
|
|
14
14
|
"editResults": "Editar resultados",
|
|
@@ -17,37 +17,38 @@
|
|
|
17
17
|
"exceptionStatus": "EXCEPCIÓN",
|
|
18
18
|
"filterOrdersByStatus": "Filtrar órdenes por estado",
|
|
19
19
|
"fulfillerComment": "Comentario del encargado de la ejecución",
|
|
20
|
-
"gender": "
|
|
21
|
-
"In progress": "
|
|
20
|
+
"gender": "Género",
|
|
21
|
+
"In progress": "En progreso",
|
|
22
22
|
"inProgress": "En progreso",
|
|
23
23
|
"inProgressStatus": "EN_PROGRESO",
|
|
24
24
|
"laboratory": "Laboratorio",
|
|
25
|
-
"Laboratory": "
|
|
25
|
+
"Laboratory": "Laboratorio",
|
|
26
26
|
"loading": "Cargando",
|
|
27
27
|
"newStatus": "NUEVO",
|
|
28
28
|
"nextPage": "Siguiente página",
|
|
29
|
-
"NoInstructionLeft": "No
|
|
30
|
-
"
|
|
29
|
+
"NoInstructionLeft": "No se han proporcionado instrucciones.",
|
|
30
|
+
"noLabRequestsFound": "No lab requests found",
|
|
31
31
|
"onHoldStatus": "EN_ESPERA",
|
|
32
|
-
"orderDate": "
|
|
33
|
-
"Ordered tests": "
|
|
34
|
-
"ordererName": "
|
|
35
|
-
"orderInStruction": "
|
|
36
|
-
"orderNotPicked": "
|
|
37
|
-
"orderNumbers": "
|
|
38
|
-
"orderPickedSuccessfully": "
|
|
32
|
+
"orderDate": "Fecha de Orden:",
|
|
33
|
+
"Ordered tests": "Pruebas ordenadas",
|
|
34
|
+
"ordererName": "Nombre del Solicitante:",
|
|
35
|
+
"orderInStruction": "Instrucciones:",
|
|
36
|
+
"orderNotPicked": "Orden no seleccionada",
|
|
37
|
+
"orderNumbers": "Número de orden:",
|
|
38
|
+
"orderPickedSuccessfully": "Ha seleccionado una orden exitosamente",
|
|
39
39
|
"orders": "Órdenes",
|
|
40
|
-
"orderStatus": "
|
|
40
|
+
"orderStatus": "Estado:",
|
|
41
41
|
"patient": "Paciente",
|
|
42
|
-
"pickedAnOrder": "
|
|
42
|
+
"pickedAnOrder": "Seleccionó una orden",
|
|
43
43
|
"pickLabRequest": "Seleccione una Solicitud de Laboratorio",
|
|
44
44
|
"pickRequest": "Seleccione una solicitud de laboratorio",
|
|
45
45
|
"pickRequestConfirmationText": "Continuar actualizará el estado de la solicitud a 'En Progreso' y la avanzará al siguiente paso. ¿Está seguro de que desea continuar?",
|
|
46
|
-
"pickupLabRequest": "Recoger
|
|
46
|
+
"pickupLabRequest": "Recoger solicitud de laboratorio",
|
|
47
47
|
"previousPage": "Página anterior",
|
|
48
|
-
"
|
|
48
|
+
"printTestResults": "Print results",
|
|
49
|
+
"reasonForDecline": "Motivo del rechazo",
|
|
49
50
|
"receivedStatus": "RECIBIDO",
|
|
50
|
-
"Referred tests": "
|
|
51
|
+
"Referred tests": "Pruebas referidas",
|
|
51
52
|
"reject": "Rechazar",
|
|
52
53
|
"rejectLabRequest": "Rechazar solicitud de laboratorio",
|
|
53
54
|
"rejectLabRequestSuccessMessage": "",
|
|
@@ -55,14 +56,13 @@
|
|
|
55
56
|
"results": "Resultados",
|
|
56
57
|
"searchThisList": "Buscar en esta lista",
|
|
57
58
|
"tabletOverlay": "Vista para tablet",
|
|
58
|
-
"testOrdered": "
|
|
59
|
-
"Tests ordered": "
|
|
59
|
+
"testOrdered": "Prueba ordenada:",
|
|
60
|
+
"Tests ordered": "Pruebas ordenadas",
|
|
60
61
|
"testsOrdered": "Pruebas ordenadas",
|
|
61
62
|
"testType": "Tipo de prueba",
|
|
62
63
|
"totalOrders": "Total de órdenes",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"viewTestResults": "View test results",
|
|
64
|
+
"urgencyStatus": "Urgencia:",
|
|
65
|
+
"viewTestResults": "Ver resultados de la prueba",
|
|
66
66
|
"worklist": "Lista de trabajo",
|
|
67
|
-
"Worklist": "
|
|
67
|
+
"Worklist": "Lista de trabajo"
|
|
68
68
|
}
|
package/translations/fr.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"newStatus": "NOUVEAU",
|
|
28
28
|
"nextPage": "Page suivante",
|
|
29
29
|
"NoInstructionLeft": "Aucune instruction n’est fournie.",
|
|
30
|
-
"
|
|
30
|
+
"noLabRequestsFound": "No lab requests found",
|
|
31
31
|
"onHoldStatus": "EN_ATTENTE",
|
|
32
32
|
"orderDate": "Date de l'ordre :",
|
|
33
33
|
"Ordered tests": "Examens prescrits",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"pickRequestConfirmationText": "La poursuite mettra à jour le statut de la demande en « En cours » et la fera avancer à l'étape suivante. Êtes-vous sûr de vouloir poursuivre?",
|
|
46
46
|
"pickupLabRequest": "Sélectionner la demande de laboratoire",
|
|
47
47
|
"previousPage": "Page précédente",
|
|
48
|
+
"printTestResults": "Print results",
|
|
48
49
|
"reasonForDecline": "Raison du refus",
|
|
49
50
|
"receivedStatus": "REÇU",
|
|
50
51
|
"Referred tests": "Examens externalisées",
|
|
@@ -60,7 +61,6 @@
|
|
|
60
61
|
"testsOrdered": "Examens prescrits",
|
|
61
62
|
"testType": "Analyse",
|
|
62
63
|
"totalOrders": "Total des demandes d'examens",
|
|
63
|
-
"transition": "Transition",
|
|
64
64
|
"urgencyStatus": "Urgence :",
|
|
65
65
|
"viewTestResults": "Afficher les résultats d'examens",
|
|
66
66
|
"worklist": "liste des tâches",
|
package/translations/he.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"newStatus": "חדש",
|
|
28
28
|
"nextPage": "העמוד הבא",
|
|
29
29
|
"NoInstructionLeft": "לא סופקו הנחיות.",
|
|
30
|
-
"
|
|
30
|
+
"noLabRequestsFound": "No lab requests found",
|
|
31
31
|
"onHoldStatus": "בהמתנה",
|
|
32
32
|
"orderDate": "תאריך ההזמנה:",
|
|
33
33
|
"Ordered tests": "Ordered tests",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"pickRequestConfirmationText": "בחירה להמשיך תעדכן את מצב הבקשה ל„בתהליך” ותקדם אותה לשלב הבא. להמשיך?",
|
|
46
46
|
"pickupLabRequest": "איסוף בקשת מעבדה",
|
|
47
47
|
"previousPage": "העמוד הקודם",
|
|
48
|
+
"printTestResults": "Print results",
|
|
48
49
|
"reasonForDecline": "Reason for decline",
|
|
49
50
|
"receivedStatus": "התקבל",
|
|
50
51
|
"Referred tests": "Referred tests",
|
|
@@ -60,7 +61,6 @@
|
|
|
60
61
|
"testsOrdered": "בדיקות שהוזמנו",
|
|
61
62
|
"testType": "סוג בדיקה",
|
|
62
63
|
"totalOrders": "סך כל ההזמנות",
|
|
63
|
-
"transition": "Transition",
|
|
64
64
|
"urgencyStatus": "Urgency: ",
|
|
65
65
|
"viewTestResults": "הצגת תוצאות הבדיקה",
|
|
66
66
|
"worklist": "רשימת משימות",
|