@bahmni/home-app 0.0.1-dev.377 → 0.0.1-dev.379
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/App.d.ts.map +1 -1
- package/dist/{DocumentsTable-DltqOolY-BGz9b_w0.js → DocumentsTable-DuAtZsGl-BRU-3FTJ.js} +26 -26
- package/dist/{FormsTable-0kw7u2Y0-rkVEbMb5.js → FormsTable-BIZOc0WF-BiYjIKm8.js} +68 -68
- package/dist/{LNWAZHJI-B5O_MSyC.js → LNWAZHJI-CPEhLpG8.js} +2 -2
- package/dist/{MWZ6AO7Z-Bse4gEVn.js → MWZ6AO7Z-wMp87d7L.js} +2 -2
- package/dist/{Observations-BoGO_vsc-CDqQ-BTI.js → Observations-D7R3v4qe-BJz8gO0p.js} +58 -58
- package/dist/{YPM2AS64-BEs-Amg5.js → YPM2AS64-DwzV9bTY.js} +1 -1
- package/dist/components/HomePageHeader/HomePageHeader.d.ts.map +1 -1
- package/dist/constants/app.d.ts +0 -2
- package/dist/constants/app.d.ts.map +1 -1
- package/dist/{index-ay48ID7h.js → index-BF2fsrIb.js} +42554 -42001
- package/dist/index-CBDYNVpg.js +108 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +8 -6
- package/dist/locales/locale_es.json +8 -6
- package/package.json +1 -1
- package/dist/components/UserProfileMenu/UserProfileMenu.d.ts +0 -3
- package/dist/components/UserProfileMenu/UserProfileMenu.d.ts.map +0 -1
- package/dist/components/UserProfileMenu/index.d.ts +0 -2
- package/dist/components/UserProfileMenu/index.d.ts.map +0 -1
- package/dist/index-hZ9rhyEV.js +0 -10135
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { g as q,
|
|
1
|
+
import { jsxs as N, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { g as q, I as H, u as S, n as w, o as G, h as M, q as k, r as x, N as Q, t as z, G as j, H as P, v as A, M as J, C as W, w as Y, y as X, z as Z, A as ee } from "./index-BF2fsrIb.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as _, useMemo as g } from "react";
|
|
5
|
-
const
|
|
6
|
-
const t =
|
|
7
|
-
let
|
|
8
|
-
|
|
5
|
+
const C = (a, n, d, l, b, r) => {
|
|
6
|
+
const t = J(a, n, b), s = t.value, o = W(s);
|
|
7
|
+
let i = s;
|
|
8
|
+
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
9
|
X,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
@@ -13,22 +13,22 @@ const D = (a, n, d, l, b, r) => {
|
|
|
13
13
|
id: `${s}-img`,
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
|
-
)),
|
|
16
|
+
)), o === "Video" && (i = /* @__PURE__ */ u(
|
|
17
17
|
Z,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
21
21
|
hideThumbnail: r
|
|
22
22
|
}
|
|
23
|
-
)),
|
|
23
|
+
)), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
24
|
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: t.provider
|
|
26
26
|
}), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
Y,
|
|
29
29
|
{
|
|
30
30
|
header: t.header,
|
|
31
|
-
value:
|
|
31
|
+
value: i,
|
|
32
32
|
info: m,
|
|
33
33
|
id: c,
|
|
34
34
|
testId: c,
|
|
@@ -43,9 +43,9 @@ const D = (a, n, d, l, b, r) => {
|
|
|
43
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: a.members?.map(
|
|
46
|
-
(s,
|
|
46
|
+
(s, o) => C(
|
|
47
47
|
s,
|
|
48
|
-
|
|
48
|
+
o,
|
|
49
49
|
b,
|
|
50
50
|
r,
|
|
51
51
|
n,
|
|
@@ -54,23 +54,23 @@ const D = (a, n, d, l, b, r) => {
|
|
|
54
54
|
)
|
|
55
55
|
},
|
|
56
56
|
`grouped-obs-${a.id}`
|
|
57
|
-
),
|
|
57
|
+
), oe = ({
|
|
58
58
|
groupedData: a,
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } =
|
|
63
|
-
const
|
|
64
|
-
return /* @__PURE__ */
|
|
62
|
+
const { t: l } = S(), b = (r, t, s) => {
|
|
63
|
+
const o = P(r.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ N(
|
|
65
65
|
A,
|
|
66
66
|
{
|
|
67
|
-
title:
|
|
67
|
+
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(
|
|
73
|
-
|
|
72
|
+
(i, m) => C(
|
|
73
|
+
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
76
76
|
n,
|
|
@@ -79,8 +79,8 @@ const D = (a, n, d, l, b, r) => {
|
|
|
79
79
|
)
|
|
80
80
|
),
|
|
81
81
|
r.groupedObservations.map(
|
|
82
|
-
(
|
|
83
|
-
|
|
82
|
+
(i, m) => re(
|
|
83
|
+
i,
|
|
84
84
|
l,
|
|
85
85
|
t,
|
|
86
86
|
m,
|
|
@@ -105,67 +105,67 @@ const D = (a, n, d, l, b, r) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
},
|
|
109
|
-
observations:
|
|
108
|
+
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", $ = {
|
|
109
|
+
observations: ie,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
112
112
|
const n = a, {
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = H(), { t: o } = S(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => w(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
_(() => {
|
|
124
|
-
|
|
124
|
+
i.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const K = d[h];
|
|
127
127
|
s({
|
|
128
|
-
title:
|
|
129
|
-
message:
|
|
128
|
+
title: o("ERROR_DEFAULT_TITLE"),
|
|
129
|
+
message: o("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
|
-
}, [
|
|
135
|
-
const m = g(() =>
|
|
134
|
+
}, [i, d]);
|
|
135
|
+
const m = g(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
137
|
+
isLoading: D,
|
|
138
|
+
isError: R,
|
|
139
|
+
refetch: T
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => G(t, p),
|
|
143
143
|
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
M(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && T();
|
|
150
150
|
},
|
|
151
|
-
[t,
|
|
151
|
+
[t, T]
|
|
152
152
|
), _(() => {
|
|
153
|
-
|
|
154
|
-
title:
|
|
155
|
-
message:
|
|
153
|
+
R && s({
|
|
154
|
+
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
|
+
message: o("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
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = k(c), h = x(e);
|
|
162
|
+
return Q(h);
|
|
163
|
+
}, [c]), F = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], I = D || !y, O = R && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, U = O ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? o("NO_OBSERVATIONS_FOUND") : void 0, B = f.length > 0 && !I && !O, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
|
+
return /* @__PURE__ */ N(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
@@ -174,7 +174,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
174
174
|
className: $.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
z,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
@@ -183,22 +183,22 @@ const D = (a, n, d, l, b, r) => {
|
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
B ? /* @__PURE__ */ u(
|
|
187
|
+
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: f,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
j,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: F,
|
|
197
197
|
rows: [],
|
|
198
|
-
ariaLabel:
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
198
|
+
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
+
loading: I,
|
|
200
|
+
errorStateMessage: U,
|
|
201
|
+
emptyStateMessage: V,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as we, a0 as z, a1 as xt, a2 as B, X as q, Y as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-BF2fsrIb.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":"HomePageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/HomePageHeader/HomePageHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HomePageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/HomePageHeader/HomePageHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAYlC,CAAC"}
|
package/dist/constants/app.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export declare const HOME_NAMESPACE = "home";
|
|
2
|
-
export declare const LOGIN_PATH = "/bahmni/home/index.html#/login";
|
|
3
|
-
export declare const CHANGE_PASSWORD_PATH = "/bahmni/home/index.html#/changePassword";
|
|
4
2
|
export declare const HOMEPAGE_TILES_SKELETON_COUNT = 6;
|
|
5
3
|
//# sourceMappingURL=app.d.ts.map
|
|
@@ -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,6BAA6B,IAAI,CAAC"}
|