@bahmni/clinical-app 0.0.1-dev.433 → 0.0.1-dev.434
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-5Eh1BKTP.js → ConsultationPage-nX4qfFc2.js} +3286 -3286
- package/dist/{DocumentsTable-BccNRlfK-DiC5gb4n.js → DocumentsTable-BQixFMr5-C4_iApAO.js} +40 -40
- package/dist/{FormsTable-Du0mfyww-CQYR80PF.js → FormsTable-BHzxx42h-Wyx6XBFG.js} +79 -79
- package/dist/{LNWAZHJI-BwIo7PjX.js → LNWAZHJI-BV4-VQtd.js} +2 -2
- package/dist/{MWZ6AO7Z-DHx5cm42.js → MWZ6AO7Z-BRIhbEPV.js} +2 -2
- package/dist/{Observations-CIJz8xhv-DzmZ-HGu.js → Observations-DzFwc3dW-CZDTwBaQ.js} +65 -65
- package/dist/{YPM2AS64-CJ2qcI3N.js → YPM2AS64-CWEFFQTS.js} +1 -1
- package/dist/{hook-B9RyyM9A.js → hook-BlCA0Nsj.js} +1 -1
- package/dist/{index-DaAFqjC2.js → index-C-03mlGl.js} +41828 -41595
- package/dist/{index-B4uStSlw.js → index-CW2KLTDM.js} +5 -5
- package/dist/{index-B1o1PUyB.js → index-DBjlqkrQ.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +14 -0
- package/dist/locales/locale_es.json +14 -0
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as I, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useQueries as
|
|
4
|
-
import { useRef as pe, useEffect as
|
|
2
|
+
import { d as Q, z as j, u as L, f as M, H as P, i as x, T as G, w as Y, P as J, U as W, F as X, j as Z, m as ee, $ as ae, n as se, o as F, B as te, Y as re, h as ie, p as ne, r as oe, t as de, v as le } from "./index-C-03mlGl.js";
|
|
3
|
+
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
|
+
import { useRef as pe, useEffect as D, useMemo as g } from "react";
|
|
5
5
|
const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
|
|
6
6
|
observations: me,
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
|
-
},
|
|
11
|
-
const
|
|
10
|
+
}, U = (s, l, n, d, c, t) => {
|
|
11
|
+
const r = te(s, l, c), e = r.value, p = re(e);
|
|
12
12
|
let i = e;
|
|
13
13
|
p === "Image" && (i = /* @__PURE__ */ o(
|
|
14
14
|
oe,
|
|
@@ -16,23 +16,23 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
16
16
|
imageSrc: e,
|
|
17
17
|
alt: e,
|
|
18
18
|
id: `${e}-img`,
|
|
19
|
-
hideThumbnail:
|
|
19
|
+
hideThumbnail: t
|
|
20
20
|
}
|
|
21
21
|
)), p === "Video" && (i = /* @__PURE__ */ o(
|
|
22
22
|
de,
|
|
23
23
|
{
|
|
24
24
|
id: `${e}-video`,
|
|
25
25
|
videoSrc: e,
|
|
26
|
-
hideThumbnail:
|
|
26
|
+
hideThumbnail: t
|
|
27
27
|
}
|
|
28
28
|
)), p === "PDF" && (i = /* @__PURE__ */ o(le, { id: `${e}-pdf`, src: e }));
|
|
29
29
|
const m = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
30
|
-
/* @__PURE__ */ o("span", { children:
|
|
31
|
-
|
|
32
|
-
] }),
|
|
33
|
-
provider:
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime,
|
|
35
|
-
/* @__PURE__ */ o("span", { children:
|
|
30
|
+
/* @__PURE__ */ o("span", { children: r.header.display }),
|
|
31
|
+
r.header.referenceRange && /* @__PURE__ */ o("span", { className: O.secondary, children: r.header.referenceRange })
|
|
32
|
+
] }), u = c("OBSERVATIONS_RECORDED_BY", {
|
|
33
|
+
provider: r.provider
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, _ = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
35
|
+
/* @__PURE__ */ o("span", { children: u }),
|
|
36
36
|
b && /* @__PURE__ */ o("span", { className: O.secondary, children: b })
|
|
37
37
|
] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${v}-${h}-${n}-${l}` : `${v}-${h}-${n}-${l}`;
|
|
38
38
|
return /* @__PURE__ */ o(
|
|
@@ -40,27 +40,27 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
40
40
|
{
|
|
41
41
|
header: m,
|
|
42
42
|
value: i,
|
|
43
|
-
info:
|
|
43
|
+
info: _,
|
|
44
44
|
id: R,
|
|
45
45
|
testId: R,
|
|
46
46
|
ariaLabel: R
|
|
47
47
|
},
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
50
|
-
}, ye = (s, l, n, d,
|
|
50
|
+
}, ye = (s, l, n, d, c, t, r) => /* @__PURE__ */ o(
|
|
51
51
|
F,
|
|
52
52
|
{
|
|
53
53
|
title: s.display,
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: n,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e, p) =>
|
|
57
|
+
(e, p) => U(
|
|
58
58
|
e,
|
|
59
59
|
p,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
c,
|
|
61
|
+
t,
|
|
62
62
|
l,
|
|
63
|
-
|
|
63
|
+
r
|
|
64
64
|
)
|
|
65
65
|
)
|
|
66
66
|
},
|
|
@@ -70,17 +70,17 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
70
70
|
title: l = "",
|
|
71
71
|
hideThumbnail: n
|
|
72
72
|
}) => {
|
|
73
|
-
const { t: d } =
|
|
74
|
-
const p = se(
|
|
73
|
+
const { t: d } = L(), c = (t, r, e) => {
|
|
74
|
+
const p = se(t.encounterDetails, d);
|
|
75
75
|
return /* @__PURE__ */ I(
|
|
76
76
|
F,
|
|
77
77
|
{
|
|
78
78
|
title: p,
|
|
79
|
-
id: `encounter-${
|
|
80
|
-
open:
|
|
79
|
+
id: `encounter-${t.encounterId}`,
|
|
80
|
+
open: r,
|
|
81
81
|
children: [
|
|
82
|
-
|
|
83
|
-
(i, m) =>
|
|
82
|
+
t.observations.map(
|
|
83
|
+
(i, m) => U(
|
|
84
84
|
i,
|
|
85
85
|
m,
|
|
86
86
|
e,
|
|
@@ -89,11 +89,11 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
89
89
|
n
|
|
90
90
|
)
|
|
91
91
|
),
|
|
92
|
-
|
|
92
|
+
t.groupedObservations.map(
|
|
93
93
|
(i, m) => ye(
|
|
94
94
|
i,
|
|
95
95
|
d,
|
|
96
|
-
|
|
96
|
+
r,
|
|
97
97
|
m,
|
|
98
98
|
e,
|
|
99
99
|
l,
|
|
@@ -102,7 +102,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
102
102
|
)
|
|
103
103
|
]
|
|
104
104
|
},
|
|
105
|
-
`encounter-${
|
|
105
|
+
`encounter-${t.encounterId}`
|
|
106
106
|
);
|
|
107
107
|
};
|
|
108
108
|
return /* @__PURE__ */ o(
|
|
@@ -112,11 +112,11 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
112
112
|
"data-testid": "obs-by-encounter-test-id",
|
|
113
113
|
"aria-label": "obs-by-encounter-aria-label",
|
|
114
114
|
children: s.map(
|
|
115
|
-
(
|
|
115
|
+
(t, r) => c(t, r === 0, r)
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
}, Re = (s) => ["conceptUuid", s],
|
|
119
|
+
}, Re = (s) => ["conceptUuid", s], Te = (s, l, n, d) => [
|
|
120
120
|
"observations",
|
|
121
121
|
s,
|
|
122
122
|
...l,
|
|
@@ -128,81 +128,81 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
128
128
|
encounterUuids: n
|
|
129
129
|
}) => {
|
|
130
130
|
const d = s, {
|
|
131
|
-
conceptNames:
|
|
132
|
-
conceptUuid:
|
|
133
|
-
hideThumbnail:
|
|
131
|
+
conceptNames: c = [],
|
|
132
|
+
conceptUuid: t = [],
|
|
133
|
+
hideThumbnail: r = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d, p = pe(/* @__PURE__ */ new Set()), i =
|
|
136
|
-
queries:
|
|
135
|
+
} = d, p = pe(/* @__PURE__ */ new Set()), i = Q(), { addNotification: m } = j(), { t: u } = L(), b = ue({
|
|
136
|
+
queries: c.map((a) => ({
|
|
137
137
|
queryKey: Re(a),
|
|
138
|
-
queryFn: () =>
|
|
138
|
+
queryFn: () => M(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
const a = b.some((
|
|
142
|
+
D(() => {
|
|
143
|
+
const a = b.some((H) => H.isError), y = p.current.size > 0;
|
|
144
144
|
a && !y ? (m({
|
|
145
|
-
title:
|
|
146
|
-
message:
|
|
145
|
+
title: u("ERROR_DEFAULT_TITLE"),
|
|
146
|
+
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
148
|
}), p.current.add(0)) : !a && y && p.current.clear();
|
|
149
|
-
}, [b, m,
|
|
150
|
-
const
|
|
149
|
+
}, [b, m, u]);
|
|
150
|
+
const _ = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([..._, ...t])], [_, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V = P(
|
|
151
151
|
l,
|
|
152
152
|
n
|
|
153
153
|
), {
|
|
154
|
-
data:
|
|
155
|
-
isLoading:
|
|
154
|
+
data: T,
|
|
155
|
+
isLoading: w,
|
|
156
156
|
isError: S,
|
|
157
157
|
refetch: N
|
|
158
|
-
} =
|
|
159
|
-
queryKey:
|
|
158
|
+
} = ce({
|
|
159
|
+
queryKey: Te(
|
|
160
160
|
i,
|
|
161
161
|
h,
|
|
162
162
|
n,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () => R ?
|
|
165
|
+
queryFn: () => R ? x(
|
|
166
166
|
i,
|
|
167
167
|
h,
|
|
168
168
|
n
|
|
169
|
-
) :
|
|
169
|
+
) : G(
|
|
170
170
|
i,
|
|
171
171
|
h,
|
|
172
172
|
n
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && h.length > 0 && v && !
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !V
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
Y(
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
179
|
(y) => h.includes(y)
|
|
180
180
|
) && N();
|
|
181
181
|
},
|
|
182
182
|
[i, N]
|
|
183
|
-
),
|
|
183
|
+
), D(() => {
|
|
184
184
|
S && m({
|
|
185
|
-
title:
|
|
186
|
-
message:
|
|
185
|
+
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
|
+
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
189
|
}, [S]);
|
|
190
|
-
const $ =
|
|
191
|
-
if (!
|
|
192
|
-
let a =
|
|
190
|
+
const $ = g(() => {
|
|
191
|
+
if (!T) return [];
|
|
192
|
+
let a = J(T);
|
|
193
193
|
e === "latest-encounter" && (a = W(a));
|
|
194
194
|
const y = X(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [
|
|
196
|
+
}, [T, e]), k = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A =
|
|
200
|
+
], A = w || !v, B = S && v, q = (!T || T.entry?.length === 0 || h.length === 0) && v, C = B ? u("ERROR_FETCHING_OBSERVATIONS") : null, K = q ? u("NO_OBSERVATIONS_FOUND") : void 0, z = $.length > 0 && !A && !B, E = d.titleTranslationKey, f = E ? u(E) : "";
|
|
201
201
|
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid":
|
|
205
|
+
"data-testid": E ? `observations-${f}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
207
|
className: O.observations,
|
|
208
208
|
children: [
|
|
@@ -210,28 +210,28 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId:
|
|
213
|
+
testId: E ? `observations-title-${f}` : "observations-title",
|
|
214
214
|
title: f,
|
|
215
215
|
className: O.title,
|
|
216
216
|
children: /* @__PURE__ */ o("p", { children: f })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
219
|
+
z ? /* @__PURE__ */ o(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
223
223
|
title: f,
|
|
224
|
-
hideThumbnail:
|
|
224
|
+
hideThumbnail: r
|
|
225
225
|
}
|
|
226
226
|
) : /* @__PURE__ */ o(
|
|
227
227
|
ae,
|
|
228
228
|
{
|
|
229
229
|
headers: k,
|
|
230
230
|
rows: [],
|
|
231
|
-
ariaLabel:
|
|
231
|
+
ariaLabel: u("OBSERVATIONS"),
|
|
232
232
|
loading: A,
|
|
233
233
|
errorStateMessage: C,
|
|
234
|
-
emptyStateMessage: K ??
|
|
234
|
+
emptyStateMessage: K ?? u("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -242,5 +242,5 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
242
242
|
export {
|
|
243
243
|
Re as conceptUuidQueryKeys,
|
|
244
244
|
Ie as default,
|
|
245
|
-
|
|
245
|
+
Te as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c0 as we, c1 as z, c2 as xt, c3 as B, b_ as q, b$ as y, c4 as Ro, c5 as ye, c6 as R, c7 as _, c8 as k, c9 as N, ca as A, cb as bs, cc as ir, cd as $e, ce as G, cf as Hn, cg as Vn, ch as dt, ci as D, cj as xs, ck as cn, cl as Be, cm as ws, cn as qt, co as zt, cp as $s, cq as Cs, cr as $n, cs as Ss, ct as Nr, cu as Bt, cv as zo, cw as ks, cx as Es, cy as j, cz as Gr, cA as Ms, cB as Ds, cC as sr, cD as As, cE as Ts, cF as zn, cG as Fs, cH as Is, cI as Z, cJ as Ps, cK as Ls } from "./index-
|
|
1
|
+
import { c0 as we, c1 as z, c2 as xt, c3 as B, b_ as q, b$ as y, c4 as Ro, c5 as ye, c6 as R, c7 as _, c8 as k, c9 as N, ca as A, cb as bs, cc as ir, cd as $e, ce as G, cf as Hn, cg as Vn, ch as dt, ci as D, cj as xs, ck as cn, cl as Be, cm as ws, cn as qt, co as zt, cp as $s, cq as Cs, cr as $n, cs as Ss, ct as Nr, cu as Bt, cv as zo, cw as ks, cx as Es, cy as j, cz as Gr, cA as Ms, cB as Ds, cC as sr, cD as As, cE as Ts, cF as zn, cG as Fs, cH as Is, cI as Z, cJ as Ps, cK as Ls } from "./index-C-03mlGl.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|