@bahmni/clinical-app 0.0.1-dev.229 → 0.0.1-dev.231
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-6tDw4SyX-DyB_mn9X.js → DocumentsTable-BIJPXmK5-CI5pMGRu.js} +36 -36
- package/dist/{FormsTable-BXY2feyi-CFriUl5d.js → FormsTable-9HO9pDns-BAlGaYmS.js} +65 -65
- package/dist/{LNWAZHJI-Bigphp0D.js → LNWAZHJI-3EZ_zAWj.js} +4 -4
- package/dist/{MWZ6AO7Z-CO4kO8jb.js → MWZ6AO7Z-CDrDZ15C.js} +3 -3
- package/dist/{Observations-BEqqihoJ-DJrddfYm.js → Observations-BmK9dOSk-LsyaBV7o.js} +44 -44
- package/dist/{YPM2AS64-CZnfu4gO.js → YPM2AS64-D_fZ2JWO.js} +1 -1
- package/dist/{index-B381wkO2.js → index-D8m6bT71.js} +44904 -44511
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +1 -0
- package/dist/locales/locale_es.json +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { useRef as se, useEffect as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as N, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { t as k, r as w, u as S, l as K, m as M, a as P, k as Q, v as x, E as G, y as H, n as j, o as z, w as Y, P as D, q as J, z as W, B as X, A as Z, _ as ee, C as ae, D as te } from "./index-D8m6bT71.js";
|
|
3
|
+
import { useRef as se, useEffect as $, useMemo as g } from "react";
|
|
4
|
+
const U = (a, n, d, l, b, r) => {
|
|
5
5
|
const t = J(a, n, b), s = t.value, i = W(s);
|
|
6
6
|
let o = s;
|
|
7
7
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
@@ -20,15 +20,15 @@ const A = (a, n, d, l, b, r) => {
|
|
|
20
20
|
hideThumbnail: r
|
|
21
21
|
}
|
|
22
22
|
)), i === "PDF" && (o = /* @__PURE__ */ u(ae, { id: `${s}-pdf`, src: s }));
|
|
23
|
-
const
|
|
23
|
+
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
24
24
|
provider: t.provider
|
|
25
|
-
}),
|
|
25
|
+
}), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
|
|
26
26
|
return /* @__PURE__ */ u(
|
|
27
27
|
X,
|
|
28
28
|
{
|
|
29
29
|
header: t.header,
|
|
30
30
|
value: o,
|
|
31
|
-
info:
|
|
31
|
+
info: m,
|
|
32
32
|
id: c,
|
|
33
33
|
testId: c,
|
|
34
34
|
ariaLabel: c
|
|
@@ -36,13 +36,13 @@ const A = (a, n, d, l, b, r) => {
|
|
|
36
36
|
`obs-${a.id}`
|
|
37
37
|
);
|
|
38
38
|
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
39
|
-
|
|
39
|
+
D,
|
|
40
40
|
{
|
|
41
41
|
title: a.display,
|
|
42
42
|
id: `grouped-obs-${a.display}-${l}`,
|
|
43
43
|
open: d,
|
|
44
44
|
children: a.members?.map(
|
|
45
|
-
(s, i) =>
|
|
45
|
+
(s, i) => U(
|
|
46
46
|
s,
|
|
47
47
|
i,
|
|
48
48
|
b,
|
|
@@ -58,19 +58,19 @@ const A = (a, n, d, l, b, r) => {
|
|
|
58
58
|
title: n = "",
|
|
59
59
|
hideThumbnail: d
|
|
60
60
|
}) => {
|
|
61
|
-
const { t: l } =
|
|
61
|
+
const { t: l } = S(), b = (r, t, s) => {
|
|
62
62
|
const i = Y(r.encounterDetails, l);
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
|
|
63
|
+
return /* @__PURE__ */ N(
|
|
64
|
+
D,
|
|
65
65
|
{
|
|
66
66
|
title: i,
|
|
67
67
|
id: `encounter-${r.encounterId}`,
|
|
68
68
|
open: t,
|
|
69
69
|
children: [
|
|
70
70
|
r.observations.map(
|
|
71
|
-
(o,
|
|
71
|
+
(o, m) => U(
|
|
72
72
|
o,
|
|
73
|
-
|
|
73
|
+
m,
|
|
74
74
|
s,
|
|
75
75
|
n,
|
|
76
76
|
l,
|
|
@@ -78,11 +78,11 @@ const A = (a, n, d, l, b, r) => {
|
|
|
78
78
|
)
|
|
79
79
|
),
|
|
80
80
|
r.groupedObservations.map(
|
|
81
|
-
(o,
|
|
81
|
+
(o, m) => re(
|
|
82
82
|
o,
|
|
83
83
|
l,
|
|
84
84
|
t,
|
|
85
|
-
|
|
85
|
+
m,
|
|
86
86
|
s,
|
|
87
87
|
n,
|
|
88
88
|
d
|
|
@@ -107,19 +107,19 @@ const A = (a, n, d, l, b, r) => {
|
|
|
107
107
|
}, oe = "_observations_kfbhq_1", ne = "_title_kfbhq_12", I = {
|
|
108
108
|
observations: oe,
|
|
109
109
|
title: ne
|
|
110
|
-
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n],
|
|
110
|
+
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], me = ({ config: a }) => {
|
|
111
111
|
const n = a, {
|
|
112
112
|
conceptNames: d = [],
|
|
113
113
|
conceptUuid: l = [],
|
|
114
114
|
hideThumbnail: b = !1
|
|
115
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t =
|
|
115
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = k(), { addNotification: s } = w(), { t: i } = S(), o = K({
|
|
116
116
|
queries: d.map((e) => ({
|
|
117
117
|
queryKey: de(e),
|
|
118
|
-
queryFn: () =>
|
|
118
|
+
queryFn: () => M(e),
|
|
119
119
|
enabled: !!e
|
|
120
120
|
}))
|
|
121
121
|
});
|
|
122
|
-
|
|
122
|
+
$(() => {
|
|
123
123
|
o.forEach((e, h) => {
|
|
124
124
|
if (e.isError && !r.current.has(h)) {
|
|
125
125
|
const V = d[h];
|
|
@@ -131,40 +131,40 @@ const A = (a, n, d, l, b, r) => {
|
|
|
131
131
|
} else e.isError || r.current.delete(h);
|
|
132
132
|
});
|
|
133
133
|
}, [o, d]);
|
|
134
|
-
const
|
|
134
|
+
const m = g(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
135
135
|
data: c,
|
|
136
|
-
isLoading:
|
|
136
|
+
isLoading: A,
|
|
137
137
|
isError: R,
|
|
138
|
-
refetch:
|
|
139
|
-
} =
|
|
140
|
-
queryKey: le(t,
|
|
141
|
-
queryFn: () => te(t,
|
|
142
|
-
enabled: !!t &&
|
|
138
|
+
refetch: T
|
|
139
|
+
} = P({
|
|
140
|
+
queryKey: le(t, p),
|
|
141
|
+
queryFn: () => te(t, p),
|
|
142
|
+
enabled: !!t && p.length > 0 && y
|
|
143
143
|
});
|
|
144
|
-
|
|
144
|
+
Q(
|
|
145
145
|
(e) => {
|
|
146
146
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
147
|
-
(h) =>
|
|
148
|
-
) &&
|
|
147
|
+
(h) => p.includes(h)
|
|
148
|
+
) && T();
|
|
149
149
|
},
|
|
150
|
-
[t,
|
|
151
|
-
),
|
|
150
|
+
[t, T]
|
|
151
|
+
), $(() => {
|
|
152
152
|
R && s({
|
|
153
153
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
154
154
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
155
155
|
type: "error"
|
|
156
156
|
});
|
|
157
157
|
}, [R]);
|
|
158
|
-
const
|
|
158
|
+
const _ = g(() => {
|
|
159
159
|
if (!c) return [];
|
|
160
|
-
const e =
|
|
160
|
+
const e = x(c), h = G(e);
|
|
161
161
|
return H(h);
|
|
162
162
|
}, [c]), F = [
|
|
163
163
|
{ key: "name", header: "name" },
|
|
164
164
|
{ key: "value", header: "value" },
|
|
165
165
|
{ key: "form", header: "form" }
|
|
166
|
-
],
|
|
167
|
-
return /* @__PURE__ */
|
|
166
|
+
], f = A || !y, O = R && y, q = (!c || c.entry?.length === 0 || p.length === 0) && y, B = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = q ? i("NO_OBSERVATIONS_FOUND") : void 0, L = _.length > 0 && !f && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
167
|
+
return /* @__PURE__ */ N(
|
|
168
168
|
"div",
|
|
169
169
|
{
|
|
170
170
|
id: "observations",
|
|
@@ -173,7 +173,7 @@ const A = (a, n, d, l, b, r) => {
|
|
|
173
173
|
className: I.observations,
|
|
174
174
|
children: [
|
|
175
175
|
/* @__PURE__ */ u(
|
|
176
|
-
|
|
176
|
+
j,
|
|
177
177
|
{
|
|
178
178
|
id: "observations-title",
|
|
179
179
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
@@ -182,22 +182,22 @@ const A = (a, n, d, l, b, r) => {
|
|
|
182
182
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
|
|
185
|
+
L ? /* @__PURE__ */ u(
|
|
186
186
|
ie,
|
|
187
187
|
{
|
|
188
|
-
groupedData:
|
|
188
|
+
groupedData: _,
|
|
189
189
|
title: v,
|
|
190
190
|
hideThumbnail: b
|
|
191
191
|
}
|
|
192
192
|
) : /* @__PURE__ */ u(
|
|
193
|
-
|
|
193
|
+
z,
|
|
194
194
|
{
|
|
195
195
|
headers: F,
|
|
196
196
|
rows: [],
|
|
197
197
|
ariaLabel: i("OBSERVATIONS"),
|
|
198
|
-
loading:
|
|
199
|
-
errorStateMessage:
|
|
200
|
-
emptyStateMessage:
|
|
198
|
+
loading: f,
|
|
199
|
+
errorStateMessage: B,
|
|
200
|
+
emptyStateMessage: C,
|
|
201
201
|
dataTestId: "observations-table"
|
|
202
202
|
}
|
|
203
203
|
)
|
|
@@ -207,6 +207,6 @@ const A = (a, n, d, l, b, r) => {
|
|
|
207
207
|
};
|
|
208
208
|
export {
|
|
209
209
|
de as conceptUuidQueryKeys,
|
|
210
|
-
|
|
210
|
+
me as default,
|
|
211
211
|
le as observationsQueryKeys
|
|
212
212
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as we, K as z, L as xt, M as B, G as q, H as y, N as Ro, O as ye, S as R, R as _, T as k, U as N, W as A, X as bs, Y as ir, Z as $e, $ as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Ls } from "./index-D8m6bT71.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|