@kenyaemr/esm-morgue-app 5.4.2-pre.2283 → 5.4.2-pre.2291
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/.turbo/turbo-build.log +19 -19
- package/dist/109.js +2 -0
- package/dist/109.js.map +1 -0
- package/dist/201.js +1 -0
- package/dist/201.js.map +1 -0
- package/dist/293.js +1 -0
- package/dist/293.js.map +1 -0
- package/dist/300.js +1 -1
- package/dist/347.js +1 -2
- package/dist/347.js.map +1 -1
- package/dist/373.js +2 -0
- package/dist/373.js.map +1 -0
- package/dist/38.js +1 -0
- package/dist/38.js.map +1 -0
- package/dist/389.js +1 -0
- package/dist/389.js.map +1 -0
- package/dist/398.js +1 -0
- package/dist/398.js.map +1 -0
- package/dist/4.js +2 -0
- package/dist/4.js.map +1 -0
- package/dist/410.js +1 -0
- package/dist/410.js.map +1 -0
- package/dist/420.js +2 -0
- package/dist/420.js.map +1 -0
- package/dist/467.js +1 -0
- package/dist/467.js.map +1 -0
- package/dist/632.js +1 -0
- package/dist/632.js.map +1 -0
- package/dist/798.js +1 -0
- package/dist/798.js.map +1 -0
- package/dist/811.js +1 -0
- package/dist/811.js.map +1 -0
- package/dist/824.js +1 -0
- package/dist/824.js.map +1 -0
- package/dist/827.js +1 -0
- package/dist/827.js.map +1 -0
- package/dist/842.js +2 -0
- package/dist/842.js.LICENSE.txt +5 -0
- package/dist/842.js.map +1 -0
- package/dist/918.js +1 -1
- package/dist/918.js.map +1 -1
- package/dist/kenyaemr-esm-morgue-app.js +1 -1
- package/dist/kenyaemr-esm-morgue-app.js.buildmanifest.json +218 -291
- package/dist/kenyaemr-esm-morgue-app.js.map +1 -1
- package/dist/main.js +2 -1
- package/dist/main.js.LICENSE.txt +15 -0
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/bed/bed.component.tsx +164 -0
- package/src/bed/bed.scss +192 -0
- package/src/bed/divider/divider.component.tsx +18 -0
- package/src/bed/empty-bed.component.tsx +47 -0
- package/src/bed-layout/admitted/admitted-bed-layout.component.tsx +189 -0
- package/src/bed-layout/awaiting/awaiting-bed-layout.component.tsx +86 -0
- package/src/bed-layout/bed-layout.resource.ts +72 -0
- package/src/bed-layout/bed-layout.scss +55 -0
- package/src/bed-layout/discharged/discharged-bed-layout.component.tsx +109 -0
- package/src/bed-layout/discharged/discharged-bed-layout.resource.ts +99 -0
- package/src/bed-linelist-view/admitted/admitted-bed-linelist-view.component.tsx +420 -0
- package/src/bed-linelist-view/awaiting/awaiting-bed-linelist-view.component.tsx +224 -0
- package/src/bed-linelist-view/bed-linelist-view.scss +5 -0
- package/src/bed-linelist-view/discharged/discharged-bed-line-view.component.tsx +256 -0
- package/src/config-schema.ts +41 -9
- package/src/constants.ts +57 -0
- package/src/deceased-patient-header/deceased-patient-header.component.tsx +31 -0
- package/src/deceased-patient-header/deceased-patient-header.scss +50 -0
- package/src/{component → deceased-patient-header}/deceasedInfo/deceased-info.component.tsx +1 -1
- package/src/deceased-patient-header/deceasedInfo/deceased-info.resource.ts +11 -0
- package/src/extension/actionButton.component.tsx +5 -59
- package/src/extension/deceasedInfoBanner.component.tsx +5 -9
- package/src/{hook/useAdmitPatient.ts → forms/admit-deceased-person-workspace/admit-deceased-person.resource.ts} +177 -46
- package/src/forms/admit-deceased-person-workspace/admit-deceased-person.scss +143 -0
- package/src/forms/admit-deceased-person-workspace/admit-deceased-person.workspace.tsx +648 -0
- package/src/{hook/usePersonAttributes.ts → forms/discharge-deceased-person-workspace/discharge-body.resource.ts} +1 -1
- package/src/forms/discharge-deceased-person-workspace/discharge-body.scss +56 -0
- package/src/forms/discharge-deceased-person-workspace/discharge-body.workspace.tsx +362 -0
- package/src/forms/dispose-deceased-person-workspace/dispose-deceased-person.resource.ts +18 -0
- package/src/{workspaces/patientAdditionalInfoForm.scss → forms/dispose-deceased-person-workspace/dispose-deceased-person.scss} +46 -66
- package/src/forms/dispose-deceased-person-workspace/dispose-deceased-person.workspace.tsx +401 -0
- package/src/forms/form-entry-workspace/form-entry-workspace.workspace.tsx +62 -0
- package/src/forms/swap-compartment-workspace/swap-unit.scss +144 -0
- package/src/forms/swap-compartment-workspace/swap-unit.workspace.tsx +280 -0
- package/src/header/header.component.tsx +41 -0
- package/src/header/header.scss +58 -0
- package/src/home/home.component.tsx +87 -0
- package/src/home/home.resource.ts +261 -0
- package/src/home/home.scss +5 -0
- package/src/index.ts +18 -12
- package/src/metrics/metrics-card.component.tsx +31 -0
- package/src/metrics/metrics-card.scss +51 -0
- package/src/root.component.tsx +7 -3
- package/src/routes.json +25 -14
- package/src/schemas/index.ts +66 -0
- package/src/summary/summary.component.tsx +42 -0
- package/src/summary/summary.scss +10 -0
- package/src/switcher/content-switcher.component.tsx +220 -0
- package/src/switcher/content-switcher.scss +30 -0
- package/src/types/index.ts +336 -359
- package/src/utils/utils.ts +20 -2
- package/src/view-details/main/main.component.tsx +34 -0
- package/src/view-details/main/main.scss +45 -0
- package/src/view-details/panels/attachement.component.tsx +21 -0
- package/src/view-details/panels/autopsy.component.tsx +215 -0
- package/src/view-details/panels/billing-history.component.tsx +13 -0
- package/src/view-details/panels/observations/observation.component.tsx +57 -0
- package/src/view-details/panels/observations/observation.scss +24 -0
- package/src/view-details/panels/panels.scss +46 -0
- package/src/view-details/view-details.component.tsx +65 -0
- package/src/view-details/view-details.resource.ts +65 -0
- package/src/view-details/views-details.scss +82 -0
- package/translations/en.json +74 -21
- package/tsconfig.json +1 -1
- package/dist/113.js +0 -1
- package/dist/113.js.map +0 -1
- package/dist/160.js +0 -1
- package/dist/160.js.map +0 -1
- package/dist/299.js +0 -1
- package/dist/299.js.map +0 -1
- package/dist/433.js +0 -2
- package/dist/433.js.map +0 -1
- package/dist/441.js +0 -1
- package/dist/441.js.map +0 -1
- package/dist/496.js +0 -1
- package/dist/496.js.map +0 -1
- package/dist/511.js +0 -1
- package/dist/511.js.map +0 -1
- package/dist/603.js +0 -1
- package/dist/603.js.map +0 -1
- package/dist/610.js +0 -1
- package/dist/610.js.map +0 -1
- package/dist/612.js +0 -1
- package/dist/612.js.map +0 -1
- package/dist/656.js +0 -2
- package/dist/656.js.map +0 -1
- package/dist/752.js +0 -1
- package/dist/752.js.map +0 -1
- package/dist/754.js +0 -1
- package/dist/754.js.map +0 -1
- package/dist/781.js +0 -1
- package/dist/781.js.map +0 -1
- package/dist/801.js +0 -2
- package/dist/801.js.map +0 -1
- package/dist/817.js +0 -1
- package/dist/817.js.map +0 -1
- package/dist/877.js +0 -1
- package/dist/877.js.map +0 -1
- package/dist/924.js +0 -1
- package/dist/924.js.map +0 -1
- package/src/autosuggest/autosuggest.component.tsx +0 -162
- package/src/autosuggest/autosuggest.scss +0 -61
- package/src/autosuggest/patient-search-info.component.tsx +0 -75
- package/src/autosuggest/patient-search-info.scss +0 -62
- package/src/autosuggest/search-empty-state.component.tsx +0 -21
- package/src/autosuggest/search-empty-state.scss +0 -18
- package/src/card/avail-compartment.compartment.tsx +0 -94
- package/src/card/compartment-view.compartment.tsx +0 -62
- package/src/card/compartment.scss +0 -128
- package/src/card/compartmentSharing.component.tsx +0 -21
- package/src/card/compartmentSharing.scss +0 -24
- package/src/card/empty-compartment.component.tsx +0 -28
- package/src/card/empty-compartment.scss +0 -61
- package/src/component/main.component.tsx +0 -17
- package/src/component/next-of-kin-details/nextOfKinDetails.component.tsx +0 -50
- package/src/component/next-of-kin-details/nextOfKinDetails.scss +0 -37
- package/src/header/admitted-queue-header.component.tsx +0 -30
- package/src/header/admitted-queue-header.scss +0 -32
- package/src/header/morgue-header.component.tsx +0 -38
- package/src/header/morgue-header.scss +0 -95
- package/src/header/morgue-illustration.component.tsx +0 -13
- package/src/hook/useDeceasedPatients.ts +0 -12
- package/src/hook/useDischargedPatient.ts +0 -55
- package/src/hook/useMorgue.resource.ts +0 -163
- package/src/hook/useMortuaryAdmissionLocation.ts +0 -64
- package/src/tables/admitted-queue.component.tsx +0 -54
- package/src/tables/admitted-queue.scss +0 -62
- package/src/tables/discharge-queue.component.tsx +0 -87
- package/src/tables/generic-table.component.tsx +0 -140
- package/src/tables/generic-table.scss +0 -37
- package/src/tabs/tabs.component.tsx +0 -82
- package/src/tabs/tabs.scss +0 -15
- package/src/workspaces/admit-body.scss +0 -46
- package/src/workspaces/admit-body.workspace.tsx +0 -79
- package/src/workspaces/discharge-body.scss +0 -67
- package/src/workspaces/discharge-body.workspace.tsx +0 -329
- package/src/workspaces/patientAdditionalInfoForm.workspace.tsx +0 -562
- package/src/workspaces/swap-unit.scss +0 -46
- package/src/workspaces/swap-unit.workspace.tsx +0 -168
- /package/dist/{347.js.LICENSE.txt → 109.js.LICENSE.txt} +0 -0
- /package/dist/{656.js.LICENSE.txt → 373.js.LICENSE.txt} +0 -0
- /package/dist/{801.js.LICENSE.txt → 4.js.LICENSE.txt} +0 -0
- /package/dist/{433.js.LICENSE.txt → 420.js.LICENSE.txt} +0 -0
- /package/src/{component → deceased-patient-header}/deceasedInfo/deceased-info.scss +0 -0
package/src/types/index.ts
CHANGED
|
@@ -1,134 +1,217 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export type QueueService = 'Clinical consultation' | 'Triage';
|
|
5
|
-
export type QueueStatus = 'Finished Service' | 'In Service' | 'Waiting';
|
|
6
|
-
export interface Patient {
|
|
1
|
+
import { type OpenmrsResourceStrict, type OpenmrsResource, Concept } from '@openmrs/esm-framework';
|
|
2
|
+
|
|
3
|
+
export interface BaseEntity {
|
|
7
4
|
uuid: string;
|
|
8
5
|
display: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface Identifier extends BaseEntity {
|
|
9
|
+
identifierType: string;
|
|
10
|
+
identifier: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface CauseOfDeath extends BaseEntity {}
|
|
14
|
+
|
|
15
|
+
export interface PreferredAddress extends BaseEntity {
|
|
16
|
+
display: any;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Attribute extends BaseEntity {
|
|
20
|
+
value: string;
|
|
21
|
+
attributeType: {
|
|
14
22
|
uuid: string;
|
|
15
|
-
display
|
|
16
|
-
gender: string;
|
|
17
|
-
birthdate: string;
|
|
18
|
-
dead: boolean;
|
|
19
|
-
age: number;
|
|
20
|
-
deathDate: string | null;
|
|
21
|
-
causeOfDeath: {
|
|
22
|
-
uuid: string;
|
|
23
|
-
display: string;
|
|
24
|
-
} | null;
|
|
25
|
-
preferredAddress: {
|
|
26
|
-
uuid: string;
|
|
27
|
-
stateProvince: string | null;
|
|
28
|
-
countyDistrict: string | null;
|
|
29
|
-
address4: string | null;
|
|
30
|
-
} | null;
|
|
31
|
-
attributes: {
|
|
32
|
-
uuid: string;
|
|
33
|
-
display: string;
|
|
34
|
-
value: string;
|
|
35
|
-
attributeType: {
|
|
36
|
-
uuid: string;
|
|
37
|
-
};
|
|
38
|
-
}[];
|
|
23
|
+
display?: string;
|
|
39
24
|
};
|
|
40
25
|
}
|
|
41
|
-
|
|
26
|
+
|
|
27
|
+
export interface PreferredName extends BaseEntity {}
|
|
28
|
+
|
|
29
|
+
export interface Person {
|
|
42
30
|
uuid: string;
|
|
43
|
-
status?: string;
|
|
44
31
|
display: string;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
gender: string;
|
|
62
|
-
birthdate: string;
|
|
63
|
-
dead: boolean;
|
|
64
|
-
age: number;
|
|
65
|
-
deathDate: string | null;
|
|
66
|
-
causeOfDeath: {
|
|
67
|
-
uuid: string;
|
|
68
|
-
display: string;
|
|
69
|
-
} | null;
|
|
70
|
-
preferredAddress: {
|
|
71
|
-
uuid: string;
|
|
72
|
-
stateProvince: string | null;
|
|
73
|
-
countyDistrict: string | null;
|
|
74
|
-
address4: string | null;
|
|
75
|
-
} | null;
|
|
76
|
-
};
|
|
32
|
+
identifiers?: Identifier[];
|
|
33
|
+
person?: Person;
|
|
34
|
+
gender: string;
|
|
35
|
+
age: number;
|
|
36
|
+
birthdate: string;
|
|
37
|
+
birthdateEstimated: boolean;
|
|
38
|
+
dead: boolean;
|
|
39
|
+
deathDate: string;
|
|
40
|
+
causeOfDeath: CauseOfDeath;
|
|
41
|
+
preferredName?: PreferredName;
|
|
42
|
+
preferredAddress: PreferredAddress;
|
|
43
|
+
attributes: Attribute[];
|
|
44
|
+
voided: boolean;
|
|
45
|
+
birthtime: any;
|
|
46
|
+
deathdateEstimated: boolean;
|
|
47
|
+
resourceVersion?: string;
|
|
77
48
|
}
|
|
78
|
-
|
|
79
|
-
|
|
49
|
+
|
|
50
|
+
export interface PersonName {
|
|
51
|
+
display: string;
|
|
52
|
+
uuid: string;
|
|
53
|
+
givenName: string;
|
|
54
|
+
middleName: string;
|
|
55
|
+
familyName: string;
|
|
56
|
+
familyName2: any;
|
|
80
57
|
}
|
|
81
58
|
|
|
82
|
-
export interface
|
|
59
|
+
export interface Patient {
|
|
83
60
|
uuid: string;
|
|
84
61
|
display: string;
|
|
62
|
+
identifiers: Identifier[];
|
|
63
|
+
person: Person;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface MortuaryPatient {
|
|
67
|
+
patient: Patient;
|
|
68
|
+
person: Person;
|
|
69
|
+
personName: PersonName;
|
|
70
|
+
resourceVersion: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface BedType extends BaseEntity {
|
|
85
74
|
name: string;
|
|
75
|
+
displayName: string;
|
|
76
|
+
description: string;
|
|
86
77
|
}
|
|
87
78
|
|
|
88
|
-
|
|
79
|
+
export type BedStatus = 'AVAILABLE' | 'OCCUPIED';
|
|
80
|
+
|
|
81
|
+
export interface BedTag extends BaseEntity {
|
|
82
|
+
id?: number;
|
|
83
|
+
name: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface BedTagMap {
|
|
89
87
|
uuid: string;
|
|
88
|
+
bedTag: BedTag;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface Location extends BaseEntity {
|
|
90
92
|
name: string;
|
|
91
93
|
description: string;
|
|
92
|
-
|
|
93
|
-
attributeOrder: number;
|
|
94
|
-
format: string;
|
|
95
|
-
foreignKey: string | null;
|
|
96
|
-
regExp: string | null;
|
|
97
|
-
required: boolean;
|
|
94
|
+
tags?: BaseEntity[];
|
|
98
95
|
}
|
|
99
96
|
|
|
100
|
-
export interface
|
|
97
|
+
export interface Bed {
|
|
98
|
+
id: number;
|
|
101
99
|
uuid: string;
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
bedNumber: string;
|
|
101
|
+
bedType?: BedType;
|
|
102
|
+
row: number;
|
|
103
|
+
column: number;
|
|
104
|
+
status: BedStatus;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface BedLayout {
|
|
108
|
+
rowNumber: number;
|
|
109
|
+
columnNumber: number;
|
|
110
|
+
bedNumber: string;
|
|
111
|
+
bedId: number;
|
|
112
|
+
bedUuid: string;
|
|
113
|
+
status: BedStatus;
|
|
114
|
+
bedType: BedType;
|
|
115
|
+
location: string;
|
|
116
|
+
patients: Patient[];
|
|
117
|
+
bedTagMaps: BedTagMap[];
|
|
104
118
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
119
|
+
|
|
120
|
+
export interface AdmissionLocationResponse {
|
|
121
|
+
results: Array<{
|
|
122
|
+
ward: Location;
|
|
123
|
+
totalBeds: number;
|
|
124
|
+
occupiedBeds: number;
|
|
125
|
+
}>;
|
|
109
126
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
127
|
+
|
|
128
|
+
export interface MortuaryLocationResponse {
|
|
129
|
+
totalBeds: number;
|
|
130
|
+
occupiedBeds: number;
|
|
131
|
+
ward: Location;
|
|
132
|
+
bedLayouts: BedLayout[];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type MappedBedData = Array<{
|
|
136
|
+
id: number;
|
|
137
|
+
number: string;
|
|
138
|
+
type: string;
|
|
139
|
+
status: string;
|
|
140
|
+
uuid: string;
|
|
141
|
+
}>;
|
|
142
|
+
|
|
143
|
+
export interface VisitTypeResponse extends BaseEntity {
|
|
144
|
+
name: string;
|
|
115
145
|
}
|
|
146
|
+
|
|
116
147
|
export interface PaymentMethod {
|
|
117
148
|
uuid: string;
|
|
118
149
|
name: string;
|
|
119
150
|
description: string;
|
|
120
151
|
retired: boolean;
|
|
121
152
|
retireReason: null;
|
|
122
|
-
auditInfo: AuditInfo;
|
|
123
153
|
attributeTypes: AttributeType[];
|
|
124
154
|
sortOrder: null;
|
|
125
155
|
resourceVersion: string;
|
|
126
156
|
}
|
|
127
157
|
|
|
128
|
-
|
|
129
|
-
name: string;
|
|
158
|
+
interface AttributeType {
|
|
130
159
|
uuid: string;
|
|
131
|
-
|
|
160
|
+
name: string;
|
|
161
|
+
description: string;
|
|
162
|
+
retired: boolean;
|
|
163
|
+
attributeOrder: number;
|
|
164
|
+
format: string;
|
|
165
|
+
foreignKey: string | null;
|
|
166
|
+
regExp: string | null;
|
|
167
|
+
required: boolean;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface Encounter extends OpenmrsResourceStrict {
|
|
171
|
+
encounterDatetime?: string;
|
|
172
|
+
patient?: Patient;
|
|
173
|
+
location?: Location;
|
|
174
|
+
form?: OpenmrsResource;
|
|
175
|
+
encounterType?: EncounterType;
|
|
176
|
+
obs?: Array<Observation>;
|
|
177
|
+
orders?: any;
|
|
178
|
+
voided?: boolean;
|
|
179
|
+
visit?: Visit;
|
|
180
|
+
encounterProviders?: Array<EncounterProvider>;
|
|
181
|
+
diagnoses?: any;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface Observation extends OpenmrsResourceStrict {
|
|
185
|
+
concept: OpenmrsResource;
|
|
186
|
+
person: Person;
|
|
187
|
+
obsDatetime: string;
|
|
188
|
+
accessionNumber: string;
|
|
189
|
+
obsGroup: Observation;
|
|
190
|
+
value: number | string | boolean | OpenmrsResource;
|
|
191
|
+
valueCodedName: OpenmrsResource;
|
|
192
|
+
groupMembers: Array<Observation>;
|
|
193
|
+
comment: string;
|
|
194
|
+
location: Location;
|
|
195
|
+
order: OpenmrsResource;
|
|
196
|
+
encounter: Encounter;
|
|
197
|
+
voided: boolean;
|
|
198
|
+
}
|
|
199
|
+
export interface EncounterProvider extends OpenmrsResourceStrict {
|
|
200
|
+
provider?: OpenmrsResource;
|
|
201
|
+
encounterRole?: EncounterRole;
|
|
202
|
+
voided?: boolean;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface EncounterType extends OpenmrsResourceStrict {
|
|
206
|
+
name?: string;
|
|
207
|
+
description?: string;
|
|
208
|
+
retired?: boolean;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface EncounterRole extends OpenmrsResourceStrict {
|
|
212
|
+
name?: string;
|
|
213
|
+
description?: string;
|
|
214
|
+
retired?: boolean;
|
|
132
215
|
}
|
|
133
216
|
|
|
134
217
|
export interface Visit {
|
|
@@ -193,39 +276,20 @@ export interface EncounterList {
|
|
|
193
276
|
};
|
|
194
277
|
}
|
|
195
278
|
|
|
196
|
-
export
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
visit: Visit;
|
|
200
|
-
}
|
|
279
|
+
export type MappedQueuePriority = Omit<QueuePriority, 'Urgent'>;
|
|
280
|
+
export type QueuePriority = 'Emergency' | 'Not Urgent' | 'Priority' | 'Urgent';
|
|
281
|
+
export type QueueStatus = 'Finished Service' | 'In Service' | 'Waiting';
|
|
201
282
|
|
|
202
|
-
export interface
|
|
203
|
-
display: string;
|
|
204
|
-
endedAt: null;
|
|
205
|
-
locationWaitingFor: string | null;
|
|
206
|
-
patient: {
|
|
207
|
-
uuid: string;
|
|
208
|
-
person: {
|
|
209
|
-
age: string;
|
|
210
|
-
gender: string;
|
|
211
|
-
};
|
|
212
|
-
phoneNumber: string;
|
|
213
|
-
};
|
|
214
|
-
priority: {
|
|
215
|
-
display: QueuePriority;
|
|
216
|
-
uuid: string;
|
|
217
|
-
};
|
|
218
|
-
providerWaitingFor: null;
|
|
219
|
-
queue: Queue;
|
|
220
|
-
startedAt: string;
|
|
221
|
-
status: {
|
|
222
|
-
display: QueueStatus;
|
|
223
|
-
uuid: string;
|
|
224
|
-
};
|
|
283
|
+
export interface Queue {
|
|
225
284
|
uuid: string;
|
|
226
|
-
|
|
285
|
+
display: string;
|
|
286
|
+
name: string;
|
|
287
|
+
description: string;
|
|
288
|
+
location: Location;
|
|
289
|
+
service: string;
|
|
290
|
+
allowedPriorities: Array<Concept>;
|
|
291
|
+
allowedStatuses: Array<Concept>;
|
|
227
292
|
}
|
|
228
|
-
|
|
229
293
|
export interface MappedVisitQueueEntry {
|
|
230
294
|
id: string;
|
|
231
295
|
name: string;
|
|
@@ -241,127 +305,11 @@ export interface MappedVisitQueueEntry {
|
|
|
241
305
|
queueEntryUuid: string;
|
|
242
306
|
}
|
|
243
307
|
|
|
244
|
-
export
|
|
245
|
-
queueEntry: MappedVisitQueueEntry | null;
|
|
246
|
-
isLoading: boolean;
|
|
247
|
-
error: Error;
|
|
248
|
-
isValidating?: boolean;
|
|
249
|
-
mutate: () => void;
|
|
250
|
-
}
|
|
251
|
-
export interface Queue {
|
|
252
|
-
uuid: string;
|
|
253
|
-
display: string;
|
|
254
|
-
name: string;
|
|
255
|
-
description: string;
|
|
256
|
-
location: Location;
|
|
257
|
-
service: string;
|
|
258
|
-
allowedPriorities: Array<Concept>;
|
|
259
|
-
allowedStatuses: Array<Concept>;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export type UpdateVisitPayload = {
|
|
263
|
-
stopDatetime?: Date;
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
export interface PaginatedResponse {
|
|
267
|
-
uuid: string;
|
|
268
|
-
display: string;
|
|
269
|
-
identifiers: Identifier[];
|
|
270
|
-
person: Person;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export interface Identifier {
|
|
274
|
-
identifier: string;
|
|
275
|
-
uuid: string;
|
|
276
|
-
preferred: boolean;
|
|
277
|
-
location: Location;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export interface Location {
|
|
281
|
-
uuid: string;
|
|
282
|
-
name: string;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export interface Person {
|
|
286
|
-
uuid: string;
|
|
287
|
-
display: string;
|
|
288
|
-
gender: string;
|
|
289
|
-
birthdate: string;
|
|
290
|
-
dead: boolean;
|
|
291
|
-
age: number;
|
|
292
|
-
deathDate: string;
|
|
293
|
-
causeOfDeath: CauseOfDeath;
|
|
294
|
-
preferredAddress: PreferredAddress;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export interface CauseOfDeath {
|
|
298
|
-
uuid: string;
|
|
299
|
-
display: string;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export interface PreferredAddress {
|
|
303
|
-
uuid: string;
|
|
304
|
-
stateProvince: any;
|
|
305
|
-
countyDistrict: any;
|
|
306
|
-
address4: any;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
export interface MortuaryLocationFetchResponse {
|
|
310
|
-
totalBeds: number;
|
|
311
|
-
occupiedBeds: number;
|
|
312
|
-
ward: Location;
|
|
313
|
-
bedLayouts: Array<BedLayout>;
|
|
314
|
-
}
|
|
315
|
-
export interface BedLayout {
|
|
316
|
-
rowNumber: number;
|
|
317
|
-
columnNumber: number;
|
|
318
|
-
bedNumber: string;
|
|
319
|
-
bedId: number;
|
|
320
|
-
bedUuid: string;
|
|
321
|
-
status: BedStatus;
|
|
322
|
-
bedType: BedType;
|
|
323
|
-
location: string;
|
|
324
|
-
patients: Patient[];
|
|
325
|
-
bedTagMaps: BedTagMap[];
|
|
326
|
-
}
|
|
327
|
-
export interface BedType {
|
|
328
|
-
uuid: string;
|
|
329
|
-
name: string;
|
|
330
|
-
displayName: string;
|
|
331
|
-
description: string;
|
|
332
|
-
resourceVersion: string;
|
|
333
|
-
}
|
|
334
|
-
interface BedTagMap {
|
|
335
|
-
uuid: string;
|
|
336
|
-
bedTag: {
|
|
337
|
-
id: number;
|
|
338
|
-
name: string;
|
|
339
|
-
uuid: string;
|
|
340
|
-
resourceVersion: string;
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
export type BedStatus = 'AVAILABLE' | 'OCCUPIED';
|
|
344
|
-
|
|
345
|
-
export interface BedDetail {
|
|
346
|
-
bedId: number;
|
|
347
|
-
bedNumber: string;
|
|
348
|
-
bedType: BedType;
|
|
349
|
-
physicalLocation: Location;
|
|
350
|
-
patients: Array<Patient>;
|
|
351
|
-
}
|
|
308
|
+
export type DispositionType = 'ADMIT' | 'DISCHARGE' | 'TRANSFER';
|
|
352
309
|
|
|
353
310
|
export interface LocationTag extends OpenmrsResource {
|
|
354
311
|
name: string;
|
|
355
312
|
}
|
|
356
|
-
|
|
357
|
-
export type DispositionType = 'ADMIT' | 'DISCHARGE' | 'TRANSFER';
|
|
358
|
-
|
|
359
|
-
export interface ObsPayload {
|
|
360
|
-
concept: Concept | string;
|
|
361
|
-
value?: string | OpenmrsResource;
|
|
362
|
-
groupMembers?: Array<ObsPayload>;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
313
|
export interface EmrApiConfigurationResponse {
|
|
366
314
|
admissionEncounterType: OpenmrsResource;
|
|
367
315
|
clinicianEncounterRole: OpenmrsResource;
|
|
@@ -400,123 +348,6 @@ export interface EmrApiConfigurationResponse {
|
|
|
400
348
|
admissionDecisionConcept: OpenmrsResource;
|
|
401
349
|
}
|
|
402
350
|
|
|
403
|
-
export const customRepProps = [
|
|
404
|
-
['metadataSourceName', 'ref'],
|
|
405
|
-
['orderingProviderEncounterRole', 'ref'],
|
|
406
|
-
['supportsTransferLocationTag', '(uuid,display,name,links)'],
|
|
407
|
-
['unknownLocation', 'ref'],
|
|
408
|
-
['denyAdmissionConcept', 'ref'],
|
|
409
|
-
['admissionForm', 'ref'],
|
|
410
|
-
['exitFromInpatientEncounterType', 'ref'],
|
|
411
|
-
['extraPatientIdentifierTypes', 'ref'],
|
|
412
|
-
['consultFreeTextCommentsConcept', 'ref'],
|
|
413
|
-
['sameAsConceptMapType', 'ref'],
|
|
414
|
-
['testPatientPersonAttributeType', 'ref'],
|
|
415
|
-
['admissionDecisionConcept', 'ref'],
|
|
416
|
-
['supportsAdmissionLocationTag', '(uuid,display,name,links)'],
|
|
417
|
-
['checkInEncounterType', 'ref'],
|
|
418
|
-
['transferWithinHospitalEncounterType', 'ref'],
|
|
419
|
-
['suppressedDiagnosisConcepts', 'ref'],
|
|
420
|
-
['primaryIdentifierType', 'ref'],
|
|
421
|
-
['nonDiagnosisConceptSets', 'ref'],
|
|
422
|
-
['fullPrivilegeLevel', 'ref'],
|
|
423
|
-
['unknownProvider', 'ref'],
|
|
424
|
-
['diagnosisSets', 'ref'],
|
|
425
|
-
['personImageDirectory', 'ref'],
|
|
426
|
-
['visitNoteEncounterType', 'ref'],
|
|
427
|
-
['inpatientNoteEncounterType', 'ref'],
|
|
428
|
-
['transferRequestEncounterType', 'ref'],
|
|
429
|
-
['consultEncounterType', 'ref'],
|
|
430
|
-
['diagnosisMetadata', 'ref'],
|
|
431
|
-
['narrowerThanConceptMapType', 'ref'],
|
|
432
|
-
['clinicianEncounterRole', 'ref'],
|
|
433
|
-
['conceptSourcesForDiagnosisSearch', 'ref'],
|
|
434
|
-
['patientDiedConcept', 'ref'],
|
|
435
|
-
['emrApiConceptSource', 'ref'],
|
|
436
|
-
['lastViewedPatientSizeLimit', 'ref'],
|
|
437
|
-
['identifierTypesToSearch', 'ref'],
|
|
438
|
-
['telephoneAttributeType', 'ref'],
|
|
439
|
-
['checkInClerkEncounterRole', 'ref'],
|
|
440
|
-
['dischargeForm', 'ref'],
|
|
441
|
-
['unknownCauseOfDeathConcept', 'ref'],
|
|
442
|
-
['visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary', 'ref'],
|
|
443
|
-
['atFacilityVisitType', 'ref'],
|
|
444
|
-
['visitExpireHours', 'ref'],
|
|
445
|
-
['admissionEncounterType', 'ref'],
|
|
446
|
-
['motherChildRelationshipType', 'ref'],
|
|
447
|
-
['dispositions', 'ref'],
|
|
448
|
-
['dispositionDescriptor', 'ref'],
|
|
449
|
-
['highPrivilegeLevel', 'ref'],
|
|
450
|
-
['supportsLoginLocationTag', '(uuid,display,name,links)'],
|
|
451
|
-
['unknownPatientPersonAttributeType', 'ref'],
|
|
452
|
-
['supportsVisitsLocationTag', '(uuid,display,name,links)'],
|
|
453
|
-
['transferForm', 'ref'],
|
|
454
|
-
['bedAssignmentEncounterType', 'ref'],
|
|
455
|
-
['cancelADTRequestEncounterType', 'ref'],
|
|
456
|
-
['admissionDecisionConcept', 'ref'],
|
|
457
|
-
['denyAdmissionConcept', 'ref'],
|
|
458
|
-
];
|
|
459
|
-
|
|
460
|
-
export interface Encounter extends OpenmrsResourceStrict {
|
|
461
|
-
encounterDatetime?: string;
|
|
462
|
-
patient?: Patient;
|
|
463
|
-
location?: Location;
|
|
464
|
-
form?: OpenmrsResource;
|
|
465
|
-
encounterType?: EncounterType;
|
|
466
|
-
obs?: Array<Observation>;
|
|
467
|
-
orders?: any;
|
|
468
|
-
voided?: boolean;
|
|
469
|
-
visit?: Visit;
|
|
470
|
-
encounterProviders?: Array<EncounterProvider>;
|
|
471
|
-
diagnoses?: any;
|
|
472
|
-
}
|
|
473
|
-
export interface EncounterProvider extends OpenmrsResourceStrict {
|
|
474
|
-
provider?: OpenmrsResource;
|
|
475
|
-
encounterRole?: EncounterRole;
|
|
476
|
-
voided?: boolean;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
export interface EncounterType extends OpenmrsResourceStrict {
|
|
480
|
-
name?: string;
|
|
481
|
-
description?: string;
|
|
482
|
-
retired?: boolean;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
export interface EncounterRole extends OpenmrsResourceStrict {
|
|
486
|
-
name?: string;
|
|
487
|
-
description?: string;
|
|
488
|
-
retired?: boolean;
|
|
489
|
-
}
|
|
490
|
-
export interface Observation extends OpenmrsResourceStrict {
|
|
491
|
-
concept: OpenmrsResource;
|
|
492
|
-
person: Person;
|
|
493
|
-
obsDatetime: string;
|
|
494
|
-
accessionNumber: string;
|
|
495
|
-
obsGroup: Observation;
|
|
496
|
-
value: number | string | boolean | OpenmrsResource;
|
|
497
|
-
valueCodedName: OpenmrsResource;
|
|
498
|
-
groupMembers: Array<Observation>;
|
|
499
|
-
comment: string;
|
|
500
|
-
location: Location;
|
|
501
|
-
order: OpenmrsResource;
|
|
502
|
-
encounter: Encounter;
|
|
503
|
-
voided: boolean;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
export interface CurrentLocationEncounterResponse {
|
|
507
|
-
results: {
|
|
508
|
-
visit: {
|
|
509
|
-
patient: {
|
|
510
|
-
uuid: string;
|
|
511
|
-
display: string;
|
|
512
|
-
};
|
|
513
|
-
};
|
|
514
|
-
encounterAssigningToCurrentInpatientLocation: {
|
|
515
|
-
encounterDatetime: string;
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
|
|
520
351
|
export interface PatientInfo {
|
|
521
352
|
person?: {
|
|
522
353
|
uuid: string;
|
|
@@ -532,6 +363,64 @@ export interface PatientInfo {
|
|
|
532
363
|
display: string;
|
|
533
364
|
}[];
|
|
534
365
|
}
|
|
366
|
+
|
|
367
|
+
export interface UseVisitQueueEntries {
|
|
368
|
+
queueEntry: MappedVisitQueueEntry | null;
|
|
369
|
+
isLoading: boolean;
|
|
370
|
+
error: Error;
|
|
371
|
+
isValidating?: boolean;
|
|
372
|
+
mutate: () => void;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface VisitQueueEntry {
|
|
376
|
+
queueEntry: VisitQueueEntry;
|
|
377
|
+
uuid: string;
|
|
378
|
+
visit: Visit;
|
|
379
|
+
}
|
|
380
|
+
export interface VisitQueueEntry {
|
|
381
|
+
display: string;
|
|
382
|
+
endedAt: null;
|
|
383
|
+
locationWaitingFor: string | null;
|
|
384
|
+
patient: {
|
|
385
|
+
uuid: string;
|
|
386
|
+
person: {
|
|
387
|
+
age: string;
|
|
388
|
+
gender: string;
|
|
389
|
+
};
|
|
390
|
+
phoneNumber: string;
|
|
391
|
+
};
|
|
392
|
+
priority: {
|
|
393
|
+
display: QueuePriority;
|
|
394
|
+
uuid: string;
|
|
395
|
+
};
|
|
396
|
+
providerWaitingFor: null;
|
|
397
|
+
queue: Queue;
|
|
398
|
+
startedAt: string;
|
|
399
|
+
status: {
|
|
400
|
+
display: QueueStatus;
|
|
401
|
+
uuid: string;
|
|
402
|
+
};
|
|
403
|
+
uuid: string;
|
|
404
|
+
visit: Visit;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export interface Patient {
|
|
408
|
+
uuid: string;
|
|
409
|
+
display: string;
|
|
410
|
+
identifiers: Identifier[];
|
|
411
|
+
person: Person;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export interface ConceptName {
|
|
415
|
+
uuid: string;
|
|
416
|
+
display: string;
|
|
417
|
+
name: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export interface ConceptResponse extends BaseEntity {
|
|
421
|
+
name: ConceptName;
|
|
422
|
+
}
|
|
423
|
+
|
|
535
424
|
export interface FHIREncounter {
|
|
536
425
|
resourceType: string;
|
|
537
426
|
id: string;
|
|
@@ -586,3 +475,91 @@ export interface FHIREncounter {
|
|
|
586
475
|
type: string;
|
|
587
476
|
};
|
|
588
477
|
}
|
|
478
|
+
|
|
479
|
+
export interface Entry {
|
|
480
|
+
resourceType: string;
|
|
481
|
+
id: string;
|
|
482
|
+
meta: Meta;
|
|
483
|
+
status: string;
|
|
484
|
+
class: {
|
|
485
|
+
system: string;
|
|
486
|
+
code: string;
|
|
487
|
+
};
|
|
488
|
+
type: Array<{
|
|
489
|
+
coding: Array<Coding>;
|
|
490
|
+
}>;
|
|
491
|
+
subject: Subject;
|
|
492
|
+
participant: Array<{
|
|
493
|
+
individual: Individual;
|
|
494
|
+
}>;
|
|
495
|
+
period: {
|
|
496
|
+
start: string;
|
|
497
|
+
};
|
|
498
|
+
location: Array<Location>;
|
|
499
|
+
partOf: {
|
|
500
|
+
reference: string;
|
|
501
|
+
type: string;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export interface Meta {
|
|
506
|
+
versionId: string;
|
|
507
|
+
lastUpdated: string;
|
|
508
|
+
tag: Tag[];
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export interface Tag {
|
|
512
|
+
system: string;
|
|
513
|
+
code: string;
|
|
514
|
+
display: string;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface Coding {
|
|
518
|
+
system: string;
|
|
519
|
+
code: string;
|
|
520
|
+
display: string;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export interface Subject {
|
|
524
|
+
reference: string;
|
|
525
|
+
type: string;
|
|
526
|
+
display: string;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export interface Individual {
|
|
530
|
+
reference: string;
|
|
531
|
+
type: string;
|
|
532
|
+
identifier: {
|
|
533
|
+
value: string;
|
|
534
|
+
};
|
|
535
|
+
display: string;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export interface OpenmrsEncounter extends OpenmrsResource {
|
|
539
|
+
encounterDatetime: string;
|
|
540
|
+
encounterType: {
|
|
541
|
+
uuid: string;
|
|
542
|
+
display: string;
|
|
543
|
+
};
|
|
544
|
+
patient: string;
|
|
545
|
+
location: string;
|
|
546
|
+
encounterProviders?: Array<{
|
|
547
|
+
encounterRole: string;
|
|
548
|
+
provider: { uuid: string; person: { uuid: string; display: string }; name: string };
|
|
549
|
+
display?: string;
|
|
550
|
+
}>;
|
|
551
|
+
obs: Array<OpenmrsResource>;
|
|
552
|
+
|
|
553
|
+
form?: { name: string; uuid: string };
|
|
554
|
+
|
|
555
|
+
visit?: {
|
|
556
|
+
visitType: {
|
|
557
|
+
uuid: string;
|
|
558
|
+
display: string;
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
diagnoses?: Array<{
|
|
562
|
+
uuid: string;
|
|
563
|
+
diagnosis: { coded: { display: string } };
|
|
564
|
+
}>;
|
|
565
|
+
}
|