@bahmni/clinical-app 0.0.1-dev.192 → 0.0.1-dev.194
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-Cvp30zri-C-ZHUh9x.js → DocumentsTable-BJ1OXT8Q-Bq282_zo.js} +56 -56
- package/dist/{FormsTable-ICc3VqdE-aCbgT20F.js → FormsTable-CF5ZuCw3-DGqQiwCC.js} +52 -52
- package/dist/LNWAZHJI-0CULmAKu.js +33 -0
- package/dist/{MWZ6AO7Z-DhZmInHS.js → MWZ6AO7Z-Bj9WuRhm.js} +7 -7
- package/dist/{Observations-CD5AxZVC-D0gsaOZq.js → Observations-COn04_t4-CEA3YMgy.js} +38 -38
- package/dist/{YPM2AS64-BH_3NEAg.js → YPM2AS64-BjArjSkq.js} +1 -1
- package/dist/{index-CUkfEf2V.js → index-DCHMhMTf.js} +10533 -10533
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/LNWAZHJI-BOS7p2Lr.js +0 -33
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { d as k, t as B, u as
|
|
3
|
-
import { useRef as ae, useEffect as
|
|
4
|
-
const
|
|
5
|
-
const a =
|
|
1
|
+
import { jsxs as N, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { d as k, t as B, u as I, j as Q, y as H, a as K, E as j, V as w, k as x, l as G, o as M, N as z, p as P, Q as S, T as Y, c as J, $ as W, e as X, r as Z, f as ee, H as te } from "./index-DCHMhMTf.js";
|
|
3
|
+
import { useRef as ae, useEffect as T, useMemo as R } from "react";
|
|
4
|
+
const D = (t, d, n, u, r) => {
|
|
5
|
+
const a = Y(t, d, r), s = a.value, o = J(s);
|
|
6
6
|
let i = s;
|
|
7
|
-
o === "Image" && (i = /* @__PURE__ */ l(
|
|
7
|
+
o === "Image" && (i = /* @__PURE__ */ l(X, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (i = /* @__PURE__ */ l(Z, { id: `${s}-video`, videoSrc: s })), o === "PDF" && (i = /* @__PURE__ */ l(ee, { id: `${s}-pdf`, src: s }));
|
|
8
8
|
const b = r("OBSERVATIONS_RECORDED_BY", {
|
|
9
9
|
provider: a.provider
|
|
10
|
-
}), p = t.display,
|
|
10
|
+
}), p = t.display, y = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = u ? `${u}-${y}-${p}-${n}-${d}` : `${y}-${p}-${n}-${d}`;
|
|
11
11
|
return /* @__PURE__ */ l(
|
|
12
|
-
|
|
12
|
+
W,
|
|
13
13
|
{
|
|
14
14
|
header: a.header,
|
|
15
15
|
value: i,
|
|
@@ -27,7 +27,7 @@ const C = (t, d, n, u, r) => {
|
|
|
27
27
|
id: `grouped-obs-${t.display}-${u}`,
|
|
28
28
|
open: n,
|
|
29
29
|
children: t.members?.map(
|
|
30
|
-
(s, o) =>
|
|
30
|
+
(s, o) => D(s, o, r, a, d)
|
|
31
31
|
)
|
|
32
32
|
},
|
|
33
33
|
`grouped-obs-${t.id}`
|
|
@@ -35,9 +35,9 @@ const C = (t, d, n, u, r) => {
|
|
|
35
35
|
groupedData: t,
|
|
36
36
|
title: d = ""
|
|
37
37
|
}) => {
|
|
38
|
-
const { t: n } =
|
|
38
|
+
const { t: n } = I(), u = (r, a, s) => {
|
|
39
39
|
const o = P(r.encounterDetails, n);
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ N(
|
|
41
41
|
S,
|
|
42
42
|
{
|
|
43
43
|
title: o,
|
|
@@ -45,7 +45,7 @@ const C = (t, d, n, u, r) => {
|
|
|
45
45
|
open: a,
|
|
46
46
|
children: [
|
|
47
47
|
r.observations.map(
|
|
48
|
-
(i, b) =>
|
|
48
|
+
(i, b) => D(i, b, s, d, n)
|
|
49
49
|
),
|
|
50
50
|
r.groupedObservations.map(
|
|
51
51
|
(i, b) => se(
|
|
@@ -73,18 +73,18 @@ const C = (t, d, n, u, r) => {
|
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
|
-
}, oe = "_observations_kfbhq_1", ie = "_title_kfbhq_12",
|
|
76
|
+
}, oe = "_observations_kfbhq_1", ie = "_title_kfbhq_12", _ = {
|
|
77
77
|
observations: oe,
|
|
78
78
|
title: ie
|
|
79
79
|
}, ne = (t) => ["conceptUuid", t], de = (t, d) => ["observations", t, ...d], be = ({ config: t }) => {
|
|
80
|
-
const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = k(), { addNotification: s } = B(), { t: o } =
|
|
80
|
+
const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = k(), { addNotification: s } = B(), { t: o } = I(), i = Q({
|
|
81
81
|
queries: n.map((e) => ({
|
|
82
82
|
queryKey: ne(e),
|
|
83
|
-
queryFn: () =>
|
|
83
|
+
queryFn: () => H(e),
|
|
84
84
|
enabled: !!e
|
|
85
85
|
}))
|
|
86
86
|
});
|
|
87
|
-
|
|
87
|
+
T(() => {
|
|
88
88
|
i.forEach((e, m) => {
|
|
89
89
|
if (e.isError && !r.current.has(m)) {
|
|
90
90
|
const q = n[m];
|
|
@@ -96,24 +96,24 @@ const C = (t, d, n, u, r) => {
|
|
|
96
96
|
} else e.isError || r.current.delete(m);
|
|
97
97
|
});
|
|
98
98
|
}, [i, n]);
|
|
99
|
-
const b = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]),
|
|
99
|
+
const b = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]), y = R(() => n.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, n.length]), {
|
|
100
100
|
data: c,
|
|
101
|
-
isLoading:
|
|
101
|
+
isLoading: F,
|
|
102
102
|
isError: f,
|
|
103
103
|
refetch: g
|
|
104
|
-
} =
|
|
104
|
+
} = K({
|
|
105
105
|
queryKey: de(a, p),
|
|
106
106
|
queryFn: () => te(a, p),
|
|
107
|
-
enabled: !!a && p.length > 0 &&
|
|
107
|
+
enabled: !!a && p.length > 0 && y
|
|
108
108
|
});
|
|
109
|
-
|
|
109
|
+
j(
|
|
110
110
|
(e) => {
|
|
111
111
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
112
112
|
(m) => p.includes(m)
|
|
113
113
|
) && g();
|
|
114
114
|
},
|
|
115
115
|
[a, g]
|
|
116
|
-
),
|
|
116
|
+
), T(() => {
|
|
117
117
|
f && s({
|
|
118
118
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
119
119
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
@@ -122,39 +122,39 @@ const C = (t, d, n, u, r) => {
|
|
|
122
122
|
}, [f]);
|
|
123
123
|
const h = R(() => {
|
|
124
124
|
if (!c) return [];
|
|
125
|
-
const e =
|
|
125
|
+
const e = w(c), m = x(e);
|
|
126
126
|
return G(m);
|
|
127
|
-
}, [c]),
|
|
127
|
+
}, [c]), L = [
|
|
128
128
|
{ key: "name", header: "name" },
|
|
129
129
|
{ key: "value", header: "value" },
|
|
130
130
|
{ key: "form", header: "form" }
|
|
131
|
-
],
|
|
132
|
-
return /* @__PURE__ */
|
|
131
|
+
], O = F || !y, $ = f && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, C = $ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, V = h.length > 0 && !O && !$, E = d.titleTranslationKey, v = E ? o(E) : "";
|
|
132
|
+
return /* @__PURE__ */ N(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
135
135
|
id: "observations",
|
|
136
|
-
"data-testid": E ? `observations-${
|
|
136
|
+
"data-testid": E ? `observations-${v}` : "observations",
|
|
137
137
|
"aria-label": "observations-aria-label",
|
|
138
|
-
className:
|
|
138
|
+
className: _.observations,
|
|
139
139
|
children: [
|
|
140
140
|
/* @__PURE__ */ l(
|
|
141
|
-
|
|
141
|
+
M,
|
|
142
142
|
{
|
|
143
143
|
id: "observations-title",
|
|
144
|
-
testId: E ? `observations-title-${
|
|
145
|
-
title:
|
|
146
|
-
className:
|
|
147
|
-
children: /* @__PURE__ */ l("p", { children:
|
|
144
|
+
testId: E ? `observations-title-${v}` : "observations-title",
|
|
145
|
+
title: v,
|
|
146
|
+
className: _.title,
|
|
147
|
+
children: /* @__PURE__ */ l("p", { children: v })
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
|
-
V ? /* @__PURE__ */ l(re, { groupedData: h, title:
|
|
151
|
-
|
|
150
|
+
V ? /* @__PURE__ */ l(re, { groupedData: h, title: v }) : /* @__PURE__ */ l(
|
|
151
|
+
z,
|
|
152
152
|
{
|
|
153
|
-
headers:
|
|
153
|
+
headers: L,
|
|
154
154
|
rows: [],
|
|
155
155
|
ariaLabel: o("OBSERVATIONS"),
|
|
156
|
-
loading:
|
|
157
|
-
errorStateMessage:
|
|
156
|
+
loading: O,
|
|
157
|
+
errorStateMessage: C,
|
|
158
158
|
emptyStateMessage: U,
|
|
159
159
|
dataTestId: "observations-table"
|
|
160
160
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as we, A as z, B as xt, D as B, s as q, v as y, P as Ro, F as ye, S as R, G as _, J as k, U as N, Y as A, Z as bs, _ as ir, a0 as $e, a1 as U, a2 as Hn, a3 as Vn, a4 as dt, a5 as D, a6 as xs, a7 as cn, a8 as Be, a9 as ws, aa as qt, ab as zt, ac as $s, ad as Cs, ae as $n, af as Ss, ag as Nr, ah as Bt, ai as zo, aj as ks, ak as Es, al as j, am as Ur, an as Ms, ao as Ds, ap as sr, aq as As, ar as Ts, as as zn, at as Fs, au as Is, av as Z, aw as Ps, ax as Ls } from "./index-DCHMhMTf.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|