@bahmni/home-app 0.0.1-dev.423 → 0.0.1-dev.425
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-BVnv0gpO-BW2fYzpm.js → DocumentsTable-Dbzg_SOZ-BB7ul89q.js} +18 -18
- package/dist/{FormsTable-BOBb-hEm-Ct7w6CRM.js → FormsTable-BMa68g2K-DkVHWX86.js} +81 -81
- package/dist/{LNWAZHJI-C9cjgcrw.js → LNWAZHJI-CBv06AvQ.js} +2 -2
- package/dist/{MWZ6AO7Z-Bi6tTEQ8.js → MWZ6AO7Z-C5bPYHOD.js} +2 -2
- package/dist/{Observations-GQNCaUuo-QFOwo4Mb.js → Observations-DxmGTSMO-ih6fHgO_.js} +57 -57
- package/dist/{YPM2AS64-CYiHJeWi.js → YPM2AS64-CN-mULjB.js} +1 -1
- package/dist/components/HomePageGrid/HomePageGrid.d.ts.map +1 -1
- package/dist/constants/app.d.ts +1 -1
- package/dist/constants/app.d.ts.map +1 -1
- package/dist/index-DyFDzy3P.js +41 -0
- package/dist/{index-0gCl6Ezv.js → index-ExXHC3NK.js} +42916 -42419
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/components/AppTile/AppTile.d.ts +0 -10
- package/dist/components/AppTile/AppTile.d.ts.map +0 -1
- package/dist/components/AppTile/__tests__/__mocks__/AppTileMocks.d.ts +0 -7
- package/dist/components/AppTile/__tests__/__mocks__/AppTileMocks.d.ts.map +0 -1
- package/dist/components/AppTile/index.d.ts +0 -2
- package/dist/components/AppTile/index.d.ts.map +0 -1
- package/dist/components/HomePageGrid/__tests__/__mocks__/homePageGridMocks.d.ts +0 -5
- package/dist/components/HomePageGrid/__tests__/__mocks__/homePageGridMocks.d.ts.map +0 -1
- package/dist/index-9EgfdeTj.js +0 -111
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as S, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { g as H, z as M, u as B, B as x, y as G, d as J, P, m as Y, Q as j, r as W, i as X, t as Z, k as ee, Y as ae, J as se, n as U, X as re, W as te, w as ie, o as oe, R as ne, q as de, D as le } from "./index-ExXHC3NK.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as me, useEffect as
|
|
5
|
-
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z",
|
|
4
|
+
import { useRef as me, useEffect as L, useMemo as E } 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
6
|
observations: pe,
|
|
7
7
|
title: be,
|
|
8
|
-
wrapper:
|
|
9
|
-
secondary:
|
|
8
|
+
wrapper: he,
|
|
9
|
+
secondary: ve
|
|
10
10
|
}, V = (s, l, o, d, c, r) => {
|
|
11
11
|
const t = re(s, l, c), e = t.value, m = te(e);
|
|
12
12
|
let i = e;
|
|
@@ -26,24 +26,24 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
26
26
|
hideThumbnail: r
|
|
27
27
|
}
|
|
28
28
|
)), m === "PDF" && (i = /* @__PURE__ */ n(le, { id: `${e}-pdf`, src: e }));
|
|
29
|
-
const p = /* @__PURE__ */
|
|
29
|
+
const p = /* @__PURE__ */ S("div", { className: R.wrapper, children: [
|
|
30
30
|
/* @__PURE__ */ n("span", { children: t.header.display }),
|
|
31
|
-
t.header.referenceRange && /* @__PURE__ */ n("span", { className:
|
|
31
|
+
t.header.referenceRange && /* @__PURE__ */ n("span", { className: R.secondary, children: t.header.referenceRange })
|
|
32
32
|
] }), u = c("OBSERVATIONS_RECORDED_BY", {
|
|
33
33
|
provider: t.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, f = /* @__PURE__ */
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, f = /* @__PURE__ */ S("div", { className: R.wrapper, children: [
|
|
35
35
|
/* @__PURE__ */ n("span", { children: u }),
|
|
36
|
-
b && /* @__PURE__ */ n("span", { className:
|
|
37
|
-
] }),
|
|
36
|
+
b && /* @__PURE__ */ n("span", { className: R.secondary, children: b })
|
|
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
41
|
header: p,
|
|
42
42
|
value: i,
|
|
43
43
|
info: f,
|
|
44
|
-
id:
|
|
45
|
-
testId:
|
|
46
|
-
ariaLabel:
|
|
44
|
+
id: O,
|
|
45
|
+
testId: O,
|
|
46
|
+
ariaLabel: O
|
|
47
47
|
},
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
@@ -65,14 +65,14 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
65
65
|
)
|
|
66
66
|
},
|
|
67
67
|
`grouped-obs-${s.id}`
|
|
68
|
-
),
|
|
68
|
+
), Re = ({
|
|
69
69
|
groupedData: s,
|
|
70
70
|
title: l = "",
|
|
71
71
|
hideThumbnail: o
|
|
72
72
|
}) => {
|
|
73
73
|
const { t: d } = B(), c = (r, t, e) => {
|
|
74
74
|
const m = se(r.encounterDetails, d);
|
|
75
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ S(
|
|
76
76
|
U,
|
|
77
77
|
{
|
|
78
78
|
title: m,
|
|
@@ -116,13 +116,13 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
},
|
|
119
|
+
}, Oe = (s) => ["conceptUuid", s], _e = (s, l, o, d) => [
|
|
120
120
|
"observations",
|
|
121
121
|
s,
|
|
122
122
|
...l,
|
|
123
123
|
o,
|
|
124
124
|
d
|
|
125
|
-
],
|
|
125
|
+
], Se = ({
|
|
126
126
|
config: s,
|
|
127
127
|
episodeOfCareUuids: l,
|
|
128
128
|
encounterUuids: o
|
|
@@ -132,92 +132,92 @@ 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 } = M(), { t: u } = B(), b = ue({
|
|
136
136
|
queries: c.map((a) => ({
|
|
137
|
-
queryKey:
|
|
138
|
-
queryFn: () =>
|
|
137
|
+
queryKey: Oe(a),
|
|
138
|
+
queryFn: () => x(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
const a = b.some((
|
|
142
|
+
L(() => {
|
|
143
|
+
const a = b.some((z) => z.isError), y = m.current.size > 0;
|
|
144
144
|
a && !y ? (p({
|
|
145
145
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
148
|
}), m.current.add(0)) : !a && y && m.current.clear();
|
|
149
149
|
}, [b, p, u]);
|
|
150
|
-
const f =
|
|
150
|
+
const f = E(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = E(() => [.../* @__PURE__ */ new Set([...f, ...r])], [f, r]), v = E(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), O = e === "latest" || e === "latest-encounter", F = G(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
154
|
data: _,
|
|
155
|
-
isLoading:
|
|
156
|
-
isError:
|
|
157
|
-
refetch:
|
|
155
|
+
isLoading: w,
|
|
156
|
+
isError: I,
|
|
157
|
+
refetch: N
|
|
158
158
|
} = ce({
|
|
159
159
|
queryKey: _e(
|
|
160
160
|
i,
|
|
161
|
-
|
|
161
|
+
h,
|
|
162
162
|
o,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () =>
|
|
165
|
+
queryFn: () => O ? J(
|
|
166
166
|
i,
|
|
167
|
-
|
|
167
|
+
h,
|
|
168
168
|
o
|
|
169
|
-
) :
|
|
169
|
+
) : P(
|
|
170
170
|
i,
|
|
171
|
-
|
|
171
|
+
h,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i &&
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !F
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
Y(
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
|
-
(y) =>
|
|
180
|
-
) &&
|
|
179
|
+
(y) => h.includes(y)
|
|
180
|
+
) && N();
|
|
181
181
|
},
|
|
182
|
-
[i,
|
|
183
|
-
),
|
|
184
|
-
|
|
182
|
+
[i, N]
|
|
183
|
+
), L(() => {
|
|
184
|
+
I && p({
|
|
185
185
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
|
-
}, [
|
|
190
|
-
const $ =
|
|
189
|
+
}, [I]);
|
|
190
|
+
const $ = E(() => {
|
|
191
191
|
if (!_) return [];
|
|
192
|
-
let a =
|
|
192
|
+
let a = j(_);
|
|
193
193
|
e === "latest-encounter" && (a = W(a));
|
|
194
194
|
const y = X(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [_, e]),
|
|
196
|
+
}, [_, e]), k = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
],
|
|
201
|
-
return /* @__PURE__ */
|
|
200
|
+
], D = w || !v, A = I && v, q = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = A ? u("ERROR_FETCHING_OBSERVATIONS") : null, K = q ? u("NO_OBSERVATIONS_FOUND") : void 0, Q = $.length > 0 && !D && !A, g = d.titleTranslationKey, T = g ? u(g) : "";
|
|
201
|
+
return /* @__PURE__ */ S(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid":
|
|
205
|
+
"data-testid": g ? `observations-${T}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
|
-
className:
|
|
207
|
+
className: R.observations,
|
|
208
208
|
children: [
|
|
209
209
|
/* @__PURE__ */ n(
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId:
|
|
213
|
+
testId: g ? `observations-title-${T}` : "observations-title",
|
|
214
214
|
title: T,
|
|
215
|
-
className:
|
|
215
|
+
className: R.title,
|
|
216
216
|
children: /* @__PURE__ */ n("p", { children: T })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
Q ? /* @__PURE__ */ n(
|
|
220
|
+
Re,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
223
223
|
title: T,
|
|
@@ -226,12 +226,12 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
226
226
|
) : /* @__PURE__ */ n(
|
|
227
227
|
ae,
|
|
228
228
|
{
|
|
229
|
-
headers:
|
|
229
|
+
headers: k,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: u("OBSERVATIONS"),
|
|
232
|
-
loading:
|
|
233
|
-
errorStateMessage:
|
|
234
|
-
emptyStateMessage:
|
|
232
|
+
loading: D,
|
|
233
|
+
errorStateMessage: C,
|
|
234
|
+
emptyStateMessage: K ?? u("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -240,7 +240,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
240
240
|
);
|
|
241
241
|
};
|
|
242
242
|
export {
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
Oe as conceptUuidQueryKeys,
|
|
244
|
+
Se as default,
|
|
245
245
|
_e as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as we, T as z, V as xt, _ as B, L as q, M as y, a0 as Ro, a1 as ye, a2 as R, a3 as _, a4 as k, a5 as N, a6 as A, a7 as bs, a8 as ir, a9 as $e, aa as G, ab as Hn, ac as Vn, ad as dt, ae as D, af as xs, ag as cn, ah as Be, ai as ws, aj as qt, ak as zt, al as $s, am as Cs, an as $n, ao as Ss, ap as Nr, aq as Bt, ar as zo, as as ks, at as Es, au as j, av as Gr, aw as Ms, ax as Ds, ay as sr, az as As, aA as Ts, aB as zn, aC as Fs, aD as Is, aE as Z, aF as Ps, aG as Ls } from "./index-ExXHC3NK.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomePageGrid.d.ts","sourceRoot":"","sources":["../../../src/components/HomePageGrid/HomePageGrid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HomePageGrid.d.ts","sourceRoot":"","sources":["../../../src/components/HomePageGrid/HomePageGrid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAShC,CAAC"}
|
package/dist/constants/app.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,oBAAoB,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { s as t, x as r, u as n, A as m, E as l, G as c } from "./index-ExXHC3NK.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "@tanstack/react-query";
|
|
5
|
+
const d = "HomePageGrid-module_headerOffset__xmJ-q", i = {
|
|
6
|
+
headerOffset: d
|
|
7
|
+
}, _ = () => /* @__PURE__ */ e(
|
|
8
|
+
t,
|
|
9
|
+
{
|
|
10
|
+
extensionPointId: r,
|
|
11
|
+
loadingLabelKey: "HOME_LOADING_MODULES",
|
|
12
|
+
errorMessageKey: "HOME_ERROR_FETCH_CONFIG",
|
|
13
|
+
emptyMessageKey: "HOME_NO_MODULES",
|
|
14
|
+
className: i.headerOffset,
|
|
15
|
+
testId: "home-modules"
|
|
16
|
+
}
|
|
17
|
+
), O = "HomePageHeader-module_locationSelector__foYmn", g = {
|
|
18
|
+
locationSelector: O
|
|
19
|
+
}, H = () => {
|
|
20
|
+
const { t: o } = n();
|
|
21
|
+
return /* @__PURE__ */ e(
|
|
22
|
+
m,
|
|
23
|
+
{
|
|
24
|
+
ariaLabel: "Bahmni",
|
|
25
|
+
brandPrefix: o("HOME_LABEL"),
|
|
26
|
+
brandHref: "/",
|
|
27
|
+
globalFeatures: [
|
|
28
|
+
/* @__PURE__ */ e("div", { className: g.locationSelector, children: /* @__PURE__ */ e(c, {}) }, "location")
|
|
29
|
+
],
|
|
30
|
+
userMenu: /* @__PURE__ */ e(l, {})
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}, E = "HomePage-module_homePageBody__0qtrS", f = {
|
|
34
|
+
homePageBody: E
|
|
35
|
+
}, M = () => /* @__PURE__ */ a(s, { children: [
|
|
36
|
+
/* @__PURE__ */ e(H, {}),
|
|
37
|
+
/* @__PURE__ */ e("main", { className: f.homePageBody, children: /* @__PURE__ */ e(_, {}) })
|
|
38
|
+
] });
|
|
39
|
+
export {
|
|
40
|
+
M as HomePage
|
|
41
|
+
};
|