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