@bahmni/admin-app 0.0.1-dev.440 → 0.0.1-dev.441
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-nuKCCgKT.js → AdminDashboard-C2YLAyRD.js} +1 -1
- package/dist/App.d.ts.map +1 -1
- package/dist/{AuditLog-C-HT6GQj.js → AuditLog-BYlHkWNg.js} +11 -11
- package/dist/CsvExport-BgJK-WCC.js +122 -0
- package/dist/{CsvUpload-Cg6Hj0up.js → CsvUpload-D7iOeVhg.js} +1 -1
- package/dist/{DocumentsTable-CirHKvw9-CdwYTIVR.js → DocumentsTable-BCWUH3WY-B9REAVh7.js} +1 -1
- package/dist/{FormsTable-CqUGhZ65-U61sotfK.js → FormsTable-Bb-cDsSI-CQjE5XbB.js} +19 -19
- package/dist/{LNWAZHJI-arAZ54bp.js → LNWAZHJI-BoBLdPIu.js} +2 -2
- package/dist/{MWZ6AO7Z-TgUNgqEY.js → MWZ6AO7Z-Cg0Kt-G9.js} +5 -5
- package/dist/{Observations-BhAU90jX-BxHxuK72.js → Observations-B5TN5tfi-7m0gXHuQ.js} +14 -14
- package/dist/{YPM2AS64-C_XJnyBg.js → YPM2AS64-DsTQkrYO.js} +138 -138
- package/dist/{index-BdGZxaWH.js → index-C1nJC-ZZ.js} +23548 -23479
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +13 -0
- package/dist/locales/locale_es.json +13 -0
- package/dist/pages/CsvExport.d.ts +3 -0
- package/dist/pages/CsvExport.d.ts.map +1 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { A as o, p as a, r as s, t as r } from "./index-
|
|
2
|
+
import { A as o, p as a, r as s, t as r } from "./index-C1nJC-ZZ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
5
|
const i = () => /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
|
package/dist/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,GAAG,4CA2ClB;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as l, useRef as
|
|
2
|
+
import { _ as ee, a0 as te, a1 as se, a2 as K, u as ae, a3 as ne, a4 as re, A as ie, S as oe, a5 as ue, a6 as de, a7 as U, U as H, a8 as le } from "./index-C1nJC-ZZ.js";
|
|
3
|
+
import { useState as l, useRef as C, useEffect as k, useMemo as ce, useCallback as me } from "react";
|
|
4
4
|
import { useQuery as _e } from "@tanstack/react-query";
|
|
5
5
|
const G = Symbol.for("constructDateFrom");
|
|
6
6
|
function y(e, t) {
|
|
@@ -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), [_, E] = l([]), [R, p] = l(null), [b, f] = l(!1), [F, g] = l(!1), [O, M] = l(1), T =
|
|
41
|
+
}), [r, a] = l(0), [i, u] = l(0), [_, E] = l([]), [R, p] = l(null), [b, f] = l(!1), [F, g] = l(!1), [O, M] = l(1), T = C(1), s = (c) => {
|
|
42
42
|
T.current = c, M(c);
|
|
43
|
-
}, o =
|
|
43
|
+
}, o = C(0), [n, j] = l(null), B = C(null), { data: N, isLoading: z, isFetching: L, isError: Q } = _e({
|
|
44
44
|
queryKey: ["auditLogs", n?.requestId],
|
|
45
45
|
queryFn: () => te(n.params),
|
|
46
46
|
enabled: !!n,
|
|
@@ -130,9 +130,9 @@ const Le = (e, t) => {
|
|
|
130
130
|
patientId: ""
|
|
131
131
|
}), I("init", { defaultView: !0 }, !0, 0, 0, q));
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return k(() => {
|
|
134
134
|
X();
|
|
135
|
-
}, []),
|
|
135
|
+
}, []), k(() => {
|
|
136
136
|
if (!n || N === void 0 || B.current === n.requestId) return;
|
|
137
137
|
B.current = n.requestId;
|
|
138
138
|
const c = !!n.params.defaultView, m = (c ? N : [...N].reverse()).map(se), D = m.length === K;
|
|
@@ -256,7 +256,7 @@ const Le = (e, t) => {
|
|
|
256
256
|
t.startDate?.getTime() ?? "empty"
|
|
257
257
|
),
|
|
258
258
|
/* @__PURE__ */ d(
|
|
259
|
-
|
|
259
|
+
U,
|
|
260
260
|
{
|
|
261
261
|
id: "audit-log-start-time",
|
|
262
262
|
type: "time",
|
|
@@ -270,7 +270,7 @@ const Le = (e, t) => {
|
|
|
270
270
|
}
|
|
271
271
|
),
|
|
272
272
|
/* @__PURE__ */ d(
|
|
273
|
-
|
|
273
|
+
U,
|
|
274
274
|
{
|
|
275
275
|
id: "audit-log-username",
|
|
276
276
|
labelText: e("USERNAME_FILTER_LABEL"),
|
|
@@ -284,7 +284,7 @@ const Le = (e, t) => {
|
|
|
284
284
|
}
|
|
285
285
|
),
|
|
286
286
|
/* @__PURE__ */ d(
|
|
287
|
-
|
|
287
|
+
U,
|
|
288
288
|
{
|
|
289
289
|
id: "audit-log-patient-id",
|
|
290
290
|
labelText: e("PATIENT_ID_FILTER_LABEL"),
|
|
@@ -298,7 +298,7 @@ const Le = (e, t) => {
|
|
|
298
298
|
}
|
|
299
299
|
),
|
|
300
300
|
/* @__PURE__ */ d(
|
|
301
|
-
|
|
301
|
+
H,
|
|
302
302
|
{
|
|
303
303
|
kind: "tertiary",
|
|
304
304
|
onClick: O,
|
|
@@ -308,7 +308,7 @@ const Le = (e, t) => {
|
|
|
308
308
|
}
|
|
309
309
|
),
|
|
310
310
|
/* @__PURE__ */ d(
|
|
311
|
-
|
|
311
|
+
H,
|
|
312
312
|
{
|
|
313
313
|
kind: "primary",
|
|
314
314
|
onClick: g,
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { u as M, z as N, x as R, y as O, C as h, M as P, O as g, A as V, S as x, T as D, U as f, V as y } from "./index-C1nJC-ZZ.js";
|
|
3
|
+
import { useState as E, useMemo as b } from "react";
|
|
4
|
+
import { useQuery as L, useMutation as v } from "@tanstack/react-query";
|
|
5
|
+
const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U = "CsvExport-module_form__w-cN-", z = "CsvExport-module_search__G82i7", r = {
|
|
6
|
+
tile: X,
|
|
7
|
+
title: B,
|
|
8
|
+
form: U,
|
|
9
|
+
search: z
|
|
10
|
+
}, G = 300, S = 2, _ = 5e3, H = "custom:(uuid,setMembers:(uuid))", K = () => {
|
|
11
|
+
const { t } = M(), { addNotification: i } = N(), [p, C] = E(""), [s, c] = E(
|
|
12
|
+
null
|
|
13
|
+
), a = R(p.trim(), G), { data: l = [] } = L({
|
|
14
|
+
queryKey: ["csvExportConceptSearch", a],
|
|
15
|
+
queryFn: () => O(a),
|
|
16
|
+
enabled: a.length >= S && a !== s?.name,
|
|
17
|
+
// Keep prior options visible while the next term loads, but not once the input is too short to search
|
|
18
|
+
placeholderData: (e) => a.length >= S ? e : void 0
|
|
19
|
+
}), T = b(
|
|
20
|
+
() => l.flatMap(
|
|
21
|
+
(e) => e.name?.name ? [{ uuid: e.uuid, name: e.name.name }] : []
|
|
22
|
+
),
|
|
23
|
+
[l]
|
|
24
|
+
), o = v({
|
|
25
|
+
mutationFn: async (e) => (await P(e.uuid, H)).setMembers?.length ? g(e.name) : null,
|
|
26
|
+
onSuccess: (e, u) => {
|
|
27
|
+
const m = u.name;
|
|
28
|
+
if (!e || e.size === 0) {
|
|
29
|
+
i({
|
|
30
|
+
type: "error",
|
|
31
|
+
title: t("ADMIN_CSV_EXPORT_NO_DATA_TITLE"),
|
|
32
|
+
message: t("ADMIN_CSV_EXPORT_NO_DATA_MESSAGE"),
|
|
33
|
+
timeout: _
|
|
34
|
+
});
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
h(e, `${m}.zip`), i({
|
|
38
|
+
type: "success",
|
|
39
|
+
title: t("ADMIN_CSV_EXPORT_SUCCESS_TITLE"),
|
|
40
|
+
message: t("ADMIN_CSV_EXPORT_SUCCESS_MESSAGE", { conceptName: m }),
|
|
41
|
+
timeout: _
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
onError: (e) => {
|
|
45
|
+
i({
|
|
46
|
+
type: "error",
|
|
47
|
+
title: t("ADMIN_CSV_EXPORT_ERROR_TITLE"),
|
|
48
|
+
message: e.message,
|
|
49
|
+
timeout: _
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}), I = (e) => {
|
|
53
|
+
C(e), s && e !== s.name && c(null);
|
|
54
|
+
}, A = (e) => {
|
|
55
|
+
if (e.preventDefault(), !o.isPending) {
|
|
56
|
+
if (!s) {
|
|
57
|
+
i({
|
|
58
|
+
type: "error",
|
|
59
|
+
title: t("ADMIN_CSV_EXPORT_SELECT_CONCEPT_TITLE"),
|
|
60
|
+
message: t("ADMIN_CSV_EXPORT_SELECT_CONCEPT_MESSAGE"),
|
|
61
|
+
timeout: _
|
|
62
|
+
});
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
o.mutate(s);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ n(V, { breadcrumbLabel: t("BREADCRUMB_CSV_EXPORT"), children: /* @__PURE__ */ d(
|
|
69
|
+
x,
|
|
70
|
+
{
|
|
71
|
+
id: "admin-csv-export-page",
|
|
72
|
+
"data-testid": "admin-csv-export-page-test-id",
|
|
73
|
+
"aria-label": "CSV Export Page",
|
|
74
|
+
className: r.tile,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ n("h2", { className: r.title, children: t("ADMIN_CSV_EXPORT_TITLE") }),
|
|
77
|
+
/* @__PURE__ */ d("form", { className: r.form, onSubmit: A, noValidate: !0, children: [
|
|
78
|
+
/* @__PURE__ */ n("div", { className: r.search, children: /* @__PURE__ */ n(
|
|
79
|
+
D,
|
|
80
|
+
{
|
|
81
|
+
id: "csv-export-concept-search",
|
|
82
|
+
"data-testid": "csv-export-concept-search-test-id",
|
|
83
|
+
titleText: "",
|
|
84
|
+
placeholder: t("ADMIN_CSV_EXPORT_SEARCH_PLACEHOLDER"),
|
|
85
|
+
"aria-label": t("ADMIN_CSV_EXPORT_SEARCH_ARIA_LABEL"),
|
|
86
|
+
items: T,
|
|
87
|
+
itemToString: (e) => e?.name ?? "",
|
|
88
|
+
selectedItem: s,
|
|
89
|
+
onChange: ({ selectedItem: e }) => c(
|
|
90
|
+
typeof e == "object" ? e ?? null : null
|
|
91
|
+
),
|
|
92
|
+
onInputChange: I,
|
|
93
|
+
allowCustomValue: !0,
|
|
94
|
+
disabled: o.isPending,
|
|
95
|
+
size: "md"
|
|
96
|
+
}
|
|
97
|
+
) }),
|
|
98
|
+
/* @__PURE__ */ n(
|
|
99
|
+
f,
|
|
100
|
+
{
|
|
101
|
+
type: "submit",
|
|
102
|
+
kind: "primary",
|
|
103
|
+
size: "md",
|
|
104
|
+
testId: "csv-export-button-test-id",
|
|
105
|
+
disabled: o.isPending,
|
|
106
|
+
children: o.isPending ? /* @__PURE__ */ n(
|
|
107
|
+
y,
|
|
108
|
+
{
|
|
109
|
+
description: t("ADMIN_CSV_EXPORT_IN_PROGRESS"),
|
|
110
|
+
testId: "csv-export-loading-test-id"
|
|
111
|
+
}
|
|
112
|
+
) : t("ADMIN_CSV_EXPORT_BUTTON")
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
] })
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
) });
|
|
119
|
+
};
|
|
120
|
+
export {
|
|
121
|
+
K as CsvExport
|
|
122
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as d, jsxs as h, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { d as G, u as W, z as Y, P as J, s as X, h as Z, $ as ee, a as te } from "./index-
|
|
2
|
+
import { d as G, u as W, z as Y, P as J, s as X, h as Z, $ as ee, a as te } from "./index-C1nJC-ZZ.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as I, 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 = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
-
import { u as de, d as ie, v as le, k as me, H as ue, B as ce, b as fe, D as ye, w as Ne, N as he, c as ge, R as Te, h as pe, L as V, e as $, s as Oe, $ as K, W as be, q as Ie, a as Ee, f as _e, g as Ae } from "./index-
|
|
2
|
+
import { u as de, d as ie, v as le, k as me, H as ue, B as ce, b as fe, D as ye, w as Ne, N as he, c as ge, R as Te, h as pe, L as V, e as $, s as Oe, $ as K, W as be, q as Ie, a as Ee, f as _e, g as Ae } from "./index-C1nJC-ZZ.js";
|
|
3
3
|
import { useQueryClient as ve, useQuery as E } from "@tanstack/react-query";
|
|
4
4
|
import { useState as j, useMemo as d, useCallback as i } from "react";
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
7
|
-
modalHeading:
|
|
8
|
-
customAccordianItem:
|
|
5
|
+
const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_modalHeading__wnTmA", Re = "FormsTable-module_customAccordianItem__isszs", g = {
|
|
6
|
+
formsTableBody: Be,
|
|
7
|
+
modalHeading: Le,
|
|
8
|
+
customAccordianItem: Re
|
|
9
9
|
}, Ce = "startConsultation", Me = ({
|
|
10
10
|
episodeOfCareUuids: _,
|
|
11
11
|
encounterUuids: l,
|
|
@@ -19,27 +19,27 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
|
|
|
19
19
|
forms: N
|
|
20
20
|
} = x ?? {}, W = le(
|
|
21
21
|
Ae.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: h } = me(), p = W && !z && !!y,
|
|
22
|
+
), { userPrivileges: h } = me(), p = W && !z && !!y, B = ue(
|
|
23
23
|
_,
|
|
24
24
|
l
|
|
25
25
|
), P = ve(), {
|
|
26
|
-
data:
|
|
27
|
-
isLoading:
|
|
26
|
+
data: L = [],
|
|
27
|
+
isLoading: R,
|
|
28
28
|
isError: C,
|
|
29
29
|
error: Y,
|
|
30
30
|
refetch: J
|
|
31
31
|
} = E({
|
|
32
32
|
queryKey: ["forms", m, _],
|
|
33
33
|
queryFn: () => ce(m, void 0, Q),
|
|
34
|
-
enabled: !!m && !
|
|
34
|
+
enabled: !!m && !B
|
|
35
35
|
}), F = d(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = L;
|
|
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
|
-
}, [
|
|
42
|
+
}, [L, l, N]), { data: D = [] } = E({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => fe()
|
|
45
45
|
}), U = i(
|
|
@@ -120,9 +120,9 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
|
|
|
120
120
|
)
|
|
121
121
|
})
|
|
122
122
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
|
-
}, [F, o]),
|
|
123
|
+
}, [F, o]), k = i((e) => {
|
|
124
124
|
v(e), A(!0);
|
|
125
|
-
}, []),
|
|
125
|
+
}, []), w = i(() => {
|
|
126
126
|
A(!1), v(null);
|
|
127
127
|
}, []), I = i((e) => {
|
|
128
128
|
globalThis.dispatchEvent(
|
|
@@ -140,7 +140,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "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: () => k(e), children: e.recordedOn });
|
|
144
144
|
case "recordedBy":
|
|
145
145
|
return e.recordedBy;
|
|
146
146
|
case "actions":
|
|
@@ -159,16 +159,16 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
|
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
[
|
|
162
|
+
[k, I, u, o]
|
|
163
163
|
);
|
|
164
164
|
return /* @__PURE__ */ q(ne, { children: [
|
|
165
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
165
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: R || C || M.length === 0 || B ? /* @__PURE__ */ n(
|
|
166
166
|
K,
|
|
167
167
|
{
|
|
168
168
|
headers: oe,
|
|
169
169
|
ariaLabel: o("FORMS_HEADING"),
|
|
170
170
|
rows: [],
|
|
171
|
-
loading:
|
|
171
|
+
loading: R,
|
|
172
172
|
errorStateMessage: C ? Y?.message : void 0,
|
|
173
173
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
174
174
|
renderCell: H,
|
|
@@ -209,7 +209,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
|
|
|
209
209
|
id: "modalIdForActionAreaLayout",
|
|
210
210
|
portalId: "main-display-area",
|
|
211
211
|
open: T,
|
|
212
|
-
onRequestClose:
|
|
212
|
+
onRequestClose: w,
|
|
213
213
|
modalHeading: /* @__PURE__ */ q("div", { className: g.modalHeading, children: [
|
|
214
214
|
/* @__PURE__ */ n("span", { children: t.formName }),
|
|
215
215
|
p && u(t) && /* @__PURE__ */ n(
|
|
@@ -220,7 +220,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
|
|
|
220
220
|
size: "sm",
|
|
221
221
|
testId: `edit-form-modal-${t.encounterUuid}`,
|
|
222
222
|
onClick: () => {
|
|
223
|
-
|
|
223
|
+
w(), I(t);
|
|
224
224
|
},
|
|
225
225
|
children: /* @__PURE__ */ n($, {})
|
|
226
226
|
}
|
|
@@ -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 {
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DsTQkrYO.js";
|
|
2
|
+
import { a9 as d, aa as f, ab as e } from "./index-C1nJC-ZZ.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,11 +1,11 @@
|
|
|
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 {
|
|
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-DsTQkrYO.js";
|
|
2
|
+
import { a9 as v, aa as C, ab as e } from "./index-C1nJC-ZZ.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}),
|
|
7
|
-
const
|
|
8
|
-
return
|
|
6
|
+
}), n = v(), l = C(() => {
|
|
7
|
+
const a = r.theme_preference || c;
|
|
8
|
+
return a !== "system" ? a : n();
|
|
9
9
|
});
|
|
10
10
|
return e(d.Provider, {
|
|
11
11
|
value: t,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as I, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { d as G, z as H, u as F, I as j, H as J, i as M, Z as Y, w as x, Y as P, Q as X, J as Z, X as W, j as ee, $ as ae, G as se, E as U, K as te, l as re, h as ie, m as ne, n as oe, o as de, F as le } from "./index-
|
|
2
|
+
import { d as G, z as H, u as F, I as j, H as J, i as M, Z as Y, w as x, Y as P, Q as X, J as Z, X as W, j as ee, $ as ae, G as se, E as U, K as te, l as re, h as ie, m as ne, n as oe, o as de, F as le } from "./index-C1nJC-ZZ.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as me, useEffect as
|
|
4
|
+
import { useRef as me, useEffect as D, 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", O = {
|
|
6
6
|
observations: pe,
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
|
-
},
|
|
10
|
+
}, w = (s, l, n, d, c, t) => {
|
|
11
11
|
const r = te(s, l, c), e = r.value, m = re(e);
|
|
12
12
|
let i = e;
|
|
13
13
|
m === "Image" && (i = /* @__PURE__ */ o(
|
|
@@ -54,7 +54,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: n,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e, m) =>
|
|
57
|
+
(e, m) => w(
|
|
58
58
|
e,
|
|
59
59
|
m,
|
|
60
60
|
c,
|
|
@@ -80,7 +80,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
80
80
|
open: r,
|
|
81
81
|
children: [
|
|
82
82
|
t.observations.map(
|
|
83
|
-
(i, p) =>
|
|
83
|
+
(i, p) => w(
|
|
84
84
|
i,
|
|
85
85
|
p,
|
|
86
86
|
e,
|
|
@@ -139,7 +139,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
|
-
|
|
142
|
+
D(() => {
|
|
143
143
|
const a = b.some((z) => z.isError), y = m.current.size > 0;
|
|
144
144
|
a && !y ? (p({
|
|
145
145
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
@@ -152,9 +152,9 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
152
152
|
n
|
|
153
153
|
), {
|
|
154
154
|
data: _,
|
|
155
|
-
isLoading:
|
|
155
|
+
isLoading: V,
|
|
156
156
|
isError: S,
|
|
157
|
-
refetch:
|
|
157
|
+
refetch: $
|
|
158
158
|
} = ce({
|
|
159
159
|
queryKey: _e(
|
|
160
160
|
i,
|
|
@@ -177,17 +177,17 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
179
|
(y) => h.includes(y)
|
|
180
|
-
) &&
|
|
180
|
+
) && $();
|
|
181
181
|
},
|
|
182
|
-
[i,
|
|
183
|
-
),
|
|
182
|
+
[i, $]
|
|
183
|
+
), D(() => {
|
|
184
184
|
S && p({
|
|
185
185
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
189
|
}, [S]);
|
|
190
|
-
const
|
|
190
|
+
const N = g(() => {
|
|
191
191
|
if (!_) return [];
|
|
192
192
|
let a = P(_);
|
|
193
193
|
e === "latest-encounter" && (a = X(a));
|
|
@@ -197,7 +197,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A =
|
|
200
|
+
], A = V || !v, L = S && v, k = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = L ? u("ERROR_FETCHING_OBSERVATIONS") : null, Q = k ? u("NO_OBSERVATIONS_FOUND") : void 0, q = N.length > 0 && !A && !L, T = d.titleTranslationKey, f = T ? u(T) : "";
|
|
201
201
|
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
@@ -219,7 +219,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
219
219
|
q ? /* @__PURE__ */ o(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
|
-
groupedData:
|
|
222
|
+
groupedData: N,
|
|
223
223
|
title: f,
|
|
224
224
|
hideThumbnail: r
|
|
225
225
|
}
|