@bahmni/home-app 0.0.1-dev.476 → 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-80isaII2-Dybjp774.js → DocumentsTable-ly-7e45R-iEScwMyP.js} +48 -48
- package/dist/{FormsTable-CREuPF8o-mcYHZu5E.js → FormsTable-C5aFFOOZ-D3cMR_TA.js} +54 -54
- package/dist/{LNWAZHJI-CFORTZZ1.js → LNWAZHJI-BOux52rY.js} +2 -2
- package/dist/{MWZ6AO7Z-c4B_t4I2.js → MWZ6AO7Z-Dll8xLC5.js} +2 -2
- package/dist/{Observations-DbMo-TUm-ChZL7bgI.js → Observations-BFvKDktF-Bx8BbA9Z.js} +39 -39
- package/dist/{YPM2AS64-BS5g_BBf.js → YPM2AS64-uxsjEl-N.js} +1 -1
- package/dist/{index-BCKlDbwg.js → index-BhxFEVJE.js} +14 -14
- package/dist/{index-CkB9So8P-wlv1NUYj.js → index-C2AM1o7D-CB6n-Ccg.js} +1 -1
- package/dist/{index-m73BWm4x.js → index-Di9GPxiI.js} +31 -31
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsx as n, jsxs as u, Fragment as pe } from "react/jsx-runtime";
|
|
2
|
-
import { Q as _e, u as Ee, a as ge, f as Ce, z as Ne,
|
|
2
|
+
import { Q as _e, u as Ee, a as ge, f as Ce, z as Ne, P as fe, $ as Ae, B as v, q as Ie, W as De, t as be, H as Le, k as ye, D as ve, C as K, b as we, o as Oe, M as Se, R as Me, x as Re, T as Y, c as ee } from "./index-Di9GPxiI.js";
|
|
3
3
|
import { useQuery as Ue } from "@tanstack/react-query";
|
|
4
4
|
import { useState as h, useRef as ke, useEffect as _, useMemo as E, useCallback as T } from "react";
|
|
5
|
-
const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTable-module_viewAttachmentsLink__aQ1on", He = "DocumentsTable-module_documentViewerContainer__F5m8D", xe = "DocumentsTable-module_printContainer__rtarJ",
|
|
5
|
+
const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTable-module_viewAttachmentsLink__aQ1on", He = "DocumentsTable-module_documentViewerContainer__F5m8D", xe = "DocumentsTable-module_printContainer__rtarJ", We = "DocumentsTable-module_attachmentItem__17KA7", ze = "DocumentsTable-module_attachmentCounter__WFiI3", Ve = "DocumentsTable-module_attachmentError__RI4U2", qe = "DocumentsTable-module_documentIframe__ptq5I", Fe = "DocumentsTable-module_attachmentContent__IaCEe", Ge = "DocumentsTable-module_attachmentLoading__FAR6p", Pe = "DocumentsTable-module_hiddenWhileLoading__IxocW", je = "DocumentsTable-module_documentImage__KQVgS", Qe = "DocumentsTable-module_header__345GY", Ke = "DocumentsTable-module_documentTypeCell__uWGM8", Ye = "DocumentsTable-module_printAllButton__IVYUW", Je = "DocumentsTable-module_attachmentHeader__yI2xn", o = {
|
|
6
6
|
documentsTableBody: $e,
|
|
7
7
|
viewAttachmentsLink: Be,
|
|
8
8
|
documentViewerContainer: He,
|
|
9
9
|
printContainer: xe,
|
|
10
|
-
attachmentItem:
|
|
10
|
+
attachmentItem: We,
|
|
11
11
|
attachmentCounter: ze,
|
|
12
12
|
attachmentError: Ve,
|
|
13
|
-
documentIframe:
|
|
14
|
-
attachmentContent:
|
|
15
|
-
attachmentLoading:
|
|
16
|
-
hiddenWhileLoading:
|
|
17
|
-
documentImage:
|
|
13
|
+
documentIframe: qe,
|
|
14
|
+
attachmentContent: Fe,
|
|
15
|
+
attachmentLoading: Ge,
|
|
16
|
+
hiddenWhileLoading: Pe,
|
|
17
|
+
documentImage: je,
|
|
18
18
|
header: Qe,
|
|
19
19
|
documentTypeCell: Ke,
|
|
20
20
|
printAllButton: Ye,
|
|
21
|
-
attachmentHeader:
|
|
22
|
-
},
|
|
21
|
+
attachmentHeader: Je
|
|
22
|
+
}, Xe = "add", J = "document-print-container", X = () => /* @__PURE__ */ n(ee, {}), Ze = /* @__PURE__ */ new Set([
|
|
23
23
|
"ArrowUp",
|
|
24
24
|
"ArrowDown",
|
|
25
25
|
"PageUp",
|
|
@@ -33,36 +33,36 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
|
-
], nt = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i,
|
|
36
|
+
], nt = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, Z = (l) => l.attachments.length > 0 ? l.attachments : l.documentUrl ? [{ url: l.documentUrl, contentType: l.contentType }] : [], st = ({ config: l, encounterUuids: B }) => {
|
|
37
37
|
const [i, H] = h(!1), [r, x] = h(
|
|
38
38
|
null
|
|
39
39
|
), [I, w] = h(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
41
|
), [D, O] = h(
|
|
42
42
|
/* @__PURE__ */ new Set()
|
|
43
|
-
), N = ke(null), [S,
|
|
43
|
+
), N = ke(null), [S, W] = h(
|
|
44
44
|
null
|
|
45
45
|
), z = S !== null;
|
|
46
46
|
_(() => () => N.current?.abort(), []);
|
|
47
|
-
const g = _e(), { t: a } = Ee(), { addNotification:
|
|
47
|
+
const g = _e(), { t: a } = Ee(), { addNotification: b } = ge(), C = E(
|
|
48
48
|
() => l?.actions?.find(
|
|
49
|
-
(e) => e.type ===
|
|
49
|
+
(e) => e.type === Xe
|
|
50
50
|
),
|
|
51
51
|
[l?.actions]
|
|
52
52
|
), te = Ce(C?.requiredPrivilege), ne = !!C && te, ae = Number(l?.pageSize) || 5, [M, R] = h(1), [f, oe] = h(ae), [re, U] = h(void 0), V = T((e) => {
|
|
53
53
|
x(e), H(!0);
|
|
54
54
|
}, []), de = T(() => {
|
|
55
55
|
N.current?.abort(), O(/* @__PURE__ */ new Set()), H(!1), x(null), w(/* @__PURE__ */ new Set());
|
|
56
|
-
}, []),
|
|
56
|
+
}, []), q = T((e) => {
|
|
57
57
|
O((t) => new Set(t).add(e));
|
|
58
|
-
}, []),
|
|
58
|
+
}, []), F = T((e) => {
|
|
59
59
|
w((t) => new Set(t).add(e));
|
|
60
60
|
}, []), se = T(() => {
|
|
61
61
|
C && Ne({
|
|
62
62
|
context: { encounterType: C.encounterType },
|
|
63
63
|
action: { type: "create", resourceType: "DocumentReference" }
|
|
64
64
|
});
|
|
65
|
-
}, [C]), { data: A, isLoading: le, isError: k, error: $, refetch:
|
|
65
|
+
}, [C]), { data: A, isLoading: le, isError: k, error: $, refetch: G } = Ue({
|
|
66
66
|
queryKey: [
|
|
67
67
|
"documents",
|
|
68
68
|
g,
|
|
@@ -80,24 +80,24 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
80
80
|
});
|
|
81
81
|
Ae(
|
|
82
82
|
(e) => {
|
|
83
|
-
e.patientUUID === g && e.updatedResources.documents &&
|
|
83
|
+
e.patientUUID === g && e.updatedResources.documents && G();
|
|
84
84
|
},
|
|
85
|
-
[g,
|
|
85
|
+
[g, G]
|
|
86
86
|
), _(() => {
|
|
87
87
|
A && U(A.total);
|
|
88
88
|
}, [A]), _(() => {
|
|
89
89
|
R(1), U(void 0);
|
|
90
90
|
}, [g]), _(() => {
|
|
91
|
-
k &&
|
|
91
|
+
k && b({
|
|
92
92
|
title: a("ERROR_DEFAULT_TITLE"),
|
|
93
93
|
message: $?.message ?? "",
|
|
94
94
|
type: "error"
|
|
95
95
|
});
|
|
96
|
-
}, [k, $,
|
|
96
|
+
}, [k, $, b, a]), _(() => {
|
|
97
97
|
const e = new AbortController();
|
|
98
98
|
return (async () => {
|
|
99
99
|
if (!i || !r) return;
|
|
100
|
-
const t = /* @__PURE__ */ new Set(), d =
|
|
100
|
+
const t = /* @__PURE__ */ new Set(), d = Z(r);
|
|
101
101
|
for (let s = 0; s < d.length; s++) {
|
|
102
102
|
const m = v(d[s].url);
|
|
103
103
|
try {
|
|
@@ -124,7 +124,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
124
124
|
y.target === e && d();
|
|
125
125
|
}, m = (y) => {
|
|
126
126
|
const Te = y.target;
|
|
127
|
-
|
|
127
|
+
Ze.has(y.key) && !Te?.closest("button, input, textarea, select, a") && d();
|
|
128
128
|
}, p = () => {
|
|
129
129
|
!t && e.scrollTop !== 0 && (e.scrollTop = 0);
|
|
130
130
|
};
|
|
@@ -137,19 +137,19 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
137
137
|
t !== f ? (oe(t), R(1), U(void 0)) : R(e);
|
|
138
138
|
},
|
|
139
139
|
[f]
|
|
140
|
-
),
|
|
140
|
+
), L = E(
|
|
141
141
|
() => l?.fields ?? tt,
|
|
142
142
|
[l?.fields]
|
|
143
|
-
), ie = E(() => [...A?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [A]), me = E(() => Ie(
|
|
144
|
-
() =>
|
|
143
|
+
), ie = E(() => [...A?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [A]), me = E(() => Ie(L, a), [L, a]), ue = E(
|
|
144
|
+
() => L.map((e) => ({
|
|
145
145
|
key: e,
|
|
146
146
|
sortable: e !== "attachments"
|
|
147
147
|
})),
|
|
148
|
-
[
|
|
148
|
+
[L]
|
|
149
149
|
), c = E(
|
|
150
|
-
() => r ?
|
|
150
|
+
() => r ? Z(r) : [],
|
|
151
151
|
[r]
|
|
152
|
-
),
|
|
152
|
+
), P = c.every(
|
|
153
153
|
(e, t) => D.has(t) || I.has(t) || v(e.url) === "#"
|
|
154
154
|
);
|
|
155
155
|
_(() => {
|
|
@@ -160,12 +160,12 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
160
160
|
);
|
|
161
161
|
return () => clearTimeout(e);
|
|
162
162
|
}, [i, c]);
|
|
163
|
-
const
|
|
163
|
+
const j = T(
|
|
164
164
|
async (e, t) => {
|
|
165
165
|
if (!r || N.current) return;
|
|
166
166
|
const d = new AbortController(), { signal: s } = d;
|
|
167
|
-
N.current = d,
|
|
168
|
-
const m = document.getElementById(
|
|
167
|
+
N.current = d, W(t);
|
|
168
|
+
const m = document.getElementById(J);
|
|
169
169
|
try {
|
|
170
170
|
await De(
|
|
171
171
|
e,
|
|
@@ -173,16 +173,16 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
173
173
|
{ container: m, signal: s }
|
|
174
174
|
);
|
|
175
175
|
} catch {
|
|
176
|
-
s.aborted ||
|
|
176
|
+
s.aborted || b({
|
|
177
177
|
title: a("ERROR_DEFAULT_TITLE"),
|
|
178
178
|
message: a("DOCUMENTS_ERROR_LOADING_ATTACHMENT"),
|
|
179
179
|
type: "error"
|
|
180
180
|
});
|
|
181
181
|
} finally {
|
|
182
|
-
N.current = null,
|
|
182
|
+
N.current = null, W(null);
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
-
[r,
|
|
185
|
+
[r, b, a]
|
|
186
186
|
), Q = E(
|
|
187
187
|
() => c.filter(
|
|
188
188
|
(e, t) => v(e.url) !== "#" && !I.has(t)
|
|
@@ -207,7 +207,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
207
207
|
)
|
|
208
208
|
] });
|
|
209
209
|
case "uploadedOn":
|
|
210
|
-
return
|
|
210
|
+
return Le(
|
|
211
211
|
e.uploadedOn,
|
|
212
212
|
a,
|
|
213
213
|
!0
|
|
@@ -216,7 +216,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
216
216
|
return e.uploadedBy ?? a("DOCUMENTS_NOT_AVAILABLE");
|
|
217
217
|
case "attachments":
|
|
218
218
|
return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ n(
|
|
219
|
-
|
|
219
|
+
be,
|
|
220
220
|
{
|
|
221
221
|
onClick: () => V(e),
|
|
222
222
|
className: o.viewAttachmentsLink,
|
|
@@ -283,10 +283,10 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
283
283
|
kind: "tertiary",
|
|
284
284
|
size: "sm",
|
|
285
285
|
className: o.printAllButton,
|
|
286
|
-
renderIcon: S === "all" ?
|
|
287
|
-
disabled: z || !
|
|
286
|
+
renderIcon: S === "all" ? X : Y,
|
|
287
|
+
disabled: z || !P,
|
|
288
288
|
testId: "print-all-attachments",
|
|
289
|
-
onClick: () =>
|
|
289
|
+
onClick: () => j(Q, "all"),
|
|
290
290
|
children: a("DOCUMENTS_PRINT_ALL")
|
|
291
291
|
}
|
|
292
292
|
),
|
|
@@ -325,10 +325,10 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
325
325
|
label: a("DOCUMENTS_PRINT_ATTACHMENT", {
|
|
326
326
|
index: t + 1
|
|
327
327
|
}),
|
|
328
|
-
disabled: z || !
|
|
328
|
+
disabled: z || !P,
|
|
329
329
|
testId: `print-attachment-${t}`,
|
|
330
|
-
onClick: () =>
|
|
331
|
-
children: S === t ? /* @__PURE__ */ n(
|
|
330
|
+
onClick: () => j([e], t),
|
|
331
|
+
children: S === t ? /* @__PURE__ */ n(X, {}) : /* @__PURE__ */ n(Y, {})
|
|
332
332
|
}
|
|
333
333
|
)
|
|
334
334
|
] }),
|
|
@@ -352,8 +352,8 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
352
352
|
src: d,
|
|
353
353
|
alt: r.documentIdentifier,
|
|
354
354
|
className: `${o.documentImage} ${D.has(t) ? "" : o.hiddenWhileLoading}`,
|
|
355
|
-
onLoad: () =>
|
|
356
|
-
onError: () =>
|
|
355
|
+
onLoad: () => q(t),
|
|
356
|
+
onError: () => F(t)
|
|
357
357
|
}
|
|
358
358
|
) : /* @__PURE__ */ n(
|
|
359
359
|
"iframe",
|
|
@@ -361,8 +361,8 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
361
361
|
src: s ? `${d}#toolbar=0` : d,
|
|
362
362
|
className: `${o.documentIframe} ${D.has(t) ? "" : o.hiddenWhileLoading}`,
|
|
363
363
|
title: r.documentIdentifier,
|
|
364
|
-
onLoad: () =>
|
|
365
|
-
onError: () =>
|
|
364
|
+
onLoad: () => q(t),
|
|
365
|
+
onError: () => F(t)
|
|
366
366
|
}
|
|
367
367
|
)
|
|
368
368
|
] })
|
|
@@ -371,7 +371,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
|
|
|
371
371
|
`${r.id}-${e.url}`
|
|
372
372
|
);
|
|
373
373
|
}),
|
|
374
|
-
/* @__PURE__ */ n("div", { id:
|
|
374
|
+
/* @__PURE__ */ n("div", { id: J, className: o.printContainer })
|
|
375
375
|
] })
|
|
376
376
|
}
|
|
377
377
|
)
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { u as de, Q as ie, f as le, p as me, d as ue, e as ce,
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
1
|
+
import { jsx as n, jsxs as $, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { u as de, Q as ie, f as le, p as me, d as ue, e as ce, E as fe, J as ye, $ as pe, g as Ne, n as ge, h as he, H as be, z as Oe, C as q, i as z, t as Te, M as Q, O as Ie, S as Ae, R as _e, j as Ee, l as ve } from "./index-Di9GPxiI.js";
|
|
3
|
+
import { useQueryClient as Ce, useQuery as A } from "@tanstack/react-query";
|
|
4
|
+
import { useState as V, useMemo as d, useCallback as i } from "react";
|
|
5
|
+
const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_modalHeading__wnTmA", Be = "FormsTable-module_customAccordianItem__isszs", g = {
|
|
6
|
+
formsTableBody: Re,
|
|
7
7
|
modalHeading: Le,
|
|
8
8
|
customAccordianItem: Be
|
|
9
|
-
},
|
|
9
|
+
}, De = ({
|
|
10
10
|
episodeOfCareUuids: _,
|
|
11
11
|
encounterUuids: l,
|
|
12
12
|
config: j,
|
|
13
13
|
disableActions: x = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: o } = de(), m = ie(), [h,
|
|
16
|
+
const { t: o } = de(), m = ie(), [h, E] = V(!1), [s, v] = V(null), {
|
|
17
17
|
numberOfVisits: K,
|
|
18
|
-
hideThumbnail:
|
|
18
|
+
hideThumbnail: P = !1,
|
|
19
19
|
forms: p
|
|
20
20
|
} = j ?? {}, G = le(
|
|
21
|
-
|
|
22
|
-
), { userPrivileges: N } = me(), b = G && !x && !!y,
|
|
21
|
+
ve.EDIT_OBSERVATIONS
|
|
22
|
+
), { userPrivileges: N } = me(), b = G && !x && !!y, C = ue(
|
|
23
23
|
_,
|
|
24
24
|
l
|
|
25
|
-
),
|
|
26
|
-
data:
|
|
25
|
+
), J = Ce(), {
|
|
26
|
+
data: R = [],
|
|
27
27
|
isLoading: L,
|
|
28
28
|
isError: B,
|
|
29
|
-
error:
|
|
30
|
-
refetch:
|
|
29
|
+
error: W,
|
|
30
|
+
refetch: Y
|
|
31
31
|
} = A({
|
|
32
32
|
queryKey: ["forms", m, _],
|
|
33
33
|
queryFn: () => ce(m, void 0, K),
|
|
34
|
-
enabled: !!m && !
|
|
34
|
+
enabled: !!m && !C
|
|
35
35
|
}), F = d(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = R;
|
|
37
37
|
return l && l.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => l.includes(r.encounterUuid)
|
|
39
39
|
)), Array.isArray(p) && p.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => p.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [R, l, p]), { data: S = [] } = A({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => fe()
|
|
45
|
-
}),
|
|
45
|
+
}), M = i(
|
|
46
46
|
(e) => {
|
|
47
47
|
const r = S.find(
|
|
48
48
|
(t) => t.name.toLowerCase() === e.toLowerCase()
|
|
@@ -56,13 +56,13 @@ const Ee = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
56
56
|
},
|
|
57
57
|
[S, N]
|
|
58
58
|
), u = i(
|
|
59
|
-
(e) => !y || e.encounterUuid !== y ? !1 :
|
|
60
|
-
[y,
|
|
59
|
+
(e) => !y || e.encounterUuid !== y ? !1 : M(e.formName),
|
|
60
|
+
[y, M]
|
|
61
61
|
), {
|
|
62
62
|
data: O,
|
|
63
63
|
isLoading: X,
|
|
64
64
|
isError: Z,
|
|
65
|
-
error:
|
|
65
|
+
error: T
|
|
66
66
|
} = A({
|
|
67
67
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
68
68
|
queryFn: () => ye(s.encounterUuid),
|
|
@@ -70,32 +70,32 @@ const Ee = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
70
70
|
});
|
|
71
71
|
pe(
|
|
72
72
|
(e) => {
|
|
73
|
-
e.patientUUID === m && (
|
|
73
|
+
e.patientUUID === m && (Y(), J.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
74
|
},
|
|
75
75
|
[m]
|
|
76
76
|
);
|
|
77
77
|
const ee = d(() => !O?.entry || !s?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Ne(e) ? ge(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [O, s?.formName]), re = d(() => {
|
|
78
|
-
if (
|
|
79
|
-
return he(
|
|
80
|
-
}, [
|
|
78
|
+
if (T)
|
|
79
|
+
return he(T).message;
|
|
80
|
+
}, [T]), c = d(
|
|
81
81
|
() => [
|
|
82
82
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
83
83
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
84
84
|
],
|
|
85
85
|
[o]
|
|
86
|
-
),
|
|
86
|
+
), U = d(
|
|
87
87
|
() => [...c, { key: "actions", header: o("ACTIONS") }],
|
|
88
88
|
[c, o]
|
|
89
89
|
), ae = i(
|
|
90
|
-
(e) => b && e.some((r) => u(r)) ?
|
|
91
|
-
[b, u,
|
|
90
|
+
(e) => b && e.some((r) => u(r)) ? U : c,
|
|
91
|
+
[b, u, U, c]
|
|
92
92
|
), oe = c, se = d(
|
|
93
93
|
() => [
|
|
94
94
|
{ key: "recordedOn", sortable: !0 },
|
|
95
95
|
{ key: "recordedBy", sortable: !0 }
|
|
96
96
|
],
|
|
97
97
|
[]
|
|
98
|
-
),
|
|
98
|
+
), D = d(() => {
|
|
99
99
|
const e = F.reduce(
|
|
100
100
|
(r, a) => {
|
|
101
101
|
const t = a.formName;
|
|
@@ -120,11 +120,11 @@ const Ee = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
120
120
|
)
|
|
121
121
|
})
|
|
122
122
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
|
-
}, [F, o]),
|
|
124
|
-
|
|
125
|
-
}, []),
|
|
126
|
-
|
|
127
|
-
}, []),
|
|
123
|
+
}, [F, o]), k = i((e) => {
|
|
124
|
+
v(e), E(!0);
|
|
125
|
+
}, []), w = i(() => {
|
|
126
|
+
E(!1), v(null);
|
|
127
|
+
}, []), I = i((e) => {
|
|
128
128
|
Oe({
|
|
129
129
|
context: {
|
|
130
130
|
encounter: { resourceType: "Encounter", id: e.encounterUuid },
|
|
@@ -137,42 +137,42 @@ const Ee = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
137
137
|
(e, r) => {
|
|
138
138
|
switch (r) {
|
|
139
139
|
case "recordedOn":
|
|
140
|
-
return /* @__PURE__ */ n(
|
|
140
|
+
return /* @__PURE__ */ n(Te, { onClick: () => k(e), children: e.recordedOn });
|
|
141
141
|
case "recordedBy":
|
|
142
142
|
return e.recordedBy;
|
|
143
143
|
case "actions":
|
|
144
144
|
return u(e) ? /* @__PURE__ */ n(
|
|
145
|
-
|
|
145
|
+
q,
|
|
146
146
|
{
|
|
147
147
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
148
148
|
kind: "ghost",
|
|
149
149
|
size: "sm",
|
|
150
150
|
testId: `edit-form-${e.encounterUuid}`,
|
|
151
|
-
onClick: () =>
|
|
152
|
-
children: /* @__PURE__ */ n(
|
|
151
|
+
onClick: () => I(e),
|
|
152
|
+
children: /* @__PURE__ */ n(z, {})
|
|
153
153
|
}
|
|
154
154
|
) : null;
|
|
155
155
|
default:
|
|
156
156
|
return null;
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
|
-
[
|
|
159
|
+
[k, I, u, o]
|
|
160
160
|
);
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L || B ||
|
|
163
|
-
|
|
161
|
+
return /* @__PURE__ */ $(ne, { children: [
|
|
162
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L || B || D.length === 0 || C ? /* @__PURE__ */ n(
|
|
163
|
+
Q,
|
|
164
164
|
{
|
|
165
165
|
headers: oe,
|
|
166
166
|
ariaLabel: o("FORMS_HEADING"),
|
|
167
167
|
rows: [],
|
|
168
168
|
loading: L,
|
|
169
|
-
errorStateMessage: B ?
|
|
169
|
+
errorStateMessage: B ? W?.message : void 0,
|
|
170
170
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
171
171
|
renderCell: H,
|
|
172
172
|
className: g.formsTableBody,
|
|
173
173
|
dataTestId: "forms-table"
|
|
174
174
|
}
|
|
175
|
-
) : /* @__PURE__ */ n(
|
|
175
|
+
) : /* @__PURE__ */ n(Ie, { align: "start", children: D.map((e, r) => {
|
|
176
176
|
const { formName: a, records: t } = e, f = ae(t);
|
|
177
177
|
return /* @__PURE__ */ n(
|
|
178
178
|
Ae,
|
|
@@ -182,7 +182,7 @@ const Ee = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
182
182
|
testId: `accordian-title-${a}`,
|
|
183
183
|
open: r === 0,
|
|
184
184
|
children: /* @__PURE__ */ n(
|
|
185
|
-
|
|
185
|
+
Q,
|
|
186
186
|
{
|
|
187
187
|
headers: f,
|
|
188
188
|
ariaLabel: o("FORMS_HEADING"),
|
|
@@ -206,20 +206,20 @@ const Ee = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
206
206
|
id: "modalIdForActionAreaLayout",
|
|
207
207
|
portalId: "main-display-area",
|
|
208
208
|
open: h,
|
|
209
|
-
onRequestClose:
|
|
210
|
-
modalHeading: /* @__PURE__ */
|
|
209
|
+
onRequestClose: w,
|
|
210
|
+
modalHeading: /* @__PURE__ */ $("div", { className: g.modalHeading, children: [
|
|
211
211
|
/* @__PURE__ */ n("span", { children: s.formName }),
|
|
212
212
|
b && u(s) && /* @__PURE__ */ n(
|
|
213
|
-
|
|
213
|
+
q,
|
|
214
214
|
{
|
|
215
215
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
216
216
|
kind: "ghost",
|
|
217
217
|
size: "sm",
|
|
218
218
|
testId: `edit-form-modal-${s.encounterUuid}`,
|
|
219
219
|
onClick: () => {
|
|
220
|
-
|
|
220
|
+
w(), I(s);
|
|
221
221
|
},
|
|
222
|
-
children: /* @__PURE__ */ n(
|
|
222
|
+
children: /* @__PURE__ */ n(z, {})
|
|
223
223
|
}
|
|
224
224
|
)
|
|
225
225
|
] }),
|
|
@@ -228,7 +228,7 @@ const Ee = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
228
228
|
size: "md",
|
|
229
229
|
testId: "form-details-modal",
|
|
230
230
|
children: /* @__PURE__ */ n(
|
|
231
|
-
|
|
231
|
+
Ee,
|
|
232
232
|
{
|
|
233
233
|
observations: ee,
|
|
234
234
|
isLoading: X,
|
|
@@ -236,7 +236,7 @@ const Ee = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
236
236
|
errorMessage: re,
|
|
237
237
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
238
238
|
testIdPrefix: s.formName,
|
|
239
|
-
hideThumbnail:
|
|
239
|
+
hideThumbnail: P,
|
|
240
240
|
formName: s.formName
|
|
241
241
|
}
|
|
242
242
|
)
|
|
@@ -245,5 +245,5 @@ const Ee = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
245
245
|
] });
|
|
246
246
|
};
|
|
247
247
|
export {
|
|
248
|
-
|
|
248
|
+
De as default
|
|
249
249
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { aa as d, ab as f, ac as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-uxsjEl-N.js";
|
|
2
|
+
import { aa as d, ab as f, ac as e } from "./index-Di9GPxiI.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { aa as v, ab as C, ac as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-uxsjEl-N.js";
|
|
2
|
+
import { aa as v, ab as C, ac as e } from "./index-Di9GPxiI.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -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) {
|
|
@@ -89230,7 +89230,7 @@ t7.interceptors.response.use(
|
|
|
89230
89230
|
} catch {
|
|
89231
89231
|
}
|
|
89232
89232
|
const { message: e } = O0(t);
|
|
89233
|
-
throw new Error(e);
|
|
89233
|
+
throw new Error(e, { cause: t });
|
|
89234
89234
|
}
|
|
89235
89235
|
);
|
|
89236
89236
|
const E2 = async (t, e) => (await t7.get(t, e)).data, mi = async (t, e, r) => (await t7.post(t, e, r)).data, Aft = async (t, e) => (await t7.delete(t, e)).data, d2 = (t) => typeof t == "string", Q6 = () => {
|
|
@@ -120799,11 +120799,11 @@ ya2({
|
|
|
120799
120799
|
key: "commonSearch",
|
|
120800
120800
|
component: Bkt
|
|
120801
120801
|
});
|
|
120802
|
-
w0(() => Promise.resolve().then(() => cxt)), w0(() => Promise.resolve().then(() => Sxt)), w0(() => Promise.resolve().then(() => pNt)), w0(() => Promise.resolve().then(() => yNt)), w0(() => import("./DocumentsTable-
|
|
120802
|
+
w0(() => Promise.resolve().then(() => cxt)), w0(() => Promise.resolve().then(() => Sxt)), w0(() => Promise.resolve().then(() => pNt)), w0(() => Promise.resolve().then(() => yNt)), w0(() => import("./DocumentsTable-ly-7e45R-iEScwMyP.js")), w0(() => Promise.resolve().then(() => xTt)), w0(() => import("./FormsTable-C5aFFOOZ-D3cMR_TA.js")), w0(() => Promise.resolve().then(() => w_t)), w0(() => import("./Observations-BFvKDktF-Bx8BbA9Z.js")), w0(
|
|
120803
120803
|
() => Promise.resolve().then(() => mOt)
|
|
120804
120804
|
), w0(
|
|
120805
120805
|
() => Promise.resolve().then(() => ILt)
|
|
120806
|
-
), w0(() => Promise.resolve().then(() => HOt)), w0(() => Promise.resolve().then(() => bAt)), w0(() => Promise.resolve().then(() => qOt)), w0(() => Promise.resolve().then(() => nOt)), w0(() => import("./index-
|
|
120806
|
+
), w0(() => Promise.resolve().then(() => HOt)), w0(() => Promise.resolve().then(() => bAt)), w0(() => Promise.resolve().then(() => qOt)), w0(() => Promise.resolve().then(() => nOt)), w0(() => import("./index-C2AM1o7D-CB6n-Ccg.js")), w0(() => Promise.resolve().then(() => lSt));
|
|
120807
120807
|
const Pkt = "/bahmni/home/index.html#/changePassword", Fkt = {
|
|
120808
120808
|
id: "user-change-password-global-action",
|
|
120809
120809
|
label: "USER_CHANGE_PASSWORD_GLOBAL_ACTION",
|
|
@@ -123735,7 +123735,7 @@ ZL.interceptors.response.use(
|
|
|
123735
123735
|
} catch {
|
|
123736
123736
|
}
|
|
123737
123737
|
const { message: e } = Gf(t);
|
|
123738
|
-
throw new Error(e);
|
|
123738
|
+
throw new Error(e, { cause: t });
|
|
123739
123739
|
}
|
|
123740
123740
|
);
|
|
123741
123741
|
const BL = async (t, e) => (await ZL.get(t, e)).data, p2 = (t) => typeof t == "string", f5 = () => {
|
|
@@ -212636,7 +212636,7 @@ var Ncr = (t, e = !1) => {
|
|
|
212636
212636
|
const e = Rp2(() => {
|
|
212637
212637
|
const r = this, [n] = this.#n, [a] = this.#o, [i] = this.#a, [c] = this.#i, [l] = this.#p, [s] = this.#t;
|
|
212638
212638
|
let u;
|
|
212639
|
-
return this.#c ? u = this.#c : (u = Sp2(() => import("./LNWAZHJI-
|
|
212639
|
+
return this.#c ? u = this.#c : (u = Sp2(() => import("./LNWAZHJI-BOux52rY.js")), this.#c = u), tf2(this.#h, this.#r), Tp2(u, Op2({
|
|
212640
212640
|
get queryFlavor() {
|
|
212641
212641
|
return r.#u;
|
|
212642
212642
|
},
|
|
@@ -212734,7 +212734,7 @@ var Ncr = (t, e = !1) => {
|
|
|
212734
212734
|
const e = Rp2(() => {
|
|
212735
212735
|
const r = this, [n] = this.#n, [a] = this.#o, [i] = this.#a, [c] = this.#i, [l] = this.#p, [s] = this.#t, [u] = this.#c;
|
|
212736
212736
|
let d;
|
|
212737
|
-
return this.#l ? d = this.#l : (d = Sp2(() => import("./MWZ6AO7Z-
|
|
212737
|
+
return this.#l ? d = this.#l : (d = Sp2(() => import("./MWZ6AO7Z-Dll8xLC5.js")), this.#l = d), tf2(this.#h, this.#r), Tp2(d, Op2({
|
|
212738
212738
|
get queryFlavor() {
|
|
212739
212739
|
return r.#u;
|
|
212740
212740
|
},
|
|
@@ -212864,7 +212864,7 @@ const h3r = {
|
|
|
212864
212864
|
}
|
|
212865
212865
|
}
|
|
212866
212866
|
}, p3r = "home", Tcr = "org.bahmni.home.dashboard", Ocr = 5e3, f3r = w0(
|
|
212867
|
-
() => import("./index-
|
|
212867
|
+
() => import("./index-BhxFEVJE.js").then((t) => ({
|
|
212868
212868
|
default: t.HomePage
|
|
212869
212869
|
}))
|
|
212870
212870
|
), m3r = w0(
|
|
@@ -212904,32 +212904,32 @@ function Scr() {
|
|
|
212904
212904
|
}
|
|
212905
212905
|
export {
|
|
212906
212906
|
Ko as $,
|
|
212907
|
-
|
|
212907
|
+
x3r as A,
|
|
212908
212908
|
eMt as B,
|
|
212909
212909
|
k9 as C,
|
|
212910
212910
|
Ig as D,
|
|
212911
|
-
|
|
212912
|
-
|
|
212913
|
-
|
|
212911
|
+
eo2 as E,
|
|
212912
|
+
rIe as F,
|
|
212913
|
+
B2t as G,
|
|
212914
212914
|
f2 as H,
|
|
212915
|
-
|
|
212916
|
-
|
|
212917
|
-
|
|
212918
|
-
|
|
212915
|
+
u4r as I,
|
|
212916
|
+
JEt as J,
|
|
212917
|
+
vrt as K,
|
|
212918
|
+
s4r as L,
|
|
212919
212919
|
_0 as M,
|
|
212920
|
-
|
|
212920
|
+
Lrt as N,
|
|
212921
212921
|
f6 as O,
|
|
212922
|
-
|
|
212922
|
+
p4r as P,
|
|
212923
212923
|
Sr as Q,
|
|
212924
212924
|
Cr as R,
|
|
212925
212925
|
m6 as S,
|
|
212926
212926
|
wD2 as T,
|
|
212927
|
-
|
|
212928
|
-
|
|
212929
|
-
|
|
212930
|
-
|
|
212931
|
-
|
|
212932
|
-
|
|
212927
|
+
Vrt as U,
|
|
212928
|
+
I3r as V,
|
|
212929
|
+
m4r as W,
|
|
212930
|
+
v4r as X,
|
|
212931
|
+
Bf as Y,
|
|
212932
|
+
d4r as Z,
|
|
212933
212933
|
Zf as _,
|
|
212934
212934
|
vr as a,
|
|
212935
212935
|
Z3r as a0,
|
|
@@ -212998,24 +212998,24 @@ export {
|
|
|
212998
212998
|
r7 as d,
|
|
212999
212999
|
h4r as e,
|
|
213000
213000
|
aL as f,
|
|
213001
|
-
|
|
213001
|
+
ha2 as g,
|
|
213002
213002
|
O0 as h,
|
|
213003
213003
|
ng as i,
|
|
213004
213004
|
zL as j,
|
|
213005
213005
|
yc as k,
|
|
213006
213006
|
H4r as l,
|
|
213007
213007
|
l4r as m,
|
|
213008
|
-
|
|
213008
|
+
ZAt as n,
|
|
213009
213009
|
p6 as o,
|
|
213010
213010
|
xi as p,
|
|
213011
|
-
|
|
213012
|
-
|
|
213013
|
-
|
|
213011
|
+
f4r as q,
|
|
213012
|
+
E4r as r,
|
|
213013
|
+
V4r as s,
|
|
213014
213014
|
zo as t,
|
|
213015
213015
|
c2 as u,
|
|
213016
|
-
|
|
213017
|
-
|
|
213016
|
+
y4r as v,
|
|
213017
|
+
M4r as w,
|
|
213018
213018
|
So as x,
|
|
213019
|
-
|
|
213019
|
+
w4r as y,
|
|
213020
213020
|
Q4 as z
|
|
213021
213021
|
};
|
package/dist/index.js
CHANGED