@bahmni/appointments-app 0.0.1-dev.384 → 0.0.1-dev.386
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-SqxTcjQX-YVcdZO9Q.js → DocumentsTable-Ce9p4WA6-DYRTNwME.js} +21 -21
- package/dist/{FormsTable-fLpjpB_m-BnCWDCdl.js → FormsTable-BJBBdfzc-BiGm9mDO.js} +72 -72
- package/dist/{LNWAZHJI-C-2jALZZ.js → LNWAZHJI-T9x4Qj1f.js} +2 -2
- package/dist/{MWZ6AO7Z-DiXtmfqS.js → MWZ6AO7Z-B0GIY9ln.js} +2 -2
- package/dist/{Observations-c3MY7ts2-DbCSwnCM.js → Observations-C3pfbHHQ-D7u1t3t1.js} +20 -20
- package/dist/{YPM2AS64-DXk9lLAx.js → YPM2AS64-CT4lMk0z.js} +1 -1
- package/dist/{index-kRAzelzQ.js → index-BYUNYfJ9.js} +10527 -10526
- package/dist/{index-FXVnBXuy.js → index-DNVeXR6m.js} +22 -22
- package/dist/{index-CA5vvm3B.js → index-TJNrEGTS.js} +24 -24
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { g as G, u as W, L as Y,
|
|
1
|
+
import { jsx as r, jsxs as _, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { g as G, u as W, L as Y, _ as J, a as X, w as Z, K as ee, p as te } from "./index-BYUNYfJ9.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 h } 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
|
+
], _e = /\.(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: g }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, L] = l(
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = G(), { t: n } = W(), { addNotification: U } = Y(), k = Number(a?.pageSize) || 5, [f,
|
|
41
|
+
), E = G(), { t: n } = W(), { addNotification: U } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = p((e) => {
|
|
42
42
|
L(e), w(!0);
|
|
43
|
-
}, []), H =
|
|
43
|
+
}, []), H = p(() => {
|
|
44
44
|
w(!1), L(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: q, isError: y, error: b } = ae({
|
|
48
48
|
queryKey: [
|
|
@@ -61,9 +61,9 @@ const Te = [
|
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
63
|
I(() => {
|
|
64
|
-
i &&
|
|
64
|
+
i && A(i.total);
|
|
65
65
|
}, [i]), I(() => {
|
|
66
|
-
|
|
66
|
+
C(1), A(void 0);
|
|
67
67
|
}, [E]), I(() => {
|
|
68
68
|
y && U({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
@@ -89,24 +89,24 @@ const Te = [
|
|
|
89
89
|
e.signal.aborted || O(t);
|
|
90
90
|
})(), () => e.abort();
|
|
91
91
|
}, [s, o]);
|
|
92
|
-
const K =
|
|
92
|
+
const K = p(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !== u ? (V(t),
|
|
94
|
+
t !== u ? (V(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
96
96
|
[u]
|
|
97
|
-
), N =
|
|
97
|
+
), N = h(
|
|
98
98
|
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
), j =
|
|
100
|
+
), j = h(() => [...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 = h(() => ie(N, n), [N, n]), z = h(
|
|
101
101
|
() => N.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "attachments"
|
|
104
104
|
})),
|
|
105
105
|
[N]
|
|
106
|
-
), T =
|
|
106
|
+
), T = h(
|
|
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__ */ _(x, { 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) || _e.test(e.url ?? ""), D = $.has(t);
|
|
173
|
+
return m === "#" || D ? /* @__PURE__ */ _(
|
|
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__ */ _("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__ */ _(
|
|
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__ */ _("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
197
|
T.length
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as i, jsxs as G, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import { u as ge, g as be, A as Ne, Q as Oe, b as Te, c as Ee, G as Ae, N as Ie, d as _e, m as ve, e as Se, S as Fe, Y as P, w as Be, f as $, E as x, a as Le, K as Q, B as Me, P as Re, p as Ce, i as Ue, j as De } from "./index-BYUNYfJ9.js";
|
|
3
3
|
import { useQueryClient as ke, useQuery as O } from "@tanstack/react-query";
|
|
4
4
|
import { useState as Y, useMemo as d, useCallback as c } from "react";
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
7
|
-
modalHeading:
|
|
5
|
+
const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
|
+
formsTableBody: we,
|
|
7
|
+
modalHeading: qe,
|
|
8
8
|
customAccordianItem: He
|
|
9
9
|
}, Ve = "startConsultation", Pe = ({
|
|
10
|
-
episodeOfCareUuids:
|
|
10
|
+
episodeOfCareUuids: B,
|
|
11
11
|
encounterUuids: m,
|
|
12
12
|
config: J,
|
|
13
|
-
disableActions:
|
|
13
|
+
disableActions: X = !1,
|
|
14
14
|
activeEncounterUuid: h = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } =
|
|
17
|
-
numberOfVisits:
|
|
16
|
+
const { t: n } = ge(), u = be(), [y, L] = Y(!1), [s, M] = Y(null), {
|
|
17
|
+
numberOfVisits: W,
|
|
18
18
|
hideThumbnail: Z = !1,
|
|
19
|
-
forms:
|
|
19
|
+
forms: g
|
|
20
20
|
} = J ?? {}, ee = Ne(
|
|
21
|
-
|
|
22
|
-
), { userPrivileges: b } = Oe(), E = ee && !
|
|
23
|
-
|
|
21
|
+
De.EDIT_OBSERVATIONS
|
|
22
|
+
), { userPrivileges: b } = Oe(), E = ee && !X && !!h, R = Te(
|
|
23
|
+
B,
|
|
24
24
|
m
|
|
25
25
|
), re = ke(), {
|
|
26
|
-
data:
|
|
26
|
+
data: C = [],
|
|
27
27
|
isLoading: U,
|
|
28
|
-
isError:
|
|
28
|
+
isError: D,
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = O({
|
|
32
|
-
queryKey: ["forms", u,
|
|
33
|
-
queryFn: () => Ee(u, void 0,
|
|
34
|
-
enabled: !!u && !
|
|
32
|
+
queryKey: ["forms", u, B],
|
|
33
|
+
queryFn: () => Ee(u, void 0, W),
|
|
34
|
+
enabled: !!u && !R
|
|
35
35
|
}), k = 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: N = [] } = O({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
|
-
queryFn: () =>
|
|
45
|
-
}),
|
|
44
|
+
queryFn: () => Ae()
|
|
45
|
+
}), w = c(
|
|
46
46
|
(e) => {
|
|
47
47
|
const r = N.find((t) => t.name === e);
|
|
48
48
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
@@ -54,23 +54,23 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
54
54
|
},
|
|
55
55
|
[N, b]
|
|
56
56
|
), f = c(
|
|
57
|
-
(e) => !h || e.encounterUuid !== h ? !1 :
|
|
58
|
-
[h,
|
|
59
|
-
),
|
|
57
|
+
(e) => !h || e.encounterUuid !== h ? !1 : w(e.formName),
|
|
58
|
+
[h, w]
|
|
59
|
+
), q = c(
|
|
60
60
|
(e) => N.find((r) => r.name === e)?.uuid,
|
|
61
61
|
[N]
|
|
62
|
-
),
|
|
62
|
+
), A = d(() => {
|
|
63
63
|
if (s)
|
|
64
|
-
return
|
|
65
|
-
}, [s,
|
|
64
|
+
return q(s.formName);
|
|
65
|
+
}, [s, q]), {
|
|
66
66
|
data: l,
|
|
67
67
|
isLoading: te,
|
|
68
68
|
isError: se,
|
|
69
|
-
error:
|
|
69
|
+
error: I
|
|
70
70
|
} = O({
|
|
71
|
-
queryKey: ["formMetadata",
|
|
72
|
-
queryFn: () =>
|
|
73
|
-
enabled: !!
|
|
71
|
+
queryKey: ["formMetadata", A],
|
|
72
|
+
queryFn: () => Ie(A),
|
|
73
|
+
enabled: !!A && y
|
|
74
74
|
}), {
|
|
75
75
|
data: _,
|
|
76
76
|
isLoading: ne,
|
|
@@ -79,7 +79,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
79
79
|
} = O({
|
|
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 qe = "FormsTable-module_formsTableBody__SvGha", we = "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) => Se(e) ? Fe(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((t) => {
|
|
@@ -103,8 +103,8 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
103
103
|
const e = {}, r = (o, t) => {
|
|
104
104
|
for (const a of o)
|
|
105
105
|
if (a.type === "section") {
|
|
106
|
-
const
|
|
107
|
-
r(a.controls ?? [],
|
|
106
|
+
const F = a.label?.value ?? "Section";
|
|
107
|
+
r(a.controls ?? [], F);
|
|
108
108
|
} else
|
|
109
109
|
a.id != null && t && (e[String(a.id)] = t), a.controls && r(a.controls, t);
|
|
110
110
|
};
|
|
@@ -124,23 +124,23 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
124
124
|
l.schema.controls ?? []
|
|
125
125
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
126
126
|
}, [l]), ue = d(() => {
|
|
127
|
-
if (
|
|
128
|
-
return P(
|
|
127
|
+
if (I)
|
|
128
|
+
return P(I).message;
|
|
129
129
|
if (v)
|
|
130
130
|
return P(v).message;
|
|
131
|
-
}, [
|
|
131
|
+
}, [I, 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
137
|
), H = d(
|
|
138
|
-
() => [...
|
|
139
|
-
[
|
|
138
|
+
() => [...p, { key: "actions", header: n("ACTIONS") }],
|
|
139
|
+
[p, n]
|
|
140
140
|
), fe = c(
|
|
141
|
-
(e) => E && e.some((r) => f(r)) ? H :
|
|
142
|
-
[E, f, H,
|
|
143
|
-
),
|
|
141
|
+
(e) => E && e.some((r) => f(r)) ? H : p,
|
|
142
|
+
[E, f, H, 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 qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
151
151
|
(r, o) => {
|
|
152
152
|
const t = o.formName;
|
|
153
153
|
r[t] ??= [];
|
|
154
|
-
const a = o.providers.map((
|
|
154
|
+
const a = o.providers.map((F) => F.providerName).filter(Boolean).join(", ");
|
|
155
155
|
return r[t].push({
|
|
156
156
|
id: o.encounterUuid,
|
|
157
157
|
formName: o.formName,
|
|
158
|
-
recordedOn:
|
|
158
|
+
recordedOn: Be(o.encounterDateTime, n, !0).formattedResult,
|
|
159
159
|
recordedBy: a ?? "--",
|
|
160
160
|
encounterDateTime: o.encounterDateTime,
|
|
161
161
|
encounterUuid: o.encounterUuid
|
|
@@ -172,10 +172,10 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
172
172
|
})
|
|
173
173
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
174
174
|
}, [k, n]), j = c((e) => {
|
|
175
|
-
|
|
176
|
-
}, []),
|
|
177
|
-
|
|
178
|
-
}, []),
|
|
175
|
+
M(e), L(!0);
|
|
176
|
+
}, []), z = c(() => {
|
|
177
|
+
L(!1), M(null);
|
|
178
|
+
}, []), S = c((e) => {
|
|
179
179
|
globalThis.dispatchEvent(
|
|
180
180
|
new CustomEvent(Ve, {
|
|
181
181
|
detail: {
|
|
@@ -187,11 +187,11 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
187
187
|
}
|
|
188
188
|
})
|
|
189
189
|
);
|
|
190
|
-
}, []),
|
|
190
|
+
}, []), K = c(
|
|
191
191
|
(e, r) => {
|
|
192
192
|
switch (r) {
|
|
193
193
|
case "recordedOn":
|
|
194
|
-
return /* @__PURE__ */ i(
|
|
194
|
+
return /* @__PURE__ */ i(Le, { onClick: () => j(e), children: e.recordedOn });
|
|
195
195
|
case "recordedBy":
|
|
196
196
|
return e.recordedBy;
|
|
197
197
|
case "actions":
|
|
@@ -202,34 +202,34 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
202
202
|
kind: "ghost",
|
|
203
203
|
size: "sm",
|
|
204
204
|
testId: `edit-form-${e.encounterUuid}`,
|
|
205
|
-
onClick: () =>
|
|
206
|
-
children: /* @__PURE__ */ i(
|
|
205
|
+
onClick: () => S(e),
|
|
206
|
+
children: /* @__PURE__ */ i(x, {})
|
|
207
207
|
}
|
|
208
208
|
) : null;
|
|
209
209
|
default:
|
|
210
210
|
return null;
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
|
-
[j,
|
|
213
|
+
[j, S, f, n]
|
|
214
214
|
);
|
|
215
|
-
return /* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U ||
|
|
215
|
+
return /* @__PURE__ */ G(ye, { children: [
|
|
216
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || R ? /* @__PURE__ */ i(
|
|
217
217
|
Q,
|
|
218
218
|
{
|
|
219
|
-
headers:
|
|
219
|
+
headers: pe,
|
|
220
220
|
ariaLabel: n("FORMS_HEADING"),
|
|
221
221
|
rows: [],
|
|
222
222
|
loading: U,
|
|
223
|
-
errorStateMessage:
|
|
223
|
+
errorStateMessage: D ? oe?.message : void 0,
|
|
224
224
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
225
|
-
renderCell:
|
|
225
|
+
renderCell: K,
|
|
226
226
|
className: T.formsTableBody,
|
|
227
227
|
dataTestId: "forms-table"
|
|
228
228
|
}
|
|
229
|
-
) : /* @__PURE__ */ i(
|
|
229
|
+
) : /* @__PURE__ */ i(Me, { align: "start", children: V.map((e, r) => {
|
|
230
230
|
const { formName: o, records: t } = e, a = fe(t);
|
|
231
231
|
return /* @__PURE__ */ i(
|
|
232
|
-
|
|
232
|
+
Re,
|
|
233
233
|
{
|
|
234
234
|
title: o,
|
|
235
235
|
className: T.customAccordianItem,
|
|
@@ -245,7 +245,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
245
245
|
errorStateMessage: "",
|
|
246
246
|
sortable: he,
|
|
247
247
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
248
|
-
renderCell:
|
|
248
|
+
renderCell: K,
|
|
249
249
|
className: T.formsTableBody,
|
|
250
250
|
dataTestId: `forms-table-${o}`
|
|
251
251
|
}
|
|
@@ -254,14 +254,14 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "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: z,
|
|
264
|
+
modalHeading: /* @__PURE__ */ G("div", { className: T.modalHeading, children: [
|
|
265
265
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
266
266
|
E && f(s) && /* @__PURE__ */ i(
|
|
267
267
|
$,
|
|
@@ -271,9 +271,9 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
271
271
|
size: "sm",
|
|
272
272
|
testId: `edit-form-modal-${s.encounterUuid}`,
|
|
273
273
|
onClick: () => {
|
|
274
|
-
|
|
274
|
+
z(), S(s);
|
|
275
275
|
},
|
|
276
|
-
children: /* @__PURE__ */ i(
|
|
276
|
+
children: /* @__PURE__ */ i(x, {})
|
|
277
277
|
}
|
|
278
278
|
)
|
|
279
279
|
] }),
|
|
@@ -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 { an as p, ao as d, ap as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CT4lMk0z.js";
|
|
2
|
+
import { an as p, ao as d, ap as e } from "./index-BYUNYfJ9.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 { an as v, ao as C, ap 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-CT4lMk0z.js";
|
|
2
|
+
import { an as v, ao as C, ap as e } from "./index-BYUNYfJ9.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { g as
|
|
2
|
+
import { g as q, L as k, u as N, h as x, x as w, m as z, k as Q, $ as G, I as H, l as M, K as j, R as P, n as D, D as J, z as Y, o as W, q as X, V as Z, y as ee } from "./index-BYUNYfJ9.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 f, useMemo as R } 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(
|
|
@@ -37,13 +37,13 @@ const D = (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
|
+
D,
|
|
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, o) =>
|
|
46
|
+
(s, o) => L(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
@@ -62,14 +62,14 @@ const D = (a, n, d, l, b, r) => {
|
|
|
62
62
|
const { t: l } = N(), b = (r, t, s) => {
|
|
63
63
|
const o = P(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ S(
|
|
65
|
-
|
|
65
|
+
D,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
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,
|
|
@@ -113,14 +113,14 @@ const D = (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 = q(), { addNotification: s } = k(), { t: o } = N(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => x(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
|
-
|
|
123
|
+
f(() => {
|
|
124
124
|
i.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
126
|
const B = d[h];
|
|
@@ -149,22 +149,22 @@ const D = (a, n, d, l, b, r) => {
|
|
|
149
149
|
) && T();
|
|
150
150
|
},
|
|
151
151
|
[t, T]
|
|
152
|
-
),
|
|
152
|
+
), f(() => {
|
|
153
153
|
g && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [g]);
|
|
159
|
-
const
|
|
159
|
+
const I = R(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e = Q(c), h =
|
|
162
|
-
return
|
|
161
|
+
const e = Q(c), h = G(e);
|
|
162
|
+
return H(h);
|
|
163
163
|
}, [c]), A = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], O = F || !y, $ = g && y,
|
|
167
|
+
], O = F || !y, $ = g && y, K = (!c || c.entry?.length === 0 || p.length === 0) && y, U = $ ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = K ? o("NO_OBSERVATIONS_FOUND") : void 0, C = I.length > 0 && !O && !$, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -174,7 +174,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
174
174
|
className: _.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
M,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
@@ -183,21 +183,21 @@ const D = (a, n, d, l, b, r) => {
|
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
C ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: I,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
j,
|
|
195
195
|
{
|
|
196
196
|
headers: A,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
199
|
loading: O,
|
|
200
|
-
errorStateMessage:
|
|
200
|
+
errorStateMessage: U,
|
|
201
201
|
emptyStateMessage: V,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-
|
|
1
|
+
import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-BYUNYfJ9.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|