@bahmni/registration-app 0.0.1-dev.169 → 0.0.1-dev.170
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-DVAzwoLx-DtHP9GfQ.js → FormsTable-BPeGy94--DA_PuI0b.js} +40 -40
- package/dist/{LNWAZHJI-B4w846MM.js → LNWAZHJI-CLn-YMPC.js} +7 -7
- package/dist/{MWZ6AO7Z-BlkOhlA4.js → MWZ6AO7Z-CYnG06KQ.js} +2 -2
- package/dist/{Observations-o_GsRckh-C2GwUeXu.js → Observations-DFn-QE1o-DAuZGKeT.js} +16 -16
- package/dist/{YPM2AS64-BOhjibE5.js → YPM2AS64-BqSb_VXD.js} +1 -1
- package/dist/{index-C_ok2zy5.js → index-DA_fHx-R.js} +3350 -3346
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as s, jsxs as p, Fragment as H } from "react/jsx-runtime";
|
|
2
|
-
import { u as ee, h as re,
|
|
3
|
-
import { useQueryClient as he, useQuery as
|
|
4
|
-
import { useState as K, useMemo as h, useCallback as
|
|
5
|
-
const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6",
|
|
2
|
+
import { u as ee, h as re, v as ae, J as te, Y as oe, G as ne, K as se, e as de, i as me, T as ie, z as U, a as le, b as ce, c as ue, M as be, V as q, d as pe, g as _e, C as A, F as fe, N as $e, f as ve, U as ge } from "./index-DA_fHx-R.js";
|
|
3
|
+
import { useQueryClient as he, useQuery as L } from "@tanstack/react-query";
|
|
4
|
+
import { useState as K, useMemo as h, useCallback as R } from "react";
|
|
5
|
+
const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Ae = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", Fe = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Ve = "_rowLabel_1pd36_58", Oe = "_rowValue_1pd36_67", Te = "_groupMembers_1pd36_75", Ie = "_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 = {
|
|
6
6
|
formsTableBody: Ne,
|
|
7
7
|
customAccordianItem: ye,
|
|
8
|
-
formContent:
|
|
9
|
-
formDetailsContainer:
|
|
10
|
-
observation:
|
|
11
|
-
groupContainer:
|
|
8
|
+
formContent: Le,
|
|
9
|
+
formDetailsContainer: Re,
|
|
10
|
+
observation: Ae,
|
|
11
|
+
groupContainer: Ce,
|
|
12
12
|
rowContainer: Fe,
|
|
13
13
|
groupLabel: Me,
|
|
14
14
|
rowLabel: Ve,
|
|
15
15
|
rowValue: Oe,
|
|
16
|
-
groupMembers:
|
|
17
|
-
memberRow:
|
|
16
|
+
groupMembers: Te,
|
|
17
|
+
memberRow: Ie,
|
|
18
18
|
memberLabel: Se,
|
|
19
19
|
memberValue: we,
|
|
20
20
|
abnormalValue: De,
|
|
@@ -23,7 +23,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
23
23
|
nestedGroup: xe,
|
|
24
24
|
nestedGroupLabel: Be,
|
|
25
25
|
nestedGroupMembers: Ue
|
|
26
|
-
},
|
|
26
|
+
}, k = (e) => {
|
|
27
27
|
const r = fe(e);
|
|
28
28
|
return r === "Image" ? /* @__PURE__ */ s(
|
|
29
29
|
$e,
|
|
@@ -33,10 +33,10 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
33
33
|
id: `${e}-img`
|
|
34
34
|
}
|
|
35
35
|
) : r === "Video" ? /* @__PURE__ */ s(ve, { id: `${e}-video`, videoSrc: e }) : e;
|
|
36
|
-
},
|
|
36
|
+
}, P = (e) => {
|
|
37
37
|
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;
|
|
38
38
|
return { units: r, rangeString: m, isAbnormal: t };
|
|
39
|
-
},
|
|
39
|
+
}, j = ({
|
|
40
40
|
member: e,
|
|
41
41
|
depth: r = 0,
|
|
42
42
|
memberIndex: n = 0,
|
|
@@ -66,7 +66,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
66
66
|
className: o.nestedGroupMembers,
|
|
67
67
|
"data-testid": `${t}obs-nested-group-members-${m}-${n}`,
|
|
68
68
|
children: e.members?.map((N, y) => /* @__PURE__ */ s(
|
|
69
|
-
|
|
69
|
+
j,
|
|
70
70
|
{
|
|
71
71
|
member: N,
|
|
72
72
|
depth: r + 1,
|
|
@@ -80,7 +80,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
|
-
const { units: b, rangeString: v, isAbnormal: _ } =
|
|
83
|
+
const { units: b, rangeString: v, isAbnormal: _ } = P(e), f = e.observationValue?.value?.toString(), $ = f ? k(f) : null;
|
|
84
84
|
return /* @__PURE__ */ p(H, { children: [
|
|
85
85
|
/* @__PURE__ */ p(
|
|
86
86
|
"div",
|
|
@@ -92,7 +92,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
92
92
|
/* @__PURE__ */ p(
|
|
93
93
|
"p",
|
|
94
94
|
{
|
|
95
|
-
className:
|
|
95
|
+
className: A(
|
|
96
96
|
o.memberLabel,
|
|
97
97
|
_ ? o.abnormalValue : ""
|
|
98
98
|
),
|
|
@@ -106,7 +106,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
106
106
|
/* @__PURE__ */ p(
|
|
107
107
|
"div",
|
|
108
108
|
{
|
|
109
|
-
className:
|
|
109
|
+
className: A(
|
|
110
110
|
o.memberValue,
|
|
111
111
|
_ ? o.abnormalValue : ""
|
|
112
112
|
),
|
|
@@ -139,7 +139,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
139
139
|
formName: n = "",
|
|
140
140
|
comment: a
|
|
141
141
|
}) => {
|
|
142
|
-
const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } =
|
|
142
|
+
const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = P(e), b = n ? `${n}-` : "", v = e.observationValue?.value?.toString(), _ = v ? k(v) : null;
|
|
143
143
|
return /* @__PURE__ */ p(
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
@@ -155,7 +155,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
155
155
|
/* @__PURE__ */ p(
|
|
156
156
|
"p",
|
|
157
157
|
{
|
|
158
|
-
className:
|
|
158
|
+
className: A(
|
|
159
159
|
d ? o.groupLabel : o.rowLabel,
|
|
160
160
|
!d && t ? o.abnormalValue : ""
|
|
161
161
|
),
|
|
@@ -172,7 +172,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
172
172
|
className: o.groupMembers,
|
|
173
173
|
"data-testid": `${b}observation-group-members-${e.display}-${r}`,
|
|
174
174
|
children: e.members?.map((f, $) => /* @__PURE__ */ s(
|
|
175
|
-
|
|
175
|
+
j,
|
|
176
176
|
{
|
|
177
177
|
member: f,
|
|
178
178
|
depth: 0,
|
|
@@ -185,7 +185,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
185
185
|
) : /* @__PURE__ */ p(
|
|
186
186
|
"div",
|
|
187
187
|
{
|
|
188
|
-
className:
|
|
188
|
+
className: A(
|
|
189
189
|
o.rowValue,
|
|
190
190
|
t ? o.abnormalValue : ""
|
|
191
191
|
),
|
|
@@ -219,13 +219,13 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
219
219
|
)?.valueString : void 0, He = (e) => {
|
|
220
220
|
if (e)
|
|
221
221
|
return e.note?.[0]?.text;
|
|
222
|
-
},
|
|
223
|
-
const n =
|
|
222
|
+
}, ke = (e, r) => e.entry?.find((n) => n.resource?.id === r)?.resource, V = (e, r) => {
|
|
223
|
+
const n = ke(e, r);
|
|
224
224
|
return n ? {
|
|
225
225
|
formFieldPath: Ke(n),
|
|
226
226
|
comment: He(n)
|
|
227
227
|
} : {};
|
|
228
|
-
},
|
|
228
|
+
}, Pe = (e, r) => {
|
|
229
229
|
if (!e?.entry || !r)
|
|
230
230
|
return [];
|
|
231
231
|
const n = pe(e);
|
|
@@ -261,30 +261,30 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
261
261
|
isError: y,
|
|
262
262
|
error: z,
|
|
263
263
|
refetch: Y
|
|
264
|
-
} =
|
|
264
|
+
} = L({
|
|
265
265
|
queryKey: ["forms", d, e],
|
|
266
266
|
queryFn: () => te(d, void 0, v),
|
|
267
267
|
enabled: !!d && !_
|
|
268
268
|
}), O = h(() => !r || r.length === 0 ? $ : $.filter(
|
|
269
269
|
(i) => r.includes(i.encounterUuid)
|
|
270
|
-
), [$, r]), { data:
|
|
270
|
+
), [$, r]), { data: T = [] } = L({
|
|
271
271
|
queryKey: ["observationForms"],
|
|
272
272
|
queryFn: () => oe()
|
|
273
|
-
}),
|
|
274
|
-
(i) =>
|
|
275
|
-
[
|
|
276
|
-
),
|
|
273
|
+
}), I = R(
|
|
274
|
+
(i) => T.find((u) => u.name === i)?.uuid,
|
|
275
|
+
[T]
|
|
276
|
+
), C = h(() => {
|
|
277
277
|
if (t)
|
|
278
|
-
return
|
|
279
|
-
}, [t,
|
|
280
|
-
queryKey: ["formMetadata",
|
|
281
|
-
queryFn: () => ne(
|
|
282
|
-
enabled: !!
|
|
278
|
+
return I(t.formName);
|
|
279
|
+
}, [t, I]), { isLoading: Q, error: S } = L({
|
|
280
|
+
queryKey: ["formMetadata", C],
|
|
281
|
+
queryFn: () => ne(C),
|
|
282
|
+
enabled: !!C && c
|
|
283
283
|
}), {
|
|
284
284
|
data: F,
|
|
285
285
|
isLoading: J,
|
|
286
286
|
error: w
|
|
287
|
-
} =
|
|
287
|
+
} = L({
|
|
288
288
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
289
289
|
queryFn: () => se(t.encounterUuid),
|
|
290
290
|
enabled: !!t?.encounterUuid && c
|
|
@@ -295,7 +295,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
295
295
|
},
|
|
296
296
|
[d]
|
|
297
297
|
);
|
|
298
|
-
const D = h(() => !F || !t?.formName ? [] :
|
|
298
|
+
const D = h(() => !F || !t?.formName ? [] : Pe(
|
|
299
299
|
F,
|
|
300
300
|
t.formName
|
|
301
301
|
), [F, t?.formName]), G = h(
|
|
@@ -335,11 +335,11 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
335
335
|
)
|
|
336
336
|
})
|
|
337
337
|
).sort((u, l) => u.formName.localeCompare(l.formName));
|
|
338
|
-
}, [O, a]), x =
|
|
338
|
+
}, [O, a]), x = R((i) => {
|
|
339
339
|
b(i), m(!0);
|
|
340
|
-
}, []), W =
|
|
340
|
+
}, []), W = R(() => {
|
|
341
341
|
m(!1), b(null);
|
|
342
|
-
}, []), B =
|
|
342
|
+
}, []), B = R(
|
|
343
343
|
(i, u) => {
|
|
344
344
|
switch (u) {
|
|
345
345
|
case "recordedOn":
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import {
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BqSb_VXD.js";
|
|
2
|
+
import { k as d, l as f, m as e } from "./index-DA_fHx-R.js";
|
|
3
3
|
var p = (a) => {
|
|
4
|
-
const [r,
|
|
4
|
+
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
6
|
}), n = d(), s = f(() => {
|
|
7
|
-
const
|
|
8
|
-
return
|
|
7
|
+
const o = r.theme_preference || l;
|
|
8
|
+
return o !== "system" ? o : n();
|
|
9
9
|
});
|
|
10
10
|
return e(i.Provider, {
|
|
11
11
|
value: a,
|
|
12
12
|
get children() {
|
|
13
13
|
return e(m, {
|
|
14
14
|
localStore: r,
|
|
15
|
-
setLocalStore:
|
|
15
|
+
setLocalStore: t,
|
|
16
16
|
get children() {
|
|
17
17
|
return e(u.Provider, {
|
|
18
18
|
value: s,
|
|
19
19
|
get children() {
|
|
20
20
|
return e(v, {
|
|
21
21
|
localStore: r,
|
|
22
|
-
setLocalStore:
|
|
22
|
+
setLocalStore: t
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
});
|
|
@@ -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-BqSb_VXD.js";
|
|
2
|
+
import { k as v, l as C, m as e } from "./index-DA_fHx-R.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as $, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { h as B, p as V, u as I, q as x, W as K, e as z, d as G, r as Q, n as j,
|
|
2
|
+
import { h as B, p as V, u as I, q as x, W as K, e as z, d as G, r as Q, n as j, _ as w, z as H, j as M, x as S, t as W, F as P, D as X, N as Y, f as J } from "./index-DA_fHx-R.js";
|
|
3
3
|
import { useQueries as Z, useQuery as ee } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as te, useEffect as N, useMemo as h } from "react";
|
|
5
|
-
const
|
|
5
|
+
const D = (t, d, i, l, r) => {
|
|
6
6
|
const a = W(t, d), s = a.value, o = P(s);
|
|
7
7
|
let n = s;
|
|
8
8
|
o === "Image" && (n = /* @__PURE__ */ c(Y, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (n = /* @__PURE__ */ c(J, { id: `${s}-video`, videoSrc: s }));
|
|
@@ -28,7 +28,7 @@ const A = (t, d, i, l, r) => {
|
|
|
28
28
|
id: `grouped-obs-${t.display}-${l}`,
|
|
29
29
|
open: i,
|
|
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}`
|
|
@@ -46,7 +46,7 @@ const A = (t, d, i, l, r) => {
|
|
|
46
46
|
open: a,
|
|
47
47
|
children: [
|
|
48
48
|
r.observations.map(
|
|
49
|
-
(n, b) =>
|
|
49
|
+
(n, b) => D(n, b, s, d, i)
|
|
50
50
|
),
|
|
51
51
|
r.groupedObservations.map(
|
|
52
52
|
(n, b) => ae(
|
|
@@ -99,9 +99,9 @@ const A = (t, d, i, l, r) => {
|
|
|
99
99
|
}, [n, i]);
|
|
100
100
|
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]), {
|
|
101
101
|
data: u,
|
|
102
|
-
isLoading:
|
|
102
|
+
isLoading: F,
|
|
103
103
|
isError: R,
|
|
104
|
-
refetch:
|
|
104
|
+
refetch: f
|
|
105
105
|
} = ee({
|
|
106
106
|
queryKey: ne(a, p),
|
|
107
107
|
queryFn: () => K(a, p),
|
|
@@ -111,9 +111,9 @@ const A = (t, d, i, l, r) => {
|
|
|
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,
|
|
116
|
+
[a, f]
|
|
117
117
|
), N(() => {
|
|
118
118
|
R && s({
|
|
119
119
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
@@ -121,15 +121,15 @@ const A = (t, d, i, l, r) => {
|
|
|
121
121
|
type: "error"
|
|
122
122
|
});
|
|
123
123
|
}, [R]);
|
|
124
|
-
const
|
|
124
|
+
const g = h(() => {
|
|
125
125
|
if (!u) return [];
|
|
126
126
|
const e = G(u), m = Q(e);
|
|
127
127
|
return j(m);
|
|
128
|
-
}, [u]),
|
|
128
|
+
}, [u]), q = [
|
|
129
129
|
{ key: "name", header: "name" },
|
|
130
130
|
{ key: "value", header: "value" },
|
|
131
131
|
{ key: "form", header: "form" }
|
|
132
|
-
],
|
|
132
|
+
], _ = F || !v, O = R && v, A = (!u || u.entry?.length === 0 || p.length === 0) && v, L = O ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, k = g.length > 0 && !_ && !O, E = d.titleTranslationKey, y = E ? o(E) : "";
|
|
133
133
|
return /* @__PURE__ */ $(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
@@ -148,15 +148,15 @@ const A = (t, d, i, l, r) => {
|
|
|
148
148
|
children: /* @__PURE__ */ c("p", { children: y })
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
|
|
151
|
+
k ? /* @__PURE__ */ c(re, { groupedData: g, title: y }) : /* @__PURE__ */ c(
|
|
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
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as we, s as z, w as xt, y as B, l as q, m as y, P as Ro, A as ye, S as R, B as _, E as k, H as N, I as A, L as bs, O as ir, Q as $e, R as U, X as Hn, Z as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-DA_fHx-R.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|