@bahmni/admin-app 0.0.1-dev.431 → 0.0.1-dev.433
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-Dw5fIQzH.js → AdminDashboard-CDmLe93H.js} +4 -4
- package/dist/{CsvUpload-BLYyDKod.js → CsvUpload-CSAdWMlI.js} +1 -1
- package/dist/{DocumentsTable-DWjMvJ6C-C9_b-X3_.js → DocumentsTable-BccNRlfK-CWGScNxr.js} +22 -22
- package/dist/{FormsTable-B-Iv4X3R-ComAB0ok.js → FormsTable-Du0mfyww-BdyNEzjn.js} +73 -73
- package/dist/{LNWAZHJI-hYQ77yND.js → LNWAZHJI-7Heonzik.js} +4 -4
- package/dist/{MWZ6AO7Z-IlL7Z3YC.js → MWZ6AO7Z-BN1wW_au.js} +3 -3
- package/dist/{Observations-C-GGEtZL-R3W-zH1J.js → Observations-CIJz8xhv-DsCCza56.js} +50 -50
- package/dist/{YPM2AS64-DgE_cB3c.js → YPM2AS64-YEsL5vNb.js} +309 -309
- package/dist/{index-DAupO0TX.js → index-CbPaTAm0.js} +9588 -9583
- 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 { g as
|
|
1
|
+
import { jsxs as I, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { g as H, z as M, u as V, h as Q, V as j, d as G, p as Y, c as J, e as P, A as W, x as X, N as Z, j as ee, Y as ae, H as se, k as F, l as re, r as te, m as ie, F as ne, S as oe, I as de, $ as le } from "./index-CbPaTAm0.js";
|
|
3
3
|
import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as
|
|
5
|
-
const
|
|
6
|
-
observations:
|
|
4
|
+
import { useRef as pe, useEffect as L, useMemo as E } from "react";
|
|
5
|
+
const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
|
|
6
|
+
observations: me,
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
10
|
}, B = (s, l, n, d, u, r) => {
|
|
11
|
-
const t = re(s, l, u), e = t.value,
|
|
11
|
+
const t = re(s, l, u), e = t.value, p = te(e);
|
|
12
12
|
let i = e;
|
|
13
|
-
|
|
13
|
+
p === "Image" && (i = /* @__PURE__ */ o(
|
|
14
14
|
oe,
|
|
15
15
|
{
|
|
16
16
|
imageSrc: e,
|
|
@@ -18,29 +18,29 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
18
18
|
id: `${e}-img`,
|
|
19
19
|
hideThumbnail: r
|
|
20
20
|
}
|
|
21
|
-
)),
|
|
21
|
+
)), p === "Video" && (i = /* @__PURE__ */ o(
|
|
22
22
|
de,
|
|
23
23
|
{
|
|
24
24
|
id: `${e}-video`,
|
|
25
25
|
videoSrc: e,
|
|
26
26
|
hideThumbnail: r
|
|
27
27
|
}
|
|
28
|
-
)),
|
|
29
|
-
const
|
|
28
|
+
)), p === "PDF" && (i = /* @__PURE__ */ o(le, { id: `${e}-pdf`, src: e }));
|
|
29
|
+
const m = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
30
30
|
/* @__PURE__ */ o("span", { children: t.header.display }),
|
|
31
31
|
t.header.referenceRange && /* @__PURE__ */ o("span", { className: O.secondary, children: t.header.referenceRange })
|
|
32
32
|
] }), c = u("OBSERVATIONS_RECORDED_BY", {
|
|
33
33
|
provider: t.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, u, !0).formattedResult : void 0,
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, u, !0).formattedResult : void 0, T = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
35
35
|
/* @__PURE__ */ o("span", { children: c }),
|
|
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: m,
|
|
42
42
|
value: i,
|
|
43
|
-
info:
|
|
43
|
+
info: T,
|
|
44
44
|
id: R,
|
|
45
45
|
testId: R,
|
|
46
46
|
ariaLabel: R
|
|
@@ -48,15 +48,15 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
50
50
|
}, ye = (s, l, n, d, u, r, t) => /* @__PURE__ */ o(
|
|
51
|
-
|
|
51
|
+
F,
|
|
52
52
|
{
|
|
53
53
|
title: s.display,
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: n,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e,
|
|
57
|
+
(e, p) => B(
|
|
58
58
|
e,
|
|
59
|
-
|
|
59
|
+
p,
|
|
60
60
|
u,
|
|
61
61
|
r,
|
|
62
62
|
l,
|
|
@@ -70,19 +70,19 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
70
70
|
title: l = "",
|
|
71
71
|
hideThumbnail: n
|
|
72
72
|
}) => {
|
|
73
|
-
const { t: d } =
|
|
74
|
-
const
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
|
|
73
|
+
const { t: d } = V(), u = (r, t, e) => {
|
|
74
|
+
const p = se(r.encounterDetails, d);
|
|
75
|
+
return /* @__PURE__ */ I(
|
|
76
|
+
F,
|
|
77
77
|
{
|
|
78
|
-
title:
|
|
78
|
+
title: p,
|
|
79
79
|
id: `encounter-${r.encounterId}`,
|
|
80
80
|
open: t,
|
|
81
81
|
children: [
|
|
82
82
|
r.observations.map(
|
|
83
|
-
(i,
|
|
83
|
+
(i, m) => B(
|
|
84
84
|
i,
|
|
85
|
-
|
|
85
|
+
m,
|
|
86
86
|
e,
|
|
87
87
|
l,
|
|
88
88
|
d,
|
|
@@ -90,11 +90,11 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
90
90
|
)
|
|
91
91
|
),
|
|
92
92
|
r.groupedObservations.map(
|
|
93
|
-
(i,
|
|
93
|
+
(i, m) => ye(
|
|
94
94
|
i,
|
|
95
95
|
d,
|
|
96
96
|
t,
|
|
97
|
-
|
|
97
|
+
m,
|
|
98
98
|
e,
|
|
99
99
|
l,
|
|
100
100
|
n
|
|
@@ -122,7 +122,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
122
122
|
...l,
|
|
123
123
|
n,
|
|
124
124
|
d
|
|
125
|
-
],
|
|
125
|
+
], Ie = ({
|
|
126
126
|
config: s,
|
|
127
127
|
episodeOfCareUuids: l,
|
|
128
128
|
encounterUuids: n
|
|
@@ -132,28 +132,28 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: r = [],
|
|
133
133
|
hideThumbnail: t = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d,
|
|
135
|
+
} = d, p = pe(/* @__PURE__ */ new Set()), i = H(), { addNotification: m } = M(), { t: c } = V(), b = ce({
|
|
136
136
|
queries: u.map((a) => ({
|
|
137
137
|
queryKey: Re(a),
|
|
138
|
-
queryFn: () =>
|
|
138
|
+
queryFn: () => Q(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
142
|
L(() => {
|
|
143
|
-
const a = b.some((z) => z.isError), y =
|
|
144
|
-
a && !y ? (
|
|
143
|
+
const a = b.some((z) => z.isError), y = p.current.size > 0;
|
|
144
|
+
a && !y ? (m({
|
|
145
145
|
title: c("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: c("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
|
-
}),
|
|
149
|
-
}, [b,
|
|
150
|
-
const
|
|
148
|
+
}), p.current.add(0)) : !a && y && p.current.clear();
|
|
149
|
+
}, [b, m, c]);
|
|
150
|
+
const T = E(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = E(() => [.../* @__PURE__ */ new Set([...T, ...r])], [T, r]), v = E(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), R = e === "latest" || e === "latest-encounter", U = j(
|
|
151
151
|
l,
|
|
152
152
|
n
|
|
153
153
|
), {
|
|
154
154
|
data: _,
|
|
155
|
-
isLoading:
|
|
156
|
-
isError:
|
|
155
|
+
isLoading: q,
|
|
156
|
+
isError: S,
|
|
157
157
|
refetch: N
|
|
158
158
|
} = ue({
|
|
159
159
|
queryKey: _e(
|
|
@@ -162,7 +162,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
162
162
|
n,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () => R ?
|
|
165
|
+
queryFn: () => R ? G(
|
|
166
166
|
i,
|
|
167
167
|
h,
|
|
168
168
|
n
|
|
@@ -171,7 +171,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
171
171
|
h,
|
|
172
172
|
n
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && h.length > 0 && v && !
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !U
|
|
175
175
|
});
|
|
176
176
|
J(
|
|
177
177
|
(a) => {
|
|
@@ -181,12 +181,12 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
181
181
|
},
|
|
182
182
|
[i, N]
|
|
183
183
|
), L(() => {
|
|
184
|
-
|
|
184
|
+
S && m({
|
|
185
185
|
title: c("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: c("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
|
-
}, [
|
|
189
|
+
}, [S]);
|
|
190
190
|
const $ = E(() => {
|
|
191
191
|
if (!_) return [];
|
|
192
192
|
let a = P(_);
|
|
@@ -197,12 +197,12 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A =
|
|
201
|
-
return /* @__PURE__ */
|
|
200
|
+
], A = q || !v, D = S && v, w = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = D ? c("ERROR_FETCHING_OBSERVATIONS") : null, K = w ? c("NO_OBSERVATIONS_FOUND") : void 0, x = $.length > 0 && !A && !D, g = d.titleTranslationKey, f = g ? c(g) : "";
|
|
201
|
+
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid": g ? `observations-${
|
|
205
|
+
"data-testid": g ? `observations-${f}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
207
|
className: O.observations,
|
|
208
208
|
children: [
|
|
@@ -210,17 +210,17 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId: g ? `observations-title-${
|
|
214
|
-
title:
|
|
213
|
+
testId: g ? `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
|
+
x ? /* @__PURE__ */ o(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
223
|
-
title:
|
|
223
|
+
title: f,
|
|
224
224
|
hideThumbnail: t
|
|
225
225
|
}
|
|
226
226
|
) : /* @__PURE__ */ o(
|
|
@@ -230,8 +230,8 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: c("OBSERVATIONS"),
|
|
232
232
|
loading: A,
|
|
233
|
-
errorStateMessage:
|
|
234
|
-
emptyStateMessage:
|
|
233
|
+
errorStateMessage: C,
|
|
234
|
+
emptyStateMessage: K ?? c("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -241,6 +241,6 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
241
241
|
};
|
|
242
242
|
export {
|
|
243
243
|
Re as conceptUuidQueryKeys,
|
|
244
|
-
|
|
244
|
+
Ie as default,
|
|
245
245
|
_e as observationsQueryKeys
|
|
246
246
|
};
|