@bahmni/home-app 0.0.1-dev.410 → 0.0.1-dev.413
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-DYaZZTBA-BGIdX9z8.js → DocumentsTable-CMaU8zGA-DdgAfM3o.js} +15 -15
- package/dist/{FormsTable-m3xk-F34-w7lp3V8x.js → FormsTable-CXDYWNj6-Ced7qV0T.js} +42 -42
- package/dist/{LNWAZHJI-COuCx9k4.js → LNWAZHJI-T09Aneeq.js} +2 -2
- package/dist/{MWZ6AO7Z-Dc6UU3Iv.js → MWZ6AO7Z-CIWptg56.js} +2 -2
- package/dist/{Observations-BjPcu9m0-DOXG3rEE.js → Observations-DH0ifLsl-BWt_tzCn.js} +13 -13
- package/dist/{YPM2AS64-VlHi9vm1.js → YPM2AS64-02MAArMd.js} +1 -1
- package/dist/{index-xbJFIh8C.js → index-58kY8i4d.js} +34106 -33685
- package/dist/{index-D_JDMbG9.js → index-CTR2Tvfi.js} +10 -10
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { v as x, u as G, z as W,
|
|
1
|
+
import { jsx as r, jsxs as h, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { v as x, u as G, z as W, h as J, q as X, w as Z, Y as ee, p as te } from "./index-58kY8i4d.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as l, useCallback as
|
|
4
|
+
import { useState as l, useCallback as p, 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 = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
@@ -33,16 +33,16 @@ const Te = [
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
|
-
],
|
|
36
|
+
], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids: E }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), g = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [q, A] = l(void 0), M =
|
|
41
|
+
), g = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [q, A] = l(void 0), M = p((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
|
-
}, []), F =
|
|
43
|
+
}, []), F = p(() => {
|
|
44
44
|
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
45
|
-
}, []), v =
|
|
45
|
+
}, []), v = p((e) => {
|
|
46
46
|
O((t) => new Set(t).add(e));
|
|
47
47
|
}, []), { data: i, isLoading: H, isError: y, error: b } = ae({
|
|
48
48
|
queryKey: [
|
|
@@ -89,7 +89,7 @@ const Te = [
|
|
|
89
89
|
e.signal.aborted || O(t);
|
|
90
90
|
})(), () => e.abort();
|
|
91
91
|
}, [s, o]);
|
|
92
|
-
const z =
|
|
92
|
+
const z = p(
|
|
93
93
|
(e, t) => {
|
|
94
94
|
t !== u ? (V(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
@@ -106,7 +106,7 @@ const Te = [
|
|
|
106
106
|
), T = _(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
|
-
), Q =
|
|
109
|
+
), Q = p(
|
|
110
110
|
(e, t) => {
|
|
111
111
|
switch (t) {
|
|
112
112
|
case "documentIdentifier":
|
|
@@ -137,7 +137,7 @@ const Te = [
|
|
|
137
137
|
},
|
|
138
138
|
[M, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ h(Y, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
@@ -169,14 +169,14 @@ 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) ||
|
|
173
|
-
return m === "#" || D ? /* @__PURE__ */
|
|
172
|
+
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), D = $.has(t);
|
|
173
|
+
return m === "#" || D ? /* @__PURE__ */ h(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
177
177
|
"data-testid": `attachment-error-${t}`,
|
|
178
178
|
children: [
|
|
179
|
-
T.length > 1 && /* @__PURE__ */
|
|
179
|
+
T.length > 1 && /* @__PURE__ */ h("p", { className: d.attachmentCounter, children: [
|
|
180
180
|
t + 1,
|
|
181
181
|
"/",
|
|
182
182
|
T.length
|
|
@@ -185,13 +185,13 @@ const Te = [
|
|
|
185
185
|
]
|
|
186
186
|
},
|
|
187
187
|
`${o.id}-${e.url}`
|
|
188
|
-
) : /* @__PURE__ */
|
|
188
|
+
) : /* @__PURE__ */ h(
|
|
189
189
|
"div",
|
|
190
190
|
{
|
|
191
191
|
className: d.attachmentItem,
|
|
192
192
|
"data-testid": `attachment-item-${t}`,
|
|
193
193
|
children: [
|
|
194
|
-
T.length > 1 && /* @__PURE__ */
|
|
194
|
+
T.length > 1 && /* @__PURE__ */ h("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
197
|
T.length
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as n, jsxs as P, Fragment as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useQueryClient as we, useQuery as
|
|
1
|
+
import { jsx as n, jsxs as P, Fragment as be } from "react/jsx-runtime";
|
|
2
|
+
import { u as ge, v as Te, t as he, e as Oe, a as Ne, b as Ie, c as Ae, y as Ee, d as _e, m as ve, i as Fe, f as Me, g as Ce, S as z, w as Be, A as G, V as K, q as Re, Y as j, P as Se, F as Le, p as Ue, s as De, C as qe } from "./index-58kY8i4d.js";
|
|
3
|
+
import { useQueryClient as we, useQuery as h } from "@tanstack/react-query";
|
|
4
4
|
import { useState as Q, useMemo as i, useCallback as d } from "react";
|
|
5
5
|
const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", O = {
|
|
6
6
|
formsTableBody: ke,
|
|
@@ -11,54 +11,54 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
11
11
|
encounterUuids: l,
|
|
12
12
|
config: Y,
|
|
13
13
|
disableActions: Z = !1,
|
|
14
|
-
activeEncounterUuid:
|
|
14
|
+
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t } =
|
|
16
|
+
const { t } = ge(), m = Te(), [p, M] = Q(!1), [o, C] = Q(null), {
|
|
17
17
|
numberOfVisits: X,
|
|
18
18
|
hideThumbnail: J = !1,
|
|
19
|
-
forms:
|
|
20
|
-
} = Y ?? {}, W =
|
|
19
|
+
forms: b
|
|
20
|
+
} = Y ?? {}, W = he(
|
|
21
21
|
qe.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges:
|
|
22
|
+
), { userPrivileges: g } = Oe(), N = W && !Z && !!y, B = Ne(
|
|
23
23
|
F,
|
|
24
24
|
l
|
|
25
25
|
), ee = we(), {
|
|
26
|
-
data:
|
|
27
|
-
isLoading:
|
|
26
|
+
data: R = [],
|
|
27
|
+
isLoading: S,
|
|
28
28
|
isError: L,
|
|
29
29
|
error: re,
|
|
30
30
|
refetch: ae
|
|
31
|
-
} =
|
|
31
|
+
} = h({
|
|
32
32
|
queryKey: ["forms", m, F],
|
|
33
33
|
queryFn: () => Ie(m, void 0, X),
|
|
34
|
-
enabled: !!m && !
|
|
34
|
+
enabled: !!m && !B
|
|
35
35
|
}), U = i(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = R;
|
|
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(b) && b.length > 0 && (e = e.filter(
|
|
40
|
+
(r) => b.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [R, l, b]), { data: T = [] } = h({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => Ae()
|
|
45
45
|
}), D = d(
|
|
46
46
|
(e) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = T.find((s) => s.name === e);
|
|
48
48
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
49
|
-
if (!
|
|
50
|
-
const a = new Set(
|
|
49
|
+
if (!g || g.length === 0) return !1;
|
|
50
|
+
const a = new Set(g.map((s) => s.name));
|
|
51
51
|
return r.privileges.some(
|
|
52
52
|
(s) => a.has(s.privilegeName) && s.editable
|
|
53
53
|
);
|
|
54
54
|
},
|
|
55
|
-
[
|
|
55
|
+
[T, g]
|
|
56
56
|
), u = d(
|
|
57
|
-
(e) => !
|
|
58
|
-
[
|
|
57
|
+
(e) => !y || e.encounterUuid !== y ? !1 : D(e.formName),
|
|
58
|
+
[y, D]
|
|
59
59
|
), q = d(
|
|
60
|
-
(e) =>
|
|
61
|
-
[
|
|
60
|
+
(e) => T.find((r) => r.name === e)?.uuid,
|
|
61
|
+
[T]
|
|
62
62
|
), I = i(() => {
|
|
63
63
|
if (o)
|
|
64
64
|
return q(o.formName);
|
|
@@ -67,19 +67,19 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
67
67
|
isLoading: oe,
|
|
68
68
|
isError: te,
|
|
69
69
|
error: A
|
|
70
|
-
} =
|
|
70
|
+
} = h({
|
|
71
71
|
queryKey: ["formMetadata", I],
|
|
72
72
|
queryFn: () => Ee(I),
|
|
73
|
-
enabled: !!I &&
|
|
73
|
+
enabled: !!I && p
|
|
74
74
|
}), {
|
|
75
75
|
data: E,
|
|
76
76
|
isLoading: se,
|
|
77
77
|
isError: ne,
|
|
78
78
|
error: _
|
|
79
|
-
} =
|
|
79
|
+
} = h({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", o?.encounterUuid],
|
|
81
81
|
queryFn: () => _e(o.encounterUuid),
|
|
82
|
-
enabled: !!o?.encounterUuid &&
|
|
82
|
+
enabled: !!o?.encounterUuid && p
|
|
83
83
|
});
|
|
84
84
|
ve(
|
|
85
85
|
(e) => {
|
|
@@ -88,7 +88,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
88
88
|
[m]
|
|
89
89
|
);
|
|
90
90
|
const ie = i(() => !E?.entry || !o?.formName ? [] : E.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Me(e)?.toLowerCase() === o.formName.toLowerCase() : !0), [E, o?.formName]), { controlOrder: de, sectionMap: le, conceptDatatypeMap: me } = i(
|
|
91
|
-
() =>
|
|
91
|
+
() => Ce(w?.schema),
|
|
92
92
|
[w]
|
|
93
93
|
), ue = i(() => {
|
|
94
94
|
if (A)
|
|
@@ -107,7 +107,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
107
107
|
), ce = d(
|
|
108
108
|
(e) => N && e.some((r) => u(r)) ? k : c,
|
|
109
109
|
[N, u, k, c]
|
|
110
|
-
), fe = c,
|
|
110
|
+
), fe = c, ye = i(
|
|
111
111
|
() => [
|
|
112
112
|
{ key: "recordedOn", sortable: !0 },
|
|
113
113
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -118,11 +118,11 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
118
118
|
(r, a) => {
|
|
119
119
|
const s = a.formName;
|
|
120
120
|
r[s] ??= [];
|
|
121
|
-
const f = a.providers.map((
|
|
121
|
+
const f = a.providers.map((pe) => pe.providerName).filter(Boolean).join(", ");
|
|
122
122
|
return r[s].push({
|
|
123
123
|
id: a.encounterUuid,
|
|
124
124
|
formName: a.formName,
|
|
125
|
-
recordedOn:
|
|
125
|
+
recordedOn: Be(a.encounterDateTime, t, !0).formattedResult,
|
|
126
126
|
recordedBy: f ?? "--",
|
|
127
127
|
encounterDateTime: a.encounterDateTime,
|
|
128
128
|
encounterUuid: a.encounterUuid
|
|
@@ -139,9 +139,9 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
139
139
|
})
|
|
140
140
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
141
141
|
}, [U, t]), H = d((e) => {
|
|
142
|
-
|
|
142
|
+
C(e), M(!0);
|
|
143
143
|
}, []), $ = d(() => {
|
|
144
|
-
M(!1),
|
|
144
|
+
M(!1), C(null);
|
|
145
145
|
}, []), v = d((e) => {
|
|
146
146
|
globalThis.dispatchEvent(
|
|
147
147
|
new CustomEvent($e, {
|
|
@@ -158,7 +158,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
158
158
|
(e, r) => {
|
|
159
159
|
switch (r) {
|
|
160
160
|
case "recordedOn":
|
|
161
|
-
return /* @__PURE__ */ n(
|
|
161
|
+
return /* @__PURE__ */ n(Re, { onClick: () => H(e), children: e.recordedOn });
|
|
162
162
|
case "recordedBy":
|
|
163
163
|
return e.recordedBy;
|
|
164
164
|
case "actions":
|
|
@@ -179,21 +179,21 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
179
179
|
},
|
|
180
180
|
[H, v, u, t]
|
|
181
181
|
);
|
|
182
|
-
return /* @__PURE__ */ P(
|
|
183
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
182
|
+
return /* @__PURE__ */ P(be, { children: [
|
|
183
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: S || L || V.length === 0 || B ? /* @__PURE__ */ n(
|
|
184
184
|
j,
|
|
185
185
|
{
|
|
186
186
|
headers: fe,
|
|
187
187
|
ariaLabel: t("FORMS_HEADING"),
|
|
188
188
|
rows: [],
|
|
189
|
-
loading:
|
|
189
|
+
loading: S,
|
|
190
190
|
errorStateMessage: L ? re?.message : void 0,
|
|
191
191
|
emptyStateMessage: t("FORMS_UNAVAILABLE"),
|
|
192
192
|
renderCell: x,
|
|
193
193
|
className: O.formsTableBody,
|
|
194
194
|
dataTestId: "forms-table"
|
|
195
195
|
}
|
|
196
|
-
) : /* @__PURE__ */ n(
|
|
196
|
+
) : /* @__PURE__ */ n(Se, { align: "start", children: V.map((e, r) => {
|
|
197
197
|
const { formName: a, records: s } = e, f = ce(s);
|
|
198
198
|
return /* @__PURE__ */ n(
|
|
199
199
|
Le,
|
|
@@ -210,7 +210,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
210
210
|
rows: s,
|
|
211
211
|
loading: !1,
|
|
212
212
|
errorStateMessage: "",
|
|
213
|
-
sortable:
|
|
213
|
+
sortable: ye,
|
|
214
214
|
emptyStateMessage: t("FORMS_UNAVAILABLE"),
|
|
215
215
|
renderCell: x,
|
|
216
216
|
className: O.formsTableBody,
|
|
@@ -221,12 +221,12 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
221
221
|
a
|
|
222
222
|
);
|
|
223
223
|
}) }) }),
|
|
224
|
-
|
|
224
|
+
p && o && /* @__PURE__ */ n(
|
|
225
225
|
Ue,
|
|
226
226
|
{
|
|
227
227
|
id: "modalIdForActionAreaLayout",
|
|
228
228
|
portalId: "main-display-area",
|
|
229
|
-
open:
|
|
229
|
+
open: p,
|
|
230
230
|
onRequestClose: $,
|
|
231
231
|
modalHeading: /* @__PURE__ */ P("div", { className: O.modalHeading, children: [
|
|
232
232
|
/* @__PURE__ */ n("span", { children: o.formName }),
|
|
@@ -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 { $ as d, a0 as f, a1 as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-02MAArMd.js";
|
|
2
|
+
import { $ as d, a0 as f, a1 as e } from "./index-58kY8i4d.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 { $ as v, a0 as C, a1 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-02MAArMd.js";
|
|
2
|
+
import { $ as v, a0 as C, a1 as e } from "./index-58kY8i4d.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as I, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { v as
|
|
2
|
+
import { v as x, z as G, u as V, l as H, a as Q, j, k as Y, m as J, n as P, M as W, o as X, H as Z, r as ee, Y as ae, x as se, B, E as re, D as te, w as ie, G as oe, I as ne, J as de, N as le } from "./index-58kY8i4d.js";
|
|
3
3
|
import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as me, useEffect as L, useMemo as g } from "react";
|
|
5
5
|
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", he = "Observations-module_secondary__14nuS", O = {
|
|
@@ -132,27 +132,27 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: r = [],
|
|
133
133
|
hideThumbnail: t = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d, m = me(/* @__PURE__ */ new Set()), i =
|
|
135
|
+
} = d, m = me(/* @__PURE__ */ new Set()), i = x(), { addNotification: p } = G(), { t: c } = V(), b = ce({
|
|
136
136
|
queries: u.map((a) => ({
|
|
137
137
|
queryKey: Re(a),
|
|
138
|
-
queryFn: () =>
|
|
138
|
+
queryFn: () => H(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
142
|
L(() => {
|
|
143
|
-
const a = b.some((
|
|
143
|
+
const a = b.some((q) => q.isError), y = m.current.size > 0;
|
|
144
144
|
a && !y ? (p({
|
|
145
145
|
title: c("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: c("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
148
|
}), m.current.add(0)) : !a && y && m.current.clear();
|
|
149
149
|
}, [b, p, c]);
|
|
150
|
-
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), v = g(() => [.../* @__PURE__ */ new Set([...T, ...r])], [T, r]), h = g(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), R = e === "latest" || e === "latest-encounter",
|
|
150
|
+
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), v = g(() => [.../* @__PURE__ */ new Set([...T, ...r])], [T, r]), h = g(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), R = e === "latest" || e === "latest-encounter", F = Q(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
154
|
data: _,
|
|
155
|
-
isLoading:
|
|
155
|
+
isLoading: w,
|
|
156
156
|
isError: N,
|
|
157
157
|
refetch: S
|
|
158
158
|
} = ue({
|
|
@@ -171,7 +171,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
171
171
|
v,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && v.length > 0 && h && !
|
|
174
|
+
enabled: !!i && v.length > 0 && h && !F
|
|
175
175
|
});
|
|
176
176
|
J(
|
|
177
177
|
(a) => {
|
|
@@ -193,11 +193,11 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
193
193
|
e === "latest-encounter" && (a = W(a));
|
|
194
194
|
const y = X(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [_, e]),
|
|
196
|
+
}, [_, e]), k = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A =
|
|
200
|
+
], A = w || !h, D = N && h, C = (!_ || _.entry?.length === 0 || v.length === 0) && h, K = D ? c("ERROR_FETCHING_OBSERVATIONS") : null, z = C ? c("NO_OBSERVATIONS_FOUND") : void 0, M = $.length > 0 && !A && !D, f = d.titleTranslationKey, E = f ? c(f) : "";
|
|
201
201
|
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
@@ -216,7 +216,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
216
216
|
children: /* @__PURE__ */ n("p", { children: E })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
219
|
+
M ? /* @__PURE__ */ n(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
@@ -226,12 +226,12 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
226
226
|
) : /* @__PURE__ */ n(
|
|
227
227
|
ae,
|
|
228
228
|
{
|
|
229
|
-
headers:
|
|
229
|
+
headers: k,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: c("OBSERVATIONS"),
|
|
232
232
|
loading: A,
|
|
233
|
-
errorStateMessage:
|
|
234
|
-
emptyStateMessage:
|
|
233
|
+
errorStateMessage: K,
|
|
234
|
+
emptyStateMessage: z ?? c("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a2 as we, a3 as z, a4 as xt, a5 as B, a0 as q, a1 as y, a6 as Ro, a7 as ye, a8 as R, a9 as _, aa as k, ab as N, ac as A, ad as bs, ae as ir, af as $e, ag as G, ah as Hn, ai as Vn, aj as dt, ak as D, al as xs, am as cn, an as Be, ao as ws, ap as qt, aq as zt, ar as $s, as as Cs, at as $n, au as Ss, av as Nr, aw as Bt, ax as zo, ay as ks, az as Es, aA as j, aB as Gr, aC as Ms, aD as Ds, aE as sr, aF as As, aG as Ts, aH as zn, aI as Fs, aJ as Is, aK as Z, aL as Ps, aM as Ls } from "./index-
|
|
1
|
+
import { a2 as we, a3 as z, a4 as xt, a5 as B, a0 as q, a1 as y, a6 as Ro, a7 as ye, a8 as R, a9 as _, aa as k, ab as N, ac as A, ad as bs, ae as ir, af as $e, ag as G, ah as Hn, ai as Vn, aj as dt, ak as D, al as xs, am as cn, an as Be, ao as ws, ap as qt, aq as zt, ar as $s, as as Cs, at as $n, au as Ss, av as Nr, aw as Bt, ax as zo, ay as ks, az as Es, aA as j, aB as Gr, aC as Ms, aD as Ds, aE as sr, aF as As, aG as Ts, aH as zn, aI as Fs, aJ as Is, aK as Z, aL as Ps, aM as Ls } from "./index-58kY8i4d.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|