@bahmni/clinical-app 0.0.1-dev.347 → 0.0.1-dev.348
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/{ConsultationPage-C3T8THlO.js → ConsultationPage-Cj4sR0YF.js} +1810 -1810
- package/dist/{DocumentsTable-D-yL-evA-B1fwtgFW.js → DocumentsTable-c08bldqE-Dtv4Xp6q.js} +62 -62
- package/dist/{FormsTable-BbwKhyCn-DTJMxF2E.js → FormsTable-Bt99F81Y-BqUmg3sD.js} +87 -87
- package/dist/{LNWAZHJI-imGBWvAi.js → LNWAZHJI-Ddjk4Uzd.js} +2 -2
- package/dist/{MWZ6AO7Z-CaczTOj3.js → MWZ6AO7Z-BOUIUQ1f.js} +2 -2
- package/dist/{Observations-CiATLznu-n-AeVz43.js → Observations-Ce1nztbS-BxKzfVMI.js} +46 -46
- package/dist/{YPM2AS64-BSKjhDOv.js → YPM2AS64-DFBlovbU.js} +1 -1
- package/dist/hook-B4nWn5gZ.js +12 -0
- package/dist/{index-DUVzEfOd.js → index-D8VlPiOt.js} +56232 -59934
- package/dist/{index-C9yfr1HV.js → index-DbY_HTl6.js} +8 -7
- package/dist/{index-CjEhPxaX.js → index-P9Hox9Kh.js} +4 -3
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +3 -0
- package/dist/locales/locale_es.json +3 -0
- package/package.json +1 -1
- package/dist/hook-CQJXPLXP.js +0 -10
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { f as Q, o as V, u as N, x as K, A as x, G, I as M, Z as j, k as w, O as H, Q as Z, S as z, l as q, $ as P, e as J, g as X, h as Y, i as W, j as ee } from "./index-D8VlPiOt.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as I, useMemo as
|
|
5
|
-
const
|
|
6
|
-
const t =
|
|
4
|
+
import { useRef as se, useEffect as I, useMemo as O } from "react";
|
|
5
|
+
const L = (a, n, d, l, b, r) => {
|
|
6
|
+
const t = P(a, n, b), s = t.value, o = J(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
|
-
|
|
9
|
+
Y,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
@@ -14,7 +14,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
16
|
)), o === "Video" && (i = /* @__PURE__ */ u(
|
|
17
|
-
|
|
17
|
+
W,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
@@ -23,9 +23,9 @@ const D = (a, n, d, l, b, r) => {
|
|
|
23
23
|
)), o === "PDF" && (i = /* @__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
|
+
X,
|
|
29
29
|
{
|
|
30
30
|
header: t.header,
|
|
31
31
|
value: i,
|
|
@@ -37,13 +37,13 @@ const D = (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
|
+
q,
|
|
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, o) =>
|
|
46
|
+
(s, o) => L(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
@@ -60,16 +60,16 @@ const D = (a, n, d, l, b, r) => {
|
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = N(), b = (r, t, s) => {
|
|
63
|
-
const o =
|
|
63
|
+
const o = z(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ S(
|
|
65
|
-
|
|
65
|
+
q,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => L(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -105,7 +105,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z",
|
|
108
|
+
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", _ = {
|
|
109
109
|
observations: ie,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
@@ -113,10 +113,10 @@ const D = (a, n, d, l, b, r) => {
|
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t = Q(), { addNotification: s } =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = Q(), { addNotification: s } = V(), { t: o } = N(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => K(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
@@ -132,73 +132,73 @@ const D = (a, n, d, l, b, r) => {
|
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = O(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = O(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = O(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
137
|
+
isLoading: A,
|
|
138
|
+
isError: R,
|
|
139
|
+
refetch: T
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!t && p.length > 0 &&
|
|
142
|
+
queryFn: () => x(t, p),
|
|
143
|
+
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
G(
|
|
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
|
), I(() => {
|
|
153
|
-
|
|
153
|
+
R && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const
|
|
158
|
+
}, [R]);
|
|
159
|
+
const f = O(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = M(c), h = j(e);
|
|
162
|
+
return w(h);
|
|
163
|
+
}, [c]), D = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
167
|
+
], g = A || !y, $ = R && y, F = (!c || c.entry?.length === 0 || p.length === 0) && y, C = $ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = F ? o("NO_OBSERVATIONS_FOUND") : void 0, k = f.length > 0 && !g && !$, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid": E ? `observations-${
|
|
172
|
+
"data-testid": E ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
|
-
className:
|
|
174
|
+
className: _.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
177
|
H,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId: E ? `observations-title-${
|
|
181
|
-
title:
|
|
182
|
-
className:
|
|
183
|
-
children: /* @__PURE__ */ u("p", { children:
|
|
180
|
+
testId: E ? `observations-title-${v}` : "observations-title",
|
|
181
|
+
title: v,
|
|
182
|
+
className: _.title,
|
|
183
|
+
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
k ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
190
|
-
title:
|
|
189
|
+
groupedData: f,
|
|
190
|
+
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
Z,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: D,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
199
|
+
loading: g,
|
|
200
|
+
errorStateMessage: C,
|
|
201
|
+
emptyStateMessage: U,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bM as we, bN as z, bO as xt, bP as B, bK as q, bL as y, bQ as Ro, bR as ye, bS as R, bT as _, bU as k, bV as N, bW as A, bX as bs, bY as ir, bZ as $e, b_ as U, b$ as Hn, c0 as Vn, c1 as dt, c2 as D, c3 as xs, c4 as cn, c5 as Be, c6 as ws, c7 as qt, c8 as zt, c9 as $s, ca as Cs, cb as $n, cc as Ss, cd as Nr, ce as Bt, cf as zo, cg as ks, ch as Es, ci as j, cj as Ur, ck as Ms, cl as Ds, cm as sr, cn as As, co as Ts, cp as zn, cq as Fs, cr as Is, cs as Z, ct as Ps, cu as Ls } from "./index-
|
|
1
|
+
import { bM as we, bN as z, bO as xt, bP as B, bK as q, bL as y, bQ as Ro, bR as ye, bS as R, bT as _, bU as k, bV as N, bW as A, bX as bs, bY as ir, bZ as $e, b_ as U, b$ as Hn, c0 as Vn, c1 as dt, c2 as D, c3 as xs, c4 as cn, c5 as Be, c6 as ws, c7 as qt, c8 as zt, c9 as $s, ca as Cs, cb as $n, cc as Ss, cd as Nr, ce as Bt, cf as zo, cg as ks, ch as Es, ci as j, cj as Ur, ck as Ms, cl as Ds, cm as sr, cn as As, co as Ts, cp as zn, cq as Fs, cr as Is, cs as Z, ct as Ps, cu as Ls } from "./index-D8VlPiOt.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|