@bahmni/clinical-app 0.0.1-dev.308 → 0.0.1-dev.310
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-B_4aK2l--BZYGwb0J.js → DocumentsTable-CaUlpFeN-B07kH6Rs.js} +33 -33
- package/dist/{FormsTable-xSBP_TaW-BUaWCKo7.js → FormsTable-DQSl0827-EKVvD12B.js} +64 -64
- package/dist/{LNWAZHJI-BzP3nf7t.js → LNWAZHJI-DaW8Io8M.js} +5 -5
- package/dist/{MWZ6AO7Z-Vrb3kDnd.js → MWZ6AO7Z-BEdGdjSn.js} +4 -4
- package/dist/{Observations-CMGS1KP7-ChtqlNZC.js → Observations-BIksHFko-CiYJaU-8.js} +43 -43
- package/dist/{YPM2AS64-9H5IR7GM.js → YPM2AS64-B9e7XvA1.js} +1 -1
- package/dist/components/consultationPad/__tests__/__mocks__/servicesMocks.d.ts +2 -2
- package/dist/components/consultationPad/__tests__/__mocks__/servicesMocks.d.ts.map +1 -1
- package/dist/components/consultationPad/services.d.ts.map +1 -1
- package/dist/constants/app.d.ts +1 -1
- package/dist/constants/app.d.ts.map +1 -1
- package/dist/{index-DEjj2YYW.js → index-DpwifnYp.js} +186807 -186747
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/models/{consultationBundle.d.ts → encounterBundle.d.ts} +3 -3
- package/dist/models/encounterBundle.d.ts.map +1 -0
- package/dist/services/{consultationBundleService.d.ts → encounterBundleService.d.ts} +7 -7
- package/dist/services/encounterBundleService.d.ts.map +1 -0
- package/dist/utils/fhir/encounterBundleCreator.d.ts +5 -0
- package/dist/utils/fhir/encounterBundleCreator.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/models/consultationBundle.d.ts.map +0 -1
- package/dist/services/consultationBundleService.d.ts.map +0 -1
- package/dist/utils/fhir/consultationBundleCreator.d.ts +0 -5
- package/dist/utils/fhir/consultationBundleCreator.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { p as G, u as J, J as W, f as Y, m as X, a as Z, c as ee, b as te } from "./index-DpwifnYp.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 h, useEffect as D, 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,17 +33,17 @@ const Te = [
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
|
-
],
|
|
36
|
+
], 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 }] : [], fe = ({ config: a, encounterUuids: g }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
|
-
), [$,
|
|
39
|
+
), [$, I] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E =
|
|
41
|
+
), E = G(), { t: n } = J(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [O, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
|
-
}, []), H =
|
|
44
|
-
w(!1), U(null),
|
|
45
|
-
}, []), v =
|
|
46
|
-
|
|
43
|
+
}, []), H = h(() => {
|
|
44
|
+
w(!1), U(null), I(/* @__PURE__ */ new Set());
|
|
45
|
+
}, []), v = h((e) => {
|
|
46
|
+
I((t) => new Set(t).add(e));
|
|
47
47
|
}, []), { data: i, isLoading: q, isError: b, error: y } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
@@ -53,24 +53,24 @@ const Te = [
|
|
|
53
53
|
u
|
|
54
54
|
],
|
|
55
55
|
enabled: !!E,
|
|
56
|
-
queryFn: () =>
|
|
56
|
+
queryFn: () => Y(
|
|
57
57
|
E,
|
|
58
58
|
g,
|
|
59
59
|
u,
|
|
60
60
|
O
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
D(() => {
|
|
64
64
|
i && A(i.total);
|
|
65
|
-
}, [i]),
|
|
65
|
+
}, [i]), D(() => {
|
|
66
66
|
C(1), A(void 0);
|
|
67
|
-
}, [E]),
|
|
67
|
+
}, [E]), D(() => {
|
|
68
68
|
b && L({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: y?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [b, y, L, n]),
|
|
73
|
+
}, [b, y, L, n]), D(() => {
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
@@ -82,31 +82,31 @@ const Te = [
|
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
84
|
})).ok || t.add(c);
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
85
|
+
} catch (N) {
|
|
86
|
+
N instanceof Error && N.name !== "AbortError" && t.add(c);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
e.signal.aborted ||
|
|
89
|
+
e.signal.aborted || I(t);
|
|
90
90
|
})(), () => e.abort();
|
|
91
91
|
}, [s, o]);
|
|
92
|
-
const j =
|
|
92
|
+
const j = h(
|
|
93
93
|
(e, t) => {
|
|
94
94
|
t !== u ? (V(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
96
96
|
[u]
|
|
97
|
-
), f =
|
|
97
|
+
), f = _(
|
|
98
98
|
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
),
|
|
100
|
+
), P = _(() => [...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]), z = _(() => ie(f, n), [f, n]), K = _(
|
|
101
101
|
() => f.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "attachments"
|
|
104
104
|
})),
|
|
105
105
|
[f]
|
|
106
|
-
), T =
|
|
106
|
+
), T = _(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
|
-
),
|
|
109
|
+
), Q = h(
|
|
110
110
|
(e, t) => {
|
|
111
111
|
switch (t) {
|
|
112
112
|
case "documentIdentifier":
|
|
@@ -137,18 +137,18 @@ const Te = [
|
|
|
137
137
|
},
|
|
138
138
|
[M, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ p(x, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
144
|
-
headers:
|
|
144
|
+
headers: z,
|
|
145
145
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
146
|
-
rows:
|
|
146
|
+
rows: P,
|
|
147
147
|
loading: q,
|
|
148
148
|
errorStateMessage: b ? y?.message : null,
|
|
149
|
-
sortable:
|
|
149
|
+
sortable: K,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
151
|
-
renderCell:
|
|
151
|
+
renderCell: Q,
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
@@ -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 === "#" ||
|
|
172
|
+
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), N = $.has(t);
|
|
173
|
+
return m === "#" || N ? /* @__PURE__ */ p(
|
|
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("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__ */ p(
|
|
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("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
197
|
T.length
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
import { jsx as i, jsxs as re, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
import { u as te,
|
|
3
|
-
import { useQueryClient as ge, useQuery as
|
|
4
|
-
import { useState as
|
|
2
|
+
import { u as te, p as ae, H as se, d as ne, e as de, h as ie, g as le, Q as me, z as q, a as ue, m as ce, c as w, O as fe, L as ye, b as pe, x as be, l as he } from "./index-DpwifnYp.js";
|
|
3
|
+
import { useQueryClient as ge, useQuery as p } from "@tanstack/react-query";
|
|
4
|
+
import { useState as H, useMemo as d, useCallback as b } from "react";
|
|
5
5
|
const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
6
|
formsTableBody: Ne,
|
|
7
7
|
customAccordianItem: Oe
|
|
8
8
|
}, Ae = (u) => u ? u.extension?.find(
|
|
9
|
-
(l) => l.url ===
|
|
10
|
-
)?.valueString : void 0,
|
|
9
|
+
(l) => l.url === he
|
|
10
|
+
)?.valueString : void 0, ve = ({
|
|
11
11
|
episodeOfCareUuids: u,
|
|
12
12
|
encounterUuids: l,
|
|
13
13
|
config: k
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: n } = te(), c = ae(), [f,
|
|
16
|
-
numberOfVisits:
|
|
17
|
-
hideThumbnail:
|
|
15
|
+
const { t: n } = te(), c = ae(), [f, E] = H(!1), [a, I] = H(null), {
|
|
16
|
+
numberOfVisits: x,
|
|
17
|
+
hideThumbnail: j = !1,
|
|
18
18
|
forms: y
|
|
19
|
-
} = k ?? {},
|
|
19
|
+
} = k ?? {}, L = se(
|
|
20
20
|
u,
|
|
21
21
|
l
|
|
22
|
-
),
|
|
23
|
-
data:
|
|
24
|
-
isLoading:
|
|
22
|
+
), z = ge(), {
|
|
23
|
+
data: v = [],
|
|
24
|
+
isLoading: F,
|
|
25
25
|
isError: B,
|
|
26
|
-
error:
|
|
27
|
-
refetch:
|
|
28
|
-
} =
|
|
26
|
+
error: K,
|
|
27
|
+
refetch: Q
|
|
28
|
+
} = p({
|
|
29
29
|
queryKey: ["forms", c, u],
|
|
30
|
-
queryFn: () => ne(c, void 0,
|
|
31
|
-
enabled: !!c && !
|
|
32
|
-
}),
|
|
33
|
-
let e =
|
|
30
|
+
queryFn: () => ne(c, void 0, x),
|
|
31
|
+
enabled: !!c && !L
|
|
32
|
+
}), M = d(() => {
|
|
33
|
+
let e = v;
|
|
34
34
|
return l && l.length > 0 && (e = e.filter(
|
|
35
35
|
(r) => l.includes(r.encounterUuid)
|
|
36
36
|
)), Array.isArray(y) && y.length > 0 && (e = e.filter(
|
|
37
37
|
(r) => y.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
38
38
|
)), e;
|
|
39
|
-
}, [
|
|
39
|
+
}, [v, l, y]), { data: S = [] } = p({
|
|
40
40
|
queryKey: ["observationForms"],
|
|
41
41
|
queryFn: () => de()
|
|
42
|
-
}),
|
|
43
|
-
(e) =>
|
|
44
|
-
[
|
|
45
|
-
),
|
|
42
|
+
}), _ = b(
|
|
43
|
+
(e) => S.find((r) => r.name === e)?.uuid,
|
|
44
|
+
[S]
|
|
45
|
+
), h = d(() => {
|
|
46
46
|
if (a)
|
|
47
|
-
return
|
|
48
|
-
}, [a,
|
|
47
|
+
return _(a.formName);
|
|
48
|
+
}, [a, _]), {
|
|
49
49
|
data: m,
|
|
50
|
-
isLoading:
|
|
51
|
-
isError:
|
|
50
|
+
isLoading: V,
|
|
51
|
+
isError: $,
|
|
52
52
|
error: g
|
|
53
|
-
} =
|
|
54
|
-
queryKey: ["formMetadata",
|
|
55
|
-
queryFn: () => ie(
|
|
56
|
-
enabled: !!
|
|
53
|
+
} = p({
|
|
54
|
+
queryKey: ["formMetadata", h],
|
|
55
|
+
queryFn: () => ie(h),
|
|
56
|
+
enabled: !!h && f
|
|
57
57
|
}), {
|
|
58
58
|
data: N,
|
|
59
|
-
isLoading:
|
|
60
|
-
isError:
|
|
59
|
+
isLoading: G,
|
|
60
|
+
isError: Y,
|
|
61
61
|
error: O
|
|
62
|
-
} =
|
|
62
|
+
} = p({
|
|
63
63
|
queryKey: ["formsEncounterFHIR", a?.encounterUuid],
|
|
64
64
|
queryFn: () => le(a.encounterUuid),
|
|
65
65
|
enabled: !!a?.encounterUuid && f
|
|
66
66
|
});
|
|
67
67
|
me(
|
|
68
68
|
(e) => {
|
|
69
|
-
e.patientUUID === c && e.updatedConcepts.size > 0 && (
|
|
69
|
+
e.patientUUID === c && e.updatedConcepts.size > 0 && (Q(), z.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
70
70
|
},
|
|
71
71
|
[c]
|
|
72
72
|
);
|
|
73
|
-
const
|
|
73
|
+
const J = d(() => !N?.entry || !a?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
74
74
|
const r = Ae(e);
|
|
75
75
|
return !r || r.includes(a.formName);
|
|
76
76
|
}), [N, a?.formName]), P = d(() => {
|
|
@@ -84,7 +84,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
84
84
|
return r(
|
|
85
85
|
m.schema.controls ?? []
|
|
86
86
|
), e.length > 0 ? e : void 0;
|
|
87
|
-
}, [m]),
|
|
87
|
+
}, [m]), W = d(() => {
|
|
88
88
|
if (!m?.schema) return;
|
|
89
89
|
const e = {}, r = (o, s) => {
|
|
90
90
|
for (const t of o)
|
|
@@ -103,7 +103,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
103
103
|
return q(g).message;
|
|
104
104
|
if (O)
|
|
105
105
|
return q(O).message;
|
|
106
|
-
}, [g, O]),
|
|
106
|
+
}, [g, O]), C = d(
|
|
107
107
|
() => [
|
|
108
108
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
109
109
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
@@ -115,8 +115,8 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
115
115
|
{ key: "recordedBy", sortable: !0 }
|
|
116
116
|
],
|
|
117
117
|
[]
|
|
118
|
-
),
|
|
119
|
-
const e =
|
|
118
|
+
), D = d(() => {
|
|
119
|
+
const e = M.reduce(
|
|
120
120
|
(r, o) => {
|
|
121
121
|
const s = o.formName;
|
|
122
122
|
r[s] ??= [];
|
|
@@ -140,38 +140,38 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
140
140
|
)
|
|
141
141
|
})
|
|
142
142
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
143
|
-
}, [
|
|
144
|
-
I(e),
|
|
143
|
+
}, [M, n]), R = b((e) => {
|
|
144
|
+
I(e), E(!0);
|
|
145
145
|
}, []), ee = b(() => {
|
|
146
|
-
|
|
147
|
-
}, []),
|
|
146
|
+
E(!1), I(null);
|
|
147
|
+
}, []), U = b(
|
|
148
148
|
(e, r) => {
|
|
149
149
|
switch (r) {
|
|
150
150
|
case "recordedOn":
|
|
151
|
-
return /* @__PURE__ */ i(ce, { onClick: () =>
|
|
151
|
+
return /* @__PURE__ */ i(ce, { onClick: () => R(e), children: e.recordedOn });
|
|
152
152
|
case "recordedBy":
|
|
153
153
|
return e.recordedBy;
|
|
154
154
|
default:
|
|
155
155
|
return null;
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
|
-
[
|
|
158
|
+
[R]
|
|
159
159
|
);
|
|
160
160
|
return /* @__PURE__ */ re(oe, { children: [
|
|
161
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
162
|
-
|
|
161
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: F || B || D.length === 0 || L ? /* @__PURE__ */ i(
|
|
162
|
+
w,
|
|
163
163
|
{
|
|
164
|
-
headers:
|
|
164
|
+
headers: C,
|
|
165
165
|
ariaLabel: n("FORMS_HEADING"),
|
|
166
166
|
rows: [],
|
|
167
|
-
loading:
|
|
168
|
-
errorStateMessage: B ?
|
|
167
|
+
loading: F,
|
|
168
|
+
errorStateMessage: B ? K?.message : void 0,
|
|
169
169
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
170
|
-
renderCell:
|
|
170
|
+
renderCell: U,
|
|
171
171
|
className: T.formsTableBody,
|
|
172
172
|
dataTestId: "forms-table"
|
|
173
173
|
}
|
|
174
|
-
) : /* @__PURE__ */ i(fe, { align: "start", children:
|
|
174
|
+
) : /* @__PURE__ */ i(fe, { align: "start", children: D.map((e, r) => {
|
|
175
175
|
const { formName: o, records: s } = e;
|
|
176
176
|
return /* @__PURE__ */ i(
|
|
177
177
|
ye,
|
|
@@ -181,16 +181,16 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
181
181
|
testId: `accordian-title-${o}`,
|
|
182
182
|
open: r === 0,
|
|
183
183
|
children: /* @__PURE__ */ i(
|
|
184
|
-
|
|
184
|
+
w,
|
|
185
185
|
{
|
|
186
|
-
headers:
|
|
186
|
+
headers: C,
|
|
187
187
|
ariaLabel: n("FORMS_HEADING"),
|
|
188
188
|
rows: s,
|
|
189
189
|
loading: !1,
|
|
190
190
|
errorStateMessage: "",
|
|
191
191
|
sortable: Z,
|
|
192
192
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
193
|
-
renderCell:
|
|
193
|
+
renderCell: U,
|
|
194
194
|
className: T.formsTableBody,
|
|
195
195
|
dataTestId: `forms-table-${o}`
|
|
196
196
|
}
|
|
@@ -200,7 +200,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
200
200
|
);
|
|
201
201
|
}) }) }),
|
|
202
202
|
f && a && /* @__PURE__ */ i(
|
|
203
|
-
|
|
203
|
+
pe,
|
|
204
204
|
{
|
|
205
205
|
id: "modalIdForActionAreaLayout",
|
|
206
206
|
portalId: "main-display-area",
|
|
@@ -214,15 +214,15 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
214
214
|
children: /* @__PURE__ */ i(
|
|
215
215
|
be,
|
|
216
216
|
{
|
|
217
|
-
observations:
|
|
218
|
-
isLoading:
|
|
219
|
-
isError:
|
|
217
|
+
observations: J,
|
|
218
|
+
isLoading: V || G,
|
|
219
|
+
isError: $ || Y,
|
|
220
220
|
errorMessage: X,
|
|
221
221
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
222
222
|
testIdPrefix: a.formName,
|
|
223
|
-
hideThumbnail:
|
|
223
|
+
hideThumbnail: j,
|
|
224
224
|
controlOrder: P,
|
|
225
|
-
sectionMap:
|
|
225
|
+
sectionMap: W
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
}
|
|
@@ -230,5 +230,5 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
230
230
|
] });
|
|
231
231
|
};
|
|
232
232
|
export {
|
|
233
|
-
|
|
233
|
+
ve as default
|
|
234
234
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-B9e7XvA1.js";
|
|
2
|
+
import { t as d, w as f, A as e } from "./index-DpwifnYp.js";
|
|
3
|
+
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), n =
|
|
6
|
+
}), n = d(), s = f(() => {
|
|
7
7
|
const o = r.theme_preference || l;
|
|
8
8
|
return o !== "system" ? o : n();
|
|
9
9
|
});
|
|
@@ -27,7 +27,7 @@ var f = (a) => {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
}, C =
|
|
30
|
+
}, C = p;
|
|
31
31
|
export {
|
|
32
32
|
C as default
|
|
33
33
|
};
|
|
@@ -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-B9e7XvA1.js";
|
|
2
|
+
import { t as v, w as C, A as e } from "./index-DpwifnYp.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -36,7 +36,7 @@ var h = (t) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
},
|
|
39
|
+
}, p = h;
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
p as default
|
|
42
42
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { p as B, J as K, u as N, s as Q, i as k, Q as H, y as M, V as j, j as x, k as G, c as J, v as z, F, E as P, _ as Y, q as W, n as X, o as Z, r as ee } from "./index-DpwifnYp.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
5
|
-
const
|
|
6
|
-
const a =
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as R } from "react";
|
|
5
|
+
const w = (t, n, d, l, b, r) => {
|
|
6
|
+
const a = P(t, n, b), s = a.value, o = Y(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
|
-
|
|
9
|
+
X,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
@@ -14,7 +14,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
16
|
)), o === "Video" && (i = /* @__PURE__ */ u(
|
|
17
|
-
|
|
17
|
+
Z,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
@@ -23,9 +23,9 @@ const D = (t, n, d, l, b, r) => {
|
|
|
23
23
|
)), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
24
|
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: a.provider
|
|
26
|
-
}), p = t.display,
|
|
26
|
+
}), p = t.display, h = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${h}-${p}-${d}-${n}` : `${h}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
W,
|
|
29
29
|
{
|
|
30
30
|
header: a.header,
|
|
31
31
|
value: i,
|
|
@@ -37,13 +37,13 @@ const D = (t, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${t.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (t, n, d, l, b, r, a) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
F,
|
|
41
41
|
{
|
|
42
42
|
title: t.display,
|
|
43
43
|
id: `grouped-obs-${t.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: t.members?.map(
|
|
46
|
-
(s, o) =>
|
|
46
|
+
(s, o) => w(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
@@ -60,16 +60,16 @@ const D = (t, n, d, l, b, r) => {
|
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = N(), b = (r, a, s) => {
|
|
63
|
-
const o =
|
|
63
|
+
const o = z(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ S(
|
|
65
|
-
|
|
65
|
+
F,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: a,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => w(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -113,7 +113,7 @@ const D = (t, 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()), a =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = K(), { t: o } = N(), i = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
119
|
queryFn: () => Q(e),
|
|
@@ -121,50 +121,50 @@ const D = (t, n, d, l, b, r) => {
|
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
$(() => {
|
|
124
|
-
i.forEach((e,
|
|
125
|
-
if (e.isError && !r.current.has(
|
|
126
|
-
const
|
|
124
|
+
i.forEach((e, y) => {
|
|
125
|
+
if (e.isError && !r.current.has(y)) {
|
|
126
|
+
const q = d[y];
|
|
127
127
|
s({
|
|
128
128
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: q }),
|
|
130
130
|
type: "error"
|
|
131
|
-
}), r.current.add(
|
|
132
|
-
} else e.isError || r.current.delete(
|
|
131
|
+
}), r.current.add(y);
|
|
132
|
+
} else e.isError || r.current.delete(y);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), h = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
137
|
+
isLoading: D,
|
|
138
|
+
isError: T,
|
|
139
|
+
refetch: O
|
|
140
140
|
} = ae({
|
|
141
141
|
queryKey: le(a, p),
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!a && p.length > 0 &&
|
|
142
|
+
queryFn: () => k(a, p),
|
|
143
|
+
enabled: !!a && p.length > 0 && h
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
H(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
|
-
(
|
|
149
|
-
) &&
|
|
148
|
+
(y) => p.includes(y)
|
|
149
|
+
) && O();
|
|
150
150
|
},
|
|
151
|
-
[a,
|
|
151
|
+
[a, O]
|
|
152
152
|
), $(() => {
|
|
153
|
-
|
|
153
|
+
T && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const
|
|
158
|
+
}, [T]);
|
|
159
|
+
const _ = R(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
161
|
+
const e = M(c), y = j(e);
|
|
162
|
+
return x(y);
|
|
163
163
|
}, [c]), L = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
167
|
+
], g = D || !h, f = T && h, A = (!c || c.entry?.length === 0 || p.length === 0) && h, V = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, C = A ? o("NO_OBSERVATIONS_FOUND") : void 0, U = _.length > 0 && !g && !f, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -174,7 +174,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
174
174
|
className: I.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
G,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
@@ -183,22 +183,22 @@ const D = (t, n, d, l, b, r) => {
|
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
U ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: _,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
J,
|
|
195
195
|
{
|
|
196
196
|
headers: L,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
199
|
+
loading: g,
|
|
200
|
+
errorStateMessage: V,
|
|
201
|
+
emptyStateMessage: C,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as we, C as z, D as xt, G as B, w as q, A as y, P as Ro, I as ye, S as R, K as _, M as k, N, R as A, T as bs, U as ir, W as $e, X as U, Y as Hn, Z as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-DpwifnYp.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|