@bahmni/clinical-app 0.0.1-dev.310 → 0.0.1-dev.312
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/App.d.ts.map +1 -1
- package/dist/{DocumentsTable-CaUlpFeN-B07kH6Rs.js → DocumentsTable-CFMS0Z9e-C3YAQqpZ.js} +40 -40
- package/dist/FormsTable-BOqHNyfQ-CoNaXHJN.js +234 -0
- package/dist/{LNWAZHJI-DaW8Io8M.js → LNWAZHJI-DWfzz5Nv.js} +5 -5
- package/dist/{MWZ6AO7Z-BEdGdjSn.js → MWZ6AO7Z-DUt0m9io.js} +4 -4
- package/dist/{Observations-BIksHFko-CiYJaU-8.js → Observations-DvN06foI-UQ4cnOcO.js} +51 -51
- package/dist/{YPM2AS64-B9e7XvA1.js → YPM2AS64-CIinz4Bh.js} +1 -1
- package/dist/{index-DpwifnYp.js → index-b8sno1-Q.js} +179562 -174318
- 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,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { n as K, o as q, u as N, $ as G, Z as Q, b as k, J as w, X as x, c as z, d as H, O as J, G as Y, E as M, Y as j, e as P, f as X, M as Z, S as W, z as ee } from "./index-b8sno1-Q.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 =
|
|
4
|
+
import { useRef as se, useEffect as _, useMemo as O } from "react";
|
|
5
|
+
const D = (t, n, d, l, b, r) => {
|
|
6
|
+
const a = j(t, n, b), s = a.value, o = P(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
|
-
|
|
9
|
+
Z,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
@@ -14,7 +14,7 @@ const w = (t, 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 w = (t, 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: a.provider
|
|
26
|
-
}), p = t.display,
|
|
26
|
+
}), p = t.display, y = t.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: a.header,
|
|
31
31
|
value: i,
|
|
@@ -37,13 +37,13 @@ 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
|
+
M,
|
|
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, o) =>
|
|
46
|
+
(s, o) => D(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
@@ -60,16 +60,16 @@ const w = (t, n, d, l, b, r) => {
|
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = N(), b = (r, a, s) => {
|
|
63
|
-
const o =
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
63
|
+
const o = Y(r.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ I(
|
|
65
|
+
M,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: a,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => D(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -105,7 +105,7 @@ const w = (t, 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", S = {
|
|
109
109
|
observations: ie,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n], pe = ({ config: t }) => {
|
|
@@ -113,80 +113,80 @@ const w = (t, 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()), a =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), a = K(), { addNotification: s } = q(), { t: o } = N(), i = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => G(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
|
-
|
|
124
|
-
i.forEach((e,
|
|
125
|
-
if (e.isError && !r.current.has(
|
|
126
|
-
const
|
|
123
|
+
_(() => {
|
|
124
|
+
i.forEach((e, h) => {
|
|
125
|
+
if (e.isError && !r.current.has(h)) {
|
|
126
|
+
const V = d[h];
|
|
127
127
|
s({
|
|
128
128
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: V }),
|
|
130
130
|
type: "error"
|
|
131
|
-
}), r.current.add(
|
|
132
|
-
} else e.isError || r.current.delete(
|
|
131
|
+
}), r.current.add(h);
|
|
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: F,
|
|
138
|
+
isError: R,
|
|
139
|
+
refetch: T
|
|
140
140
|
} = ae({
|
|
141
141
|
queryKey: le(a, p),
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!a && p.length > 0 &&
|
|
142
|
+
queryFn: () => Q(a, p),
|
|
143
|
+
enabled: !!a && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
k(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
|
-
(
|
|
149
|
-
) &&
|
|
148
|
+
(h) => p.includes(h)
|
|
149
|
+
) && T();
|
|
150
150
|
},
|
|
151
|
-
[a,
|
|
152
|
-
),
|
|
153
|
-
|
|
151
|
+
[a, T]
|
|
152
|
+
), _(() => {
|
|
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 $ = O(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
161
|
+
const e = w(c), h = x(e);
|
|
162
|
+
return z(h);
|
|
163
163
|
}, [c]), L = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], f = F || !y, g = R && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, C = g ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = $.length > 0 && !f && !g, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
|
+
return /* @__PURE__ */ I(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
172
|
"data-testid": E ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
|
-
className:
|
|
174
|
+
className: S.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
H,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
181
181
|
title: v,
|
|
182
|
-
className:
|
|
182
|
+
className: S.title,
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
B ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: $,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
@@ -196,9 +196,9 @@ const w = (t, n, d, l, b, r) => {
|
|
|
196
196
|
headers: L,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
199
|
+
loading: f,
|
|
200
|
+
errorStateMessage: C,
|
|
201
|
+
emptyStateMessage: U,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as we, q as z, r as xt, s as B, l as q, m as y, t as Ro, y as ye, A as R, C as _, H as k, I as N, K as A, L as bs, N as ir, R as $e, T as U, V as Hn, W 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-b8sno1-Q.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|