@bahmni/appointments-app 0.0.1-dev.194 → 0.0.1-dev.197
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-BJ1OXT8Q-BmIIwUYw.js → DocumentsTable-CR9lBUHD-VlWoXezd.js} +34 -34
- package/dist/{FormsTable-CF5ZuCw3-BTYNr00D.js → FormsTable-szi7kPyc-CFSdvvpm.js} +76 -76
- package/dist/{LNWAZHJI-FQDP9PoL.js → LNWAZHJI-C37c-i9_.js} +2 -2
- package/dist/{MWZ6AO7Z-CYJOkJ6j.js → MWZ6AO7Z-D16kS6Xe.js} +2 -2
- package/dist/Observations-BYTVkUwc-D4aoevDr.js +170 -0
- package/dist/{YPM2AS64-DqqyN0CG.js → YPM2AS64-VJ7W3jTq.js} +138 -138
- package/dist/{index-ClooEAJt.js → index-BSilwxTF.js} +30389 -31617
- package/dist/index-Bc0_00fe.js +182 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +10 -0
- package/dist/locales/locale_es.json +10 -0
- package/dist/pages/admin/allServices/components/DeleteServiceModal.d.ts +10 -0
- package/dist/pages/admin/allServices/components/DeleteServiceModal.d.ts.map +1 -0
- package/dist/pages/admin/allServices/constants.d.ts +2 -0
- package/dist/pages/admin/allServices/constants.d.ts.map +1 -1
- package/dist/pages/admin/allServices/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/Observations-COn04_t4-tBg3kkPB.js +0 -170
- package/dist/index-67wnk8J0.js +0 -94
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as o, jsxs as l, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
4
|
-
const Y = "_documentsTableBody_1voj8_1",
|
|
2
|
+
import { l as V, u as x, Q as F, a as H, E as q, C as Q, x as P, T as G, b as W } from "./index-BSilwxTF.js";
|
|
3
|
+
import { useState as I, useCallback as T, useEffect as L, useMemo as E } from "react";
|
|
4
|
+
const Y = "_documentsTableBody_1voj8_1", z = "_viewAttachmentsLink_1voj8_11", J = "_documentViewerContainer_1voj8_15", K = "_attachmentItem_1voj8_23", X = "_attachmentCounter_1voj8_27", Z = "_attachmentError_1voj8_36", ee = "_documentIframe_1voj8_44", te = "_documentImage_1voj8_50", d = {
|
|
5
5
|
documentsTableBody: Y,
|
|
6
|
-
viewAttachmentsLink:
|
|
7
|
-
documentViewerContainer:
|
|
8
|
-
attachmentItem:
|
|
6
|
+
viewAttachmentsLink: z,
|
|
7
|
+
documentViewerContainer: J,
|
|
8
|
+
attachmentItem: K,
|
|
9
9
|
attachmentCounter: X,
|
|
10
10
|
attachmentError: Z,
|
|
11
11
|
documentIframe: ee,
|
|
@@ -33,36 +33,36 @@ const re = [
|
|
|
33
33
|
"uploadedBy",
|
|
34
34
|
"action"
|
|
35
35
|
], oe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, v = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], ie = ({ config: a, encounterUuids: u }) => {
|
|
36
|
-
const [s,
|
|
36
|
+
const [s, O] = I(!1), [r, A] = I(
|
|
37
37
|
null
|
|
38
|
-
), [w,
|
|
38
|
+
), [w, p] = I(
|
|
39
39
|
/* @__PURE__ */ new Set()
|
|
40
|
-
), N = V(), { t: n } =
|
|
41
|
-
A(e),
|
|
42
|
-
}, []),
|
|
43
|
-
|
|
44
|
-
}, []),
|
|
45
|
-
|
|
46
|
-
}, []), { data:
|
|
40
|
+
), N = V(), { t: n } = x(), { addNotification: y } = F(), D = T((e) => {
|
|
41
|
+
A(e), O(!0);
|
|
42
|
+
}, []), b = T(() => {
|
|
43
|
+
O(!1), A(null), p(/* @__PURE__ */ new Set());
|
|
44
|
+
}, []), S = T((e) => {
|
|
45
|
+
p((t) => new Set(t).add(e));
|
|
46
|
+
}, []), { data: M, isLoading: j, isError: f, error: g } = H({
|
|
47
47
|
queryKey: ["documents", N, u],
|
|
48
48
|
enabled: !!N,
|
|
49
49
|
queryFn: () => W(N, u)
|
|
50
50
|
});
|
|
51
|
-
|
|
51
|
+
L(() => {
|
|
52
52
|
f && y({
|
|
53
53
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
54
54
|
message: g?.message ?? "",
|
|
55
55
|
type: "error"
|
|
56
56
|
});
|
|
57
|
-
}, [f, g, y, n]),
|
|
57
|
+
}, [f, g, y, n]), L(() => {
|
|
58
58
|
const e = new AbortController();
|
|
59
59
|
return (async () => {
|
|
60
60
|
if (!s || !r) return;
|
|
61
61
|
const t = /* @__PURE__ */ new Set(), c = v(r);
|
|
62
62
|
for (let i = 0; i < c.length; i++) {
|
|
63
|
-
const
|
|
63
|
+
const C = U(c[i].url);
|
|
64
64
|
try {
|
|
65
|
-
(await fetch(
|
|
65
|
+
(await fetch(C, {
|
|
66
66
|
method: "HEAD",
|
|
67
67
|
signal: e.signal
|
|
68
68
|
})).ok || t.add(i);
|
|
@@ -70,19 +70,19 @@ const re = [
|
|
|
70
70
|
h instanceof Error && h.name !== "AbortError" && t.add(i);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
e.signal.aborted ||
|
|
73
|
+
e.signal.aborted || p(t);
|
|
74
74
|
})(), () => e.abort();
|
|
75
75
|
}, [s, r]);
|
|
76
|
-
const _ =
|
|
76
|
+
const _ = E(
|
|
77
77
|
() => a?.fields ?? re,
|
|
78
78
|
[a?.fields]
|
|
79
|
-
),
|
|
79
|
+
), B = E(() => ne(_, n), [_, n]), R = E(
|
|
80
80
|
() => _.map((e) => ({
|
|
81
81
|
key: e,
|
|
82
82
|
sortable: e !== "action"
|
|
83
83
|
})),
|
|
84
84
|
[_]
|
|
85
|
-
), m =
|
|
85
|
+
), m = E(
|
|
86
86
|
() => r ? v(r) : [],
|
|
87
87
|
[r]
|
|
88
88
|
), $ = T(
|
|
@@ -93,7 +93,7 @@ const re = [
|
|
|
93
93
|
case "documentType":
|
|
94
94
|
return e.documentType ?? n("DOCUMENTS_NOT_AVAILABLE");
|
|
95
95
|
case "uploadedOn":
|
|
96
|
-
return
|
|
96
|
+
return Q(
|
|
97
97
|
e.uploadedOn,
|
|
98
98
|
n,
|
|
99
99
|
!0
|
|
@@ -102,7 +102,7 @@ const re = [
|
|
|
102
102
|
return e.uploadedBy ?? n("DOCUMENTS_NOT_AVAILABLE");
|
|
103
103
|
case "action":
|
|
104
104
|
return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ o(
|
|
105
|
-
|
|
105
|
+
q,
|
|
106
106
|
{
|
|
107
107
|
onClick: () => D(e),
|
|
108
108
|
className: d.viewAttachmentsLink,
|
|
@@ -120,12 +120,12 @@ const re = [
|
|
|
120
120
|
/* @__PURE__ */ o("div", { "data-testid": "documents-table", children: /* @__PURE__ */ o(
|
|
121
121
|
P,
|
|
122
122
|
{
|
|
123
|
-
headers:
|
|
123
|
+
headers: B,
|
|
124
124
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
125
|
-
rows:
|
|
126
|
-
loading:
|
|
125
|
+
rows: M ?? [],
|
|
126
|
+
loading: j,
|
|
127
127
|
errorStateMessage: f ? g?.message : null,
|
|
128
|
-
sortable:
|
|
128
|
+
sortable: R,
|
|
129
129
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
130
130
|
renderCell: $,
|
|
131
131
|
className: d.documentsTableBody,
|
|
@@ -138,13 +138,13 @@ const re = [
|
|
|
138
138
|
id: "modalIdForActionAreaLayout",
|
|
139
139
|
portalId: "main-display-area",
|
|
140
140
|
open: s,
|
|
141
|
-
onRequestClose:
|
|
141
|
+
onRequestClose: b,
|
|
142
142
|
modalHeading: r.documentIdentifier,
|
|
143
143
|
passiveModal: !0,
|
|
144
144
|
size: "lg",
|
|
145
145
|
testId: "document-view-modal",
|
|
146
146
|
children: /* @__PURE__ */ o("div", { className: d.documentViewerContainer, children: m.map((e, t) => {
|
|
147
|
-
const c = U(e.url), i = e.contentType?.toLowerCase().includes("pdf"),
|
|
147
|
+
const c = U(e.url), i = e.contentType?.toLowerCase().includes("pdf"), C = (e.contentType?.toLowerCase().includes("image") ?? !1) || oe.test(e.url ?? ""), h = w.has(t);
|
|
148
148
|
return c === "#" || h ? /* @__PURE__ */ l(
|
|
149
149
|
"div",
|
|
150
150
|
{
|
|
@@ -171,13 +171,13 @@ const re = [
|
|
|
171
171
|
"/",
|
|
172
172
|
m.length
|
|
173
173
|
] }),
|
|
174
|
-
|
|
174
|
+
C ? /* @__PURE__ */ o(
|
|
175
175
|
"img",
|
|
176
176
|
{
|
|
177
177
|
src: c,
|
|
178
178
|
alt: r.documentIdentifier,
|
|
179
179
|
className: d.documentImage,
|
|
180
|
-
onError: () =>
|
|
180
|
+
onError: () => S(t)
|
|
181
181
|
}
|
|
182
182
|
) : /* @__PURE__ */ o(
|
|
183
183
|
"iframe",
|
|
@@ -185,7 +185,7 @@ const re = [
|
|
|
185
185
|
src: i ? `${c}#toolbar=0` : c,
|
|
186
186
|
className: d.documentIframe,
|
|
187
187
|
title: r.documentIdentifier,
|
|
188
|
-
onError: () =>
|
|
188
|
+
onError: () => S(t)
|
|
189
189
|
}
|
|
190
190
|
)
|
|
191
191
|
]
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as o, jsxs as p, Fragment as
|
|
2
|
-
import { u as O,
|
|
3
|
-
import { useState as
|
|
4
|
-
const Ne = "_formsTableBody_1pd36_1",
|
|
1
|
+
import { jsx as o, jsxs as p, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { u as O, l as ae, o as te, c as oe, a as A, f as ne, C as se, E as de, x as U, I as me, Z as ie, T as le, d as ce, S as H, W as ue, q as K, e as F, g as be, N as pe, A as fe, z as _e, h as $e, X as ge, Y as he, J as ve, G as ye } from "./index-BSilwxTF.js";
|
|
3
|
+
import { useState as P, useMemo as v, useCallback as C } from "react";
|
|
4
|
+
const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Fe = "_formDetailsContainer_1pd36_25", Le = "_observation_1pd36_30", Re = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", Se = "_groupMembers_1pd36_75", xe = "_memberRow_1pd36_81", De = "_memberLabel_1pd36_86", Ee = "_memberValue_1pd36_94", Ve = "_abnormalValue_1pd36_102", we = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", qe = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", n = {
|
|
5
5
|
formsTableBody: Ne,
|
|
6
|
-
customAccordianItem:
|
|
7
|
-
formContent:
|
|
8
|
-
formDetailsContainer:
|
|
9
|
-
observation:
|
|
10
|
-
groupContainer:
|
|
6
|
+
customAccordianItem: Ae,
|
|
7
|
+
formContent: Ce,
|
|
8
|
+
formDetailsContainer: Fe,
|
|
9
|
+
observation: Le,
|
|
10
|
+
groupContainer: Re,
|
|
11
11
|
rowContainer: Ie,
|
|
12
12
|
groupLabel: Me,
|
|
13
13
|
rowLabel: Oe,
|
|
14
14
|
rowValue: Te,
|
|
15
|
-
groupMembers:
|
|
16
|
-
memberRow:
|
|
17
|
-
memberLabel:
|
|
18
|
-
memberValue:
|
|
19
|
-
abnormalValue:
|
|
15
|
+
groupMembers: Se,
|
|
16
|
+
memberRow: xe,
|
|
17
|
+
memberLabel: De,
|
|
18
|
+
memberValue: Ee,
|
|
19
|
+
abnormalValue: Ve,
|
|
20
20
|
commentSection: we,
|
|
21
21
|
commentText: Be,
|
|
22
22
|
nestedGroup: Ge,
|
|
23
|
-
nestedGroupLabel:
|
|
24
|
-
nestedGroupMembers:
|
|
23
|
+
nestedGroupLabel: qe,
|
|
24
|
+
nestedGroupMembers: Ue
|
|
25
25
|
}, j = (e) => {
|
|
26
26
|
const r = be(e);
|
|
27
27
|
return r === "Image" ? /* @__PURE__ */ o(
|
|
@@ -31,14 +31,14 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
31
31
|
alt: e,
|
|
32
32
|
id: `${e}-img`
|
|
33
33
|
}
|
|
34
|
-
) : r === "Video" ? /* @__PURE__ */ o(
|
|
35
|
-
},
|
|
34
|
+
) : r === "Video" ? /* @__PURE__ */ o(fe, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ o(_e, { id: `${e}-pdf`, src: e }) : e;
|
|
35
|
+
}, z = (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
|
+
}, W = ({
|
|
42
42
|
member: e,
|
|
43
43
|
depth: r = 0,
|
|
44
44
|
memberIndex: s = 0,
|
|
@@ -68,7 +68,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
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
|
+
W,
|
|
72
72
|
{
|
|
73
73
|
member: y,
|
|
74
74
|
depth: r + 1,
|
|
@@ -82,8 +82,8 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
|
-
const { rangeString: g, isAbnormal:
|
|
86
|
-
return /* @__PURE__ */ p(
|
|
85
|
+
const { rangeString: g, isAbnormal: f } = z(e), _ = K(e, d), $ = _ ? j(_) : null;
|
|
86
|
+
return /* @__PURE__ */ p(k, { children: [
|
|
87
87
|
/* @__PURE__ */ p(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
@@ -94,9 +94,9 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
94
94
|
/* @__PURE__ */ p(
|
|
95
95
|
"p",
|
|
96
96
|
{
|
|
97
|
-
className:
|
|
97
|
+
className: F(
|
|
98
98
|
n.memberLabel,
|
|
99
|
-
|
|
99
|
+
f ? 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", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
108
108
|
/* @__PURE__ */ o(
|
|
109
109
|
"div",
|
|
110
110
|
{
|
|
111
|
-
className:
|
|
111
|
+
className: F(
|
|
112
112
|
n.memberValue,
|
|
113
|
-
|
|
113
|
+
f ? 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", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
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 } = z(e), c = s ? `${s}-` : "", g = K(e, l), f = g ? j(g) : null;
|
|
142
142
|
return /* @__PURE__ */ p(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
@@ -154,7 +154,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
154
154
|
/* @__PURE__ */ p(
|
|
155
155
|
"p",
|
|
156
156
|
{
|
|
157
|
-
className:
|
|
157
|
+
className: F(
|
|
158
158
|
d ? n.groupLabel : n.rowLabel,
|
|
159
159
|
!d && t ? n.abnormalValue : ""
|
|
160
160
|
),
|
|
@@ -170,26 +170,26 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
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((_, $) => /* @__PURE__ */ o(
|
|
174
|
+
W,
|
|
175
175
|
{
|
|
176
|
-
member:
|
|
176
|
+
member: _,
|
|
177
177
|
depth: 0,
|
|
178
178
|
memberIndex: $,
|
|
179
179
|
formName: s
|
|
180
180
|
},
|
|
181
|
-
`${
|
|
181
|
+
`${_.id}`
|
|
182
182
|
))
|
|
183
183
|
}
|
|
184
184
|
) : /* @__PURE__ */ o(
|
|
185
185
|
"div",
|
|
186
186
|
{
|
|
187
|
-
className:
|
|
187
|
+
className: F(
|
|
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: f
|
|
193
193
|
}
|
|
194
194
|
)
|
|
195
195
|
]
|
|
@@ -210,16 +210,16 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
210
210
|
},
|
|
211
211
|
`${e.id}-${r}`
|
|
212
212
|
);
|
|
213
|
-
},
|
|
213
|
+
}, Pe = (e) => e ? e.extension?.find(
|
|
214
214
|
(r) => r.url === $e
|
|
215
|
-
)?.valueString : void 0,
|
|
215
|
+
)?.valueString : void 0, ke = (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: Pe(s),
|
|
222
|
+
comment: ke(s)
|
|
223
223
|
} : {};
|
|
224
224
|
}, je = (e, r) => {
|
|
225
225
|
if (!e?.entry || !r)
|
|
@@ -248,59 +248,59 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
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] = P(!1), [t, c] = P(null), g = s?.numberOfVisits, f = te(
|
|
252
252
|
e,
|
|
253
253
|
r
|
|
254
|
-
),
|
|
254
|
+
), _ = oe(), {
|
|
255
255
|
data: $ = [],
|
|
256
256
|
isLoading: y,
|
|
257
257
|
isError: N,
|
|
258
|
-
error:
|
|
258
|
+
error: Q,
|
|
259
259
|
refetch: X
|
|
260
|
-
} =
|
|
260
|
+
} = A({
|
|
261
261
|
queryKey: ["forms", l, e],
|
|
262
262
|
queryFn: () => ge(l, void 0, g),
|
|
263
|
-
enabled: !!l && !
|
|
263
|
+
enabled: !!l && !f
|
|
264
264
|
}), T = v(() => !r || r.length === 0 ? $ : $.filter(
|
|
265
265
|
(m) => r.includes(m.encounterUuid)
|
|
266
|
-
), [$, r]), { data:
|
|
266
|
+
), [$, r]), { data: S = [] } = A({
|
|
267
267
|
queryKey: ["observationForms"],
|
|
268
268
|
queryFn: () => he()
|
|
269
|
-
}),
|
|
270
|
-
(m) =>
|
|
271
|
-
[
|
|
272
|
-
),
|
|
269
|
+
}), x = C(
|
|
270
|
+
(m) => S.find((u) => u.name === m)?.uuid,
|
|
271
|
+
[S]
|
|
272
|
+
), L = v(() => {
|
|
273
273
|
if (t)
|
|
274
|
-
return
|
|
275
|
-
}, [t,
|
|
276
|
-
queryKey: ["formMetadata",
|
|
277
|
-
queryFn: () => ve(
|
|
278
|
-
enabled: !!
|
|
274
|
+
return x(t.formName);
|
|
275
|
+
}, [t, x]), { isLoading: Y, error: D } = A({
|
|
276
|
+
queryKey: ["formMetadata", L],
|
|
277
|
+
queryFn: () => ve(L),
|
|
278
|
+
enabled: !!L && d
|
|
279
279
|
}), {
|
|
280
|
-
data:
|
|
281
|
-
isLoading:
|
|
282
|
-
error:
|
|
283
|
-
} =
|
|
280
|
+
data: R,
|
|
281
|
+
isLoading: J,
|
|
282
|
+
error: E
|
|
283
|
+
} = A({
|
|
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 && (X(),
|
|
290
|
+
m.patientUUID === l && m.updatedConcepts.size > 0 && (X(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
291
291
|
},
|
|
292
292
|
[l]
|
|
293
293
|
);
|
|
294
|
-
const
|
|
295
|
-
|
|
294
|
+
const V = v(() => !R || !t?.formName ? [] : je(
|
|
295
|
+
R,
|
|
296
296
|
t.formName
|
|
297
|
-
), [
|
|
297
|
+
), [R, t?.formName]), w = v(
|
|
298
298
|
() => [
|
|
299
299
|
{ key: "recordedOn", header: a("FORM_RECORDED_ON") },
|
|
300
300
|
{ key: "recordedBy", header: a("FORM_RECORDED_BY") }
|
|
301
301
|
],
|
|
302
302
|
[a]
|
|
303
|
-
),
|
|
303
|
+
), Z = v(
|
|
304
304
|
() => [
|
|
305
305
|
{ key: "recordedOn", sortable: !0 },
|
|
306
306
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -331,11 +331,11 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
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
|
-
}, []),
|
|
338
|
+
}, []), q = C(
|
|
339
339
|
(m, u) => {
|
|
340
340
|
switch (u) {
|
|
341
341
|
case "recordedOn":
|
|
@@ -348,17 +348,17 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
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 ||
|
|
353
|
-
|
|
351
|
+
return /* @__PURE__ */ p(k, { children: [
|
|
352
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: y || N || B.length === 0 || f ? /* @__PURE__ */ o(
|
|
353
|
+
U,
|
|
354
354
|
{
|
|
355
355
|
headers: w,
|
|
356
356
|
ariaLabel: a("FORMS_HEADING"),
|
|
357
357
|
rows: [],
|
|
358
358
|
loading: y,
|
|
359
|
-
errorStateMessage: N ?
|
|
359
|
+
errorStateMessage: N ? Q?.message : void 0,
|
|
360
360
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
361
|
-
renderCell:
|
|
361
|
+
renderCell: q,
|
|
362
362
|
className: n.formsTableBody,
|
|
363
363
|
dataTestId: "forms-table"
|
|
364
364
|
}
|
|
@@ -372,16 +372,16 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
372
372
|
testId: `accordian-title-${i}`,
|
|
373
373
|
open: u === 0,
|
|
374
374
|
children: /* @__PURE__ */ o(
|
|
375
|
-
|
|
375
|
+
U,
|
|
376
376
|
{
|
|
377
377
|
headers: w,
|
|
378
378
|
ariaLabel: a("FORMS_HEADING"),
|
|
379
379
|
rows: h,
|
|
380
380
|
loading: !1,
|
|
381
381
|
errorStateMessage: "",
|
|
382
|
-
sortable:
|
|
382
|
+
sortable: Z,
|
|
383
383
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
384
|
-
renderCell:
|
|
384
|
+
renderCell: q,
|
|
385
385
|
className: n.formsTableBody,
|
|
386
386
|
dataTestId: `forms-table-${i}`
|
|
387
387
|
}
|
|
@@ -402,7 +402,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
|
|
|
402
402
|
passiveModal: !0,
|
|
403
403
|
size: "md",
|
|
404
404
|
testId: "form-details-modal",
|
|
405
|
-
children: /* @__PURE__ */ o("div", { className: n.formContent, children: Y ||
|
|
405
|
+
children: /* @__PURE__ */ o("div", { className: n.formContent, children: Y || J ? /* @__PURE__ */ o(ce, { width: "100%", lineCount: 3 }) : D ? /* @__PURE__ */ o("div", { children: H(D).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ o("div", { children: H(E).message ?? a("ERROR_FETCHING_FORM_DATA") }) : V.length > 0 ? /* @__PURE__ */ o("div", { className: n.formDetailsContainer, children: V.map(({ obs: m, comment: u }, i) => /* @__PURE__ */ o(
|
|
406
406
|
He,
|
|
407
407
|
{
|
|
408
408
|
observation: m,
|
|
@@ -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-VJ7W3jTq.js";
|
|
2
|
+
import { V as d, $ as f, a0 as e } from "./index-BSilwxTF.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-VJ7W3jTq.js";
|
|
2
|
+
import { V as v, $ as C, a0 as e } from "./index-BSilwxTF.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|