@bahmni/admin-app 0.0.1-dev.446 → 0.0.1-dev.447
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/{AdminDashboard-BYWHODDr.js → AdminDashboard-DERqq7Lh.js} +2 -2
- package/dist/{AuditLog-DkbZYTov.js → AuditLog-_7neDd-v.js} +22 -22
- package/dist/{CsvExport-P2NoRdXq.js → CsvExport-D7rZ6c6u.js} +6 -6
- package/dist/{CsvUpload-D2EBmvar.js → CsvUpload-BFjYxTlJ.js} +1 -1
- package/dist/{DocumentsTable-CSCabXWL-BytY-fAq.js → DocumentsTable-EFrvR1Y7-BJrPT8_r.js} +21 -21
- package/dist/{FormsTable-CxEQWZt3-DLOJyxLU.js → FormsTable-Bbqg3PV1-CrF3A5pi.js} +40 -40
- package/dist/{LNWAZHJI-DK2s1NBB.js → LNWAZHJI-DvrZAbmM.js} +2 -2
- package/dist/{MWZ6AO7Z-EKP2aQt6.js → MWZ6AO7Z-CW0QKSwE.js} +2 -2
- package/dist/{Observations-CAedz2J9-Bo2zz70t.js → Observations-CJiVrL61-CjMEuUvJ.js} +36 -36
- package/dist/{YPM2AS64-Csk9eucm.js → YPM2AS64-DrF_cHRZ.js} +1 -1
- package/dist/{index-Ds_HtIuW.js → index-ClETYuc0.js} +4960 -4907
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { E as o, F as a, L as s, M as N } from "./index-ClETYuc0.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
5
|
const i = () => /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
|
|
6
6
|
a,
|
|
7
7
|
{
|
|
8
|
-
extensionPointId:
|
|
8
|
+
extensionPointId: N,
|
|
9
9
|
appName: s,
|
|
10
10
|
loadingLabelKey: "ADMIN_LOADING_MODULES",
|
|
11
11
|
errorMessageKey: "ADMIN_ERROR_FETCH_CONFIG",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { $ as ee, a0 as te, a1 as se, a2 as K, u as ae, a3 as ne, a4 as re, E as ie, T as oe, a5 as ue, a6 as de, a7 as U, X as V, a8 as le } from "./index-ClETYuc0.js";
|
|
3
3
|
import { useState as l, useRef as C, useEffect as k, useMemo as ce, useCallback as me } from "react";
|
|
4
|
-
import { useQuery as
|
|
4
|
+
import { useQuery as Ee } from "@tanstack/react-query";
|
|
5
5
|
const G = Symbol.for("constructDateFrom");
|
|
6
6
|
function y(e, t) {
|
|
7
7
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && G in e ? e[G](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
@@ -9,15 +9,15 @@ function y(e, t) {
|
|
|
9
9
|
function w(e, t) {
|
|
10
10
|
return y(e, e);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function _e(e, t) {
|
|
13
13
|
const r = w(e), a = r.getFullYear(), i = r.getMonth(), u = y(r, 0);
|
|
14
14
|
return u.setFullYear(a, i + 1, 0), u.setHours(0, 0, 0, 0), u.getDate();
|
|
15
15
|
}
|
|
16
16
|
function fe(e, t, r) {
|
|
17
|
-
const a = w(e), i = a.getFullYear(), u = a.getDate(),
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
return a.setMonth(t, Math.min(u,
|
|
17
|
+
const a = w(e), i = a.getFullYear(), u = a.getDate(), E = y(e, 0);
|
|
18
|
+
E.setFullYear(i, t, 15), E.setHours(0, 0, 0, 0);
|
|
19
|
+
const _ = _e(E);
|
|
20
|
+
return a.setMonth(t, Math.min(u, _)), a;
|
|
21
21
|
}
|
|
22
22
|
function ge(e, t, r) {
|
|
23
23
|
let a = w(e);
|
|
@@ -38,9 +38,9 @@ const Le = (e, t) => {
|
|
|
38
38
|
startTime: "00:00",
|
|
39
39
|
username: "",
|
|
40
40
|
patientId: ""
|
|
41
|
-
}), [r, a] = l(0), [i, u] = l(0), [
|
|
41
|
+
}), [r, a] = l(0), [i, u] = l(0), [E, _] = l([]), [R, p] = l(null), [b, f] = l(!1), [O, g] = l(!1), [F, M] = l(1), T = C(1), s = (c) => {
|
|
42
42
|
T.current = c, M(c);
|
|
43
|
-
}, o = C(0), [n, j] = l(null), B = C(null), { data: N, isLoading: X, isFetching: L, isError: z } =
|
|
43
|
+
}, o = C(0), [n, j] = l(null), B = C(null), { data: N, isLoading: X, isFetching: L, isError: z } = Ee({
|
|
44
44
|
queryKey: ["auditLogs", n?.requestId],
|
|
45
45
|
queryFn: () => te(n.params),
|
|
46
46
|
enabled: !!n,
|
|
@@ -48,14 +48,14 @@ const Le = (e, t) => {
|
|
|
48
48
|
// (and audit logs must always be fetched fresh). Drop entries as soon as
|
|
49
49
|
// they become inactive instead of retaining them for the default gcTime.
|
|
50
50
|
gcTime: 0
|
|
51
|
-
}), I = (c, H, m, D, h,
|
|
51
|
+
}), I = (c, H, m, D, h, W) => {
|
|
52
52
|
o.current += 1, j({
|
|
53
53
|
action: c,
|
|
54
54
|
params: H,
|
|
55
55
|
alwaysReplace: m,
|
|
56
56
|
defaultFirstIndex: D,
|
|
57
57
|
defaultLastIndex: h,
|
|
58
|
-
emptyMessageKey:
|
|
58
|
+
emptyMessageKey: W,
|
|
59
59
|
requestId: o.current
|
|
60
60
|
});
|
|
61
61
|
}, A = Le(e.startDate, e.startTime), Q = () => {
|
|
@@ -88,7 +88,7 @@ const Le = (e, t) => {
|
|
|
88
88
|
Y
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
-
},
|
|
91
|
+
}, $ = () => {
|
|
92
92
|
if (!L) {
|
|
93
93
|
if (!v()) {
|
|
94
94
|
x();
|
|
@@ -122,7 +122,7 @@ const Le = (e, t) => {
|
|
|
122
122
|
0,
|
|
123
123
|
Te
|
|
124
124
|
);
|
|
125
|
-
},
|
|
125
|
+
}, J = () => {
|
|
126
126
|
L || (t({
|
|
127
127
|
startDate: null,
|
|
128
128
|
startTime: "",
|
|
@@ -137,7 +137,7 @@ const Le = (e, t) => {
|
|
|
137
137
|
B.current = n.requestId;
|
|
138
138
|
const c = !!n.params.defaultView, m = (c ? N : [...N].reverse()).map(se), D = m.length === K;
|
|
139
139
|
if (m.length)
|
|
140
|
-
if (
|
|
140
|
+
if (_(m), p(null), a(m[0].auditLogId), u(m[m.length - 1].auditLogId), c)
|
|
141
141
|
g(!1), f(D), s(1);
|
|
142
142
|
else if (n.action === "next")
|
|
143
143
|
g(!0), f(D), s(T.current + 1);
|
|
@@ -147,11 +147,11 @@ const Le = (e, t) => {
|
|
|
147
147
|
g(h > 1), s(h);
|
|
148
148
|
}
|
|
149
149
|
else
|
|
150
|
-
n.alwaysReplace &&
|
|
150
|
+
n.alwaysReplace && _([]), p(n.emptyMessageKey), a(n.defaultFirstIndex), u(n.defaultLastIndex), c ? (f(!1), g(!1), s(1)) : n.action === "next" ? f(!1) : g(!1);
|
|
151
151
|
}, [N, n]), {
|
|
152
152
|
filters: e,
|
|
153
153
|
setFilters: t,
|
|
154
|
-
logs:
|
|
154
|
+
logs: E,
|
|
155
155
|
isLoading: X || L,
|
|
156
156
|
isFetching: L,
|
|
157
157
|
isError: z,
|
|
@@ -162,9 +162,9 @@ const Le = (e, t) => {
|
|
|
162
162
|
hasPrevious: O,
|
|
163
163
|
currentPageNumber: F,
|
|
164
164
|
next: Z,
|
|
165
|
-
prev:
|
|
165
|
+
prev: $,
|
|
166
166
|
runReport: x,
|
|
167
|
-
reset:
|
|
167
|
+
reset: J
|
|
168
168
|
};
|
|
169
169
|
}, pe = "AuditLog-module_page__-FKzd", Ne = "AuditLog-module_filters__DA4tQ", Ae = "AuditLog-module_filterRow__x6DqE", P = {
|
|
170
170
|
page: pe,
|
|
@@ -177,8 +177,8 @@ const Le = (e, t) => {
|
|
|
177
177
|
logs: a,
|
|
178
178
|
isLoading: i,
|
|
179
179
|
isFetching: u,
|
|
180
|
-
isError:
|
|
181
|
-
emptyMessageKey:
|
|
180
|
+
isError: E,
|
|
181
|
+
emptyMessageKey: _,
|
|
182
182
|
hasNext: R,
|
|
183
183
|
hasPrevious: p,
|
|
184
184
|
currentPageNumber: b,
|
|
@@ -329,8 +329,8 @@ const Le = (e, t) => {
|
|
|
329
329
|
dataTestId: "audit-log-table",
|
|
330
330
|
loading: i,
|
|
331
331
|
renderCell: T,
|
|
332
|
-
emptyStateMessage:
|
|
333
|
-
errorStateMessage:
|
|
332
|
+
emptyStateMessage: _ ? e(_) : void 0,
|
|
333
|
+
errorStateMessage: E ? e("ADMIN_ERROR_FETCH_CONFIG") : null,
|
|
334
334
|
pagination: {
|
|
335
335
|
mode: "cursor",
|
|
336
336
|
pageSize: K,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { u as A, z as M,
|
|
2
|
+
import { u as A, z as M, N as R, O, P as h, Q as P, S as g, E as V, T as D, V as f, X as x, Z as b } from "./index-ClETYuc0.js";
|
|
3
3
|
import { useState as E, useMemo as y } from "react";
|
|
4
4
|
import { useQuery as L, useMutation as X } from "@tanstack/react-query";
|
|
5
|
-
const v = "CsvExport-module_tile__yBrLM",
|
|
5
|
+
const v = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", H = "CsvExport-module_form__w-cN-", U = "CsvExport-module_search__G82i7", r = {
|
|
6
6
|
tile: v,
|
|
7
|
-
title:
|
|
8
|
-
form:
|
|
7
|
+
title: B,
|
|
8
|
+
form: H,
|
|
9
9
|
search: U
|
|
10
10
|
}, z = 300, S = 2, _ = 5e3, G = "custom:(uuid,setMembers:(uuid))", q = () => {
|
|
11
11
|
const { t } = A(), { addNotification: i } = M(), [p, C] = E(""), [s, c] = E(
|
|
@@ -65,8 +65,8 @@ const v = "CsvExport-module_tile__yBrLM", H = "CsvExport-module_title__epZnI", B
|
|
|
65
65
|
o.mutate(s);
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
return /* @__PURE__ */ n(
|
|
69
|
-
|
|
68
|
+
return /* @__PURE__ */ n(V, { breadcrumbLabel: t("BREADCRUMB_CSV_EXPORT"), children: /* @__PURE__ */ d(
|
|
69
|
+
D,
|
|
70
70
|
{
|
|
71
71
|
id: "admin-csv-export-page",
|
|
72
72
|
"data-testid": "admin-csv-export-page-test-id",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as d, jsxs as h, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { d as x, u as G, z as
|
|
2
|
+
import { d as x, u as G, z as J, J as W, Y as X, h as Z, I as ee, a as te } from "./index-ClETYuc0.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as l, useCallback as _, useEffect as
|
|
4
|
+
import { useState as l, useCallback as _, useEffect as D, useMemo as p } from "react";
|
|
5
5
|
const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", de = "DocumentsTable-module_documentViewerContainer__F5m8D", re = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", r = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
@@ -33,12 +33,12 @@ const Te = [
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
|
-
], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [],
|
|
36
|
+
], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ie = ({ config: a, encounterUuids: E }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), g = x(), { t: n } = G(), { addNotification: L } =
|
|
41
|
+
), g = x(), { t: n } = G(), { addNotification: L } = J(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
43
|
}, []), H = _(() => {
|
|
44
44
|
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
@@ -53,24 +53,24 @@ const Te = [
|
|
|
53
53
|
u
|
|
54
54
|
],
|
|
55
55
|
enabled: !!g,
|
|
56
|
-
queryFn: () =>
|
|
56
|
+
queryFn: () => W(
|
|
57
57
|
g,
|
|
58
58
|
E,
|
|
59
59
|
u,
|
|
60
60
|
f
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
D(() => {
|
|
64
64
|
i && A(i.total);
|
|
65
|
-
}, [i]),
|
|
65
|
+
}, [i]), D(() => {
|
|
66
66
|
C(1), A(void 0);
|
|
67
|
-
}, [g]),
|
|
67
|
+
}, [g]), D(() => {
|
|
68
68
|
y && L({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: b?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [y, b, L, n]),
|
|
73
|
+
}, [y, b, L, n]), D(() => {
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
@@ -82,8 +82,8 @@ const Te = [
|
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
84
|
})).ok || t.add(c);
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
85
|
+
} catch (N) {
|
|
86
|
+
N instanceof Error && N.name !== "AbortError" && t.add(c);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
e.signal.aborted || O(t);
|
|
@@ -94,15 +94,15 @@ const Te = [
|
|
|
94
94
|
t !== u ? (V(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
96
96
|
[u]
|
|
97
|
-
),
|
|
97
|
+
), I = p(
|
|
98
98
|
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
),
|
|
101
|
-
() =>
|
|
100
|
+
), j = p(() => [...i?.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), [i]), P = p(() => ie(I, n), [I, n]), K = p(
|
|
101
|
+
() => I.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "attachments"
|
|
104
104
|
})),
|
|
105
|
-
[
|
|
105
|
+
[I]
|
|
106
106
|
), T = p(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
@@ -141,12 +141,12 @@ const Te = [
|
|
|
141
141
|
/* @__PURE__ */ d("div", { "data-testid": "documents-table", children: /* @__PURE__ */ d(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
144
|
-
headers:
|
|
144
|
+
headers: P,
|
|
145
145
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
146
|
-
rows:
|
|
146
|
+
rows: j,
|
|
147
147
|
loading: q,
|
|
148
148
|
errorStateMessage: y ? b?.message : null,
|
|
149
|
-
sortable:
|
|
149
|
+
sortable: K,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
151
151
|
renderCell: Q,
|
|
152
152
|
className: r.documentsTableBody,
|
|
@@ -169,8 +169,8 @@ const Te = [
|
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
171
|
children: /* @__PURE__ */ d("div", { className: r.documentViewerContainer, children: T.map((e, t) => {
|
|
172
|
-
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""),
|
|
173
|
-
return m === "#" ||
|
|
172
|
+
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), N = $.has(t);
|
|
173
|
+
return m === "#" || N ? /* @__PURE__ */ h(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: r.attachmentError,
|
|
@@ -223,5 +223,5 @@ const Te = [
|
|
|
223
223
|
] });
|
|
224
224
|
};
|
|
225
225
|
export {
|
|
226
|
-
|
|
226
|
+
Ie as default
|
|
227
227
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { u as ie, d as de, y as le, k as me,
|
|
1
|
+
import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { u as ie, d as de, y as le, k as me, H as ue, b as ce, m as fe, c as ye, w as he, e as Ne, f as ge, R as Te, h as pe, g as V, i as z, Y as Ie, I as K, U as Oe, W as be, a as Ae, A as Ee, j as _e } from "./index-ClETYuc0.js";
|
|
3
3
|
import { useQueryClient as Re, useQuery as A } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as Y, useMemo as i, useCallback as d } from "react";
|
|
5
5
|
const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_modalHeading__wnTmA", Le = "FormsTable-module_customAccordianItem__isszs", g = {
|
|
6
6
|
formsTableBody: Ce,
|
|
7
7
|
modalHeading: ve,
|
|
@@ -9,28 +9,28 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
9
9
|
}, Ue = "startConsultation", Me = ({
|
|
10
10
|
episodeOfCareUuids: E,
|
|
11
11
|
encounterUuids: l,
|
|
12
|
-
config:
|
|
13
|
-
disableActions:
|
|
12
|
+
config: $,
|
|
13
|
+
disableActions: j = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: o } = ie(), m = de(), [T, _] =
|
|
17
|
-
numberOfVisits:
|
|
18
|
-
hideThumbnail:
|
|
16
|
+
const { t: o } = ie(), m = de(), [T, _] = Y(!1), [t, R] = Y(null), {
|
|
17
|
+
numberOfVisits: x,
|
|
18
|
+
hideThumbnail: Q = !1,
|
|
19
19
|
forms: h
|
|
20
|
-
} =
|
|
20
|
+
} = $ ?? {}, G = le(
|
|
21
21
|
_e.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: N } = me(), p =
|
|
22
|
+
), { userPrivileges: N } = me(), p = G && !j && !!y, C = ue(
|
|
23
23
|
E,
|
|
24
24
|
l
|
|
25
25
|
), P = Re(), {
|
|
26
26
|
data: v = [],
|
|
27
27
|
isLoading: L,
|
|
28
28
|
isError: U,
|
|
29
|
-
error:
|
|
30
|
-
refetch:
|
|
29
|
+
error: W,
|
|
30
|
+
refetch: J
|
|
31
31
|
} = A({
|
|
32
32
|
queryKey: ["forms", m, E],
|
|
33
|
-
queryFn: () => ce(m, void 0,
|
|
33
|
+
queryFn: () => ce(m, void 0, x),
|
|
34
34
|
enabled: !!m && !C
|
|
35
35
|
}), B = i(() => {
|
|
36
36
|
let e = v;
|
|
@@ -59,10 +59,10 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
59
59
|
(e) => !y || e.encounterUuid !== y ? !1 : D(e.formName),
|
|
60
60
|
[y, D]
|
|
61
61
|
), {
|
|
62
|
-
data:
|
|
62
|
+
data: I,
|
|
63
63
|
isLoading: X,
|
|
64
64
|
isError: Z,
|
|
65
|
-
error:
|
|
65
|
+
error: O
|
|
66
66
|
} = A({
|
|
67
67
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
68
68
|
queryFn: () => ye(t.encounterUuid),
|
|
@@ -70,14 +70,14 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
70
70
|
});
|
|
71
71
|
he(
|
|
72
72
|
(e) => {
|
|
73
|
-
e.patientUUID === m && (
|
|
73
|
+
e.patientUUID === m && (J(), P.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
74
|
},
|
|
75
75
|
[m]
|
|
76
76
|
);
|
|
77
|
-
const ee = i(() => !
|
|
78
|
-
if (
|
|
79
|
-
return Te(
|
|
80
|
-
}, [
|
|
77
|
+
const ee = i(() => !I?.entry || !t?.formName ? [] : I.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Ne(e) ? ge(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [I, t?.formName]), re = i(() => {
|
|
78
|
+
if (O)
|
|
79
|
+
return Te(O).message;
|
|
80
|
+
}, [O]), c = i(
|
|
81
81
|
() => [
|
|
82
82
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
83
83
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
@@ -124,7 +124,7 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
124
124
|
R(e), _(!0);
|
|
125
125
|
}, []), w = d(() => {
|
|
126
126
|
_(!1), R(null);
|
|
127
|
-
}, []),
|
|
127
|
+
}, []), b = d((e) => {
|
|
128
128
|
globalThis.dispatchEvent(
|
|
129
129
|
new CustomEvent(Ue, {
|
|
130
130
|
detail: {
|
|
@@ -136,56 +136,56 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
136
136
|
}
|
|
137
137
|
})
|
|
138
138
|
);
|
|
139
|
-
}, []),
|
|
139
|
+
}, []), H = d(
|
|
140
140
|
(e, r) => {
|
|
141
141
|
switch (r) {
|
|
142
142
|
case "recordedOn":
|
|
143
|
-
return /* @__PURE__ */ n(
|
|
143
|
+
return /* @__PURE__ */ n(Ie, { onClick: () => k(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
|
+
V,
|
|
149
149
|
{
|
|
150
150
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
151
151
|
kind: "ghost",
|
|
152
152
|
size: "sm",
|
|
153
153
|
testId: `edit-form-${e.encounterUuid}`,
|
|
154
|
-
onClick: () =>
|
|
155
|
-
children: /* @__PURE__ */ n(
|
|
154
|
+
onClick: () => b(e),
|
|
155
|
+
children: /* @__PURE__ */ n(z, {})
|
|
156
156
|
}
|
|
157
157
|
) : null;
|
|
158
158
|
default:
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
[k,
|
|
162
|
+
[k, b, u, o]
|
|
163
163
|
);
|
|
164
|
-
return /* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ q(ne, { children: [
|
|
165
165
|
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L || U || M.length === 0 || C ? /* @__PURE__ */ n(
|
|
166
|
-
|
|
166
|
+
K,
|
|
167
167
|
{
|
|
168
168
|
headers: oe,
|
|
169
169
|
ariaLabel: o("FORMS_HEADING"),
|
|
170
170
|
rows: [],
|
|
171
171
|
loading: L,
|
|
172
|
-
errorStateMessage: U ?
|
|
172
|
+
errorStateMessage: U ? W?.message : void 0,
|
|
173
173
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
174
|
-
renderCell:
|
|
174
|
+
renderCell: H,
|
|
175
175
|
className: g.formsTableBody,
|
|
176
176
|
dataTestId: "forms-table"
|
|
177
177
|
}
|
|
178
|
-
) : /* @__PURE__ */ n(
|
|
178
|
+
) : /* @__PURE__ */ n(Oe, { align: "start", children: M.map((e, r) => {
|
|
179
179
|
const { formName: a, records: s } = e, f = ae(s);
|
|
180
180
|
return /* @__PURE__ */ n(
|
|
181
|
-
|
|
181
|
+
be,
|
|
182
182
|
{
|
|
183
183
|
title: a,
|
|
184
184
|
className: g.customAccordianItem,
|
|
185
185
|
testId: `accordian-title-${a}`,
|
|
186
186
|
open: r === 0,
|
|
187
187
|
children: /* @__PURE__ */ n(
|
|
188
|
-
|
|
188
|
+
K,
|
|
189
189
|
{
|
|
190
190
|
headers: f,
|
|
191
191
|
ariaLabel: o("FORMS_HEADING"),
|
|
@@ -194,7 +194,7 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
194
194
|
errorStateMessage: "",
|
|
195
195
|
sortable: te,
|
|
196
196
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
197
|
-
renderCell:
|
|
197
|
+
renderCell: H,
|
|
198
198
|
className: g.formsTableBody,
|
|
199
199
|
dataTestId: `forms-table-${a}`
|
|
200
200
|
}
|
|
@@ -210,19 +210,19 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
210
210
|
portalId: "main-display-area",
|
|
211
211
|
open: T,
|
|
212
212
|
onRequestClose: w,
|
|
213
|
-
modalHeading: /* @__PURE__ */
|
|
213
|
+
modalHeading: /* @__PURE__ */ q("div", { className: g.modalHeading, children: [
|
|
214
214
|
/* @__PURE__ */ n("span", { children: t.formName }),
|
|
215
215
|
p && u(t) && /* @__PURE__ */ n(
|
|
216
|
-
|
|
216
|
+
V,
|
|
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
|
-
w(),
|
|
223
|
+
w(), b(t);
|
|
224
224
|
},
|
|
225
|
-
children: /* @__PURE__ */ n(
|
|
225
|
+
children: /* @__PURE__ */ n(z, {})
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
@@ -239,7 +239,7 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
239
239
|
errorMessage: re,
|
|
240
240
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
241
241
|
testIdPrefix: t.formName,
|
|
242
|
-
hideThumbnail:
|
|
242
|
+
hideThumbnail: Q,
|
|
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 { a9 as d, aa as f, ab as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DrF_cHRZ.js";
|
|
2
|
+
import { a9 as d, aa as f, ab as e } from "./index-ClETYuc0.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 { a9 as v, aa as C, ab 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-DrF_cHRZ.js";
|
|
2
|
+
import { a9 as v, aa as C, ab as e } from "./index-ClETYuc0.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|