@bahmni/clinical-app 0.0.1-dev.315 → 0.0.1-dev.318
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-Vqt2a9Au-BeRzDNGR.js → DocumentsTable-N3KZd9ZV-CcH3qVf7.js} +13 -13
- package/dist/{FormsTable-Chdn76ek-BhDTt1uX.js → FormsTable-F1FaoFiu-CQFLg9ie.js} +80 -80
- package/dist/{LNWAZHJI-BaAy8XgP.js → LNWAZHJI-DfNSpiBW.js} +2 -2
- package/dist/{MWZ6AO7Z-NbtboMH7.js → MWZ6AO7Z-B5LTM4hd.js} +2 -2
- package/dist/{Observations-7ynzJK04-C1GN4TD2.js → Observations-HyR2_B59-T09a0rra.js} +26 -26
- package/dist/{YPM2AS64-9mmaBrtU.js → YPM2AS64-aNWz_fIh.js} +1 -1
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts.map +1 -1
- package/dist/{index-BhSuogDE.js → index-CxztBQry.js} +25094 -25096
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +1 -0
- package/dist/locales/locale_es.json +1 -0
- package/package.json +1 -1
- package/dist/hooks/useFormPatientContext.d.ts +0 -14
- package/dist/hooks/useFormPatientContext.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { n as G, u as W, o as Y,
|
|
2
|
+
import { n as G, u as W, o as Y, U as J, a as X, g as Z, O as ee, h as te } from "./index-CxztBQry.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as N, useMemo as p } 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 = {
|
|
@@ -34,17 +34,17 @@ const Te = [
|
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
36
|
], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Oe = ({ config: a, encounterUuids: g }) => {
|
|
37
|
-
const [s,
|
|
37
|
+
const [s, U] = l(!1), [o, w] = l(
|
|
38
38
|
null
|
|
39
39
|
), [$, D] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = G(), { t: n } = W(), { addNotification:
|
|
42
|
-
|
|
43
|
-
}, []),
|
|
44
|
-
|
|
41
|
+
), E = G(), { t: n } = W(), { addNotification: M } = Y(), k = Number(a?.pageSize) || 5, [I, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), L = _((e) => {
|
|
42
|
+
w(e), U(!0);
|
|
43
|
+
}, []), H = _(() => {
|
|
44
|
+
U(!1), w(null), D(/* @__PURE__ */ new Set());
|
|
45
45
|
}, []), v = _((e) => {
|
|
46
46
|
D((t) => new Set(t).add(e));
|
|
47
|
-
}, []), { data: i, isLoading:
|
|
47
|
+
}, []), { data: i, isLoading: q, isError: b, error: y } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
50
50
|
E,
|
|
@@ -65,12 +65,12 @@ const Te = [
|
|
|
65
65
|
}, [i]), N(() => {
|
|
66
66
|
C(1), A(void 0);
|
|
67
67
|
}, [E]), N(() => {
|
|
68
|
-
b &&
|
|
68
|
+
b && M({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: y?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [b, y,
|
|
73
|
+
}, [b, y, M, n]), N(() => {
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
@@ -89,7 +89,7 @@ const Te = [
|
|
|
89
89
|
e.signal.aborted || D(t);
|
|
90
90
|
})(), () => e.abort();
|
|
91
91
|
}, [s, o]);
|
|
92
|
-
const
|
|
92
|
+
const j = _(
|
|
93
93
|
(e, t) => {
|
|
94
94
|
t !== u ? (V(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
@@ -144,7 +144,7 @@ const Te = [
|
|
|
144
144
|
headers: z,
|
|
145
145
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
146
146
|
rows: P,
|
|
147
|
-
loading:
|
|
147
|
+
loading: q,
|
|
148
148
|
errorStateMessage: b ? y?.message : null,
|
|
149
149
|
sortable: K,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
@@ -154,7 +154,7 @@ const Te = [
|
|
|
154
154
|
pageSize: u,
|
|
155
155
|
totalItems: F,
|
|
156
156
|
page: I,
|
|
157
|
-
onPageChange:
|
|
157
|
+
onPageChange: j
|
|
158
158
|
}
|
|
159
159
|
) }),
|
|
160
160
|
s && o && /* @__PURE__ */ r(
|
|
@@ -163,7 +163,7 @@ const Te = [
|
|
|
163
163
|
id: "modalIdForActionAreaLayout",
|
|
164
164
|
portalId: "main-display-area",
|
|
165
165
|
open: s,
|
|
166
|
-
onRequestClose:
|
|
166
|
+
onRequestClose: H,
|
|
167
167
|
modalHeading: o.documentIdentifier,
|
|
168
168
|
passiveModal: !0,
|
|
169
169
|
size: "lg",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as i, jsxs as re, Fragment as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as i, jsxs as re, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
+
import { u as te, n as oe, x as se, j as ne, B as de, F as ie, P as le, b as ue, D as q, g as me, a as ce, O as j, w as fe, v as ye, h as he, Q as be, $ as ge } from "./index-CxztBQry.js";
|
|
3
3
|
import { useQueryClient as pe, useQuery as h } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as w, useMemo as d, useCallback as b } from "react";
|
|
5
5
|
const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", M = {
|
|
6
6
|
formsTableBody: Ne,
|
|
7
7
|
customAccordianItem: Oe
|
|
@@ -10,31 +10,31 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
10
10
|
)?.valueString : void 0, Te = ({
|
|
11
11
|
episodeOfCareUuids: m,
|
|
12
12
|
encounterUuids: l,
|
|
13
|
-
config:
|
|
13
|
+
config: k
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: n } =
|
|
16
|
-
numberOfVisits:
|
|
17
|
-
hideThumbnail:
|
|
15
|
+
const { t: n } = te(), c = oe(), [f, v] = w(!1), [o, F] = w(null), {
|
|
16
|
+
numberOfVisits: x,
|
|
17
|
+
hideThumbnail: $ = !1,
|
|
18
18
|
forms: y
|
|
19
|
-
} =
|
|
19
|
+
} = k ?? {}, I = se(
|
|
20
20
|
m,
|
|
21
21
|
l
|
|
22
|
-
),
|
|
22
|
+
), H = pe(), {
|
|
23
23
|
data: T = [],
|
|
24
24
|
isLoading: B,
|
|
25
|
-
isError:
|
|
26
|
-
error:
|
|
27
|
-
refetch:
|
|
25
|
+
isError: D,
|
|
26
|
+
error: K,
|
|
27
|
+
refetch: Q
|
|
28
28
|
} = h({
|
|
29
29
|
queryKey: ["forms", c, m],
|
|
30
|
-
queryFn: () => ne(c, void 0,
|
|
30
|
+
queryFn: () => ne(c, void 0, x),
|
|
31
31
|
enabled: !!c && !I
|
|
32
|
-
}),
|
|
32
|
+
}), E = d(() => {
|
|
33
33
|
let e = T;
|
|
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
|
-
(r) => y.some((
|
|
37
|
+
(r) => y.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
38
38
|
)), e;
|
|
39
39
|
}, [T, l, y]), { data: L = [] } = h({
|
|
40
40
|
queryKey: ["observationForms"],
|
|
@@ -43,11 +43,11 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
43
43
|
(e) => L.find((r) => r.name === e)?.uuid,
|
|
44
44
|
[L]
|
|
45
45
|
), g = d(() => {
|
|
46
|
-
if (
|
|
47
|
-
return S(
|
|
48
|
-
}, [
|
|
46
|
+
if (o)
|
|
47
|
+
return S(o.formName);
|
|
48
|
+
}, [o, S]), {
|
|
49
49
|
data: u,
|
|
50
|
-
isLoading:
|
|
50
|
+
isLoading: V,
|
|
51
51
|
isError: z,
|
|
52
52
|
error: p
|
|
53
53
|
} = h({
|
|
@@ -60,45 +60,45 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
60
60
|
isError: P,
|
|
61
61
|
error: O
|
|
62
62
|
} = h({
|
|
63
|
-
queryKey: ["formsEncounterFHIR",
|
|
64
|
-
queryFn: () => le(
|
|
65
|
-
enabled: !!
|
|
63
|
+
queryKey: ["formsEncounterFHIR", o?.encounterUuid],
|
|
64
|
+
queryFn: () => le(o.encounterUuid),
|
|
65
|
+
enabled: !!o?.encounterUuid && f
|
|
66
66
|
});
|
|
67
67
|
ue(
|
|
68
68
|
(e) => {
|
|
69
|
-
e.patientUUID === c && e.updatedConcepts.size > 0 && (
|
|
69
|
+
e.patientUUID === c && e.updatedConcepts.size > 0 && (Q(), H.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
70
70
|
},
|
|
71
71
|
[c]
|
|
72
72
|
);
|
|
73
|
-
const
|
|
73
|
+
const Y = d(() => !N?.entry || !o?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
74
74
|
const r = Ae(e);
|
|
75
|
-
return !r || r.includes(
|
|
76
|
-
}), [N,
|
|
75
|
+
return !r || r.includes(o.formName);
|
|
76
|
+
}), [N, o?.formName]), J = d(() => {
|
|
77
77
|
if (!u?.schema) return;
|
|
78
|
-
const e = [], r = (
|
|
79
|
-
(
|
|
80
|
-
const
|
|
81
|
-
|
|
78
|
+
const e = [], r = (a) => {
|
|
79
|
+
(a ?? []).forEach((s) => {
|
|
80
|
+
const t = s;
|
|
81
|
+
t.id != null && e.push(String(t.id)), t.controls && r(t.controls);
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
return r(
|
|
85
85
|
u.schema.controls ?? []
|
|
86
86
|
), e.length > 0 ? e : void 0;
|
|
87
|
-
}, [u]),
|
|
87
|
+
}, [u]), W = d(() => {
|
|
88
88
|
if (!u?.schema) return;
|
|
89
|
-
const e = {}, r = (
|
|
90
|
-
for (const
|
|
91
|
-
if (
|
|
92
|
-
const A =
|
|
93
|
-
r(
|
|
89
|
+
const e = {}, r = (a, s) => {
|
|
90
|
+
for (const t of a)
|
|
91
|
+
if (t.type === "section") {
|
|
92
|
+
const A = t.label?.value ?? "Section";
|
|
93
|
+
r(t.controls ?? [], A);
|
|
94
94
|
} else
|
|
95
|
-
|
|
95
|
+
t.id != null && s && (e[String(t.id)] = s), t.controls && r(t.controls, s);
|
|
96
96
|
};
|
|
97
97
|
return r(
|
|
98
98
|
u.schema.controls ?? [],
|
|
99
99
|
null
|
|
100
100
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
101
|
-
}, [u]),
|
|
101
|
+
}, [u]), X = d(() => {
|
|
102
102
|
if (p)
|
|
103
103
|
return q(p).message;
|
|
104
104
|
if (O)
|
|
@@ -109,41 +109,41 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
109
109
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
110
110
|
],
|
|
111
111
|
[n]
|
|
112
|
-
),
|
|
112
|
+
), Z = d(
|
|
113
113
|
() => [
|
|
114
114
|
{ key: "recordedOn", sortable: !0 },
|
|
115
115
|
{ key: "recordedBy", sortable: !0 }
|
|
116
116
|
],
|
|
117
117
|
[]
|
|
118
118
|
), C = d(() => {
|
|
119
|
-
const e =
|
|
120
|
-
(r,
|
|
121
|
-
const
|
|
122
|
-
r[
|
|
123
|
-
const
|
|
124
|
-
return r[
|
|
125
|
-
id:
|
|
126
|
-
formName:
|
|
127
|
-
recordedOn: me(
|
|
128
|
-
recordedBy:
|
|
129
|
-
encounterDateTime:
|
|
130
|
-
encounterUuid:
|
|
119
|
+
const e = E.reduce(
|
|
120
|
+
(r, a) => {
|
|
121
|
+
const s = a.formName;
|
|
122
|
+
r[s] ??= [];
|
|
123
|
+
const t = a.providers.map((A) => A.providerName).filter(Boolean).join(", ");
|
|
124
|
+
return r[s].push({
|
|
125
|
+
id: a.encounterUuid,
|
|
126
|
+
formName: a.formName,
|
|
127
|
+
recordedOn: me(a.encounterDateTime, n, !0).formattedResult,
|
|
128
|
+
recordedBy: t ?? "--",
|
|
129
|
+
encounterDateTime: a.encounterDateTime,
|
|
130
|
+
encounterUuid: a.encounterUuid
|
|
131
131
|
}), r;
|
|
132
132
|
},
|
|
133
133
|
{}
|
|
134
134
|
);
|
|
135
135
|
return Object.entries(e).map(
|
|
136
|
-
([r,
|
|
136
|
+
([r, a]) => ({
|
|
137
137
|
formName: r,
|
|
138
|
-
records:
|
|
139
|
-
(
|
|
138
|
+
records: a.sort(
|
|
139
|
+
(s, t) => t.encounterDateTime - s.encounterDateTime
|
|
140
140
|
)
|
|
141
141
|
})
|
|
142
|
-
).sort((r,
|
|
143
|
-
}, [
|
|
144
|
-
|
|
142
|
+
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
143
|
+
}, [E, n]), R = b((e) => {
|
|
144
|
+
F(e), v(!0);
|
|
145
145
|
}, []), ee = b(() => {
|
|
146
|
-
|
|
146
|
+
v(!1), F(null);
|
|
147
147
|
}, []), U = b(
|
|
148
148
|
(e, r) => {
|
|
149
149
|
switch (r) {
|
|
@@ -157,72 +157,72 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
157
157
|
},
|
|
158
158
|
[R]
|
|
159
159
|
);
|
|
160
|
-
return /* @__PURE__ */ re(
|
|
161
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: B ||
|
|
162
|
-
|
|
160
|
+
return /* @__PURE__ */ re(ae, { children: [
|
|
161
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: B || D || C.length === 0 || I ? /* @__PURE__ */ i(
|
|
162
|
+
j,
|
|
163
163
|
{
|
|
164
164
|
headers: _,
|
|
165
165
|
ariaLabel: n("FORMS_HEADING"),
|
|
166
166
|
rows: [],
|
|
167
167
|
loading: B,
|
|
168
|
-
errorStateMessage:
|
|
168
|
+
errorStateMessage: D ? K?.message : void 0,
|
|
169
169
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
170
170
|
renderCell: U,
|
|
171
171
|
className: M.formsTableBody,
|
|
172
172
|
dataTestId: "forms-table"
|
|
173
173
|
}
|
|
174
174
|
) : /* @__PURE__ */ i(fe, { align: "start", children: C.map((e, r) => {
|
|
175
|
-
const { formName:
|
|
175
|
+
const { formName: a, records: s } = e;
|
|
176
176
|
return /* @__PURE__ */ i(
|
|
177
177
|
ye,
|
|
178
178
|
{
|
|
179
|
-
title:
|
|
179
|
+
title: a,
|
|
180
180
|
className: M.customAccordianItem,
|
|
181
|
-
testId: `accordian-title-${
|
|
181
|
+
testId: `accordian-title-${a}`,
|
|
182
182
|
open: r === 0,
|
|
183
183
|
children: /* @__PURE__ */ i(
|
|
184
|
-
|
|
184
|
+
j,
|
|
185
185
|
{
|
|
186
186
|
headers: _,
|
|
187
187
|
ariaLabel: n("FORMS_HEADING"),
|
|
188
|
-
rows:
|
|
188
|
+
rows: s,
|
|
189
189
|
loading: !1,
|
|
190
190
|
errorStateMessage: "",
|
|
191
|
-
sortable:
|
|
191
|
+
sortable: Z,
|
|
192
192
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
193
193
|
renderCell: U,
|
|
194
194
|
className: M.formsTableBody,
|
|
195
|
-
dataTestId: `forms-table-${
|
|
195
|
+
dataTestId: `forms-table-${a}`
|
|
196
196
|
}
|
|
197
197
|
)
|
|
198
198
|
},
|
|
199
|
-
|
|
199
|
+
a
|
|
200
200
|
);
|
|
201
201
|
}) }) }),
|
|
202
|
-
f &&
|
|
202
|
+
f && o && /* @__PURE__ */ i(
|
|
203
203
|
he,
|
|
204
204
|
{
|
|
205
205
|
id: "modalIdForActionAreaLayout",
|
|
206
206
|
portalId: "main-display-area",
|
|
207
207
|
open: f,
|
|
208
208
|
onRequestClose: ee,
|
|
209
|
-
modalHeading:
|
|
210
|
-
modalLabel: `${
|
|
209
|
+
modalHeading: o.formName,
|
|
210
|
+
modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
|
|
211
211
|
passiveModal: !0,
|
|
212
212
|
size: "md",
|
|
213
213
|
testId: "form-details-modal",
|
|
214
214
|
children: /* @__PURE__ */ i(
|
|
215
215
|
be,
|
|
216
216
|
{
|
|
217
|
-
observations:
|
|
218
|
-
isLoading:
|
|
217
|
+
observations: Y,
|
|
218
|
+
isLoading: V || G,
|
|
219
219
|
isError: z || P,
|
|
220
|
-
errorMessage:
|
|
220
|
+
errorMessage: X,
|
|
221
221
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
222
|
-
testIdPrefix:
|
|
223
|
-
hideThumbnail:
|
|
224
|
-
controlOrder:
|
|
225
|
-
sectionMap:
|
|
222
|
+
testIdPrefix: o.formName,
|
|
223
|
+
hideThumbnail: $,
|
|
224
|
+
controlOrder: J,
|
|
225
|
+
sectionMap: W
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-
|
|
2
|
-
import { i as d, l as f, m as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-aNWz_fIh.js";
|
|
2
|
+
import { i as d, l as f, m as e } from "./index-CxztBQry.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 i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { i as v, l as C, m as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-aNWz_fIh.js";
|
|
2
|
+
import { i as v, l as C, m as e } from "./index-CxztBQry.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { n as
|
|
1
|
+
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { n as k, o as K, u as N, k as Q, Z as q, b as G, J as x, X as z, c as w, d as H, O as J, G as Y, E as M, Y as j, e as P, f as X, M as Z, S as W, z as ee } from "./index-CxztBQry.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as $, useMemo as O } from "react";
|
|
5
5
|
const D = (t, n, d, l, b, r) => {
|
|
6
6
|
const a = j(t, n, b), s = a.value, o = P(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
|
-
|
|
9
|
+
Z,
|
|
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
|
+
W,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
@@ -23,7 +23,7 @@ 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, y = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
28
|
X,
|
|
29
29
|
{
|
|
@@ -61,7 +61,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = N(), b = (r, a, s) => {
|
|
63
63
|
const o = Y(r.encounterDetails, l);
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ I(
|
|
65
65
|
M,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
@@ -105,7 +105,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z",
|
|
108
|
+
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", S = {
|
|
109
109
|
observations: ie,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n], pe = ({ config: t }) => {
|
|
@@ -113,36 +113,36 @@ 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 = k(), { addNotification: s } = K(), { t: o } = N(), i = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => Q(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
$(() => {
|
|
124
124
|
i.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const V = d[h];
|
|
127
127
|
s({
|
|
128
128
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: V }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m = O(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = O(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]),
|
|
135
|
+
const m = O(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = O(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = O(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
137
|
isLoading: F,
|
|
138
138
|
isError: R,
|
|
139
139
|
refetch: T
|
|
140
140
|
} = ae({
|
|
141
141
|
queryKey: le(a, p),
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!a && p.length > 0 &&
|
|
142
|
+
queryFn: () => q(a, p),
|
|
143
|
+
enabled: !!a && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
G(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
@@ -164,30 +164,30 @@ const D = (t, n, d, l, b, r) => {
|
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], g = F || !
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], g = F || !y, _ = R && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, C = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = f.length > 0 && !g && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
|
+
return /* @__PURE__ */ I(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid": E ? `observations-${
|
|
172
|
+
"data-testid": E ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
|
-
className:
|
|
174
|
+
className: S.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
177
|
H,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId: E ? `observations-title-${
|
|
181
|
-
title:
|
|
182
|
-
className:
|
|
183
|
-
children: /* @__PURE__ */ u("p", { children:
|
|
180
|
+
testId: E ? `observations-title-${v}` : "observations-title",
|
|
181
|
+
title: v,
|
|
182
|
+
className: S.title,
|
|
183
|
+
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
B ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
189
|
groupedData: f,
|
|
190
|
-
title:
|
|
190
|
+
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
@@ -198,7 +198,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
199
|
loading: g,
|
|
200
200
|
errorStateMessage: C,
|
|
201
|
-
emptyStateMessage:
|
|
201
|
+
emptyStateMessage: U,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as we, q as z, r as xt, s as B, l as q, m as y, t as Ro, y as ye, A as R, C as _,
|
|
1
|
+
import { p as we, q as z, r as xt, s as B, l as q, m as y, t as Ro, y as ye, A as R, C as _, H as k, I as N, K as A, L as bs, N as ir, R as $e, T as U, V as Hn, W 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-CxztBQry.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAWA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAWA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAUjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAgBlC,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,KACrC,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAgavE,CAAC;AAuBF,eAAe,yBAAyB,CAAC"}
|