@bahmni/clinical-app 0.0.1-dev.461 → 0.0.1-dev.463
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/dist/{ConsultationPage-CXV01hq4.js → ConsultationPage-CF9CchqI.js} +11736 -11625
- package/dist/{DocumentsTable-CD8jsIEf-DrjoKA9C.js → DocumentsTable-P8G9FIvH-CASRvQPB.js} +150 -155
- package/dist/{FormsTable-CGD1xMCV-DpgiSejk.js → FormsTable-DXuwmAMk-nIvomkJX.js} +97 -100
- package/dist/LNWAZHJI-DY69ypnX.js +33 -0
- package/dist/{MWZ6AO7Z-BojEYN1U.js → MWZ6AO7Z-DUm3Vj4c.js} +4 -4
- package/dist/{Observations-x0JPCClc-BAwERdQ4.js → Observations-CxxRVjYb-c2wjiOAw.js} +31 -31
- package/dist/{YPM2AS64-CTLJv53e.js → YPM2AS64-e-J10QfI.js} +1 -1
- package/dist/components/consultationPad/index.d.ts +2 -2
- package/dist/components/consultationPad/index.d.ts.map +1 -1
- package/dist/components/consultationPad/utils.d.ts +3 -1
- package/dist/components/consultationPad/utils.d.ts.map +1 -1
- package/dist/components/consultationPadContainer/index.d.ts +2 -2
- package/dist/components/consultationPadContainer/index.d.ts.map +1 -1
- package/dist/components/forms/allergies/AllergiesForm.d.ts +2 -2
- package/dist/components/forms/allergies/AllergiesForm.d.ts.map +1 -1
- package/dist/components/forms/allergies/index.d.ts.map +1 -1
- package/dist/components/forms/conditionsAndDiagnoses/index.d.ts.map +1 -1
- package/dist/components/forms/documents/index.d.ts.map +1 -1
- package/dist/components/forms/encounterDetails/EncounterDetails.d.ts +2 -2
- package/dist/components/forms/encounterDetails/EncounterDetails.d.ts.map +1 -1
- package/dist/components/forms/immunization/ImmunizationForm.d.ts +2 -2
- package/dist/components/forms/immunization/ImmunizationForm.d.ts.map +1 -1
- package/dist/components/forms/immunization/index.d.ts.map +1 -1
- package/dist/components/forms/investigations/index.d.ts.map +1 -1
- package/dist/components/forms/medicationRequest/MedicationRequestForm.d.ts.map +1 -1
- package/dist/components/forms/medicationRequest/__tests__/__mocks__/MedicationRequestFormMocks.d.ts +1 -0
- package/dist/components/forms/medicationRequest/__tests__/__mocks__/MedicationRequestFormMocks.d.ts.map +1 -1
- package/dist/components/forms/medicationRequest/components/SelectedMedicationRequestItem.d.ts +2 -1
- package/dist/components/forms/medicationRequest/components/SelectedMedicationRequestItem.d.ts.map +1 -1
- package/dist/components/forms/medicationRequest/index.d.ts.map +1 -1
- package/dist/components/forms/medicationRequest/store.d.ts +2 -1
- package/dist/components/forms/medicationRequest/store.d.ts.map +1 -1
- package/dist/components/forms/medicationRequest/utils.d.ts +4 -0
- package/dist/components/forms/medicationRequest/utils.d.ts.map +1 -1
- package/dist/components/forms/models.d.ts +12 -4
- package/dist/components/forms/models.d.ts.map +1 -1
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts +2 -3
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts.map +1 -1
- package/dist/components/forms/observations/ObservationFormsPanel.d.ts +2 -2
- package/dist/components/forms/observations/ObservationFormsPanel.d.ts.map +1 -1
- package/dist/components/forms/observations/index.d.ts.map +1 -1
- package/dist/components/forms/renderer.d.ts +2 -2
- package/dist/components/forms/renderer.d.ts.map +1 -1
- package/dist/components/forms/stopMedications/StopMedicationForm.d.ts +2 -2
- package/dist/components/forms/stopMedications/StopMedicationForm.d.ts.map +1 -1
- package/dist/components/patientHeader/ConsultationActionButton.d.ts +2 -0
- package/dist/components/patientHeader/ConsultationActionButton.d.ts.map +1 -1
- package/dist/components/patientHeader/PatientHeader.d.ts.map +1 -1
- package/dist/{hook-Bb80yJ-3.js → hook-C4RJtdSk.js} +1 -1
- package/dist/{index-BPFyc-0E.js → index-BueEljGp.js} +16 -16
- package/dist/{index-BJEWkQAN.js → index-Ck_WcD0o.js} +6 -6
- package/dist/{index-Cj1SYOcJ.js → index-jAE3JXAv.js} +35392 -35411
- package/dist/index.js +2 -2
- package/dist/locales/locale_en.json +2 -0
- package/dist/locales/locale_es.json +2 -0
- package/dist/models/medication.d.ts +6 -0
- package/dist/models/medication.d.ts.map +1 -1
- package/dist/pages/ConsultationPage.d.ts.map +1 -1
- package/dist/utils/fhir/medicationRequestParser.d.ts.map +1 -1
- package/dist/utils/fhir/medicationRequestResourceCreator.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/LNWAZHJI-C64hlPI1.js +0 -33
- package/dist/events/startConsultation/constants.d.ts +0 -2
- package/dist/events/startConsultation/constants.d.ts.map +0 -1
- package/dist/events/startConsultation/event.d.ts +0 -3
- package/dist/events/startConsultation/event.d.ts.map +0 -1
- package/dist/events/startConsultation/hooks.d.ts +0 -3
- package/dist/events/startConsultation/hooks.d.ts.map +0 -1
- package/dist/events/startConsultation/index.d.ts +0 -5
- package/dist/events/startConsultation/index.d.ts.map +0 -1
- package/dist/events/startConsultation/models.d.ts +0 -15
- package/dist/events/startConsultation/models.d.ts.map +0 -1
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { a as ie, u as de,
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
7
|
-
modalHeading:
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
},
|
|
10
|
-
episodeOfCareUuids:
|
|
1
|
+
import { jsx as n, jsxs as H, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { a as ie, u as de, s as le, Z as me, f as ue, G as ce, y as fe, v as ye, w as Ne, k as pe, M as ge, g as he, h as be, N as Ae, q as K, C as $, b as Oe, $ as V, i as Te, j as Ie, c as _e, A as Ce, l as Ee } from "./index-jAE3JXAv.js";
|
|
3
|
+
import { useQueryClient as ve, useQuery as I } from "@tanstack/react-query";
|
|
4
|
+
import { useState as G, useMemo as i, useCallback as d } from "react";
|
|
5
|
+
const Le = "FormsTable-module_formsTableBody__SvGha", Be = "FormsTable-module_modalHeading__wnTmA", Fe = "FormsTable-module_customAccordianItem__isszs", g = {
|
|
6
|
+
formsTableBody: Le,
|
|
7
|
+
modalHeading: Be,
|
|
8
|
+
customAccordianItem: Fe
|
|
9
|
+
}, Se = ({
|
|
10
|
+
episodeOfCareUuids: _,
|
|
11
11
|
encounterUuids: l,
|
|
12
|
-
config:
|
|
12
|
+
config: j,
|
|
13
13
|
disableActions: x = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: o } = ie(), m = de(), [
|
|
17
|
-
numberOfVisits:
|
|
18
|
-
hideThumbnail:
|
|
16
|
+
const { t: o } = ie(), m = de(), [h, C] = G(!1), [t, E] = G(null), {
|
|
17
|
+
numberOfVisits: z,
|
|
18
|
+
hideThumbnail: Q = !1,
|
|
19
19
|
forms: N
|
|
20
|
-
} =
|
|
21
|
-
|
|
22
|
-
), { userPrivileges:
|
|
23
|
-
|
|
20
|
+
} = j ?? {}, Z = le(
|
|
21
|
+
Ee.EDIT_OBSERVATIONS
|
|
22
|
+
), { userPrivileges: p } = me(), b = Z && !x && !!y, v = ue(
|
|
23
|
+
_,
|
|
24
24
|
l
|
|
25
|
-
),
|
|
26
|
-
data:
|
|
27
|
-
isLoading:
|
|
28
|
-
isError:
|
|
29
|
-
error:
|
|
30
|
-
refetch:
|
|
31
|
-
} =
|
|
32
|
-
queryKey: ["forms", m,
|
|
33
|
-
queryFn: () => ce(m, void 0,
|
|
25
|
+
), P = ve(), {
|
|
26
|
+
data: L = [],
|
|
27
|
+
isLoading: B,
|
|
28
|
+
isError: F,
|
|
29
|
+
error: Y,
|
|
30
|
+
refetch: J
|
|
31
|
+
} = I({
|
|
32
|
+
queryKey: ["forms", m, _],
|
|
33
|
+
queryFn: () => ce(m, void 0, z),
|
|
34
34
|
enabled: !!m && !v
|
|
35
|
-
}),
|
|
36
|
-
let e =
|
|
35
|
+
}), R = i(() => {
|
|
36
|
+
let e = L;
|
|
37
37
|
return l && l.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => l.includes(r.encounterUuid)
|
|
39
39
|
)), Array.isArray(N) && N.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => N.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [L, l, N]), { data: M = [] } = I({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => fe()
|
|
45
|
-
}),
|
|
45
|
+
}), U = d(
|
|
46
46
|
(e) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = M.find(
|
|
48
48
|
(s) => s.name.toLowerCase() === e.toLowerCase()
|
|
49
49
|
);
|
|
50
50
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
51
|
-
if (!
|
|
52
|
-
const a = new Set(
|
|
51
|
+
if (!p || p.length === 0) return !1;
|
|
52
|
+
const a = new Set(p.map((s) => s.name));
|
|
53
53
|
return r.privileges.some(
|
|
54
54
|
(s) => a.has(s.privilegeName) && s.editable
|
|
55
55
|
);
|
|
56
56
|
},
|
|
57
|
-
[
|
|
57
|
+
[M, p]
|
|
58
58
|
), u = d(
|
|
59
|
-
(e) => !y || e.encounterUuid !== y ? !1 :
|
|
60
|
-
[y,
|
|
59
|
+
(e) => !y || e.encounterUuid !== y ? !1 : U(e.formName),
|
|
60
|
+
[y, U]
|
|
61
61
|
), {
|
|
62
|
-
data:
|
|
63
|
-
isLoading:
|
|
64
|
-
isError:
|
|
65
|
-
error:
|
|
66
|
-
} =
|
|
62
|
+
data: A,
|
|
63
|
+
isLoading: W,
|
|
64
|
+
isError: X,
|
|
65
|
+
error: O
|
|
66
|
+
} = I({
|
|
67
67
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
68
68
|
queryFn: () => ye(t.encounterUuid),
|
|
69
|
-
enabled: !!t?.encounterUuid &&
|
|
69
|
+
enabled: !!t?.encounterUuid && h
|
|
70
70
|
});
|
|
71
71
|
Ne(
|
|
72
72
|
(e) => {
|
|
73
|
-
e.patientUUID === m && (
|
|
73
|
+
e.patientUUID === m && (J(), P.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
74
|
},
|
|
75
75
|
[m]
|
|
76
76
|
);
|
|
77
|
-
const ee = i(() => !
|
|
78
|
-
if (
|
|
79
|
-
return
|
|
80
|
-
}, [
|
|
77
|
+
const ee = i(() => !A?.entry || !t?.formName ? [] : A.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => pe(e) ? ge(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [A, t?.formName]), re = i(() => {
|
|
78
|
+
if (O)
|
|
79
|
+
return he(O).message;
|
|
80
|
+
}, [O]), c = i(
|
|
81
81
|
() => [
|
|
82
82
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
83
83
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
84
84
|
],
|
|
85
85
|
[o]
|
|
86
|
-
),
|
|
86
|
+
), D = i(
|
|
87
87
|
() => [...c, { key: "actions", header: o("ACTIONS") }],
|
|
88
88
|
[c, o]
|
|
89
89
|
), ae = d(
|
|
90
|
-
(e) =>
|
|
91
|
-
[
|
|
90
|
+
(e) => b && e.some((r) => u(r)) ? D : c,
|
|
91
|
+
[b, u, D, c]
|
|
92
92
|
), oe = c, te = i(
|
|
93
93
|
() => [
|
|
94
94
|
{ key: "recordedOn", sortable: !0 },
|
|
95
95
|
{ key: "recordedBy", sortable: !0 }
|
|
96
96
|
],
|
|
97
97
|
[]
|
|
98
|
-
),
|
|
99
|
-
const e =
|
|
98
|
+
), S = i(() => {
|
|
99
|
+
const e = R.reduce(
|
|
100
100
|
(r, a) => {
|
|
101
101
|
const s = a.formName;
|
|
102
102
|
r[s] ??= [];
|
|
@@ -104,7 +104,7 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
104
104
|
return r[s].push({
|
|
105
105
|
id: a.encounterUuid,
|
|
106
106
|
formName: a.formName,
|
|
107
|
-
recordedOn:
|
|
107
|
+
recordedOn: be(a.encounterDateTime, o, !0).formattedResult,
|
|
108
108
|
recordedBy: f ?? "--",
|
|
109
109
|
encounterDateTime: a.encounterDateTime,
|
|
110
110
|
encounterUuid: a.encounterUuid
|
|
@@ -120,72 +120,69 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
120
120
|
)
|
|
121
121
|
})
|
|
122
122
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
|
-
}, [
|
|
124
|
-
|
|
125
|
-
}, []),
|
|
126
|
-
|
|
127
|
-
}, []),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
})
|
|
138
|
-
);
|
|
139
|
-
}, []), V = d(
|
|
123
|
+
}, [R, o]), k = d((e) => {
|
|
124
|
+
E(e), C(!0);
|
|
125
|
+
}, []), w = d(() => {
|
|
126
|
+
C(!1), E(null);
|
|
127
|
+
}, []), T = d((e) => {
|
|
128
|
+
Ae({
|
|
129
|
+
context: {
|
|
130
|
+
encounter: { resourceType: "Encounter", id: e.encounterUuid },
|
|
131
|
+
formName: e.formName,
|
|
132
|
+
directFormMode: !0
|
|
133
|
+
},
|
|
134
|
+
action: { type: "update", resourceType: "Observation" }
|
|
135
|
+
});
|
|
136
|
+
}, []), q = d(
|
|
140
137
|
(e, r) => {
|
|
141
138
|
switch (r) {
|
|
142
139
|
case "recordedOn":
|
|
143
|
-
return /* @__PURE__ */ n(Oe, { onClick: () =>
|
|
140
|
+
return /* @__PURE__ */ n(Oe, { onClick: () => k(e), children: e.recordedOn });
|
|
144
141
|
case "recordedBy":
|
|
145
142
|
return e.recordedBy;
|
|
146
143
|
case "actions":
|
|
147
144
|
return u(e) ? /* @__PURE__ */ n(
|
|
148
|
-
|
|
145
|
+
K,
|
|
149
146
|
{
|
|
150
147
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
151
148
|
kind: "ghost",
|
|
152
149
|
size: "sm",
|
|
153
150
|
testId: `edit-form-${e.encounterUuid}`,
|
|
154
|
-
onClick: () =>
|
|
155
|
-
children: /* @__PURE__ */ n(
|
|
151
|
+
onClick: () => T(e),
|
|
152
|
+
children: /* @__PURE__ */ n($, {})
|
|
156
153
|
}
|
|
157
154
|
) : null;
|
|
158
155
|
default:
|
|
159
156
|
return null;
|
|
160
157
|
}
|
|
161
158
|
},
|
|
162
|
-
[
|
|
159
|
+
[k, T, u, o]
|
|
163
160
|
);
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
166
|
-
|
|
161
|
+
return /* @__PURE__ */ H(ne, { children: [
|
|
162
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: B || F || S.length === 0 || v ? /* @__PURE__ */ n(
|
|
163
|
+
V,
|
|
167
164
|
{
|
|
168
165
|
headers: oe,
|
|
169
166
|
ariaLabel: o("FORMS_HEADING"),
|
|
170
167
|
rows: [],
|
|
171
|
-
loading:
|
|
172
|
-
errorStateMessage:
|
|
168
|
+
loading: B,
|
|
169
|
+
errorStateMessage: F ? Y?.message : void 0,
|
|
173
170
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
174
|
-
renderCell:
|
|
171
|
+
renderCell: q,
|
|
175
172
|
className: g.formsTableBody,
|
|
176
173
|
dataTestId: "forms-table"
|
|
177
174
|
}
|
|
178
|
-
) : /* @__PURE__ */ n(
|
|
175
|
+
) : /* @__PURE__ */ n(Te, { align: "start", children: S.map((e, r) => {
|
|
179
176
|
const { formName: a, records: s } = e, f = ae(s);
|
|
180
177
|
return /* @__PURE__ */ n(
|
|
181
|
-
|
|
178
|
+
Ie,
|
|
182
179
|
{
|
|
183
180
|
title: a,
|
|
184
181
|
className: g.customAccordianItem,
|
|
185
182
|
testId: `accordian-title-${a}`,
|
|
186
183
|
open: r === 0,
|
|
187
184
|
children: /* @__PURE__ */ n(
|
|
188
|
-
|
|
185
|
+
V,
|
|
189
186
|
{
|
|
190
187
|
headers: f,
|
|
191
188
|
ariaLabel: o("FORMS_HEADING"),
|
|
@@ -194,7 +191,7 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
194
191
|
errorStateMessage: "",
|
|
195
192
|
sortable: te,
|
|
196
193
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
197
|
-
renderCell:
|
|
194
|
+
renderCell: q,
|
|
198
195
|
className: g.formsTableBody,
|
|
199
196
|
dataTestId: `forms-table-${a}`
|
|
200
197
|
}
|
|
@@ -203,26 +200,26 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
203
200
|
a
|
|
204
201
|
);
|
|
205
202
|
}) }) }),
|
|
206
|
-
|
|
207
|
-
|
|
203
|
+
h && t && /* @__PURE__ */ n(
|
|
204
|
+
_e,
|
|
208
205
|
{
|
|
209
206
|
id: "modalIdForActionAreaLayout",
|
|
210
207
|
portalId: "main-display-area",
|
|
211
|
-
open:
|
|
212
|
-
onRequestClose:
|
|
213
|
-
modalHeading: /* @__PURE__ */
|
|
208
|
+
open: h,
|
|
209
|
+
onRequestClose: w,
|
|
210
|
+
modalHeading: /* @__PURE__ */ H("div", { className: g.modalHeading, children: [
|
|
214
211
|
/* @__PURE__ */ n("span", { children: t.formName }),
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
b && u(t) && /* @__PURE__ */ n(
|
|
213
|
+
K,
|
|
217
214
|
{
|
|
218
215
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
219
216
|
kind: "ghost",
|
|
220
217
|
size: "sm",
|
|
221
218
|
testId: `edit-form-modal-${t.encounterUuid}`,
|
|
222
219
|
onClick: () => {
|
|
223
|
-
|
|
220
|
+
w(), T(t);
|
|
224
221
|
},
|
|
225
|
-
children: /* @__PURE__ */ n(
|
|
222
|
+
children: /* @__PURE__ */ n($, {})
|
|
226
223
|
}
|
|
227
224
|
)
|
|
228
225
|
] }),
|
|
@@ -231,15 +228,15 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
231
228
|
size: "md",
|
|
232
229
|
testId: "form-details-modal",
|
|
233
230
|
children: /* @__PURE__ */ n(
|
|
234
|
-
|
|
231
|
+
Ce,
|
|
235
232
|
{
|
|
236
233
|
observations: ee,
|
|
237
|
-
isLoading:
|
|
238
|
-
isError:
|
|
234
|
+
isLoading: W,
|
|
235
|
+
isError: X,
|
|
239
236
|
errorMessage: re,
|
|
240
237
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
241
238
|
testIdPrefix: t.formName,
|
|
242
|
-
hideThumbnail:
|
|
239
|
+
hideThumbnail: Q,
|
|
243
240
|
formName: t.formName
|
|
244
241
|
}
|
|
245
242
|
)
|
|
@@ -248,5 +245,5 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
248
245
|
] });
|
|
249
246
|
};
|
|
250
247
|
export {
|
|
251
|
-
|
|
248
|
+
Se as default
|
|
252
249
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { c as s, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-e-J10QfI.js";
|
|
2
|
+
import { cm as d, cn as f, co as e } from "./index-jAE3JXAv.js";
|
|
3
|
+
var p = (a) => {
|
|
4
|
+
const [r, o] = s({
|
|
5
|
+
prefix: "TanstackQueryDevtools"
|
|
6
|
+
}), n = d(), c = f(() => {
|
|
7
|
+
const t = r.theme_preference || l;
|
|
8
|
+
return t !== "system" ? t : n();
|
|
9
|
+
});
|
|
10
|
+
return e(i.Provider, {
|
|
11
|
+
value: a,
|
|
12
|
+
get children() {
|
|
13
|
+
return e(m, {
|
|
14
|
+
localStore: r,
|
|
15
|
+
setLocalStore: o,
|
|
16
|
+
get children() {
|
|
17
|
+
return e(u.Provider, {
|
|
18
|
+
value: c,
|
|
19
|
+
get children() {
|
|
20
|
+
return e(v, {
|
|
21
|
+
localStore: r,
|
|
22
|
+
setLocalStore: o
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}, C = p;
|
|
31
|
+
export {
|
|
32
|
+
C as default
|
|
33
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as
|
|
2
|
-
import {
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-e-J10QfI.js";
|
|
2
|
+
import { cm as v, cn as C, co as e } from "./index-jAE3JXAv.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -10,12 +10,12 @@ var h = (t) => {
|
|
|
10
10
|
return e(d.Provider, {
|
|
11
11
|
value: t,
|
|
12
12
|
get children() {
|
|
13
|
-
return e(
|
|
13
|
+
return e(u, {
|
|
14
14
|
disabled: !0,
|
|
15
15
|
localStore: r,
|
|
16
16
|
setLocalStore: o,
|
|
17
17
|
get children() {
|
|
18
|
-
return e(
|
|
18
|
+
return e(i.Provider, {
|
|
19
19
|
value: l,
|
|
20
20
|
get children() {
|
|
21
21
|
return e(m, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as S, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { u as z, z as Q, a as
|
|
2
|
+
import { u as z, z as Q, a as B, m as H, f as M, W as G, n as j, w as P, o as W, x as J, B as Y, D as X, p as ee, $ as ae, E as se, F as U, H as te, I as re, h as ie, P as oe, S as ne, T as de, U as le } from "./index-jAE3JXAv.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as pe, useEffect as L, useMemo as g } from "react";
|
|
5
5
|
const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
|
|
@@ -7,7 +7,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
|
-
},
|
|
10
|
+
}, V = (s, l, o, d, c, t) => {
|
|
11
11
|
const r = te(s, l, c), e = r.value, p = re(e);
|
|
12
12
|
let i = e;
|
|
13
13
|
p === "Image" && (i = /* @__PURE__ */ n(
|
|
@@ -48,13 +48,13 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
50
50
|
}, ye = (s, l, o, d, c, t, r) => /* @__PURE__ */ n(
|
|
51
|
-
|
|
51
|
+
U,
|
|
52
52
|
{
|
|
53
53
|
title: s.display,
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: o,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e, p) =>
|
|
57
|
+
(e, p) => V(
|
|
58
58
|
e,
|
|
59
59
|
p,
|
|
60
60
|
c,
|
|
@@ -70,17 +70,17 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
70
70
|
title: l = "",
|
|
71
71
|
hideThumbnail: o
|
|
72
72
|
}) => {
|
|
73
|
-
const { t: d } =
|
|
73
|
+
const { t: d } = B(), c = (t, r, e) => {
|
|
74
74
|
const p = se(t.encounterDetails, d);
|
|
75
75
|
return /* @__PURE__ */ S(
|
|
76
|
-
|
|
76
|
+
U,
|
|
77
77
|
{
|
|
78
78
|
title: p,
|
|
79
79
|
id: `encounter-${t.encounterId}`,
|
|
80
80
|
open: r,
|
|
81
81
|
children: [
|
|
82
82
|
t.observations.map(
|
|
83
|
-
(i, m) =>
|
|
83
|
+
(i, m) => V(
|
|
84
84
|
i,
|
|
85
85
|
m,
|
|
86
86
|
e,
|
|
@@ -132,10 +132,10 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: t = [],
|
|
133
133
|
hideThumbnail: r = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d, p = pe(/* @__PURE__ */ new Set()), i = z(), { addNotification: m } = Q(), { t: u } =
|
|
135
|
+
} = d, p = pe(/* @__PURE__ */ new Set()), i = z(), { addNotification: m } = Q(), { t: u } = B(), b = ue({
|
|
136
136
|
queries: c.map((a) => ({
|
|
137
137
|
queryKey: Re(a),
|
|
138
|
-
queryFn: () =>
|
|
138
|
+
queryFn: () => H(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
@@ -147,14 +147,14 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
147
147
|
type: "error"
|
|
148
148
|
}), p.current.add(0)) : !a && y && p.current.clear();
|
|
149
149
|
}, [b, m, u]);
|
|
150
|
-
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...t])], [T, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter",
|
|
150
|
+
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...t])], [T, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", w = M(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
154
|
data: _,
|
|
155
|
-
isLoading:
|
|
156
|
-
isError:
|
|
157
|
-
refetch:
|
|
155
|
+
isLoading: F,
|
|
156
|
+
isError: N,
|
|
157
|
+
refetch: $
|
|
158
158
|
} = ce({
|
|
159
159
|
queryKey: _e(
|
|
160
160
|
i,
|
|
@@ -162,42 +162,42 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
162
162
|
o,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () => R ?
|
|
165
|
+
queryFn: () => R ? G(
|
|
166
166
|
i,
|
|
167
167
|
h,
|
|
168
168
|
o
|
|
169
|
-
) :
|
|
169
|
+
) : j(
|
|
170
170
|
i,
|
|
171
171
|
h,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && h.length > 0 && v && !
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !w
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
P(
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
179
|
(y) => h.includes(y)
|
|
180
|
-
) &&
|
|
180
|
+
) && $();
|
|
181
181
|
},
|
|
182
|
-
[i,
|
|
182
|
+
[i, $]
|
|
183
183
|
), L(() => {
|
|
184
|
-
|
|
184
|
+
N && m({
|
|
185
185
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
|
-
}, [
|
|
190
|
-
const
|
|
189
|
+
}, [N]);
|
|
190
|
+
const I = g(() => {
|
|
191
191
|
if (!_) return [];
|
|
192
|
-
let a =
|
|
193
|
-
e === "latest-encounter" && (a =
|
|
194
|
-
const y =
|
|
192
|
+
let a = W(_);
|
|
193
|
+
e === "latest-encounter" && (a = J(a));
|
|
194
|
+
const y = Y(a);
|
|
195
195
|
return X(y);
|
|
196
|
-
}, [_, e]),
|
|
196
|
+
}, [_, e]), k = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A =
|
|
200
|
+
], A = F || !v, D = N && v, q = (!_ || _.entry?.length === 0 || h.length === 0) && v, x = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, C = q ? u("NO_OBSERVATIONS_FOUND") : void 0, K = I.length > 0 && !A && !D, E = d.titleTranslationKey, f = E ? u(E) : "";
|
|
201
201
|
return /* @__PURE__ */ S(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
@@ -219,19 +219,19 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
219
219
|
K ? /* @__PURE__ */ n(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
|
-
groupedData:
|
|
222
|
+
groupedData: I,
|
|
223
223
|
title: f,
|
|
224
224
|
hideThumbnail: r
|
|
225
225
|
}
|
|
226
226
|
) : /* @__PURE__ */ n(
|
|
227
227
|
ae,
|
|
228
228
|
{
|
|
229
|
-
headers:
|
|
229
|
+
headers: k,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: u("OBSERVATIONS"),
|
|
232
232
|
loading: A,
|
|
233
|
-
errorStateMessage:
|
|
234
|
-
emptyStateMessage:
|
|
233
|
+
errorStateMessage: x,
|
|
234
|
+
emptyStateMessage: C ?? u("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cp as we, cq as z, cr as xt, cs as B, cn as q, co as y, ct as Ro, cu as ye, cv as R, cw as _, cx as k, cy as N, cz as A, cA as bs, cB as ir, cC as $e, cD as U, cE as Hn, cF as Vn, cG as dt, cH as D, cI as xs, cJ as cn, cK as Be, cL as ws, cM as qt, cN as zt, cO as $s, cP as Cs, cQ as $n, cR as Ss, cS as Nr, cT as Bt, cU as zo, cV as ks, cW as Es, cX as j, cY as Ur, cZ as Ms, c_ as Ds, c$ as sr, d0 as As, d1 as Ts, d2 as zn, d3 as Fs, d4 as Is, d5 as Z, d6 as Ps, d7 as Ls } from "./index-jAE3JXAv.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { ConsultationEventPayload } from '@bahmni/services';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
|
-
import { EncounterSessionStartContext } from '../../events/startConsultation';
|
|
3
3
|
interface ConsultationPadProps {
|
|
4
|
-
encounterSessionStartContext:
|
|
4
|
+
encounterSessionStartContext: ConsultationEventPayload;
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
isActionAreaExpanded?: boolean;
|
|
7
7
|
onToggleActionAreaExpand?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAcL,KAAK,wBAAwB,EAC9B,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAON,MAAM,OAAO,CAAC;AA8Bf,UAAU,oBAAoB;IAC5B,4BAA4B,EAAE,wBAAwB,CAAC;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6kBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConsultationEventAction, ConsultationEventContext } from '@bahmni/services';
|
|
1
2
|
import { Encounter } from 'fhir/r4';
|
|
2
3
|
import { ConsultationPad } from '../../providers/clinicalConfig/models';
|
|
3
4
|
import { InputControl } from '../forms';
|
|
@@ -9,7 +10,8 @@ export declare function getActiveEncounter(args: {
|
|
|
9
10
|
sessionEncounterStatus: QueryStatus;
|
|
10
11
|
}): Encounter | null | undefined;
|
|
11
12
|
export declare function loadEncounterInputControls(config: ConsultationPad | undefined): InputControl[];
|
|
12
|
-
export declare function getActiveEntries(registry: InputControl[],
|
|
13
|
+
export declare function getActiveEntries(registry: InputControl[], context: ConsultationEventContext | undefined, action: ConsultationEventAction | undefined): InputControl[];
|
|
14
|
+
export declare function getPadTitleKey(context: ConsultationEventContext | undefined, action: ConsultationEventAction | undefined, activeEntries: InputControl[]): string;
|
|
13
15
|
/**
|
|
14
16
|
* Splits the active entries into those that submit directly (REST) and
|
|
15
17
|
* those that go through the encounter bundle. An entry may do both:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,KAAK,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEnD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,eAAe,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,gBAAgB,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,sBAAsB,EAAE,WAAW,CAAC;CACrC,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAe/B;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,YAAY,EAAE,CA6BhB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,YAAY,EAAE,EACxB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC9B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,KAAK,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEnD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,eAAe,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,gBAAgB,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,sBAAsB,EAAE,WAAW,CAAC;CACrC,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAe/B;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,YAAY,EAAE,CA6BhB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,YAAY,EAAE,EACxB,OAAO,EAAE,wBAAwB,GAAG,SAAS,EAC7C,MAAM,EAAE,uBAAuB,GAAG,SAAS,GAC1C,YAAY,EAAE,CAgDhB;AAsBD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,wBAAwB,GAAG,SAAS,EAC7C,MAAM,EAAE,uBAAuB,GAAG,SAAS,EAC3C,aAAa,EAAE,YAAY,EAAE,GAC5B,MAAM,CAeR;AAED;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,aAAa,EAAE,YAAY,EAAE,GAC5B,OAAO,CAAC;IACT,mBAAmB,EAAE,YAAY,EAAE,CAAC;IACpC,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B,CAAC,CAcD;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,YAAY,EAAE;;;;;;;;EAmC9D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { ConsultationEventPayload } from '@bahmni/services';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
|
-
import { EncounterSessionStartContext } from '../../events/startConsultation';
|
|
3
3
|
interface ConsultationPadContainerProps {
|
|
4
|
-
encounterSessionStartContext:
|
|
4
|
+
encounterSessionStartContext: ConsultationEventPayload;
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
isActionAreaExpanded?: boolean;
|
|
7
7
|
onToggleActionAreaExpand?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPadContainer/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPadContainer/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,wBAAwB,EAC9B,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,KAMN,MAAM,OAAO,CAAC;AAYf,UAAU,6BAA6B;IACrC,4BAA4B,EAAE,wBAAwB,CAAC;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAgQrE,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ConsultationEventPayload } from '@bahmni/services';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
|
-
import { EncounterSessionStartContext } from '../../../events/startConsultation';
|
|
3
3
|
/**
|
|
4
4
|
* AllergiesForm component
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@ import { EncounterSessionStartContext } from '../../../events/startConsultation'
|
|
|
7
7
|
* It allows users to search for allergies, select them, and specify severity and reactions.
|
|
8
8
|
*/
|
|
9
9
|
declare const AllergiesForm: React.FC<{
|
|
10
|
-
encounterSessionStartContext?:
|
|
10
|
+
encounterSessionStartContext?: ConsultationEventPayload;
|
|
11
11
|
}>;
|
|
12
12
|
export default AllergiesForm;
|
|
13
13
|
//# sourceMappingURL=AllergiesForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllergiesForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/allergies/AllergiesForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AllergiesForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/allergies/AllergiesForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAML,KAAK,wBAAwB,EAC9B,MAAM,kBAAkB,CAAC;AAS1B,OAAO,KAMN,MAAM,OAAO,CAAC;AAYf;;;;;GAKG;AACH,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAC5B,4BAA4B,CAAC,EAAE,wBAAwB,CAAC;CACzD,CAyVC,CAAC;AAIH,eAAe,aAAa,CAAC"}
|