@bahmni/clinical-app 0.0.1-dev.458 → 0.0.1-dev.460
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/{ConsultationPage-C1aIivTV.js → ConsultationPage-mP74xC9i.js} +11977 -11977
- package/dist/{DocumentsTable-ClDSnyUa-D9KwRfxp.js → DocumentsTable-CIFLmXxN-D2_KTdd8.js} +35 -35
- package/dist/{FormsTable-Cbe9Shu--BC9jSVar.js → FormsTable-VESfRLut-lMNwe9BR.js} +36 -36
- package/dist/{LNWAZHJI-DLphLK15.js → LNWAZHJI-BE1Huinq.js} +2 -2
- package/dist/{MWZ6AO7Z-__Kovadl.js → MWZ6AO7Z-BXbWyMBb.js} +2 -2
- package/dist/{Observations-foWY-TMm-BqArrqeL.js → Observations-D8l6VsZ7-CZZ_rBX1.js} +8 -8
- package/dist/{YPM2AS64-6Gtyf-P_.js → YPM2AS64-DtZn-EiK.js} +1 -1
- package/dist/{hook-umSu-Yxw.js → hook-PExbaFoV.js} +1 -1
- package/dist/{index-C2qXhQi2.js → index-BcBccOaT.js} +18 -18
- package/dist/{index-TWRT5j83.js → index-Cj30jaBG.js} +3 -3
- package/dist/{index-BHJA9OJs.js → index-CymxuBG-.js} +23966 -23856
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +1 -1
- package/dist/locales/locale_es.json +1 -1
- package/package.json +1 -1
|
@@ -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-CymxuBG-.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-CymxuBG-.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 as s, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-
|
|
2
|
-
import { ci as d, cj as f, ck as e } from "./index-
|
|
1
|
+
import { c as s, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-DtZn-EiK.js";
|
|
2
|
+
import { ci as d, cj as f, ck as e } from "./index-CymxuBG-.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { ci as v, cj as C, ck as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-DtZn-EiK.js";
|
|
2
|
+
import { ci as v, cj as C, ck as e } from "./index-CymxuBG-.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-CymxuBG-.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,4 +1,4 @@
|
|
|
1
|
-
import { cl as we, cm as z, cn as xt, co as B, cj as q, ck as y, cp as Ro, cq as ye, cr as R, cs as _, ct as k, cu as N, cv as A, cw as bs, cx as ir, cy as $e, cz as U, cA as Hn, cB as Vn, cC as dt, cD as D, cE as xs, cF as cn, cG as Be, cH as ws, cI as qt, cJ as zt, cK as $s, cL as Cs, cM as $n, cN as Ss, cO as Nr, cP as Bt, cQ as zo, cR as ks, cS as Es, cT as j, cU as Ur, cV as Ms, cW as Ds, cX as sr, cY as As, cZ as Ts, c_ as zn, c$ as Fs, d0 as Is, d1 as Z, d2 as Ps, d3 as Ls } from "./index-
|
|
1
|
+
import { cl as we, cm as z, cn as xt, co as B, cj as q, ck as y, cp as Ro, cq as ye, cr as R, cs as _, ct as k, cu as N, cv as A, cw as bs, cx as ir, cy as $e, cz as U, cA as Hn, cB as Vn, cC as dt, cD as D, cE as xs, cF as cn, cG as Be, cH as ws, cI as qt, cJ as zt, cK as $s, cL as Cs, cM as $n, cN as Ss, cO as Nr, cP as Bt, cQ as zo, cR as ks, cS as Es, cT as j, cU as Ur, cV as Ms, cW as Ds, cX as sr, cY as As, cZ as Ts, c_ as zn, c$ as Fs, d0 as Is, d1 as Z, d2 as Ps, d3 as Ls } from "./index-CymxuBG-.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { a as g, Z as u, c3 as f, cd as
|
|
2
|
+
import { a as g, Z as u, c3 as f, cd as p, ce as x, cf as _, aX as N, c9 as b } from "./index-CymxuBG-.js";
|
|
3
3
|
import "@tanstack/react-query";
|
|
4
|
-
import { lazy as h, useMemo as t, Suspense as
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
4
|
+
import { lazy as h, useMemo as t, Suspense as L } from "react";
|
|
5
|
+
import { u as C } from "./hook-PExbaFoV.js";
|
|
6
|
+
const E = {
|
|
7
7
|
"org.bahmni.clinical.v2.search": h(
|
|
8
|
-
() => import("./index-
|
|
8
|
+
() => import("./index-Cj30jaBG.js")
|
|
9
9
|
)
|
|
10
|
-
},
|
|
11
|
-
page:
|
|
12
|
-
loading:
|
|
13
|
-
message:
|
|
14
|
-
},
|
|
15
|
-
const { t: i } = g(), { clinicalConfig: o } =
|
|
10
|
+
}, P = "index-module_page__16xxw", S = "index-module_loading__wNI-4", I = "index-module_message__Ib5Iw", l = {
|
|
11
|
+
page: P,
|
|
12
|
+
loading: S,
|
|
13
|
+
message: I
|
|
14
|
+
}, T = () => {
|
|
15
|
+
const { t: i } = g(), { clinicalConfig: o } = C(), { userPrivileges: r } = u(), m = t(
|
|
16
16
|
() => [
|
|
17
17
|
{ id: "home", label: i("HOME_LABEL"), href: f },
|
|
18
18
|
{ id: "clinical", label: i("CLINICAL_LABEL"), isCurrentPage: !0 }
|
|
19
19
|
],
|
|
20
20
|
[i]
|
|
21
21
|
), c = t(
|
|
22
|
-
() =>
|
|
22
|
+
() => p(o?.extensions ?? []),
|
|
23
23
|
[o]
|
|
24
24
|
), d = t(
|
|
25
25
|
() => Array.from(c.entries()).map(([e, a]) => ({
|
|
26
26
|
pointId: e,
|
|
27
|
-
Handler:
|
|
28
|
-
filtered:
|
|
27
|
+
Handler: E[e],
|
|
28
|
+
filtered: x(
|
|
29
29
|
a,
|
|
30
30
|
r
|
|
31
31
|
).filter(
|
|
@@ -37,7 +37,7 @@ const L = {
|
|
|
37
37
|
return /* @__PURE__ */ s(
|
|
38
38
|
_,
|
|
39
39
|
{
|
|
40
|
-
header: /* @__PURE__ */ s(
|
|
40
|
+
header: /* @__PURE__ */ s(b, { breadcrumbItems: m }),
|
|
41
41
|
main: /* @__PURE__ */ s(
|
|
42
42
|
"div",
|
|
43
43
|
{
|
|
@@ -51,10 +51,10 @@ const L = {
|
|
|
51
51
|
id: e,
|
|
52
52
|
"data-testid": `${e}-test-id`,
|
|
53
53
|
children: /* @__PURE__ */ s(
|
|
54
|
-
|
|
54
|
+
L,
|
|
55
55
|
{
|
|
56
56
|
fallback: /* @__PURE__ */ s(
|
|
57
|
-
|
|
57
|
+
N,
|
|
58
58
|
{
|
|
59
59
|
type: "multi",
|
|
60
60
|
className: l.loading
|
|
@@ -81,5 +81,5 @@ const L = {
|
|
|
81
81
|
);
|
|
82
82
|
};
|
|
83
83
|
export {
|
|
84
|
-
|
|
84
|
+
T as default
|
|
85
85
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { a as r, d4 as l, d5 as o, d6 as c, bu as m, bv as b, d7 as g, d8 as
|
|
2
|
+
import { a as r, d4 as l, d5 as o, d6 as c, bu as m, bv as b, d7 as g, d8 as p, d9 as h, aX as u } from "./index-CymxuBG-.js";
|
|
3
3
|
import "@tanstack/react-query";
|
|
4
4
|
import { Suspense as _ } from "react";
|
|
5
5
|
const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", f = "index-module_panel__8VJh2", s = {
|
|
@@ -38,11 +38,11 @@ const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", f =
|
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
40
|
/* @__PURE__ */ e(g, { children: i.map((a) => {
|
|
41
|
-
const d =
|
|
41
|
+
const d = p(
|
|
42
42
|
a.extensionParams?.searchHandler ?? ""
|
|
43
43
|
)?.component;
|
|
44
44
|
return /* @__PURE__ */ e(
|
|
45
|
-
|
|
45
|
+
h,
|
|
46
46
|
{
|
|
47
47
|
id: `${a.id}-panel`,
|
|
48
48
|
className: s.panel,
|