@bahmni/reports-app 0.0.1-dev.453 → 0.0.1-dev.455
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-DH1dnlXy-DfUj0szk.js → DocumentsTable-DZ1zyEeJ-DABASslp.js} +36 -36
- package/dist/{FormsTable-B8Zxjboo-DU4lTF-2.js → FormsTable-C1Yy7yQt-CNwCapgX.js} +34 -34
- package/dist/{LNWAZHJI-CcAxytrw.js → LNWAZHJI-pbosfkqW.js} +2 -2
- package/dist/{MWZ6AO7Z-Dz-loqcC.js → MWZ6AO7Z-a_vR_MdQ.js} +2 -2
- package/dist/{Observations-BzjjSeWg-CH7fXiIg.js → Observations-D079FoDG-BGwIPW_z.js} +17 -17
- package/dist/{ReportsPage-BsyTJvby.js → ReportsPage-CcVV2dV0.js} +1 -1
- package/dist/{YPM2AS64-BUHpI74M.js → YPM2AS64-Cp3d5iX-.js} +1 -1
- package/dist/{index-B_1boRXC.js → index-j-6IAmqw.js} +6 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as T, Fragment as Ee } from "react/jsx-runtime";
|
|
2
|
-
import { d as ge, u as
|
|
2
|
+
import { d as ge, u as Ne, z as fe, w as Ce, A as Ae, a as be, K as ye, h as De, T as Ie, b as Le, j as Q, E as Oe, c as we, I as ve, n as Ue, e as Se, f as J, U as te, N as Me, H as Re } from "./index-j-6IAmqw.js";
|
|
3
3
|
import { useQuery as $e } from "@tanstack/react-query";
|
|
4
|
-
import { useState as p, useRef as ke, useEffect as g, useMemo as
|
|
4
|
+
import { useState as p, useRef as ke, useEffect as g, useMemo as N, useCallback as _ } from "react";
|
|
5
5
|
const He = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTable-module_viewAttachmentsLink__aQ1on", xe = "DocumentsTable-module_documentViewerContainer__F5m8D", ze = "DocumentsTable-module_printContainer__rtarJ", Fe = "DocumentsTable-module_attachmentItem__17KA7", Pe = "DocumentsTable-module_attachmentCounter__WFiI3", Ve = "DocumentsTable-module_attachmentError__RI4U2", We = "DocumentsTable-module_documentIframe__ptq5I", qe = "DocumentsTable-module_attachmentContent__IaCEe", Ge = "DocumentsTable-module_attachmentLoading__FAR6p", je = "DocumentsTable-module_hiddenWhileLoading__IxocW", Ke = "DocumentsTable-module_documentImage__KQVgS", Ye = "DocumentsTable-module_header__345GY", Qe = "DocumentsTable-module_documentTypeCell__uWGM8", Je = "DocumentsTable-module_printAllButton__IVYUW", Ze = "DocumentsTable-module_attachmentHeader__yI2xn", d = {
|
|
6
6
|
documentsTableBody: He,
|
|
7
7
|
viewAttachmentsLink: Be,
|
|
@@ -60,13 +60,13 @@ function rt({ url: n }, i) {
|
|
|
60
60
|
}
|
|
61
61
|
async function dt(n, i, {
|
|
62
62
|
container: l,
|
|
63
|
-
signal:
|
|
63
|
+
signal: A
|
|
64
64
|
}) {
|
|
65
|
-
const r = { container: l, focus: !1, signal:
|
|
66
|
-
for (const
|
|
67
|
-
if (
|
|
68
|
-
ot(
|
|
69
|
-
rt(
|
|
65
|
+
const r = { container: l, focus: !1, signal: A };
|
|
66
|
+
for (const f of n) {
|
|
67
|
+
if (A.aborted) break;
|
|
68
|
+
ot(f) ? await Me(ne(f.url), r) : await Re(
|
|
69
|
+
rt(f, i),
|
|
70
70
|
r
|
|
71
71
|
);
|
|
72
72
|
}
|
|
@@ -86,25 +86,25 @@ const st = "startConsultation", lt = "add", it = "documents", Z = "document-prin
|
|
|
86
86
|
"uploadedOn",
|
|
87
87
|
"uploadedBy"
|
|
88
88
|
], ht = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, ee = (n) => n.attachments.length > 0 ? n.attachments : n.documentUrl ? [{ url: n.documentUrl, contentType: n.contentType }] : [], gt = ({ config: n, encounterUuids: i }) => {
|
|
89
|
-
const [l,
|
|
89
|
+
const [l, A] = p(!1), [r, f] = p(
|
|
90
90
|
null
|
|
91
91
|
), [L, S] = p(
|
|
92
92
|
/* @__PURE__ */ new Set()
|
|
93
93
|
), [O, M] = p(
|
|
94
94
|
/* @__PURE__ */ new Set()
|
|
95
|
-
),
|
|
95
|
+
), b = ke(null), [R, F] = p(
|
|
96
96
|
null
|
|
97
97
|
), P = R !== null;
|
|
98
|
-
g(() => () =>
|
|
99
|
-
const
|
|
98
|
+
g(() => () => b.current?.abort(), []);
|
|
99
|
+
const C = ge(), { t: o } = Ne(), { addNotification: w } = fe(), m = N(
|
|
100
100
|
() => n?.actions?.find(
|
|
101
101
|
(e) => e.type === lt
|
|
102
102
|
),
|
|
103
103
|
[n?.actions]
|
|
104
|
-
), ae =
|
|
105
|
-
|
|
104
|
+
), ae = Ce(m?.requiredPrivilege), oe = !!m && ae, re = Number(n?.pageSize) || 5, [$, k] = p(1), [y, de] = p(re), [se, H] = p(void 0), V = _((e) => {
|
|
105
|
+
f(e), A(!0);
|
|
106
106
|
}, []), le = _(() => {
|
|
107
|
-
|
|
107
|
+
b.current?.abort(), M(/* @__PURE__ */ new Set()), A(!1), f(null), S(/* @__PURE__ */ new Set());
|
|
108
108
|
}, []), W = _((e) => {
|
|
109
109
|
M((t) => new Set(t).add(e));
|
|
110
110
|
}, []), q = _((e) => {
|
|
@@ -122,29 +122,29 @@ const st = "startConsultation", lt = "add", it = "documents", Z = "document-prin
|
|
|
122
122
|
}, [m]), { data: D, isLoading: ce, isError: B, error: x, refetch: G } = $e({
|
|
123
123
|
queryKey: [
|
|
124
124
|
"documents",
|
|
125
|
-
|
|
125
|
+
C,
|
|
126
126
|
i,
|
|
127
127
|
$,
|
|
128
|
-
|
|
128
|
+
y
|
|
129
129
|
],
|
|
130
|
-
enabled: !!
|
|
131
|
-
queryFn: () =>
|
|
132
|
-
|
|
130
|
+
enabled: !!C,
|
|
131
|
+
queryFn: () => Ae(
|
|
132
|
+
C,
|
|
133
133
|
i,
|
|
134
|
-
|
|
134
|
+
y,
|
|
135
135
|
$
|
|
136
136
|
)
|
|
137
137
|
});
|
|
138
|
-
|
|
138
|
+
be(
|
|
139
139
|
(e) => {
|
|
140
|
-
e.patientUUID ===
|
|
140
|
+
e.patientUUID === C && e.updatedResources.documents && G();
|
|
141
141
|
},
|
|
142
|
-
[
|
|
142
|
+
[C, G]
|
|
143
143
|
), g(() => {
|
|
144
144
|
D && H(D.total);
|
|
145
145
|
}, [D]), g(() => {
|
|
146
146
|
k(1), H(void 0);
|
|
147
|
-
}, [
|
|
147
|
+
}, [C]), g(() => {
|
|
148
148
|
B && w({
|
|
149
149
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
150
150
|
message: x?.message ?? "",
|
|
@@ -191,19 +191,19 @@ const st = "startConsultation", lt = "add", it = "documents", Z = "document-prin
|
|
|
191
191
|
}, [l, r]);
|
|
192
192
|
const ue = _(
|
|
193
193
|
(e, t) => {
|
|
194
|
-
t !==
|
|
194
|
+
t !== y ? (de(t), k(1), H(void 0)) : k(e);
|
|
195
195
|
},
|
|
196
|
-
[
|
|
197
|
-
), v =
|
|
196
|
+
[y]
|
|
197
|
+
), v = N(
|
|
198
198
|
() => n?.fields ?? mt,
|
|
199
199
|
[n?.fields]
|
|
200
|
-
), me =
|
|
200
|
+
), me = N(() => [...D?.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), [D]), he = N(() => tt(v, o), [v, o]), Te = N(
|
|
201
201
|
() => v.map((e) => ({
|
|
202
202
|
key: e,
|
|
203
203
|
sortable: e !== "attachments"
|
|
204
204
|
})),
|
|
205
205
|
[v]
|
|
206
|
-
), u =
|
|
206
|
+
), u = N(
|
|
207
207
|
() => r ? ee(r) : [],
|
|
208
208
|
[r]
|
|
209
209
|
), j = u.every(
|
|
@@ -219,9 +219,9 @@ const st = "startConsultation", lt = "add", it = "documents", Z = "document-prin
|
|
|
219
219
|
}, [l, u]);
|
|
220
220
|
const K = _(
|
|
221
221
|
async (e, t) => {
|
|
222
|
-
if (!r ||
|
|
222
|
+
if (!r || b.current) return;
|
|
223
223
|
const s = new AbortController(), { signal: c } = s;
|
|
224
|
-
|
|
224
|
+
b.current = s, F(t);
|
|
225
225
|
const h = document.getElementById(Z);
|
|
226
226
|
try {
|
|
227
227
|
await dt(
|
|
@@ -236,11 +236,11 @@ const st = "startConsultation", lt = "add", it = "documents", Z = "document-prin
|
|
|
236
236
|
type: "error"
|
|
237
237
|
});
|
|
238
238
|
} finally {
|
|
239
|
-
|
|
239
|
+
b.current = null, F(null);
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
[r, w, o]
|
|
243
|
-
), Y =
|
|
243
|
+
), Y = N(
|
|
244
244
|
() => u.filter(
|
|
245
245
|
(e, t) => I(e.url) !== "#" && !L.has(t)
|
|
246
246
|
),
|
|
@@ -273,7 +273,7 @@ const st = "startConsultation", lt = "add", it = "documents", Z = "document-prin
|
|
|
273
273
|
return e.uploadedBy ?? o("DOCUMENTS_NOT_AVAILABLE");
|
|
274
274
|
case "attachments":
|
|
275
275
|
return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ a(
|
|
276
|
-
|
|
276
|
+
ye,
|
|
277
277
|
{
|
|
278
278
|
onClick: () => V(e),
|
|
279
279
|
className: d.viewAttachmentsLink,
|
|
@@ -316,7 +316,7 @@ const st = "startConsultation", lt = "add", it = "documents", Z = "document-prin
|
|
|
316
316
|
renderCell: pe,
|
|
317
317
|
className: d.documentsTableBody,
|
|
318
318
|
dataTestId: "documents-table",
|
|
319
|
-
pageSize:
|
|
319
|
+
pageSize: y,
|
|
320
320
|
totalItems: se,
|
|
321
321
|
page: $,
|
|
322
322
|
onPageChange: ue
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as H, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
-
import { u as ie, d as de, w as le, Z as me, g as ue, x as ce, i as fe, p as ye, a as
|
|
2
|
+
import { u as ie, d as de, w as le, Z as me, g as ue, x as ce, i as fe, p as ye, a as Ne, C as ge, k as he, R as pe, h as Te, j as V, l as K, K as Ie, I as j, q as Oe, W as be, n as Ee, M as Ae, m as _e } from "./index-j-6IAmqw.js";
|
|
3
3
|
import { useQueryClient as Ce, useQuery as E } from "@tanstack/react-query";
|
|
4
4
|
import { useState as x, useMemo as i, useCallback as d } from "react";
|
|
5
|
-
const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_modalHeading__wnTmA", Le = "FormsTable-module_customAccordianItem__isszs",
|
|
5
|
+
const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_modalHeading__wnTmA", Le = "FormsTable-module_customAccordianItem__isszs", h = {
|
|
6
6
|
formsTableBody: Re,
|
|
7
7
|
modalHeading: ve,
|
|
8
8
|
customAccordianItem: Le
|
|
9
|
-
},
|
|
9
|
+
}, Be = "startConsultation", Se = ({
|
|
10
10
|
episodeOfCareUuids: A,
|
|
11
11
|
encounterUuids: l,
|
|
12
12
|
config: z,
|
|
@@ -16,30 +16,30 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
16
16
|
const { t: o } = ie(), m = de(), [p, _] = x(!1), [t, C] = x(null), {
|
|
17
17
|
numberOfVisits: G,
|
|
18
18
|
hideThumbnail: P = !1,
|
|
19
|
-
forms:
|
|
19
|
+
forms: N
|
|
20
20
|
} = z ?? {}, Q = le(
|
|
21
21
|
_e.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges:
|
|
22
|
+
), { userPrivileges: g } = me(), T = Q && !$ && !!y, R = ue(
|
|
23
23
|
A,
|
|
24
24
|
l
|
|
25
25
|
), W = Ce(), {
|
|
26
26
|
data: v = [],
|
|
27
27
|
isLoading: L,
|
|
28
|
-
isError:
|
|
28
|
+
isError: B,
|
|
29
29
|
error: Z,
|
|
30
30
|
refetch: Y
|
|
31
31
|
} = E({
|
|
32
32
|
queryKey: ["forms", m, A],
|
|
33
33
|
queryFn: () => ce(m, void 0, G),
|
|
34
34
|
enabled: !!m && !R
|
|
35
|
-
}),
|
|
35
|
+
}), F = i(() => {
|
|
36
36
|
let e = v;
|
|
37
37
|
return l && l.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => l.includes(r.encounterUuid)
|
|
39
|
-
)), Array.isArray(
|
|
40
|
-
(r) =>
|
|
39
|
+
)), Array.isArray(N) && N.length > 0 && (e = e.filter(
|
|
40
|
+
(r) => N.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [v, l,
|
|
42
|
+
}, [v, l, N]), { data: M = [] } = E({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => fe()
|
|
45
45
|
}), U = d(
|
|
@@ -48,13 +48,13 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
48
48
|
(s) => s.name.toLowerCase() === e.toLowerCase()
|
|
49
49
|
);
|
|
50
50
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
51
|
-
if (!
|
|
52
|
-
const a = new Set(
|
|
51
|
+
if (!g || g.length === 0) return !1;
|
|
52
|
+
const a = new Set(g.map((s) => s.name));
|
|
53
53
|
return r.privileges.some(
|
|
54
54
|
(s) => a.has(s.privilegeName) && s.editable
|
|
55
55
|
);
|
|
56
56
|
},
|
|
57
|
-
[M,
|
|
57
|
+
[M, g]
|
|
58
58
|
), u = d(
|
|
59
59
|
(e) => !y || e.encounterUuid !== y ? !1 : U(e.formName),
|
|
60
60
|
[y, U]
|
|
@@ -62,22 +62,22 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
62
62
|
data: I,
|
|
63
63
|
isLoading: J,
|
|
64
64
|
isError: X,
|
|
65
|
-
error:
|
|
65
|
+
error: O
|
|
66
66
|
} = E({
|
|
67
67
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
68
68
|
queryFn: () => ye(t.encounterUuid),
|
|
69
69
|
enabled: !!t?.encounterUuid && p
|
|
70
70
|
});
|
|
71
|
-
|
|
71
|
+
Ne(
|
|
72
72
|
(e) => {
|
|
73
73
|
e.patientUUID === m && (Y(), W.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
74
|
},
|
|
75
75
|
[m]
|
|
76
76
|
);
|
|
77
|
-
const ee = i(() => !I?.entry || !t?.formName ? [] : I.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) =>
|
|
78
|
-
if (
|
|
79
|
-
return pe(
|
|
80
|
-
}, [
|
|
77
|
+
const ee = i(() => !I?.entry || !t?.formName ? [] : I.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => ge(e) ? he(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [I, t?.formName]), re = i(() => {
|
|
78
|
+
if (O)
|
|
79
|
+
return pe(O).message;
|
|
80
|
+
}, [O]), c = i(
|
|
81
81
|
() => [
|
|
82
82
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
83
83
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
@@ -96,7 +96,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
96
96
|
],
|
|
97
97
|
[]
|
|
98
98
|
), S = 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 Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
120
120
|
)
|
|
121
121
|
})
|
|
122
122
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
|
-
}, [
|
|
123
|
+
}, [F, o]), k = d((e) => {
|
|
124
124
|
C(e), _(!0);
|
|
125
125
|
}, []), w = d(() => {
|
|
126
126
|
_(!1), C(null);
|
|
127
|
-
}, []),
|
|
127
|
+
}, []), b = d((e) => {
|
|
128
128
|
globalThis.dispatchEvent(
|
|
129
|
-
new CustomEvent(
|
|
129
|
+
new CustomEvent(Be, {
|
|
130
130
|
detail: {
|
|
131
131
|
editOnly: "observationForms",
|
|
132
132
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -151,7 +151,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
151
151
|
kind: "ghost",
|
|
152
152
|
size: "sm",
|
|
153
153
|
testId: `edit-form-${e.encounterUuid}`,
|
|
154
|
-
onClick: () =>
|
|
154
|
+
onClick: () => b(e),
|
|
155
155
|
children: /* @__PURE__ */ n(K, {})
|
|
156
156
|
}
|
|
157
157
|
) : null;
|
|
@@ -159,29 +159,29 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
[k,
|
|
162
|
+
[k, b, u, o]
|
|
163
163
|
);
|
|
164
164
|
return /* @__PURE__ */ H(ne, { children: [
|
|
165
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L ||
|
|
165
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L || B || S.length === 0 || R ? /* @__PURE__ */ n(
|
|
166
166
|
j,
|
|
167
167
|
{
|
|
168
168
|
headers: oe,
|
|
169
169
|
ariaLabel: o("FORMS_HEADING"),
|
|
170
170
|
rows: [],
|
|
171
171
|
loading: L,
|
|
172
|
-
errorStateMessage:
|
|
172
|
+
errorStateMessage: B ? Z?.message : void 0,
|
|
173
173
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
174
174
|
renderCell: q,
|
|
175
|
-
className:
|
|
175
|
+
className: h.formsTableBody,
|
|
176
176
|
dataTestId: "forms-table"
|
|
177
177
|
}
|
|
178
|
-
) : /* @__PURE__ */ n(
|
|
178
|
+
) : /* @__PURE__ */ n(Oe, { align: "start", children: S.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
|
-
className:
|
|
184
|
+
className: h.customAccordianItem,
|
|
185
185
|
testId: `accordian-title-${a}`,
|
|
186
186
|
open: r === 0,
|
|
187
187
|
children: /* @__PURE__ */ n(
|
|
@@ -195,7 +195,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
195
195
|
sortable: te,
|
|
196
196
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
197
197
|
renderCell: q,
|
|
198
|
-
className:
|
|
198
|
+
className: h.formsTableBody,
|
|
199
199
|
dataTestId: `forms-table-${a}`
|
|
200
200
|
}
|
|
201
201
|
)
|
|
@@ -210,7 +210,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
210
210
|
portalId: "main-display-area",
|
|
211
211
|
open: p,
|
|
212
212
|
onRequestClose: w,
|
|
213
|
-
modalHeading: /* @__PURE__ */ H("div", { className:
|
|
213
|
+
modalHeading: /* @__PURE__ */ H("div", { className: h.modalHeading, children: [
|
|
214
214
|
/* @__PURE__ */ n("span", { children: t.formName }),
|
|
215
215
|
T && u(t) && /* @__PURE__ */ n(
|
|
216
216
|
V,
|
|
@@ -220,7 +220,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
220
220
|
size: "sm",
|
|
221
221
|
testId: `edit-form-modal-${t.encounterUuid}`,
|
|
222
222
|
onClick: () => {
|
|
223
|
-
w(),
|
|
223
|
+
w(), b(t);
|
|
224
224
|
},
|
|
225
225
|
children: /* @__PURE__ */ n(K, {})
|
|
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 { ao as p, ap as d, aq as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Cp3d5iX-.js";
|
|
2
|
+
import { ao as p, ap as d, aq as e } from "./index-j-6IAmqw.js";
|
|
3
3
|
var f = (a) => {
|
|
4
4
|
const [r, o] = 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 { ao as v, ap as C, aq 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-Cp3d5iX-.js";
|
|
2
|
+
import { ao as v, ap as C, aq as e } from "./index-j-6IAmqw.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { d as z, z as M, u as L, o as G, g as x, r as J, s as Y, a as j, t as X, v as P, $ as Z, y as W, b as ee, I as ae, D as se, B, S as te, X as re, h as ie, Q as oe, F as ne, J as de, Y as le } from "./index-
|
|
1
|
+
import { jsxs as S, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { d as z, z as M, u as L, o as G, g as x, r as J, s as Y, a as j, t as X, v as P, $ as Z, y as W, b as ee, I as ae, D as se, B, S as te, X as re, h as ie, Q as oe, F as ne, J as de, Y as le } from "./index-j-6IAmqw.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as pe, useEffect as A, useMemo as
|
|
4
|
+
import { useRef as pe, useEffect as A, 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 = {
|
|
6
6
|
observations: me,
|
|
7
7
|
title: be,
|
|
@@ -26,12 +26,12 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
26
26
|
hideThumbnail: t
|
|
27
27
|
}
|
|
28
28
|
)), p === "PDF" && (i = /* @__PURE__ */ n(le, { id: `${e}-pdf`, src: e }));
|
|
29
|
-
const m = /* @__PURE__ */
|
|
29
|
+
const m = /* @__PURE__ */ S("div", { className: O.wrapper, children: [
|
|
30
30
|
/* @__PURE__ */ n("span", { children: r.header.display }),
|
|
31
31
|
r.header.referenceRange && /* @__PURE__ */ n("span", { className: O.secondary, children: r.header.referenceRange })
|
|
32
32
|
] }), u = c("OBSERVATIONS_RECORDED_BY", {
|
|
33
33
|
provider: r.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, E = /* @__PURE__ */
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, E = /* @__PURE__ */ S("div", { className: O.wrapper, children: [
|
|
35
35
|
/* @__PURE__ */ n("span", { children: u }),
|
|
36
36
|
b && /* @__PURE__ */ n("span", { className: O.secondary, children: b })
|
|
37
37
|
] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${v}-${h}-${o}-${l}` : `${v}-${h}-${o}-${l}`;
|
|
@@ -72,7 +72,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
72
72
|
}) => {
|
|
73
73
|
const { t: d } = L(), c = (t, r, e) => {
|
|
74
74
|
const p = se(t.encounterDetails, d);
|
|
75
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ S(
|
|
76
76
|
B,
|
|
77
77
|
{
|
|
78
78
|
title: p,
|
|
@@ -122,7 +122,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
122
122
|
...l,
|
|
123
123
|
o,
|
|
124
124
|
d
|
|
125
|
-
],
|
|
125
|
+
], Se = ({
|
|
126
126
|
config: s,
|
|
127
127
|
episodeOfCareUuids: l,
|
|
128
128
|
encounterUuids: o
|
|
@@ -147,13 +147,13 @@ 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 E =
|
|
150
|
+
const E = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V = x(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
154
|
data: _,
|
|
155
155
|
isLoading: F,
|
|
156
|
-
isError:
|
|
156
|
+
isError: I,
|
|
157
157
|
refetch: N
|
|
158
158
|
} = ce({
|
|
159
159
|
queryKey: _e(
|
|
@@ -181,13 +181,13 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
181
181
|
},
|
|
182
182
|
[i, N]
|
|
183
183
|
), A(() => {
|
|
184
|
-
|
|
184
|
+
I && m({
|
|
185
185
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
|
-
}, [
|
|
190
|
-
const $ =
|
|
189
|
+
}, [I]);
|
|
190
|
+
const $ = g(() => {
|
|
191
191
|
if (!_) return [];
|
|
192
192
|
let a = X(_);
|
|
193
193
|
e === "latest-encounter" && (a = P(a));
|
|
@@ -197,12 +197,12 @@ const me = "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
|
-
], k = F || !v, D =
|
|
201
|
-
return /* @__PURE__ */
|
|
200
|
+
], k = F || !v, D = I && v, K = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, H = K ? u("NO_OBSERVATIONS_FOUND") : void 0, Q = $.length > 0 && !k && !D, T = d.titleTranslationKey, f = T ? u(T) : "";
|
|
201
|
+
return /* @__PURE__ */ S(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid":
|
|
205
|
+
"data-testid": T ? `observations-${f}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
207
|
className: O.observations,
|
|
208
208
|
children: [
|
|
@@ -210,7 +210,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId:
|
|
213
|
+
testId: T ? `observations-title-${f}` : "observations-title",
|
|
214
214
|
title: f,
|
|
215
215
|
className: O.title,
|
|
216
216
|
children: /* @__PURE__ */ n("p", { children: f })
|
|
@@ -241,6 +241,6 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
241
241
|
};
|
|
242
242
|
export {
|
|
243
243
|
Re as conceptUuidQueryKeys,
|
|
244
|
-
|
|
244
|
+
Se as default,
|
|
245
245
|
_e as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m, Fragment as H } from "react/jsx-runtime";
|
|
2
|
-
import { G as z, L as se, O as oe, P as ie, V as le, _ as de, a0 as Re, a1 as ce, a2 as Y, u as b, z as X, a3 as y, a4 as F, a5 as M, a6 as _e, a7 as Te, a8 as pe, a9 as x, Z as ue, aa as me, ab as Ee, ac as q, ad as Se, ae as U, af as fe, ag as Oe, ah as Pe, ai as ge, aj as $, ak as he, al as j, am as Ae, an as De } from "./index-
|
|
2
|
+
import { G as z, L as se, O as oe, P as ie, V as le, _ as de, a0 as Re, a1 as ce, a2 as Y, u as b, z as X, a3 as y, a4 as F, a5 as M, a6 as _e, a7 as Te, a8 as pe, a9 as x, Z as ue, aa as me, ab as Ee, ac as q, ad as Se, ae as U, af as fe, ag as Oe, ah as Pe, ai as ge, aj as $, ak as he, al as j, am as Ae, an as De } from "./index-j-6IAmqw.js";
|
|
3
3
|
import Le, { useCallback as K, useState as h, useEffect as V, useMemo as N } from "react";
|
|
4
4
|
import { useQuery as J } from "@tanstack/react-query";
|
|
5
5
|
import { useLocation as Ce, useNavigate as be } from "react-router-dom";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ar as we, as as z, at as xt, au as B, ap as q, aq as y, av as Ro, aw as ye, ax as R, ay as _, az as k, aA as N, aB as A, aC as bs, aD as ir, aE as $e, aF as U, aG as Hn, aH as Vn, aI as dt, aJ as D, aK as xs, aL as cn, aM as Be, aN as ws, aO as qt, aP as zt, aQ as $s, aR as Cs, aS as $n, aT as Ss, aU as Nr, aV as Bt, aW as zo, aX as ks, aY as Es, aZ as j, a_ as Ur, a$ as Ms, b0 as Ds, b1 as sr, b2 as As, b3 as Ts, b4 as zn, b5 as Fs, b6 as Is, b7 as Z, b8 as Ps, b9 as Ls } from "./index-
|
|
1
|
+
import { ar as we, as as z, at as xt, au as B, ap as q, aq as y, av as Ro, aw as ye, ax as R, ay as _, az as k, aA as N, aB as A, aC as bs, aD as ir, aE as $e, aF as U, aG as Hn, aH as Vn, aI as dt, aJ as D, aK as xs, aL as cn, aM as Be, aN as ws, aO as qt, aP as zt, aQ as $s, aR as Cs, aS as $n, aT as Ss, aU as Nr, aV as Bt, aW as zo, aX as ks, aY as Es, aZ as j, a_ as Ur, a$ as Ms, b0 as Ds, b1 as sr, b2 as As, b3 as Ts, b4 as zn, b5 as Fs, b6 as Is, b7 as Z, b8 as Ps, b9 as Ls } from "./index-j-6IAmqw.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -190181,7 +190181,7 @@ K22({
|
|
|
190181
190181
|
key: "commonSearch",
|
|
190182
190182
|
component: kpt
|
|
190183
190183
|
});
|
|
190184
|
-
B0(() => Promise.resolve().then(() => Gct)), B0(() => Promise.resolve().then(() => Vlt)), B0(() => Promise.resolve().then(() => eit)), B0(() => Promise.resolve().then(() => lit)), B0(() => import("./DocumentsTable-
|
|
190184
|
+
B0(() => Promise.resolve().then(() => Gct)), B0(() => Promise.resolve().then(() => Vlt)), B0(() => Promise.resolve().then(() => eit)), B0(() => Promise.resolve().then(() => lit)), B0(() => import("./DocumentsTable-DZ1zyEeJ-DABASslp.js")), B0(() => Promise.resolve().then(() => f9t)), B0(() => import("./FormsTable-C1Yy7yQt-CNwCapgX.js")), B0(() => Promise.resolve().then(() => a8t)), B0(() => import("./Observations-D079FoDG-BGwIPW_z.js")), B0(
|
|
190185
190185
|
() => Promise.resolve().then(() => n7t)
|
|
190186
190186
|
), B0(
|
|
190187
190187
|
() => Promise.resolve().then(() => N5t)
|
|
@@ -192198,7 +192198,7 @@ var Fgt = (t, e = !1) => {
|
|
|
192198
192198
|
const e = it2(() => {
|
|
192199
192199
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t;
|
|
192200
192200
|
let d;
|
|
192201
|
-
return this.#l ? d = this.#l : (d = ct2(() => import("./LNWAZHJI-
|
|
192201
|
+
return this.#l ? d = this.#l : (d = ct2(() => import("./LNWAZHJI-pbosfkqW.js")), this.#l = d), Nt2(this.#h, this.#r), ot2(d, at2({
|
|
192202
192202
|
get queryFlavor() {
|
|
192203
192203
|
return r.#d;
|
|
192204
192204
|
},
|
|
@@ -192296,7 +192296,7 @@ var Fgt = (t, e = !1) => {
|
|
|
192296
192296
|
const e = it2(() => {
|
|
192297
192297
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t, [d] = this.#l;
|
|
192298
192298
|
let u;
|
|
192299
|
-
return this.#i ? u = this.#i : (u = ct2(() => import("./MWZ6AO7Z-
|
|
192299
|
+
return this.#i ? u = this.#i : (u = ct2(() => import("./MWZ6AO7Z-a_vR_MdQ.js")), this.#i = u), Nt2(this.#h, this.#r), ot2(u, at2({
|
|
192300
192300
|
get queryFlavor() {
|
|
192301
192301
|
return r.#d;
|
|
192302
192302
|
},
|
|
@@ -192465,7 +192465,7 @@ const Nmt = "reports", Cmt = "app:reports", Kgt = "/reports/", Ggt = "/reports/m
|
|
|
192465
192465
|
}
|
|
192466
192466
|
}
|
|
192467
192467
|
}, jR1 = B0(
|
|
192468
|
-
() => import("./ReportsPage-
|
|
192468
|
+
() => import("./ReportsPage-CcVV2dV0.js").then((t) => ({
|
|
192469
192469
|
default: t.ReportsPage
|
|
192470
192470
|
}))
|
|
192471
192471
|
), $mt = [
|
|
@@ -192501,7 +192501,7 @@ function Qgt() {
|
|
|
192501
192501
|
}
|
|
192502
192502
|
export {
|
|
192503
192503
|
fgt as $,
|
|
192504
|
-
|
|
192504
|
+
igt as A,
|
|
192505
192505
|
Zwt as B,
|
|
192506
192506
|
I22 as C,
|
|
192507
192507
|
ugt as D,
|
|
@@ -192514,7 +192514,7 @@ export {
|
|
|
192514
192514
|
Rr as K,
|
|
192515
192515
|
Jgt as L,
|
|
192516
192516
|
wz as M,
|
|
192517
|
-
|
|
192517
|
+
dgt as N,
|
|
192518
192518
|
Ygt as O,
|
|
192519
192519
|
Rwt as P,
|
|
192520
192520
|
EG0 as Q,
|
package/dist/index.js
CHANGED