@bahmni/clinical-app 0.0.1-dev.358 → 0.0.1-dev.360
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConsultationPage-OFqsRVah.js → ConsultationPage-Dl1Y0TrI.js} +2093 -2093
- package/dist/{DocumentsTable-p710KcO6-D2FYEliq.js → DocumentsTable-5x3z64yX-DYwVguBe.js} +5 -5
- package/dist/{FormsTable-D2nvJ1yI-Bo4y8WcG.js → FormsTable-DK5LbwNj-DAZ44oG9.js} +68 -68
- package/dist/{LNWAZHJI-C0zbgf7-.js → LNWAZHJI-FobQom-y.js} +2 -2
- package/dist/{MWZ6AO7Z-W8OFSSHJ.js → MWZ6AO7Z-BLot-fEb.js} +2 -2
- package/dist/{Observations-YezD6umW-Bji-WXjJ.js → Observations-BtZFJSMF-Bl_I8Xx1.js} +37 -37
- package/dist/{YPM2AS64-BsQlhRSg.js → YPM2AS64-KQsP8eZ8.js} +1 -1
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts.map +1 -1
- package/dist/{hook-CyGL_sr9.js → hook-BQXc8jIv.js} +1 -1
- package/dist/{index-D3WzVOlK.js → index-CoIc-MFY.js} +27974 -27901
- package/dist/{index-B1K7Fyto.js → index-Cv0w0kHh.js} +1 -1
- package/dist/{index-CIEjw5u1.js → index-mudxGTCA.js} +6 -6
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +2 -0
- package/dist/locales/locale_es.json +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { m as x, u as W, a as Y,
|
|
2
|
+
import { m as x, u as W, a as Y, A as J, n as X, g as Z, e as ee, d as te } from "./index-CoIc-MFY.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", 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 = {
|
|
@@ -38,7 +38,7 @@ const Te = [
|
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = x(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f,
|
|
41
|
+
), E = x(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, A] = l(1), [u, V] = l(k), [F, C] = l(void 0), M = _((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
43
|
}, []), H = _(() => {
|
|
44
44
|
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
@@ -61,9 +61,9 @@ const Te = [
|
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
63
|
I(() => {
|
|
64
|
-
i &&
|
|
64
|
+
i && C(i.total);
|
|
65
65
|
}, [i]), I(() => {
|
|
66
|
-
|
|
66
|
+
A(1), C(void 0);
|
|
67
67
|
}, [E]), I(() => {
|
|
68
68
|
b && L({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
@@ -91,7 +91,7 @@ const Te = [
|
|
|
91
91
|
}, [s, o]);
|
|
92
92
|
const j = _(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !== u ? (V(t),
|
|
94
|
+
t !== u ? (V(t), A(1), C(void 0)) : A(e);
|
|
95
95
|
},
|
|
96
96
|
[u]
|
|
97
97
|
), N = p(
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { u as ge, m as pe,
|
|
1
|
+
import { jsx as i, jsxs as x, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import { u as ge, m as pe, b as Ne, $ as Oe, h as be, x as Te, X as Ie, c as Ee, k as Ae, f as _e, N as ve, O as Fe, o as z, g as Se, i as P, j as K, n as Ce, e as Q, l as Re, p as Be, d as Le, q as Me, P as Ue } from "./index-CoIc-MFY.js";
|
|
3
3
|
import { useQueryClient as De, useQuery as b } from "@tanstack/react-query";
|
|
4
4
|
import { useState as X, useMemo as d, useCallback as l } from "react";
|
|
5
|
-
const ke = "FormsTable-module_formsTableBody__SvGha",
|
|
5
|
+
const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", we = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
6
|
formsTableBody: ke,
|
|
7
|
-
modalHeading:
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
},
|
|
10
|
-
episodeOfCareUuids:
|
|
11
|
-
encounterUuids:
|
|
12
|
-
config:
|
|
13
|
-
disableActions:
|
|
7
|
+
modalHeading: qe,
|
|
8
|
+
customAccordianItem: we
|
|
9
|
+
}, He = "startConsultation", xe = ({
|
|
10
|
+
episodeOfCareUuids: C,
|
|
11
|
+
encounterUuids: u,
|
|
12
|
+
config: Y,
|
|
13
|
+
disableActions: Z = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } = ge(),
|
|
17
|
-
numberOfVisits:
|
|
18
|
-
hideThumbnail:
|
|
16
|
+
const { t: n } = ge(), c = pe(), [g, R] = X(!1), [s, B] = X(null), {
|
|
17
|
+
numberOfVisits: J,
|
|
18
|
+
hideThumbnail: W = !1,
|
|
19
19
|
forms: p
|
|
20
|
-
} =
|
|
20
|
+
} = Y ?? {}, ee = Ne(
|
|
21
21
|
Ue.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: N } = Oe(), I = ee && !
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
), { userPrivileges: N } = Oe(), I = ee && !Z && !!y, L = be(
|
|
23
|
+
C,
|
|
24
|
+
u
|
|
25
25
|
), re = De(), {
|
|
26
|
-
data:
|
|
26
|
+
data: M = [],
|
|
27
27
|
isLoading: U,
|
|
28
28
|
isError: D,
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = b({
|
|
32
|
-
queryKey: ["forms",
|
|
33
|
-
queryFn: () => Te(
|
|
34
|
-
enabled: !!
|
|
32
|
+
queryKey: ["forms", c, C],
|
|
33
|
+
queryFn: () => Te(c, void 0, J),
|
|
34
|
+
enabled: !!c && !L
|
|
35
35
|
}), k = d(() => {
|
|
36
|
-
let e =
|
|
37
|
-
return
|
|
38
|
-
(r) =>
|
|
36
|
+
let e = M;
|
|
37
|
+
return u && u.length > 0 && (e = e.filter(
|
|
38
|
+
(r) => u.includes(r.encounterUuid)
|
|
39
39
|
)), Array.isArray(p) && p.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => p.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [M, u, p]), { data: O = [] } = b({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => Ie()
|
|
45
|
-
}),
|
|
45
|
+
}), q = l(
|
|
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,40 +54,40 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
54
54
|
},
|
|
55
55
|
[O, N]
|
|
56
56
|
), f = l(
|
|
57
|
-
(e) => !y || e.encounterUuid !== y ? !1 :
|
|
58
|
-
[y,
|
|
59
|
-
),
|
|
57
|
+
(e) => !y || e.encounterUuid !== y ? !1 : q(e.formName),
|
|
58
|
+
[y, q]
|
|
59
|
+
), w = l(
|
|
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 w(s.formName);
|
|
65
|
+
}, [s, w]), {
|
|
66
66
|
data: m,
|
|
67
67
|
isLoading: te,
|
|
68
68
|
isError: se,
|
|
69
|
-
error:
|
|
69
|
+
error: A
|
|
70
70
|
} = b({
|
|
71
71
|
queryKey: ["formMetadata", E],
|
|
72
72
|
queryFn: () => Ee(E),
|
|
73
73
|
enabled: !!E && g
|
|
74
74
|
}), {
|
|
75
|
-
data:
|
|
75
|
+
data: _,
|
|
76
76
|
isLoading: ne,
|
|
77
77
|
isError: ie,
|
|
78
78
|
error: v
|
|
79
79
|
} = b({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
81
|
-
queryFn: () =>
|
|
81
|
+
queryFn: () => Ae(s.encounterUuid),
|
|
82
82
|
enabled: !!s?.encounterUuid && g
|
|
83
83
|
});
|
|
84
|
-
|
|
84
|
+
_e(
|
|
85
85
|
(e) => {
|
|
86
|
-
e.patientUUID ===
|
|
86
|
+
e.patientUUID === c && e.updatedConcepts.size > 0 && (ae(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
87
87
|
},
|
|
88
|
-
[
|
|
88
|
+
[c]
|
|
89
89
|
);
|
|
90
|
-
const de = d(() => !
|
|
90
|
+
const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => ve(e) ? Fe(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
|
|
91
91
|
if (!m?.schema) return;
|
|
92
92
|
const e = [], r = (o) => {
|
|
93
93
|
(o ?? []).forEach((a) => {
|
|
@@ -112,23 +112,23 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
112
112
|
m.schema.controls ?? [],
|
|
113
113
|
null
|
|
114
114
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
115
|
-
}, [m]),
|
|
116
|
-
if (
|
|
117
|
-
return
|
|
115
|
+
}, [m]), ue = d(() => {
|
|
116
|
+
if (A)
|
|
117
|
+
return z(A).message;
|
|
118
118
|
if (v)
|
|
119
|
-
return
|
|
120
|
-
}, [
|
|
119
|
+
return z(v).message;
|
|
120
|
+
}, [A, v]), h = d(
|
|
121
121
|
() => [
|
|
122
122
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
123
123
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
124
124
|
],
|
|
125
125
|
[n]
|
|
126
|
-
),
|
|
126
|
+
), H = d(
|
|
127
127
|
() => [...h, { key: "actions", header: n("ACTIONS") }],
|
|
128
128
|
[h, n]
|
|
129
|
-
),
|
|
130
|
-
(e) => I && e.some((r) => f(r)) ?
|
|
131
|
-
[I, f,
|
|
129
|
+
), ce = l(
|
|
130
|
+
(e) => I && e.some((r) => f(r)) ? H : h,
|
|
131
|
+
[I, f, H, h]
|
|
132
132
|
), fe = h, he = d(
|
|
133
133
|
() => [
|
|
134
134
|
{ key: "recordedOn", sortable: !0 },
|
|
@@ -160,13 +160,13 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
160
160
|
)
|
|
161
161
|
})
|
|
162
162
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
163
|
-
}, [k, n]),
|
|
164
|
-
|
|
163
|
+
}, [k, n]), $ = l((e) => {
|
|
164
|
+
B(e), R(!0);
|
|
165
165
|
}, []), j = l(() => {
|
|
166
|
-
|
|
166
|
+
R(!1), B(null);
|
|
167
167
|
}, []), F = l((e) => {
|
|
168
168
|
globalThis.dispatchEvent(
|
|
169
|
-
new CustomEvent(
|
|
169
|
+
new CustomEvent(He, {
|
|
170
170
|
detail: {
|
|
171
171
|
editOnly: "observationForms",
|
|
172
172
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -180,29 +180,29 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
180
180
|
(e, r) => {
|
|
181
181
|
switch (r) {
|
|
182
182
|
case "recordedOn":
|
|
183
|
-
return /* @__PURE__ */ i(
|
|
183
|
+
return /* @__PURE__ */ i(Ce, { onClick: () => $(e), children: e.recordedOn });
|
|
184
184
|
case "recordedBy":
|
|
185
185
|
return e.recordedBy;
|
|
186
186
|
case "actions":
|
|
187
187
|
return f(e) ? /* @__PURE__ */ i(
|
|
188
|
-
|
|
188
|
+
P,
|
|
189
189
|
{
|
|
190
190
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
191
191
|
kind: "ghost",
|
|
192
192
|
size: "sm",
|
|
193
193
|
testId: `edit-form-${e.encounterUuid}`,
|
|
194
194
|
onClick: () => F(e),
|
|
195
|
-
children: /* @__PURE__ */ i(
|
|
195
|
+
children: /* @__PURE__ */ i(K, {})
|
|
196
196
|
}
|
|
197
197
|
) : null;
|
|
198
198
|
default:
|
|
199
199
|
return null;
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
-
[
|
|
202
|
+
[$, F, f, n]
|
|
203
203
|
);
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 ||
|
|
204
|
+
return /* @__PURE__ */ x(ye, { children: [
|
|
205
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || L ? /* @__PURE__ */ i(
|
|
206
206
|
Q,
|
|
207
207
|
{
|
|
208
208
|
headers: fe,
|
|
@@ -215,10 +215,10 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
215
215
|
className: T.formsTableBody,
|
|
216
216
|
dataTestId: "forms-table"
|
|
217
217
|
}
|
|
218
|
-
) : /* @__PURE__ */ i(
|
|
219
|
-
const { formName: o, records: a } = e, t =
|
|
218
|
+
) : /* @__PURE__ */ i(Re, { align: "start", children: V.map((e, r) => {
|
|
219
|
+
const { formName: o, records: a } = e, t = ce(a);
|
|
220
220
|
return /* @__PURE__ */ i(
|
|
221
|
-
|
|
221
|
+
Be,
|
|
222
222
|
{
|
|
223
223
|
title: o,
|
|
224
224
|
className: T.customAccordianItem,
|
|
@@ -244,16 +244,16 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
244
244
|
);
|
|
245
245
|
}) }) }),
|
|
246
246
|
g && s && /* @__PURE__ */ i(
|
|
247
|
-
|
|
247
|
+
Le,
|
|
248
248
|
{
|
|
249
249
|
id: "modalIdForActionAreaLayout",
|
|
250
250
|
portalId: "main-display-area",
|
|
251
251
|
open: g,
|
|
252
252
|
onRequestClose: j,
|
|
253
|
-
modalHeading: /* @__PURE__ */
|
|
253
|
+
modalHeading: /* @__PURE__ */ x("div", { className: T.modalHeading, children: [
|
|
254
254
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
255
255
|
I && f(s) && /* @__PURE__ */ i(
|
|
256
|
-
|
|
256
|
+
P,
|
|
257
257
|
{
|
|
258
258
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
259
259
|
kind: "ghost",
|
|
@@ -262,7 +262,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
262
262
|
onClick: () => {
|
|
263
263
|
j(), F(s);
|
|
264
264
|
},
|
|
265
|
-
children: /* @__PURE__ */ i(
|
|
265
|
+
children: /* @__PURE__ */ i(K, {})
|
|
266
266
|
}
|
|
267
267
|
)
|
|
268
268
|
] }),
|
|
@@ -271,15 +271,15 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
271
271
|
size: "md",
|
|
272
272
|
testId: "form-details-modal",
|
|
273
273
|
children: /* @__PURE__ */ i(
|
|
274
|
-
|
|
274
|
+
Me,
|
|
275
275
|
{
|
|
276
276
|
observations: de,
|
|
277
277
|
isLoading: te || ne,
|
|
278
278
|
isError: se || ie,
|
|
279
|
-
errorMessage:
|
|
279
|
+
errorMessage: ue,
|
|
280
280
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
281
281
|
testIdPrefix: s.formName,
|
|
282
|
-
hideThumbnail:
|
|
282
|
+
hideThumbnail: W,
|
|
283
283
|
controlOrder: le,
|
|
284
284
|
sectionMap: me
|
|
285
285
|
}
|
|
@@ -289,5 +289,5 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
289
289
|
] });
|
|
290
290
|
};
|
|
291
291
|
export {
|
|
292
|
-
|
|
292
|
+
xe as default
|
|
293
293
|
};
|
|
@@ -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 { bN as d, bO as f, bP as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-KQsP8eZ8.js";
|
|
2
|
+
import { bN as d, bO as f, bP as e } from "./index-CoIc-MFY.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 { bN as v, bO as C, bP 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-KQsP8eZ8.js";
|
|
2
|
+
import { bN as v, bO as C, bP as e } from "./index-CoIc-MFY.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { m as
|
|
1
|
+
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { m as K, a as M, u as N, H as q, M as H, f as Q, R as k, S as w, r as j, s as x, e as z, L as P, t as D, D as J, v as Y, T as W, w as X, y as Z, z as ee } from "./index-CoIc-MFY.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
5
|
-
const
|
|
4
|
+
import { useRef as se, useEffect as _, useMemo as T } from "react";
|
|
5
|
+
const L = (a, n, d, l, b, r) => {
|
|
6
6
|
const t = J(a, n, b), s = t.value, o = Y(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
@@ -43,7 +43,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
43
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: a.members?.map(
|
|
46
|
-
(s, o) =>
|
|
46
|
+
(s, o) => L(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
@@ -61,7 +61,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = N(), b = (r, t, s) => {
|
|
63
63
|
const o = P(r.encounterDetails, l);
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ I(
|
|
65
65
|
D,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
@@ -69,7 +69,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => L(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -105,7 +105,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z",
|
|
108
|
+
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", S = {
|
|
109
109
|
observations: ie,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
@@ -113,92 +113,92 @@ 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 =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = K(), { addNotification: s } = M(), { t: o } = N(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => q(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
|
-
|
|
123
|
+
_(() => {
|
|
124
124
|
i.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const V = d[h];
|
|
127
127
|
s({
|
|
128
128
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: V }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = T(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = T(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = T(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: G,
|
|
138
138
|
isError: E,
|
|
139
|
-
refetch:
|
|
139
|
+
refetch: f
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => H(t, p),
|
|
143
143
|
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
Q(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && f();
|
|
150
150
|
},
|
|
151
|
-
[t,
|
|
152
|
-
),
|
|
151
|
+
[t, f]
|
|
152
|
+
), _(() => {
|
|
153
153
|
E && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [E]);
|
|
159
|
-
const
|
|
159
|
+
const O = T(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = k(c), h = w(e);
|
|
162
|
+
return j(h);
|
|
163
|
+
}, [c]), F = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], g =
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], g = G || !y, $ = E && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, C = $ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = O.length > 0 && !g && !$, R = n.titleTranslationKey, v = R ? o(R) : "";
|
|
168
|
+
return /* @__PURE__ */ I(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid":
|
|
172
|
+
"data-testid": R ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
|
-
className:
|
|
174
|
+
className: S.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
x,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId:
|
|
180
|
+
testId: R ? `observations-title-${v}` : "observations-title",
|
|
181
181
|
title: v,
|
|
182
|
-
className:
|
|
182
|
+
className: S.title,
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
B ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: O,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
194
|
z,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: F,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
199
|
loading: g,
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
200
|
+
errorStateMessage: C,
|
|
201
|
+
emptyStateMessage: U,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bQ as we, bR as z, bS as xt, bT as B, bO as q, bP as y, bU as Ro, bV as ye, bW as R, bX as _, bY as k, bZ as N, b_ as A, b$ as bs, c0 as ir, c1 as $e, c2 as U, c3 as Hn, c4 as Vn, c5 as dt, c6 as D, c7 as xs, c8 as cn, c9 as Be, ca as ws, cb as qt, cc as zt, cd as $s, ce as Cs, cf as $n, cg as Ss, ch as Nr, ci as Bt, cj as zo, ck as ks, cl as Es, cm as j, cn as Ur, co as Ms, cp as Ds, cq as sr, cr as As, cs as Ts, ct as zn, cu as Fs, cv as Is, cw as Z, cx as Ps, cy as Os } from "./index-
|
|
1
|
+
import { bQ as we, bR as z, bS as xt, bT as B, bO as q, bP as y, bU as Ro, bV as ye, bW as R, bX as _, bY as k, bZ as N, b_ as A, b$ as bs, c0 as ir, c1 as $e, c2 as U, c3 as Hn, c4 as Vn, c5 as dt, c6 as D, c7 as xs, c8 as cn, c9 as Be, ca as ws, cb as qt, cc as zt, cd as $s, ce as Cs, cf as $n, cg as Ss, ch as Nr, ci as Bt, cj as zo, ck as ks, cl as Es, cm as j, cn as Ur, co as Ms, cp as Ds, cq as sr, cr as As, cs as Ts, ct as zn, cu as Fs, cv as Is, cw as Z, cx as Ps, cy as Os } from "./index-CoIc-MFY.js";
|
|
2
2
|
var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAYA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAWjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAiBtF,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,EACxC,OAAO,CAAC,EAAE,SAAS,KAChB,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;CAC7D;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,
|
|
1
|
+
{"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAYA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAWjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAiBtF,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,EACxC,OAAO,CAAC,EAAE,SAAS,KAChB,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;CAC7D;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAsqBvE,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,aAAa,gBAAgB,EAAE,EAC/B,UAAU,gBAAgB,EAAE,KAC3B,IAoCF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+BAA+B,GAC1C,aAAa,gBAAgB,EAAE,EAC/B,UAAU,gBAAgB,EAAE,KAC3B,IAiCF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,aAAa,gBAAgB,EAAE,EAC/B,UAAU,gBAAgB,EAAE,KAC3B,IAiCF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,GAC/B,aAAa,gBAAgB,EAAE,EAC/B,QAAQ,gBAAgB,EAAE,KACzB,IAyBF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAa,gBAAgB,EAAE,EAC/B,UAAU,gBAAgB,EAAE,KAC3B,IAWF,CAAC;AAuBF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAAI,GAAG,OAAO,KAAG,MAiB7C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,gBAAgB,EAAE,EAC3B,UAAU,gBAAgB,EAAE,KAC3B,OAsDF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,MAAM,GAAG,IAAI,CAQf;AAED,eAAe,yBAAyB,CAAC"}
|