@bahmni/registration-app 0.0.1-dev.238 → 0.0.1-dev.240
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-1XgzVmNY-CUKwxyaB.js → DocumentsTable-widaz7Rd-Do7UrcI_.js} +29 -29
- package/dist/{FormsTable-B0J51cB5-CHAQaAvN.js → FormsTable-Ni6XE26b-BbgYn2tM.js} +63 -63
- package/dist/{LNWAZHJI-CwQl5Led.js → LNWAZHJI-AJoQ4hi_.js} +6 -6
- package/dist/{MWZ6AO7Z-D6gT730N.js → MWZ6AO7Z-kJr8Y-vk.js} +5 -5
- package/dist/{Observations-Cqov9775-Cwd1FjVt.js → Observations-BgucPoyM-BHs67iNm.js} +47 -47
- package/dist/{YPM2AS64-BkOnKXVX.js → YPM2AS64-gy4VomWy.js} +1 -1
- package/dist/{index-CO8q6vad.js → index-DvLFtPO3.js} +56247 -49526
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as r, jsxs as _, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te } from "./index-DvLFtPO3.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
|
|
5
5
|
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 = {
|
|
@@ -27,22 +27,22 @@ function ue(a, g) {
|
|
|
27
27
|
header: g(me[s])
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const pe = [
|
|
31
31
|
"documentIdentifier",
|
|
32
32
|
"documentType",
|
|
33
33
|
"uploadedOn",
|
|
34
34
|
"uploadedBy",
|
|
35
35
|
"action"
|
|
36
|
-
],
|
|
37
|
-
const [s,
|
|
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
|
+
const [s, S] = l(!1), [o, L] = l(
|
|
38
38
|
null
|
|
39
39
|
), [R, I] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m,
|
|
42
|
-
L(e),
|
|
41
|
+
), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), b = h((e) => {
|
|
42
|
+
L(e), S(!0);
|
|
43
43
|
}, []), F = h(() => {
|
|
44
|
-
|
|
45
|
-
}, []),
|
|
44
|
+
S(!1), L(null), I(/* @__PURE__ */ new Set());
|
|
45
|
+
}, []), M = h((e) => {
|
|
46
46
|
I((t) => new Set(t).add(e));
|
|
47
47
|
}, []), { data: u, isLoading: H, isError: D, error: v } = ae({
|
|
48
48
|
queryKey: [
|
|
@@ -76,9 +76,9 @@ const _e = [
|
|
|
76
76
|
if (!s || !o) return;
|
|
77
77
|
const t = /* @__PURE__ */ new Set(), c = B(o);
|
|
78
78
|
for (let i = 0; i < c.length; i++) {
|
|
79
|
-
const
|
|
79
|
+
const w = j(c[i].url);
|
|
80
80
|
try {
|
|
81
|
-
(await fetch(
|
|
81
|
+
(await fetch(w, {
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
84
|
})).ok || t.add(i);
|
|
@@ -91,11 +91,11 @@ const _e = [
|
|
|
91
91
|
}, [s, o]);
|
|
92
92
|
const q = h(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !== m ? (
|
|
94
|
+
t !== m ? (k(t), A(1), y(void 0)) : A(e);
|
|
95
95
|
},
|
|
96
96
|
[m]
|
|
97
97
|
), N = T(
|
|
98
|
-
() => a?.fields ??
|
|
98
|
+
() => a?.fields ?? pe,
|
|
99
99
|
[a?.fields]
|
|
100
100
|
), P = 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]), z = T(() => ue(N, n), [N, n]), x = T(
|
|
101
101
|
() => N.map((e) => ({
|
|
@@ -103,7 +103,7 @@ const _e = [
|
|
|
103
103
|
sortable: e !== "action"
|
|
104
104
|
})),
|
|
105
105
|
[N]
|
|
106
|
-
),
|
|
106
|
+
), p = T(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
109
|
), G = h(
|
|
@@ -125,7 +125,7 @@ const _e = [
|
|
|
125
125
|
return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ r(
|
|
126
126
|
X,
|
|
127
127
|
{
|
|
128
|
-
onClick: () =>
|
|
128
|
+
onClick: () => b(e),
|
|
129
129
|
className: d.viewAttachmentsLink,
|
|
130
130
|
"data-testid": `view-attachments-${e.id}`,
|
|
131
131
|
children: n("DOCUMENTS_VIEW_ATTACHMENTS")
|
|
@@ -135,9 +135,9 @@ const _e = [
|
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
-
[
|
|
138
|
+
[b, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ _(Y, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
@@ -152,7 +152,7 @@ const _e = [
|
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: m,
|
|
155
|
-
totalItems:
|
|
155
|
+
totalItems: V,
|
|
156
156
|
page: C,
|
|
157
157
|
onPageChange: q
|
|
158
158
|
}
|
|
@@ -168,41 +168,41 @@ const _e = [
|
|
|
168
168
|
passiveModal: !0,
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
|
-
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children:
|
|
172
|
-
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"),
|
|
173
|
-
return c === "#" || O ? /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: p.map((e, t) => {
|
|
172
|
+
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), w = (e.contentType?.toLowerCase().includes("image") ?? !1) || _e.test(e.url ?? ""), O = R.has(t);
|
|
173
|
+
return c === "#" || O ? /* @__PURE__ */ _(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
177
177
|
"data-testid": `attachment-error-${t}`,
|
|
178
178
|
children: [
|
|
179
|
-
|
|
179
|
+
p.length > 1 && /* @__PURE__ */ _("p", { className: d.attachmentCounter, children: [
|
|
180
180
|
t + 1,
|
|
181
181
|
"/",
|
|
182
|
-
|
|
182
|
+
p.length
|
|
183
183
|
] }),
|
|
184
184
|
/* @__PURE__ */ r("p", { children: n("DOCUMENTS_ERROR_LOADING_ATTACHMENT") })
|
|
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
|
-
|
|
194
|
+
p.length > 1 && /* @__PURE__ */ _("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
|
-
|
|
197
|
+
p.length
|
|
198
198
|
] }),
|
|
199
|
-
|
|
199
|
+
w ? /* @__PURE__ */ r(
|
|
200
200
|
"img",
|
|
201
201
|
{
|
|
202
202
|
src: c,
|
|
203
203
|
alt: o.documentIdentifier,
|
|
204
204
|
className: d.documentImage,
|
|
205
|
-
onError: () =>
|
|
205
|
+
onError: () => M(t)
|
|
206
206
|
}
|
|
207
207
|
) : /* @__PURE__ */ r(
|
|
208
208
|
"iframe",
|
|
@@ -210,7 +210,7 @@ const _e = [
|
|
|
210
210
|
src: i ? `${c}#toolbar=0` : c,
|
|
211
211
|
className: d.documentIframe,
|
|
212
212
|
title: o.documentIdentifier,
|
|
213
|
-
onError: () =>
|
|
213
|
+
onError: () => M(t)
|
|
214
214
|
}
|
|
215
215
|
)
|
|
216
216
|
]
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { u as Z,
|
|
1
|
+
import { jsx as s, jsxs as W, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import { u as Z, c as ee, e as re, f as ae, s as te, g as oe, i as se, Q as ne, N as U, m as de, l as ie, b as S, x as me, h as ue, w as le, $ as ce, o as fe } from "./index-DvLFtPO3.js";
|
|
3
3
|
import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
|
|
4
4
|
import { useState as q, useMemo as d, useCallback as f } from "react";
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
7
|
-
customAccordianItem:
|
|
8
|
-
},
|
|
5
|
+
const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
|
|
6
|
+
formsTableBody: pe,
|
|
7
|
+
customAccordianItem: be
|
|
8
|
+
}, Ne = (m) => m ? m.extension?.find(
|
|
9
9
|
(n) => n.url === fe
|
|
10
|
-
)?.valueString : void 0,
|
|
10
|
+
)?.valueString : void 0, Ie = ({
|
|
11
11
|
episodeOfCareUuids: m,
|
|
12
12
|
encounterUuids: n,
|
|
13
13
|
config: C
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: o } = Z(), u = ee(), [l,
|
|
15
|
+
const { t: o } = Z(), u = ee(), [l, A] = q(!1), [t, I] = q(null), { numberOfVisits: x, hideThumbnail: k = !1 } = C ?? {}, T = re(
|
|
16
16
|
m,
|
|
17
17
|
n
|
|
18
|
-
),
|
|
18
|
+
), $ = ye(), {
|
|
19
19
|
data: y = [],
|
|
20
|
-
isLoading:
|
|
21
|
-
isError:
|
|
22
|
-
error:
|
|
23
|
-
refetch:
|
|
20
|
+
isLoading: B,
|
|
21
|
+
isError: E,
|
|
22
|
+
error: H,
|
|
23
|
+
refetch: K
|
|
24
24
|
} = c({
|
|
25
25
|
queryKey: ["forms", u, m],
|
|
26
|
-
queryFn: () => ae(u, void 0,
|
|
27
|
-
enabled: !!u && !
|
|
28
|
-
}),
|
|
26
|
+
queryFn: () => ae(u, void 0, x),
|
|
27
|
+
enabled: !!u && !T
|
|
28
|
+
}), _ = d(() => !n || n.length === 0 ? y : y.filter(
|
|
29
29
|
(e) => n.includes(e.encounterUuid)
|
|
30
|
-
), [y, n]), { data:
|
|
30
|
+
), [y, n]), { data: D = [] } = c({
|
|
31
31
|
queryKey: ["observationForms"],
|
|
32
32
|
queryFn: () => te()
|
|
33
|
-
}),
|
|
34
|
-
(e) =>
|
|
35
|
-
[
|
|
36
|
-
),
|
|
33
|
+
}), F = f(
|
|
34
|
+
(e) => D.find((r) => r.name === e)?.uuid,
|
|
35
|
+
[D]
|
|
36
|
+
), p = d(() => {
|
|
37
37
|
if (t)
|
|
38
|
-
return
|
|
39
|
-
}, [t,
|
|
40
|
-
isLoading:
|
|
41
|
-
isError:
|
|
42
|
-
error:
|
|
38
|
+
return F(t.formName);
|
|
39
|
+
}, [t, F]), {
|
|
40
|
+
isLoading: Q,
|
|
41
|
+
isError: j,
|
|
42
|
+
error: b
|
|
43
43
|
} = c({
|
|
44
|
-
queryKey: ["formMetadata",
|
|
45
|
-
queryFn: () => oe(
|
|
46
|
-
enabled: !!
|
|
44
|
+
queryKey: ["formMetadata", p],
|
|
45
|
+
queryFn: () => oe(p),
|
|
46
|
+
enabled: !!p && l
|
|
47
47
|
}), {
|
|
48
|
-
data:
|
|
49
|
-
isLoading:
|
|
50
|
-
isError:
|
|
51
|
-
error:
|
|
48
|
+
data: N,
|
|
49
|
+
isLoading: w,
|
|
50
|
+
isError: V,
|
|
51
|
+
error: g
|
|
52
52
|
} = c({
|
|
53
53
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
54
54
|
queryFn: () => se(t.encounterUuid),
|
|
@@ -56,19 +56,19 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
56
56
|
});
|
|
57
57
|
ne(
|
|
58
58
|
(e) => {
|
|
59
|
-
e.patientUUID === u && e.updatedConcepts.size > 0 && (
|
|
59
|
+
e.patientUUID === u && e.updatedConcepts.size > 0 && (K(), $.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
60
60
|
},
|
|
61
61
|
[u]
|
|
62
62
|
);
|
|
63
|
-
const z = d(() => !
|
|
64
|
-
const r =
|
|
63
|
+
const z = d(() => !N?.entry || !t?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
64
|
+
const r = Ne(e);
|
|
65
65
|
return !r || r.includes(t.formName);
|
|
66
|
-
}), [
|
|
66
|
+
}), [N, t?.formName]), G = d(() => {
|
|
67
|
+
if (b)
|
|
68
|
+
return U(b).message;
|
|
67
69
|
if (g)
|
|
68
70
|
return U(g).message;
|
|
69
|
-
|
|
70
|
-
return U(N).message;
|
|
71
|
-
}, [g, N]), L = d(
|
|
71
|
+
}, [b, g]), L = d(
|
|
72
72
|
() => [
|
|
73
73
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
74
74
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
@@ -81,11 +81,11 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
81
81
|
],
|
|
82
82
|
[]
|
|
83
83
|
), M = d(() => {
|
|
84
|
-
const e =
|
|
84
|
+
const e = _.reduce(
|
|
85
85
|
(r, a) => {
|
|
86
86
|
const i = a.formName;
|
|
87
87
|
r[i] ??= [];
|
|
88
|
-
const h = a.providers.map((
|
|
88
|
+
const h = a.providers.map((J) => J.providerName).filter(Boolean).join(", ");
|
|
89
89
|
return r[i].push({
|
|
90
90
|
id: a.encounterUuid,
|
|
91
91
|
formName: a.formName,
|
|
@@ -105,35 +105,35 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
105
105
|
)
|
|
106
106
|
})
|
|
107
107
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
108
|
-
}, [
|
|
109
|
-
|
|
110
|
-
}, []),
|
|
111
|
-
|
|
112
|
-
}, []),
|
|
108
|
+
}, [_, o]), R = f((e) => {
|
|
109
|
+
I(e), A(!0);
|
|
110
|
+
}, []), Y = f(() => {
|
|
111
|
+
A(!1), I(null);
|
|
112
|
+
}, []), v = f(
|
|
113
113
|
(e, r) => {
|
|
114
114
|
switch (r) {
|
|
115
115
|
case "recordedOn":
|
|
116
|
-
return /* @__PURE__ */ s(ie, { onClick: () =>
|
|
116
|
+
return /* @__PURE__ */ s(ie, { onClick: () => R(e), children: e.recordedOn });
|
|
117
117
|
case "recordedBy":
|
|
118
118
|
return e.recordedBy;
|
|
119
119
|
default:
|
|
120
120
|
return null;
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
-
[
|
|
123
|
+
[R]
|
|
124
124
|
);
|
|
125
|
-
return /* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children:
|
|
125
|
+
return /* @__PURE__ */ W(X, { children: [
|
|
126
|
+
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children: B || E || M.length === 0 || T ? /* @__PURE__ */ s(
|
|
127
127
|
S,
|
|
128
128
|
{
|
|
129
129
|
headers: L,
|
|
130
130
|
ariaLabel: o("FORMS_HEADING"),
|
|
131
131
|
rows: [],
|
|
132
|
-
loading:
|
|
133
|
-
errorStateMessage:
|
|
132
|
+
loading: B,
|
|
133
|
+
errorStateMessage: E ? H?.message : void 0,
|
|
134
134
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
135
|
-
renderCell:
|
|
136
|
-
className:
|
|
135
|
+
renderCell: v,
|
|
136
|
+
className: O.formsTableBody,
|
|
137
137
|
dataTestId: "forms-table"
|
|
138
138
|
}
|
|
139
139
|
) : /* @__PURE__ */ s(me, { align: "start", children: M.map((e, r) => {
|
|
@@ -142,7 +142,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
142
142
|
ue,
|
|
143
143
|
{
|
|
144
144
|
title: a,
|
|
145
|
-
className:
|
|
145
|
+
className: O.customAccordianItem,
|
|
146
146
|
testId: `accordian-title-${a}`,
|
|
147
147
|
open: r === 0,
|
|
148
148
|
children: /* @__PURE__ */ s(
|
|
@@ -155,8 +155,8 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
155
155
|
errorStateMessage: "",
|
|
156
156
|
sortable: P,
|
|
157
157
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
158
|
-
renderCell:
|
|
159
|
-
className:
|
|
158
|
+
renderCell: v,
|
|
159
|
+
className: O.formsTableBody,
|
|
160
160
|
dataTestId: `forms-table-${a}`
|
|
161
161
|
}
|
|
162
162
|
)
|
|
@@ -170,7 +170,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
170
170
|
id: "modalIdForActionAreaLayout",
|
|
171
171
|
portalId: "main-display-area",
|
|
172
172
|
open: l,
|
|
173
|
-
onRequestClose:
|
|
173
|
+
onRequestClose: Y,
|
|
174
174
|
modalHeading: t.formName,
|
|
175
175
|
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
176
176
|
passiveModal: !0,
|
|
@@ -180,12 +180,12 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
180
180
|
ce,
|
|
181
181
|
{
|
|
182
182
|
observations: z,
|
|
183
|
-
isLoading:
|
|
184
|
-
isError:
|
|
183
|
+
isLoading: Q || w,
|
|
184
|
+
isError: j || V,
|
|
185
185
|
errorMessage: G,
|
|
186
186
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
187
187
|
testIdPrefix: t.formName,
|
|
188
|
-
hideThumbnail:
|
|
188
|
+
hideThumbnail: k
|
|
189
189
|
}
|
|
190
190
|
)
|
|
191
191
|
}
|
|
@@ -193,5 +193,5 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
193
193
|
] });
|
|
194
194
|
};
|
|
195
195
|
export {
|
|
196
|
-
|
|
196
|
+
Ie as default
|
|
197
197
|
};
|
|
@@ -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-gy4VomWy.js";
|
|
2
|
+
import { B as d, C as f, D as e } from "./index-DvLFtPO3.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
|
-
},
|
|
30
|
+
}, P = p;
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
P as default
|
|
33
33
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
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-gy4VomWy.js";
|
|
2
|
+
import { B as C, C as v, D as e } from "./index-DvLFtPO3.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), a =
|
|
6
|
+
}), a = C(), l = v(() => {
|
|
7
7
|
const n = r.theme_preference || c;
|
|
8
8
|
return n !== "system" ? n : a();
|
|
9
9
|
});
|
|
@@ -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
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as B, d as Q, u as N, n as H, j as K, Q as w, k as j, p as x, q as G, H as M, b as X, r as z, Z as A, t as P, v as Z, R as Y, y as J, z as W, A as ee } from "./index-DvLFtPO3.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 = P(t, n, b), s = a.value, i =
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as R } from "react";
|
|
5
|
+
const D = (t, n, d, l, b, r) => {
|
|
6
|
+
const a = P(t, n, b), s = a.value, i = Z(s);
|
|
7
7
|
let o = s;
|
|
8
8
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
9
|
-
|
|
9
|
+
J,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
@@ -14,22 +14,22 @@ const A = (t, n, d, l, b, r) => {
|
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
16
|
)), i === "Video" && (o = /* @__PURE__ */ u(
|
|
17
|
-
|
|
17
|
+
W,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
21
21
|
hideThumbnail: r
|
|
22
22
|
}
|
|
23
23
|
)), i === "PDF" && (o = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
|
-
const
|
|
24
|
+
const p = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: a.provider
|
|
26
|
-
}),
|
|
26
|
+
}), m = t.display, y = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${m}-${d}-${n}` : `${y}-${m}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
Y,
|
|
29
29
|
{
|
|
30
30
|
header: a.header,
|
|
31
31
|
value: o,
|
|
32
|
-
info:
|
|
32
|
+
info: p,
|
|
33
33
|
id: c,
|
|
34
34
|
testId: c,
|
|
35
35
|
ariaLabel: c
|
|
@@ -37,13 +37,13 @@ const A = (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
|
+
A,
|
|
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, i) =>
|
|
46
|
+
(s, i) => D(
|
|
47
47
|
s,
|
|
48
48
|
i,
|
|
49
49
|
b,
|
|
@@ -59,19 +59,19 @@ const A = (t, n, d, l, b, r) => {
|
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } =
|
|
63
|
-
const i =
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
62
|
+
const { t: l } = N(), b = (r, a, s) => {
|
|
63
|
+
const i = z(r.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ S(
|
|
65
|
+
A,
|
|
66
66
|
{
|
|
67
67
|
title: i,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: a,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(o,
|
|
72
|
+
(o, p) => D(
|
|
73
73
|
o,
|
|
74
|
-
|
|
74
|
+
p,
|
|
75
75
|
s,
|
|
76
76
|
n,
|
|
77
77
|
l,
|
|
@@ -79,11 +79,11 @@ const A = (t, n, d, l, b, r) => {
|
|
|
79
79
|
)
|
|
80
80
|
),
|
|
81
81
|
r.groupedObservations.map(
|
|
82
|
-
(o,
|
|
82
|
+
(o, p) => re(
|
|
83
83
|
o,
|
|
84
84
|
l,
|
|
85
85
|
a,
|
|
86
|
-
|
|
86
|
+
p,
|
|
87
87
|
s,
|
|
88
88
|
n,
|
|
89
89
|
d
|
|
@@ -108,15 +108,15 @@ const A = (t, n, d, l, b, r) => {
|
|
|
108
108
|
}, oe = "_observations_kfbhq_1", ne = "_title_kfbhq_12", I = {
|
|
109
109
|
observations: oe,
|
|
110
110
|
title: ne
|
|
111
|
-
}, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n],
|
|
111
|
+
}, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n], me = ({ config: t }) => {
|
|
112
112
|
const n = t, {
|
|
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 } = Q(), { t: i } = N(), o = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => H(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
@@ -132,23 +132,23 @@ const A = (t, n, d, l, b, r) => {
|
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [o, d]);
|
|
135
|
-
const
|
|
135
|
+
const p = R(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), m = R(() => [.../* @__PURE__ */ new Set([...p, ...l])], [p, l]), y = R(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: F,
|
|
138
138
|
isError: f,
|
|
139
|
-
refetch:
|
|
139
|
+
refetch: T
|
|
140
140
|
} = ae({
|
|
141
|
-
queryKey: le(a,
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!a &&
|
|
141
|
+
queryKey: le(a, m),
|
|
142
|
+
queryFn: () => K(a, m),
|
|
143
|
+
enabled: !!a && m.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
w(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
|
-
(h) =>
|
|
149
|
-
) &&
|
|
148
|
+
(h) => m.includes(h)
|
|
149
|
+
) && T();
|
|
150
150
|
},
|
|
151
|
-
[a,
|
|
151
|
+
[a, T]
|
|
152
152
|
), $(() => {
|
|
153
153
|
f && s({
|
|
154
154
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
@@ -156,16 +156,16 @@ const A = (t, n, d, l, b, r) => {
|
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [f]);
|
|
159
|
-
const g =
|
|
159
|
+
const g = R(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = j(c), h = x(e);
|
|
162
|
+
return G(h);
|
|
163
|
+
}, [c]), L = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], O =
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], O = F || !y, _ = f && y, k = (!c || c.entry?.length === 0 || m.length === 0) && y, q = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = k ? i("NO_OBSERVATIONS_FOUND") : void 0, U = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
|
+
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
@@ -174,7 +174,7 @@ const A = (t, n, d, l, b, r) => {
|
|
|
174
174
|
className: I.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,7 +183,7 @@ const A = (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
|
ie,
|
|
188
188
|
{
|
|
189
189
|
groupedData: g,
|
|
@@ -191,14 +191,14 @@ const A = (t, n, d, l, b, r) => {
|
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
X,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: L,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: i("OBSERVATIONS"),
|
|
199
199
|
loading: O,
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
200
|
+
errorStateMessage: q,
|
|
201
|
+
emptyStateMessage: C,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -208,6 +208,6 @@ const A = (t, n, d, l, b, r) => {
|
|
|
208
208
|
};
|
|
209
209
|
export {
|
|
210
210
|
de as conceptUuidQueryKeys,
|
|
211
|
-
|
|
211
|
+
me as default,
|
|
212
212
|
le as observationsQueryKeys
|
|
213
213
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as we, F as z, G as xt, I as B, C as q, D as y, P as Ro, J as ye, S as R, K as _, L as k, M as N, O as A, T as bs, U as ir, V as $e, W as U, X as Hn, Y 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-DvLFtPO3.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|