@bahmni/home-app 0.0.1-dev.472 → 0.0.1-dev.476
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-D05Z8kWb-DzQ5bm6e.js → DocumentsTable-80isaII2-Dybjp774.js} +47 -47
- package/dist/{FormsTable-DS8v_y5q-BRmywf2r.js → FormsTable-CREuPF8o-mcYHZu5E.js} +61 -61
- package/dist/{LNWAZHJI-DdY39os1.js → LNWAZHJI-CFORTZZ1.js} +2 -2
- package/dist/{MWZ6AO7Z-BUJGOmip.js → MWZ6AO7Z-c4B_t4I2.js} +2 -2
- package/dist/{Observations-UeuPSqCU-CwJXcB-L.js → Observations-DbMo-TUm-ChZL7bgI.js} +47 -47
- package/dist/{YPM2AS64-C8dmMwSG.js → YPM2AS64-BS5g_BBf.js} +1 -1
- package/dist/{index-BZHrIUJp.js → index-BCKlDbwg.js} +1 -1
- package/dist/{index-Dyt17CgX-XFw_K91S.js → index-CkB9So8P-wlv1NUYj.js} +1 -1
- package/dist/{index-Cee5-kEn.js → index-m73BWm4x.js} +29114 -29128
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as S, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { Q as
|
|
2
|
+
import { Q as G, a as H, u as U, m as z, d as x, n as J, q as Y, $ as j, K as X, X as P, Y as W, J as Z, D as ee, M as ae, r as se, s as V, G as re, v as te, H as ie, y as oe, A as ne, E as de, N as le } from "./index-m73BWm4x.js";
|
|
3
3
|
import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as
|
|
5
|
-
const
|
|
6
|
-
observations:
|
|
4
|
+
import { useRef as me, useEffect as L, useMemo as g } from "react";
|
|
5
|
+
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", R = {
|
|
6
|
+
observations: pe,
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
10
|
}, B = (s, l, o, d, u, r) => {
|
|
11
|
-
const t = re(s, l, u), e = t.value,
|
|
11
|
+
const t = re(s, l, u), e = t.value, m = te(e);
|
|
12
12
|
let i = e;
|
|
13
|
-
|
|
13
|
+
m === "Image" && (i = /* @__PURE__ */ n(
|
|
14
14
|
ne,
|
|
15
15
|
{
|
|
16
16
|
imageSrc: e,
|
|
@@ -18,29 +18,29 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
18
18
|
id: `${e}-img`,
|
|
19
19
|
hideThumbnail: r
|
|
20
20
|
}
|
|
21
|
-
)),
|
|
21
|
+
)), m === "Video" && (i = /* @__PURE__ */ n(
|
|
22
22
|
de,
|
|
23
23
|
{
|
|
24
24
|
id: `${e}-video`,
|
|
25
25
|
videoSrc: e,
|
|
26
26
|
hideThumbnail: r
|
|
27
27
|
}
|
|
28
|
-
)),
|
|
29
|
-
const
|
|
28
|
+
)), m === "PDF" && (i = /* @__PURE__ */ n(le, { id: `${e}-pdf`, src: e }));
|
|
29
|
+
const p = /* @__PURE__ */ S("div", { className: R.wrapper, children: [
|
|
30
30
|
/* @__PURE__ */ n("span", { children: t.header.display }),
|
|
31
31
|
t.header.referenceRange && /* @__PURE__ */ n("span", { className: R.secondary, children: t.header.referenceRange })
|
|
32
32
|
] }), c = u("OBSERVATIONS_RECORDED_BY", {
|
|
33
33
|
provider: t.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, u, !0).formattedResult : void 0,
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, u, !0).formattedResult : void 0, _ = /* @__PURE__ */ S("div", { className: R.wrapper, children: [
|
|
35
35
|
/* @__PURE__ */ n("span", { children: c }),
|
|
36
36
|
b && /* @__PURE__ */ n("span", { className: R.secondary, children: b })
|
|
37
37
|
] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", O = d ? `${d}-${v}-${h}-${o}-${l}` : `${v}-${h}-${o}-${l}`;
|
|
38
38
|
return /* @__PURE__ */ n(
|
|
39
39
|
oe,
|
|
40
40
|
{
|
|
41
|
-
header:
|
|
41
|
+
header: p,
|
|
42
42
|
value: i,
|
|
43
|
-
info:
|
|
43
|
+
info: _,
|
|
44
44
|
id: O,
|
|
45
45
|
testId: O,
|
|
46
46
|
ariaLabel: O
|
|
@@ -54,9 +54,9 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: o,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e,
|
|
57
|
+
(e, m) => B(
|
|
58
58
|
e,
|
|
59
|
-
|
|
59
|
+
m,
|
|
60
60
|
u,
|
|
61
61
|
r,
|
|
62
62
|
l,
|
|
@@ -71,18 +71,18 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
71
71
|
hideThumbnail: o
|
|
72
72
|
}) => {
|
|
73
73
|
const { t: d } = U(), u = (r, t, e) => {
|
|
74
|
-
const
|
|
74
|
+
const m = se(r.encounterDetails, d);
|
|
75
75
|
return /* @__PURE__ */ S(
|
|
76
76
|
V,
|
|
77
77
|
{
|
|
78
|
-
title:
|
|
78
|
+
title: m,
|
|
79
79
|
id: `encounter-${r.encounterId}`,
|
|
80
80
|
open: t,
|
|
81
81
|
children: [
|
|
82
82
|
r.observations.map(
|
|
83
|
-
(i,
|
|
83
|
+
(i, p) => B(
|
|
84
84
|
i,
|
|
85
|
-
|
|
85
|
+
p,
|
|
86
86
|
e,
|
|
87
87
|
l,
|
|
88
88
|
d,
|
|
@@ -90,11 +90,11 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
90
90
|
)
|
|
91
91
|
),
|
|
92
92
|
r.groupedObservations.map(
|
|
93
|
-
(i,
|
|
93
|
+
(i, p) => ye(
|
|
94
94
|
i,
|
|
95
95
|
d,
|
|
96
96
|
t,
|
|
97
|
-
|
|
97
|
+
p,
|
|
98
98
|
e,
|
|
99
99
|
l,
|
|
100
100
|
o
|
|
@@ -116,7 +116,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
}, Oe = (s) => ["conceptUuid", s],
|
|
119
|
+
}, Oe = (s) => ["conceptUuid", s], Ee = (s, l, o, d) => [
|
|
120
120
|
"observations",
|
|
121
121
|
s,
|
|
122
122
|
...l,
|
|
@@ -132,31 +132,31 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: r = [],
|
|
133
133
|
hideThumbnail: t = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d,
|
|
135
|
+
} = d, m = me(/* @__PURE__ */ new Set()), i = G(), { addNotification: p } = H(), { t: c } = U(), b = ce({
|
|
136
136
|
queries: u.map((a) => ({
|
|
137
137
|
queryKey: Oe(a),
|
|
138
|
-
queryFn: () =>
|
|
138
|
+
queryFn: () => z(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
142
|
L(() => {
|
|
143
|
-
const a = b.some((k) => k.isError), y =
|
|
144
|
-
a && !y ? (
|
|
143
|
+
const a = b.some((k) => k.isError), y = m.current.size > 0;
|
|
144
|
+
a && !y ? (p({
|
|
145
145
|
title: c("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: c("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
|
-
}),
|
|
149
|
-
}, [b,
|
|
150
|
-
const
|
|
148
|
+
}), m.current.add(0)) : !a && y && m.current.clear();
|
|
149
|
+
}, [b, p, c]);
|
|
150
|
+
const _ = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), v = g(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), O = e === "latest" || e === "latest-encounter", F = x(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
|
-
data:
|
|
155
|
-
isLoading:
|
|
154
|
+
data: E,
|
|
155
|
+
isLoading: K,
|
|
156
156
|
isError: N,
|
|
157
157
|
refetch: $
|
|
158
158
|
} = ue({
|
|
159
|
-
queryKey:
|
|
159
|
+
queryKey: Ee(
|
|
160
160
|
i,
|
|
161
161
|
h,
|
|
162
162
|
o,
|
|
@@ -181,28 +181,28 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
181
181
|
},
|
|
182
182
|
[i, $]
|
|
183
183
|
), L(() => {
|
|
184
|
-
N &&
|
|
184
|
+
N && p({
|
|
185
185
|
title: c("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: c("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
189
|
}, [N]);
|
|
190
|
-
const I =
|
|
191
|
-
if (!
|
|
192
|
-
let a =
|
|
190
|
+
const I = g(() => {
|
|
191
|
+
if (!E) return [];
|
|
192
|
+
let a = X(E);
|
|
193
193
|
e === "latest-encounter" && (a = P(a));
|
|
194
|
-
const y =
|
|
194
|
+
const y = W(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [
|
|
196
|
+
}, [E, e]), w = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A =
|
|
200
|
+
], A = K || !v, D = N && v, C = (!E || E.entry?.length === 0 || h.length === 0) && v, Q = D ? c("ERROR_FETCHING_OBSERVATIONS") : null, q = C ? c("NO_OBSERVATIONS_FOUND") : void 0, M = I.length > 0 && !A && !D, f = d.titleTranslationKey, T = f ? c(f) : "";
|
|
201
201
|
return /* @__PURE__ */ S(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid":
|
|
205
|
+
"data-testid": f ? `observations-${T}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
207
|
className: R.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:
|
|
214
|
-
title:
|
|
213
|
+
testId: f ? `observations-title-${T}` : "observations-title",
|
|
214
|
+
title: T,
|
|
215
215
|
className: R.title,
|
|
216
|
-
children: /* @__PURE__ */ n("p", { children:
|
|
216
|
+
children: /* @__PURE__ */ n("p", { children: T })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
219
|
M ? /* @__PURE__ */ n(
|
|
220
220
|
Re,
|
|
221
221
|
{
|
|
222
222
|
groupedData: I,
|
|
223
|
-
title:
|
|
223
|
+
title: T,
|
|
224
224
|
hideThumbnail: t
|
|
225
225
|
}
|
|
226
226
|
) : /* @__PURE__ */ n(
|
|
227
227
|
ae,
|
|
228
228
|
{
|
|
229
|
-
headers:
|
|
229
|
+
headers: w,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: c("OBSERVATIONS"),
|
|
232
232
|
loading: A,
|
|
233
|
-
errorStateMessage:
|
|
234
|
-
emptyStateMessage:
|
|
233
|
+
errorStateMessage: Q,
|
|
234
|
+
emptyStateMessage: q ?? c("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
|
Oe as conceptUuidQueryKeys,
|
|
244
244
|
Se as default,
|
|
245
|
-
|
|
245
|
+
Ee as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ad as we, ae as z, af as xt, ag as B, ab as q, ac as y, ah as Ro, ai as ye, aj as R, ak as _, al as k, am as N, an as A, ao as bs, ap as ir, aq as $e, ar as U, as as Hn, at as Vn, au as dt, av as D, aw as xs, ax as cn, ay as Be, az 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-
|
|
1
|
+
import { ad as we, ae as z, af as xt, ag as B, ab as q, ac as y, ah as Ro, ai as ye, aj as R, ak as _, al as k, am as N, an as A, ao as bs, ap as ir, aq as $e, ar as U, as as Hn, at as Vn, au as dt, av as D, aw as xs, ax as cn, ay as Be, az 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-m73BWm4x.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
-
import { a4 as E, a5 as f, u as m, a6 as u, a7 as O, a8 as g, a as h, a9 as H } from "./index-
|
|
2
|
+
import { a4 as E, a5 as f, u as m, a6 as u, a7 as O, a8 as g, a as h, a9 as H } from "./index-m73BWm4x.js";
|
|
3
3
|
import "@tanstack/react-query";
|
|
4
4
|
import { useRef as N, useEffect as S } from "react";
|
|
5
5
|
import { useNavigate as M, useLocation as p } from "react-router";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as qt } from "react/jsx-runtime";
|
|
2
|
-
import { u as rl, Q as il, P as ol, U as al, V as ul, _ as sl, a0 as ll, a1 as cl, a2 as hl, a3 as fl } from "./index-
|
|
2
|
+
import { u as rl, Q as il, P as ol, U as al, V as ul, _ as sl, a0 as ll, a1 as cl, a2 as hl, a3 as fl } from "./index-m73BWm4x.js";
|
|
3
3
|
import { useQuery as xo } from "@tanstack/react-query";
|
|
4
4
|
var ou = /* @__PURE__ */ ((t) => (t.WHITE = "white", t.G100 = "g100", t.G90 = "g90", t.G10 = "g10", t))(ou || {}), tr = /* @__PURE__ */ ((t) => (t.GRAPH_VIEW = "graph_view", t.SLIDER_VIEW = "slider_view", t))(tr || {}), au = /* @__PURE__ */ ((t) => (t.END_LINE = "end_line", t.MID_LINE = "mid_line", t.FRONT_LINE = "front_line", t.NONE = "none", t))(au || {}), Gn = /* @__PURE__ */ ((t) => (t.TIME = "time", t.LINEAR = "linear", t.LOG = "log", t.LABELS = "labels", t.LABELS_RATIO = "labels-ratio", t))(Gn || {}), uu = /* @__PURE__ */ ((t) => (t.RIGHT = "right", t.LEFT = "left", t.TOP = "top", t.BOTTOM = "bottom", t))(uu || {}), ve = /* @__PURE__ */ ((t) => (t.LEFT = "left", t.CENTER = "center", t.RIGHT = "right", t))(ve || {}), su = /* @__PURE__ */ ((t) => (t.TREE = "tree", t.DENDROGRAM = "dendrogram", t))(su || {}), lu = /* @__PURE__ */ ((t) => (t.SEMI = "semi", t.FULL = "full", t))(lu || {}), te = /* @__PURE__ */ ((t) => (t.SCATTER = "scatter", t.LINE = "line", t.SIMPLE_BAR = "simple-bar", t.STACKED_BAR = "stacked-bar", t.GROUPED_BAR = "grouped-bar", t.AREA = "area", t.STACKED_AREA = "stacked-area", t))(te || {}), Pe = /* @__PURE__ */ ((t) => (t.EXPORT_CSV = "Export as CSV", t.EXPORT_PNG = "Export as PNG", t.EXPORT_JPG = "Export as JPG", t.ZOOM_IN = "Zoom in", t.ZOOM_OUT = "Zoom out", t.RESET_ZOOM = "Reset zoom", t.MAKE_FULLSCREEN = "Make fullscreen", t.EXIT_FULLSCREEN = "Exit fullscreen", t.SHOW_AS_DATATABLE = "Show as data-table", t.CUSTOM = "Custom", t))(Pe || {}), Nt = /* @__PURE__ */ ((t) => (t.CHECKBOX = "checkbox", t.RADIUS = "radius", t.AREA = "area", t.SIZE = "size", t.LINE = "line", t.QUARTILE = "quartile", t.ZOOM = "zoom", t))(Nt || {}), cu = /* @__PURE__ */ ((t) => (t.ON = "on", t.AUTO = "auto", t.OFF = "off", t))(cu || {}), hu = /* @__PURE__ */ ((t) => (t.geoEqualEarth = "geoEqualEarth", t.geoAlbers = "geoAlbers", t.geoConicEqualArea = "geoConicEqualArea", t.geoConicEquidistant = "geoConicEquidistant", t.geoEquirectangular = "geoEquirectangular", t.geoMercator = "geoMercator", t.geoNaturalEarth1 = "geoNaturalEarth1", t))(hu || {});
|
|
5
5
|
function Ir(t) {
|