@bahmni/clinical-app 0.0.1-dev.270 → 0.0.1-dev.271
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-DEvlbfDU-Di0Ts4Z9.js → DocumentsTable-BTIXt5P5-CK8zpcYa.js} +74 -73
- package/dist/{FormsTable-DBD0f2fD-DgJr0wEu.js → FormsTable-Cg_0tmR0-B51_cvjz.js} +66 -65
- package/dist/{LNWAZHJI-Dw-Q_sgA.js → LNWAZHJI-CjmkXsJn.js} +7 -7
- package/dist/{MWZ6AO7Z-BgDg8hMY.js → MWZ6AO7Z-q_ktVxSr.js} +4 -4
- package/dist/{Observations-D6WZol9t-BhtaqvFg.js → Observations-M8evq10v-_QtGzHj0.js} +64 -63
- package/dist/{YPM2AS64-CamXVL9E.js → YPM2AS64-DXiOE6PS.js} +1 -1
- package/dist/{index-DzoLJTzR.js → index-D8R0WjHJ.js} +15976 -17877
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { u as M, h as k, a as N, K as q, G, d as Q, i as z, s as X, l as j, z as w, c as x, o as H, g as A, j as P, y as Y, k as J, M as W, S as Z, A as ee } from "./index-D8R0WjHJ.js";
|
|
3
|
+
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as T } from "react";
|
|
4
5
|
const D = (a, n, d, l, b, r) => {
|
|
5
|
-
const t = P(a, n, b), s = t.value,
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const t = P(a, n, b), s = t.value, o = Y(s);
|
|
7
|
+
let i = s;
|
|
8
|
+
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
|
+
W,
|
|
9
10
|
{
|
|
10
11
|
imageSrc: s,
|
|
11
12
|
alt: s,
|
|
12
13
|
id: `${s}-img`,
|
|
13
14
|
hideThumbnail: r
|
|
14
15
|
}
|
|
15
|
-
)),
|
|
16
|
-
|
|
16
|
+
)), o === "Video" && (i = /* @__PURE__ */ u(
|
|
17
|
+
Z,
|
|
17
18
|
{
|
|
18
19
|
id: `${s}-video`,
|
|
19
20
|
videoSrc: s,
|
|
20
21
|
hideThumbnail: r
|
|
21
22
|
}
|
|
22
|
-
)),
|
|
23
|
-
const
|
|
23
|
+
)), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
|
+
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
24
25
|
provider: t.provider
|
|
25
|
-
}),
|
|
26
|
+
}), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
|
|
26
27
|
return /* @__PURE__ */ u(
|
|
27
28
|
J,
|
|
28
29
|
{
|
|
29
30
|
header: t.header,
|
|
30
|
-
value:
|
|
31
|
-
info:
|
|
31
|
+
value: i,
|
|
32
|
+
info: m,
|
|
32
33
|
id: c,
|
|
33
34
|
testId: c,
|
|
34
35
|
ariaLabel: c
|
|
@@ -42,9 +43,9 @@ const D = (a, n, d, l, b, r) => {
|
|
|
42
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
43
44
|
open: d,
|
|
44
45
|
children: a.members?.map(
|
|
45
|
-
(s,
|
|
46
|
+
(s, o) => D(
|
|
46
47
|
s,
|
|
47
|
-
|
|
48
|
+
o,
|
|
48
49
|
b,
|
|
49
50
|
r,
|
|
50
51
|
n,
|
|
@@ -53,24 +54,24 @@ const D = (a, n, d, l, b, r) => {
|
|
|
53
54
|
)
|
|
54
55
|
},
|
|
55
56
|
`grouped-obs-${a.id}`
|
|
56
|
-
),
|
|
57
|
+
), oe = ({
|
|
57
58
|
groupedData: a,
|
|
58
59
|
title: n = "",
|
|
59
60
|
hideThumbnail: d
|
|
60
61
|
}) => {
|
|
61
62
|
const { t: l } = N(), b = (r, t, s) => {
|
|
62
|
-
const
|
|
63
|
-
return /* @__PURE__ */
|
|
63
|
+
const o = H(r.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ I(
|
|
64
65
|
A,
|
|
65
66
|
{
|
|
66
|
-
title:
|
|
67
|
+
title: o,
|
|
67
68
|
id: `encounter-${r.encounterId}`,
|
|
68
69
|
open: t,
|
|
69
70
|
children: [
|
|
70
71
|
r.observations.map(
|
|
71
|
-
(
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
(i, m) => D(
|
|
73
|
+
i,
|
|
74
|
+
m,
|
|
74
75
|
s,
|
|
75
76
|
n,
|
|
76
77
|
l,
|
|
@@ -78,11 +79,11 @@ const D = (a, n, d, l, b, r) => {
|
|
|
78
79
|
)
|
|
79
80
|
),
|
|
80
81
|
r.groupedObservations.map(
|
|
81
|
-
(
|
|
82
|
-
|
|
82
|
+
(i, m) => re(
|
|
83
|
+
i,
|
|
83
84
|
l,
|
|
84
85
|
t,
|
|
85
|
-
|
|
86
|
+
m,
|
|
86
87
|
s,
|
|
87
88
|
n,
|
|
88
89
|
d
|
|
@@ -104,100 +105,100 @@ const D = (a, n, d, l, b, r) => {
|
|
|
104
105
|
)
|
|
105
106
|
}
|
|
106
107
|
);
|
|
107
|
-
},
|
|
108
|
-
observations:
|
|
108
|
+
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", S = {
|
|
109
|
+
observations: ie,
|
|
109
110
|
title: ne
|
|
110
111
|
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
111
112
|
const n = a, {
|
|
112
113
|
conceptNames: d = [],
|
|
113
114
|
conceptUuid: l = [],
|
|
114
115
|
hideThumbnail: b = !1
|
|
115
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = M(), { addNotification: s } = k(), { t: o } = N(), i = ae({
|
|
116
117
|
queries: d.map((e) => ({
|
|
117
118
|
queryKey: de(e),
|
|
118
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => q(e),
|
|
119
120
|
enabled: !!e
|
|
120
121
|
}))
|
|
121
122
|
});
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
$(() => {
|
|
124
|
+
i.forEach((e, h) => {
|
|
124
125
|
if (e.isError && !r.current.has(h)) {
|
|
125
|
-
const
|
|
126
|
+
const V = d[h];
|
|
126
127
|
s({
|
|
127
|
-
title:
|
|
128
|
-
message:
|
|
128
|
+
title: o("ERROR_DEFAULT_TITLE"),
|
|
129
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: V }),
|
|
129
130
|
type: "error"
|
|
130
131
|
}), r.current.add(h);
|
|
131
132
|
} else e.isError || r.current.delete(h);
|
|
132
133
|
});
|
|
133
|
-
}, [
|
|
134
|
-
const
|
|
134
|
+
}, [i, d]);
|
|
135
|
+
const m = T(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = T(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = T(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
135
136
|
data: c,
|
|
136
137
|
isLoading: F,
|
|
137
|
-
isError:
|
|
138
|
+
isError: R,
|
|
138
139
|
refetch: g
|
|
139
|
-
} =
|
|
140
|
-
queryKey: le(t,
|
|
141
|
-
queryFn: () =>
|
|
142
|
-
enabled: !!t &&
|
|
140
|
+
} = te({
|
|
141
|
+
queryKey: le(t, p),
|
|
142
|
+
queryFn: () => G(t, p),
|
|
143
|
+
enabled: !!t && p.length > 0 && y
|
|
143
144
|
});
|
|
144
145
|
Q(
|
|
145
146
|
(e) => {
|
|
146
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
147
|
-
(h) =>
|
|
148
|
+
(h) => p.includes(h)
|
|
148
149
|
) && g();
|
|
149
150
|
},
|
|
150
151
|
[t, g]
|
|
151
|
-
),
|
|
152
|
-
|
|
153
|
-
title:
|
|
154
|
-
message:
|
|
152
|
+
), $(() => {
|
|
153
|
+
R && s({
|
|
154
|
+
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
|
+
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
155
156
|
type: "error"
|
|
156
157
|
});
|
|
157
|
-
}, [
|
|
158
|
-
const
|
|
158
|
+
}, [R]);
|
|
159
|
+
const O = T(() => {
|
|
159
160
|
if (!c) return [];
|
|
160
|
-
const e =
|
|
161
|
+
const e = z(c), h = X(e);
|
|
161
162
|
return j(h);
|
|
162
163
|
}, [c]), L = [
|
|
163
164
|
{ key: "name", header: "name" },
|
|
164
165
|
{ key: "value", header: "value" },
|
|
165
166
|
{ key: "form", header: "form" }
|
|
166
|
-
],
|
|
167
|
-
return /* @__PURE__ */
|
|
167
|
+
], f = F || !y, _ = R && y, K = (!c || c.entry?.length === 0 || p.length === 0) && y, C = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = K ? o("NO_OBSERVATIONS_FOUND") : void 0, B = O.length > 0 && !f && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
|
+
return /* @__PURE__ */ I(
|
|
168
169
|
"div",
|
|
169
170
|
{
|
|
170
171
|
id: "observations",
|
|
171
172
|
"data-testid": E ? `observations-${v}` : "observations",
|
|
172
173
|
"aria-label": "observations-aria-label",
|
|
173
|
-
className:
|
|
174
|
+
className: S.observations,
|
|
174
175
|
children: [
|
|
175
176
|
/* @__PURE__ */ u(
|
|
176
|
-
|
|
177
|
+
w,
|
|
177
178
|
{
|
|
178
179
|
id: "observations-title",
|
|
179
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
180
181
|
title: v,
|
|
181
|
-
className:
|
|
182
|
+
className: S.title,
|
|
182
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
183
184
|
}
|
|
184
185
|
),
|
|
185
|
-
|
|
186
|
-
|
|
186
|
+
B ? /* @__PURE__ */ u(
|
|
187
|
+
oe,
|
|
187
188
|
{
|
|
188
|
-
groupedData:
|
|
189
|
+
groupedData: O,
|
|
189
190
|
title: v,
|
|
190
191
|
hideThumbnail: b
|
|
191
192
|
}
|
|
192
193
|
) : /* @__PURE__ */ u(
|
|
193
|
-
|
|
194
|
+
x,
|
|
194
195
|
{
|
|
195
196
|
headers: L,
|
|
196
197
|
rows: [],
|
|
197
|
-
ariaLabel:
|
|
198
|
-
loading:
|
|
199
|
-
errorStateMessage:
|
|
200
|
-
emptyStateMessage:
|
|
198
|
+
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
+
loading: f,
|
|
200
|
+
errorStateMessage: C,
|
|
201
|
+
emptyStateMessage: U,
|
|
201
202
|
dataTestId: "observations-table"
|
|
202
203
|
}
|
|
203
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as we, x as z, B as xt, D as B, q, r as y, P as Ro, E as ye, F as R, H as _, I as k, L as N, N as A, O as bs, U as ir, V as $e, W as U, Z as Hn, _ as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-D8R0WjHJ.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|