@bahmni/registration-app 0.0.1-dev.229 → 0.0.1-dev.231
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-6tDw4SyX-BWGrInwV.js → DocumentsTable-BIJPXmK5-BIgCBrmv.js} +35 -35
- package/dist/{FormsTable-BXY2feyi-BedI_bwA.js → FormsTable-9HO9pDns-8bJehL0H.js} +71 -71
- package/dist/{LNWAZHJI-C9wox7lt.js → LNWAZHJI-DU16eVhG.js} +4 -4
- package/dist/{MWZ6AO7Z-C-4LRG3U.js → MWZ6AO7Z-DTpy9e4f.js} +3 -3
- package/dist/{Observations-BEqqihoJ-DZCp5qMP.js → Observations-BmK9dOSk-g_-k5otC.js} +46 -46
- package/dist/{YPM2AS64-M1wy1Zyd.js → YPM2AS64-CeszjWCR.js} +1 -1
- package/dist/{index-UAAQaH3g.js → index-BnIEcatH.js} +53749 -53356
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsxs as N, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { t as C, r as w, u as S, i as K, l as M, k as P, v as Q, E as j, y as x, j as G, o as H, w as z, P as U, m as Y, n as J, B as W, q as X, _ as Z, z as ee } from "./index-BnIEcatH.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as g } from "react";
|
|
5
5
|
const D = (t, n, d, l, b, r) => {
|
|
6
|
-
const a =
|
|
6
|
+
const a = Y(t, n, b), s = a.value, i = J(s);
|
|
7
7
|
let o = s;
|
|
8
8
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
9
9
|
X,
|
|
@@ -21,15 +21,15 @@ const D = (t, n, d, l, b, r) => {
|
|
|
21
21
|
hideThumbnail: r
|
|
22
22
|
}
|
|
23
23
|
)), i === "PDF" && (o = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
|
-
const
|
|
24
|
+
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: a.provider
|
|
26
|
-
}),
|
|
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
|
W,
|
|
29
29
|
{
|
|
30
30
|
header: a.header,
|
|
31
31
|
value: o,
|
|
32
|
-
info:
|
|
32
|
+
info: m,
|
|
33
33
|
id: c,
|
|
34
34
|
testId: c,
|
|
35
35
|
ariaLabel: c
|
|
@@ -59,9 +59,9 @@ const D = (t, n, d, l, b, r) => {
|
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } =
|
|
63
|
-
const i =
|
|
64
|
-
return /* @__PURE__ */
|
|
62
|
+
const { t: l } = S(), b = (r, a, s) => {
|
|
63
|
+
const i = z(r.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ N(
|
|
65
65
|
U,
|
|
66
66
|
{
|
|
67
67
|
title: i,
|
|
@@ -69,9 +69,9 @@ const D = (t, n, d, l, b, r) => {
|
|
|
69
69
|
open: a,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(o,
|
|
72
|
+
(o, m) => D(
|
|
73
73
|
o,
|
|
74
|
-
|
|
74
|
+
m,
|
|
75
75
|
s,
|
|
76
76
|
n,
|
|
77
77
|
l,
|
|
@@ -79,11 +79,11 @@ const D = (t, n, d, l, b, r) => {
|
|
|
79
79
|
)
|
|
80
80
|
),
|
|
81
81
|
r.groupedObservations.map(
|
|
82
|
-
(o,
|
|
82
|
+
(o, m) => re(
|
|
83
83
|
o,
|
|
84
84
|
l,
|
|
85
85
|
a,
|
|
86
|
-
|
|
86
|
+
m,
|
|
87
87
|
s,
|
|
88
88
|
n,
|
|
89
89
|
d
|
|
@@ -108,64 +108,64 @@ const D = (t, n, d, l, b, r) => {
|
|
|
108
108
|
}, oe = "_observations_kfbhq_1", ne = "_title_kfbhq_12", I = {
|
|
109
109
|
observations: oe,
|
|
110
110
|
title: ne
|
|
111
|
-
}, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n],
|
|
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 = C(), { addNotification: s } = w(), { t: i } = S(), o = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => K(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
|
-
|
|
123
|
+
$(() => {
|
|
124
124
|
o.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const k = d[h];
|
|
127
127
|
s({
|
|
128
128
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: i("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: k }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [o, d]);
|
|
135
|
-
const
|
|
135
|
+
const m = g(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
137
|
isLoading: F,
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
138
|
+
isError: R,
|
|
139
|
+
refetch: T
|
|
140
140
|
} = ae({
|
|
141
|
-
queryKey: le(a,
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!a &&
|
|
141
|
+
queryKey: le(a, p),
|
|
142
|
+
queryFn: () => M(a, p),
|
|
143
|
+
enabled: !!a && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
P(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
|
-
(h) =>
|
|
149
|
-
) &&
|
|
148
|
+
(h) => p.includes(h)
|
|
149
|
+
) && T();
|
|
150
150
|
},
|
|
151
|
-
[a,
|
|
152
|
-
),
|
|
153
|
-
|
|
151
|
+
[a, T]
|
|
152
|
+
), $(() => {
|
|
153
|
+
R && s({
|
|
154
154
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const
|
|
158
|
+
}, [R]);
|
|
159
|
+
const f = g(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
161
|
+
const e = Q(c), h = j(e);
|
|
162
|
+
return x(h);
|
|
163
163
|
}, [c]), q = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], _ = F || !y, O = R && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, B = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? i("NO_OBSERVATIONS_FOUND") : void 0, V = f.length > 0 && !_ && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
|
+
return /* @__PURE__ */ N(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
@@ -174,7 +174,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
174
174
|
className: I.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
G,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
@@ -183,22 +183,22 @@ const D = (t, n, d, l, b, r) => {
|
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
V ? /* @__PURE__ */ u(
|
|
187
187
|
ie,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: f,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
H,
|
|
195
195
|
{
|
|
196
196
|
headers: q,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: i("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
199
|
+
loading: _,
|
|
200
|
+
errorStateMessage: B,
|
|
201
|
+
emptyStateMessage: L,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -208,6 +208,6 @@ const D = (t, n, d, l, b, r) => {
|
|
|
208
208
|
};
|
|
209
209
|
export {
|
|
210
210
|
de as conceptUuidQueryKeys,
|
|
211
|
-
|
|
211
|
+
pe as default,
|
|
212
212
|
le as observationsQueryKeys
|
|
213
213
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as we, G as z, H as xt, I as B, C as q, D as y, K as Ro, L as ye, S as R, M as _, N as k, O as N, R as A, T as bs, U as ir, W as $e, X as U, Y as Hn, Z 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-BnIEcatH.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|