@bahmni/registration-app 0.0.1-dev.123 → 0.0.1-dev.124
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-BQvGqBU_-C4cuxpXe.js → FormsTable-D1MPelYk-CHxrMbo8.js} +49 -49
- package/dist/{LNWAZHJI-DFwmu3IM.js → LNWAZHJI-CclpXCHH.js} +2 -2
- package/dist/{MWZ6AO7Z-ChZyJ5Mr.js → MWZ6AO7Z-_pJb1h--.js} +2 -2
- package/dist/{Observations-CDoRldUQ-D8Kf_mD2.js → Observations-PGz2aygq-CBeTgo6Y.js} +5 -5
- package/dist/{YPM2AS64-Bdyy6j_5.js → YPM2AS64-HDmhfTSc.js} +1 -1
- package/dist/{index-C2lSw7zD.js → index-BIFo7YZM.js} +6303 -6285
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as t, jsxs as p, Fragment as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as t, jsxs as p, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { u as J, C as Q, Y as W, a as Z, n as ee, o as re, r as ae, H as oe, R as te, q as G, O as ne, L as se, b as me, c as de, w as x, G as ie, I as v } from "./index-BIFo7YZM.js";
|
|
3
3
|
import { useQuery as h } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as q, useMemo as N, useCallback as y } from "react";
|
|
5
5
|
import { createPortal as le } from "react-dom";
|
|
6
|
-
const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18", be = "_formDetailsContainer_1pd36_25", _e = "_observation_1pd36_30", fe = "_groupContainer_1pd36_39", Ne = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", ge = "_rowLabel_1pd36_58", he = "_rowValue_1pd36_67", ye = "_groupMembers_1pd36_75", ve = "_memberRow_1pd36_81",
|
|
6
|
+
const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18", be = "_formDetailsContainer_1pd36_25", _e = "_observation_1pd36_30", fe = "_groupContainer_1pd36_39", Ne = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", ge = "_rowLabel_1pd36_58", he = "_rowValue_1pd36_67", ye = "_groupMembers_1pd36_75", ve = "_memberRow_1pd36_81", Me = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Le = "_abnormalValue_1pd36_102", Te = "_commentSection_1pd36_110", Oe = "_commentText_1pd36_116", Re = "_nestedGroup_1pd36_125", Ce = "_nestedGroupLabel_1pd36_132", De = "_nestedGroupMembers_1pd36_141", o = {
|
|
7
7
|
formsTableBody: ce,
|
|
8
8
|
customAccordianItem: ue,
|
|
9
9
|
formContent: pe,
|
|
@@ -16,15 +16,15 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
16
16
|
rowValue: he,
|
|
17
17
|
groupMembers: ye,
|
|
18
18
|
memberRow: ve,
|
|
19
|
-
memberLabel:
|
|
20
|
-
memberValue:
|
|
21
|
-
abnormalValue:
|
|
22
|
-
commentSection:
|
|
23
|
-
commentText:
|
|
24
|
-
nestedGroup:
|
|
25
|
-
nestedGroupLabel:
|
|
19
|
+
memberLabel: Me,
|
|
20
|
+
memberValue: Ae,
|
|
21
|
+
abnormalValue: Le,
|
|
22
|
+
commentSection: Te,
|
|
23
|
+
commentText: Oe,
|
|
24
|
+
nestedGroup: Re,
|
|
25
|
+
nestedGroupLabel: Ce,
|
|
26
26
|
nestedGroupMembers: De
|
|
27
|
-
}, Fe = "ABNORMAL",
|
|
27
|
+
}, Fe = "ABNORMAL", U = (e) => {
|
|
28
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() === Fe;
|
|
29
29
|
return { units: s, rangeString: c, isAbnormal: a };
|
|
30
30
|
}, H = ({
|
|
@@ -70,7 +70,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
|
-
const { units: a, rangeString: b, isAbnormal: _ } =
|
|
73
|
+
const { units: a, rangeString: b, isAbnormal: _ } = U(e);
|
|
74
74
|
return /* @__PURE__ */ p(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
@@ -114,7 +114,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
114
114
|
index: s,
|
|
115
115
|
formName: d = ""
|
|
116
116
|
}) => {
|
|
117
|
-
const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: m, isAbnormal: c } =
|
|
117
|
+
const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: m, isAbnormal: c } = U(e), a = d ? `${d}-` : "";
|
|
118
118
|
return /* @__PURE__ */ p(
|
|
119
119
|
"div",
|
|
120
120
|
{
|
|
@@ -194,48 +194,48 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
194
194
|
encounterUuids: s,
|
|
195
195
|
config: d
|
|
196
196
|
}) => {
|
|
197
|
-
const { t: r } =
|
|
197
|
+
const { t: r } = J(), u = Q(), [m, c] = q(!1), [a, b] = q(null), _ = d?.numberOfVisits, $ = W(
|
|
198
198
|
e,
|
|
199
199
|
s
|
|
200
200
|
), {
|
|
201
201
|
data: g = [],
|
|
202
|
-
isLoading:
|
|
203
|
-
isError:
|
|
202
|
+
isLoading: T,
|
|
203
|
+
isError: O,
|
|
204
204
|
error: k
|
|
205
205
|
} = h({
|
|
206
206
|
queryKey: ["forms", u, e],
|
|
207
207
|
queryFn: () => Z(u, void 0, _),
|
|
208
208
|
enabled: !!u && !$
|
|
209
|
-
}),
|
|
209
|
+
}), R = N(() => !s || s.length === 0 ? g : g.filter(
|
|
210
210
|
(n) => s.includes(n.encounterUuid)
|
|
211
|
-
), [g, s]), { data:
|
|
211
|
+
), [g, s]), { data: C = [] } = h({
|
|
212
212
|
queryKey: ["observationForms"],
|
|
213
213
|
queryFn: ee
|
|
214
214
|
}), D = y(
|
|
215
|
-
(n) =>
|
|
216
|
-
[
|
|
217
|
-
),
|
|
215
|
+
(n) => C.find((l) => l.name === n)?.uuid,
|
|
216
|
+
[C]
|
|
217
|
+
), M = N(() => {
|
|
218
218
|
if (a)
|
|
219
219
|
return D(a.formName);
|
|
220
220
|
}, [a, D]), {
|
|
221
221
|
data: Ie,
|
|
222
|
-
isLoading:
|
|
222
|
+
isLoading: j,
|
|
223
223
|
error: F
|
|
224
224
|
} = h({
|
|
225
|
-
queryKey: ["formMetadata",
|
|
226
|
-
queryFn: () => re(
|
|
227
|
-
enabled: !!
|
|
225
|
+
queryKey: ["formMetadata", M],
|
|
226
|
+
queryFn: () => re(M),
|
|
227
|
+
enabled: !!M && m
|
|
228
228
|
}), {
|
|
229
|
-
data:
|
|
230
|
-
isLoading:
|
|
229
|
+
data: A,
|
|
230
|
+
isLoading: K,
|
|
231
231
|
error: w
|
|
232
232
|
} = h({
|
|
233
233
|
queryKey: ["formsEncounter", a?.encounterUuid],
|
|
234
234
|
queryFn: () => ae(a.encounterUuid, !0),
|
|
235
235
|
enabled: !!a?.encounterUuid && m
|
|
236
|
-
}), I = N(() => !
|
|
236
|
+
}), I = N(() => !A?.observations || !a?.formName ? [] : A.observations.filter(
|
|
237
237
|
(n) => "formFieldPath" in n && typeof n.formFieldPath == "string" && n.formFieldPath.includes(a.formName)
|
|
238
|
-
), [
|
|
238
|
+
), [A?.observations, a?.formName]), E = N(
|
|
239
239
|
() => [
|
|
240
240
|
{ key: "recordedOn", header: r("FORM_RECORDED_ON") },
|
|
241
241
|
{ key: "recordedBy", header: r("FORM_RECORDED_BY") }
|
|
@@ -247,17 +247,17 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
247
247
|
{ key: "recordedBy", sortable: !0 }
|
|
248
248
|
],
|
|
249
249
|
[]
|
|
250
|
-
),
|
|
251
|
-
const n =
|
|
250
|
+
), B = N(() => {
|
|
251
|
+
const n = R.reduce(
|
|
252
252
|
(l, i) => {
|
|
253
253
|
const f = i.formName;
|
|
254
254
|
l[f] ??= [];
|
|
255
|
-
const
|
|
255
|
+
const L = i.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
|
|
256
256
|
return l[f].push({
|
|
257
257
|
id: i.encounterUuid,
|
|
258
258
|
formName: i.formName,
|
|
259
259
|
recordedOn: oe(i.encounterDateTime, r, ie).formattedResult,
|
|
260
|
-
recordedBy:
|
|
260
|
+
recordedBy: L ?? "--",
|
|
261
261
|
encounterDateTime: i.encounterDateTime,
|
|
262
262
|
encounterUuid: i.encounterUuid
|
|
263
263
|
}), l;
|
|
@@ -268,15 +268,15 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
268
268
|
([l, i]) => ({
|
|
269
269
|
formName: l,
|
|
270
270
|
records: i.sort(
|
|
271
|
-
(f,
|
|
271
|
+
(f, L) => L.encounterDateTime - f.encounterDateTime
|
|
272
272
|
)
|
|
273
273
|
})
|
|
274
274
|
).sort((l, i) => l.formName.localeCompare(i.formName));
|
|
275
|
-
}, [
|
|
275
|
+
}, [R, r]), S = y((n) => {
|
|
276
276
|
b(n), c(!0);
|
|
277
277
|
}, []), X = y(() => {
|
|
278
278
|
c(!1), b(null);
|
|
279
|
-
}, []),
|
|
279
|
+
}, []), V = y(
|
|
280
280
|
(n, l) => {
|
|
281
281
|
switch (l) {
|
|
282
282
|
case "recordedOn":
|
|
@@ -289,21 +289,21 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
289
289
|
},
|
|
290
290
|
[S]
|
|
291
291
|
);
|
|
292
|
-
return /* @__PURE__ */ p(
|
|
293
|
-
/* @__PURE__ */ t("div", { "data-testid": "forms-table", children:
|
|
294
|
-
|
|
292
|
+
return /* @__PURE__ */ p(z, { children: [
|
|
293
|
+
/* @__PURE__ */ t("div", { "data-testid": "forms-table", children: T || O || B.length === 0 || $ ? /* @__PURE__ */ t(
|
|
294
|
+
G,
|
|
295
295
|
{
|
|
296
|
-
headers:
|
|
296
|
+
headers: E,
|
|
297
297
|
ariaLabel: r("FORMS_HEADING"),
|
|
298
298
|
rows: [],
|
|
299
|
-
loading:
|
|
300
|
-
errorStateMessage:
|
|
299
|
+
loading: T,
|
|
300
|
+
errorStateMessage: O ? k?.message : void 0,
|
|
301
301
|
emptyStateMessage: r("FORMS_UNAVAILABLE"),
|
|
302
|
-
renderCell:
|
|
302
|
+
renderCell: V,
|
|
303
303
|
className: o.formsTableBody,
|
|
304
304
|
dataTestId: "forms-table"
|
|
305
305
|
}
|
|
306
|
-
) : /* @__PURE__ */ t(ne, { align: "start", children:
|
|
306
|
+
) : /* @__PURE__ */ t(ne, { align: "start", children: B.map((n, l) => {
|
|
307
307
|
const { formName: i, records: f } = n;
|
|
308
308
|
return /* @__PURE__ */ t(
|
|
309
309
|
se,
|
|
@@ -313,16 +313,16 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
313
313
|
testId: `accordian-title-${i}`,
|
|
314
314
|
open: l === 0,
|
|
315
315
|
children: /* @__PURE__ */ t(
|
|
316
|
-
|
|
316
|
+
G,
|
|
317
317
|
{
|
|
318
|
-
headers:
|
|
318
|
+
headers: E,
|
|
319
319
|
ariaLabel: r("FORMS_HEADING"),
|
|
320
320
|
rows: f,
|
|
321
321
|
loading: !1,
|
|
322
322
|
errorStateMessage: "",
|
|
323
323
|
sortable: P,
|
|
324
324
|
emptyStateMessage: r("FORMS_UNAVAILABLE"),
|
|
325
|
-
renderCell:
|
|
325
|
+
renderCell: V,
|
|
326
326
|
className: o.formsTableBody,
|
|
327
327
|
dataTestId: `forms-table-${i}`
|
|
328
328
|
}
|
|
@@ -343,7 +343,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
343
343
|
passiveModal: !0,
|
|
344
344
|
size: "md",
|
|
345
345
|
testId: "form-details-modal",
|
|
346
|
-
children: /* @__PURE__ */ t("div", { className: o.formContent, children:
|
|
346
|
+
children: /* @__PURE__ */ t("div", { className: o.formContent, children: j || K ? /* @__PURE__ */ t(de, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: x(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: x(w).message ?? r("ERROR_FETCHING_FORM_DATA") }) : I.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: I.map((n, l) => /* @__PURE__ */ t(
|
|
347
347
|
we,
|
|
348
348
|
{
|
|
349
349
|
observation: n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-
|
|
2
|
-
import { g as d, h as f, i as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-HDmhfTSc.js";
|
|
2
|
+
import { g as d, h as f, i as e } from "./index-BIFo7YZM.js";
|
|
3
3
|
var h = (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 i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { g as h, h as v, i as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-HDmhfTSc.js";
|
|
2
|
+
import { g as h, h as v, i as e } from "./index-BIFo7YZM.js";
|
|
3
3
|
var C = (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,
|
|
2
|
+
import { C as F, T as G, u as I, e as U, t as Q, J as k, q as x, X as K, d as A, Q as X, A as H, D as j, f as J } from "./index-BIFo7YZM.js";
|
|
3
3
|
import { useQueries as P, useQuery as Y } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as Z, useEffect as S, useMemo as h } from "react";
|
|
5
5
|
const z = "normal", W = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", ee = "A", te = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", ne = (e, n) => e?.date ? K(e.date, n).formattedResult : n("DATE_ERROR_PARSE"), re = (e) => {
|
|
@@ -252,7 +252,7 @@ const w = (e, n, t, a, r) => {
|
|
|
252
252
|
}, be = "_observations_kfbhq_1", ge = "_title_kfbhq_12", T = {
|
|
253
253
|
observations: be,
|
|
254
254
|
title: ge
|
|
255
|
-
}, me = (e) => ["conceptUuid", e], fe = (e, n) => ["observations", e, ...n],
|
|
255
|
+
}, me = (e) => ["conceptUuid", e], fe = (e, n) => ["observations", e, ...n], Re = ({ config: e }) => {
|
|
256
256
|
const n = e, { conceptNames: t = [], conceptUuid: a = [] } = n, r = Z(/* @__PURE__ */ new Set()), o = F(), { addNotification: i } = G(), { t: s } = I(), u = P({
|
|
257
257
|
queries: t.map((d) => ({
|
|
258
258
|
queryKey: me(d),
|
|
@@ -296,7 +296,7 @@ const w = (e, n, t, a, r) => {
|
|
|
296
296
|
{ key: "name", header: "name" },
|
|
297
297
|
{ key: "value", header: "value" },
|
|
298
298
|
{ key: "form", header: "form" }
|
|
299
|
-
],
|
|
299
|
+
], R = N || !c, O = y && c, V = (!p || p.entry?.length === 0 || v.length === 0) && c, q = O ? s("ERROR_FETCHING_OBSERVATIONS") : null, L = V ? s("NO_OBSERVATIONS_FOUND") : void 0, M = E.length > 0 && !R && !O, f = n.titleTranslationKey, m = f ? s(f) : "";
|
|
300
300
|
return /* @__PURE__ */ _(
|
|
301
301
|
"div",
|
|
302
302
|
{
|
|
@@ -321,7 +321,7 @@ const w = (e, n, t, a, r) => {
|
|
|
321
321
|
headers: C,
|
|
322
322
|
rows: [],
|
|
323
323
|
ariaLabel: s("OBSERVATIONS"),
|
|
324
|
-
loading:
|
|
324
|
+
loading: R,
|
|
325
325
|
errorStateMessage: q,
|
|
326
326
|
emptyStateMessage: L,
|
|
327
327
|
dataTestId: "observations-table"
|
|
@@ -333,6 +333,6 @@ const w = (e, n, t, a, r) => {
|
|
|
333
333
|
};
|
|
334
334
|
export {
|
|
335
335
|
me as conceptUuidQueryKeys,
|
|
336
|
-
|
|
336
|
+
Re as default,
|
|
337
337
|
fe as observationsQueryKeys
|
|
338
338
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as we, k as z, l as xt, m as B, h as q, i as y, P as Ro, p as ye, S as R, s as _, v as k, x as N, y as A, z as bs, B as ir, E as $e, F as U,
|
|
1
|
+
import { j as we, k as z, l as xt, m as B, h as q, i as y, P as Ro, p as ye, S as R, s as _, v as k, x as N, y as A, z as bs, B as ir, E as $e, F as U, K as Hn, M as Vn, N as dt, U as D, V as xs, W as cn, Z as Be, _ 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-BIFo7YZM.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|