@bahmni/registration-app 0.0.1-dev.193 → 0.0.1-dev.195
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/{DocumentsTable-CYxu-75r-BJbhfu1m.js → DocumentsTable-CeadVs9A-BHQGBovi.js} +51 -51
- package/dist/{FormsTable-DrKr31Pe-BUdMioni.js → FormsTable-BOY-EyPE-BUtP6tLd.js} +88 -88
- package/dist/{LNWAZHJI-CiTcaWYv.js → LNWAZHJI-BFPf-Ifs.js} +7 -7
- package/dist/{MWZ6AO7Z-BclFgirQ.js → MWZ6AO7Z-D_Cm3TDa.js} +2 -2
- package/dist/{Observations-21c_55Fg-Dt82889t.js → Observations-BrQeD7aG-BL8whutt.js} +47 -47
- package/dist/{YPM2AS64-DGdGSxXG.js → YPM2AS64-CMp3BSyE.js} +1 -1
- package/dist/{index-ZU51OKCH.js → index-C39n3BXV.js} +46654 -47924
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as T, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { l as B, Q as K, u as I, U as V, K as x, f as Q, W as w, g as z, h as G, m as H, x as M, r as j, i as S, n as P, d as W, w as Y, N as J, A as X, z as Z } from "./index-C39n3BXV.js";
|
|
3
3
|
import { useQueries as ee, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as ae, useEffect as
|
|
5
|
-
const
|
|
6
|
-
const a = P(t, d, r), s = a.value, o =
|
|
4
|
+
import { useRef as ae, useEffect as $, useMemo as f } from "react";
|
|
5
|
+
const A = (t, d, n, u, r) => {
|
|
6
|
+
const a = P(t, d, r), s = a.value, o = W(s);
|
|
7
7
|
let i = s;
|
|
8
|
-
o === "Image" && (i = /* @__PURE__ */ l(
|
|
8
|
+
o === "Image" && (i = /* @__PURE__ */ l(J, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (i = /* @__PURE__ */ l(X, { id: `${s}-video`, videoSrc: s })), o === "PDF" && (i = /* @__PURE__ */ l(Z, { id: `${s}-pdf`, src: s }));
|
|
9
9
|
const b = r("OBSERVATIONS_RECORDED_BY", {
|
|
10
10
|
provider: a.provider
|
|
11
|
-
}), p = t.display,
|
|
11
|
+
}), p = t.display, v = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = u ? `${u}-${v}-${p}-${n}-${d}` : `${v}-${p}-${n}-${d}`;
|
|
12
12
|
return /* @__PURE__ */ l(
|
|
13
|
-
|
|
13
|
+
Y,
|
|
14
14
|
{
|
|
15
15
|
header: a.header,
|
|
16
16
|
value: i,
|
|
@@ -28,7 +28,7 @@ const D = (t, d, n, u, r) => {
|
|
|
28
28
|
id: `grouped-obs-${t.display}-${u}`,
|
|
29
29
|
open: n,
|
|
30
30
|
children: t.members?.map(
|
|
31
|
-
(s, o) =>
|
|
31
|
+
(s, o) => A(s, o, r, a, d)
|
|
32
32
|
)
|
|
33
33
|
},
|
|
34
34
|
`grouped-obs-${t.id}`
|
|
@@ -37,8 +37,8 @@ const D = (t, d, n, u, r) => {
|
|
|
37
37
|
title: d = ""
|
|
38
38
|
}) => {
|
|
39
39
|
const { t: n } = I(), u = (r, a, s) => {
|
|
40
|
-
const o =
|
|
41
|
-
return /* @__PURE__ */
|
|
40
|
+
const o = j(r.encounterDetails, n);
|
|
41
|
+
return /* @__PURE__ */ T(
|
|
42
42
|
S,
|
|
43
43
|
{
|
|
44
44
|
title: o,
|
|
@@ -46,7 +46,7 @@ const D = (t, d, n, u, r) => {
|
|
|
46
46
|
open: a,
|
|
47
47
|
children: [
|
|
48
48
|
r.observations.map(
|
|
49
|
-
(i, b) =>
|
|
49
|
+
(i, b) => A(i, b, s, d, n)
|
|
50
50
|
),
|
|
51
51
|
r.groupedObservations.map(
|
|
52
52
|
(i, b) => se(
|
|
@@ -74,89 +74,89 @@ const D = (t, d, n, u, r) => {
|
|
|
74
74
|
)
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
|
-
}, oe = "_observations_kfbhq_1", ie = "_title_kfbhq_12",
|
|
77
|
+
}, oe = "_observations_kfbhq_1", ie = "_title_kfbhq_12", N = {
|
|
78
78
|
observations: oe,
|
|
79
79
|
title: ie
|
|
80
80
|
}, ne = (t) => ["conceptUuid", t], de = (t, d) => ["observations", t, ...d], pe = ({ config: t }) => {
|
|
81
|
-
const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a =
|
|
81
|
+
const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = K(), { t: o } = I(), i = ee({
|
|
82
82
|
queries: n.map((e) => ({
|
|
83
83
|
queryKey: ne(e),
|
|
84
|
-
queryFn: () =>
|
|
84
|
+
queryFn: () => V(e),
|
|
85
85
|
enabled: !!e
|
|
86
86
|
}))
|
|
87
87
|
});
|
|
88
|
-
|
|
88
|
+
$(() => {
|
|
89
89
|
i.forEach((e, m) => {
|
|
90
90
|
if (e.isError && !r.current.has(m)) {
|
|
91
|
-
const
|
|
91
|
+
const k = n[m];
|
|
92
92
|
s({
|
|
93
93
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
94
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
94
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: k }),
|
|
95
95
|
type: "error"
|
|
96
96
|
}), r.current.add(m);
|
|
97
97
|
} else e.isError || r.current.delete(m);
|
|
98
98
|
});
|
|
99
99
|
}, [i, n]);
|
|
100
|
-
const b = f(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = f(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]),
|
|
100
|
+
const b = f(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = f(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]), v = f(() => n.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, n.length]), {
|
|
101
101
|
data: c,
|
|
102
|
-
isLoading:
|
|
103
|
-
isError:
|
|
104
|
-
refetch:
|
|
102
|
+
isLoading: U,
|
|
103
|
+
isError: g,
|
|
104
|
+
refetch: h
|
|
105
105
|
} = te({
|
|
106
106
|
queryKey: de(a, p),
|
|
107
|
-
queryFn: () =>
|
|
108
|
-
enabled: !!a && p.length > 0 &&
|
|
107
|
+
queryFn: () => x(a, p),
|
|
108
|
+
enabled: !!a && p.length > 0 && v
|
|
109
109
|
});
|
|
110
|
-
|
|
110
|
+
Q(
|
|
111
111
|
(e) => {
|
|
112
112
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
113
113
|
(m) => p.includes(m)
|
|
114
|
-
) &&
|
|
114
|
+
) && h();
|
|
115
115
|
},
|
|
116
|
-
[a,
|
|
117
|
-
),
|
|
118
|
-
|
|
116
|
+
[a, h]
|
|
117
|
+
), $(() => {
|
|
118
|
+
g && s({
|
|
119
119
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
120
120
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
121
121
|
type: "error"
|
|
122
122
|
});
|
|
123
|
-
}, [
|
|
124
|
-
const
|
|
123
|
+
}, [g]);
|
|
124
|
+
const R = f(() => {
|
|
125
125
|
if (!c) return [];
|
|
126
|
-
const e =
|
|
127
|
-
return
|
|
128
|
-
}, [c]),
|
|
126
|
+
const e = w(c), m = z(e);
|
|
127
|
+
return G(m);
|
|
128
|
+
}, [c]), D = [
|
|
129
129
|
{ key: "name", header: "name" },
|
|
130
130
|
{ key: "value", header: "value" },
|
|
131
131
|
{ key: "form", header: "form" }
|
|
132
|
-
], O =
|
|
133
|
-
return /* @__PURE__ */
|
|
132
|
+
], O = U || !v, _ = g && v, F = (!c || c.entry?.length === 0 || p.length === 0) && v, q = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, L = F ? o("NO_OBSERVATIONS_FOUND") : void 0, C = R.length > 0 && !O && !_, E = d.titleTranslationKey, y = E ? o(E) : "";
|
|
133
|
+
return /* @__PURE__ */ T(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
136
|
id: "observations",
|
|
137
|
-
"data-testid": E ? `observations-${
|
|
137
|
+
"data-testid": E ? `observations-${y}` : "observations",
|
|
138
138
|
"aria-label": "observations-aria-label",
|
|
139
|
-
className:
|
|
139
|
+
className: N.observations,
|
|
140
140
|
children: [
|
|
141
141
|
/* @__PURE__ */ l(
|
|
142
|
-
|
|
142
|
+
H,
|
|
143
143
|
{
|
|
144
144
|
id: "observations-title",
|
|
145
|
-
testId: E ? `observations-title-${
|
|
146
|
-
title:
|
|
147
|
-
className:
|
|
148
|
-
children: /* @__PURE__ */ l("p", { children:
|
|
145
|
+
testId: E ? `observations-title-${y}` : "observations-title",
|
|
146
|
+
title: y,
|
|
147
|
+
className: N.title,
|
|
148
|
+
children: /* @__PURE__ */ l("p", { children: y })
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
|
|
151
|
+
C ? /* @__PURE__ */ l(re, { groupedData: R, title: y }) : /* @__PURE__ */ l(
|
|
152
152
|
M,
|
|
153
153
|
{
|
|
154
|
-
headers:
|
|
154
|
+
headers: D,
|
|
155
155
|
rows: [],
|
|
156
156
|
ariaLabel: o("OBSERVATIONS"),
|
|
157
157
|
loading: O,
|
|
158
|
-
errorStateMessage:
|
|
159
|
-
emptyStateMessage:
|
|
158
|
+
errorStateMessage: q,
|
|
159
|
+
emptyStateMessage: L,
|
|
160
160
|
dataTestId: "observations-table"
|
|
161
161
|
}
|
|
162
162
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as we, t as z, v as xt, y as B, k as q, p as y, P as Ro, B as ye, D as R, F as _, H as k, L as N, M as A, O as bs, R as ir, V as $e, _ as U, $ as Hn, a0 as Vn, a1 as dt, a2 as D, a3 as xs, a4 as cn, a5 as Be, a6 as ws, a7 as qt, a8 as zt, a9 as $s, aa as Cs, ab as $n, ac as Ss, ad as Nr, ae as Bt, af as zo, ag as ks, ah as Es, ai as j, aj as Ur, ak as Ms, al as Ds, am as sr, an as As, ao as Ts, ap as zn, aq as Fs, ar as Is, as as Z, at as Ps, au as Ls } from "./index-C39n3BXV.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|