@bahmni/clinical-app 0.0.1-dev.206 → 0.0.1-dev.209
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-Xq284Jaw-C7ZY2xvS.js → DocumentsTable-D76ekIcO-B9GQDHf2.js} +28 -28
- package/dist/{FormsTable-DLOTuk1I-BtDIA2tA.js → FormsTable-qUtc8I5l-CDVIWJ0i.js} +75 -75
- package/dist/{LNWAZHJI-CWXmXNqr.js → LNWAZHJI-BSNlx7i_.js} +2 -2
- package/dist/{MWZ6AO7Z-BJuvTIEB.js → MWZ6AO7Z-C6UiK4t3.js} +2 -2
- package/dist/{Observations-hudkuWv0-BJONAQTw.js → Observations-CdYZgPQ1-Dw_AUSTl.js} +40 -40
- package/dist/{YPM2AS64-CpCHVa3m.js → YPM2AS64-6Bwyz3g6.js} +1 -1
- package/dist/{index-CnBX-u8j.js → index-BdcGJu2c.js} +22218 -22165
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, jsxs as p, Fragment as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useState as
|
|
4
|
-
const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44",
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { c as K, u as Q, e as W, a as X, V as J, C as Z, x as ee, L as te, b as ae } from "./index-BdcGJu2c.js";
|
|
3
|
+
import { useState as l, useCallback as h, useEffect as C, useMemo as T } from "react";
|
|
4
|
+
const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", le = "_documentImage_1voj8_50", d = {
|
|
5
5
|
documentsTableBody: ne,
|
|
6
6
|
viewAttachmentsLink: oe,
|
|
7
7
|
documentViewerContainer: re,
|
|
@@ -9,8 +9,8 @@ const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11",
|
|
|
9
9
|
attachmentCounter: se,
|
|
10
10
|
attachmentError: ce,
|
|
11
11
|
documentIframe: ie,
|
|
12
|
-
documentImage:
|
|
13
|
-
},
|
|
12
|
+
documentImage: le
|
|
13
|
+
}, me = {
|
|
14
14
|
documentIdentifier: "DOCUMENTS_DOCUMENT_IDENTIFIER",
|
|
15
15
|
documentType: "DOCUMENTS_TYPE",
|
|
16
16
|
uploadedOn: "DOCUMENTS_UPLOADED_ON",
|
|
@@ -20,10 +20,10 @@ const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11",
|
|
|
20
20
|
function j(a) {
|
|
21
21
|
return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
|
|
22
22
|
}
|
|
23
|
-
function ue(a,
|
|
23
|
+
function ue(a, E) {
|
|
24
24
|
return a.map((s) => ({
|
|
25
25
|
key: s,
|
|
26
|
-
header:
|
|
26
|
+
header: E(me[s])
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
29
|
const _e = [
|
|
@@ -32,30 +32,30 @@ const _e = [
|
|
|
32
32
|
"uploadedOn",
|
|
33
33
|
"uploadedBy",
|
|
34
34
|
"action"
|
|
35
|
-
], 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
|
-
const [s, L] =
|
|
35
|
+
], 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 }] : [], ge = ({ config: a, encounterUuids: E }) => {
|
|
36
|
+
const [s, L] = l(!1), [o, w] = l(
|
|
37
37
|
null
|
|
38
|
-
), [R, f] =
|
|
38
|
+
), [R, f] = l(
|
|
39
39
|
/* @__PURE__ */ new Set()
|
|
40
|
-
),
|
|
40
|
+
), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 10, [I, A] = l(1), [m, V] = l($), [k, y] = l(void 0), b = h((e) => {
|
|
41
41
|
w(e), L(!0);
|
|
42
42
|
}, []), F = h(() => {
|
|
43
43
|
L(!1), w(null), f(/* @__PURE__ */ new Set());
|
|
44
|
-
}, []),
|
|
44
|
+
}, []), M = h((e) => {
|
|
45
45
|
f((t) => new Set(t).add(e));
|
|
46
46
|
}, []), { data: u, isLoading: H, isError: D, error: v } = X({
|
|
47
47
|
queryKey: [
|
|
48
48
|
"documents",
|
|
49
|
-
E,
|
|
50
49
|
g,
|
|
50
|
+
E,
|
|
51
51
|
I,
|
|
52
|
-
|
|
52
|
+
m
|
|
53
53
|
],
|
|
54
|
-
enabled: !!
|
|
54
|
+
enabled: !!g,
|
|
55
55
|
queryFn: () => ae(
|
|
56
|
-
E,
|
|
57
56
|
g,
|
|
58
|
-
|
|
57
|
+
E,
|
|
58
|
+
m,
|
|
59
59
|
I
|
|
60
60
|
)
|
|
61
61
|
});
|
|
@@ -63,7 +63,7 @@ const _e = [
|
|
|
63
63
|
u && y(u.total);
|
|
64
64
|
}, [u]), C(() => {
|
|
65
65
|
A(1), y(void 0);
|
|
66
|
-
}, [
|
|
66
|
+
}, [g]), C(() => {
|
|
67
67
|
D && U({
|
|
68
68
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
69
69
|
message: v?.message ?? "",
|
|
@@ -90,9 +90,9 @@ const _e = [
|
|
|
90
90
|
}, [s, o]);
|
|
91
91
|
const q = h(
|
|
92
92
|
(e, t) => {
|
|
93
|
-
t !==
|
|
93
|
+
t !== m ? (V(t), A(1), y(void 0)) : A(e);
|
|
94
94
|
},
|
|
95
|
-
[
|
|
95
|
+
[m]
|
|
96
96
|
), N = T(
|
|
97
97
|
() => a?.fields ?? _e,
|
|
98
98
|
[a?.fields]
|
|
@@ -124,7 +124,7 @@ const _e = [
|
|
|
124
124
|
return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ r(
|
|
125
125
|
J,
|
|
126
126
|
{
|
|
127
|
-
onClick: () =>
|
|
127
|
+
onClick: () => b(e),
|
|
128
128
|
className: d.viewAttachmentsLink,
|
|
129
129
|
"data-testid": `view-attachments-${e.id}`,
|
|
130
130
|
children: n("DOCUMENTS_VIEW_ATTACHMENTS")
|
|
@@ -134,9 +134,9 @@ const _e = [
|
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
|
-
[
|
|
137
|
+
[b, n]
|
|
138
138
|
);
|
|
139
|
-
return /* @__PURE__ */ p(
|
|
139
|
+
return /* @__PURE__ */ p(Y, { children: [
|
|
140
140
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
141
141
|
ee,
|
|
142
142
|
{
|
|
@@ -150,7 +150,7 @@ const _e = [
|
|
|
150
150
|
renderCell: G,
|
|
151
151
|
className: d.documentsTableBody,
|
|
152
152
|
dataTestId: "documents-table",
|
|
153
|
-
pageSize:
|
|
153
|
+
pageSize: m,
|
|
154
154
|
totalItems: k,
|
|
155
155
|
page: I,
|
|
156
156
|
onPageChange: q
|
|
@@ -201,7 +201,7 @@ const _e = [
|
|
|
201
201
|
src: c,
|
|
202
202
|
alt: o.documentIdentifier,
|
|
203
203
|
className: d.documentImage,
|
|
204
|
-
onError: () =>
|
|
204
|
+
onError: () => M(t)
|
|
205
205
|
}
|
|
206
206
|
) : /* @__PURE__ */ r(
|
|
207
207
|
"iframe",
|
|
@@ -209,7 +209,7 @@ const _e = [
|
|
|
209
209
|
src: i ? `${c}#toolbar=0` : c,
|
|
210
210
|
className: d.documentIframe,
|
|
211
211
|
title: o.documentIdentifier,
|
|
212
|
-
onError: () =>
|
|
212
|
+
onError: () => M(t)
|
|
213
213
|
}
|
|
214
214
|
)
|
|
215
215
|
]
|
|
@@ -222,5 +222,5 @@ const _e = [
|
|
|
222
222
|
] });
|
|
223
223
|
};
|
|
224
224
|
export {
|
|
225
|
-
|
|
225
|
+
ge as default
|
|
226
226
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as o, jsxs as p, Fragment as
|
|
2
|
-
import { u as O, c as ae,
|
|
3
|
-
import { useState as
|
|
4
|
-
const Ne = "_formsTableBody_1pd36_1",
|
|
1
|
+
import { jsx as o, jsxs as p, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { u as O, c as ae, d as te, f as oe, a as L, w as ne, C as se, V as de, x as q, Z as me, k as ie, L as le, D as ce, g as k, o as ue, G as K, M as A, t as be, $ as pe, I as _e, S as fe, n as $e, l as he, i as ge, s as ve, h as ye } from "./index-BdcGJu2c.js";
|
|
3
|
+
import { useState as H, useMemo as v, useCallback as C } from "react";
|
|
4
|
+
const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Ae = "_formDetailsContainer_1pd36_25", Fe = "_observation_1pd36_30", Re = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", De = "_groupMembers_1pd36_75", Se = "_memberRow_1pd36_81", Ve = "_memberLabel_1pd36_86", we = "_memberValue_1pd36_94", xe = "_abnormalValue_1pd36_102", Ee = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", qe = "_nestedGroupMembers_1pd36_141", n = {
|
|
5
5
|
formsTableBody: Ne,
|
|
6
|
-
customAccordianItem:
|
|
7
|
-
formContent:
|
|
8
|
-
formDetailsContainer:
|
|
9
|
-
observation:
|
|
6
|
+
customAccordianItem: Le,
|
|
7
|
+
formContent: Ce,
|
|
8
|
+
formDetailsContainer: Ae,
|
|
9
|
+
observation: Fe,
|
|
10
10
|
groupContainer: Re,
|
|
11
|
-
rowContainer:
|
|
12
|
-
groupLabel:
|
|
11
|
+
rowContainer: Ie,
|
|
12
|
+
groupLabel: Me,
|
|
13
13
|
rowLabel: Oe,
|
|
14
14
|
rowValue: Te,
|
|
15
|
-
groupMembers:
|
|
16
|
-
memberRow:
|
|
17
|
-
memberLabel:
|
|
18
|
-
memberValue:
|
|
19
|
-
abnormalValue:
|
|
15
|
+
groupMembers: De,
|
|
16
|
+
memberRow: Se,
|
|
17
|
+
memberLabel: Ve,
|
|
18
|
+
memberValue: we,
|
|
19
|
+
abnormalValue: xe,
|
|
20
20
|
commentSection: Ee,
|
|
21
21
|
commentText: Be,
|
|
22
22
|
nestedGroup: Ge,
|
|
23
23
|
nestedGroupLabel: Ue,
|
|
24
24
|
nestedGroupMembers: qe
|
|
25
|
-
},
|
|
25
|
+
}, j = (e) => {
|
|
26
26
|
const r = be(e);
|
|
27
27
|
return r === "Image" ? /* @__PURE__ */ o(
|
|
28
28
|
pe,
|
|
@@ -31,14 +31,14 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
31
31
|
alt: e,
|
|
32
32
|
id: `${e}-img`
|
|
33
33
|
}
|
|
34
|
-
) : r === "Video" ? /* @__PURE__ */ o(
|
|
35
|
-
},
|
|
34
|
+
) : r === "Video" ? /* @__PURE__ */ o(_e, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ o(fe, { id: `${e}-pdf`, src: e }) : e;
|
|
35
|
+
}, Q = (e) => {
|
|
36
36
|
const r = e.observationValue?.referenceRange?.low?.value, s = e.observationValue?.referenceRange?.high?.value, a = r != null, l = s != null;
|
|
37
37
|
let d = "";
|
|
38
38
|
a && l ? d = ` (${r} - ${s})` : a ? d = ` (>${r})` : l && (d = ` (<${s})`);
|
|
39
39
|
const b = e.observationValue?.isAbnormal === !0;
|
|
40
40
|
return { rangeString: d, isAbnormal: b };
|
|
41
|
-
},
|
|
41
|
+
}, Z = ({
|
|
42
42
|
member: e,
|
|
43
43
|
depth: r = 0,
|
|
44
44
|
memberIndex: s = 0,
|
|
@@ -68,7 +68,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
68
68
|
className: n.nestedGroupMembers,
|
|
69
69
|
"data-testid": `${c}obs-nested-group-members-${t}-${s}`,
|
|
70
70
|
children: e.members?.map((y, N) => /* @__PURE__ */ o(
|
|
71
|
-
|
|
71
|
+
Z,
|
|
72
72
|
{
|
|
73
73
|
member: y,
|
|
74
74
|
depth: r + 1,
|
|
@@ -82,8 +82,8 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
|
-
const { rangeString: h, isAbnormal:
|
|
86
|
-
return /* @__PURE__ */ p(
|
|
85
|
+
const { rangeString: h, isAbnormal: _ } = Q(e), f = K(e, d), $ = f ? j(f) : null;
|
|
86
|
+
return /* @__PURE__ */ p(P, { children: [
|
|
87
87
|
/* @__PURE__ */ p(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
@@ -94,9 +94,9 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
94
94
|
/* @__PURE__ */ p(
|
|
95
95
|
"p",
|
|
96
96
|
{
|
|
97
|
-
className:
|
|
97
|
+
className: A(
|
|
98
98
|
n.memberLabel,
|
|
99
|
-
|
|
99
|
+
_ ? n.abnormalValue : ""
|
|
100
100
|
),
|
|
101
101
|
"data-testid": `${c}obs-member-label-${t}-${s}`,
|
|
102
102
|
children: [
|
|
@@ -108,9 +108,9 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
108
108
|
/* @__PURE__ */ o(
|
|
109
109
|
"div",
|
|
110
110
|
{
|
|
111
|
-
className:
|
|
111
|
+
className: A(
|
|
112
112
|
n.memberValue,
|
|
113
|
-
|
|
113
|
+
_ ? n.abnormalValue : ""
|
|
114
114
|
),
|
|
115
115
|
"data-testid": `${c}obs-member-value-${t}-${s}`,
|
|
116
116
|
children: $
|
|
@@ -138,7 +138,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
138
138
|
formName: s = "",
|
|
139
139
|
comment: a
|
|
140
140
|
}) => {
|
|
141
|
-
const { t: l } = O(), d = e.members && e.members.length > 0, { rangeString: b, isAbnormal: t } =
|
|
141
|
+
const { t: l } = O(), d = e.members && e.members.length > 0, { rangeString: b, isAbnormal: t } = Q(e), c = s ? `${s}-` : "", h = K(e, l), _ = h ? j(h) : null;
|
|
142
142
|
return /* @__PURE__ */ p(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
@@ -154,7 +154,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
154
154
|
/* @__PURE__ */ p(
|
|
155
155
|
"p",
|
|
156
156
|
{
|
|
157
|
-
className:
|
|
157
|
+
className: A(
|
|
158
158
|
d ? n.groupLabel : n.rowLabel,
|
|
159
159
|
!d && t ? n.abnormalValue : ""
|
|
160
160
|
),
|
|
@@ -170,26 +170,26 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
170
170
|
{
|
|
171
171
|
className: n.groupMembers,
|
|
172
172
|
"data-testid": `${c}observation-group-members-${e.display}-${r}`,
|
|
173
|
-
children: e.members?.map((
|
|
174
|
-
|
|
173
|
+
children: e.members?.map((f, $) => /* @__PURE__ */ o(
|
|
174
|
+
Z,
|
|
175
175
|
{
|
|
176
|
-
member:
|
|
176
|
+
member: f,
|
|
177
177
|
depth: 0,
|
|
178
178
|
memberIndex: $,
|
|
179
179
|
formName: s
|
|
180
180
|
},
|
|
181
|
-
`${
|
|
181
|
+
`${f.id}`
|
|
182
182
|
))
|
|
183
183
|
}
|
|
184
184
|
) : /* @__PURE__ */ o(
|
|
185
185
|
"div",
|
|
186
186
|
{
|
|
187
|
-
className:
|
|
187
|
+
className: A(
|
|
188
188
|
n.rowValue,
|
|
189
189
|
t ? n.abnormalValue : ""
|
|
190
190
|
),
|
|
191
191
|
"data-testid": `${c}observation-value-${e.display}-${r}`,
|
|
192
|
-
children:
|
|
192
|
+
children: _
|
|
193
193
|
}
|
|
194
194
|
)
|
|
195
195
|
]
|
|
@@ -210,88 +210,88 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
210
210
|
},
|
|
211
211
|
`${e.id}-${r}`
|
|
212
212
|
);
|
|
213
|
-
},
|
|
213
|
+
}, He = (e) => e ? e.extension?.find(
|
|
214
214
|
(r) => r.url === $e
|
|
215
|
-
)?.valueString : void 0,
|
|
215
|
+
)?.valueString : void 0, Pe = (e) => {
|
|
216
216
|
if (e)
|
|
217
217
|
return e.note?.[0]?.text;
|
|
218
|
-
},
|
|
219
|
-
const s =
|
|
218
|
+
}, Ke = (e, r) => e.entry?.find((s) => s.resource?.id === r)?.resource, M = (e, r) => {
|
|
219
|
+
const s = Ke(e, r);
|
|
220
220
|
return s ? {
|
|
221
|
-
formFieldPath:
|
|
222
|
-
comment:
|
|
221
|
+
formFieldPath: He(s),
|
|
222
|
+
comment: Pe(s)
|
|
223
223
|
} : {};
|
|
224
|
-
},
|
|
224
|
+
}, je = (e, r) => {
|
|
225
225
|
if (!e?.entry || !r)
|
|
226
226
|
return [];
|
|
227
227
|
const s = ue(e);
|
|
228
228
|
return [
|
|
229
229
|
...s.observations.map((a) => {
|
|
230
|
-
const { formFieldPath: l, comment: d } =
|
|
230
|
+
const { formFieldPath: l, comment: d } = M(
|
|
231
231
|
e,
|
|
232
232
|
a.id
|
|
233
233
|
);
|
|
234
234
|
return { obs: a, formFieldPath: l, comment: d };
|
|
235
235
|
}),
|
|
236
236
|
...s.groupedObservations.flatMap((a) => {
|
|
237
|
-
const { formFieldPath: l } =
|
|
237
|
+
const { formFieldPath: l } = M(e, a.id);
|
|
238
238
|
return (a.members ?? []).map((d) => {
|
|
239
|
-
const { comment: b } =
|
|
239
|
+
const { comment: b } = M(e, d.id);
|
|
240
240
|
return { obs: d, formFieldPath: l, comment: b };
|
|
241
241
|
});
|
|
242
242
|
})
|
|
243
243
|
].filter(
|
|
244
244
|
({ formFieldPath: a }) => !a || a.includes(r)
|
|
245
245
|
);
|
|
246
|
-
},
|
|
246
|
+
}, Ye = ({
|
|
247
247
|
episodeOfCareUuids: e,
|
|
248
248
|
encounterUuids: r,
|
|
249
249
|
config: s
|
|
250
250
|
}) => {
|
|
251
|
-
const { t: a } = O(), l = ae(), [d, b] =
|
|
251
|
+
const { t: a } = O(), l = ae(), [d, b] = H(!1), [t, c] = H(null), h = s?.numberOfVisits, _ = te(
|
|
252
252
|
e,
|
|
253
253
|
r
|
|
254
|
-
),
|
|
254
|
+
), f = oe(), {
|
|
255
255
|
data: $ = [],
|
|
256
256
|
isLoading: y,
|
|
257
257
|
isError: N,
|
|
258
258
|
error: z,
|
|
259
|
-
refetch:
|
|
260
|
-
} =
|
|
259
|
+
refetch: Y
|
|
260
|
+
} = L({
|
|
261
261
|
queryKey: ["forms", l, e],
|
|
262
262
|
queryFn: () => he(l, void 0, h),
|
|
263
|
-
enabled: !!l && !
|
|
263
|
+
enabled: !!l && !_
|
|
264
264
|
}), T = v(() => !r || r.length === 0 ? $ : $.filter(
|
|
265
265
|
(m) => r.includes(m.encounterUuid)
|
|
266
|
-
), [$, r]), { data:
|
|
266
|
+
), [$, r]), { data: D = [] } = L({
|
|
267
267
|
queryKey: ["observationForms"],
|
|
268
268
|
queryFn: () => ge()
|
|
269
|
-
}),
|
|
270
|
-
(m) =>
|
|
271
|
-
[
|
|
272
|
-
),
|
|
269
|
+
}), S = C(
|
|
270
|
+
(m) => D.find((u) => u.name === m)?.uuid,
|
|
271
|
+
[D]
|
|
272
|
+
), F = v(() => {
|
|
273
273
|
if (t)
|
|
274
|
-
return
|
|
275
|
-
}, [t,
|
|
276
|
-
queryKey: ["formMetadata",
|
|
277
|
-
queryFn: () => ve(
|
|
278
|
-
enabled: !!
|
|
274
|
+
return S(t.formName);
|
|
275
|
+
}, [t, S]), { isLoading: J, error: V } = L({
|
|
276
|
+
queryKey: ["formMetadata", F],
|
|
277
|
+
queryFn: () => ve(F),
|
|
278
|
+
enabled: !!F && d
|
|
279
279
|
}), {
|
|
280
280
|
data: R,
|
|
281
|
-
isLoading:
|
|
282
|
-
error:
|
|
283
|
-
} =
|
|
281
|
+
isLoading: W,
|
|
282
|
+
error: w
|
|
283
|
+
} = L({
|
|
284
284
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
285
285
|
queryFn: () => ye(t.encounterUuid),
|
|
286
286
|
enabled: !!t?.encounterUuid && d
|
|
287
287
|
});
|
|
288
288
|
ne(
|
|
289
289
|
(m) => {
|
|
290
|
-
m.patientUUID === l && m.updatedConcepts.size > 0 && (
|
|
290
|
+
m.patientUUID === l && m.updatedConcepts.size > 0 && (Y(), f.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
291
291
|
},
|
|
292
292
|
[l]
|
|
293
293
|
);
|
|
294
|
-
const
|
|
294
|
+
const x = v(() => !R || !t?.formName ? [] : je(
|
|
295
295
|
R,
|
|
296
296
|
t.formName
|
|
297
297
|
), [R, t?.formName]), E = v(
|
|
@@ -311,12 +311,12 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
311
311
|
(u, i) => {
|
|
312
312
|
const g = i.formName;
|
|
313
313
|
u[g] ??= [];
|
|
314
|
-
const
|
|
314
|
+
const I = i.providers.map((re) => re.providerName).filter(Boolean).join(", ");
|
|
315
315
|
return u[g].push({
|
|
316
316
|
id: i.encounterUuid,
|
|
317
317
|
formName: i.formName,
|
|
318
318
|
recordedOn: se(i.encounterDateTime, a, !0).formattedResult,
|
|
319
|
-
recordedBy:
|
|
319
|
+
recordedBy: I ?? "--",
|
|
320
320
|
encounterDateTime: i.encounterDateTime,
|
|
321
321
|
encounterUuid: i.encounterUuid
|
|
322
322
|
}), u;
|
|
@@ -327,15 +327,15 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
327
327
|
([u, i]) => ({
|
|
328
328
|
formName: u,
|
|
329
329
|
records: i.sort(
|
|
330
|
-
(g,
|
|
330
|
+
(g, I) => I.encounterDateTime - g.encounterDateTime
|
|
331
331
|
)
|
|
332
332
|
})
|
|
333
333
|
).sort((u, i) => u.formName.localeCompare(i.formName));
|
|
334
|
-
}, [T, a]), G =
|
|
334
|
+
}, [T, a]), G = C((m) => {
|
|
335
335
|
c(m), b(!0);
|
|
336
|
-
}, []), ee =
|
|
336
|
+
}, []), ee = C(() => {
|
|
337
337
|
b(!1), c(null);
|
|
338
|
-
}, []), U =
|
|
338
|
+
}, []), U = C(
|
|
339
339
|
(m, u) => {
|
|
340
340
|
switch (u) {
|
|
341
341
|
case "recordedOn":
|
|
@@ -348,8 +348,8 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
348
348
|
},
|
|
349
349
|
[G]
|
|
350
350
|
);
|
|
351
|
-
return /* @__PURE__ */ p(
|
|
352
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: y || N || B.length === 0 ||
|
|
351
|
+
return /* @__PURE__ */ p(P, { children: [
|
|
352
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: y || N || B.length === 0 || _ ? /* @__PURE__ */ o(
|
|
353
353
|
q,
|
|
354
354
|
{
|
|
355
355
|
headers: E,
|
|
@@ -402,7 +402,7 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
402
402
|
passiveModal: !0,
|
|
403
403
|
size: "md",
|
|
404
404
|
testId: "form-details-modal",
|
|
405
|
-
children: /* @__PURE__ */ o("div", { className: n.formContent, children:
|
|
405
|
+
children: /* @__PURE__ */ o("div", { className: n.formContent, children: J || W ? /* @__PURE__ */ o(ce, { width: "100%", lineCount: 3 }) : V ? /* @__PURE__ */ o("div", { children: k(V).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ o("div", { children: k(w).message ?? a("ERROR_FETCHING_FORM_DATA") }) : x.length > 0 ? /* @__PURE__ */ o("div", { className: n.formDetailsContainer, children: x.map(({ obs: m, comment: u }, i) => /* @__PURE__ */ o(
|
|
406
406
|
ke,
|
|
407
407
|
{
|
|
408
408
|
observation: m,
|
|
@@ -417,5 +417,5 @@ const Ne = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
417
417
|
] });
|
|
418
418
|
};
|
|
419
419
|
export {
|
|
420
|
-
|
|
420
|
+
Ye as default
|
|
421
421
|
};
|
|
@@ -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 {
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-6Bwyz3g6.js";
|
|
2
|
+
import { B as d, E as f, F as e } from "./index-BdcGJu2c.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 {
|
|
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-6Bwyz3g6.js";
|
|
2
|
+
import { B as v, E as C, F as e } from "./index-BdcGJu2c.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|