@bahmni/home-app 0.0.1-dev.372 → 0.0.1-dev.373
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-CJDKfTCd-CpEH_DCA.js → DocumentsTable-DvzP4zA0-Ctn06ZiV.js} +14 -14
- package/dist/{FormsTable-CbqIREzM-m-Lr1LnM.js → FormsTable-BexiFTEe-aR2EeaaS.js} +77 -77
- package/dist/{LNWAZHJI-C_ZFiwJP.js → LNWAZHJI-Vc_o0Tiw.js} +2 -2
- package/dist/{MWZ6AO7Z-DFVKFTnN.js → MWZ6AO7Z-GBbhSrRz.js} +2 -2
- package/dist/{Observations-DtVG5HBx-DdIjjOGK.js → Observations-DIntvvSw-DlFe6p8y.js} +65 -65
- package/dist/{YPM2AS64-CmiBNAsn.js → YPM2AS64-DNGYQwaN.js} +1 -1
- package/dist/{index-BdpvSD9g.js → index-BDA93bdX.js} +141 -141
- package/dist/{index-BnfcTU4t.js → index-CptkFVlT.js} +30356 -30344
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { g as
|
|
1
|
+
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { g as K, G as q, u as N, V as G, h as k, m as H, R as M, D as Q, i as j, j as w, W as x, O as z, r as D, L as P, E as W, Z, l as J, o as X, q as ee } from "./index-CptkFVlT.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
5
|
-
const
|
|
6
|
-
const t = P(a, n, b), s = t.value,
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as E } from "react";
|
|
5
|
+
const L = (a, n, d, l, b, r) => {
|
|
6
|
+
const t = P(a, n, b), s = t.value, i = W(s);
|
|
7
|
+
let o = s;
|
|
8
|
+
i === "Image" && (o = /* @__PURE__ */ u(
|
|
9
|
+
J,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
13
13
|
id: `${s}-img`,
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
|
-
)),
|
|
17
|
-
|
|
16
|
+
)), i === "Video" && (o = /* @__PURE__ */ u(
|
|
17
|
+
X,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
21
21
|
hideThumbnail: r
|
|
22
22
|
}
|
|
23
|
-
)),
|
|
23
|
+
)), i === "PDF" && (o = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
24
|
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: t.provider
|
|
26
|
-
}), p = a.display,
|
|
26
|
+
}), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
Z,
|
|
29
29
|
{
|
|
30
30
|
header: t.header,
|
|
31
|
-
value:
|
|
31
|
+
value: o,
|
|
32
32
|
info: m,
|
|
33
33
|
id: c,
|
|
34
34
|
testId: c,
|
|
@@ -37,15 +37,15 @@ const C = (a, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${a.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
D,
|
|
41
41
|
{
|
|
42
42
|
title: a.display,
|
|
43
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: a.members?.map(
|
|
46
|
-
(s,
|
|
46
|
+
(s, i) => L(
|
|
47
47
|
s,
|
|
48
|
-
|
|
48
|
+
i,
|
|
49
49
|
b,
|
|
50
50
|
r,
|
|
51
51
|
n,
|
|
@@ -54,23 +54,23 @@ const C = (a, n, d, l, b, r) => {
|
|
|
54
54
|
)
|
|
55
55
|
},
|
|
56
56
|
`grouped-obs-${a.id}`
|
|
57
|
-
),
|
|
57
|
+
), ie = ({
|
|
58
58
|
groupedData: a,
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = N(), b = (r, t, s) => {
|
|
63
|
-
const
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
63
|
+
const i = z(r.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ I(
|
|
65
|
+
D,
|
|
66
66
|
{
|
|
67
|
-
title:
|
|
67
|
+
title: i,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(
|
|
73
|
-
|
|
72
|
+
(o, m) => L(
|
|
73
|
+
o,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
76
76
|
n,
|
|
@@ -79,8 +79,8 @@ const C = (a, n, d, l, b, r) => {
|
|
|
79
79
|
)
|
|
80
80
|
),
|
|
81
81
|
r.groupedObservations.map(
|
|
82
|
-
(
|
|
83
|
-
|
|
82
|
+
(o, m) => re(
|
|
83
|
+
o,
|
|
84
84
|
l,
|
|
85
85
|
t,
|
|
86
86
|
m,
|
|
@@ -105,100 +105,100 @@ const C = (a, n, d, l, b, r) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
},
|
|
109
|
-
observations:
|
|
108
|
+
}, oe = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", S = {
|
|
109
|
+
observations: oe,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
112
112
|
const n = a, {
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = K(), { addNotification: s } = q(), { t: i } = N(), o = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => G(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
$(() => {
|
|
124
|
-
|
|
124
|
+
o.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const B = d[h];
|
|
127
127
|
s({
|
|
128
|
-
title:
|
|
129
|
-
message:
|
|
128
|
+
title: i("ERROR_DEFAULT_TITLE"),
|
|
129
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
|
-
}, [
|
|
135
|
-
const m =
|
|
134
|
+
}, [o, d]);
|
|
135
|
+
const m = E(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = E(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = E(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
137
|
+
isLoading: F,
|
|
138
|
+
isError: O,
|
|
139
|
+
refetch: T
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
142
|
queryFn: () => k(t, p),
|
|
143
|
-
enabled: !!t && p.length > 0 &&
|
|
143
|
+
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
H(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && T();
|
|
150
150
|
},
|
|
151
|
-
[t,
|
|
151
|
+
[t, T]
|
|
152
152
|
), $(() => {
|
|
153
|
-
|
|
154
|
-
title:
|
|
155
|
-
message:
|
|
153
|
+
O && s({
|
|
154
|
+
title: i("ERROR_DEFAULT_TITLE"),
|
|
155
|
+
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const g =
|
|
158
|
+
}, [O]);
|
|
159
|
+
const g = E(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
161
|
+
const e = M(c), h = Q(e);
|
|
162
162
|
return j(h);
|
|
163
|
-
}, [c]),
|
|
163
|
+
}, [c]), A = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], f =
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], f = F || !y, _ = O && y, V = (!c || c.entry?.length === 0 || p.length === 0) && y, Y = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = V ? i("NO_OBSERVATIONS_FOUND") : void 0, U = g.length > 0 && !f && !_, v = n.titleTranslationKey, R = v ? i(v) : "";
|
|
168
|
+
return /* @__PURE__ */ I(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid":
|
|
172
|
+
"data-testid": v ? `observations-${R}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
|
-
className:
|
|
174
|
+
className: S.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
177
|
w,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId:
|
|
181
|
-
title:
|
|
182
|
-
className:
|
|
183
|
-
children: /* @__PURE__ */ u("p", { children:
|
|
180
|
+
testId: v ? `observations-title-${R}` : "observations-title",
|
|
181
|
+
title: R,
|
|
182
|
+
className: S.title,
|
|
183
|
+
children: /* @__PURE__ */ u("p", { children: R })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
U ? /* @__PURE__ */ u(
|
|
187
|
+
ie,
|
|
188
188
|
{
|
|
189
189
|
groupedData: g,
|
|
190
|
-
title:
|
|
190
|
+
title: R,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
194
|
x,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: A,
|
|
197
197
|
rows: [],
|
|
198
|
-
ariaLabel:
|
|
198
|
+
ariaLabel: i("OBSERVATIONS"),
|
|
199
199
|
loading: f,
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
200
|
+
errorStateMessage: Y,
|
|
201
|
+
emptyStateMessage: C,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a3 as we, a4 as z, a5 as xt, a6 as B, a1 as q, a2 as y, a7 as Ro, a8 as ye, a9 as R, aa as _, ab as k, ac as N, ad as A, ae as bs, af as ir, ag as $e, ah as G, ai as Hn, aj as Vn, ak as dt, al as D, am as xs, an as cn, ao as Be, ap as ws, aq as qt, ar as zt, as as $s, at as Cs, au as $n, av as Ss, aw as Nr, ax as Bt, ay as zo, az as ks, aA as Es, aB as j, aC as Gr, aD as Ms, aE as Ds, aF as sr, aG as As, aH as Ts, aI as zn, aJ as Fs, aK as Is, aL as Z, aM as Ps, aN as Ls } from "./index-
|
|
1
|
+
import { a3 as we, a4 as z, a5 as xt, a6 as B, a1 as q, a2 as y, a7 as Ro, a8 as ye, a9 as R, aa as _, ab as k, ac as N, ad as A, ae as bs, af as ir, ag as $e, ah as G, ai as Hn, aj as Vn, ak as dt, al as D, am as xs, an as cn, ao as Be, ap as ws, aq as qt, ar as zt, as as $s, at as Cs, au as $n, av as Ss, aw as Nr, ax as Bt, ay as zo, az as ks, aA as Es, aB as j, aC as Gr, aD as Ms, aE as Ds, aF as sr, aG as As, aH as Ts, aI as zn, aJ as Fs, aK as Is, aL as Z, aM as Ps, aN as Ls } from "./index-CptkFVlT.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|