@bahmni/home-app 0.0.1-dev.475 → 0.0.1-dev.477
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-Z5HZ1U9Z-Bx-TwhxZ.js → DocumentsTable-ly-7e45R-iEScwMyP.js} +48 -48
- package/dist/{FormsTable-6YWhv9u4-CzI6kTlt.js → FormsTable-C5aFFOOZ-D3cMR_TA.js} +54 -54
- package/dist/{LNWAZHJI-B1qNYn06.js → LNWAZHJI-BOux52rY.js} +2 -2
- package/dist/{MWZ6AO7Z-BVL0Rvwn.js → MWZ6AO7Z-Dll8xLC5.js} +2 -2
- package/dist/{Observations-CnsHdfo8-DWgPVWPU.js → Observations-BFvKDktF-Bx8BbA9Z.js} +39 -39
- package/dist/{YPM2AS64-COEiU6oq.js → YPM2AS64-uxsjEl-N.js} +1 -1
- package/dist/{index-Br_6fXPe.js → index-BhxFEVJE.js} +14 -14
- package/dist/{index-CdtZkB1N-ZiWFrV5-.js → index-C2AM1o7D-CB6n-Ccg.js} +1 -1
- package/dist/{index-BtDSp9LZ.js → index-Di9GPxiI.js} +4200 -4197
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as S, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { Q as
|
|
2
|
+
import { Q as H, a as x, u as U, m as z, d as G, I as j, L as J, $ as X, r as P, s as Y, v as W, w as Z, D as ee, M as ae, y as se, A as F, X as re, F as te, H as ie, G as oe, K as ne, N as de, U as le } from "./index-Di9GPxiI.js";
|
|
3
3
|
import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as me, useEffect as L, useMemo as g } from "react";
|
|
5
5
|
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", R = {
|
|
@@ -7,7 +7,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
|
-
},
|
|
10
|
+
}, V = (s, l, o, d, u, r) => {
|
|
11
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(
|
|
@@ -31,7 +31,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
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, T = /* @__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}`;
|
|
@@ -40,7 +40,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
40
40
|
{
|
|
41
41
|
header: p,
|
|
42
42
|
value: i,
|
|
43
|
-
info:
|
|
43
|
+
info: T,
|
|
44
44
|
id: O,
|
|
45
45
|
testId: O,
|
|
46
46
|
ariaLabel: O
|
|
@@ -48,13 +48,13 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
50
50
|
}, ye = (s, l, o, d, u, r, t) => /* @__PURE__ */ n(
|
|
51
|
-
|
|
51
|
+
F,
|
|
52
52
|
{
|
|
53
53
|
title: s.display,
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: o,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e, m) =>
|
|
57
|
+
(e, m) => V(
|
|
58
58
|
e,
|
|
59
59
|
m,
|
|
60
60
|
u,
|
|
@@ -73,14 +73,14 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
73
73
|
const { t: d } = U(), u = (r, t, e) => {
|
|
74
74
|
const m = se(r.encounterDetails, d);
|
|
75
75
|
return /* @__PURE__ */ S(
|
|
76
|
-
|
|
76
|
+
F,
|
|
77
77
|
{
|
|
78
78
|
title: m,
|
|
79
79
|
id: `encounter-${r.encounterId}`,
|
|
80
80
|
open: t,
|
|
81
81
|
children: [
|
|
82
82
|
r.observations.map(
|
|
83
|
-
(i, p) =>
|
|
83
|
+
(i, p) => V(
|
|
84
84
|
i,
|
|
85
85
|
p,
|
|
86
86
|
e,
|
|
@@ -116,7 +116,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
}, Oe = (s) => ["conceptUuid", s],
|
|
119
|
+
}, Oe = (s) => ["conceptUuid", s], _e = (s, l, o, d) => [
|
|
120
120
|
"observations",
|
|
121
121
|
s,
|
|
122
122
|
...l,
|
|
@@ -132,7 +132,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: r = [],
|
|
133
133
|
hideThumbnail: t = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d, m = me(/* @__PURE__ */ new Set()), i =
|
|
135
|
+
} = d, m = me(/* @__PURE__ */ new Set()), i = H(), { addNotification: p } = x(), { t: c } = U(), b = ce({
|
|
136
136
|
queries: u.map((a) => ({
|
|
137
137
|
queryKey: Oe(a),
|
|
138
138
|
queryFn: () => z(a),
|
|
@@ -140,46 +140,46 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
142
|
L(() => {
|
|
143
|
-
const a = b.some((
|
|
143
|
+
const a = b.some((q) => q.isError), y = m.current.size > 0;
|
|
144
144
|
a && !y ? (p({
|
|
145
145
|
title: c("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: c("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
148
|
}), m.current.add(0)) : !a && y && m.current.clear();
|
|
149
149
|
}, [b, p, c]);
|
|
150
|
-
const
|
|
150
|
+
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...r])], [T, r]), v = g(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), O = e === "latest" || e === "latest-encounter", B = G(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
|
-
data:
|
|
155
|
-
isLoading:
|
|
154
|
+
data: _,
|
|
155
|
+
isLoading: Q,
|
|
156
156
|
isError: N,
|
|
157
|
-
refetch:
|
|
157
|
+
refetch: I
|
|
158
158
|
} = ue({
|
|
159
|
-
queryKey:
|
|
159
|
+
queryKey: _e(
|
|
160
160
|
i,
|
|
161
161
|
h,
|
|
162
162
|
o,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () => O ?
|
|
165
|
+
queryFn: () => O ? j(
|
|
166
166
|
i,
|
|
167
167
|
h,
|
|
168
168
|
o
|
|
169
|
-
) :
|
|
169
|
+
) : J(
|
|
170
170
|
i,
|
|
171
171
|
h,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && h.length > 0 && v && !
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !B
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
X(
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
179
|
(y) => h.includes(y)
|
|
180
|
-
) &&
|
|
180
|
+
) && I();
|
|
181
181
|
},
|
|
182
|
-
[i,
|
|
182
|
+
[i, I]
|
|
183
183
|
), L(() => {
|
|
184
184
|
N && p({
|
|
185
185
|
title: c("ERROR_DEFAULT_TITLE"),
|
|
@@ -187,22 +187,22 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
189
|
}, [N]);
|
|
190
|
-
const
|
|
191
|
-
if (!
|
|
192
|
-
let a =
|
|
193
|
-
e === "latest-encounter" && (a =
|
|
190
|
+
const $ = g(() => {
|
|
191
|
+
if (!_) return [];
|
|
192
|
+
let a = P(_);
|
|
193
|
+
e === "latest-encounter" && (a = Y(a));
|
|
194
194
|
const y = W(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [
|
|
196
|
+
}, [_, e]), w = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
],
|
|
200
|
+
], D = Q || !v, A = N && v, K = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = A ? c("ERROR_FETCHING_OBSERVATIONS") : null, M = K ? c("NO_OBSERVATIONS_FOUND") : void 0, k = $.length > 0 && !D && !A, E = d.titleTranslationKey, f = E ? c(E) : "";
|
|
201
201
|
return /* @__PURE__ */ S(
|
|
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: R.observations,
|
|
208
208
|
children: [
|
|
@@ -210,17 +210,17 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId:
|
|
214
|
-
title:
|
|
213
|
+
testId: E ? `observations-title-${f}` : "observations-title",
|
|
214
|
+
title: f,
|
|
215
215
|
className: R.title,
|
|
216
|
-
children: /* @__PURE__ */ n("p", { children:
|
|
216
|
+
children: /* @__PURE__ */ n("p", { children: f })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
219
|
+
k ? /* @__PURE__ */ n(
|
|
220
220
|
Re,
|
|
221
221
|
{
|
|
222
|
-
groupedData:
|
|
223
|
-
title:
|
|
222
|
+
groupedData: $,
|
|
223
|
+
title: f,
|
|
224
224
|
hideThumbnail: t
|
|
225
225
|
}
|
|
226
226
|
) : /* @__PURE__ */ n(
|
|
@@ -229,9 +229,9 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
229
229
|
headers: w,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: c("OBSERVATIONS"),
|
|
232
|
-
loading:
|
|
233
|
-
errorStateMessage:
|
|
234
|
-
emptyStateMessage:
|
|
232
|
+
loading: D,
|
|
233
|
+
errorStateMessage: C,
|
|
234
|
+
emptyStateMessage: M ?? c("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -242,5 +242,5 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
242
242
|
export {
|
|
243
243
|
Oe as conceptUuidQueryKeys,
|
|
244
244
|
Se as default,
|
|
245
|
-
|
|
245
|
+
_e 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-Di9GPxiI.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as e, jsxs as d, Fragment as
|
|
2
|
-
import { a4 as
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { a4 as _, a5 as f, u as m, a6 as u, a7 as O, a8 as g, a as h, a9 as H } from "./index-Di9GPxiI.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";
|
|
6
|
-
const I = "HomePageGrid-module_headerOffset__xmJ-q",
|
|
6
|
+
const I = "HomePageGrid-module_headerOffset__xmJ-q", y = {
|
|
7
7
|
headerOffset: I
|
|
8
|
-
},
|
|
9
|
-
|
|
8
|
+
}, P = () => /* @__PURE__ */ e(
|
|
9
|
+
_,
|
|
10
10
|
{
|
|
11
11
|
extensionPointId: f,
|
|
12
12
|
loadingLabelKey: "HOME_LOADING_MODULES",
|
|
13
13
|
errorMessageKey: "HOME_ERROR_FETCH_CONFIG",
|
|
14
14
|
emptyMessageKey: "HOME_NO_MODULES",
|
|
15
|
-
className:
|
|
15
|
+
className: y.headerOffset,
|
|
16
16
|
testId: "home-modules"
|
|
17
17
|
}
|
|
18
|
-
), D = "HomePageHeader-module_locationSelector__foYmn",
|
|
18
|
+
), D = "HomePageHeader-module_locationSelector__foYmn", L = {
|
|
19
19
|
locationSelector: D
|
|
20
|
-
},
|
|
20
|
+
}, T = () => {
|
|
21
21
|
const { t: a } = m();
|
|
22
22
|
return /* @__PURE__ */ e(
|
|
23
23
|
u,
|
|
@@ -26,13 +26,13 @@ const I = "HomePageGrid-module_headerOffset__xmJ-q", P = {
|
|
|
26
26
|
brandPrefix: a("HOME_LABEL"),
|
|
27
27
|
brandHref: "/",
|
|
28
28
|
globalFeatures: [
|
|
29
|
-
/* @__PURE__ */ e("div", { className:
|
|
29
|
+
/* @__PURE__ */ e("div", { className: L.locationSelector, children: /* @__PURE__ */ e(g, {}) }, "location")
|
|
30
30
|
],
|
|
31
31
|
userMenu: /* @__PURE__ */ e(O, {})
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
|
-
},
|
|
35
|
-
homePageBody:
|
|
34
|
+
}, C = "HomePage-module_homePageBody__0qtrS", A = {
|
|
35
|
+
homePageBody: C
|
|
36
36
|
}, R = () => {
|
|
37
37
|
const { t: a } = m(), { addNotification: t } = h(), s = M(), { pathname: r, search: n, hash: c, state: l } = p(), o = l?.accessDenied, i = N(!1);
|
|
38
38
|
return S(() => {
|
|
@@ -42,9 +42,9 @@ const I = "HomePageGrid-module_headerOffset__xmJ-q", P = {
|
|
|
42
42
|
type: "error",
|
|
43
43
|
timeout: H
|
|
44
44
|
}), s({ pathname: r, search: n, hash: c }, { replace: !0, state: null }));
|
|
45
|
-
}, [o, t, a, s, r, n, c]), /* @__PURE__ */ d(
|
|
46
|
-
/* @__PURE__ */ e(
|
|
47
|
-
/* @__PURE__ */ e("main", { className: A.homePageBody, children: /* @__PURE__ */ e(
|
|
45
|
+
}, [o, t, a, s, r, n, c]), /* @__PURE__ */ d(E, { children: [
|
|
46
|
+
/* @__PURE__ */ e(T, {}),
|
|
47
|
+
/* @__PURE__ */ e("main", { className: A.homePageBody, children: /* @__PURE__ */ e(P, {}) })
|
|
48
48
|
] });
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as qt } from "react/jsx-runtime";
|
|
2
|
-
import { u as rl, Q as il,
|
|
2
|
+
import { u as rl, Q as il, V as ol, Y as al, Z as ul, _ as sl, a0 as ll, a1 as cl, a2 as hl, a3 as fl } from "./index-Di9GPxiI.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) {
|