@bahmni/reports-app 0.0.1-dev.423 → 0.0.1-dev.425
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-BVnv0gpO-CxXo0prU.js → DocumentsTable-Dbzg_SOZ-CBCxlBWf.js} +18 -18
- package/dist/{FormsTable-BOBb-hEm-BW0X21Di.js → FormsTable-BMa68g2K-ulhZCvD6.js} +81 -81
- package/dist/{LNWAZHJI-fsHxeVCA.js → LNWAZHJI-DXtKGI34.js} +2 -2
- package/dist/{MWZ6AO7Z-13YRi96_.js → MWZ6AO7Z-B9WXpsWU.js} +2 -2
- package/dist/{Observations-GQNCaUuo-BVRAL9k7.js → Observations-DxmGTSMO-DQ_1fZxL.js} +57 -57
- package/dist/{ReportsPage-CKGlEk62.js → ReportsPage-OQLqI347.js} +9 -9
- package/dist/{YPM2AS64-PromLoOA.js → YPM2AS64-9u-qHMWS.js} +1 -1
- package/dist/{index-Dr9Re1-R.js → index-Drn6hy5Z.js} +45413 -44821
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as S, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { g as H, z as M, u as B, B as x, y as G, d as J, P, m as Y, Q as j, r as W, i as X, t as Z, k as ee, Y as ae, J as se, n as U, X as re, W as te, w as ie, o as oe, R as ne, q as de, D as le } from "./index-Drn6hy5Z.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as me, useEffect as
|
|
5
|
-
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z",
|
|
4
|
+
import { useRef as me, useEffect as L, useMemo as E } from "react";
|
|
5
|
+
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", R = {
|
|
6
6
|
observations: pe,
|
|
7
7
|
title: be,
|
|
8
|
-
wrapper:
|
|
9
|
-
secondary:
|
|
8
|
+
wrapper: he,
|
|
9
|
+
secondary: ve
|
|
10
10
|
}, V = (s, l, o, d, c, r) => {
|
|
11
11
|
const t = re(s, l, c), e = t.value, m = te(e);
|
|
12
12
|
let i = e;
|
|
@@ -26,24 +26,24 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
26
26
|
hideThumbnail: r
|
|
27
27
|
}
|
|
28
28
|
)), m === "PDF" && (i = /* @__PURE__ */ n(le, { id: `${e}-pdf`, src: e }));
|
|
29
|
-
const p = /* @__PURE__ */
|
|
29
|
+
const p = /* @__PURE__ */ S("div", { className: R.wrapper, children: [
|
|
30
30
|
/* @__PURE__ */ n("span", { children: t.header.display }),
|
|
31
|
-
t.header.referenceRange && /* @__PURE__ */ n("span", { className:
|
|
31
|
+
t.header.referenceRange && /* @__PURE__ */ n("span", { className: R.secondary, children: t.header.referenceRange })
|
|
32
32
|
] }), u = c("OBSERVATIONS_RECORDED_BY", {
|
|
33
33
|
provider: t.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, f = /* @__PURE__ */
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, f = /* @__PURE__ */ S("div", { className: R.wrapper, children: [
|
|
35
35
|
/* @__PURE__ */ n("span", { children: u }),
|
|
36
|
-
b && /* @__PURE__ */ n("span", { className:
|
|
37
|
-
] }),
|
|
36
|
+
b && /* @__PURE__ */ n("span", { className: R.secondary, children: b })
|
|
37
|
+
] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", O = d ? `${d}-${v}-${h}-${o}-${l}` : `${v}-${h}-${o}-${l}`;
|
|
38
38
|
return /* @__PURE__ */ n(
|
|
39
39
|
oe,
|
|
40
40
|
{
|
|
41
41
|
header: p,
|
|
42
42
|
value: i,
|
|
43
43
|
info: f,
|
|
44
|
-
id:
|
|
45
|
-
testId:
|
|
46
|
-
ariaLabel:
|
|
44
|
+
id: O,
|
|
45
|
+
testId: O,
|
|
46
|
+
ariaLabel: O
|
|
47
47
|
},
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
@@ -65,14 +65,14 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
65
65
|
)
|
|
66
66
|
},
|
|
67
67
|
`grouped-obs-${s.id}`
|
|
68
|
-
),
|
|
68
|
+
), Re = ({
|
|
69
69
|
groupedData: s,
|
|
70
70
|
title: l = "",
|
|
71
71
|
hideThumbnail: o
|
|
72
72
|
}) => {
|
|
73
73
|
const { t: d } = B(), c = (r, t, e) => {
|
|
74
74
|
const m = se(r.encounterDetails, d);
|
|
75
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ S(
|
|
76
76
|
U,
|
|
77
77
|
{
|
|
78
78
|
title: m,
|
|
@@ -116,13 +116,13 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
},
|
|
119
|
+
}, Oe = (s) => ["conceptUuid", s], _e = (s, l, o, d) => [
|
|
120
120
|
"observations",
|
|
121
121
|
s,
|
|
122
122
|
...l,
|
|
123
123
|
o,
|
|
124
124
|
d
|
|
125
|
-
],
|
|
125
|
+
], Se = ({
|
|
126
126
|
config: s,
|
|
127
127
|
episodeOfCareUuids: l,
|
|
128
128
|
encounterUuids: o
|
|
@@ -132,92 +132,92 @@ 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, m = me(/* @__PURE__ */ new Set()), i =
|
|
135
|
+
} = d, m = me(/* @__PURE__ */ new Set()), i = H(), { addNotification: p } = M(), { t: u } = B(), b = ue({
|
|
136
136
|
queries: c.map((a) => ({
|
|
137
|
-
queryKey:
|
|
138
|
-
queryFn: () =>
|
|
137
|
+
queryKey: Oe(a),
|
|
138
|
+
queryFn: () => x(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
const a = b.some((
|
|
142
|
+
L(() => {
|
|
143
|
+
const a = b.some((z) => z.isError), y = m.current.size > 0;
|
|
144
144
|
a && !y ? (p({
|
|
145
145
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
148
|
}), m.current.add(0)) : !a && y && m.current.clear();
|
|
149
149
|
}, [b, p, u]);
|
|
150
|
-
const f =
|
|
150
|
+
const f = E(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = E(() => [.../* @__PURE__ */ new Set([...f, ...r])], [f, r]), v = E(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), O = e === "latest" || e === "latest-encounter", F = G(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
154
|
data: _,
|
|
155
|
-
isLoading:
|
|
156
|
-
isError:
|
|
157
|
-
refetch:
|
|
155
|
+
isLoading: w,
|
|
156
|
+
isError: I,
|
|
157
|
+
refetch: N
|
|
158
158
|
} = ce({
|
|
159
159
|
queryKey: _e(
|
|
160
160
|
i,
|
|
161
|
-
|
|
161
|
+
h,
|
|
162
162
|
o,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () =>
|
|
165
|
+
queryFn: () => O ? J(
|
|
166
166
|
i,
|
|
167
|
-
|
|
167
|
+
h,
|
|
168
168
|
o
|
|
169
|
-
) :
|
|
169
|
+
) : P(
|
|
170
170
|
i,
|
|
171
|
-
|
|
171
|
+
h,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i &&
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !F
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
Y(
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
|
-
(y) =>
|
|
180
|
-
) &&
|
|
179
|
+
(y) => h.includes(y)
|
|
180
|
+
) && N();
|
|
181
181
|
},
|
|
182
|
-
[i,
|
|
183
|
-
),
|
|
184
|
-
|
|
182
|
+
[i, N]
|
|
183
|
+
), L(() => {
|
|
184
|
+
I && p({
|
|
185
185
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
|
-
}, [
|
|
190
|
-
const $ =
|
|
189
|
+
}, [I]);
|
|
190
|
+
const $ = E(() => {
|
|
191
191
|
if (!_) return [];
|
|
192
|
-
let a =
|
|
192
|
+
let a = j(_);
|
|
193
193
|
e === "latest-encounter" && (a = W(a));
|
|
194
194
|
const y = X(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [_, e]),
|
|
196
|
+
}, [_, e]), k = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
],
|
|
201
|
-
return /* @__PURE__ */
|
|
200
|
+
], D = w || !v, A = I && v, q = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = A ? u("ERROR_FETCHING_OBSERVATIONS") : null, K = q ? u("NO_OBSERVATIONS_FOUND") : void 0, Q = $.length > 0 && !D && !A, g = d.titleTranslationKey, T = g ? u(g) : "";
|
|
201
|
+
return /* @__PURE__ */ S(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid":
|
|
205
|
+
"data-testid": g ? `observations-${T}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
|
-
className:
|
|
207
|
+
className: R.observations,
|
|
208
208
|
children: [
|
|
209
209
|
/* @__PURE__ */ n(
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId:
|
|
213
|
+
testId: g ? `observations-title-${T}` : "observations-title",
|
|
214
214
|
title: T,
|
|
215
|
-
className:
|
|
215
|
+
className: R.title,
|
|
216
216
|
children: /* @__PURE__ */ n("p", { children: T })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
Q ? /* @__PURE__ */ n(
|
|
220
|
+
Re,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
223
223
|
title: T,
|
|
@@ -226,12 +226,12 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
226
226
|
) : /* @__PURE__ */ n(
|
|
227
227
|
ae,
|
|
228
228
|
{
|
|
229
|
-
headers:
|
|
229
|
+
headers: k,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: u("OBSERVATIONS"),
|
|
232
|
-
loading:
|
|
233
|
-
errorStateMessage:
|
|
234
|
-
emptyStateMessage:
|
|
232
|
+
loading: D,
|
|
233
|
+
errorStateMessage: C,
|
|
234
|
+
emptyStateMessage: K ?? u("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -240,7 +240,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
240
240
|
);
|
|
241
241
|
};
|
|
242
242
|
export {
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
Oe as conceptUuidQueryKeys,
|
|
244
|
+
Se as default,
|
|
245
245
|
_e as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { u as E,
|
|
2
|
+
import { u as E, s as c, M as i, x as A, A as P, E as b, G as L, I as d, L as m, N as l, T as B, V as O } from "./index-Drn6hy5Z.js";
|
|
3
3
|
import { useMemo as h, useCallback as S } from "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
5
|
import { useLocation as g, useNavigate as u } from "react-router-dom";
|
|
6
6
|
const M = "ReportsPage-module_page__ewRXe", y = "ReportsPage-module_panel__HFBCt", s = {
|
|
7
7
|
page: M,
|
|
8
8
|
panel: y
|
|
9
|
-
}, o = 1,
|
|
9
|
+
}, o = 1, C = 0, f = () => {
|
|
10
10
|
const { t: e } = E(), n = g(), r = u(), R = h(
|
|
11
11
|
() => [
|
|
12
12
|
{ id: "home", label: e("REPORTS_HOME_LABEL"), href: c },
|
|
13
13
|
{ id: "reports", label: e("REPORTS_LABEL"), isCurrentPage: !0 }
|
|
14
14
|
],
|
|
15
15
|
[e]
|
|
16
|
-
), _ = n.pathname === i ? o :
|
|
16
|
+
), _ = n.pathname === i ? o : C, p = S(
|
|
17
17
|
({ selectedIndex: T }) => {
|
|
18
18
|
r(
|
|
19
|
-
T === o ? i :
|
|
19
|
+
T === o ? i : A
|
|
20
20
|
);
|
|
21
21
|
},
|
|
22
22
|
[r]
|
|
23
23
|
);
|
|
24
24
|
return /* @__PURE__ */ a(
|
|
25
|
-
|
|
25
|
+
P,
|
|
26
26
|
{
|
|
27
27
|
header: /* @__PURE__ */ a(
|
|
28
28
|
"div",
|
|
@@ -48,7 +48,7 @@ const M = "ReportsPage-module_page__ewRXe", y = "ReportsPage-module_panel__HFBCt
|
|
|
48
48
|
className: s.page,
|
|
49
49
|
children: /* @__PURE__ */ t(b, { selectedIndex: _, onChange: p, children: [
|
|
50
50
|
/* @__PURE__ */ t(
|
|
51
|
-
|
|
51
|
+
L,
|
|
52
52
|
{
|
|
53
53
|
id: "reports-tab-list",
|
|
54
54
|
"data-testid": "reports-tab-list-test-id",
|
|
@@ -75,7 +75,7 @@ const M = "ReportsPage-module_page__ewRXe", y = "ReportsPage-module_panel__HFBCt
|
|
|
75
75
|
]
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
|
-
/* @__PURE__ */ t(
|
|
78
|
+
/* @__PURE__ */ t(m, { children: [
|
|
79
79
|
/* @__PURE__ */ a(
|
|
80
80
|
l,
|
|
81
81
|
{
|
|
@@ -104,6 +104,6 @@ const M = "ReportsPage-module_page__ewRXe", y = "ReportsPage-module_panel__HFBCt
|
|
|
104
104
|
);
|
|
105
105
|
};
|
|
106
106
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
f as ReportsPage,
|
|
108
|
+
f as default
|
|
109
109
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a2 as we, a3 as z, a4 as xt, a5 as B, a0 as q, a1 as y, a6 as Ro, a7 as ye, a8 as R, a9 as _, aa as k, ab as N, ac as A, ad as bs, ae as ir, af as $e, ag as G, ah as Hn, ai as Vn, aj as dt, ak as D, al as xs, am as cn, an as Be, ao as ws, ap as qt, aq as zt, ar as $s, as as Cs, at as $n, au as Ss, av as Nr, aw as Bt, ax as zo, ay as ks, az as Es, aA as j, aB as Gr, 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-
|
|
1
|
+
import { a2 as we, a3 as z, a4 as xt, a5 as B, a0 as q, a1 as y, a6 as Ro, a7 as ye, a8 as R, a9 as _, aa as k, ab as N, ac as A, ad as bs, ae as ir, af as $e, ag as G, ah as Hn, ai as Vn, aj as dt, ak as D, al as xs, am as cn, an as Be, ao as ws, ap as qt, aq as zt, ar as $s, as as Cs, at as $n, au as Ss, av as Nr, aw as Bt, ax as zo, ay as ks, az as Es, aA as j, aB as Gr, 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-Drn6hy5Z.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|