@bahmni/clinical-app 0.0.1-dev.164 → 0.0.1-dev.166
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/{FormsTable-1Ss9-TNz-Cz9WFStc.js → FormsTable-BdkkI5Rd-BoE6TAI1.js} +43 -43
- package/dist/{LNWAZHJI-DDxh09Zh.js → LNWAZHJI-D2i98_1G.js} +2 -2
- package/dist/{MWZ6AO7Z-B4xzR-5x.js → MWZ6AO7Z-JvFeuxOv.js} +2 -2
- package/dist/{Observations-C0JPS6cs-CLn-BuVw.js → Observations-JvnnwMDn-DykLoHyN.js} +15 -15
- package/dist/{YPM2AS64-0klce1Kd.js → YPM2AS64-BGtPvUiv.js} +1 -1
- package/dist/{index-7FsiPqTH.js → index-CrpZf00-.js} +466 -466
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as s, jsxs as p, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { u as ee, h as re, w as ae, a as te, b as C, e as oe, i as ne, C as se, z as U, Y as de, G as me, c as ie, M as le, V as q, d as ce, g as ue, f as
|
|
3
|
-
import { useState as K, useMemo as h, useCallback as
|
|
4
|
-
const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18",
|
|
2
|
+
import { u as ee, h as re, w as ae, a as te, b as C, e as oe, i as ne, C as se, z as U, Y as de, G as me, c as ie, M as le, V as q, d as ce, g as ue, f as R, F as be, N as pe, j as _e, U as fe, J as $e, k as ve, l as ge, K as he } from "./index-CrpZf00-.js";
|
|
3
|
+
import { useState as K, useMemo as h, useCallback as L } from "react";
|
|
4
|
+
const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Le = "_formDetailsContainer_1pd36_25", Re = "_observation_1pd36_30", Ae = "_groupContainer_1pd36_39", Fe = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Ve = "_rowLabel_1pd36_58", Oe = "_rowValue_1pd36_67", Ie = "_groupMembers_1pd36_75", Te = "_memberRow_1pd36_81", Se = "_memberLabel_1pd36_86", we = "_memberValue_1pd36_94", De = "_abnormalValue_1pd36_102", Ge = "_commentSection_1pd36_110", Ee = "_commentText_1pd36_116", xe = "_nestedGroup_1pd36_125", Be = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
|
|
5
5
|
formsTableBody: Ne,
|
|
6
6
|
customAccordianItem: ye,
|
|
7
7
|
formContent: Ce,
|
|
8
|
-
formDetailsContainer:
|
|
9
|
-
observation:
|
|
10
|
-
groupContainer:
|
|
11
|
-
rowContainer:
|
|
8
|
+
formDetailsContainer: Le,
|
|
9
|
+
observation: Re,
|
|
10
|
+
groupContainer: Ae,
|
|
11
|
+
rowContainer: Fe,
|
|
12
12
|
groupLabel: Me,
|
|
13
|
-
rowLabel:
|
|
14
|
-
rowValue:
|
|
13
|
+
rowLabel: Ve,
|
|
14
|
+
rowValue: Oe,
|
|
15
15
|
groupMembers: Ie,
|
|
16
16
|
memberRow: Te,
|
|
17
17
|
memberLabel: Se,
|
|
@@ -79,7 +79,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
79
79
|
]
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
|
-
const { units: b, rangeString:
|
|
82
|
+
const { units: b, rangeString: v, isAbnormal: _ } = j(e), f = e.observationValue?.value?.toString(), $ = f ? H(f) : null;
|
|
83
83
|
return /* @__PURE__ */ p(k, { children: [
|
|
84
84
|
/* @__PURE__ */ p(
|
|
85
85
|
"div",
|
|
@@ -91,21 +91,21 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
91
91
|
/* @__PURE__ */ p(
|
|
92
92
|
"p",
|
|
93
93
|
{
|
|
94
|
-
className:
|
|
94
|
+
className: R(
|
|
95
95
|
o.memberLabel,
|
|
96
96
|
_ ? o.abnormalValue : ""
|
|
97
97
|
),
|
|
98
98
|
"data-testid": `${t}obs-member-label-${m}-${n}`,
|
|
99
99
|
children: [
|
|
100
100
|
m,
|
|
101
|
-
|
|
101
|
+
v
|
|
102
102
|
]
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
105
|
/* @__PURE__ */ p(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
108
|
-
className:
|
|
108
|
+
className: R(
|
|
109
109
|
o.memberValue,
|
|
110
110
|
_ ? o.abnormalValue : ""
|
|
111
111
|
),
|
|
@@ -138,7 +138,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
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 } = j(e), b = n ? `${n}-` : "",
|
|
141
|
+
const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = j(e), b = n ? `${n}-` : "", v = e.observationValue?.value?.toString(), _ = v ? H(v) : null;
|
|
142
142
|
return /* @__PURE__ */ p(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
@@ -154,7 +154,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
154
154
|
/* @__PURE__ */ p(
|
|
155
155
|
"p",
|
|
156
156
|
{
|
|
157
|
-
className:
|
|
157
|
+
className: R(
|
|
158
158
|
d ? o.groupLabel : o.rowLabel,
|
|
159
159
|
!d && t ? o.abnormalValue : ""
|
|
160
160
|
),
|
|
@@ -184,7 +184,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
184
184
|
) : /* @__PURE__ */ p(
|
|
185
185
|
"div",
|
|
186
186
|
{
|
|
187
|
-
className:
|
|
187
|
+
className: R(
|
|
188
188
|
o.rowValue,
|
|
189
189
|
t ? o.abnormalValue : ""
|
|
190
190
|
),
|
|
@@ -218,7 +218,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
218
218
|
)?.valueString : void 0, ke = (e) => {
|
|
219
219
|
if (e)
|
|
220
220
|
return e.note?.[0]?.text;
|
|
221
|
-
}, He = (e, r) => e.entry?.find((n) => n.resource?.id === r)?.resource,
|
|
221
|
+
}, He = (e, r) => e.entry?.find((n) => n.resource?.id === r)?.resource, V = (e, r) => {
|
|
222
222
|
const n = He(e, r);
|
|
223
223
|
return n ? {
|
|
224
224
|
formFieldPath: Ke(n),
|
|
@@ -230,16 +230,16 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
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 } = V(
|
|
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 } = V(e, a.id);
|
|
241
241
|
return (a.members ?? []).map((c) => {
|
|
242
|
-
const { comment: m } =
|
|
242
|
+
const { comment: m } = V(e, c.id);
|
|
243
243
|
return { obs: c, formFieldPath: d, comment: m };
|
|
244
244
|
});
|
|
245
245
|
})
|
|
@@ -251,7 +251,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
251
251
|
encounterUuids: r,
|
|
252
252
|
config: n
|
|
253
253
|
}) => {
|
|
254
|
-
const { t: a } = ee(), d = re(), [c, m] = K(!1), [t, b] = K(null),
|
|
254
|
+
const { t: a } = ee(), d = re(), [c, m] = K(!1), [t, b] = K(null), v = n?.numberOfVisits, _ = ae(
|
|
255
255
|
e,
|
|
256
256
|
r
|
|
257
257
|
), f = te(), {
|
|
@@ -262,25 +262,25 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
262
262
|
refetch: Y
|
|
263
263
|
} = C({
|
|
264
264
|
queryKey: ["forms", d, e],
|
|
265
|
-
queryFn: () => $e(d, void 0,
|
|
265
|
+
queryFn: () => $e(d, void 0, v),
|
|
266
266
|
enabled: !!d && !_
|
|
267
|
-
}),
|
|
267
|
+
}), O = h(() => !r || r.length === 0 ? $ : $.filter(
|
|
268
268
|
(i) => r.includes(i.encounterUuid)
|
|
269
269
|
), [$, r]), { data: I = [] } = C({
|
|
270
270
|
queryKey: ["observationForms"],
|
|
271
|
-
queryFn: () =>
|
|
272
|
-
}), T =
|
|
271
|
+
queryFn: () => ve()
|
|
272
|
+
}), T = L(
|
|
273
273
|
(i) => I.find((u) => u.name === i)?.uuid,
|
|
274
274
|
[I]
|
|
275
|
-
),
|
|
275
|
+
), A = h(() => {
|
|
276
276
|
if (t)
|
|
277
277
|
return T(t.formName);
|
|
278
278
|
}, [t, T]), { isLoading: Q, error: S } = C({
|
|
279
|
-
queryKey: ["formMetadata",
|
|
280
|
-
queryFn: () =>
|
|
281
|
-
enabled: !!
|
|
279
|
+
queryKey: ["formMetadata", A],
|
|
280
|
+
queryFn: () => ge(A),
|
|
281
|
+
enabled: !!A && c
|
|
282
282
|
}), {
|
|
283
|
-
data:
|
|
283
|
+
data: F,
|
|
284
284
|
isLoading: J,
|
|
285
285
|
error: w
|
|
286
286
|
} = C({
|
|
@@ -294,10 +294,10 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
294
294
|
},
|
|
295
295
|
[d]
|
|
296
296
|
);
|
|
297
|
-
const D = h(() => !
|
|
298
|
-
|
|
297
|
+
const D = h(() => !F || !t?.formName ? [] : je(
|
|
298
|
+
F,
|
|
299
299
|
t.formName
|
|
300
|
-
), [
|
|
300
|
+
), [F, t?.formName]), G = h(
|
|
301
301
|
() => [
|
|
302
302
|
{ key: "recordedOn", header: a("FORM_RECORDED_ON") },
|
|
303
303
|
{ key: "recordedBy", header: a("FORM_RECORDED_BY") }
|
|
@@ -310,12 +310,12 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
310
310
|
],
|
|
311
311
|
[]
|
|
312
312
|
), E = h(() => {
|
|
313
|
-
const i =
|
|
313
|
+
const i = O.reduce(
|
|
314
314
|
(u, l) => {
|
|
315
|
-
const
|
|
316
|
-
u[
|
|
315
|
+
const g = l.formName;
|
|
316
|
+
u[g] ??= [];
|
|
317
317
|
const M = l.providers.map((Z) => Z.providerName).filter(Boolean).join(", ");
|
|
318
|
-
return u[
|
|
318
|
+
return u[g].push({
|
|
319
319
|
id: l.encounterUuid,
|
|
320
320
|
formName: l.formName,
|
|
321
321
|
recordedOn: ne(l.encounterDateTime, a, ue).formattedResult,
|
|
@@ -330,15 +330,15 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
330
330
|
([u, l]) => ({
|
|
331
331
|
formName: u,
|
|
332
332
|
records: l.sort(
|
|
333
|
-
(
|
|
333
|
+
(g, M) => M.encounterDateTime - g.encounterDateTime
|
|
334
334
|
)
|
|
335
335
|
})
|
|
336
336
|
).sort((u, l) => u.formName.localeCompare(l.formName));
|
|
337
|
-
}, [
|
|
337
|
+
}, [O, a]), x = L((i) => {
|
|
338
338
|
b(i), m(!0);
|
|
339
|
-
}, []), W =
|
|
339
|
+
}, []), W = L(() => {
|
|
340
340
|
m(!1), b(null);
|
|
341
|
-
}, []), B =
|
|
341
|
+
}, []), B = L(
|
|
342
342
|
(i, u) => {
|
|
343
343
|
switch (u) {
|
|
344
344
|
case "recordedOn":
|
|
@@ -366,7 +366,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
366
366
|
dataTestId: "forms-table"
|
|
367
367
|
}
|
|
368
368
|
) : /* @__PURE__ */ s(de, { align: "start", children: E.map((i, u) => {
|
|
369
|
-
const { formName: l, records:
|
|
369
|
+
const { formName: l, records: g } = i;
|
|
370
370
|
return /* @__PURE__ */ s(
|
|
371
371
|
me,
|
|
372
372
|
{
|
|
@@ -379,7 +379,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
379
379
|
{
|
|
380
380
|
headers: G,
|
|
381
381
|
ariaLabel: a("FORMS_HEADING"),
|
|
382
|
-
rows:
|
|
382
|
+
rows: g,
|
|
383
383
|
loading: !1,
|
|
384
384
|
errorStateMessage: "",
|
|
385
385
|
sortable: X,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as v, D as u, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { s as d, v as f, y as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as v, D as u, Q as i } from "./YPM2AS64-BGtPvUiv.js";
|
|
2
|
+
import { s as d, v as f, y as e } from "./index-CrpZf00-.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 { s as v, v as C, y 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-BGtPvUiv.js";
|
|
2
|
+
import { s as v, v as C, y as e } from "./index-CrpZf00-.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 T, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { h as B, p as V, u as I, m as x, q as K, b as w, e as z, d as G, r as Q, n as j, A as H, z as M, o as W, x as S, t as P, F as X, D as Y, N as J, j as Z, W as ee } from "./index-
|
|
2
|
+
import { h as B, p as V, u as I, m as x, q as K, b as w, e as z, d as G, r as Q, n as j, A as H, z as M, o as W, x as S, t as P, F as X, D as Y, N as J, j as Z, W as ee } from "./index-CrpZf00-.js";
|
|
3
3
|
import { useRef as te, useEffect as $, useMemo as h } from "react";
|
|
4
4
|
const A = (t, d, i, l, r) => {
|
|
5
5
|
const a = P(t, d), s = a.value, o = X(s);
|
|
@@ -7,7 +7,7 @@ const A = (t, d, i, l, r) => {
|
|
|
7
7
|
o === "Image" && (n = /* @__PURE__ */ c(J, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (n = /* @__PURE__ */ c(Z, { id: `${s}-video`, videoSrc: s }));
|
|
8
8
|
const b = r("OBSERVATIONS_RECORDED_BY", {
|
|
9
9
|
provider: a.provider
|
|
10
|
-
}),
|
|
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
|
{
|
|
@@ -85,31 +85,31 @@ const A = (t, d, i, l, r) => {
|
|
|
85
85
|
}))
|
|
86
86
|
});
|
|
87
87
|
$(() => {
|
|
88
|
-
n.forEach((e,
|
|
89
|
-
if (e.isError && !r.current.has(
|
|
90
|
-
const k = i[
|
|
88
|
+
n.forEach((e, m) => {
|
|
89
|
+
if (e.isError && !r.current.has(m)) {
|
|
90
|
+
const k = i[m];
|
|
91
91
|
s({
|
|
92
92
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
93
93
|
message: o("ERROR_FETCHING_CONCEPT", { conceptName: k }),
|
|
94
94
|
type: "error"
|
|
95
|
-
}), r.current.add(
|
|
96
|
-
} else e.isError || r.current.delete(
|
|
95
|
+
}), r.current.add(m);
|
|
96
|
+
} else e.isError || r.current.delete(m);
|
|
97
97
|
});
|
|
98
98
|
}, [n, i]);
|
|
99
|
-
const b = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]),
|
|
99
|
+
const b = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = h(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), v = h(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
100
100
|
data: u,
|
|
101
101
|
isLoading: D,
|
|
102
102
|
isError: R,
|
|
103
103
|
refetch: g
|
|
104
104
|
} = w({
|
|
105
|
-
queryKey: ne(a,
|
|
106
|
-
queryFn: () => ee(a,
|
|
107
|
-
enabled: !!a &&
|
|
105
|
+
queryKey: ne(a, p),
|
|
106
|
+
queryFn: () => ee(a, p),
|
|
107
|
+
enabled: !!a && p.length > 0 && v
|
|
108
108
|
});
|
|
109
109
|
z(
|
|
110
110
|
(e) => {
|
|
111
111
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
112
|
-
(
|
|
112
|
+
(m) => p.includes(m)
|
|
113
113
|
) && g();
|
|
114
114
|
},
|
|
115
115
|
[a, g]
|
|
@@ -122,13 +122,13 @@ const A = (t, d, i, l, r) => {
|
|
|
122
122
|
}, [R]);
|
|
123
123
|
const f = h(() => {
|
|
124
124
|
if (!u) return [];
|
|
125
|
-
const e = G(u),
|
|
126
|
-
return j(
|
|
125
|
+
const e = G(u), m = Q(e);
|
|
126
|
+
return j(m);
|
|
127
127
|
}, [u]), F = [
|
|
128
128
|
{ key: "name", header: "name" },
|
|
129
129
|
{ key: "value", header: "value" },
|
|
130
130
|
{ key: "form", header: "form" }
|
|
131
|
-
], O = D || !v, _ = R && v, q = (!u || u.entry?.length === 0 ||
|
|
131
|
+
], O = D || !v, _ = R && v, q = (!u || u.entry?.length === 0 || p.length === 0) && v, L = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = q ? o("NO_OBSERVATIONS_FOUND") : void 0, C = f.length > 0 && !O && !_, E = d.titleTranslationKey, y = E ? o(E) : "";
|
|
132
132
|
return /* @__PURE__ */ T(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as we, E as z, H as xt, I as B, v as q, y, P as Ro, L as ye, S as R, O as _, Q as k, R as N, T as A, X as bs, Z as ir, _ as $e, $ as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Ls } from "./index-
|
|
1
|
+
import { B as we, E as z, H as xt, I as B, v as q, y, P as Ro, L as ye, S as R, O as _, Q as k, R as N, T as A, X as bs, Z as ir, _ as $e, $ as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Ls } from "./index-CrpZf00-.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|