@bahmni/reports-app 0.0.1-dev.458 → 0.0.1-dev.461
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-ClDSnyUa-BrJ_RFD2.js → DocumentsTable-CD8jsIEf-t83aCFCO.js} +35 -35
- package/dist/{FormsTable-Cbe9Shu--CEetKDGq.js → FormsTable-CGD1xMCV-C6f4rmVI.js} +36 -36
- package/dist/{LNWAZHJI-Dcjrzm3K.js → LNWAZHJI-D4An6TPA.js} +2 -2
- package/dist/{MWZ6AO7Z-D_RuVis8.js → MWZ6AO7Z-DS_j4e6T.js} +2 -2
- package/dist/{Observations-foWY-TMm-BopvGrkh.js → Observations-x0JPCClc-lhpcytrp.js} +8 -8
- package/dist/{ReportsPage-CiSyxHXk.js → ReportsPage-8DRHI8mc.js} +10 -10
- package/dist/{YPM2AS64-CNqe-YEa.js → YPM2AS64-BxqTs3Oh.js} +1 -1
- package/dist/{index-CTY4F0kA.js → index-CGSYweTe.js} +20265 -20262
- package/dist/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h, Fragment as _e } from "react/jsx-runtime";
|
|
2
|
-
import { u as pe, a as Ee, z as ge, i as
|
|
2
|
+
import { u as pe, a as Ee, z as ge, i as Ce, Q as Ne, w as Ie, T as v, b as Ae, c as be, K as fe, h as Le, O as ye, d as De, U as Q, J as ve, L as we, I as Oe, e as Se, N as Ue, X as J, G as ee } from "./index-CGSYweTe.js";
|
|
3
3
|
import { useQuery as Me } from "@tanstack/react-query";
|
|
4
4
|
import { useState as T, useRef as Re, useEffect as E, useMemo as g, useCallback as _ } from "react";
|
|
5
|
-
const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTable-module_viewAttachmentsLink__aQ1on", He = "DocumentsTable-module_documentViewerContainer__F5m8D", Be = "DocumentsTable-module_printContainer__rtarJ", Ge = "DocumentsTable-module_attachmentItem__17KA7", ze = "DocumentsTable-module_attachmentCounter__WFiI3", Ve = "DocumentsTable-module_attachmentError__RI4U2", We = "DocumentsTable-module_documentIframe__ptq5I", Fe = "DocumentsTable-module_attachmentContent__IaCEe", xe = "DocumentsTable-module_attachmentLoading__FAR6p", qe = "DocumentsTable-module_hiddenWhileLoading__IxocW", Ke = "DocumentsTable-module_documentImage__KQVgS", Pe = "DocumentsTable-module_header__345GY",
|
|
5
|
+
const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTable-module_viewAttachmentsLink__aQ1on", He = "DocumentsTable-module_documentViewerContainer__F5m8D", Be = "DocumentsTable-module_printContainer__rtarJ", Ge = "DocumentsTable-module_attachmentItem__17KA7", ze = "DocumentsTable-module_attachmentCounter__WFiI3", Ve = "DocumentsTable-module_attachmentError__RI4U2", We = "DocumentsTable-module_documentIframe__ptq5I", Fe = "DocumentsTable-module_attachmentContent__IaCEe", xe = "DocumentsTable-module_attachmentLoading__FAR6p", qe = "DocumentsTable-module_hiddenWhileLoading__IxocW", Ke = "DocumentsTable-module_documentImage__KQVgS", Pe = "DocumentsTable-module_header__345GY", je = "DocumentsTable-module_documentTypeCell__uWGM8", Qe = "DocumentsTable-module_printAllButton__IVYUW", Je = "DocumentsTable-module_attachmentHeader__yI2xn", o = {
|
|
6
6
|
documentsTableBody: ke,
|
|
7
7
|
viewAttachmentsLink: $e,
|
|
8
8
|
documentViewerContainer: He,
|
|
@@ -16,8 +16,8 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
16
16
|
hiddenWhileLoading: qe,
|
|
17
17
|
documentImage: Ke,
|
|
18
18
|
header: Pe,
|
|
19
|
-
documentTypeCell:
|
|
20
|
-
printAllButton:
|
|
19
|
+
documentTypeCell: je,
|
|
20
|
+
printAllButton: Qe,
|
|
21
21
|
attachmentHeader: Je
|
|
22
22
|
}, Xe = "startConsultation", Ye = "add", Ze = "documents", X = "document-print-container", Y = () => /* @__PURE__ */ n(ee, {}), et = /* @__PURE__ */ new Set([
|
|
23
23
|
"ArrowUp",
|
|
@@ -38,21 +38,21 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
38
38
|
null
|
|
39
39
|
), [b, w] = T(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), [
|
|
41
|
+
), [f, O] = T(
|
|
42
42
|
/* @__PURE__ */ new Set()
|
|
43
|
-
),
|
|
43
|
+
), N = Re(null), [S, z] = T(
|
|
44
44
|
null
|
|
45
45
|
), V = S !== null;
|
|
46
|
-
E(() => () =>
|
|
47
|
-
const
|
|
46
|
+
E(() => () => N.current?.abort(), []);
|
|
47
|
+
const C = pe(), { t: a } = Ee(), { addNotification: L } = ge(), c = g(
|
|
48
48
|
() => l?.actions?.find(
|
|
49
49
|
(e) => e.type === Ye
|
|
50
50
|
),
|
|
51
51
|
[l?.actions]
|
|
52
|
-
), te =
|
|
52
|
+
), te = Ce(c?.requiredPrivilege), ne = !!c && te, ae = Number(l?.pageSize) || 5, [U, M] = T(1), [I, oe] = T(ae), [re, R] = T(void 0), W = _((e) => {
|
|
53
53
|
G(e), B(!0);
|
|
54
54
|
}, []), de = _(() => {
|
|
55
|
-
|
|
55
|
+
N.current?.abort(), O(/* @__PURE__ */ new Set()), B(!1), G(null), w(/* @__PURE__ */ new Set());
|
|
56
56
|
}, []), F = _((e) => {
|
|
57
57
|
O((t) => new Set(t).add(e));
|
|
58
58
|
}, []), x = _((e) => {
|
|
@@ -70,14 +70,14 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
70
70
|
}, [c]), { data: A, isLoading: le, isError: k, error: $, refetch: q } = Me({
|
|
71
71
|
queryKey: [
|
|
72
72
|
"documents",
|
|
73
|
-
|
|
73
|
+
C,
|
|
74
74
|
H,
|
|
75
75
|
U,
|
|
76
76
|
I
|
|
77
77
|
],
|
|
78
|
-
enabled: !!
|
|
79
|
-
queryFn: () =>
|
|
80
|
-
|
|
78
|
+
enabled: !!C,
|
|
79
|
+
queryFn: () => Ne(
|
|
80
|
+
C,
|
|
81
81
|
H,
|
|
82
82
|
I,
|
|
83
83
|
U
|
|
@@ -85,20 +85,20 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
85
85
|
});
|
|
86
86
|
Ie(
|
|
87
87
|
(e) => {
|
|
88
|
-
e.patientUUID ===
|
|
88
|
+
e.patientUUID === C && e.updatedResources.documents && q();
|
|
89
89
|
},
|
|
90
|
-
[
|
|
90
|
+
[C, q]
|
|
91
91
|
), E(() => {
|
|
92
92
|
A && R(A.total);
|
|
93
93
|
}, [A]), E(() => {
|
|
94
94
|
M(1), R(void 0);
|
|
95
|
-
}, [
|
|
96
|
-
k &&
|
|
95
|
+
}, [C]), E(() => {
|
|
96
|
+
k && L({
|
|
97
97
|
title: a("ERROR_DEFAULT_TITLE"),
|
|
98
98
|
message: $?.message ?? "",
|
|
99
99
|
type: "error"
|
|
100
100
|
});
|
|
101
|
-
}, [k, $,
|
|
101
|
+
}, [k, $, L, a]), E(() => {
|
|
102
102
|
const e = new AbortController();
|
|
103
103
|
return (async () => {
|
|
104
104
|
if (!m || !r) return;
|
|
@@ -155,7 +155,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
155
155
|
() => r ? Z(r) : [],
|
|
156
156
|
[r]
|
|
157
157
|
), K = i.every(
|
|
158
|
-
(e, t) =>
|
|
158
|
+
(e, t) => f.has(t) || b.has(t) || v(e.url) === "#"
|
|
159
159
|
);
|
|
160
160
|
E(() => {
|
|
161
161
|
if (!m || i.length === 0) return;
|
|
@@ -167,9 +167,9 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
167
167
|
}, [m, i]);
|
|
168
168
|
const P = _(
|
|
169
169
|
async (e, t) => {
|
|
170
|
-
if (!r ||
|
|
170
|
+
if (!r || N.current) return;
|
|
171
171
|
const d = new AbortController(), { signal: s } = d;
|
|
172
|
-
|
|
172
|
+
N.current = d, z(t);
|
|
173
173
|
const u = document.getElementById(X);
|
|
174
174
|
try {
|
|
175
175
|
await be(
|
|
@@ -178,17 +178,17 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
178
178
|
{ container: u, signal: s }
|
|
179
179
|
);
|
|
180
180
|
} catch {
|
|
181
|
-
s.aborted ||
|
|
181
|
+
s.aborted || L({
|
|
182
182
|
title: a("ERROR_DEFAULT_TITLE"),
|
|
183
183
|
message: a("DOCUMENTS_ERROR_LOADING_ATTACHMENT"),
|
|
184
184
|
type: "error"
|
|
185
185
|
});
|
|
186
186
|
} finally {
|
|
187
|
-
|
|
187
|
+
N.current = null, z(null);
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
-
[r,
|
|
191
|
-
),
|
|
190
|
+
[r, L, a]
|
|
191
|
+
), j = g(
|
|
192
192
|
() => i.filter(
|
|
193
193
|
(e, t) => v(e.url) !== "#" && !b.has(t)
|
|
194
194
|
),
|
|
@@ -212,7 +212,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
212
212
|
)
|
|
213
213
|
] });
|
|
214
214
|
case "uploadedOn":
|
|
215
|
-
return
|
|
215
|
+
return Le(
|
|
216
216
|
e.uploadedOn,
|
|
217
217
|
a,
|
|
218
218
|
!0
|
|
@@ -221,7 +221,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
221
221
|
return e.uploadedBy ?? a("DOCUMENTS_NOT_AVAILABLE");
|
|
222
222
|
case "attachments":
|
|
223
223
|
return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ n(
|
|
224
|
-
|
|
224
|
+
fe,
|
|
225
225
|
{
|
|
226
226
|
onClick: () => W(e),
|
|
227
227
|
className: o.viewAttachmentsLink,
|
|
@@ -239,7 +239,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
239
239
|
ne && /* @__PURE__ */ h(De, { className: o.header, testId: "documents-header", children: [
|
|
240
240
|
/* @__PURE__ */ n("p", { children: a("DOCUMENTS_TABLE_HEADING") }),
|
|
241
241
|
/* @__PURE__ */ n(
|
|
242
|
-
|
|
242
|
+
Q,
|
|
243
243
|
{
|
|
244
244
|
autoAlign: !0,
|
|
245
245
|
size: "lg",
|
|
@@ -282,7 +282,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
282
282
|
size: "lg",
|
|
283
283
|
testId: "document-view-modal",
|
|
284
284
|
children: /* @__PURE__ */ h("div", { className: o.documentViewerContainer, children: [
|
|
285
|
-
|
|
285
|
+
j.length > 1 && /* @__PURE__ */ n(
|
|
286
286
|
Ue,
|
|
287
287
|
{
|
|
288
288
|
kind: "tertiary",
|
|
@@ -291,7 +291,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
291
291
|
renderIcon: S === "all" ? Y : J,
|
|
292
292
|
disabled: V || !K,
|
|
293
293
|
testId: "print-all-attachments",
|
|
294
|
-
onClick: () => P(
|
|
294
|
+
onClick: () => P(j, "all"),
|
|
295
295
|
children: a("DOCUMENTS_PRINT_ALL")
|
|
296
296
|
}
|
|
297
297
|
),
|
|
@@ -323,7 +323,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
323
323
|
total: i.length
|
|
324
324
|
}) }) : /* @__PURE__ */ n("span", {}),
|
|
325
325
|
/* @__PURE__ */ n(
|
|
326
|
-
|
|
326
|
+
Q,
|
|
327
327
|
{
|
|
328
328
|
kind: "ghost",
|
|
329
329
|
size: "sm",
|
|
@@ -338,7 +338,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
338
338
|
)
|
|
339
339
|
] }),
|
|
340
340
|
/* @__PURE__ */ h("div", { className: o.attachmentContent, children: [
|
|
341
|
-
!
|
|
341
|
+
!f.has(t) && /* @__PURE__ */ n(
|
|
342
342
|
"div",
|
|
343
343
|
{
|
|
344
344
|
className: o.attachmentLoading,
|
|
@@ -356,7 +356,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
356
356
|
{
|
|
357
357
|
src: d,
|
|
358
358
|
alt: r.documentIdentifier,
|
|
359
|
-
className: `${o.documentImage} ${
|
|
359
|
+
className: `${o.documentImage} ${f.has(t) ? "" : o.hiddenWhileLoading}`,
|
|
360
360
|
onLoad: () => F(t),
|
|
361
361
|
onError: () => x(t)
|
|
362
362
|
}
|
|
@@ -364,7 +364,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", $e = "DocumentsTab
|
|
|
364
364
|
"iframe",
|
|
365
365
|
{
|
|
366
366
|
src: s ? `${d}#toolbar=0` : d,
|
|
367
|
-
className: `${o.documentIframe} ${
|
|
367
|
+
className: `${o.documentIframe} ${f.has(t) ? "" : o.hiddenWhileLoading}`,
|
|
368
368
|
title: r.documentIdentifier,
|
|
369
369
|
onLoad: () => F(t),
|
|
370
370
|
onError: () => x(t)
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { a as ie, u as de, i as le, Z as me, V as ue, f as ce, g as fe, j as ye, w as Ne, $ as he, A as ge, R as Te, h as Ie, U as
|
|
1
|
+
import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { a as ie, u as de, i as le, Z as me, V as ue, f as ce, g as fe, j as ye, w as Ne, $ as he, A as ge, R as Te, h as Ie, U as H, k as K, K as Oe, I as $, W as pe, l as be, e as Ae, m as Ee, y as _e } from "./index-CGSYweTe.js";
|
|
3
3
|
import { useQueryClient as Re, useQuery as A } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
5
|
-
const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA",
|
|
4
|
+
import { useState as j, useMemo as i, useCallback as d } from "react";
|
|
5
|
+
const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA", Ue = "FormsTable-module_customAccordianItem__isszs", g = {
|
|
6
6
|
formsTableBody: ve,
|
|
7
7
|
modalHeading: Ce,
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
},
|
|
8
|
+
customAccordianItem: Ue
|
|
9
|
+
}, Le = "startConsultation", Me = ({
|
|
10
10
|
episodeOfCareUuids: E,
|
|
11
11
|
encounterUuids: l,
|
|
12
|
-
config:
|
|
12
|
+
config: z,
|
|
13
13
|
disableActions: x = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: o } = ie(), m = de(), [T, _] =
|
|
16
|
+
const { t: o } = ie(), m = de(), [T, _] = j(!1), [t, R] = j(null), {
|
|
17
17
|
numberOfVisits: G,
|
|
18
|
-
hideThumbnail:
|
|
18
|
+
hideThumbnail: Z = !1,
|
|
19
19
|
forms: N
|
|
20
|
-
} =
|
|
20
|
+
} = z ?? {}, Q = le(
|
|
21
21
|
_e.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: h } = me(), I =
|
|
22
|
+
), { userPrivileges: h } = me(), I = Q && !x && !!y, v = ue(
|
|
23
23
|
E,
|
|
24
24
|
l
|
|
25
|
-
),
|
|
25
|
+
), W = Re(), {
|
|
26
26
|
data: C = [],
|
|
27
|
-
isLoading:
|
|
28
|
-
isError:
|
|
29
|
-
error:
|
|
27
|
+
isLoading: U,
|
|
28
|
+
isError: L,
|
|
29
|
+
error: P,
|
|
30
30
|
refetch: X
|
|
31
31
|
} = A({
|
|
32
32
|
queryKey: ["forms", m, E],
|
|
33
33
|
queryFn: () => ce(m, void 0, G),
|
|
34
34
|
enabled: !!m && !v
|
|
35
|
-
}),
|
|
35
|
+
}), F = i(() => {
|
|
36
36
|
let e = C;
|
|
37
37
|
return l && l.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => l.includes(r.encounterUuid)
|
|
39
39
|
)), Array.isArray(N) && N.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => N.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [C, l, N]), { data:
|
|
42
|
+
}, [C, l, N]), { data: B = [] } = A({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => fe()
|
|
45
45
|
}), D = d(
|
|
46
46
|
(e) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = B.find(
|
|
48
48
|
(s) => s.name.toLowerCase() === e.toLowerCase()
|
|
49
49
|
);
|
|
50
50
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
@@ -54,7 +54,7 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
54
54
|
(s) => a.has(s.privilegeName) && s.editable
|
|
55
55
|
);
|
|
56
56
|
},
|
|
57
|
-
[
|
|
57
|
+
[B, h]
|
|
58
58
|
), u = d(
|
|
59
59
|
(e) => !y || e.encounterUuid !== y ? !1 : D(e.formName),
|
|
60
60
|
[y, D]
|
|
@@ -70,7 +70,7 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
70
70
|
});
|
|
71
71
|
Ne(
|
|
72
72
|
(e) => {
|
|
73
|
-
e.patientUUID === m && (X(),
|
|
73
|
+
e.patientUUID === m && (X(), W.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
74
|
},
|
|
75
75
|
[m]
|
|
76
76
|
);
|
|
@@ -96,7 +96,7 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
96
96
|
],
|
|
97
97
|
[]
|
|
98
98
|
), M = i(() => {
|
|
99
|
-
const e =
|
|
99
|
+
const e = F.reduce(
|
|
100
100
|
(r, a) => {
|
|
101
101
|
const s = a.formName;
|
|
102
102
|
r[s] ??= [];
|
|
@@ -120,13 +120,13 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
120
120
|
)
|
|
121
121
|
})
|
|
122
122
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
|
-
}, [
|
|
123
|
+
}, [F, o]), w = d((e) => {
|
|
124
124
|
R(e), _(!0);
|
|
125
|
-
}, []),
|
|
125
|
+
}, []), k = d(() => {
|
|
126
126
|
_(!1), R(null);
|
|
127
127
|
}, []), b = d((e) => {
|
|
128
128
|
globalThis.dispatchEvent(
|
|
129
|
-
new CustomEvent(
|
|
129
|
+
new CustomEvent(Le, {
|
|
130
130
|
detail: {
|
|
131
131
|
editOnly: "observationForms",
|
|
132
132
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -140,12 +140,12 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
140
140
|
(e, r) => {
|
|
141
141
|
switch (r) {
|
|
142
142
|
case "recordedOn":
|
|
143
|
-
return /* @__PURE__ */ n(Oe, { onClick: () =>
|
|
143
|
+
return /* @__PURE__ */ n(Oe, { onClick: () => w(e), children: e.recordedOn });
|
|
144
144
|
case "recordedBy":
|
|
145
145
|
return e.recordedBy;
|
|
146
146
|
case "actions":
|
|
147
147
|
return u(e) ? /* @__PURE__ */ n(
|
|
148
|
-
|
|
148
|
+
H,
|
|
149
149
|
{
|
|
150
150
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
151
151
|
kind: "ghost",
|
|
@@ -159,17 +159,17 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
[
|
|
162
|
+
[w, b, u, o]
|
|
163
163
|
);
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
164
|
+
return /* @__PURE__ */ q(ne, { children: [
|
|
165
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: U || L || M.length === 0 || v ? /* @__PURE__ */ n(
|
|
166
166
|
$,
|
|
167
167
|
{
|
|
168
168
|
headers: oe,
|
|
169
169
|
ariaLabel: o("FORMS_HEADING"),
|
|
170
170
|
rows: [],
|
|
171
|
-
loading:
|
|
172
|
-
errorStateMessage:
|
|
171
|
+
loading: U,
|
|
172
|
+
errorStateMessage: L ? P?.message : void 0,
|
|
173
173
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
174
174
|
renderCell: V,
|
|
175
175
|
className: g.formsTableBody,
|
|
@@ -209,18 +209,18 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
209
209
|
id: "modalIdForActionAreaLayout",
|
|
210
210
|
portalId: "main-display-area",
|
|
211
211
|
open: T,
|
|
212
|
-
onRequestClose:
|
|
213
|
-
modalHeading: /* @__PURE__ */
|
|
212
|
+
onRequestClose: k,
|
|
213
|
+
modalHeading: /* @__PURE__ */ q("div", { className: g.modalHeading, children: [
|
|
214
214
|
/* @__PURE__ */ n("span", { children: t.formName }),
|
|
215
215
|
I && u(t) && /* @__PURE__ */ n(
|
|
216
|
-
|
|
216
|
+
H,
|
|
217
217
|
{
|
|
218
218
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
219
219
|
kind: "ghost",
|
|
220
220
|
size: "sm",
|
|
221
221
|
testId: `edit-form-modal-${t.encounterUuid}`,
|
|
222
222
|
onClick: () => {
|
|
223
|
-
|
|
223
|
+
k(), b(t);
|
|
224
224
|
},
|
|
225
225
|
children: /* @__PURE__ */ n(K, {})
|
|
226
226
|
}
|
|
@@ -239,7 +239,7 @@ const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
239
239
|
errorMessage: re,
|
|
240
240
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
241
241
|
testIdPrefix: t.formName,
|
|
242
|
-
hideThumbnail:
|
|
242
|
+
hideThumbnail: Z,
|
|
243
243
|
formName: t.formName
|
|
244
244
|
}
|
|
245
245
|
)
|
|
@@ -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 { at as d, au as f, av as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BxqTs3Oh.js";
|
|
2
|
+
import { at as d, au as f, av as e } from "./index-CGSYweTe.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 { at as v, au as C, av 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-BxqTs3Oh.js";
|
|
2
|
+
import { at as v, au as C, av as e } from "./index-CGSYweTe.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 { u as z, z as Q, a as V, n as M, V as G, o as H, Y, w as j, p as J, q as P, r as W, s as X, d as ee, I as ae, t as se, v as
|
|
2
|
+
import { u as z, z as Q, a as V, n as M, V as G, o as H, Y, w as j, p as J, q as P, r as W, s as X, d as ee, I as ae, t as se, v as B, x as te, B as re, h as ie, C as oe, D as ne, E as de, F as le } from "./index-CGSYweTe.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as pe, useEffect as L, useMemo as g } from "react";
|
|
5
5
|
const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
|
|
@@ -7,7 +7,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
|
-
},
|
|
10
|
+
}, F = (s, l, o, d, c, t) => {
|
|
11
11
|
const r = te(s, l, c), e = r.value, p = re(e);
|
|
12
12
|
let i = e;
|
|
13
13
|
p === "Image" && (i = /* @__PURE__ */ n(
|
|
@@ -48,13 +48,13 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
50
50
|
}, ye = (s, l, o, d, c, t, r) => /* @__PURE__ */ n(
|
|
51
|
-
|
|
51
|
+
B,
|
|
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, p) =>
|
|
57
|
+
(e, p) => F(
|
|
58
58
|
e,
|
|
59
59
|
p,
|
|
60
60
|
c,
|
|
@@ -73,14 +73,14 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
73
73
|
const { t: d } = V(), c = (t, r, e) => {
|
|
74
74
|
const p = se(t.encounterDetails, d);
|
|
75
75
|
return /* @__PURE__ */ S(
|
|
76
|
-
|
|
76
|
+
B,
|
|
77
77
|
{
|
|
78
78
|
title: p,
|
|
79
79
|
id: `encounter-${t.encounterId}`,
|
|
80
80
|
open: r,
|
|
81
81
|
children: [
|
|
82
82
|
t.observations.map(
|
|
83
|
-
(i, m) =>
|
|
83
|
+
(i, m) => F(
|
|
84
84
|
i,
|
|
85
85
|
m,
|
|
86
86
|
e,
|
|
@@ -147,7 +147,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
147
147
|
type: "error"
|
|
148
148
|
}), p.current.add(0)) : !a && y && p.current.clear();
|
|
149
149
|
}, [b, m, u]);
|
|
150
|
-
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...t])], [T, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter",
|
|
150
|
+
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...t])], [T, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", U = G(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
@@ -171,7 +171,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
171
171
|
h,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && h.length > 0 && v && !
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !U
|
|
175
175
|
});
|
|
176
176
|
j(
|
|
177
177
|
(a) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r, jsxs as S, Fragment as K } from "react/jsx-runtime";
|
|
2
|
-
import { H as de, M as me, P as Se, S as fe, _ as Oe, a0 as ge, a1 as Pe, a2 as Ae, a3 as he, a4 as Re, a5 as Le, a as w, z as ce, a6 as De, a7 as q, a8 as Q, a9 as X, aa as Ce, ab as be, ac as Ne, ad as
|
|
2
|
+
import { H as de, M as me, P as Se, S as fe, _ as Oe, a0 as ge, a1 as Pe, a2 as Ae, a3 as he, a4 as Re, a5 as Le, a as w, z as ce, a6 as De, a7 as q, a8 as Q, a9 as X, aa as Ce, ab as be, ac as Ne, ad as Z, ae as J, Z as ye, af as Me, ag as Ie, ah as ee, ai as Fe, aj as te, ak as Be, al as Ue, am as ve, an as He, ao as ae, ap as Ye, aq as ne, ar as we, as as xe } from "./index-CGSYweTe.js";
|
|
3
3
|
import { useQuery as _e } from "@tanstack/react-query";
|
|
4
4
|
import qe, { useCallback as W, useState as A, useEffect as ue, useMemo as x } from "react";
|
|
5
|
-
import { useLocation as Qe, useNavigate as Ge } from "react-router
|
|
5
|
+
import { useLocation as Qe, useNavigate as Ge } from "react-router";
|
|
6
6
|
const $e = "http://json-schema.org/draft-07/schema#", ke = "Reports App Configuration", Xe = "object", je = { config: { type: "object", properties: { supportedFormats: { type: "array", items: { type: "string" }, description: "List of supported report formats" }, paperSize: { type: "string", description: "Default paper size for generated reports (e.g., A4)" }, enableReportQueue: { type: "boolean", description: "Whether reports can be queued (run asynchronously) in addition to running immediately" } }, additionalProperties: !0 } }, ze = !0, We = {
|
|
7
7
|
$schema: $e,
|
|
8
8
|
title: ke,
|
|
@@ -24,7 +24,7 @@ const $e = "http://json-schema.org/draft-07/schema#", ke = "Reports App Configur
|
|
|
24
24
|
"THIS_YEAR",
|
|
25
25
|
"LAST_7_DAYS",
|
|
26
26
|
"LAST_30_DAYS"
|
|
27
|
-
],
|
|
27
|
+
], Ze = {
|
|
28
28
|
TODAY: "REPORTS_PRESET_TODAY",
|
|
29
29
|
THIS_MONTH: "REPORTS_PRESET_THIS_MONTH",
|
|
30
30
|
PREVIOUS_MONTH: "REPORTS_PRESET_PREVIOUS_MONTH",
|
|
@@ -35,7 +35,7 @@ const $e = "http://json-schema.org/draft-07/schema#", ke = "Reports App Configur
|
|
|
35
35
|
}, Te = {
|
|
36
36
|
reportsConfig: ["reportsConfig"],
|
|
37
37
|
reportsAppConfig: ["reportsAppConfig"]
|
|
38
|
-
},
|
|
38
|
+
}, Je = [".xls", ".xlsx"], et = () => _e({
|
|
39
39
|
queryKey: Te.reportsAppConfig,
|
|
40
40
|
queryFn: async () => {
|
|
41
41
|
try {
|
|
@@ -509,7 +509,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
509
509
|
Ce,
|
|
510
510
|
{
|
|
511
511
|
testId: `template-uploader-${R.id}`,
|
|
512
|
-
accept:
|
|
512
|
+
accept: Je,
|
|
513
513
|
buttonLabel: s(
|
|
514
514
|
"REPORTS_UPLOAD_TEMPLATE_BUTTON_LABEL"
|
|
515
515
|
),
|
|
@@ -537,7 +537,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
537
537
|
"aria-label": s("REPORTS_ACTIONS_HEADER"),
|
|
538
538
|
children: [
|
|
539
539
|
/* @__PURE__ */ r(
|
|
540
|
-
|
|
540
|
+
Z,
|
|
541
541
|
{
|
|
542
542
|
itemText: s(
|
|
543
543
|
o ? "REPORTS_RUN_NOW_BUTTON_LABEL" : "REPORTS_RUN_BUTTON_LABEL"
|
|
@@ -546,7 +546,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
546
546
|
}
|
|
547
547
|
),
|
|
548
548
|
o && /* @__PURE__ */ r(
|
|
549
|
-
|
|
549
|
+
Z,
|
|
550
550
|
{
|
|
551
551
|
itemText: s("REPORTS_QUEUE_BUTTON_LABEL"),
|
|
552
552
|
onClick: () => b(R)
|
|
@@ -597,7 +597,7 @@ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
597
597
|
titleText: c("REPORTS_SELECT_DATE_RANGE"),
|
|
598
598
|
label: "",
|
|
599
599
|
items: Ke,
|
|
600
|
-
itemToString: (u) => u ? c(
|
|
600
|
+
itemToString: (u) => u ? c(Ze[u]) : "",
|
|
601
601
|
selectedItem: l,
|
|
602
602
|
onChange: ({ selectedItem: u }) => {
|
|
603
603
|
if (p(u ?? null), !u) return;
|
|
@@ -660,8 +660,8 @@ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
660
660
|
)
|
|
661
661
|
] }),
|
|
662
662
|
/* @__PURE__ */ S("div", { className: H.buttonsRow, children: [
|
|
663
|
-
/* @__PURE__ */ r(
|
|
664
|
-
/* @__PURE__ */ r(
|
|
663
|
+
/* @__PURE__ */ r(J, { kind: "tertiary", onClick: h, children: c("REPORTS_RESET_BUTTON") }),
|
|
664
|
+
/* @__PURE__ */ r(J, { kind: "primary", onClick: D, children: c("REPORTS_APPLY_BUTTON") })
|
|
665
665
|
] })
|
|
666
666
|
] });
|
|
667
667
|
}, ie = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aw as we, ax as z, ay as xt, az as B, au as q, av as y, aA as Ro, aB as ye, aC as R, aD as _, aE as k, aF as N, aG as A, aH as bs, aI as ir, aJ as $e, aK as U, aL as Hn, aM as Vn, aN as dt, aO as D, aP as xs, aQ as cn, aR as Be, aS as ws, aT as qt, aU as zt, aV as $s, aW as Cs, aX as $n, aY as Ss, aZ as Nr, a_ as Bt, a$ as zo, b0 as ks, b1 as Es, b2 as j, b3 as Ur, b4 as Ms, b5 as Ds, b6 as sr, b7 as As, b8 as Ts, b9 as zn, ba as Fs, bb as Is, bc as Z, bd as Ps, be as Ls } from "./index-
|
|
1
|
+
import { aw as we, ax as z, ay as xt, az as B, au as q, av as y, aA as Ro, aB as ye, aC as R, aD as _, aE as k, aF as N, aG as A, aH as bs, aI as ir, aJ as $e, aK as U, aL as Hn, aM as Vn, aN as dt, aO as D, aP as xs, aQ as cn, aR as Be, aS as ws, aT as qt, aU as zt, aV as $s, aW as Cs, aX as $n, aY as Ss, aZ as Nr, a_ as Bt, a$ as zo, b0 as ks, b1 as Es, b2 as j, b3 as Ur, b4 as Ms, b5 as Ds, b6 as sr, b7 as As, b8 as Ts, b9 as zn, ba as Fs, bb as Is, bc as Z, bd as Ps, be as Ls } from "./index-CGSYweTe.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|