@bahmni/home-app 0.0.1-dev.375 → 0.0.1-dev.376
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-Dcy-W7Gb-CNGufUo9.js → DocumentsTable-Camh1NL_-D6d7jDPv.js} +11 -11
- package/dist/{FormsTable-BncKn8RO-Bwme_QqH.js → FormsTable-zIqDMMyQ-D6i0LQZk.js} +70 -70
- package/dist/{LNWAZHJI-8GXgwqcY.js → LNWAZHJI-nVMO2cM0.js} +2 -2
- package/dist/{MWZ6AO7Z-CUViv795.js → MWZ6AO7Z-C2OwlSlZ.js} +2 -2
- package/dist/{Observations-BNztTkr8-BwACGLQe.js → Observations-Bv27iPPT-y-hVgEr8.js} +31 -31
- package/dist/{YPM2AS64-05ufxKjJ.js → YPM2AS64-Dyq2yCSG.js} +1 -1
- package/dist/{index-Inkiyj0j.js → index-D4MSRGkB.js} +21400 -21375
- package/dist/{index-j4FWR1ON.js → index-SHw3D5tg.js} +141 -141
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { g as W, u as x, G as Y,
|
|
2
|
+
import { g as W, u as x, G as Y, D as J, a as X, b as Z, W as ee, p as te } from "./index-D4MSRGkB.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as h, useEffect as I, useMemo as _ } from "react";
|
|
5
5
|
const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
|
|
@@ -33,7 +33,7 @@ const Te = [
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
|
-
], pe = /\.(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
|
+
], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], De = ({ config: a, encounterUuids: g }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
@@ -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
|
+
), D = _(
|
|
98
98
|
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
), G = _(() => [...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 = _(() => ie(
|
|
101
|
-
() =>
|
|
100
|
+
), G = _(() => [...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 = _(() => ie(D, n), [D, n]), z = _(
|
|
101
|
+
() => D.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "attachments"
|
|
104
104
|
})),
|
|
105
|
-
[
|
|
105
|
+
[D]
|
|
106
106
|
), T = _(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
@@ -169,8 +169,8 @@ const Te = [
|
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
171
|
children: /* @__PURE__ */ r("div", { className: d.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) || pe.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) || pe.test(e.url ?? ""), N = $.has(t);
|
|
173
|
+
return m === "#" || N ? /* @__PURE__ */ p(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
@@ -223,5 +223,5 @@ const Te = [
|
|
|
223
223
|
] });
|
|
224
224
|
};
|
|
225
225
|
export {
|
|
226
|
-
|
|
226
|
+
De as default
|
|
227
227
|
};
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as i, jsxs as K, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import { u as ge, g as be, H as Oe, Q as Ne, f as Te, R as Ie, y as Ee, L as Ae, s as _e, m as ve, k as Fe, B as Re, c as Q, b as Se, x as Y, n as z, a as Be, W as P, d as Le, Z as Me, p as Ce, J as Ue, X as ke } from "./index-D4MSRGkB.js";
|
|
3
3
|
import { useQueryClient as De, useQuery as N } from "@tanstack/react-query";
|
|
4
4
|
import { useState as G, useMemo as d, useCallback as c } from "react";
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
7
|
-
modalHeading:
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
}, Ve = "startConsultation",
|
|
10
|
-
episodeOfCareUuids:
|
|
5
|
+
const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_modalHeading__wnTmA", we = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
|
+
formsTableBody: qe,
|
|
7
|
+
modalHeading: He,
|
|
8
|
+
customAccordianItem: we
|
|
9
|
+
}, Ve = "startConsultation", Qe = ({
|
|
10
|
+
episodeOfCareUuids: S,
|
|
11
11
|
encounterUuids: m,
|
|
12
|
-
config:
|
|
13
|
-
disableActions:
|
|
14
|
-
activeEncounterUuid:
|
|
12
|
+
config: J,
|
|
13
|
+
disableActions: Z = !1,
|
|
14
|
+
activeEncounterUuid: h = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } =
|
|
16
|
+
const { t: n } = ge(), u = be(), [y, B] = G(!1), [s, L] = G(null), {
|
|
17
17
|
numberOfVisits: W,
|
|
18
18
|
hideThumbnail: X = !1,
|
|
19
|
-
forms:
|
|
20
|
-
} =
|
|
19
|
+
forms: g
|
|
20
|
+
} = J ?? {}, ee = Oe(
|
|
21
21
|
ke.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: b } = Ne(), I = ee && !
|
|
23
|
-
|
|
22
|
+
), { userPrivileges: b } = Ne(), I = ee && !Z && !!h, M = Te(
|
|
23
|
+
S,
|
|
24
24
|
m
|
|
25
25
|
), re = De(), {
|
|
26
|
-
data:
|
|
26
|
+
data: C = [],
|
|
27
27
|
isLoading: U,
|
|
28
28
|
isError: k,
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: te
|
|
31
31
|
} = N({
|
|
32
|
-
queryKey: ["forms", u,
|
|
32
|
+
queryKey: ["forms", u, S],
|
|
33
33
|
queryFn: () => Ie(u, void 0, W),
|
|
34
|
-
enabled: !!u && !
|
|
34
|
+
enabled: !!u && !M
|
|
35
35
|
}), D = d(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = C;
|
|
37
37
|
return m && m.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => m.includes(r.encounterUuid)
|
|
39
|
-
)), Array.isArray(
|
|
40
|
-
(r) =>
|
|
39
|
+
)), Array.isArray(g) && g.length > 0 && (e = e.filter(
|
|
40
|
+
(r) => g.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [C, m, g]), { data: O = [] } = N({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => Ee()
|
|
45
|
-
}),
|
|
45
|
+
}), q = c(
|
|
46
46
|
(e) => {
|
|
47
47
|
const r = O.find((a) => a.name === e);
|
|
48
48
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
@@ -54,15 +54,15 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
54
54
|
},
|
|
55
55
|
[O, b]
|
|
56
56
|
), f = c(
|
|
57
|
-
(e) => !
|
|
58
|
-
[
|
|
59
|
-
),
|
|
57
|
+
(e) => !h || e.encounterUuid !== h ? !1 : q(e.formName),
|
|
58
|
+
[h, q]
|
|
59
|
+
), H = c(
|
|
60
60
|
(e) => O.find((r) => r.name === e)?.uuid,
|
|
61
61
|
[O]
|
|
62
62
|
), E = d(() => {
|
|
63
63
|
if (s)
|
|
64
|
-
return
|
|
65
|
-
}, [s,
|
|
64
|
+
return H(s.formName);
|
|
65
|
+
}, [s, H]), {
|
|
66
66
|
data: l,
|
|
67
67
|
isLoading: ae,
|
|
68
68
|
isError: se,
|
|
@@ -70,7 +70,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
70
70
|
} = N({
|
|
71
71
|
queryKey: ["formMetadata", E],
|
|
72
72
|
queryFn: () => Ae(E),
|
|
73
|
-
enabled: !!E &&
|
|
73
|
+
enabled: !!E && y
|
|
74
74
|
}), {
|
|
75
75
|
data: _,
|
|
76
76
|
isLoading: ne,
|
|
@@ -79,7 +79,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
79
79
|
} = N({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
81
81
|
queryFn: () => _e(s.encounterUuid),
|
|
82
|
-
enabled: !!s?.encounterUuid &&
|
|
82
|
+
enabled: !!s?.encounterUuid && y
|
|
83
83
|
});
|
|
84
84
|
ve(
|
|
85
85
|
(e) => {
|
|
@@ -87,7 +87,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
87
87
|
},
|
|
88
88
|
[u]
|
|
89
89
|
);
|
|
90
|
-
const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) =>
|
|
90
|
+
const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Re(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
|
|
91
91
|
if (!l?.schema) return;
|
|
92
92
|
const e = [], r = (o) => {
|
|
93
93
|
(o ?? []).forEach((a) => {
|
|
@@ -103,8 +103,8 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
103
103
|
const e = {}, r = (o, a) => {
|
|
104
104
|
for (const t of o)
|
|
105
105
|
if (t.type === "section") {
|
|
106
|
-
const
|
|
107
|
-
r(t.controls ?? [],
|
|
106
|
+
const R = t.label?.value ?? "Section";
|
|
107
|
+
r(t.controls ?? [], R);
|
|
108
108
|
} else
|
|
109
109
|
t.id != null && a && (e[String(t.id)] = a), t.controls && r(t.controls, a);
|
|
110
110
|
};
|
|
@@ -125,22 +125,22 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
125
125
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
126
126
|
}, [l]), ue = d(() => {
|
|
127
127
|
if (A)
|
|
128
|
-
return
|
|
128
|
+
return Q(A).message;
|
|
129
129
|
if (v)
|
|
130
|
-
return
|
|
131
|
-
}, [A, v]),
|
|
130
|
+
return Q(v).message;
|
|
131
|
+
}, [A, v]), p = d(
|
|
132
132
|
() => [
|
|
133
133
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
134
134
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
135
135
|
],
|
|
136
136
|
[n]
|
|
137
|
-
),
|
|
138
|
-
() => [...
|
|
139
|
-
[
|
|
137
|
+
), w = d(
|
|
138
|
+
() => [...p, { key: "actions", header: n("ACTIONS") }],
|
|
139
|
+
[p, n]
|
|
140
140
|
), fe = c(
|
|
141
|
-
(e) => I && e.some((r) => f(r)) ?
|
|
142
|
-
[I, f,
|
|
143
|
-
),
|
|
141
|
+
(e) => I && e.some((r) => f(r)) ? w : p,
|
|
142
|
+
[I, f, w, p]
|
|
143
|
+
), pe = p, he = d(
|
|
144
144
|
() => [
|
|
145
145
|
{ key: "recordedOn", sortable: !0 },
|
|
146
146
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -151,11 +151,11 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
151
151
|
(r, o) => {
|
|
152
152
|
const a = o.formName;
|
|
153
153
|
r[a] ??= [];
|
|
154
|
-
const t = o.providers.map((
|
|
154
|
+
const t = o.providers.map((R) => R.providerName).filter(Boolean).join(", ");
|
|
155
155
|
return r[a].push({
|
|
156
156
|
id: o.encounterUuid,
|
|
157
157
|
formName: o.formName,
|
|
158
|
-
recordedOn:
|
|
158
|
+
recordedOn: Se(o.encounterDateTime, n, !0).formattedResult,
|
|
159
159
|
recordedBy: t ?? "--",
|
|
160
160
|
encounterDateTime: o.encounterDateTime,
|
|
161
161
|
encounterUuid: o.encounterUuid
|
|
@@ -171,11 +171,11 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
171
171
|
)
|
|
172
172
|
})
|
|
173
173
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
174
|
-
}, [D, n]),
|
|
175
|
-
|
|
176
|
-
}, []),
|
|
177
|
-
|
|
178
|
-
}, []),
|
|
174
|
+
}, [D, n]), j = c((e) => {
|
|
175
|
+
L(e), B(!0);
|
|
176
|
+
}, []), $ = c(() => {
|
|
177
|
+
B(!1), L(null);
|
|
178
|
+
}, []), F = c((e) => {
|
|
179
179
|
globalThis.dispatchEvent(
|
|
180
180
|
new CustomEvent(Ve, {
|
|
181
181
|
detail: {
|
|
@@ -191,32 +191,32 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
191
191
|
(e, r) => {
|
|
192
192
|
switch (r) {
|
|
193
193
|
case "recordedOn":
|
|
194
|
-
return /* @__PURE__ */ i(
|
|
194
|
+
return /* @__PURE__ */ i(Be, { onClick: () => j(e), children: e.recordedOn });
|
|
195
195
|
case "recordedBy":
|
|
196
196
|
return e.recordedBy;
|
|
197
197
|
case "actions":
|
|
198
198
|
return f(e) ? /* @__PURE__ */ i(
|
|
199
|
-
|
|
199
|
+
Y,
|
|
200
200
|
{
|
|
201
201
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
202
202
|
kind: "ghost",
|
|
203
203
|
size: "sm",
|
|
204
204
|
testId: `edit-form-${e.encounterUuid}`,
|
|
205
|
-
onClick: () =>
|
|
206
|
-
children: /* @__PURE__ */ i(
|
|
205
|
+
onClick: () => F(e),
|
|
206
|
+
children: /* @__PURE__ */ i(z, {})
|
|
207
207
|
}
|
|
208
208
|
) : null;
|
|
209
209
|
default:
|
|
210
210
|
return null;
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
|
-
[
|
|
213
|
+
[j, F, f, n]
|
|
214
214
|
);
|
|
215
|
-
return /* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || k || V.length === 0 ||
|
|
215
|
+
return /* @__PURE__ */ K(ye, { children: [
|
|
216
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || k || V.length === 0 || M ? /* @__PURE__ */ i(
|
|
217
217
|
P,
|
|
218
218
|
{
|
|
219
|
-
headers:
|
|
219
|
+
headers: pe,
|
|
220
220
|
ariaLabel: n("FORMS_HEADING"),
|
|
221
221
|
rows: [],
|
|
222
222
|
loading: U,
|
|
@@ -226,10 +226,10 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
226
226
|
className: T.formsTableBody,
|
|
227
227
|
dataTestId: "forms-table"
|
|
228
228
|
}
|
|
229
|
-
) : /* @__PURE__ */ i(
|
|
229
|
+
) : /* @__PURE__ */ i(Le, { align: "start", children: V.map((e, r) => {
|
|
230
230
|
const { formName: o, records: a } = e, t = fe(a);
|
|
231
231
|
return /* @__PURE__ */ i(
|
|
232
|
-
|
|
232
|
+
Me,
|
|
233
233
|
{
|
|
234
234
|
title: o,
|
|
235
235
|
className: T.customAccordianItem,
|
|
@@ -243,7 +243,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
243
243
|
rows: a,
|
|
244
244
|
loading: !1,
|
|
245
245
|
errorStateMessage: "",
|
|
246
|
-
sortable:
|
|
246
|
+
sortable: he,
|
|
247
247
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
248
248
|
renderCell: x,
|
|
249
249
|
className: T.formsTableBody,
|
|
@@ -254,26 +254,26 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
254
254
|
o
|
|
255
255
|
);
|
|
256
256
|
}) }) }),
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
y && s && /* @__PURE__ */ i(
|
|
258
|
+
Ce,
|
|
259
259
|
{
|
|
260
260
|
id: "modalIdForActionAreaLayout",
|
|
261
261
|
portalId: "main-display-area",
|
|
262
|
-
open:
|
|
263
|
-
onRequestClose:
|
|
264
|
-
modalHeading: /* @__PURE__ */
|
|
262
|
+
open: y,
|
|
263
|
+
onRequestClose: $,
|
|
264
|
+
modalHeading: /* @__PURE__ */ K("div", { className: T.modalHeading, children: [
|
|
265
265
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
266
266
|
I && f(s) && /* @__PURE__ */ i(
|
|
267
|
-
|
|
267
|
+
Y,
|
|
268
268
|
{
|
|
269
269
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
270
270
|
kind: "ghost",
|
|
271
271
|
size: "sm",
|
|
272
272
|
testId: `edit-form-modal-${s.encounterUuid}`,
|
|
273
273
|
onClick: () => {
|
|
274
|
-
|
|
274
|
+
$(), F(s);
|
|
275
275
|
},
|
|
276
|
-
children: /* @__PURE__ */ i(
|
|
276
|
+
children: /* @__PURE__ */ i(z, {})
|
|
277
277
|
}
|
|
278
278
|
)
|
|
279
279
|
] }),
|
|
@@ -301,5 +301,5 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
301
301
|
] });
|
|
302
302
|
};
|
|
303
303
|
export {
|
|
304
|
-
|
|
304
|
+
Qe as default
|
|
305
305
|
};
|
|
@@ -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 { a0 as d, a1 as f, a2 as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Dyq2yCSG.js";
|
|
2
|
+
import { a0 as d, a1 as f, a2 as e } from "./index-D4MSRGkB.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 { a0 as v, a1 as C, a2 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-Dyq2yCSG.js";
|
|
2
|
+
import { a0 as v, a1 as C, a2 as e } from "./index-D4MSRGkB.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { g as q, G as K, u as
|
|
1
|
+
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { g as q, G as K, u as N, T as G, O as j, m as k, j as w, U as M, e as P, i as Q, W as x, P as H, h as F, F as W, E as z, l as J, o as X, q as Z, r as ee } from "./index-D4MSRGkB.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as $, useMemo as R } from "react";
|
|
5
|
-
const
|
|
6
|
-
const t =
|
|
5
|
+
const D = (a, n, d, l, b, r) => {
|
|
6
|
+
const t = W(a, n, b), s = t.value, i = z(s);
|
|
7
7
|
let o = s;
|
|
8
8
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
9
|
-
|
|
9
|
+
X,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
@@ -14,7 +14,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
16
|
)), i === "Video" && (o = /* @__PURE__ */ u(
|
|
17
|
-
|
|
17
|
+
Z,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
@@ -25,7 +25,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
25
25
|
provider: t.provider
|
|
26
26
|
}), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
J,
|
|
29
29
|
{
|
|
30
30
|
header: t.header,
|
|
31
31
|
value: o,
|
|
@@ -37,13 +37,13 @@ const F = (a, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${a.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
F,
|
|
41
41
|
{
|
|
42
42
|
title: a.display,
|
|
43
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: a.members?.map(
|
|
46
|
-
(s, i) =>
|
|
46
|
+
(s, i) => D(
|
|
47
47
|
s,
|
|
48
48
|
i,
|
|
49
49
|
b,
|
|
@@ -59,17 +59,17 @@ const F = (a, n, d, l, b, r) => {
|
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } =
|
|
62
|
+
const { t: l } = N(), b = (r, t, s) => {
|
|
63
63
|
const i = H(r.encounterDetails, l);
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
64
|
+
return /* @__PURE__ */ S(
|
|
65
|
+
F,
|
|
66
66
|
{
|
|
67
67
|
title: i,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(o, m) =>
|
|
72
|
+
(o, m) => D(
|
|
73
73
|
o,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -113,10 +113,10 @@ const F = (a, n, d, l, b, r) => {
|
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = K(), { t: i } =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = K(), { t: i } = N(), o = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => G(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
@@ -136,19 +136,19 @@ const F = (a, n, d, l, b, r) => {
|
|
|
136
136
|
data: c,
|
|
137
137
|
isLoading: L,
|
|
138
138
|
isError: T,
|
|
139
|
-
refetch:
|
|
139
|
+
refetch: O
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => j(t, p),
|
|
143
143
|
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
k(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && O();
|
|
150
150
|
},
|
|
151
|
-
[t,
|
|
151
|
+
[t, O]
|
|
152
152
|
), $(() => {
|
|
153
153
|
T && s({
|
|
154
154
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
@@ -156,16 +156,16 @@ const F = (a, n, d, l, b, r) => {
|
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [T]);
|
|
159
|
-
const
|
|
159
|
+
const g = R(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = w(c), h = M(e);
|
|
162
|
+
return P(h);
|
|
163
|
+
}, [c]), U = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], f = L || !y, _ = T && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, Y = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = A ? i("NO_OBSERVATIONS_FOUND") : void 0, B = g.length > 0 && !f && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
|
+
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
@@ -174,7 +174,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
174
174
|
className: I.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
Q,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
@@ -183,20 +183,20 @@ const F = (a, n, d, l, b, r) => {
|
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
B ? /* @__PURE__ */ u(
|
|
187
187
|
ie,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: g,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
194
|
x,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: U,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: i("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
199
|
+
loading: f,
|
|
200
200
|
errorStateMessage: Y,
|
|
201
201
|
emptyStateMessage: C,
|
|
202
202
|
dataTestId: "observations-table"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a3 as we, a4 as z, a5 as xt, a6 as B, a1 as q, a2 as y, a7 as Ro, a8 as ye, a9 as R, aa as _, ab as k, ac as N, ad as A, ae as bs, af as ir, ag as $e, ah as G, ai as Hn, aj as Vn, ak as dt, al as D, am as xs, an as cn, ao as Be, ap as ws, aq as qt, ar as zt, as as $s, at as Cs, au as $n, av as Ss, aw as Nr, ax as Bt, ay as zo, az as ks, aA as Es, aB as j, aC as Gr, aD as Ms, aE as Ds, aF as sr, aG as As, aH as Ts, aI as zn, aJ as Fs, aK as Is, aL as Z, aM as Ps, aN as Ls } from "./index-
|
|
1
|
+
import { a3 as we, a4 as z, a5 as xt, a6 as B, a1 as q, a2 as y, a7 as Ro, a8 as ye, a9 as R, aa as _, ab as k, ac as N, ad as A, ae as bs, af as ir, ag as $e, ah as G, ai as Hn, aj as Vn, ak as dt, al as D, am as xs, an as cn, ao as Be, ap as ws, aq as qt, ar as zt, as as $s, at as Cs, au as $n, av as Ss, aw as Nr, ax as Bt, ay as zo, az as ks, aA as Es, aB as j, aC as Gr, aD as Ms, aE as Ds, aF as sr, aG as As, aH as Ts, aI as zn, aJ as Fs, aK as Is, aL as Z, aM as Ps, aN as Ls } from "./index-D4MSRGkB.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|