@bahmni/clinical-app 0.0.1-dev.351 → 0.0.1-dev.353
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-B1R3tOYy.js → ConsultationPage-CX1q2_d6.js} +5050 -5037
- package/dist/{DocumentsTable-Coa5XzQ2-J1_v3YXX.js → DocumentsTable-TI2cownA-v_dAeZFn.js} +20 -20
- package/dist/{FormsTable-EUYG9eiE-C8zIDz6W.js → FormsTable-DY1pz_8H-QNGJcDb3.js} +113 -113
- package/dist/{LNWAZHJI-B5S9GjFk.js → LNWAZHJI-Dsh5Awfj.js} +2 -2
- package/dist/{MWZ6AO7Z-jUP35wPA.js → MWZ6AO7Z-CPukuSbH.js} +2 -2
- package/dist/{Observations-DbnQKYME-hQ4qeOY0.js → Observations-a7Heef0b-DBtWyrDB.js} +55 -55
- package/dist/{YPM2AS64-BiN3i_MG.js → YPM2AS64-CCn9iY2V.js} +1 -1
- package/dist/{hook-CcvJOz2O.js → hook-DrO0sfnB.js} +1 -1
- package/dist/{index-BUeio6DV.js → index-DRz5WzPs.js} +38416 -37287
- package/dist/{index-BofloRYy.js → index-Lkh7JKQ-.js} +3 -3
- package/dist/{index-B9zeDDla.js → index-aYgCTvs9.js} +10 -10
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +0 -13
- package/dist/locales/locale_es.json +0 -13
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { m as V,
|
|
3
|
-
import { useQueries as
|
|
4
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
2
|
+
import { m as V, a as q, u as N, v as Q, E as k, J as z, T as M, O as j, L as w, F as x, e as H, C as J, Q as D, z as P, p as Y, j as W, n as X, l as Z, q as ee } from "./index-DRz5WzPs.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";
|
|
5
|
+
const F = (a, n, d, l, b, r) => {
|
|
6
|
+
const t = P(a, n, b), s = t.value, o = Y(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
9
|
X,
|
|
@@ -22,54 +22,54 @@ const D = (t, n, d, l, b, r) => {
|
|
|
22
22
|
}
|
|
23
23
|
)), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
24
|
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
|
-
provider:
|
|
26
|
-
}), p =
|
|
25
|
+
provider: t.provider
|
|
26
|
+
}), p = a.display, v = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${v}-${p}-${d}-${n}` : `${v}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
28
|
W,
|
|
29
29
|
{
|
|
30
|
-
header:
|
|
30
|
+
header: t.header,
|
|
31
31
|
value: i,
|
|
32
32
|
info: m,
|
|
33
33
|
id: c,
|
|
34
34
|
testId: c,
|
|
35
35
|
ariaLabel: c
|
|
36
36
|
},
|
|
37
|
-
`obs-${
|
|
37
|
+
`obs-${a.id}`
|
|
38
38
|
);
|
|
39
|
-
}, re = (
|
|
40
|
-
|
|
39
|
+
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
40
|
+
D,
|
|
41
41
|
{
|
|
42
|
-
title:
|
|
43
|
-
id: `grouped-obs-${
|
|
42
|
+
title: a.display,
|
|
43
|
+
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
|
-
children:
|
|
46
|
-
(s, o) =>
|
|
45
|
+
children: a.members?.map(
|
|
46
|
+
(s, o) => F(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
50
50
|
r,
|
|
51
51
|
n,
|
|
52
|
-
|
|
52
|
+
t
|
|
53
53
|
)
|
|
54
54
|
)
|
|
55
55
|
},
|
|
56
|
-
`grouped-obs-${
|
|
56
|
+
`grouped-obs-${a.id}`
|
|
57
57
|
), oe = ({
|
|
58
|
-
groupedData:
|
|
58
|
+
groupedData: a,
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } = N(), b = (r,
|
|
63
|
-
const o =
|
|
62
|
+
const { t: l } = N(), b = (r, t, s) => {
|
|
63
|
+
const o = J(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ S(
|
|
65
|
-
|
|
65
|
+
D,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
|
-
open:
|
|
69
|
+
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => F(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -82,7 +82,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
82
82
|
(i, m) => re(
|
|
83
83
|
i,
|
|
84
84
|
l,
|
|
85
|
-
|
|
85
|
+
t,
|
|
86
86
|
m,
|
|
87
87
|
s,
|
|
88
88
|
n,
|
|
@@ -100,71 +100,71 @@ const D = (t, n, d, l, b, r) => {
|
|
|
100
100
|
id: "obs-by-encounter",
|
|
101
101
|
"data-testid": "obs-by-encounter-test-id",
|
|
102
102
|
"aria-label": "obs-by-encounter-aria-label",
|
|
103
|
-
children:
|
|
104
|
-
(r,
|
|
103
|
+
children: a.map(
|
|
104
|
+
(r, t) => b(r, t === 0, t)
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
108
|
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", I = {
|
|
109
109
|
observations: ie,
|
|
110
110
|
title: ne
|
|
111
|
-
}, de = (
|
|
112
|
-
const n =
|
|
111
|
+
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
112
|
+
const n = a, {
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()),
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = q(), { t: o } = N(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => Q(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
$(() => {
|
|
124
124
|
i.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const B = 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: B }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = T(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = T(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), v = T(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
140
|
-
} =
|
|
141
|
-
queryKey: le(
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!
|
|
137
|
+
isLoading: L,
|
|
138
|
+
isError: O,
|
|
139
|
+
refetch: R
|
|
140
|
+
} = te({
|
|
141
|
+
queryKey: le(t, p),
|
|
142
|
+
queryFn: () => k(t, p),
|
|
143
|
+
enabled: !!t && p.length > 0 && v
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
z(
|
|
146
146
|
(e) => {
|
|
147
|
-
e.patientUUID ===
|
|
147
|
+
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && R();
|
|
150
150
|
},
|
|
151
|
-
[
|
|
151
|
+
[t, R]
|
|
152
152
|
), $(() => {
|
|
153
|
-
|
|
153
|
+
O && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const f =
|
|
158
|
+
}, [O]);
|
|
159
|
+
const f = T(() => {
|
|
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]), C = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], g =
|
|
167
|
+
], g = L || !v, _ = O && v, G = (!c || c.entry?.length === 0 || p.length === 0) && v, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = G ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !g && !_, E = n.titleTranslationKey, y = E ? o(E) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -183,7 +183,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: y })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
U ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
189
|
groupedData: f,
|
|
@@ -193,12 +193,12 @@ const D = (t, n, d, l, b, r) => {
|
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
194
|
H,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: C,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
199
|
loading: g,
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
200
|
+
errorStateMessage: A,
|
|
201
|
+
emptyStateMessage: K,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bR as we, bS as z, bT as xt, bU as B, bP as q, bQ as y, bV as Ro, bW as ye, bX as R, bY as _, bZ as k, b_ as N, b$ as A, c0 as bs, c1 as ir, c2 as $e, c3 as U, c4 as Hn, c5 as Vn, c6 as dt, c7 as D, c8 as xs, c9 as cn, ca as Be, cb as ws, cc as qt, cd as zt, ce as $s, cf as Cs, cg as $n, ch as Ss, ci as Nr, cj as Bt, ck as zo, cl as ks, cm as Es, cn as j, co as Ur, cp as Ms, cq as Ds, cr as sr, cs as As, ct as Ts, cu as zn, cv as Fs, cw as Is, cx as Z, cy as Ps, cz as Ls } from "./index-
|
|
1
|
+
import { bR as we, bS as z, bT as xt, bU as B, bP as q, bQ as y, bV as Ro, bW as ye, bX as R, bY as _, bZ as k, b_ as N, b$ as A, c0 as bs, c1 as ir, c2 as $e, c3 as U, c4 as Hn, c5 as Vn, c6 as dt, c7 as D, c8 as xs, c9 as cn, ca as Be, cb as ws, cc as qt, cd as zt, ce as $s, cf as Cs, cg as $n, ch as Ss, ci as Nr, cj as Bt, ck as zo, cl as ks, cm as Es, cn as j, co as Ur, cp as Ms, cq as Ds, cr as sr, cs as As, ct as Ts, cu as zn, cv as Fs, cw as Is, cx as Z, cy as Ps, cz as Ls } from "./index-DRz5WzPs.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|