@bahmni/clinical-app 0.0.1-dev.175 → 0.0.1-dev.178
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-vAC0-Du4-BkgsDQcr.js → DocumentsTable-BmGSz9jH-M35LQ6dU.js} +105 -104
- package/dist/{FormsTable-DmEpKKr3-BKC7kS-P.js → FormsTable-BJRW7p5f-DM8E_e0W.js} +54 -53
- package/dist/{LNWAZHJI-CNIMsk3S.js → LNWAZHJI-DX6qMJo9.js} +2 -2
- package/dist/{MWZ6AO7Z-DqZkSym3.js → MWZ6AO7Z-BAONl-A_.js} +2 -2
- package/dist/{Observations-CghkmYr1-DPsVxrR7.js → Observations-COFCQoqc-xlYWoUFE.js} +20 -20
- package/dist/{YPM2AS64-5V13Mxmg.js → YPM2AS64-qvj5apBg.js} +1 -1
- package/dist/{index-B9LhHNy9.js → index-8iPdmuOw.js} +4198 -4183
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +62 -62
- package/dist/locales/locale_es.json +31 -28
- package/dist/pages/ConsultationPage.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as s, jsxs as p, Fragment as
|
|
2
|
-
import { u as ee, f as re, E as ae,
|
|
1
|
+
import { jsx as s, jsxs as p, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { u as ee, f as re, E as ae, d as te, a as A, H as oe, b as ne, D as se, A as U, e as de, Y as me, G as ie, y as le, Z as q, P as ce, p as ue, T as F, g as be, h as pe, i as _e, j as fe, U as $e, q as ge, W as ve, F as he } from "./index-8iPdmuOw.js";
|
|
3
3
|
import { useState as H, useMemo as h, useCallback as R } from "react";
|
|
4
|
-
const
|
|
5
|
-
formsTableBody:
|
|
6
|
-
customAccordianItem:
|
|
4
|
+
const ye = "_formsTableBody_1pd36_1", Ne = "_customAccordianItem_1pd36_6", Ae = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Fe = "_observation_1pd36_30", Le = "_groupContainer_1pd36_39", Ce = "_rowContainer_1pd36_43", Oe = "_groupLabel_1pd36_48", Ie = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", Me = "_groupMembers_1pd36_75", Ve = "_memberRow_1pd36_81", Se = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", Ee = "_abnormalValue_1pd36_102", we = "_commentSection_1pd36_110", xe = "_commentText_1pd36_116", Be = "_nestedGroup_1pd36_125", Ge = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
|
|
5
|
+
formsTableBody: ye,
|
|
6
|
+
customAccordianItem: Ne,
|
|
7
7
|
formContent: Ae,
|
|
8
8
|
formDetailsContainer: Re,
|
|
9
9
|
observation: Fe,
|
|
10
10
|
groupContainer: Le,
|
|
11
11
|
rowContainer: Ce,
|
|
12
12
|
groupLabel: Oe,
|
|
13
|
-
rowLabel:
|
|
13
|
+
rowLabel: Ie,
|
|
14
14
|
rowValue: Te,
|
|
15
|
-
groupMembers:
|
|
16
|
-
memberRow:
|
|
15
|
+
groupMembers: Me,
|
|
16
|
+
memberRow: Ve,
|
|
17
17
|
memberLabel: Se,
|
|
18
18
|
memberValue: De,
|
|
19
19
|
abnormalValue: Ee,
|
|
20
20
|
commentSection: we,
|
|
21
|
-
commentText:
|
|
22
|
-
nestedGroup:
|
|
21
|
+
commentText: xe,
|
|
22
|
+
nestedGroup: Be,
|
|
23
23
|
nestedGroupLabel: Ge,
|
|
24
24
|
nestedGroupMembers: Ue
|
|
25
|
-
},
|
|
25
|
+
}, K = (e) => {
|
|
26
26
|
const r = be(e);
|
|
27
27
|
return r === "Image" ? /* @__PURE__ */ s(
|
|
28
28
|
pe,
|
|
@@ -32,7 +32,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
32
32
|
id: `${e}-img`
|
|
33
33
|
}
|
|
34
34
|
) : r === "Video" ? /* @__PURE__ */ s(_e, { id: `${e}-video`, videoSrc: e }) : e;
|
|
35
|
-
},
|
|
35
|
+
}, k = (e) => {
|
|
36
36
|
const r = e.observationValue?.unit, n = e.observationValue?.referenceRange?.low?.value, a = e.observationValue?.referenceRange?.high?.value, d = n != null, c = a != null, m = d && c ? ` (${n} - ${a})` : d ? ` (>${n})` : c ? ` (<${a})` : "", t = e.observationValue?.isAbnormal === !0;
|
|
37
37
|
return { units: r, rangeString: m, isAbnormal: t };
|
|
38
38
|
}, j = ({
|
|
@@ -64,23 +64,23 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
64
64
|
{
|
|
65
65
|
className: o.nestedGroupMembers,
|
|
66
66
|
"data-testid": `${t}obs-nested-group-members-${m}-${n}`,
|
|
67
|
-
children: e.members?.map((
|
|
67
|
+
children: e.members?.map((y, N) => /* @__PURE__ */ s(
|
|
68
68
|
j,
|
|
69
69
|
{
|
|
70
|
-
member:
|
|
70
|
+
member: y,
|
|
71
71
|
depth: r + 1,
|
|
72
|
-
memberIndex:
|
|
72
|
+
memberIndex: N,
|
|
73
73
|
formName: a
|
|
74
74
|
},
|
|
75
|
-
`${
|
|
75
|
+
`${y.id}`
|
|
76
76
|
))
|
|
77
77
|
}
|
|
78
78
|
)
|
|
79
79
|
]
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
|
-
const { units: b, rangeString: g, isAbnormal: _ } =
|
|
83
|
-
return /* @__PURE__ */ p(
|
|
82
|
+
const { units: b, rangeString: g, isAbnormal: _ } = k(e), f = e.observationValue?.value?.toString(), $ = f ? K(f) : null;
|
|
83
|
+
return /* @__PURE__ */ p(P, { children: [
|
|
84
84
|
/* @__PURE__ */ p(
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
@@ -138,7 +138,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
138
138
|
formName: n = "",
|
|
139
139
|
comment: a
|
|
140
140
|
}) => {
|
|
141
|
-
const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } =
|
|
141
|
+
const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = k(e), b = n ? `${n}-` : "", g = e.observationValue?.value?.toString(), _ = g ? K(g) : null;
|
|
142
142
|
return /* @__PURE__ */ p(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
@@ -215,38 +215,38 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
215
215
|
);
|
|
216
216
|
}, He = (e) => e ? e.extension?.find(
|
|
217
217
|
(r) => r.url === fe
|
|
218
|
-
)?.valueString : void 0,
|
|
218
|
+
)?.valueString : void 0, Pe = (e) => {
|
|
219
219
|
if (e)
|
|
220
220
|
return e.note?.[0]?.text;
|
|
221
|
-
},
|
|
222
|
-
const n =
|
|
221
|
+
}, Ke = (e, r) => e.entry?.find((n) => n.resource?.id === r)?.resource, I = (e, r) => {
|
|
222
|
+
const n = Ke(e, r);
|
|
223
223
|
return n ? {
|
|
224
224
|
formFieldPath: He(n),
|
|
225
|
-
comment:
|
|
225
|
+
comment: Pe(n)
|
|
226
226
|
} : {};
|
|
227
|
-
},
|
|
227
|
+
}, ke = (e, r) => {
|
|
228
228
|
if (!e?.entry || !r)
|
|
229
229
|
return [];
|
|
230
230
|
const n = ce(e);
|
|
231
231
|
return [
|
|
232
232
|
...n.observations.map((a) => {
|
|
233
|
-
const { formFieldPath: d, comment: c } =
|
|
233
|
+
const { formFieldPath: d, comment: c } = I(
|
|
234
234
|
e,
|
|
235
235
|
a.id
|
|
236
236
|
);
|
|
237
237
|
return { obs: a, formFieldPath: d, comment: c };
|
|
238
238
|
}),
|
|
239
239
|
...n.groupedObservations.flatMap((a) => {
|
|
240
|
-
const { formFieldPath: d } =
|
|
240
|
+
const { formFieldPath: d } = I(e, a.id);
|
|
241
241
|
return (a.members ?? []).map((c) => {
|
|
242
|
-
const { comment: m } =
|
|
242
|
+
const { comment: m } = I(e, c.id);
|
|
243
243
|
return { obs: c, formFieldPath: d, comment: m };
|
|
244
244
|
});
|
|
245
245
|
})
|
|
246
246
|
].filter(
|
|
247
247
|
({ formFieldPath: a }) => !a || a.includes(r)
|
|
248
248
|
);
|
|
249
|
-
},
|
|
249
|
+
}, Ze = ({
|
|
250
250
|
episodeOfCareUuids: e,
|
|
251
251
|
encounterUuids: r,
|
|
252
252
|
config: n
|
|
@@ -256,8 +256,8 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
256
256
|
r
|
|
257
257
|
), f = te(), {
|
|
258
258
|
data: $ = [],
|
|
259
|
-
isLoading:
|
|
260
|
-
isError:
|
|
259
|
+
isLoading: y,
|
|
260
|
+
isError: N,
|
|
261
261
|
error: Q,
|
|
262
262
|
refetch: Y
|
|
263
263
|
} = A({
|
|
@@ -266,22 +266,22 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
266
266
|
enabled: !!d && !_
|
|
267
267
|
}), T = h(() => !r || r.length === 0 ? $ : $.filter(
|
|
268
268
|
(i) => r.includes(i.encounterUuid)
|
|
269
|
-
), [$, r]), { data:
|
|
269
|
+
), [$, r]), { data: M = [] } = A({
|
|
270
270
|
queryKey: ["observationForms"],
|
|
271
271
|
queryFn: () => ge()
|
|
272
|
-
}),
|
|
273
|
-
(i) =>
|
|
274
|
-
[
|
|
272
|
+
}), V = R(
|
|
273
|
+
(i) => M.find((u) => u.name === i)?.uuid,
|
|
274
|
+
[M]
|
|
275
275
|
), L = h(() => {
|
|
276
276
|
if (t)
|
|
277
|
-
return
|
|
278
|
-
}, [t,
|
|
277
|
+
return V(t.formName);
|
|
278
|
+
}, [t, V]), { isLoading: Z, error: S } = A({
|
|
279
279
|
queryKey: ["formMetadata", L],
|
|
280
280
|
queryFn: () => ve(L),
|
|
281
281
|
enabled: !!L && c
|
|
282
282
|
}), {
|
|
283
283
|
data: C,
|
|
284
|
-
isLoading:
|
|
284
|
+
isLoading: z,
|
|
285
285
|
error: D
|
|
286
286
|
} = A({
|
|
287
287
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
@@ -294,7 +294,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
294
294
|
},
|
|
295
295
|
[d]
|
|
296
296
|
);
|
|
297
|
-
const E = h(() => !C || !t?.formName ? [] :
|
|
297
|
+
const E = h(() => !C || !t?.formName ? [] : ke(
|
|
298
298
|
C,
|
|
299
299
|
t.formName
|
|
300
300
|
), [C, t?.formName]), w = h(
|
|
@@ -303,13 +303,13 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
303
303
|
{ key: "recordedBy", header: a("FORM_RECORDED_BY") }
|
|
304
304
|
],
|
|
305
305
|
[a]
|
|
306
|
-
),
|
|
306
|
+
), W = h(
|
|
307
307
|
() => [
|
|
308
308
|
{ key: "recordedOn", sortable: !0 },
|
|
309
309
|
{ key: "recordedBy", sortable: !0 }
|
|
310
310
|
],
|
|
311
311
|
[]
|
|
312
|
-
),
|
|
312
|
+
), x = h(() => {
|
|
313
313
|
const i = T.reduce(
|
|
314
314
|
(u, l) => {
|
|
315
315
|
const v = l.formName;
|
|
@@ -334,38 +334,38 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
334
334
|
)
|
|
335
335
|
})
|
|
336
336
|
).sort((u, l) => u.formName.localeCompare(l.formName));
|
|
337
|
-
}, [T, a]),
|
|
337
|
+
}, [T, a]), B = R((i) => {
|
|
338
338
|
b(i), m(!0);
|
|
339
|
-
}, []),
|
|
339
|
+
}, []), X = R(() => {
|
|
340
340
|
m(!1), b(null);
|
|
341
341
|
}, []), G = R(
|
|
342
342
|
(i, u) => {
|
|
343
343
|
switch (u) {
|
|
344
344
|
case "recordedOn":
|
|
345
|
-
return /* @__PURE__ */ s(se, { onClick: () =>
|
|
345
|
+
return /* @__PURE__ */ s(se, { onClick: () => B(i), children: i.recordedOn });
|
|
346
346
|
case "recordedBy":
|
|
347
347
|
return i.recordedBy;
|
|
348
348
|
default:
|
|
349
349
|
return null;
|
|
350
350
|
}
|
|
351
351
|
},
|
|
352
|
-
[
|
|
352
|
+
[B]
|
|
353
353
|
);
|
|
354
|
-
return /* @__PURE__ */ p(
|
|
355
|
-
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children:
|
|
354
|
+
return /* @__PURE__ */ p(P, { children: [
|
|
355
|
+
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children: y || N || x.length === 0 || _ ? /* @__PURE__ */ s(
|
|
356
356
|
U,
|
|
357
357
|
{
|
|
358
358
|
headers: w,
|
|
359
359
|
ariaLabel: a("FORMS_HEADING"),
|
|
360
360
|
rows: [],
|
|
361
|
-
loading:
|
|
362
|
-
errorStateMessage:
|
|
361
|
+
loading: y,
|
|
362
|
+
errorStateMessage: N ? Q?.message : void 0,
|
|
363
363
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
364
364
|
renderCell: G,
|
|
365
365
|
className: o.formsTableBody,
|
|
366
366
|
dataTestId: "forms-table"
|
|
367
367
|
}
|
|
368
|
-
) : /* @__PURE__ */ s(de, { align: "start", children:
|
|
368
|
+
) : /* @__PURE__ */ s(de, { align: "start", children: x.map((i, u) => {
|
|
369
369
|
const { formName: l, records: v } = i;
|
|
370
370
|
return /* @__PURE__ */ s(
|
|
371
371
|
me,
|
|
@@ -382,7 +382,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
382
382
|
rows: v,
|
|
383
383
|
loading: !1,
|
|
384
384
|
errorStateMessage: "",
|
|
385
|
-
sortable:
|
|
385
|
+
sortable: W,
|
|
386
386
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
387
387
|
renderCell: G,
|
|
388
388
|
className: o.formsTableBody,
|
|
@@ -397,14 +397,15 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
397
397
|
ie,
|
|
398
398
|
{
|
|
399
399
|
id: "modalIdForActionAreaLayout",
|
|
400
|
+
portalId: "main-display-area",
|
|
400
401
|
open: c,
|
|
401
|
-
onRequestClose:
|
|
402
|
+
onRequestClose: X,
|
|
402
403
|
modalHeading: t.formName,
|
|
403
404
|
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
404
405
|
passiveModal: !0,
|
|
405
406
|
size: "md",
|
|
406
407
|
testId: "form-details-modal",
|
|
407
|
-
children: /* @__PURE__ */ s("div", { className: o.formContent, children:
|
|
408
|
+
children: /* @__PURE__ */ s("div", { className: o.formContent, children: Z || z ? /* @__PURE__ */ s(le, { width: "100%", lineCount: 3 }) : S ? /* @__PURE__ */ s("div", { children: q(S).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : D ? /* @__PURE__ */ s("div", { children: q(D).message ?? a("ERROR_FETCHING_FORM_DATA") }) : E.length > 0 ? /* @__PURE__ */ s("div", { className: o.formDetailsContainer, children: E.map(({ obs: i, comment: u }, l) => /* @__PURE__ */ s(
|
|
408
409
|
qe,
|
|
409
410
|
{
|
|
410
411
|
observation: i,
|
|
@@ -419,5 +420,5 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ae =
|
|
|
419
420
|
] });
|
|
420
421
|
};
|
|
421
422
|
export {
|
|
422
|
-
|
|
423
|
+
Ze as default
|
|
423
424
|
};
|
|
@@ -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 { r as d, s as f, t as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-qvj5apBg.js";
|
|
2
|
+
import { r as d, s as f, t as e } from "./index-8iPdmuOw.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as l, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { r as v, s as C, t as e } from "./index-
|
|
1
|
+
import { c as l, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-qvj5apBg.js";
|
|
2
|
+
import { r as v, s as C, t as e } from "./index-8iPdmuOw.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = l({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as I, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { f as
|
|
2
|
+
import { f as q, o as C, u as N, k as H, B as Q, a as K, H as j, P as w, Q as x, l as G, m as M, A as P, J as X, V as S, X as J, g as z, R as Y, h as Z, i as W, n as ee } from "./index-8iPdmuOw.js";
|
|
3
3
|
import { useRef as te, useEffect as T, useMemo as R } from "react";
|
|
4
4
|
const A = (t, d, i, l, s) => {
|
|
5
5
|
const a = J(t, d), r = a.value, o = z(r);
|
|
@@ -7,7 +7,7 @@ const A = (t, d, i, l, s) => {
|
|
|
7
7
|
o === "Image" && (n = /* @__PURE__ */ c(Z, { imageSrc: r, alt: r, id: `${r}-img` })), o === "Video" && (n = /* @__PURE__ */ c(W, { id: `${r}-video`, videoSrc: r }));
|
|
8
8
|
const b = s("OBSERVATIONS_RECORDED_BY", {
|
|
9
9
|
provider: a.provider
|
|
10
|
-
}), p = t.display,
|
|
10
|
+
}), p = t.display, v = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", u = l ? `${l}-${v}-${p}-${i}-${d}` : `${v}-${p}-${i}-${d}`;
|
|
11
11
|
return /* @__PURE__ */ c(
|
|
12
12
|
Y,
|
|
13
13
|
{
|
|
@@ -36,7 +36,7 @@ const A = (t, d, i, l, s) => {
|
|
|
36
36
|
title: d = ""
|
|
37
37
|
}) => {
|
|
38
38
|
const { t: i } = N(), l = (s, a, r) => {
|
|
39
|
-
const o =
|
|
39
|
+
const o = X(s.encounterDetails, i);
|
|
40
40
|
return /* @__PURE__ */ I(
|
|
41
41
|
S,
|
|
42
42
|
{
|
|
@@ -77,36 +77,36 @@ const A = (t, d, i, l, s) => {
|
|
|
77
77
|
observations: re,
|
|
78
78
|
title: oe
|
|
79
79
|
}, ie = (t) => ["conceptUuid", t], ne = (t, d) => ["observations", t, ...d], ce = ({ config: t }) => {
|
|
80
|
-
const d = t, { conceptNames: i = [], conceptUuid: l = [] } = d, s = te(/* @__PURE__ */ new Set()), a =
|
|
80
|
+
const d = t, { conceptNames: i = [], conceptUuid: l = [] } = d, s = te(/* @__PURE__ */ new Set()), a = q(), { addNotification: r } = C(), { t: o } = N(), n = H({
|
|
81
81
|
queries: i.map((e) => ({
|
|
82
82
|
queryKey: ie(e),
|
|
83
|
-
queryFn: () =>
|
|
83
|
+
queryFn: () => Q(e),
|
|
84
84
|
enabled: !!e
|
|
85
85
|
}))
|
|
86
86
|
});
|
|
87
87
|
T(() => {
|
|
88
88
|
n.forEach((e, m) => {
|
|
89
89
|
if (e.isError && !s.current.has(m)) {
|
|
90
|
-
const
|
|
90
|
+
const k = i[m];
|
|
91
91
|
r({
|
|
92
92
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
93
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
93
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: k }),
|
|
94
94
|
type: "error"
|
|
95
95
|
}), s.current.add(m);
|
|
96
96
|
} else e.isError || s.current.delete(m);
|
|
97
97
|
});
|
|
98
98
|
}, [n, i]);
|
|
99
|
-
const b = R(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = R(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]),
|
|
99
|
+
const b = R(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = R(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), v = R(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
100
100
|
data: u,
|
|
101
|
-
isLoading:
|
|
101
|
+
isLoading: B,
|
|
102
102
|
isError: g,
|
|
103
103
|
refetch: h
|
|
104
104
|
} = K({
|
|
105
105
|
queryKey: ne(a, p),
|
|
106
106
|
queryFn: () => ee(a, p),
|
|
107
|
-
enabled: !!a && p.length > 0 &&
|
|
107
|
+
enabled: !!a && p.length > 0 && v
|
|
108
108
|
});
|
|
109
|
-
|
|
109
|
+
j(
|
|
110
110
|
(e) => {
|
|
111
111
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
112
112
|
(m) => p.includes(m)
|
|
@@ -122,18 +122,18 @@ const A = (t, d, i, l, s) => {
|
|
|
122
122
|
}, [g]);
|
|
123
123
|
const f = R(() => {
|
|
124
124
|
if (!u) return [];
|
|
125
|
-
const e =
|
|
126
|
-
return
|
|
125
|
+
const e = w(u), m = x(e);
|
|
126
|
+
return G(m);
|
|
127
127
|
}, [u]), D = [
|
|
128
128
|
{ key: "name", header: "name" },
|
|
129
129
|
{ key: "value", header: "value" },
|
|
130
130
|
{ key: "form", header: "form" }
|
|
131
|
-
], O =
|
|
131
|
+
], O = B || !v, _ = g && v, F = (!u || u.entry?.length === 0 || p.length === 0) && v, L = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = F ? o("NO_OBSERVATIONS_FOUND") : void 0, V = f.length > 0 && !O && !_, E = d.titleTranslationKey, y = E ? o(E) : "";
|
|
132
132
|
return /* @__PURE__ */ I(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
135
135
|
id: "observations",
|
|
136
|
-
"data-testid": E ? `observations-${
|
|
136
|
+
"data-testid": E ? `observations-${y}` : "observations",
|
|
137
137
|
"aria-label": "observations-aria-label",
|
|
138
138
|
className: $.observations,
|
|
139
139
|
children: [
|
|
@@ -141,14 +141,14 @@ const A = (t, d, i, l, s) => {
|
|
|
141
141
|
M,
|
|
142
142
|
{
|
|
143
143
|
id: "observations-title",
|
|
144
|
-
testId: E ? `observations-title-${
|
|
145
|
-
title:
|
|
144
|
+
testId: E ? `observations-title-${y}` : "observations-title",
|
|
145
|
+
title: y,
|
|
146
146
|
className: $.title,
|
|
147
|
-
children: /* @__PURE__ */ c("p", { children:
|
|
147
|
+
children: /* @__PURE__ */ c("p", { children: y })
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
|
-
V ? /* @__PURE__ */ c(se, { groupedData: f, title:
|
|
151
|
-
|
|
150
|
+
V ? /* @__PURE__ */ c(se, { groupedData: f, title: y }) : /* @__PURE__ */ c(
|
|
151
|
+
P,
|
|
152
152
|
{
|
|
153
153
|
headers: D,
|
|
154
154
|
rows: [],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as we, w as z, x as xt, z as B, s as q, t as y, C as Ro, I as ye, S as R, L as _, M as k, N, O as A, _ as bs, $ as ir, a0 as $e, a1 as U, a2 as Hn, a3 as Vn, a4 as dt, a5 as D, a6 as xs, a7 as cn, a8 as Be, a9 as ws, aa as qt, ab as zt, ac as $s, ad as Cs, ae as $n, af as Ss, ag as Nr, ah as Bt, ai as zo, aj as ks, ak as Es, al as j, am as Ur, an as Ms, ao as Ds, ap as sr, aq as As, ar as Ts, as as zn, at as Fs, au as Is, av as Z, aw as Ps, ax as Ls } from "./index-
|
|
1
|
+
import { v as we, w as z, x as xt, z as B, s as q, t as y, C as Ro, I as ye, S as R, L as _, M as k, N, O as A, _ as bs, $ as ir, a0 as $e, a1 as U, a2 as Hn, a3 as Vn, a4 as dt, a5 as D, a6 as xs, a7 as cn, a8 as Be, a9 as ws, aa as qt, ab as zt, ac as $s, ad as Cs, ae as $n, af as Ss, ag as Nr, ah as Bt, ai as zo, aj as ks, ak as Es, al as j, am as Ur, an as Ms, ao as Ds, ap as sr, aq as As, ar as Ts, as as zn, at as Fs, au as Is, av as Z, aw as Ps, ax as Ls } from "./index-8iPdmuOw.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|