@bahmni/appointments-app 0.0.1-dev.214 → 0.0.1-dev.215
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-E_qtt95j-DVI1RI20.js → DocumentsTable-fzVaPEDf-DOOqOOKE.js} +41 -41
- package/dist/{FormsTable-BrfHufyk-FFsPIdO8.js → FormsTable-jpNE9pzC-TG5gdiOo.js} +52 -52
- package/dist/{LNWAZHJI-Bks2qUO9.js → LNWAZHJI-CLYlIjsZ.js} +2 -2
- package/dist/{MWZ6AO7Z-Bglnv64k.js → MWZ6AO7Z-CL71PInM.js} +2 -2
- package/dist/{Observations-MHo-cJ_h-CQO-BUev.js → Observations-CVJq7iSk-DiJewdz-.js} +52 -52
- package/dist/{YPM2AS64-DAECvXSV.js → YPM2AS64-Bpoe3cvd.js} +1 -1
- package/dist/{index-CYfTbWhQ.js → index-CU8j8cbs.js} +25943 -25739
- package/dist/{index-CefYeYSW.js → index-D_WlGA5d.js} +16 -16
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { c as K, u as Q, e as W, a as J,
|
|
3
|
-
import { useState as l, useCallback as
|
|
1
|
+
import { jsx as r, jsxs as _, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { c as K, u as Q, e as W, a as J, H as X, T as Z, x as ee, R as te, p as ae } from "./index-CU8j8cbs.js";
|
|
3
|
+
import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
|
|
4
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,
|
|
@@ -17,7 +17,7 @@ const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11",
|
|
|
17
17
|
uploadedBy: "DOCUMENTS_UPLOADED_BY",
|
|
18
18
|
action: "DOCUMENTS_ACTION"
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function R(a) {
|
|
21
21
|
return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
|
|
22
22
|
}
|
|
23
23
|
function ue(a, g) {
|
|
@@ -26,29 +26,29 @@ function ue(a, g) {
|
|
|
26
26
|
header: g(me[s])
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const pe = [
|
|
30
30
|
"documentIdentifier",
|
|
31
31
|
"documentType",
|
|
32
32
|
"uploadedOn",
|
|
33
33
|
"uploadedBy",
|
|
34
34
|
"action"
|
|
35
|
-
],
|
|
35
|
+
], _e = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, j = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ee = ({ config: a, encounterUuids: g }) => {
|
|
36
36
|
const [s, w] = l(!1), [o, L] = l(
|
|
37
37
|
null
|
|
38
|
-
), [
|
|
38
|
+
), [B, I] = l(
|
|
39
39
|
/* @__PURE__ */ new Set()
|
|
40
|
-
), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [
|
|
40
|
+
), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [H, y] = l(void 0), M = h((e) => {
|
|
41
41
|
L(e), w(!0);
|
|
42
|
-
}, []),
|
|
43
|
-
w(!1), L(null),
|
|
44
|
-
}, []), b =
|
|
45
|
-
|
|
46
|
-
}, []), { data: u, isLoading:
|
|
42
|
+
}, []), V = h(() => {
|
|
43
|
+
w(!1), L(null), I(/* @__PURE__ */ new Set());
|
|
44
|
+
}, []), b = h((e) => {
|
|
45
|
+
I((t) => new Set(t).add(e));
|
|
46
|
+
}, []), { data: u, isLoading: F, isError: D, error: v } = J({
|
|
47
47
|
queryKey: [
|
|
48
48
|
"documents",
|
|
49
49
|
E,
|
|
50
50
|
g,
|
|
51
|
-
|
|
51
|
+
C,
|
|
52
52
|
m
|
|
53
53
|
],
|
|
54
54
|
enabled: !!E,
|
|
@@ -56,26 +56,26 @@ const _e = [
|
|
|
56
56
|
E,
|
|
57
57
|
g,
|
|
58
58
|
m,
|
|
59
|
-
|
|
59
|
+
C
|
|
60
60
|
)
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
f(() => {
|
|
63
63
|
u && y(u.total);
|
|
64
|
-
}, [u]),
|
|
64
|
+
}, [u]), f(() => {
|
|
65
65
|
A(1), y(void 0);
|
|
66
|
-
}, [E]),
|
|
66
|
+
}, [E]), f(() => {
|
|
67
67
|
D && U({
|
|
68
68
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
69
69
|
message: v?.message ?? "",
|
|
70
70
|
type: "error"
|
|
71
71
|
});
|
|
72
|
-
}, [D, v, U, n]),
|
|
72
|
+
}, [D, v, U, n]), f(() => {
|
|
73
73
|
const e = new AbortController();
|
|
74
74
|
return (async () => {
|
|
75
75
|
if (!s || !o) return;
|
|
76
|
-
const t = /* @__PURE__ */ new Set(), c =
|
|
76
|
+
const t = /* @__PURE__ */ new Set(), c = j(o);
|
|
77
77
|
for (let i = 0; i < c.length; i++) {
|
|
78
|
-
const S =
|
|
78
|
+
const S = R(c[i].url);
|
|
79
79
|
try {
|
|
80
80
|
(await fetch(S, {
|
|
81
81
|
method: "HEAD",
|
|
@@ -85,16 +85,16 @@ const _e = [
|
|
|
85
85
|
O instanceof Error && O.name !== "AbortError" && t.add(i);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
e.signal.aborted ||
|
|
88
|
+
e.signal.aborted || I(t);
|
|
89
89
|
})(), () => e.abort();
|
|
90
90
|
}, [s, o]);
|
|
91
|
-
const q =
|
|
91
|
+
const q = h(
|
|
92
92
|
(e, t) => {
|
|
93
|
-
t !== m ? (
|
|
93
|
+
t !== m ? (k(t), A(1), y(void 0)) : A(e);
|
|
94
94
|
},
|
|
95
95
|
[m]
|
|
96
96
|
), N = T(
|
|
97
|
-
() => a?.fields ??
|
|
97
|
+
() => a?.fields ?? pe,
|
|
98
98
|
[a?.fields]
|
|
99
99
|
), x = T(() => [...u?.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), [u]), P = T(() => ue(N, n), [N, n]), z = T(
|
|
100
100
|
() => N.map((e) => ({
|
|
@@ -102,10 +102,10 @@ const _e = [
|
|
|
102
102
|
sortable: e !== "action"
|
|
103
103
|
})),
|
|
104
104
|
[N]
|
|
105
|
-
),
|
|
106
|
-
() => o ?
|
|
105
|
+
), p = T(
|
|
106
|
+
() => o ? j(o) : [],
|
|
107
107
|
[o]
|
|
108
|
-
), G =
|
|
108
|
+
), G = h(
|
|
109
109
|
(e, t) => {
|
|
110
110
|
switch (t) {
|
|
111
111
|
case "documentIdentifier":
|
|
@@ -136,14 +136,14 @@ const _e = [
|
|
|
136
136
|
},
|
|
137
137
|
[M, n]
|
|
138
138
|
);
|
|
139
|
-
return /* @__PURE__ */
|
|
139
|
+
return /* @__PURE__ */ _(Y, { children: [
|
|
140
140
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
141
141
|
ee,
|
|
142
142
|
{
|
|
143
143
|
headers: P,
|
|
144
144
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
145
145
|
rows: x,
|
|
146
|
-
loading:
|
|
146
|
+
loading: F,
|
|
147
147
|
errorStateMessage: D ? v?.message : null,
|
|
148
148
|
sortable: z,
|
|
149
149
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
@@ -151,8 +151,8 @@ const _e = [
|
|
|
151
151
|
className: d.documentsTableBody,
|
|
152
152
|
dataTestId: "documents-table",
|
|
153
153
|
pageSize: m,
|
|
154
|
-
totalItems:
|
|
155
|
-
page:
|
|
154
|
+
totalItems: H,
|
|
155
|
+
page: C,
|
|
156
156
|
onPageChange: q
|
|
157
157
|
}
|
|
158
158
|
) }),
|
|
@@ -162,38 +162,38 @@ const _e = [
|
|
|
162
162
|
id: "modalIdForActionAreaLayout",
|
|
163
163
|
portalId: "main-display-area",
|
|
164
164
|
open: s,
|
|
165
|
-
onRequestClose:
|
|
165
|
+
onRequestClose: V,
|
|
166
166
|
modalHeading: o.documentIdentifier,
|
|
167
167
|
passiveModal: !0,
|
|
168
168
|
size: "lg",
|
|
169
169
|
testId: "document-view-modal",
|
|
170
|
-
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children:
|
|
171
|
-
const c =
|
|
172
|
-
return c === "#" || O ? /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: p.map((e, t) => {
|
|
171
|
+
const c = R(e.url), i = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || _e.test(e.url ?? ""), O = B.has(t);
|
|
172
|
+
return c === "#" || O ? /* @__PURE__ */ _(
|
|
173
173
|
"div",
|
|
174
174
|
{
|
|
175
175
|
className: d.attachmentError,
|
|
176
176
|
"data-testid": `attachment-error-${t}`,
|
|
177
177
|
children: [
|
|
178
|
-
|
|
178
|
+
p.length > 1 && /* @__PURE__ */ _("p", { className: d.attachmentCounter, children: [
|
|
179
179
|
t + 1,
|
|
180
180
|
"/",
|
|
181
|
-
|
|
181
|
+
p.length
|
|
182
182
|
] }),
|
|
183
183
|
/* @__PURE__ */ r("p", { children: n("DOCUMENTS_ERROR_LOADING_ATTACHMENT") })
|
|
184
184
|
]
|
|
185
185
|
},
|
|
186
186
|
`${o.id}-${e.url}`
|
|
187
|
-
) : /* @__PURE__ */
|
|
187
|
+
) : /* @__PURE__ */ _(
|
|
188
188
|
"div",
|
|
189
189
|
{
|
|
190
190
|
className: d.attachmentItem,
|
|
191
191
|
"data-testid": `attachment-item-${t}`,
|
|
192
192
|
children: [
|
|
193
|
-
|
|
193
|
+
p.length > 1 && /* @__PURE__ */ _("p", { className: d.attachmentCounter, children: [
|
|
194
194
|
t + 1,
|
|
195
195
|
"/",
|
|
196
|
-
|
|
196
|
+
p.length
|
|
197
197
|
] }),
|
|
198
198
|
S ? /* @__PURE__ */ r(
|
|
199
199
|
"img",
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as o, jsxs as _, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import { u as M, c as te,
|
|
3
|
-
import { useState as
|
|
4
|
-
const Te = "_formsTableBody_1pd36_1",
|
|
2
|
+
import { u as M, c as te, i as oe, b as ne, a as F, w as se, T as de, H as me, x as P, j as ie, F as le, R as ce, I as ue, Z as H, l as be, G as K, d as A, f as pe, k as _e, P as fe, B as he, s as $e, h as ge, g as ve, m as ye, n as Ne } from "./index-CU8j8cbs.js";
|
|
3
|
+
import { useState as k, useMemo as y, useCallback as R } from "react";
|
|
4
|
+
const Te = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Re = "_formContent_1pd36_18", Ae = "_formDetailsContainer_1pd36_25", Le = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Oe = "_groupLabel_1pd36_48", Me = "_rowLabel_1pd36_58", we = "_rowValue_1pd36_67", xe = "_groupMembers_1pd36_75", Ve = "_memberRow_1pd36_81", De = "_memberLabel_1pd36_86", Se = "_memberValue_1pd36_94", Be = "_abnormalValue_1pd36_102", Ee = "_commentSection_1pd36_110", Ge = "_commentText_1pd36_116", Ue = "_nestedGroup_1pd36_125", qe = "_nestedGroupLabel_1pd36_132", Pe = "_nestedGroupMembers_1pd36_141", n = {
|
|
5
5
|
formsTableBody: Te,
|
|
6
|
-
customAccordianItem:
|
|
7
|
-
formContent:
|
|
8
|
-
formDetailsContainer:
|
|
6
|
+
customAccordianItem: Fe,
|
|
7
|
+
formContent: Re,
|
|
8
|
+
formDetailsContainer: Ae,
|
|
9
9
|
observation: Le,
|
|
10
|
-
groupContainer:
|
|
11
|
-
rowContainer:
|
|
12
|
-
groupLabel:
|
|
10
|
+
groupContainer: Ce,
|
|
11
|
+
rowContainer: Ie,
|
|
12
|
+
groupLabel: Oe,
|
|
13
13
|
rowLabel: Me,
|
|
14
|
-
rowValue:
|
|
15
|
-
groupMembers:
|
|
16
|
-
memberRow:
|
|
17
|
-
memberLabel:
|
|
18
|
-
memberValue:
|
|
14
|
+
rowValue: we,
|
|
15
|
+
groupMembers: xe,
|
|
16
|
+
memberRow: Ve,
|
|
17
|
+
memberLabel: De,
|
|
18
|
+
memberValue: Se,
|
|
19
19
|
abnormalValue: Be,
|
|
20
20
|
commentSection: Ee,
|
|
21
21
|
commentText: Ge,
|
|
22
22
|
nestedGroup: Ue,
|
|
23
23
|
nestedGroupLabel: qe,
|
|
24
|
-
nestedGroupMembers:
|
|
24
|
+
nestedGroupMembers: Pe
|
|
25
25
|
}, z = (e, r) => {
|
|
26
26
|
const t = pe(e);
|
|
27
27
|
return t === "Image" ? /* @__PURE__ */ o(
|
|
@@ -104,7 +104,7 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
104
104
|
/* @__PURE__ */ _(
|
|
105
105
|
"p",
|
|
106
106
|
{
|
|
107
|
-
className:
|
|
107
|
+
className: A(
|
|
108
108
|
n.memberLabel,
|
|
109
109
|
f ? n.abnormalValue : ""
|
|
110
110
|
),
|
|
@@ -118,7 +118,7 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
118
118
|
/* @__PURE__ */ o(
|
|
119
119
|
"div",
|
|
120
120
|
{
|
|
121
|
-
className:
|
|
121
|
+
className: A(
|
|
122
122
|
n.memberValue,
|
|
123
123
|
f ? n.abnormalValue : ""
|
|
124
124
|
),
|
|
@@ -142,7 +142,7 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
142
142
|
}
|
|
143
143
|
)
|
|
144
144
|
] });
|
|
145
|
-
},
|
|
145
|
+
}, He = ({
|
|
146
146
|
observation: e,
|
|
147
147
|
index: r,
|
|
148
148
|
formName: t = "",
|
|
@@ -165,7 +165,7 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
165
165
|
/* @__PURE__ */ _(
|
|
166
166
|
"p",
|
|
167
167
|
{
|
|
168
|
-
className:
|
|
168
|
+
className: A(
|
|
169
169
|
p ? n.groupLabel : n.rowLabel,
|
|
170
170
|
!p && u ? n.abnormalValue : ""
|
|
171
171
|
),
|
|
@@ -196,7 +196,7 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
196
196
|
) : /* @__PURE__ */ o(
|
|
197
197
|
"div",
|
|
198
198
|
{
|
|
199
|
-
className:
|
|
199
|
+
className: A(
|
|
200
200
|
n.rowValue,
|
|
201
201
|
u ? n.abnormalValue : ""
|
|
202
202
|
),
|
|
@@ -222,15 +222,15 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
222
222
|
},
|
|
223
223
|
`${e.id}-${r}`
|
|
224
224
|
);
|
|
225
|
-
},
|
|
225
|
+
}, ke = (e) => e ? e.extension?.find(
|
|
226
226
|
(r) => r.url === $e
|
|
227
227
|
)?.valueString : void 0, je = (e) => {
|
|
228
228
|
if (e)
|
|
229
229
|
return e.note?.[0]?.text;
|
|
230
|
-
}, Ke = (e, r) => e.entry?.find((t) => t.resource?.id === r)?.resource,
|
|
230
|
+
}, Ke = (e, r) => e.entry?.find((t) => t.resource?.id === r)?.resource, O = (e, r) => {
|
|
231
231
|
const t = Ke(e, r);
|
|
232
232
|
return t ? {
|
|
233
|
-
formFieldPath:
|
|
233
|
+
formFieldPath: ke(t),
|
|
234
234
|
comment: je(t)
|
|
235
235
|
} : {};
|
|
236
236
|
}, ze = (e, r) => {
|
|
@@ -239,16 +239,16 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
239
239
|
const t = be(e);
|
|
240
240
|
return [
|
|
241
241
|
...t.observations.map((a) => {
|
|
242
|
-
const { formFieldPath: i, comment: s } =
|
|
242
|
+
const { formFieldPath: i, comment: s } = O(
|
|
243
243
|
e,
|
|
244
244
|
a.id
|
|
245
245
|
);
|
|
246
246
|
return { obs: a, formFieldPath: i, comment: s };
|
|
247
247
|
}),
|
|
248
248
|
...t.groupedObservations.flatMap((a) => {
|
|
249
|
-
const { formFieldPath: i } =
|
|
249
|
+
const { formFieldPath: i } = O(e, a.id);
|
|
250
250
|
return (a.members ?? []).map((s) => {
|
|
251
|
-
const { comment: p } =
|
|
251
|
+
const { comment: p } = O(e, s.id);
|
|
252
252
|
return { obs: s, formFieldPath: i, comment: p };
|
|
253
253
|
});
|
|
254
254
|
})
|
|
@@ -260,7 +260,7 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
260
260
|
encounterUuids: r,
|
|
261
261
|
config: t
|
|
262
262
|
}) => {
|
|
263
|
-
const { t: a } = M(), i = te(), [s, p] =
|
|
263
|
+
const { t: a } = M(), i = te(), [s, p] = k(!1), [d, u] = k(null), { numberOfVisits: c, hideThumbnail: g = !1 } = t ?? {}, f = oe(
|
|
264
264
|
e,
|
|
265
265
|
r
|
|
266
266
|
), h = ne(), {
|
|
@@ -269,30 +269,30 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
269
269
|
isError: T,
|
|
270
270
|
error: Y,
|
|
271
271
|
refetch: J
|
|
272
|
-
} =
|
|
272
|
+
} = F({
|
|
273
273
|
queryKey: ["forms", i, e],
|
|
274
274
|
queryFn: () => ge(i, void 0, c),
|
|
275
275
|
enabled: !!i && !f
|
|
276
|
-
}),
|
|
276
|
+
}), w = y(() => !r || r.length === 0 ? $ : $.filter(
|
|
277
277
|
(m) => r.includes(m.encounterUuid)
|
|
278
|
-
), [$, r]), { data:
|
|
278
|
+
), [$, r]), { data: x = [] } = F({
|
|
279
279
|
queryKey: ["observationForms"],
|
|
280
280
|
queryFn: () => ve()
|
|
281
|
-
}),
|
|
282
|
-
(m) =>
|
|
283
|
-
[
|
|
281
|
+
}), V = R(
|
|
282
|
+
(m) => x.find((b) => b.name === m)?.uuid,
|
|
283
|
+
[x]
|
|
284
284
|
), L = y(() => {
|
|
285
285
|
if (d)
|
|
286
|
-
return
|
|
287
|
-
}, [d,
|
|
286
|
+
return V(d.formName);
|
|
287
|
+
}, [d, V]), { isLoading: W, error: D } = F({
|
|
288
288
|
queryKey: ["formMetadata", L],
|
|
289
289
|
queryFn: () => ye(L),
|
|
290
290
|
enabled: !!L && s
|
|
291
291
|
}), {
|
|
292
|
-
data:
|
|
292
|
+
data: C,
|
|
293
293
|
isLoading: X,
|
|
294
|
-
error:
|
|
295
|
-
} =
|
|
294
|
+
error: S
|
|
295
|
+
} = F({
|
|
296
296
|
queryKey: ["formsEncounterFHIR", d?.encounterUuid],
|
|
297
297
|
queryFn: () => Ne(d.encounterUuid),
|
|
298
298
|
enabled: !!d?.encounterUuid && s
|
|
@@ -303,10 +303,10 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
303
303
|
},
|
|
304
304
|
[i]
|
|
305
305
|
);
|
|
306
|
-
const B = y(() => !
|
|
307
|
-
|
|
306
|
+
const B = y(() => !C || !d?.formName ? [] : ze(
|
|
307
|
+
C,
|
|
308
308
|
d.formName
|
|
309
|
-
), [
|
|
309
|
+
), [C, d?.formName]), E = y(
|
|
310
310
|
() => [
|
|
311
311
|
{ key: "recordedOn", header: a("FORM_RECORDED_ON") },
|
|
312
312
|
{ key: "recordedBy", header: a("FORM_RECORDED_BY") }
|
|
@@ -319,16 +319,16 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
319
319
|
],
|
|
320
320
|
[]
|
|
321
321
|
), G = y(() => {
|
|
322
|
-
const m =
|
|
322
|
+
const m = w.reduce(
|
|
323
323
|
(b, l) => {
|
|
324
324
|
const v = l.formName;
|
|
325
325
|
b[v] ??= [];
|
|
326
|
-
const
|
|
326
|
+
const I = l.providers.map((ae) => ae.providerName).filter(Boolean).join(", ");
|
|
327
327
|
return b[v].push({
|
|
328
328
|
id: l.encounterUuid,
|
|
329
329
|
formName: l.formName,
|
|
330
330
|
recordedOn: de(l.encounterDateTime, a, !0).formattedResult,
|
|
331
|
-
recordedBy:
|
|
331
|
+
recordedBy: I ?? "--",
|
|
332
332
|
encounterDateTime: l.encounterDateTime,
|
|
333
333
|
encounterUuid: l.encounterUuid
|
|
334
334
|
}), b;
|
|
@@ -339,15 +339,15 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
339
339
|
([b, l]) => ({
|
|
340
340
|
formName: b,
|
|
341
341
|
records: l.sort(
|
|
342
|
-
(v,
|
|
342
|
+
(v, I) => I.encounterDateTime - v.encounterDateTime
|
|
343
343
|
)
|
|
344
344
|
})
|
|
345
345
|
).sort((b, l) => b.formName.localeCompare(l.formName));
|
|
346
|
-
}, [
|
|
346
|
+
}, [w, a]), U = R((m) => {
|
|
347
347
|
u(m), p(!0);
|
|
348
|
-
}, []), re =
|
|
348
|
+
}, []), re = R(() => {
|
|
349
349
|
p(!1), u(null);
|
|
350
|
-
}, []), q =
|
|
350
|
+
}, []), q = R(
|
|
351
351
|
(m, b) => {
|
|
352
352
|
switch (b) {
|
|
353
353
|
case "recordedOn":
|
|
@@ -362,7 +362,7 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
362
362
|
);
|
|
363
363
|
return /* @__PURE__ */ _(j, { children: [
|
|
364
364
|
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: N || T || G.length === 0 || f ? /* @__PURE__ */ o(
|
|
365
|
-
|
|
365
|
+
P,
|
|
366
366
|
{
|
|
367
367
|
headers: E,
|
|
368
368
|
ariaLabel: a("FORMS_HEADING"),
|
|
@@ -384,7 +384,7 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
384
384
|
testId: `accordian-title-${l}`,
|
|
385
385
|
open: b === 0,
|
|
386
386
|
children: /* @__PURE__ */ o(
|
|
387
|
-
|
|
387
|
+
P,
|
|
388
388
|
{
|
|
389
389
|
headers: E,
|
|
390
390
|
ariaLabel: a("FORMS_HEADING"),
|
|
@@ -414,8 +414,8 @@ const Te = "_formsTableBody_1pd36_1", Ce = "_customAccordianItem_1pd36_6", Ae =
|
|
|
414
414
|
passiveModal: !0,
|
|
415
415
|
size: "md",
|
|
416
416
|
testId: "form-details-modal",
|
|
417
|
-
children: /* @__PURE__ */ o("div", { className: n.formContent, children: W || X ? /* @__PURE__ */ o(ue, { width: "100%", lineCount: 3 }) :
|
|
418
|
-
|
|
417
|
+
children: /* @__PURE__ */ o("div", { className: n.formContent, children: W || X ? /* @__PURE__ */ o(ue, { width: "100%", lineCount: 3 }) : D ? /* @__PURE__ */ o("div", { children: H(D).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : S ? /* @__PURE__ */ o("div", { children: H(S).message ?? a("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ o("div", { className: n.formDetailsContainer, children: B.map(({ obs: m, comment: b }, l) => /* @__PURE__ */ o(
|
|
418
|
+
He,
|
|
419
419
|
{
|
|
420
420
|
observation: m,
|
|
421
421
|
index: l,
|
|
@@ -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, $ as f, a0 as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Bpoe3cvd.js";
|
|
2
|
+
import { _ as d, $ as f, a0 as e } from "./index-CU8j8cbs.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, $ as C, a0 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-Bpoe3cvd.js";
|
|
2
|
+
import { _ as v, $ as C, a0 as e } from "./index-CU8j8cbs.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|