@bahmni/registration-app 0.0.1-dev.207 → 0.0.1-dev.208
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/{DocumentsTable-Xq284Jaw-D0m60JFP.js → DocumentsTable-D76ekIcO-Cvj957kc.js} +11 -11
- package/dist/{FormsTable-DLOTuk1I-18G3Rsf4.js → FormsTable-qUtc8I5l-BplISPid.js} +66 -66
- package/dist/{LNWAZHJI-Dd1VkVZE.js → LNWAZHJI-CJn8kTg4.js} +4 -4
- package/dist/{MWZ6AO7Z-Q1aqd5d2.js → MWZ6AO7Z-6V0LrWMJ.js} +2 -2
- package/dist/{Observations-hudkuWv0-EjZxzIjh.js → Observations-CdYZgPQ1-D-eaozih.js} +56 -56
- package/dist/{YPM2AS64-CoFd7sn5.js → YPM2AS64-CV-PpqEY.js} +1 -1
- package/dist/{index-eLpB86wi.js → index-CT5YDE2N.js} +16574 -16520
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as r, jsxs as p, Fragment as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { c as K, u as Q, e as W, a as X, V as J, C as Z, x as ee, L as te } from "./index-CT5YDE2N.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as m, useCallback as h, useEffect as f, useMemo as T } from "react";
|
|
5
5
|
const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", me = "_documentImage_1voj8_50", d = {
|
|
@@ -21,10 +21,10 @@ const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11",
|
|
|
21
21
|
function j(a) {
|
|
22
22
|
return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
|
|
23
23
|
}
|
|
24
|
-
function ue(a,
|
|
24
|
+
function ue(a, E) {
|
|
25
25
|
return a.map((s) => ({
|
|
26
26
|
key: s,
|
|
27
|
-
header:
|
|
27
|
+
header: E(le[s])
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
const _e = [
|
|
@@ -33,12 +33,12 @@ const _e = [
|
|
|
33
33
|
"uploadedOn",
|
|
34
34
|
"uploadedBy",
|
|
35
35
|
"action"
|
|
36
|
-
], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids:
|
|
36
|
+
], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids: E }) => {
|
|
37
37
|
const [s, L] = m(!1), [o, w] = m(
|
|
38
38
|
null
|
|
39
39
|
), [R, C] = m(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
),
|
|
41
|
+
), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 10, [I, A] = m(1), [l, V] = m($), [k, y] = m(void 0), M = h((e) => {
|
|
42
42
|
w(e), L(!0);
|
|
43
43
|
}, []), F = h(() => {
|
|
44
44
|
L(!1), w(null), C(/* @__PURE__ */ new Set());
|
|
@@ -47,15 +47,15 @@ const _e = [
|
|
|
47
47
|
}, []), { data: u, isLoading: H, isError: D, error: v } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
50
|
-
E,
|
|
51
50
|
g,
|
|
51
|
+
E,
|
|
52
52
|
I,
|
|
53
53
|
l
|
|
54
54
|
],
|
|
55
|
-
enabled: !!
|
|
55
|
+
enabled: !!g,
|
|
56
56
|
queryFn: () => X(
|
|
57
|
-
E,
|
|
58
57
|
g,
|
|
58
|
+
E,
|
|
59
59
|
l,
|
|
60
60
|
I
|
|
61
61
|
)
|
|
@@ -64,7 +64,7 @@ const _e = [
|
|
|
64
64
|
u && y(u.total);
|
|
65
65
|
}, [u]), f(() => {
|
|
66
66
|
A(1), y(void 0);
|
|
67
|
-
}, [
|
|
67
|
+
}, [g]), f(() => {
|
|
68
68
|
D && U({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: v?.message ?? "",
|
|
@@ -137,7 +137,7 @@ const _e = [
|
|
|
137
137
|
},
|
|
138
138
|
[M, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */ p(
|
|
140
|
+
return /* @__PURE__ */ p(Y, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsx as o, jsxs as p, Fragment as
|
|
2
|
-
import { u as O, c as ae,
|
|
3
|
-
import { useQueryClient as ye, useQuery as
|
|
4
|
-
import { useState as
|
|
5
|
-
const Ne = "_formsTableBody_1pd36_1",
|
|
1
|
+
import { jsx as o, jsxs as p, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { u as O, c as ae, b as te, l as oe, i as ne, s as se, d as de, w as me, C as ie, V as le, x as q, Z as ce, k as ue, L as be, D as pe, f as k, o as fe, G as K, M as A, t as _e, $ as $e, I as he, S as ge, n as ve } from "./index-CT5YDE2N.js";
|
|
3
|
+
import { useQueryClient as ye, useQuery as L } from "@tanstack/react-query";
|
|
4
|
+
import { useState as H, useMemo as v, useCallback as C } from "react";
|
|
5
|
+
const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Ae = "_formDetailsContainer_1pd36_25", Fe = "_observation_1pd36_30", Re = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", De = "_groupMembers_1pd36_75", Se = "_memberRow_1pd36_81", Ve = "_memberLabel_1pd36_86", we = "_memberValue_1pd36_94", xe = "_abnormalValue_1pd36_102", Ee = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", qe = "_nestedGroupMembers_1pd36_141", n = {
|
|
6
6
|
formsTableBody: Ne,
|
|
7
|
-
customAccordianItem:
|
|
8
|
-
formContent:
|
|
9
|
-
formDetailsContainer:
|
|
10
|
-
observation:
|
|
7
|
+
customAccordianItem: Le,
|
|
8
|
+
formContent: Ce,
|
|
9
|
+
formDetailsContainer: Ae,
|
|
10
|
+
observation: Fe,
|
|
11
11
|
groupContainer: Re,
|
|
12
|
-
rowContainer:
|
|
13
|
-
groupLabel:
|
|
12
|
+
rowContainer: Ie,
|
|
13
|
+
groupLabel: Me,
|
|
14
14
|
rowLabel: Oe,
|
|
15
15
|
rowValue: Te,
|
|
16
|
-
groupMembers:
|
|
17
|
-
memberRow:
|
|
18
|
-
memberLabel:
|
|
19
|
-
memberValue:
|
|
20
|
-
abnormalValue:
|
|
16
|
+
groupMembers: De,
|
|
17
|
+
memberRow: Se,
|
|
18
|
+
memberLabel: Ve,
|
|
19
|
+
memberValue: we,
|
|
20
|
+
abnormalValue: xe,
|
|
21
21
|
commentSection: Ee,
|
|
22
22
|
commentText: Be,
|
|
23
23
|
nestedGroup: Ge,
|
|
24
24
|
nestedGroupLabel: Ue,
|
|
25
25
|
nestedGroupMembers: qe
|
|
26
|
-
},
|
|
26
|
+
}, j = (e) => {
|
|
27
27
|
const r = _e(e);
|
|
28
28
|
return r === "Image" ? /* @__PURE__ */ o(
|
|
29
29
|
$e,
|
|
@@ -33,13 +33,13 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
33
33
|
id: `${e}-img`
|
|
34
34
|
}
|
|
35
35
|
) : r === "Video" ? /* @__PURE__ */ o(he, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ o(ge, { id: `${e}-pdf`, src: e }) : e;
|
|
36
|
-
},
|
|
36
|
+
}, Q = (e) => {
|
|
37
37
|
const r = e.observationValue?.referenceRange?.low?.value, s = e.observationValue?.referenceRange?.high?.value, a = r != null, l = s != null;
|
|
38
38
|
let d = "";
|
|
39
39
|
a && l ? d = ` (${r} - ${s})` : a ? d = ` (>${r})` : l && (d = ` (<${s})`);
|
|
40
40
|
const b = e.observationValue?.isAbnormal === !0;
|
|
41
41
|
return { rangeString: d, isAbnormal: b };
|
|
42
|
-
},
|
|
42
|
+
}, Z = ({
|
|
43
43
|
member: e,
|
|
44
44
|
depth: r = 0,
|
|
45
45
|
memberIndex: s = 0,
|
|
@@ -69,7 +69,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
69
69
|
className: n.nestedGroupMembers,
|
|
70
70
|
"data-testid": `${c}obs-nested-group-members-${t}-${s}`,
|
|
71
71
|
children: e.members?.map((y, N) => /* @__PURE__ */ o(
|
|
72
|
-
|
|
72
|
+
Z,
|
|
73
73
|
{
|
|
74
74
|
member: y,
|
|
75
75
|
depth: r + 1,
|
|
@@ -83,8 +83,8 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
83
83
|
]
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
|
-
const { rangeString: h, isAbnormal: f } =
|
|
87
|
-
return /* @__PURE__ */ p(
|
|
86
|
+
const { rangeString: h, isAbnormal: f } = Q(e), _ = K(e, d), $ = _ ? j(_) : null;
|
|
87
|
+
return /* @__PURE__ */ p(P, { children: [
|
|
88
88
|
/* @__PURE__ */ p(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
@@ -95,7 +95,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
95
95
|
/* @__PURE__ */ p(
|
|
96
96
|
"p",
|
|
97
97
|
{
|
|
98
|
-
className:
|
|
98
|
+
className: A(
|
|
99
99
|
n.memberLabel,
|
|
100
100
|
f ? n.abnormalValue : ""
|
|
101
101
|
),
|
|
@@ -109,7 +109,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
109
109
|
/* @__PURE__ */ o(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
|
-
className:
|
|
112
|
+
className: A(
|
|
113
113
|
n.memberValue,
|
|
114
114
|
f ? n.abnormalValue : ""
|
|
115
115
|
),
|
|
@@ -139,7 +139,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
139
139
|
formName: s = "",
|
|
140
140
|
comment: a
|
|
141
141
|
}) => {
|
|
142
|
-
const { t: l } = O(), d = e.members && e.members.length > 0, { rangeString: b, isAbnormal: t } =
|
|
142
|
+
const { t: l } = O(), d = e.members && e.members.length > 0, { rangeString: b, isAbnormal: t } = Q(e), c = s ? `${s}-` : "", h = K(e, l), f = h ? j(h) : null;
|
|
143
143
|
return /* @__PURE__ */ p(
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
@@ -155,7 +155,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
155
155
|
/* @__PURE__ */ p(
|
|
156
156
|
"p",
|
|
157
157
|
{
|
|
158
|
-
className:
|
|
158
|
+
className: A(
|
|
159
159
|
d ? n.groupLabel : n.rowLabel,
|
|
160
160
|
!d && t ? n.abnormalValue : ""
|
|
161
161
|
),
|
|
@@ -172,7 +172,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
172
172
|
className: n.groupMembers,
|
|
173
173
|
"data-testid": `${c}observation-group-members-${e.display}-${r}`,
|
|
174
174
|
children: e.members?.map((_, $) => /* @__PURE__ */ o(
|
|
175
|
-
|
|
175
|
+
Z,
|
|
176
176
|
{
|
|
177
177
|
member: _,
|
|
178
178
|
depth: 0,
|
|
@@ -185,7 +185,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
185
185
|
) : /* @__PURE__ */ o(
|
|
186
186
|
"div",
|
|
187
187
|
{
|
|
188
|
-
className:
|
|
188
|
+
className: A(
|
|
189
189
|
n.rowValue,
|
|
190
190
|
t ? n.abnormalValue : ""
|
|
191
191
|
),
|
|
@@ -211,45 +211,45 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
211
211
|
},
|
|
212
212
|
`${e.id}-${r}`
|
|
213
213
|
);
|
|
214
|
-
},
|
|
214
|
+
}, He = (e) => e ? e.extension?.find(
|
|
215
215
|
(r) => r.url === ve
|
|
216
|
-
)?.valueString : void 0,
|
|
216
|
+
)?.valueString : void 0, Pe = (e) => {
|
|
217
217
|
if (e)
|
|
218
218
|
return e.note?.[0]?.text;
|
|
219
|
-
},
|
|
220
|
-
const s =
|
|
219
|
+
}, Ke = (e, r) => e.entry?.find((s) => s.resource?.id === r)?.resource, M = (e, r) => {
|
|
220
|
+
const s = Ke(e, r);
|
|
221
221
|
return s ? {
|
|
222
|
-
formFieldPath:
|
|
223
|
-
comment:
|
|
222
|
+
formFieldPath: He(s),
|
|
223
|
+
comment: Pe(s)
|
|
224
224
|
} : {};
|
|
225
|
-
},
|
|
225
|
+
}, je = (e, r) => {
|
|
226
226
|
if (!e?.entry || !r)
|
|
227
227
|
return [];
|
|
228
228
|
const s = fe(e);
|
|
229
229
|
return [
|
|
230
230
|
...s.observations.map((a) => {
|
|
231
|
-
const { formFieldPath: l, comment: d } =
|
|
231
|
+
const { formFieldPath: l, comment: d } = M(
|
|
232
232
|
e,
|
|
233
233
|
a.id
|
|
234
234
|
);
|
|
235
235
|
return { obs: a, formFieldPath: l, comment: d };
|
|
236
236
|
}),
|
|
237
237
|
...s.groupedObservations.flatMap((a) => {
|
|
238
|
-
const { formFieldPath: l } =
|
|
238
|
+
const { formFieldPath: l } = M(e, a.id);
|
|
239
239
|
return (a.members ?? []).map((d) => {
|
|
240
|
-
const { comment: b } =
|
|
240
|
+
const { comment: b } = M(e, d.id);
|
|
241
241
|
return { obs: d, formFieldPath: l, comment: b };
|
|
242
242
|
});
|
|
243
243
|
})
|
|
244
244
|
].filter(
|
|
245
245
|
({ formFieldPath: a }) => !a || a.includes(r)
|
|
246
246
|
);
|
|
247
|
-
},
|
|
247
|
+
}, Je = ({
|
|
248
248
|
episodeOfCareUuids: e,
|
|
249
249
|
encounterUuids: r,
|
|
250
250
|
config: s
|
|
251
251
|
}) => {
|
|
252
|
-
const { t: a } = O(), l = ae(), [d, b] =
|
|
252
|
+
const { t: a } = O(), l = ae(), [d, b] = H(!1), [t, c] = H(null), h = s?.numberOfVisits, f = te(
|
|
253
253
|
e,
|
|
254
254
|
r
|
|
255
255
|
), _ = ye(), {
|
|
@@ -257,42 +257,42 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
257
257
|
isLoading: y,
|
|
258
258
|
isError: N,
|
|
259
259
|
error: z,
|
|
260
|
-
refetch:
|
|
261
|
-
} =
|
|
260
|
+
refetch: Y
|
|
261
|
+
} = L({
|
|
262
262
|
queryKey: ["forms", l, e],
|
|
263
263
|
queryFn: () => oe(l, void 0, h),
|
|
264
264
|
enabled: !!l && !f
|
|
265
265
|
}), T = v(() => !r || r.length === 0 ? $ : $.filter(
|
|
266
266
|
(m) => r.includes(m.encounterUuid)
|
|
267
|
-
), [$, r]), { data:
|
|
267
|
+
), [$, r]), { data: D = [] } = L({
|
|
268
268
|
queryKey: ["observationForms"],
|
|
269
269
|
queryFn: () => ne()
|
|
270
|
-
}),
|
|
271
|
-
(m) =>
|
|
272
|
-
[
|
|
273
|
-
),
|
|
270
|
+
}), S = C(
|
|
271
|
+
(m) => D.find((u) => u.name === m)?.uuid,
|
|
272
|
+
[D]
|
|
273
|
+
), F = v(() => {
|
|
274
274
|
if (t)
|
|
275
|
-
return
|
|
276
|
-
}, [t,
|
|
277
|
-
queryKey: ["formMetadata",
|
|
278
|
-
queryFn: () => se(
|
|
279
|
-
enabled: !!
|
|
275
|
+
return S(t.formName);
|
|
276
|
+
}, [t, S]), { isLoading: J, error: V } = L({
|
|
277
|
+
queryKey: ["formMetadata", F],
|
|
278
|
+
queryFn: () => se(F),
|
|
279
|
+
enabled: !!F && d
|
|
280
280
|
}), {
|
|
281
281
|
data: R,
|
|
282
|
-
isLoading:
|
|
283
|
-
error:
|
|
284
|
-
} =
|
|
282
|
+
isLoading: W,
|
|
283
|
+
error: w
|
|
284
|
+
} = L({
|
|
285
285
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
286
286
|
queryFn: () => de(t.encounterUuid),
|
|
287
287
|
enabled: !!t?.encounterUuid && d
|
|
288
288
|
});
|
|
289
289
|
me(
|
|
290
290
|
(m) => {
|
|
291
|
-
m.patientUUID === l && m.updatedConcepts.size > 0 && (
|
|
291
|
+
m.patientUUID === l && m.updatedConcepts.size > 0 && (Y(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
292
292
|
},
|
|
293
293
|
[l]
|
|
294
294
|
);
|
|
295
|
-
const
|
|
295
|
+
const x = v(() => !R || !t?.formName ? [] : je(
|
|
296
296
|
R,
|
|
297
297
|
t.formName
|
|
298
298
|
), [R, t?.formName]), E = v(
|
|
@@ -312,12 +312,12 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
312
312
|
(u, i) => {
|
|
313
313
|
const g = i.formName;
|
|
314
314
|
u[g] ??= [];
|
|
315
|
-
const
|
|
315
|
+
const I = i.providers.map((re) => re.providerName).filter(Boolean).join(", ");
|
|
316
316
|
return u[g].push({
|
|
317
317
|
id: i.encounterUuid,
|
|
318
318
|
formName: i.formName,
|
|
319
319
|
recordedOn: ie(i.encounterDateTime, a, !0).formattedResult,
|
|
320
|
-
recordedBy:
|
|
320
|
+
recordedBy: I ?? "--",
|
|
321
321
|
encounterDateTime: i.encounterDateTime,
|
|
322
322
|
encounterUuid: i.encounterUuid
|
|
323
323
|
}), u;
|
|
@@ -328,15 +328,15 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
328
328
|
([u, i]) => ({
|
|
329
329
|
formName: u,
|
|
330
330
|
records: i.sort(
|
|
331
|
-
(g,
|
|
331
|
+
(g, I) => I.encounterDateTime - g.encounterDateTime
|
|
332
332
|
)
|
|
333
333
|
})
|
|
334
334
|
).sort((u, i) => u.formName.localeCompare(i.formName));
|
|
335
|
-
}, [T, a]), G =
|
|
335
|
+
}, [T, a]), G = C((m) => {
|
|
336
336
|
c(m), b(!0);
|
|
337
|
-
}, []), ee =
|
|
337
|
+
}, []), ee = C(() => {
|
|
338
338
|
b(!1), c(null);
|
|
339
|
-
}, []), U =
|
|
339
|
+
}, []), U = C(
|
|
340
340
|
(m, u) => {
|
|
341
341
|
switch (u) {
|
|
342
342
|
case "recordedOn":
|
|
@@ -349,7 +349,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
349
349
|
},
|
|
350
350
|
[G]
|
|
351
351
|
);
|
|
352
|
-
return /* @__PURE__ */ p(
|
|
352
|
+
return /* @__PURE__ */ p(P, { children: [
|
|
353
353
|
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: y || N || B.length === 0 || f ? /* @__PURE__ */ o(
|
|
354
354
|
q,
|
|
355
355
|
{
|
|
@@ -403,7 +403,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
403
403
|
passiveModal: !0,
|
|
404
404
|
size: "md",
|
|
405
405
|
testId: "form-details-modal",
|
|
406
|
-
children: /* @__PURE__ */ o("div", { className: n.formContent, children:
|
|
406
|
+
children: /* @__PURE__ */ o("div", { className: n.formContent, children: J || W ? /* @__PURE__ */ o(pe, { width: "100%", lineCount: 3 }) : V ? /* @__PURE__ */ o("div", { children: k(V).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ o("div", { children: k(w).message ?? a("ERROR_FETCHING_FORM_DATA") }) : x.length > 0 ? /* @__PURE__ */ o("div", { className: n.formDetailsContainer, children: x.map(({ obs: m, comment: u }, i) => /* @__PURE__ */ o(
|
|
407
407
|
ke,
|
|
408
408
|
{
|
|
409
409
|
observation: m,
|
|
@@ -418,5 +418,5 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
418
418
|
] });
|
|
419
419
|
};
|
|
420
420
|
export {
|
|
421
|
-
|
|
421
|
+
Je as default
|
|
422
422
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as
|
|
2
|
-
import {
|
|
1
|
+
import { c, T as l, P as m, a as v, D as u, Q as i } from "./YPM2AS64-CV-PpqEY.js";
|
|
2
|
+
import { q as d, v as f, A as e } from "./index-CT5YDE2N.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -14,10 +14,10 @@ var p = (a) => {
|
|
|
14
14
|
localStore: r,
|
|
15
15
|
setLocalStore: t,
|
|
16
16
|
get children() {
|
|
17
|
-
return e(
|
|
17
|
+
return e(v.Provider, {
|
|
18
18
|
value: s,
|
|
19
19
|
get children() {
|
|
20
|
-
return e(
|
|
20
|
+
return e(u, {
|
|
21
21
|
localStore: r,
|
|
22
22
|
setLocalStore: t
|
|
23
23
|
});
|
|
@@ -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 {
|
|
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-CV-PpqEY.js";
|
|
2
|
+
import { q as v, v as C, A as e } from "./index-CT5YDE2N.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as T, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { c as V, e as k, u as
|
|
2
|
+
import { c as V, e as k, u as S, r as w, g as x, w as K, o as Q, h as j, m as z, y as G, x as H, j as M, R as N, p as P, t as Y, z as J, $ as W, I as X, S as Z } from "./index-CT5YDE2N.js";
|
|
3
3
|
import { useQueries as ee, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as ae, useEffect as
|
|
5
|
-
const
|
|
6
|
-
const a =
|
|
7
|
-
let
|
|
8
|
-
o === "Image" && (
|
|
4
|
+
import { useRef as ae, useEffect as _, useMemo as R } from "react";
|
|
5
|
+
const D = (t, d, n, u, r) => {
|
|
6
|
+
const a = P(t, d, r), s = a.value, o = Y(s);
|
|
7
|
+
let i = s;
|
|
8
|
+
o === "Image" && (i = /* @__PURE__ */ l(W, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (i = /* @__PURE__ */ l(X, { id: `${s}-video`, videoSrc: s })), o === "PDF" && (i = /* @__PURE__ */ l(Z, { id: `${s}-pdf`, src: s }));
|
|
9
9
|
const b = r("OBSERVATIONS_RECORDED_BY", {
|
|
10
10
|
provider: a.provider
|
|
11
|
-
}), p = t.display, y = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = u ? `${u}-${y}-${p}-${
|
|
11
|
+
}), p = t.display, y = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = u ? `${u}-${y}-${p}-${n}-${d}` : `${y}-${p}-${n}-${d}`;
|
|
12
12
|
return /* @__PURE__ */ l(
|
|
13
13
|
J,
|
|
14
14
|
{
|
|
15
15
|
header: a.header,
|
|
16
|
-
value:
|
|
16
|
+
value: i,
|
|
17
17
|
info: b,
|
|
18
18
|
id: c,
|
|
19
19
|
testId: c,
|
|
@@ -21,14 +21,14 @@ const F = (t, d, i, u, r) => {
|
|
|
21
21
|
},
|
|
22
22
|
`obs-${t.id}`
|
|
23
23
|
);
|
|
24
|
-
}, se = (t, d,
|
|
25
|
-
|
|
24
|
+
}, se = (t, d, n, u, r, a) => /* @__PURE__ */ l(
|
|
25
|
+
N,
|
|
26
26
|
{
|
|
27
27
|
title: t.display,
|
|
28
28
|
id: `grouped-obs-${t.display}-${u}`,
|
|
29
|
-
open:
|
|
29
|
+
open: n,
|
|
30
30
|
children: t.members?.map(
|
|
31
|
-
(s, o) =>
|
|
31
|
+
(s, o) => D(s, o, r, a, d)
|
|
32
32
|
)
|
|
33
33
|
},
|
|
34
34
|
`grouped-obs-${t.id}`
|
|
@@ -36,22 +36,22 @@ const F = (t, d, i, u, r) => {
|
|
|
36
36
|
groupedData: t,
|
|
37
37
|
title: d = ""
|
|
38
38
|
}) => {
|
|
39
|
-
const { t:
|
|
40
|
-
const o = M(r.encounterDetails,
|
|
39
|
+
const { t: n } = S(), u = (r, a, s) => {
|
|
40
|
+
const o = M(r.encounterDetails, n);
|
|
41
41
|
return /* @__PURE__ */ T(
|
|
42
|
-
|
|
42
|
+
N,
|
|
43
43
|
{
|
|
44
44
|
title: o,
|
|
45
45
|
id: `encounter-${r.encounterId}`,
|
|
46
46
|
open: a,
|
|
47
47
|
children: [
|
|
48
48
|
r.observations.map(
|
|
49
|
-
(
|
|
49
|
+
(i, b) => D(i, b, s, d, n)
|
|
50
50
|
),
|
|
51
51
|
r.groupedObservations.map(
|
|
52
|
-
(
|
|
53
|
-
n,
|
|
52
|
+
(i, b) => se(
|
|
54
53
|
i,
|
|
54
|
+
n,
|
|
55
55
|
a,
|
|
56
56
|
b,
|
|
57
57
|
s,
|
|
@@ -74,89 +74,89 @@ const F = (t, d, i, u, r) => {
|
|
|
74
74
|
)
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
|
-
}, oe = "_observations_kfbhq_1",
|
|
77
|
+
}, oe = "_observations_kfbhq_1", ie = "_title_kfbhq_12", I = {
|
|
78
78
|
observations: oe,
|
|
79
|
-
title:
|
|
80
|
-
},
|
|
81
|
-
const d = t, { conceptNames:
|
|
82
|
-
queries:
|
|
83
|
-
queryKey:
|
|
84
|
-
queryFn: () =>
|
|
79
|
+
title: ie
|
|
80
|
+
}, ne = (t) => ["conceptUuid", t], de = (t, d) => ["observations", t, ...d], pe = ({ config: t }) => {
|
|
81
|
+
const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = V(), { addNotification: s } = k(), { t: o } = S(), i = ee({
|
|
82
|
+
queries: n.map((e) => ({
|
|
83
|
+
queryKey: ne(e),
|
|
84
|
+
queryFn: () => w(e),
|
|
85
85
|
enabled: !!e
|
|
86
86
|
}))
|
|
87
87
|
});
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
_(() => {
|
|
89
|
+
i.forEach((e, m) => {
|
|
90
90
|
if (e.isError && !r.current.has(m)) {
|
|
91
|
-
const
|
|
91
|
+
const B = n[m];
|
|
92
92
|
s({
|
|
93
93
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
94
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
94
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: B }),
|
|
95
95
|
type: "error"
|
|
96
96
|
}), r.current.add(m);
|
|
97
97
|
} else e.isError || r.current.delete(m);
|
|
98
98
|
});
|
|
99
|
-
}, [
|
|
100
|
-
const b =
|
|
99
|
+
}, [i, n]);
|
|
100
|
+
const b = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]), y = R(() => n.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, n.length]), {
|
|
101
101
|
data: c,
|
|
102
|
-
isLoading:
|
|
103
|
-
isError:
|
|
104
|
-
refetch:
|
|
102
|
+
isLoading: F,
|
|
103
|
+
isError: E,
|
|
104
|
+
refetch: f
|
|
105
105
|
} = te({
|
|
106
106
|
queryKey: de(a, p),
|
|
107
|
-
queryFn: () =>
|
|
107
|
+
queryFn: () => x(a, p),
|
|
108
108
|
enabled: !!a && p.length > 0 && y
|
|
109
109
|
});
|
|
110
|
-
|
|
110
|
+
K(
|
|
111
111
|
(e) => {
|
|
112
112
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
113
113
|
(m) => p.includes(m)
|
|
114
|
-
) &&
|
|
114
|
+
) && f();
|
|
115
115
|
},
|
|
116
|
-
[a,
|
|
117
|
-
),
|
|
118
|
-
|
|
116
|
+
[a, f]
|
|
117
|
+
), _(() => {
|
|
118
|
+
E && s({
|
|
119
119
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
120
120
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
121
121
|
type: "error"
|
|
122
122
|
});
|
|
123
|
-
}, [
|
|
124
|
-
const
|
|
123
|
+
}, [E]);
|
|
124
|
+
const g = R(() => {
|
|
125
125
|
if (!c) return [];
|
|
126
|
-
const e =
|
|
127
|
-
return
|
|
128
|
-
}, [c]),
|
|
126
|
+
const e = Q(c), m = j(e);
|
|
127
|
+
return z(m);
|
|
128
|
+
}, [c]), q = [
|
|
129
129
|
{ key: "name", header: "name" },
|
|
130
130
|
{ key: "value", header: "value" },
|
|
131
131
|
{ key: "form", header: "form" }
|
|
132
|
-
],
|
|
132
|
+
], $ = F || !y, O = E && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, L = O ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !$ && !O, h = d.titleTranslationKey, v = h ? o(h) : "";
|
|
133
133
|
return /* @__PURE__ */ T(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
136
|
id: "observations",
|
|
137
|
-
"data-testid":
|
|
137
|
+
"data-testid": h ? `observations-${v}` : "observations",
|
|
138
138
|
"aria-label": "observations-aria-label",
|
|
139
|
-
className:
|
|
139
|
+
className: I.observations,
|
|
140
140
|
children: [
|
|
141
141
|
/* @__PURE__ */ l(
|
|
142
142
|
G,
|
|
143
143
|
{
|
|
144
144
|
id: "observations-title",
|
|
145
|
-
testId:
|
|
145
|
+
testId: h ? `observations-title-${v}` : "observations-title",
|
|
146
146
|
title: v,
|
|
147
|
-
className:
|
|
147
|
+
className: I.title,
|
|
148
148
|
children: /* @__PURE__ */ l("p", { children: v })
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
|
|
151
|
+
C ? /* @__PURE__ */ l(re, { groupedData: g, title: v }) : /* @__PURE__ */ l(
|
|
152
152
|
H,
|
|
153
153
|
{
|
|
154
|
-
headers:
|
|
154
|
+
headers: q,
|
|
155
155
|
rows: [],
|
|
156
156
|
ariaLabel: o("OBSERVATIONS"),
|
|
157
|
-
loading:
|
|
158
|
-
errorStateMessage:
|
|
159
|
-
emptyStateMessage:
|
|
157
|
+
loading: $,
|
|
158
|
+
errorStateMessage: L,
|
|
159
|
+
emptyStateMessage: U,
|
|
160
160
|
dataTestId: "observations-table"
|
|
161
161
|
}
|
|
162
162
|
)
|
|
@@ -165,7 +165,7 @@ const F = (t, d, i, u, r) => {
|
|
|
165
165
|
);
|
|
166
166
|
};
|
|
167
167
|
export {
|
|
168
|
-
|
|
168
|
+
ne as conceptUuidQueryKeys,
|
|
169
169
|
pe as default,
|
|
170
170
|
de as observationsQueryKeys
|
|
171
171
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as we, E as z, F as xt, H as B, v as q, A as y, P as Ro, J as ye, K as R, N as _, O as k, Q as N, T as A, U as bs, W as ir, X as $e, Y as U, _ as Hn, a0 as Vn, a1 as dt, a2 as D, a3 as xs, a4 as cn, a5 as Be, a6 as ws, a7 as qt, a8 as zt, a9 as $s, aa as Cs, ab as $n, ac as Ss, ad as Nr, ae as Bt, af as zo, ag as ks, ah as Es, ai as j, aj as Ur, ak as Ms, al as Ds, am as sr, an as As, ao as Ts, ap as zn, aq as Fs, ar as Is, as as Z, at as Ps, au as Os } from "./index-CT5YDE2N.js";
|
|
2
2
|
var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|