@openmrs/esm-laboratory-app 1.0.1-pre.106
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/3d4697b8.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 +242 -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 +277 -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 +277 -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 +310 -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,50 @@
|
|
|
1
|
+
import useSWR from "swr";
|
|
2
|
+
import useSWRImmutable from "swr/immutable";
|
|
3
|
+
import { FetchResponse, openmrsFetch } from "@openmrs/esm-framework";
|
|
4
|
+
import { Result } from "../work-list/work-list.resource";
|
|
5
|
+
|
|
6
|
+
export function useMetrics() {
|
|
7
|
+
const metrics = {
|
|
8
|
+
orders: 15,
|
|
9
|
+
in_progress: 4,
|
|
10
|
+
transferred: 1,
|
|
11
|
+
completed: 6,
|
|
12
|
+
};
|
|
13
|
+
const { data, error } = useSWR<{ data: { results: {} } }, Error>(
|
|
14
|
+
`/ws/rest/v1/queue?`,
|
|
15
|
+
openmrsFetch
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
metrics: metrics,
|
|
20
|
+
isError: error,
|
|
21
|
+
isLoading: !data && !error,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function useServices() {
|
|
26
|
+
const serviceConceptSetUuid = "330c0ec6-0ac7-4b86-9c70-29d76f0ae20a";
|
|
27
|
+
const apiUrl = `/ws/rest/v1/concept/${serviceConceptSetUuid}`;
|
|
28
|
+
const { data } = useSWRImmutable<FetchResponse>(apiUrl, openmrsFetch);
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
services: data
|
|
32
|
+
? data?.data?.setMembers?.map((setMember) => setMember?.display)
|
|
33
|
+
: [],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// worklist
|
|
38
|
+
export function useLabTestsStats(fulfillerStatus: string) {
|
|
39
|
+
const apiUrl = `/ws/rest/v1/order?orderTypes=52a447d3-a64a-11e3-9aeb-50e549534c5e&isStopped=false&fulfillerStatus=${fulfillerStatus}&v=full
|
|
40
|
+
`;
|
|
41
|
+
const { data, error, isLoading } = useSWR<
|
|
42
|
+
{ data: { results: Array<Result> } },
|
|
43
|
+
Error
|
|
44
|
+
>(apiUrl, openmrsFetch);
|
|
45
|
+
return {
|
|
46
|
+
count: data?.data ? data.data.results.length : 0,
|
|
47
|
+
isLoading,
|
|
48
|
+
isError: error,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { Tile, Button } from "@carbon/react";
|
|
4
|
+
import { ArrowRight } from "@carbon/react/icons";
|
|
5
|
+
import styles from "./summary-tile.scss";
|
|
6
|
+
|
|
7
|
+
interface SummaryTileProps {
|
|
8
|
+
label: string;
|
|
9
|
+
value: number;
|
|
10
|
+
headerLabel: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const SummaryTile: React.FC<SummaryTileProps> = ({
|
|
15
|
+
label,
|
|
16
|
+
value,
|
|
17
|
+
headerLabel,
|
|
18
|
+
children,
|
|
19
|
+
}) => {
|
|
20
|
+
const { t } = useTranslation();
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Tile className={styles.tileContainer} light={true}>
|
|
24
|
+
<div className={styles.tileHeader}>
|
|
25
|
+
<div className={styles.headerLabelContainer}>
|
|
26
|
+
<label className={styles.headerLabel}>{headerLabel}</label>
|
|
27
|
+
{children}
|
|
28
|
+
</div>
|
|
29
|
+
<div></div>
|
|
30
|
+
<Button
|
|
31
|
+
kind="ghost"
|
|
32
|
+
renderIcon={(props) => (
|
|
33
|
+
<ArrowRight size={16} className={styles.arrowIcon} />
|
|
34
|
+
)}
|
|
35
|
+
iconDescription={t("view", "View ")}
|
|
36
|
+
>
|
|
37
|
+
{t("view", "View ")}
|
|
38
|
+
</Button>
|
|
39
|
+
</div>
|
|
40
|
+
<div>
|
|
41
|
+
<label className={styles.totalsLabel}>{label}</label>
|
|
42
|
+
<p className={styles.totalsValue}>{value}</p>
|
|
43
|
+
</div>
|
|
44
|
+
</Tile>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default SummaryTile;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
3
|
+
@import "~@openmrs/esm-styleguide/src/vars";
|
|
4
|
+
|
|
5
|
+
.tileContainer {
|
|
6
|
+
border: 0.0625rem solid $ui-03;
|
|
7
|
+
flex-grow: 1;
|
|
8
|
+
height: 7.875rem;
|
|
9
|
+
padding: 0 spacing.$spacing-05;
|
|
10
|
+
margin: spacing.$spacing-03 spacing.$spacing-03;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tileHeader {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
margin-bottom: spacing.$spacing-03;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.headerLabel {
|
|
21
|
+
@include type.type-style("heading-01");
|
|
22
|
+
color: $text-02;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.totalsLabel {
|
|
26
|
+
@include type.type-style("label-01");
|
|
27
|
+
color: $text-02;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.totalsValue {
|
|
31
|
+
@include type.type-style("heading-04");
|
|
32
|
+
color: $ui-05;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.headerLabelContainer {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
height: spacing.$spacing-07;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.arrowIcon {
|
|
42
|
+
fill: var(--cds-link-primary, #0f62fe) !important;
|
|
43
|
+
}
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import { OpenmrsResource } from "@openmrs/esm-framework";
|
|
2
|
+
|
|
3
|
+
export enum SearchTypes {
|
|
4
|
+
BASIC = "basic",
|
|
5
|
+
ADVANCED = "advanced",
|
|
6
|
+
SEARCH_RESULTS = "search_results",
|
|
7
|
+
SCHEDULED_VISITS = "scheduled-visits",
|
|
8
|
+
VISIT_FORM = "visit_form",
|
|
9
|
+
QUEUE_SERVICE_FORM = "queue_service_form",
|
|
10
|
+
QUEUE_ROOM_FORM = "queue_room_form",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface Patient {
|
|
14
|
+
uuid: string;
|
|
15
|
+
display: string;
|
|
16
|
+
identifiers: Array<any>;
|
|
17
|
+
person: Person;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface Attribute {
|
|
21
|
+
attributeType: OpenmrsResource;
|
|
22
|
+
display: string;
|
|
23
|
+
uuid: string;
|
|
24
|
+
value: string | number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Person {
|
|
28
|
+
age: number;
|
|
29
|
+
attributes: Array<Attribute>;
|
|
30
|
+
birthDate: string;
|
|
31
|
+
gender: string;
|
|
32
|
+
display: string;
|
|
33
|
+
preferredAddress: OpenmrsResource;
|
|
34
|
+
uuid: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ServiceTypes {
|
|
38
|
+
duration: number;
|
|
39
|
+
name: string;
|
|
40
|
+
uuid: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface AppointmentService {
|
|
44
|
+
appointmentServiceId: number;
|
|
45
|
+
color: string;
|
|
46
|
+
creatorName: string;
|
|
47
|
+
description: string;
|
|
48
|
+
durationMins: string;
|
|
49
|
+
endTime: string;
|
|
50
|
+
initialAppointmentStatus: string;
|
|
51
|
+
location: OpenmrsResource;
|
|
52
|
+
maxAppointmentsLimit: number | null;
|
|
53
|
+
name: string;
|
|
54
|
+
speciality: OpenmrsResource;
|
|
55
|
+
startTime: string;
|
|
56
|
+
uuid: string;
|
|
57
|
+
serviceTypes: Array<ServiceTypes>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface Note {
|
|
61
|
+
concept: OpenmrsResource;
|
|
62
|
+
note: string;
|
|
63
|
+
provider: {
|
|
64
|
+
name: string;
|
|
65
|
+
role: string;
|
|
66
|
+
};
|
|
67
|
+
time: string;
|
|
68
|
+
}
|
|
69
|
+
export interface Order {
|
|
70
|
+
uuid: string;
|
|
71
|
+
dateActivated: string;
|
|
72
|
+
dateStopped?: Date | null;
|
|
73
|
+
dose: number;
|
|
74
|
+
dosingInstructions: string | null;
|
|
75
|
+
dosingType?:
|
|
76
|
+
| "org.openmrs.FreeTextDosingInstructions"
|
|
77
|
+
| "org.openmrs.SimpleDosingInstructions";
|
|
78
|
+
doseUnits: {
|
|
79
|
+
uuid: string;
|
|
80
|
+
display: string;
|
|
81
|
+
};
|
|
82
|
+
drug: {
|
|
83
|
+
uuid: string;
|
|
84
|
+
name: string;
|
|
85
|
+
strength: string;
|
|
86
|
+
};
|
|
87
|
+
duration: number;
|
|
88
|
+
durationUnits: {
|
|
89
|
+
uuid: string;
|
|
90
|
+
display: string;
|
|
91
|
+
};
|
|
92
|
+
frequency: {
|
|
93
|
+
uuid: string;
|
|
94
|
+
display: string;
|
|
95
|
+
};
|
|
96
|
+
numRefills: number;
|
|
97
|
+
orderNumber: string;
|
|
98
|
+
orderReason: string | null;
|
|
99
|
+
orderReasonNonCoded: string | null;
|
|
100
|
+
orderer: {
|
|
101
|
+
uuid: string;
|
|
102
|
+
person: {
|
|
103
|
+
uuid: string;
|
|
104
|
+
display: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
orderType: {
|
|
108
|
+
uuid: string;
|
|
109
|
+
display: string;
|
|
110
|
+
};
|
|
111
|
+
route: {
|
|
112
|
+
uuid: string;
|
|
113
|
+
display: string;
|
|
114
|
+
};
|
|
115
|
+
quantity: number;
|
|
116
|
+
quantityUnits: OpenmrsResource;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface OrderItem {
|
|
120
|
+
order: Order;
|
|
121
|
+
provider: {
|
|
122
|
+
name: string;
|
|
123
|
+
role: string;
|
|
124
|
+
};
|
|
125
|
+
time: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface DiagnosisItem {
|
|
129
|
+
diagnosis: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface Encounter {
|
|
133
|
+
uuid: string;
|
|
134
|
+
encounterDatetime: string;
|
|
135
|
+
encounterProviders: Array<{
|
|
136
|
+
uuid: string;
|
|
137
|
+
display: string;
|
|
138
|
+
encounterRole: {
|
|
139
|
+
uuid: string;
|
|
140
|
+
display: string;
|
|
141
|
+
};
|
|
142
|
+
provider: {
|
|
143
|
+
uuid: string;
|
|
144
|
+
person: {
|
|
145
|
+
uuid: string;
|
|
146
|
+
display: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
}>;
|
|
150
|
+
encounterType: {
|
|
151
|
+
uuid: string;
|
|
152
|
+
display: string;
|
|
153
|
+
};
|
|
154
|
+
obs: Array<Observation>;
|
|
155
|
+
form: OpenmrsResource;
|
|
156
|
+
patient: OpenmrsResource;
|
|
157
|
+
orders: Array<Order>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface Observation {
|
|
161
|
+
uuid: string;
|
|
162
|
+
concept: {
|
|
163
|
+
uuid: string;
|
|
164
|
+
display: string;
|
|
165
|
+
conceptClass: {
|
|
166
|
+
uuid: string;
|
|
167
|
+
display: string;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
display: string;
|
|
171
|
+
groupMembers: null | Array<{
|
|
172
|
+
uuid: string;
|
|
173
|
+
concept: {
|
|
174
|
+
uuid: string;
|
|
175
|
+
display: string;
|
|
176
|
+
};
|
|
177
|
+
value: {
|
|
178
|
+
uuid: string;
|
|
179
|
+
display: string;
|
|
180
|
+
};
|
|
181
|
+
}>;
|
|
182
|
+
value: any;
|
|
183
|
+
obsDatetime: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface PatientVitals {
|
|
187
|
+
systolic?: number;
|
|
188
|
+
diastolic?: number;
|
|
189
|
+
pulse?: number;
|
|
190
|
+
temperature?: number;
|
|
191
|
+
oxygenSaturation?: number;
|
|
192
|
+
height?: number;
|
|
193
|
+
weight?: number;
|
|
194
|
+
bmi?: number | null;
|
|
195
|
+
respiratoryRate?: number;
|
|
196
|
+
muac?: number;
|
|
197
|
+
provider?: {
|
|
198
|
+
name: string;
|
|
199
|
+
role: string;
|
|
200
|
+
};
|
|
201
|
+
time?: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface MappedEncounter {
|
|
205
|
+
id: string;
|
|
206
|
+
datetime: string;
|
|
207
|
+
encounterType: string;
|
|
208
|
+
form: OpenmrsResource;
|
|
209
|
+
obs: Array<Observation>;
|
|
210
|
+
provider: string;
|
|
211
|
+
visitUuid?: string;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface FormattedEncounter {
|
|
215
|
+
id: string;
|
|
216
|
+
datetime: string;
|
|
217
|
+
encounterType: string;
|
|
218
|
+
form: OpenmrsResource;
|
|
219
|
+
obs: Array<Observation>;
|
|
220
|
+
provider: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface ObsMetaInfo {
|
|
224
|
+
[_: string]: any;
|
|
225
|
+
assessValue?: (value: number) => OBSERVATION_INTERPRETATION;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export type OBSERVATION_INTERPRETATION =
|
|
229
|
+
| "NORMAL"
|
|
230
|
+
| "HIGH"
|
|
231
|
+
| "CRITICALLY_HIGH"
|
|
232
|
+
| "OFF_SCALE_HIGH"
|
|
233
|
+
| "LOW"
|
|
234
|
+
| "CRITICALLY_LOW"
|
|
235
|
+
| "OFF_SCALE_LOW"
|
|
236
|
+
| "--";
|
|
237
|
+
export interface PatientProgram {
|
|
238
|
+
uuid: string;
|
|
239
|
+
display: string;
|
|
240
|
+
patient: OpenmrsResource;
|
|
241
|
+
program: OpenmrsResource;
|
|
242
|
+
dateEnrolled: string;
|
|
243
|
+
dateCompleted: string;
|
|
244
|
+
location: OpenmrsResource;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface AppointmentCountMap {
|
|
248
|
+
allAppointmentsCount: number;
|
|
249
|
+
missedAppointmentsCount;
|
|
250
|
+
appointmentDate: number;
|
|
251
|
+
appointmentServiceUuid: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface AppointmentSummary {
|
|
255
|
+
appointmentService: { name: string };
|
|
256
|
+
appointmentCountMap: Record<string, AppointmentCountMap>;
|
|
257
|
+
}
|
|
258
|
+
export interface QueueEntryPayload {
|
|
259
|
+
visit: { uuid: string };
|
|
260
|
+
queueEntry: {
|
|
261
|
+
status: { uuid: string };
|
|
262
|
+
priority: { uuid: string };
|
|
263
|
+
queue: { uuid: string };
|
|
264
|
+
patient: { uuid: string };
|
|
265
|
+
startedAt: Date;
|
|
266
|
+
sortWeight: number;
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface QueueServiceInfo {
|
|
271
|
+
uuid: string;
|
|
272
|
+
display: string;
|
|
273
|
+
name: string;
|
|
274
|
+
description: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export interface MappedServiceQueueEntry {
|
|
278
|
+
id: string;
|
|
279
|
+
name: string;
|
|
280
|
+
age: string;
|
|
281
|
+
gender: string;
|
|
282
|
+
phoneNumber: string;
|
|
283
|
+
visitType: string;
|
|
284
|
+
returnDate: string;
|
|
285
|
+
patientUuid: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export enum FilterTypes {
|
|
289
|
+
SHOW,
|
|
290
|
+
HIDE,
|
|
291
|
+
}
|
|
292
|
+
export interface Provider {
|
|
293
|
+
uuid: string;
|
|
294
|
+
display: string;
|
|
295
|
+
comments: string;
|
|
296
|
+
response?: string;
|
|
297
|
+
person: OpenmrsResource;
|
|
298
|
+
location: string;
|
|
299
|
+
serviceType: string;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface MappedQueueEntry {
|
|
303
|
+
id: string;
|
|
304
|
+
name: string;
|
|
305
|
+
patientAge: string;
|
|
306
|
+
patientSex: string;
|
|
307
|
+
patientDob: string;
|
|
308
|
+
patientUuid: string;
|
|
309
|
+
priority: string;
|
|
310
|
+
priorityComment: string;
|
|
311
|
+
priorityUuid: string;
|
|
312
|
+
service: string;
|
|
313
|
+
status: string;
|
|
314
|
+
statusUuid: string;
|
|
315
|
+
visitStartDateTime: string;
|
|
316
|
+
visitType: string;
|
|
317
|
+
visitUuid: string;
|
|
318
|
+
waitTime: string;
|
|
319
|
+
queueUuid: string;
|
|
320
|
+
queueEntryUuid: string;
|
|
321
|
+
queueLocation: string;
|
|
322
|
+
sortWeight: string;
|
|
323
|
+
visitNumber: string;
|
|
324
|
+
dateCreated: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export interface EndVisitPayload {
|
|
328
|
+
location: string;
|
|
329
|
+
startDatetime: Date;
|
|
330
|
+
visitType: string;
|
|
331
|
+
stopDatetime: Date;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export interface LocationResponse {
|
|
335
|
+
type: string;
|
|
336
|
+
total: number;
|
|
337
|
+
resourceType: string;
|
|
338
|
+
meta: {
|
|
339
|
+
lastUpdated: string;
|
|
340
|
+
};
|
|
341
|
+
link: Array<{
|
|
342
|
+
relation: string;
|
|
343
|
+
url: string;
|
|
344
|
+
}>;
|
|
345
|
+
id: string;
|
|
346
|
+
entry: Array<LocationEntry>;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface LocationEntry {
|
|
350
|
+
resource: Resource;
|
|
351
|
+
}
|
|
352
|
+
export interface Resource {
|
|
353
|
+
id: string;
|
|
354
|
+
name: string;
|
|
355
|
+
resourceType: string;
|
|
356
|
+
status: "active" | "inactive";
|
|
357
|
+
meta?: {
|
|
358
|
+
tag?: Array<{
|
|
359
|
+
code: string;
|
|
360
|
+
display: string;
|
|
361
|
+
system: string;
|
|
362
|
+
}>;
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface Identifer {
|
|
367
|
+
identifier: string;
|
|
368
|
+
display: string;
|
|
369
|
+
uuid: string;
|
|
370
|
+
identifierType: {
|
|
371
|
+
uuid: string;
|
|
372
|
+
display: string;
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export interface NewVisitPayload {
|
|
377
|
+
uuid?: string;
|
|
378
|
+
location: string;
|
|
379
|
+
patient?: string;
|
|
380
|
+
startDatetime: Date;
|
|
381
|
+
visitType: string;
|
|
382
|
+
stopDatetime?: Date;
|
|
383
|
+
attributes?: Array<{
|
|
384
|
+
attributeType: string;
|
|
385
|
+
value: string;
|
|
386
|
+
}>;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export interface QueueRoom {
|
|
390
|
+
uuid: string;
|
|
391
|
+
display: string;
|
|
392
|
+
name: string;
|
|
393
|
+
description: string;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export interface ProvidersQueueRoom {
|
|
397
|
+
uuid: string;
|
|
398
|
+
provider: {
|
|
399
|
+
uuid: string;
|
|
400
|
+
display: string;
|
|
401
|
+
};
|
|
402
|
+
queueRoom: {
|
|
403
|
+
uuid: string;
|
|
404
|
+
name: string;
|
|
405
|
+
display: string;
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface WaitTime {
|
|
410
|
+
metric: string;
|
|
411
|
+
averageWaitTime: string;
|
|
412
|
+
}
|