@bahmni/clinical-app 0.0.1-dev.310 → 0.0.1-dev.311
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-CaUlpFeN-B07kH6Rs.js → DocumentsTable-C8zEI_he-BhLghtGO.js} +33 -33
- package/dist/FormsTable-DARy4z7A-CZwOL2AQ.js +234 -0
- package/dist/{LNWAZHJI-DaW8Io8M.js → LNWAZHJI-w0iSGX94.js} +7 -7
- package/dist/{MWZ6AO7Z-BEdGdjSn.js → MWZ6AO7Z-BNeNbz5w.js} +2 -2
- package/dist/{Observations-BIksHFko-CiYJaU-8.js → Observations-B7DE4zkT-CEQq4Esc.js} +60 -60
- package/dist/{YPM2AS64-B9e7XvA1.js → YPM2AS64-yTXx0rtu.js} +1 -1
- package/dist/{index-DpwifnYp.js → index-dSsHmnAx.js} +83977 -81060
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +22 -0
- package/dist/locales/locale_es.json +22 -0
- package/package.json +1 -1
- package/dist/FormsTable-DQSl0827-EKVvD12B.js +0 -234
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { r as K, n as q, u as N, d as x, x as k, l as w, S as G, $ as M, I as Q, H as j, _ as z, L as P, e as L, f as J, E as Y, g as W, v as X, h as Z, i as ee } from "./index-dSsHmnAx.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
5
|
-
const
|
|
6
|
-
const a =
|
|
7
|
-
let
|
|
8
|
-
|
|
4
|
+
import { useRef as se, useEffect as f, useMemo as R } from "react";
|
|
5
|
+
const D = (t, n, d, l, b, r) => {
|
|
6
|
+
const a = J(t, n, b), s = a.value, i = Y(s);
|
|
7
|
+
let o = s;
|
|
8
|
+
i === "Image" && (o = /* @__PURE__ */ u(
|
|
9
9
|
X,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
@@ -13,14 +13,14 @@ const w = (t, n, d, l, b, r) => {
|
|
|
13
13
|
id: `${s}-img`,
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
|
-
)),
|
|
16
|
+
)), i === "Video" && (o = /* @__PURE__ */ u(
|
|
17
17
|
Z,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
21
21
|
hideThumbnail: r
|
|
22
22
|
}
|
|
23
|
-
)),
|
|
23
|
+
)), i === "PDF" && (o = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
24
|
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: a.provider
|
|
26
26
|
}), p = t.display, h = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${h}-${p}-${d}-${n}` : `${h}-${p}-${d}-${n}`;
|
|
@@ -28,7 +28,7 @@ const w = (t, n, d, l, b, r) => {
|
|
|
28
28
|
W,
|
|
29
29
|
{
|
|
30
30
|
header: a.header,
|
|
31
|
-
value:
|
|
31
|
+
value: o,
|
|
32
32
|
info: m,
|
|
33
33
|
id: c,
|
|
34
34
|
testId: c,
|
|
@@ -37,15 +37,15 @@ const w = (t, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${t.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (t, n, d, l, b, r, a) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
L,
|
|
41
41
|
{
|
|
42
42
|
title: t.display,
|
|
43
43
|
id: `grouped-obs-${t.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: t.members?.map(
|
|
46
|
-
(s,
|
|
46
|
+
(s, i) => D(
|
|
47
47
|
s,
|
|
48
|
-
|
|
48
|
+
i,
|
|
49
49
|
b,
|
|
50
50
|
r,
|
|
51
51
|
n,
|
|
@@ -54,23 +54,23 @@ const w = (t, n, d, l, b, r) => {
|
|
|
54
54
|
)
|
|
55
55
|
},
|
|
56
56
|
`grouped-obs-${t.id}`
|
|
57
|
-
),
|
|
57
|
+
), ie = ({
|
|
58
58
|
groupedData: t,
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = N(), b = (r, a, s) => {
|
|
63
|
-
const
|
|
63
|
+
const i = P(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ S(
|
|
65
|
-
|
|
65
|
+
L,
|
|
66
66
|
{
|
|
67
|
-
title:
|
|
67
|
+
title: i,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: a,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(
|
|
73
|
-
|
|
72
|
+
(o, m) => D(
|
|
73
|
+
o,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
76
76
|
n,
|
|
@@ -79,8 +79,8 @@ const w = (t, n, d, l, b, r) => {
|
|
|
79
79
|
)
|
|
80
80
|
),
|
|
81
81
|
r.groupedObservations.map(
|
|
82
|
-
(
|
|
83
|
-
|
|
82
|
+
(o, m) => re(
|
|
83
|
+
o,
|
|
84
84
|
l,
|
|
85
85
|
a,
|
|
86
86
|
m,
|
|
@@ -105,100 +105,100 @@ const w = (t, n, d, l, b, r) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
},
|
|
109
|
-
observations:
|
|
108
|
+
}, oe = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", I = {
|
|
109
|
+
observations: oe,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n], pe = ({ config: t }) => {
|
|
112
112
|
const n = t, {
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), a =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), a = K(), { addNotification: s } = q(), { t: i } = N(), o = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => x(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (e.isError && !r.current.has(
|
|
126
|
-
const
|
|
123
|
+
f(() => {
|
|
124
|
+
o.forEach((e, E) => {
|
|
125
|
+
if (e.isError && !r.current.has(E)) {
|
|
126
|
+
const H = d[E];
|
|
127
127
|
s({
|
|
128
|
-
title:
|
|
129
|
-
message:
|
|
128
|
+
title: i("ERROR_DEFAULT_TITLE"),
|
|
129
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: H }),
|
|
130
130
|
type: "error"
|
|
131
|
-
}), r.current.add(
|
|
132
|
-
} else e.isError || r.current.delete(
|
|
131
|
+
}), r.current.add(E);
|
|
132
|
+
} else e.isError || r.current.delete(E);
|
|
133
133
|
});
|
|
134
|
-
}, [
|
|
135
|
-
const m = R(() =>
|
|
134
|
+
}, [o, d]);
|
|
135
|
+
const m = R(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), h = R(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: C,
|
|
138
138
|
isError: T,
|
|
139
|
-
refetch:
|
|
139
|
+
refetch: g
|
|
140
140
|
} = ae({
|
|
141
141
|
queryKey: le(a, p),
|
|
142
142
|
queryFn: () => k(a, p),
|
|
143
143
|
enabled: !!a && p.length > 0 && h
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
w(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
|
-
(
|
|
149
|
-
) &&
|
|
148
|
+
(E) => p.includes(E)
|
|
149
|
+
) && g();
|
|
150
150
|
},
|
|
151
|
-
[a,
|
|
152
|
-
),
|
|
151
|
+
[a, g]
|
|
152
|
+
), f(() => {
|
|
153
153
|
T && s({
|
|
154
|
-
title:
|
|
155
|
-
message:
|
|
154
|
+
title: i("ERROR_DEFAULT_TITLE"),
|
|
155
|
+
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [T]);
|
|
159
|
-
const
|
|
159
|
+
const O = R(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = G(c), E = M(e);
|
|
162
|
+
return Q(E);
|
|
163
|
+
}, [c]), F = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
167
|
+
], _ = C || !h, $ = T && h, A = (!c || c.entry?.length === 0 || p.length === 0) && h, U = $ ? i("ERROR_FETCHING_OBSERVATIONS") : null, B = A ? i("NO_OBSERVATIONS_FOUND") : void 0, V = O.length > 0 && !_ && !$, y = n.titleTranslationKey, v = y ? i(y) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid":
|
|
172
|
+
"data-testid": y ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
174
|
className: I.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
j,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId:
|
|
180
|
+
testId: y ? `observations-title-${v}` : "observations-title",
|
|
181
181
|
title: v,
|
|
182
182
|
className: I.title,
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
V ? /* @__PURE__ */ u(
|
|
187
|
+
ie,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: O,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
z,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: F,
|
|
197
197
|
rows: [],
|
|
198
|
-
ariaLabel:
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
198
|
+
ariaLabel: i("OBSERVATIONS"),
|
|
199
|
+
loading: _,
|
|
200
|
+
errorStateMessage: U,
|
|
201
|
+
emptyStateMessage: B,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as we, q as z, s as xt, w as B, k as q, o as y, P as Ro, y as ye, B as R, F as _, J as k, K as N, Q as A, R as bs, T as ir, U as $e, V as U, X as Hn, Y as Vn, Z 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-dSsHmnAx.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|