@bahmni/clinical-app 0.0.1-dev.416 → 0.0.1-dev.417
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-G3C8Hure.js → ConsultationPage-CW0D4Kk0.js} +6834 -6834
- package/dist/{DocumentsTable-DB43_g0I-CXQb933J.js → DocumentsTable-DUyMa5Ip-BpMrZtuL.js} +1 -1
- package/dist/{FormsTable-D3g1YlR1-bbEUhecU.js → FormsTable-CbK-Zc3w-AeIeH7Wo.js} +55 -55
- package/dist/{LNWAZHJI-BwFQv-IO.js → LNWAZHJI-Bdb024Iq.js} +2 -2
- package/dist/{MWZ6AO7Z-CGhnBLXj.js → MWZ6AO7Z-bYt6Gx_o.js} +2 -2
- package/dist/{Observations-DrckbD6x-C1ZWi-fp.js → Observations-DG1ptvEC-DePIPdg8.js} +63 -63
- package/dist/{YPM2AS64-CLcTddYr.js → YPM2AS64-DMO_Iq6j.js} +1 -1
- package/dist/{hook-oaebn-sW.js → hook-nNcLbE80.js} +1 -1
- package/dist/{index-DIndpj-d.js → index-Db9JzImK.js} +5 -5
- package/dist/{index-aUrUsrFM.js → index-DksB8L5H.js} +3 -3
- package/dist/{index-DzQj0lRq.js → index-XAD--RRA.js} +18094 -18091
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { v as x, u as G, z as W,
|
|
2
|
+
import { v as x, u as G, z as W, E as J, q as X, w as Z, Y as ee, p as te } from "./index-XAD--RRA.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as h, useEffect as I, useMemo as _ } from "react";
|
|
5
5
|
const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as n, jsxs as P, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
+
import { u as he, v as Ne, i as Te, e as Oe, a as be, b as Ie, J as Ae, N as Ee, c as _e, m as ve, d as Fe, V as Me, y as Se, S as $, w as Be, A as K, f as j, q as Ce, Y as z, P as De, F as Le, p as Ue, h as Re, g as qe } from "./index-XAD--RRA.js";
|
|
3
3
|
import { useQueryClient as we, useQuery as T } from "@tanstack/react-query";
|
|
4
4
|
import { useState as Q, useMemo as i, useCallback as d } from "react";
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
7
|
-
modalHeading:
|
|
5
|
+
const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", O = {
|
|
6
|
+
formsTableBody: Ve,
|
|
7
|
+
modalHeading: ke,
|
|
8
8
|
customAccordianItem: He
|
|
9
|
-
},
|
|
9
|
+
}, xe = "startConsultation", je = ({
|
|
10
10
|
episodeOfCareUuids: F,
|
|
11
11
|
encounterUuids: l,
|
|
12
12
|
config: Y,
|
|
13
13
|
disableActions: J = !1,
|
|
14
|
-
activeEncounterUuid:
|
|
14
|
+
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t } =
|
|
17
|
-
numberOfVisits:
|
|
18
|
-
hideThumbnail:
|
|
16
|
+
const { t } = he(), m = Ne(), [p, M] = Q(!1), [o, S] = Q(null), {
|
|
17
|
+
numberOfVisits: Z,
|
|
18
|
+
hideThumbnail: X = !1,
|
|
19
19
|
forms: g
|
|
20
20
|
} = Y ?? {}, W = Te(
|
|
21
21
|
qe.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges:
|
|
22
|
+
), { userPrivileges: h } = Oe(), b = W && !J && !!y, B = be(
|
|
23
23
|
F,
|
|
24
24
|
l
|
|
25
25
|
), ee = we(), {
|
|
@@ -30,8 +30,8 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = T({
|
|
32
32
|
queryKey: ["forms", m, F],
|
|
33
|
-
queryFn: () => Ie(m, void 0,
|
|
34
|
-
enabled: !!m && !
|
|
33
|
+
queryFn: () => Ie(m, void 0, Z),
|
|
34
|
+
enabled: !!m && !B
|
|
35
35
|
}), U = i(() => {
|
|
36
36
|
let e = C;
|
|
37
37
|
return l && l.length > 0 && (e = e.filter(
|
|
@@ -39,26 +39,26 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
39
39
|
)), Array.isArray(g) && g.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => g.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [C, l, g]), { data:
|
|
42
|
+
}, [C, l, g]), { data: N = [] } = T({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => Ae()
|
|
45
45
|
}), R = d(
|
|
46
46
|
(e) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = N.find((s) => s.name === e);
|
|
48
48
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
49
|
-
if (!
|
|
50
|
-
const a = new Set(
|
|
49
|
+
if (!h || h.length === 0) return !1;
|
|
50
|
+
const a = new Set(h.map((s) => s.name));
|
|
51
51
|
return r.privileges.some(
|
|
52
52
|
(s) => a.has(s.privilegeName) && s.editable
|
|
53
53
|
);
|
|
54
54
|
},
|
|
55
|
-
[
|
|
55
|
+
[N, h]
|
|
56
56
|
), u = d(
|
|
57
|
-
(e) => !
|
|
58
|
-
[
|
|
57
|
+
(e) => !y || e.encounterUuid !== y ? !1 : R(e.formName),
|
|
58
|
+
[y, R]
|
|
59
59
|
), q = d(
|
|
60
|
-
(e) =>
|
|
61
|
-
[
|
|
60
|
+
(e) => N.find((r) => r.name === e)?.uuid,
|
|
61
|
+
[N]
|
|
62
62
|
), I = i(() => {
|
|
63
63
|
if (o)
|
|
64
64
|
return q(o.formName);
|
|
@@ -70,7 +70,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
70
70
|
} = T({
|
|
71
71
|
queryKey: ["formMetadata", I],
|
|
72
72
|
queryFn: () => Ee(I),
|
|
73
|
-
enabled: !!I &&
|
|
73
|
+
enabled: !!I && p
|
|
74
74
|
}), {
|
|
75
75
|
data: E,
|
|
76
76
|
isLoading: se,
|
|
@@ -79,7 +79,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
79
79
|
} = T({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", o?.encounterUuid],
|
|
81
81
|
queryFn: () => _e(o.encounterUuid),
|
|
82
|
-
enabled: !!o?.encounterUuid &&
|
|
82
|
+
enabled: !!o?.encounterUuid && p
|
|
83
83
|
});
|
|
84
84
|
ve(
|
|
85
85
|
(e) => {
|
|
@@ -88,41 +88,41 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
88
88
|
[m]
|
|
89
89
|
);
|
|
90
90
|
const ie = i(() => !E?.entry || !o?.formName ? [] : E.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Me(e)?.toLowerCase() === o.formName.toLowerCase() : !0), [E, o?.formName]), { controlOrder: de, sectionMap: le, conceptDatatypeMap: me } = i(
|
|
91
|
-
() =>
|
|
91
|
+
() => Se(w?.schema),
|
|
92
92
|
[w]
|
|
93
93
|
), ue = i(() => {
|
|
94
94
|
if (A)
|
|
95
|
-
return
|
|
95
|
+
return $(A).message;
|
|
96
96
|
if (_)
|
|
97
|
-
return
|
|
97
|
+
return $(_).message;
|
|
98
98
|
}, [A, _]), c = i(
|
|
99
99
|
() => [
|
|
100
100
|
{ key: "recordedOn", header: t("RECORDED_ON") },
|
|
101
101
|
{ key: "recordedBy", header: t("RECORDED_BY") }
|
|
102
102
|
],
|
|
103
103
|
[t]
|
|
104
|
-
),
|
|
104
|
+
), V = i(
|
|
105
105
|
() => [...c, { key: "actions", header: t("ACTIONS") }],
|
|
106
106
|
[c, t]
|
|
107
107
|
), ce = d(
|
|
108
|
-
(e) =>
|
|
109
|
-
[
|
|
110
|
-
), fe = c,
|
|
108
|
+
(e) => b && e.some((r) => u(r)) ? V : c,
|
|
109
|
+
[b, u, V, c]
|
|
110
|
+
), fe = c, ye = i(
|
|
111
111
|
() => [
|
|
112
112
|
{ key: "recordedOn", sortable: !0 },
|
|
113
113
|
{ key: "recordedBy", sortable: !0 }
|
|
114
114
|
],
|
|
115
115
|
[]
|
|
116
|
-
),
|
|
116
|
+
), k = i(() => {
|
|
117
117
|
const e = U.reduce(
|
|
118
118
|
(r, a) => {
|
|
119
119
|
const s = a.formName;
|
|
120
120
|
r[s] ??= [];
|
|
121
|
-
const f = a.providers.map((
|
|
121
|
+
const f = a.providers.map((pe) => pe.providerName).filter(Boolean).join(", ");
|
|
122
122
|
return r[s].push({
|
|
123
123
|
id: a.encounterUuid,
|
|
124
124
|
formName: a.formName,
|
|
125
|
-
recordedOn:
|
|
125
|
+
recordedOn: Be(a.encounterDateTime, t, !0).formattedResult,
|
|
126
126
|
recordedBy: f ?? "--",
|
|
127
127
|
encounterDateTime: a.encounterDateTime,
|
|
128
128
|
encounterUuid: a.encounterUuid
|
|
@@ -139,12 +139,12 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
139
139
|
})
|
|
140
140
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
141
141
|
}, [U, t]), H = d((e) => {
|
|
142
|
-
|
|
143
|
-
}, []),
|
|
144
|
-
M(!1),
|
|
142
|
+
S(e), M(!0);
|
|
143
|
+
}, []), x = d(() => {
|
|
144
|
+
M(!1), S(null);
|
|
145
145
|
}, []), v = d((e) => {
|
|
146
146
|
globalThis.dispatchEvent(
|
|
147
|
-
new CustomEvent(
|
|
147
|
+
new CustomEvent(xe, {
|
|
148
148
|
detail: {
|
|
149
149
|
editOnly: "observationForms",
|
|
150
150
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -154,7 +154,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
154
154
|
}
|
|
155
155
|
})
|
|
156
156
|
);
|
|
157
|
-
}, []),
|
|
157
|
+
}, []), G = d(
|
|
158
158
|
(e, r) => {
|
|
159
159
|
switch (r) {
|
|
160
160
|
case "recordedOn":
|
|
@@ -179,8 +179,8 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
179
179
|
},
|
|
180
180
|
[H, v, u, t]
|
|
181
181
|
);
|
|
182
|
-
return /* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: D || L ||
|
|
182
|
+
return /* @__PURE__ */ P(ge, { children: [
|
|
183
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: D || L || k.length === 0 || B ? /* @__PURE__ */ n(
|
|
184
184
|
z,
|
|
185
185
|
{
|
|
186
186
|
headers: fe,
|
|
@@ -189,17 +189,17 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
189
189
|
loading: D,
|
|
190
190
|
errorStateMessage: L ? re?.message : void 0,
|
|
191
191
|
emptyStateMessage: t("FORMS_UNAVAILABLE"),
|
|
192
|
-
renderCell:
|
|
193
|
-
className:
|
|
192
|
+
renderCell: G,
|
|
193
|
+
className: O.formsTableBody,
|
|
194
194
|
dataTestId: "forms-table"
|
|
195
195
|
}
|
|
196
|
-
) : /* @__PURE__ */ n(De, { align: "start", children:
|
|
196
|
+
) : /* @__PURE__ */ n(De, { align: "start", children: k.map((e, r) => {
|
|
197
197
|
const { formName: a, records: s } = e, f = ce(s);
|
|
198
198
|
return /* @__PURE__ */ n(
|
|
199
199
|
Le,
|
|
200
200
|
{
|
|
201
201
|
title: a,
|
|
202
|
-
className:
|
|
202
|
+
className: O.customAccordianItem,
|
|
203
203
|
testId: `accordian-title-${a}`,
|
|
204
204
|
open: r === 0,
|
|
205
205
|
children: /* @__PURE__ */ n(
|
|
@@ -210,10 +210,10 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
210
210
|
rows: s,
|
|
211
211
|
loading: !1,
|
|
212
212
|
errorStateMessage: "",
|
|
213
|
-
sortable:
|
|
213
|
+
sortable: ye,
|
|
214
214
|
emptyStateMessage: t("FORMS_UNAVAILABLE"),
|
|
215
|
-
renderCell:
|
|
216
|
-
className:
|
|
215
|
+
renderCell: G,
|
|
216
|
+
className: O.formsTableBody,
|
|
217
217
|
dataTestId: `forms-table-${a}`
|
|
218
218
|
}
|
|
219
219
|
)
|
|
@@ -221,16 +221,16 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
221
221
|
a
|
|
222
222
|
);
|
|
223
223
|
}) }) }),
|
|
224
|
-
|
|
224
|
+
p && o && /* @__PURE__ */ n(
|
|
225
225
|
Ue,
|
|
226
226
|
{
|
|
227
227
|
id: "modalIdForActionAreaLayout",
|
|
228
228
|
portalId: "main-display-area",
|
|
229
|
-
open:
|
|
230
|
-
onRequestClose:
|
|
231
|
-
modalHeading: /* @__PURE__ */
|
|
229
|
+
open: p,
|
|
230
|
+
onRequestClose: x,
|
|
231
|
+
modalHeading: /* @__PURE__ */ P("div", { className: O.modalHeading, children: [
|
|
232
232
|
/* @__PURE__ */ n("span", { children: o.formName }),
|
|
233
|
-
|
|
233
|
+
b && u(o) && /* @__PURE__ */ n(
|
|
234
234
|
K,
|
|
235
235
|
{
|
|
236
236
|
label: t("EDIT_OBSERVATION_FORM"),
|
|
@@ -238,7 +238,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
238
238
|
size: "sm",
|
|
239
239
|
testId: `edit-form-modal-${o.encounterUuid}`,
|
|
240
240
|
onClick: () => {
|
|
241
|
-
|
|
241
|
+
x(), v(o);
|
|
242
242
|
},
|
|
243
243
|
children: /* @__PURE__ */ n(j, {})
|
|
244
244
|
}
|
|
@@ -257,7 +257,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
257
257
|
errorMessage: ue,
|
|
258
258
|
emptyStateMessage: t("NO_FORM_DATA_AVAILABLE"),
|
|
259
259
|
testIdPrefix: o.formName,
|
|
260
|
-
hideThumbnail:
|
|
260
|
+
hideThumbnail: X,
|
|
261
261
|
controlOrder: de,
|
|
262
262
|
sectionMap: le,
|
|
263
263
|
conceptDatatypeMap: me
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { b$ as d, c0 as f, c1 as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DMO_Iq6j.js";
|
|
2
|
+
import { b$ as d, c0 as f, c1 as e } from "./index-XAD--RRA.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { b$ as v, c0 as C, c1 as e } from "./index-
|
|
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-DMO_Iq6j.js";
|
|
2
|
+
import { b$ as v, c0 as C, c1 as e } from "./index-XAD--RRA.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { v as
|
|
1
|
+
import { jsxs as I, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { v as Q, z as M, u as B, j as Y, a as j, k as G, l as H, m as J, n as P, o as W, _ as X, C as Z, r as ee, Y as ae, x as se, s as U, t as re, B as te, w as ie, R as oe, T as ne, L as de, O as le } from "./index-XAD--RRA.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as
|
|
5
|
-
const
|
|
6
|
-
observations:
|
|
4
|
+
import { useRef as me, useEffect as D, useMemo as g } from "react";
|
|
5
|
+
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", he = "Observations-module_secondary__14nuS", O = {
|
|
6
|
+
observations: pe,
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: ve,
|
|
9
9
|
secondary: he
|
|
10
|
-
},
|
|
11
|
-
const t = re(s, l, c), e = t.value,
|
|
10
|
+
}, V = (s, l, o, d, c, r) => {
|
|
11
|
+
const t = re(s, l, c), e = t.value, m = te(e);
|
|
12
12
|
let i = e;
|
|
13
|
-
|
|
13
|
+
m === "Image" && (i = /* @__PURE__ */ n(
|
|
14
14
|
ne,
|
|
15
15
|
{
|
|
16
16
|
imageSrc: e,
|
|
@@ -18,45 +18,45 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
18
18
|
id: `${e}-img`,
|
|
19
19
|
hideThumbnail: r
|
|
20
20
|
}
|
|
21
|
-
)),
|
|
21
|
+
)), m === "Video" && (i = /* @__PURE__ */ n(
|
|
22
22
|
de,
|
|
23
23
|
{
|
|
24
24
|
id: `${e}-video`,
|
|
25
25
|
videoSrc: e,
|
|
26
26
|
hideThumbnail: r
|
|
27
27
|
}
|
|
28
|
-
)),
|
|
29
|
-
const
|
|
28
|
+
)), m === "PDF" && (i = /* @__PURE__ */ n(le, { id: `${e}-pdf`, src: e }));
|
|
29
|
+
const p = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
30
30
|
/* @__PURE__ */ n("span", { children: t.header.display }),
|
|
31
31
|
t.header.referenceRange && /* @__PURE__ */ n("span", { className: O.secondary, children: t.header.referenceRange })
|
|
32
32
|
] }), u = c("OBSERVATIONS_RECORDED_BY", {
|
|
33
33
|
provider: t.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, f = /* @__PURE__ */
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, f = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
35
35
|
/* @__PURE__ */ n("span", { children: u }),
|
|
36
36
|
b && /* @__PURE__ */ n("span", { className: O.secondary, children: b })
|
|
37
|
-
] }), v = s.display, h = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs",
|
|
37
|
+
] }), v = s.display, h = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${h}-${v}-${o}-${l}` : `${h}-${v}-${o}-${l}`;
|
|
38
38
|
return /* @__PURE__ */ n(
|
|
39
39
|
oe,
|
|
40
40
|
{
|
|
41
|
-
header:
|
|
41
|
+
header: p,
|
|
42
42
|
value: i,
|
|
43
43
|
info: f,
|
|
44
|
-
id:
|
|
45
|
-
testId:
|
|
46
|
-
ariaLabel:
|
|
44
|
+
id: R,
|
|
45
|
+
testId: R,
|
|
46
|
+
ariaLabel: R
|
|
47
47
|
},
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
50
50
|
}, ye = (s, l, o, d, c, r, t) => /* @__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,
|
|
57
|
+
(e, m) => V(
|
|
58
58
|
e,
|
|
59
|
-
|
|
59
|
+
m,
|
|
60
60
|
c,
|
|
61
61
|
r,
|
|
62
62
|
l,
|
|
@@ -70,19 +70,19 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
70
70
|
title: l = "",
|
|
71
71
|
hideThumbnail: o
|
|
72
72
|
}) => {
|
|
73
|
-
const { t: d } =
|
|
74
|
-
const
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
|
|
73
|
+
const { t: d } = B(), c = (r, t, e) => {
|
|
74
|
+
const m = se(r.encounterDetails, d);
|
|
75
|
+
return /* @__PURE__ */ I(
|
|
76
|
+
U,
|
|
77
77
|
{
|
|
78
|
-
title:
|
|
78
|
+
title: m,
|
|
79
79
|
id: `encounter-${r.encounterId}`,
|
|
80
80
|
open: t,
|
|
81
81
|
children: [
|
|
82
82
|
r.observations.map(
|
|
83
|
-
(i,
|
|
83
|
+
(i, p) => V(
|
|
84
84
|
i,
|
|
85
|
-
|
|
85
|
+
p,
|
|
86
86
|
e,
|
|
87
87
|
l,
|
|
88
88
|
d,
|
|
@@ -90,11 +90,11 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
90
90
|
)
|
|
91
91
|
),
|
|
92
92
|
r.groupedObservations.map(
|
|
93
|
-
(i,
|
|
93
|
+
(i, p) => ye(
|
|
94
94
|
i,
|
|
95
95
|
d,
|
|
96
96
|
t,
|
|
97
|
-
|
|
97
|
+
p,
|
|
98
98
|
e,
|
|
99
99
|
l,
|
|
100
100
|
o
|
|
@@ -116,13 +116,13 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
},
|
|
119
|
+
}, Re = (s) => ["conceptUuid", s], _e = (s, l, o, d) => [
|
|
120
120
|
"observations",
|
|
121
121
|
s,
|
|
122
122
|
...l,
|
|
123
123
|
o,
|
|
124
124
|
d
|
|
125
|
-
],
|
|
125
|
+
], Ie = ({
|
|
126
126
|
config: s,
|
|
127
127
|
episodeOfCareUuids: l,
|
|
128
128
|
encounterUuids: o
|
|
@@ -132,73 +132,73 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: r = [],
|
|
133
133
|
hideThumbnail: t = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d,
|
|
135
|
+
} = d, m = me(/* @__PURE__ */ new Set()), i = Q(), { addNotification: p } = M(), { t: u } = B(), b = ue({
|
|
136
136
|
queries: c.map((a) => ({
|
|
137
|
-
queryKey:
|
|
138
|
-
queryFn: () =>
|
|
137
|
+
queryKey: Re(a),
|
|
138
|
+
queryFn: () => Y(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
const a = b.some((x) => x.isError), y =
|
|
144
|
-
a && !y ? (
|
|
142
|
+
D(() => {
|
|
143
|
+
const a = b.some((x) => x.isError), y = m.current.size > 0;
|
|
144
|
+
a && !y ? (p({
|
|
145
145
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
|
-
}),
|
|
149
|
-
}, [b,
|
|
150
|
-
const f = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), v = g(() => [.../* @__PURE__ */ new Set([...f, ...r])], [f, r]), h = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]),
|
|
148
|
+
}), m.current.add(0)) : !a && y && m.current.clear();
|
|
149
|
+
}, [b, p, u]);
|
|
150
|
+
const f = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), v = g(() => [.../* @__PURE__ */ new Set([...f, ...r])], [f, r]), h = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", w = j(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
|
-
data:
|
|
154
|
+
data: _,
|
|
155
155
|
isLoading: C,
|
|
156
|
-
isError:
|
|
157
|
-
refetch:
|
|
156
|
+
isError: N,
|
|
157
|
+
refetch: S
|
|
158
158
|
} = ce({
|
|
159
|
-
queryKey:
|
|
159
|
+
queryKey: _e(
|
|
160
160
|
i,
|
|
161
161
|
v,
|
|
162
162
|
o,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () =>
|
|
165
|
+
queryFn: () => R ? G(
|
|
166
166
|
i,
|
|
167
167
|
v,
|
|
168
168
|
o
|
|
169
|
-
) :
|
|
169
|
+
) : H(
|
|
170
170
|
i,
|
|
171
171
|
v,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && v.length > 0 && h && !
|
|
174
|
+
enabled: !!i && v.length > 0 && h && !w
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
J(
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
179
|
(y) => v.includes(y)
|
|
180
|
-
) &&
|
|
180
|
+
) && S();
|
|
181
181
|
},
|
|
182
|
-
[i,
|
|
183
|
-
),
|
|
184
|
-
|
|
182
|
+
[i, S]
|
|
183
|
+
), D(() => {
|
|
184
|
+
N && p({
|
|
185
185
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
|
-
}, [
|
|
189
|
+
}, [N]);
|
|
190
190
|
const $ = g(() => {
|
|
191
|
-
if (!
|
|
192
|
-
let a =
|
|
193
|
-
e === "latest-encounter" && (a =
|
|
191
|
+
if (!_) return [];
|
|
192
|
+
let a = P(_);
|
|
193
|
+
e === "latest-encounter" && (a = W(a));
|
|
194
194
|
const y = X(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [
|
|
196
|
+
}, [_, e]), F = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A = C || !h,
|
|
201
|
-
return /* @__PURE__ */
|
|
200
|
+
], A = C || !h, L = N && h, k = (!_ || _.entry?.length === 0 || v.length === 0) && h, K = L ? u("ERROR_FETCHING_OBSERVATIONS") : null, q = k ? u("NO_OBSERVATIONS_FOUND") : void 0, z = $.length > 0 && !A && !L, E = d.titleTranslationKey, T = E ? u(E) : "";
|
|
201
|
+
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
@@ -216,7 +216,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
216
216
|
children: /* @__PURE__ */ n("p", { children: T })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
219
|
+
z ? /* @__PURE__ */ n(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
@@ -240,7 +240,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
240
240
|
);
|
|
241
241
|
};
|
|
242
242
|
export {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
Re as conceptUuidQueryKeys,
|
|
244
|
+
Ie as default,
|
|
245
|
+
_e as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c2 as we, c3 as z, c4 as xt, c5 as B, c0 as q, c1 as y, c6 as Ro, c7 as ye, c8 as R, c9 as _, ca as k, cb as N, cc as A, cd as bs, ce as ir, cf as $e, cg as G, ch as Hn, ci as Vn, cj as dt, ck as D, cl as xs, cm as cn, cn as Be, co as ws, cp as qt, cq as zt, cr as $s, cs as Cs, ct as $n, cu as Ss, cv as Nr, cw as Bt, cx as zo, cy as ks, cz as Es, cA as j, cB as Gr, cC as Ms, cD as Ds, cE as sr, cF as As, cG as Ts, cH as zn, cI as Fs, cJ as Is, cK as Z, cL as Ps, cM as Ls } from "./index-
|
|
1
|
+
import { c2 as we, c3 as z, c4 as xt, c5 as B, c0 as q, c1 as y, c6 as Ro, c7 as ye, c8 as R, c9 as _, ca as k, cb as N, cc as A, cd as bs, ce as ir, cf as $e, cg as G, ch as Hn, ci as Vn, cj as dt, ck as D, cl as xs, cm as cn, cn as Be, co as ws, cp as qt, cq as zt, cr as $s, cs as Cs, ct as $n, cu as Ss, cv as Nr, cw as Bt, cx as zo, cy as ks, cz as Es, cA as j, cB as Gr, cC as Ms, cD as Ds, cE as sr, cF as As, cG as Ts, cH as zn, cI as Fs, cJ as Is, cK as Z, cL as Ps, cM as Ls } from "./index-XAD--RRA.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { u as g, e as u, bM as b, bW as f, bX as x, bY as p, aK as _, bS as N } from "./index-
|
|
2
|
+
import { u as g, e as u, bM as b, bW as f, bX as x, bY as p, aK as _, bS as N } from "./index-XAD--RRA.js";
|
|
3
3
|
import { lazy as h, useMemo as t, Suspense as E } from "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
|
-
import { u as C } from "./hook-
|
|
5
|
+
import { u as C } from "./hook-nNcLbE80.js";
|
|
6
6
|
const L = {
|
|
7
7
|
"org.bahmni.clinical.v2.search": h(
|
|
8
|
-
() => import("./index-
|
|
8
|
+
() => import("./index-DksB8L5H.js")
|
|
9
9
|
)
|
|
10
|
-
}, v = "index-module_page__16xxw",
|
|
10
|
+
}, v = "index-module_page__16xxw", A = "index-module_loading__wNI-4", I = "index-module_message__Ib5Iw", l = {
|
|
11
11
|
page: v,
|
|
12
|
-
loading:
|
|
12
|
+
loading: A,
|
|
13
13
|
message: I
|
|
14
14
|
}, w = () => {
|
|
15
15
|
const { t: i } = g(), { clinicalConfig: o } = C(), { userPrivileges: r } = u(), m = t(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { u as r, cN as l, cO as o, cP as c, bc as m, bd as g, cQ as h, cR as p, cS as b, aK as u } from "./index-
|
|
2
|
+
import { u as r, cN as l, cO as o, cP as c, bc as m, bd as g, cQ as h, cR as p, cS as b, aK as u } from "./index-XAD--RRA.js";
|
|
3
3
|
import { Suspense as _ } from "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
5
|
const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y = "index-module_panel__8VJh2", s = {
|
|
6
6
|
loading: E,
|
|
7
7
|
message: $,
|
|
8
8
|
panel: y
|
|
9
|
-
},
|
|
9
|
+
}, P = ({ extensions: i }) => {
|
|
10
10
|
const { t: n } = r();
|
|
11
11
|
return i.length === 0 ? null : /* @__PURE__ */ t(l, { children: [
|
|
12
12
|
/* @__PURE__ */ e(
|
|
@@ -77,5 +77,5 @@ const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y =
|
|
|
77
77
|
] });
|
|
78
78
|
};
|
|
79
79
|
export {
|
|
80
|
-
|
|
80
|
+
P as default
|
|
81
81
|
};
|