@bahmni/registration-app 0.0.1-dev.131 → 0.0.1-dev.134
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-symiaWjC-CB_KEfzD.js → FormsTable-CJbdqo4y-CwAAXZH9.js} +74 -78
- package/dist/{LNWAZHJI-DTfiGcc5.js → LNWAZHJI-BXc4GWOH.js} +2 -2
- package/dist/{MWZ6AO7Z-zxcs_vVh.js → MWZ6AO7Z-CKjmVwjX.js} +2 -2
- package/dist/{Observations-Dkuz2yfC-CZ2o54xj.js → Observations-DhWTpv8S-DUDr1sHh.js} +1 -1
- package/dist/{YPM2AS64-Dz2qGqyu.js → YPM2AS64-BDE2OfUh.js} +1 -1
- package/dist/{index-D_Nrhuhz.js → index-BtXSN3Tb.js} +1477 -1422
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import { jsx as t, jsxs as p, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { u as W, C as Q, J as Y, I as Z, $ as ee, S as re, R as ae, c as oe, F as te, q as x, D as ne, a as se, b as me, d as de, v as G, h as ie, W as
|
|
2
|
+
import { u as W, C as Q, J as Y, I as Z, $ as ee, S as re, R as ae, c as oe, F as te, q as x, D as ne, a as se, b as me, d as de, v as G, h as ie, W as y } from "./index-BtXSN3Tb.js";
|
|
3
3
|
import { useQuery as h } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
groupMembers: ye,
|
|
4
|
+
import { useState as U, useMemo as $, useCallback as v } from "react";
|
|
5
|
+
const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue = "_formContent_1pd36_18", pe = "_formDetailsContainer_1pd36_25", be = "_observation_1pd36_30", _e = "_groupContainer_1pd36_39", fe = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", Ne = "_rowLabel_1pd36_58", ge = "_rowValue_1pd36_67", he = "_groupMembers_1pd36_75", ve = "_memberRow_1pd36_81", ye = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Me = "_abnormalValue_1pd36_102", Te = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Ce = "_nestedGroup_1pd36_125", De = "_nestedGroupLabel_1pd36_132", Le = "_nestedGroupMembers_1pd36_141", o = {
|
|
6
|
+
formsTableBody: le,
|
|
7
|
+
customAccordianItem: ce,
|
|
8
|
+
formContent: ue,
|
|
9
|
+
formDetailsContainer: pe,
|
|
10
|
+
observation: be,
|
|
11
|
+
groupContainer: _e,
|
|
12
|
+
rowContainer: fe,
|
|
13
|
+
groupLabel: $e,
|
|
14
|
+
rowLabel: Ne,
|
|
15
|
+
rowValue: ge,
|
|
16
|
+
groupMembers: he,
|
|
18
17
|
memberRow: ve,
|
|
19
|
-
memberLabel:
|
|
20
|
-
memberValue:
|
|
21
|
-
abnormalValue:
|
|
22
|
-
commentSection:
|
|
18
|
+
memberLabel: ye,
|
|
19
|
+
memberValue: Ae,
|
|
20
|
+
abnormalValue: Me,
|
|
21
|
+
commentSection: Te,
|
|
23
22
|
commentText: Re,
|
|
24
23
|
nestedGroup: Ce,
|
|
25
24
|
nestedGroupLabel: De,
|
|
26
|
-
nestedGroupMembers:
|
|
27
|
-
},
|
|
28
|
-
const s = e.concept?.units, d = e.concept?.lowNormal, r = e.concept?.hiNormal, u = d != null, m = r != null, c = u && m ? ` (${d} - ${r})` : u ? ` (>${d})` : m ? ` (<${r})` : "", a = e.interpretation && e.interpretation.toUpperCase() ===
|
|
25
|
+
nestedGroupMembers: Le
|
|
26
|
+
}, Oe = "ABNORMAL", q = (e) => {
|
|
27
|
+
const s = e.concept?.units, d = e.concept?.lowNormal, r = e.concept?.hiNormal, u = d != null, m = r != null, c = u && m ? ` (${d} - ${r})` : u ? ` (>${d})` : m ? ` (<${r})` : "", a = e.interpretation && e.interpretation.toUpperCase() === Oe;
|
|
29
28
|
return { units: s, rangeString: c, isAbnormal: a };
|
|
30
29
|
}, k = ({
|
|
31
30
|
member: e,
|
|
@@ -70,7 +69,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
70
69
|
]
|
|
71
70
|
}
|
|
72
71
|
);
|
|
73
|
-
const { units: a, rangeString: b, isAbnormal: _ } =
|
|
72
|
+
const { units: a, rangeString: b, isAbnormal: _ } = q(e);
|
|
74
73
|
return /* @__PURE__ */ p(
|
|
75
74
|
"div",
|
|
76
75
|
{
|
|
@@ -81,7 +80,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
81
80
|
/* @__PURE__ */ p(
|
|
82
81
|
"p",
|
|
83
82
|
{
|
|
84
|
-
className:
|
|
83
|
+
className: y(
|
|
85
84
|
o.memberLabel,
|
|
86
85
|
_ ? o.abnormalValue : ""
|
|
87
86
|
),
|
|
@@ -95,7 +94,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
95
94
|
/* @__PURE__ */ p(
|
|
96
95
|
"p",
|
|
97
96
|
{
|
|
98
|
-
className:
|
|
97
|
+
className: y(
|
|
99
98
|
o.memberValue,
|
|
100
99
|
_ ? o.abnormalValue : ""
|
|
101
100
|
),
|
|
@@ -109,12 +108,12 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
109
108
|
]
|
|
110
109
|
}
|
|
111
110
|
);
|
|
112
|
-
},
|
|
111
|
+
}, Fe = ({
|
|
113
112
|
observation: e,
|
|
114
113
|
index: s,
|
|
115
114
|
formName: d = ""
|
|
116
115
|
}) => {
|
|
117
|
-
const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: m, isAbnormal: c } =
|
|
116
|
+
const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: m, isAbnormal: c } = q(e), a = d ? `${d}-` : "";
|
|
118
117
|
return /* @__PURE__ */ p(
|
|
119
118
|
"div",
|
|
120
119
|
{
|
|
@@ -130,7 +129,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
130
129
|
/* @__PURE__ */ p(
|
|
131
130
|
"p",
|
|
132
131
|
{
|
|
133
|
-
className:
|
|
132
|
+
className: y(
|
|
134
133
|
r ? o.groupLabel : o.rowLabel,
|
|
135
134
|
!r && c ? o.abnormalValue : ""
|
|
136
135
|
),
|
|
@@ -160,7 +159,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
160
159
|
) : /* @__PURE__ */ p(
|
|
161
160
|
"p",
|
|
162
161
|
{
|
|
163
|
-
className:
|
|
162
|
+
className: y(
|
|
164
163
|
o.rowValue,
|
|
165
164
|
c ? o.abnormalValue : ""
|
|
166
165
|
),
|
|
@@ -189,37 +188,37 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
189
188
|
},
|
|
190
189
|
`${e.concept.uuid}-${s}`
|
|
191
190
|
);
|
|
192
|
-
},
|
|
191
|
+
}, Ve = ({
|
|
193
192
|
episodeOfCareUuids: e,
|
|
194
193
|
encounterUuids: s,
|
|
195
194
|
config: d
|
|
196
195
|
}) => {
|
|
197
|
-
const { t: r } = W(), u = Q(), [m, c] =
|
|
196
|
+
const { t: r } = W(), u = Q(), [m, c] = U(!1), [a, b] = U(null), _ = d?.numberOfVisits, N = Y(
|
|
198
197
|
e,
|
|
199
198
|
s
|
|
200
199
|
), {
|
|
201
200
|
data: g = [],
|
|
202
|
-
isLoading:
|
|
203
|
-
isError:
|
|
204
|
-
error:
|
|
201
|
+
isLoading: R,
|
|
202
|
+
isError: C,
|
|
203
|
+
error: X
|
|
205
204
|
} = h({
|
|
206
205
|
queryKey: ["forms", u, e],
|
|
207
206
|
queryFn: () => Z(u, void 0, _),
|
|
208
207
|
enabled: !!u && !N
|
|
209
|
-
}),
|
|
208
|
+
}), D = $(() => !s || s.length === 0 ? g : g.filter(
|
|
210
209
|
(n) => s.includes(n.encounterUuid)
|
|
211
|
-
), [g, s]), { data:
|
|
210
|
+
), [g, s]), { data: L = [] } = h({
|
|
212
211
|
queryKey: ["observationForms"],
|
|
213
212
|
queryFn: () => ee()
|
|
214
|
-
}), O =
|
|
215
|
-
(n) =>
|
|
216
|
-
[
|
|
213
|
+
}), O = v(
|
|
214
|
+
(n) => L.find((l) => l.name === n)?.uuid,
|
|
215
|
+
[L]
|
|
217
216
|
), A = $(() => {
|
|
218
217
|
if (a)
|
|
219
218
|
return O(a.formName);
|
|
220
219
|
}, [a, O]), {
|
|
221
|
-
data:
|
|
222
|
-
isLoading:
|
|
220
|
+
data: Ie,
|
|
221
|
+
isLoading: j,
|
|
223
222
|
error: F
|
|
224
223
|
} = h({
|
|
225
224
|
queryKey: ["formMetadata", A],
|
|
@@ -227,7 +226,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
227
226
|
enabled: !!A && m
|
|
228
227
|
}), {
|
|
229
228
|
data: M,
|
|
230
|
-
isLoading:
|
|
229
|
+
isLoading: H,
|
|
231
230
|
error: I
|
|
232
231
|
} = h({
|
|
233
232
|
queryKey: ["formsEncounter", a?.encounterUuid],
|
|
@@ -247,8 +246,8 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
247
246
|
{ key: "recordedBy", sortable: !0 }
|
|
248
247
|
],
|
|
249
248
|
[]
|
|
250
|
-
),
|
|
251
|
-
const n =
|
|
249
|
+
), E = $(() => {
|
|
250
|
+
const n = D.reduce(
|
|
252
251
|
(l, i) => {
|
|
253
252
|
const f = i.formName;
|
|
254
253
|
l[f] ??= [];
|
|
@@ -272,38 +271,38 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
272
271
|
)
|
|
273
272
|
})
|
|
274
273
|
).sort((l, i) => l.formName.localeCompare(i.formName));
|
|
275
|
-
}, [
|
|
274
|
+
}, [D, r]), B = v((n) => {
|
|
276
275
|
b(n), c(!0);
|
|
277
|
-
}, []), P =
|
|
276
|
+
}, []), P = v(() => {
|
|
278
277
|
c(!1), b(null);
|
|
279
|
-
}, []), V =
|
|
278
|
+
}, []), V = v(
|
|
280
279
|
(n, l) => {
|
|
281
280
|
switch (l) {
|
|
282
281
|
case "recordedOn":
|
|
283
|
-
return /* @__PURE__ */ t(te, { onClick: () =>
|
|
282
|
+
return /* @__PURE__ */ t(te, { onClick: () => B(n), children: n.recordedOn });
|
|
284
283
|
case "recordedBy":
|
|
285
284
|
return n.recordedBy;
|
|
286
285
|
default:
|
|
287
286
|
return null;
|
|
288
287
|
}
|
|
289
288
|
},
|
|
290
|
-
[
|
|
289
|
+
[B]
|
|
291
290
|
);
|
|
292
291
|
return /* @__PURE__ */ p(J, { children: [
|
|
293
|
-
/* @__PURE__ */ t("div", { "data-testid": "forms-table", children:
|
|
292
|
+
/* @__PURE__ */ t("div", { "data-testid": "forms-table", children: R || C || E.length === 0 || N ? /* @__PURE__ */ t(
|
|
294
293
|
x,
|
|
295
294
|
{
|
|
296
295
|
headers: S,
|
|
297
296
|
ariaLabel: r("FORMS_HEADING"),
|
|
298
297
|
rows: [],
|
|
299
|
-
loading:
|
|
300
|
-
errorStateMessage:
|
|
298
|
+
loading: R,
|
|
299
|
+
errorStateMessage: C ? X?.message : void 0,
|
|
301
300
|
emptyStateMessage: r("FORMS_UNAVAILABLE"),
|
|
302
301
|
renderCell: V,
|
|
303
302
|
className: o.formsTableBody,
|
|
304
303
|
dataTestId: "forms-table"
|
|
305
304
|
}
|
|
306
|
-
) : /* @__PURE__ */ t(ne, { align: "start", children:
|
|
305
|
+
) : /* @__PURE__ */ t(ne, { align: "start", children: E.map((n, l) => {
|
|
307
306
|
const { formName: i, records: f } = n;
|
|
308
307
|
return /* @__PURE__ */ t(
|
|
309
308
|
se,
|
|
@@ -331,33 +330,30 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
331
330
|
i
|
|
332
331
|
);
|
|
333
332
|
}) }) }),
|
|
334
|
-
m && a &&
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
),
|
|
357
|
-
document.getElementById("actionAreaLayout") ?? document.body
|
|
333
|
+
m && a && /* @__PURE__ */ t(
|
|
334
|
+
me,
|
|
335
|
+
{
|
|
336
|
+
id: "modalIdForActionAreaLayout",
|
|
337
|
+
open: m,
|
|
338
|
+
onRequestClose: P,
|
|
339
|
+
modalHeading: a.formName,
|
|
340
|
+
modalLabel: `${a.recordedOn} | ${a.recordedBy}`,
|
|
341
|
+
passiveModal: !0,
|
|
342
|
+
size: "md",
|
|
343
|
+
testId: "form-details-modal",
|
|
344
|
+
children: /* @__PURE__ */ t("div", { className: o.formContent, children: j || H ? /* @__PURE__ */ t(de, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: G(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : I ? /* @__PURE__ */ t("div", { children: G(I).message ?? r("ERROR_FETCHING_FORM_DATA") }) : w.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: w.map((n, l) => /* @__PURE__ */ t(
|
|
345
|
+
Fe,
|
|
346
|
+
{
|
|
347
|
+
observation: n,
|
|
348
|
+
index: l,
|
|
349
|
+
formName: a.formName
|
|
350
|
+
},
|
|
351
|
+
`${n.concept.uuid}`
|
|
352
|
+
)) }) : /* @__PURE__ */ t("div", { children: r("NO_FORM_DATA_AVAILABLE") }) })
|
|
353
|
+
}
|
|
358
354
|
)
|
|
359
355
|
] });
|
|
360
356
|
};
|
|
361
357
|
export {
|
|
362
|
-
|
|
358
|
+
Ve as default
|
|
363
359
|
};
|
|
@@ -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 { k as d, l as f, m as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BDE2OfUh.js";
|
|
2
|
+
import { k as d, l as f, m as e } from "./index-BtXSN3Tb.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 { k as v, l as C, m 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-BDE2OfUh.js";
|
|
2
|
+
import { k as v, l as C, m as e } from "./index-BtXSN3Tb.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as _, jsx as b } from "react/jsx-runtime";
|
|
2
|
-
import { C as F, T as U, u as I, L as X, e as k, o as x, q as K, f as Q, g as D, O as j, j as G, p as H, i as P } from "./index-
|
|
2
|
+
import { C as F, T as U, u as I, L as X, e as k, o as x, q as K, f as Q, g as D, O as j, j as G, p as H, i as P } from "./index-BtXSN3Tb.js";
|
|
3
3
|
import { useQueries as Y, useQuery as Z } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as z, useEffect as T, useMemo as h } from "react";
|
|
5
5
|
const J = "normal", W = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", ee = "A", te = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", ne = (e, n) => e?.date ? Q(e.date, n).formattedResult : n("DATE_ERROR_PARSE"), re = (e) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as we, r as z, s as xt, t as B, l as q, m as y, P as Ro, w as ye, x as R, y as _, z as k, A as N, B as A, E as bs, G as ir, H as $e, K as U, M as Hn, N as Vn, Q as dt, U as D, V as xs, X as cn, Y as Be, Z as ws, _ as qt, a0 as zt, a1 as $s, a2 as Cs, a3 as $n, a4 as Ss, a5 as Nr, a6 as Bt, a7 as zo, a8 as ks, a9 as Es, aa as j, ab as Ur, ac as Ms, ad as Ds, ae as sr, af as As, ag as Ts, ah as zn, ai as Fs, aj as Is, ak as Z, al as Ps, am as Ls } from "./index-
|
|
1
|
+
import { n as we, r as z, s as xt, t as B, l as q, m as y, P as Ro, w as ye, x as R, y as _, z as k, A as N, B as A, E as bs, G as ir, H as $e, K as U, M as Hn, N as Vn, Q as dt, U as D, V as xs, X as cn, Y as Be, Z as ws, _ as qt, a0 as zt, a1 as $s, a2 as Cs, a3 as $n, a4 as Ss, a5 as Nr, a6 as Bt, a7 as zo, a8 as ks, a9 as Es, aa as j, ab as Ur, ac as Ms, ad as Ds, ae as sr, af as As, ag as Ts, ah as zn, ai as Fs, aj as Is, ak as Z, al as Ps, am as Ls } from "./index-BtXSN3Tb.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|