@bahmni/admin-app 0.0.1-dev.439 → 0.0.1-dev.440
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/{AdminDashboard-CULvIpd5.js → AdminDashboard-nuKCCgKT.js} +2 -2
- package/dist/{AuditLog-DkTbV9BG.js → AuditLog-C-HT6GQj.js} +35 -35
- package/dist/{CsvUpload-DkuV4Ixd.js → CsvUpload-Cg6Hj0up.js} +1 -1
- package/dist/{DocumentsTable-DOPEQt14-D496l9qY.js → DocumentsTable-CirHKvw9-CdwYTIVR.js} +14 -14
- package/dist/{FormsTable-5kbGeeFq-2NxLFWoa.js → FormsTable-CqUGhZ65-U61sotfK.js} +90 -90
- package/dist/{LNWAZHJI-DL7T8niD.js → LNWAZHJI-arAZ54bp.js} +2 -2
- package/dist/{MWZ6AO7Z-DQwcZPbL.js → MWZ6AO7Z-TgUNgqEY.js} +2 -2
- package/dist/{Observations-BUz9smcC-AopQYTP_.js → Observations-BhAU90jX-BxHxuK72.js} +55 -55
- package/dist/{YPM2AS64-CUMbqjIc.js → YPM2AS64-C_XJnyBg.js} +1 -1
- package/dist/{index-DCAEnw_P.js → index-BdGZxaWH.js} +30293 -30270
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as I, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { d as
|
|
2
|
+
import { d as G, z as H, u as F, I as j, H as J, i as M, Z as Y, w as x, Y as P, Q as X, J as Z, X as W, j as ee, $ as ae, G as se, E as U, K as te, l as re, h as ie, m as ne, n as oe, o as de, F as le } from "./index-BdGZxaWH.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as
|
|
5
|
-
const
|
|
6
|
-
observations:
|
|
4
|
+
import { useRef as me, useEffect as L, useMemo as g } from "react";
|
|
5
|
+
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
|
|
6
|
+
observations: pe,
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
|
-
},
|
|
11
|
-
const r = te(s, l, c), e = r.value,
|
|
10
|
+
}, V = (s, l, n, d, c, t) => {
|
|
11
|
+
const r = te(s, l, c), e = r.value, m = re(e);
|
|
12
12
|
let i = e;
|
|
13
|
-
|
|
13
|
+
m === "Image" && (i = /* @__PURE__ */ o(
|
|
14
14
|
oe,
|
|
15
15
|
{
|
|
16
16
|
imageSrc: e,
|
|
@@ -18,29 +18,29 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
18
18
|
id: `${e}-img`,
|
|
19
19
|
hideThumbnail: t
|
|
20
20
|
}
|
|
21
|
-
)),
|
|
21
|
+
)), m === "Video" && (i = /* @__PURE__ */ o(
|
|
22
22
|
de,
|
|
23
23
|
{
|
|
24
24
|
id: `${e}-video`,
|
|
25
25
|
videoSrc: e,
|
|
26
26
|
hideThumbnail: t
|
|
27
27
|
}
|
|
28
|
-
)),
|
|
29
|
-
const
|
|
28
|
+
)), m === "PDF" && (i = /* @__PURE__ */ o(le, { id: `${e}-pdf`, src: e }));
|
|
29
|
+
const p = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
30
30
|
/* @__PURE__ */ o("span", { children: r.header.display }),
|
|
31
31
|
r.header.referenceRange && /* @__PURE__ */ o("span", { className: O.secondary, children: r.header.referenceRange })
|
|
32
32
|
] }), u = c("OBSERVATIONS_RECORDED_BY", {
|
|
33
33
|
provider: r.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0,
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, E = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
35
35
|
/* @__PURE__ */ o("span", { children: u }),
|
|
36
36
|
b && /* @__PURE__ */ o("span", { className: O.secondary, children: b })
|
|
37
37
|
] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${v}-${h}-${n}-${l}` : `${v}-${h}-${n}-${l}`;
|
|
38
38
|
return /* @__PURE__ */ o(
|
|
39
39
|
ne,
|
|
40
40
|
{
|
|
41
|
-
header:
|
|
41
|
+
header: p,
|
|
42
42
|
value: i,
|
|
43
|
-
info:
|
|
43
|
+
info: E,
|
|
44
44
|
id: R,
|
|
45
45
|
testId: R,
|
|
46
46
|
ariaLabel: R
|
|
@@ -54,9 +54,9 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: n,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e,
|
|
57
|
+
(e, m) => V(
|
|
58
58
|
e,
|
|
59
|
-
|
|
59
|
+
m,
|
|
60
60
|
c,
|
|
61
61
|
t,
|
|
62
62
|
l,
|
|
@@ -70,19 +70,19 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
70
70
|
title: l = "",
|
|
71
71
|
hideThumbnail: n
|
|
72
72
|
}) => {
|
|
73
|
-
const { t: d } =
|
|
74
|
-
const
|
|
73
|
+
const { t: d } = F(), c = (t, r, e) => {
|
|
74
|
+
const m = se(t.encounterDetails, d);
|
|
75
75
|
return /* @__PURE__ */ I(
|
|
76
76
|
U,
|
|
77
77
|
{
|
|
78
|
-
title:
|
|
78
|
+
title: m,
|
|
79
79
|
id: `encounter-${t.encounterId}`,
|
|
80
80
|
open: r,
|
|
81
81
|
children: [
|
|
82
82
|
t.observations.map(
|
|
83
|
-
(i,
|
|
83
|
+
(i, p) => V(
|
|
84
84
|
i,
|
|
85
|
-
|
|
85
|
+
p,
|
|
86
86
|
e,
|
|
87
87
|
l,
|
|
88
88
|
d,
|
|
@@ -90,11 +90,11 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
90
90
|
)
|
|
91
91
|
),
|
|
92
92
|
t.groupedObservations.map(
|
|
93
|
-
(i,
|
|
93
|
+
(i, p) => ye(
|
|
94
94
|
i,
|
|
95
95
|
d,
|
|
96
96
|
r,
|
|
97
|
-
|
|
97
|
+
p,
|
|
98
98
|
e,
|
|
99
99
|
l,
|
|
100
100
|
n
|
|
@@ -116,7 +116,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
}, Re = (s) => ["conceptUuid", s],
|
|
119
|
+
}, Re = (s) => ["conceptUuid", s], _e = (s, l, n, d) => [
|
|
120
120
|
"observations",
|
|
121
121
|
s,
|
|
122
122
|
...l,
|
|
@@ -132,77 +132,77 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: t = [],
|
|
133
133
|
hideThumbnail: r = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d,
|
|
135
|
+
} = d, m = me(/* @__PURE__ */ new Set()), i = G(), { addNotification: p } = H(), { t: u } = F(), b = ue({
|
|
136
136
|
queries: c.map((a) => ({
|
|
137
137
|
queryKey: Re(a),
|
|
138
|
-
queryFn: () =>
|
|
138
|
+
queryFn: () => j(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
const a = b.some((
|
|
144
|
-
a && !y ? (
|
|
142
|
+
L(() => {
|
|
143
|
+
const a = b.some((z) => z.isError), y = m.current.size > 0;
|
|
144
|
+
a && !y ? (p({
|
|
145
145
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
|
-
}),
|
|
149
|
-
}, [b,
|
|
150
|
-
const
|
|
148
|
+
}), m.current.add(0)) : !a && y && m.current.clear();
|
|
149
|
+
}, [b, p, u]);
|
|
150
|
+
const E = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", B = J(
|
|
151
151
|
l,
|
|
152
152
|
n
|
|
153
153
|
), {
|
|
154
|
-
data:
|
|
154
|
+
data: _,
|
|
155
155
|
isLoading: w,
|
|
156
156
|
isError: S,
|
|
157
157
|
refetch: N
|
|
158
158
|
} = ce({
|
|
159
|
-
queryKey:
|
|
159
|
+
queryKey: _e(
|
|
160
160
|
i,
|
|
161
161
|
h,
|
|
162
162
|
n,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () => R ?
|
|
165
|
+
queryFn: () => R ? M(
|
|
166
166
|
i,
|
|
167
167
|
h,
|
|
168
168
|
n
|
|
169
|
-
) :
|
|
169
|
+
) : Y(
|
|
170
170
|
i,
|
|
171
171
|
h,
|
|
172
172
|
n
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && h.length > 0 && v && !
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !B
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
x(
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
179
|
(y) => h.includes(y)
|
|
180
180
|
) && N();
|
|
181
181
|
},
|
|
182
182
|
[i, N]
|
|
183
|
-
),
|
|
184
|
-
S &&
|
|
183
|
+
), L(() => {
|
|
184
|
+
S && p({
|
|
185
185
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
189
|
}, [S]);
|
|
190
190
|
const $ = g(() => {
|
|
191
|
-
if (!
|
|
192
|
-
let a =
|
|
193
|
-
e === "latest-encounter" && (a =
|
|
194
|
-
const y =
|
|
195
|
-
return
|
|
196
|
-
}, [
|
|
191
|
+
if (!_) return [];
|
|
192
|
+
let a = P(_);
|
|
193
|
+
e === "latest-encounter" && (a = X(a));
|
|
194
|
+
const y = Z(a);
|
|
195
|
+
return W(y);
|
|
196
|
+
}, [_, e]), K = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A = w || !v,
|
|
200
|
+
], A = w || !v, D = S && v, k = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, Q = k ? u("NO_OBSERVATIONS_FOUND") : void 0, q = $.length > 0 && !A && !D, T = d.titleTranslationKey, f = T ? u(T) : "";
|
|
201
201
|
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid":
|
|
205
|
+
"data-testid": T ? `observations-${f}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
207
|
className: O.observations,
|
|
208
208
|
children: [
|
|
@@ -210,28 +210,28 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId:
|
|
214
|
-
title:
|
|
213
|
+
testId: T ? `observations-title-${f}` : "observations-title",
|
|
214
|
+
title: f,
|
|
215
215
|
className: O.title,
|
|
216
|
-
children: /* @__PURE__ */ o("p", { children:
|
|
216
|
+
children: /* @__PURE__ */ o("p", { children: f })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
219
|
+
q ? /* @__PURE__ */ o(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
223
|
-
title:
|
|
223
|
+
title: f,
|
|
224
224
|
hideThumbnail: r
|
|
225
225
|
}
|
|
226
226
|
) : /* @__PURE__ */ o(
|
|
227
227
|
ae,
|
|
228
228
|
{
|
|
229
|
-
headers:
|
|
229
|
+
headers: K,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: u("OBSERVATIONS"),
|
|
232
232
|
loading: A,
|
|
233
233
|
errorStateMessage: C,
|
|
234
|
-
emptyStateMessage:
|
|
234
|
+
emptyStateMessage: Q ?? u("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -242,5 +242,5 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
242
242
|
export {
|
|
243
243
|
Re as conceptUuidQueryKeys,
|
|
244
244
|
Ie as default,
|
|
245
|
-
|
|
245
|
+
_e as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a5 as we, a6 as z, a7 as xt, a8 as B, a3 as q, a4 as y, a9 as Ro, aa as ye, ab as R, ac as _, ad as k, ae as N, af as A, ag as bs, ah as ir, ai as $e, aj as G, ak as Hn, al as Vn, am as dt, an as D, ao as xs, ap as cn, aq as Be, ar as ws, as as qt, at as zt, au as $s, av as Cs, aw as $n, ax as Ss, ay as Nr, az as Bt, aA as zo, aB as ks, aC as Es, aD as j, aE as Gr, aF as Ms, aG as Ds, aH as sr, aI as As, aJ as Ts, aK as zn, aL as Fs, aM as Is, aN as Z, aO as Ps, aP as Ls } from "./index-
|
|
1
|
+
import { a5 as we, a6 as z, a7 as xt, a8 as B, a3 as q, a4 as y, a9 as Ro, aa as ye, ab as R, ac as _, ad as k, ae as N, af as A, ag as bs, ah as ir, ai as $e, aj as G, ak as Hn, al as Vn, am as dt, an as D, ao as xs, ap as cn, aq as Be, ar as ws, as as qt, at as zt, au as $s, av as Cs, aw as $n, ax as Ss, ay as Nr, az as Bt, aA as zo, aB as ks, aC as Es, aD as j, aE as Gr, aF as Ms, aG as Ds, aH as sr, aI as As, aJ as Ts, aK as zn, aL as Fs, aM as Is, aN as Z, aO as Ps, aP as Ls } from "./index-BdGZxaWH.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|