@bahmni/widgets 0.0.1-dev.373 → 0.0.1-dev.374
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-BtWuk-E3.js → DocumentsTable-C_-YzxGb.js} +9 -9
- package/dist/{FormsTable-Cx_R0WIZ.js → FormsTable-_NogPmEX.js} +93 -81
- package/dist/{Observations-ls12HACQ.js → Observations-qZwvlxRo.js} +15 -15
- package/dist/forms/FormsTable.d.ts +1 -4
- package/dist/forms/FormsTable.d.ts.map +1 -1
- package/dist/{index-DQzzZ7W6.js → index-D9XqmG48.js} +131 -116
- package/dist/index.js +10 -10
- package/dist/observations/utils.d.ts +1 -1
- package/dist/observations/utils.d.ts.map +1 -1
- package/dist/observationsRenderer/ObservationsRenderer.d.ts +1 -0
- package/dist/observationsRenderer/ObservationsRenderer.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as T, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { u as W, a as X,
|
|
2
|
+
import { u as W, a as X, _ as J, P as Z, x, q as ee, F as te } from "./index-D9XqmG48.js";
|
|
3
3
|
import { useQuery as ne } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
|
|
5
5
|
import { useTranslation as ae } from "react-i18next";
|
|
@@ -45,7 +45,7 @@ const Te = [
|
|
|
45
45
|
L(!1), U(null), A(/* @__PURE__ */ new Set());
|
|
46
46
|
}, []), F = _((e) => {
|
|
47
47
|
A((t) => new Set(t).add(e));
|
|
48
|
-
}, []), { data: i, isLoading: q, isError: S, error:
|
|
48
|
+
}, []), { data: i, isLoading: q, isError: S, error: y } = ne({
|
|
49
49
|
queryKey: [
|
|
50
50
|
"documents",
|
|
51
51
|
E,
|
|
@@ -68,18 +68,18 @@ const Te = [
|
|
|
68
68
|
}, [E]), I(() => {
|
|
69
69
|
S && w({
|
|
70
70
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
71
|
-
message:
|
|
71
|
+
message: y?.message ?? "",
|
|
72
72
|
type: "error"
|
|
73
73
|
});
|
|
74
|
-
}, [S,
|
|
74
|
+
}, [S, y, w, o]), I(() => {
|
|
75
75
|
const e = new AbortController();
|
|
76
76
|
return (async () => {
|
|
77
77
|
if (!d || !s) return;
|
|
78
78
|
const a = /* @__PURE__ */ new Set(), g = B(s);
|
|
79
79
|
for (let m = 0; m < g.length; m++) {
|
|
80
|
-
const
|
|
80
|
+
const b = R(g[m].url);
|
|
81
81
|
try {
|
|
82
|
-
(await fetch(
|
|
82
|
+
(await fetch(b, {
|
|
83
83
|
method: "HEAD",
|
|
84
84
|
signal: e.signal
|
|
85
85
|
})).ok || a.add(m);
|
|
@@ -146,7 +146,7 @@ const Te = [
|
|
|
146
146
|
ariaLabel: o("DOCUMENTS_TABLE_HEADING"),
|
|
147
147
|
rows: j,
|
|
148
148
|
loading: q,
|
|
149
|
-
errorStateMessage: S ?
|
|
149
|
+
errorStateMessage: S ? y?.message : null,
|
|
150
150
|
sortable: G,
|
|
151
151
|
emptyStateMessage: o("DOCUMENTS_NO_RECORDS"),
|
|
152
152
|
renderCell: Q,
|
|
@@ -170,8 +170,8 @@ const Te = [
|
|
|
170
170
|
size: "lg",
|
|
171
171
|
testId: "document-view-modal",
|
|
172
172
|
children: /* @__PURE__ */ r("div", { className: c.documentViewerContainer, children: h.map((e, t) => {
|
|
173
|
-
const a = R(e.url), g = e.contentType?.toLowerCase().includes("pdf"), m = (e.contentType?.toLowerCase().includes("image") ?? !1) || _e.test(e.url ?? ""),
|
|
174
|
-
return a === "#" ||
|
|
173
|
+
const a = R(e.url), g = e.contentType?.toLowerCase().includes("pdf"), m = (e.contentType?.toLowerCase().includes("image") ?? !1) || _e.test(e.url ?? ""), b = P.has(t);
|
|
174
|
+
return a === "#" || b ? /* @__PURE__ */ T(
|
|
175
175
|
"div",
|
|
176
176
|
{
|
|
177
177
|
className: c.attachmentError,
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { u as be,
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as W, useMemo as d, useCallback as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const
|
|
7
|
-
formsTableBody:
|
|
8
|
-
modalHeading:
|
|
9
|
-
customAccordianItem:
|
|
10
|
-
},
|
|
11
|
-
episodeOfCareUuids:
|
|
1
|
+
import { jsx as i, jsxs as j, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
+
import { u as be, b as Oe, c as Ne, t as Ee, X as Te, W as Fe, J as Ie, C as ve, p as _e, e as Ae, d as Re, Y as z, x as De, i as G, $ as K, P as Me, q as Q, T as Ce, R as Le, F as Se, O as Be, f as Ue } from "./index-D9XqmG48.js";
|
|
3
|
+
import { useQueryClient as we, useQuery as E } from "@tanstack/react-query";
|
|
4
|
+
import { useState as W, useMemo as d, useCallback as c } from "react";
|
|
5
|
+
import { useTranslation as He } from "react-i18next";
|
|
6
|
+
const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", Pe = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
7
|
+
formsTableBody: ke,
|
|
8
|
+
modalHeading: qe,
|
|
9
|
+
customAccordianItem: Pe
|
|
10
|
+
}, Ve = "startConsultation", Ke = ({
|
|
11
|
+
episodeOfCareUuids: D,
|
|
12
12
|
encounterUuids: m,
|
|
13
13
|
config: Y,
|
|
14
14
|
disableActions: J = !1,
|
|
15
15
|
activeEncounterUuid: y = null
|
|
16
16
|
}) => {
|
|
17
|
-
const { t: n } =
|
|
17
|
+
const { t: n } = He(), u = be(), [g, M] = W(!1), [a, C] = W(null), {
|
|
18
18
|
numberOfVisits: X,
|
|
19
19
|
hideThumbnail: Z = !1,
|
|
20
|
-
forms:
|
|
21
|
-
} = Y ?? {}, ee =
|
|
22
|
-
|
|
23
|
-
), { userPrivileges: O } =
|
|
24
|
-
|
|
20
|
+
forms: b
|
|
21
|
+
} = Y ?? {}, ee = Oe(
|
|
22
|
+
Ue.EDIT_OBSERVATIONS
|
|
23
|
+
), { userPrivileges: O } = Ne(), F = ee && !J && !!y, L = Ee(
|
|
24
|
+
D,
|
|
25
25
|
m
|
|
26
|
-
), re =
|
|
26
|
+
), re = we(), {
|
|
27
27
|
data: S = [],
|
|
28
28
|
isLoading: B,
|
|
29
29
|
isError: U,
|
|
30
30
|
error: te,
|
|
31
31
|
refetch: oe
|
|
32
|
-
} =
|
|
33
|
-
queryKey: ["forms", u,
|
|
32
|
+
} = E({
|
|
33
|
+
queryKey: ["forms", u, D],
|
|
34
34
|
queryFn: () => Te(u, void 0, X),
|
|
35
35
|
enabled: !!u && !L
|
|
36
36
|
}), w = d(() => {
|
|
37
37
|
let e = S;
|
|
38
38
|
return m && m.length > 0 && (e = e.filter(
|
|
39
39
|
(r) => m.includes(r.encounterUuid)
|
|
40
|
-
)), Array.isArray(
|
|
41
|
-
(r) =>
|
|
40
|
+
)), Array.isArray(b) && b.length > 0 && (e = e.filter(
|
|
41
|
+
(r) => b.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
42
42
|
)), e;
|
|
43
|
-
}, [S, m,
|
|
43
|
+
}, [S, m, b]), { data: N = [] } = E({
|
|
44
44
|
queryKey: ["observationForms"],
|
|
45
|
-
queryFn: () =>
|
|
46
|
-
}), H =
|
|
45
|
+
queryFn: () => Fe()
|
|
46
|
+
}), H = c(
|
|
47
47
|
(e) => {
|
|
48
48
|
const r = N.find((t) => t.name === e);
|
|
49
49
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
@@ -54,42 +54,42 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
54
54
|
);
|
|
55
55
|
},
|
|
56
56
|
[N, O]
|
|
57
|
-
), f =
|
|
57
|
+
), f = c(
|
|
58
58
|
(e) => !y || e.encounterUuid !== y ? !1 : H(e.formName),
|
|
59
59
|
[y, H]
|
|
60
|
-
), k =
|
|
60
|
+
), k = c(
|
|
61
61
|
(e) => N.find((o) => o.name === e)?.uuid,
|
|
62
62
|
[N]
|
|
63
63
|
), I = d(() => {
|
|
64
64
|
if (a)
|
|
65
65
|
return k(a.formName);
|
|
66
66
|
}, [a, k]), {
|
|
67
|
-
data:
|
|
67
|
+
data: l,
|
|
68
68
|
isLoading: se,
|
|
69
69
|
isError: ae,
|
|
70
70
|
error: v
|
|
71
|
-
} =
|
|
71
|
+
} = E({
|
|
72
72
|
queryKey: ["formMetadata", I],
|
|
73
|
-
queryFn: () =>
|
|
74
|
-
enabled: !!I &&
|
|
73
|
+
queryFn: () => Ie(I),
|
|
74
|
+
enabled: !!I && g
|
|
75
75
|
}), {
|
|
76
76
|
data: _,
|
|
77
77
|
isLoading: ne,
|
|
78
78
|
isError: ie,
|
|
79
79
|
error: A
|
|
80
|
-
} =
|
|
80
|
+
} = E({
|
|
81
81
|
queryKey: ["formsEncounterFHIR", a?.encounterUuid],
|
|
82
|
-
queryFn: () =>
|
|
83
|
-
enabled: !!a?.encounterUuid &&
|
|
82
|
+
queryFn: () => ve(a.encounterUuid),
|
|
83
|
+
enabled: !!a?.encounterUuid && g
|
|
84
84
|
});
|
|
85
|
-
|
|
85
|
+
_e(
|
|
86
86
|
(e) => {
|
|
87
|
-
e.patientUUID === u &&
|
|
87
|
+
e.patientUUID === u && (oe(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
88
88
|
},
|
|
89
89
|
[u]
|
|
90
90
|
);
|
|
91
|
-
const de = d(() => !_?.entry || !a?.formName ? [] : _.entry.filter((r) => r.resource?.resourceType === "Observation").map((r) => r.resource).filter((r) =>
|
|
92
|
-
if (!
|
|
91
|
+
const de = d(() => !_?.entry || !a?.formName ? [] : _.entry.filter((r) => r.resource?.resourceType === "Observation").map((r) => r.resource).filter((r) => Ae(r) ? Re(r)?.toLowerCase() === a.formName.toLowerCase() : !0), [_, a?.formName]), le = d(() => {
|
|
92
|
+
if (!l?.schema) return;
|
|
93
93
|
const e = [], r = (o) => {
|
|
94
94
|
(o ?? []).forEach((t) => {
|
|
95
95
|
const s = t;
|
|
@@ -97,40 +97,51 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
97
97
|
});
|
|
98
98
|
};
|
|
99
99
|
return r(
|
|
100
|
-
|
|
100
|
+
l.schema.controls ?? []
|
|
101
101
|
), e.length > 0 ? e : void 0;
|
|
102
|
-
}, [
|
|
103
|
-
if (!
|
|
102
|
+
}, [l]), ce = d(() => {
|
|
103
|
+
if (!l?.schema) return;
|
|
104
104
|
const e = {}, r = (o, t) => {
|
|
105
105
|
for (const s of o)
|
|
106
106
|
if (s.type === "section") {
|
|
107
|
-
const
|
|
108
|
-
r(s.controls ?? [],
|
|
107
|
+
const h = s.label?.value ?? "Section";
|
|
108
|
+
r(s.controls ?? [], h);
|
|
109
109
|
} else
|
|
110
110
|
s.id != null && t && (e[String(s.id)] = t), s.controls && r(s.controls, t);
|
|
111
111
|
};
|
|
112
112
|
return r(
|
|
113
|
-
|
|
113
|
+
l.schema.controls ?? [],
|
|
114
114
|
null
|
|
115
115
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
116
|
-
}, [
|
|
116
|
+
}, [l]), me = d(() => {
|
|
117
|
+
if (!l?.schema) return;
|
|
118
|
+
const e = {}, r = (o) => {
|
|
119
|
+
(o ?? []).forEach((t) => {
|
|
120
|
+
const s = t;
|
|
121
|
+
s.concept?.uuid && s.concept?.datatype && (e[s.concept.uuid] = s.concept.datatype), s.controls && r(s.controls);
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
return r(
|
|
125
|
+
l.schema.controls ?? []
|
|
126
|
+
), Object.keys(e).length > 0 ? e : void 0;
|
|
127
|
+
}, [l]), ue = d(() => {
|
|
117
128
|
if (v)
|
|
118
|
-
return
|
|
129
|
+
return z(v).message;
|
|
119
130
|
if (A)
|
|
120
|
-
return
|
|
121
|
-
}, [v, A]),
|
|
131
|
+
return z(A).message;
|
|
132
|
+
}, [v, A]), p = d(
|
|
122
133
|
() => [
|
|
123
134
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
124
135
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
125
136
|
],
|
|
126
137
|
[n]
|
|
127
138
|
), q = d(
|
|
128
|
-
() => [...
|
|
129
|
-
[
|
|
130
|
-
),
|
|
131
|
-
(e) => F && e.some((o) => f(o)) ? q :
|
|
132
|
-
[F, f, q,
|
|
133
|
-
),
|
|
139
|
+
() => [...p, { key: "actions", header: n("ACTIONS") }],
|
|
140
|
+
[p, n]
|
|
141
|
+
), fe = c(
|
|
142
|
+
(e) => F && e.some((o) => f(o)) ? q : p,
|
|
143
|
+
[F, f, q, p]
|
|
144
|
+
), pe = p, he = d(
|
|
134
145
|
() => [
|
|
135
146
|
{ key: "recordedOn", sortable: !0 },
|
|
136
147
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -141,12 +152,12 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
141
152
|
(o, t) => {
|
|
142
153
|
const s = t.formName;
|
|
143
154
|
o[s] ??= [];
|
|
144
|
-
const
|
|
155
|
+
const h = t.providers.map((ye) => ye.providerName).filter(Boolean).join(", ");
|
|
145
156
|
return o[s].push({
|
|
146
157
|
id: t.encounterUuid,
|
|
147
158
|
formName: t.formName,
|
|
148
|
-
recordedOn:
|
|
149
|
-
recordedBy:
|
|
159
|
+
recordedOn: De(t.encounterDateTime, n, !0).formattedResult,
|
|
160
|
+
recordedBy: h ?? "--",
|
|
150
161
|
encounterDateTime: t.encounterDateTime,
|
|
151
162
|
encounterUuid: t.encounterUuid
|
|
152
163
|
}), o;
|
|
@@ -157,17 +168,17 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
157
168
|
([o, t]) => ({
|
|
158
169
|
formName: o,
|
|
159
170
|
records: t.sort(
|
|
160
|
-
(s,
|
|
171
|
+
(s, h) => h.encounterDateTime - s.encounterDateTime
|
|
161
172
|
)
|
|
162
173
|
})
|
|
163
174
|
).sort((o, t) => o.formName.localeCompare(t.formName));
|
|
164
|
-
}, [w, n]), V =
|
|
165
|
-
C(e),
|
|
166
|
-
}, []), x =
|
|
167
|
-
|
|
168
|
-
}, []), R =
|
|
175
|
+
}, [w, n]), V = c((e) => {
|
|
176
|
+
C(e), M(!0);
|
|
177
|
+
}, []), x = c(() => {
|
|
178
|
+
M(!1), C(null);
|
|
179
|
+
}, []), R = c((e) => {
|
|
169
180
|
globalThis.dispatchEvent(
|
|
170
|
-
new CustomEvent(
|
|
181
|
+
new CustomEvent(Ve, {
|
|
171
182
|
detail: {
|
|
172
183
|
editOnly: "observationForms",
|
|
173
184
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -177,7 +188,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
177
188
|
}
|
|
178
189
|
})
|
|
179
190
|
);
|
|
180
|
-
}, []), $ =
|
|
191
|
+
}, []), $ = c(
|
|
181
192
|
(e, r) => {
|
|
182
193
|
switch (r) {
|
|
183
194
|
case "recordedOn":
|
|
@@ -202,27 +213,27 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
202
213
|
},
|
|
203
214
|
[V, R, f, n]
|
|
204
215
|
);
|
|
205
|
-
return /* @__PURE__ */
|
|
216
|
+
return /* @__PURE__ */ j(ge, { children: [
|
|
206
217
|
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: B || U || P.length === 0 || L ? /* @__PURE__ */ i(
|
|
207
218
|
Q,
|
|
208
219
|
{
|
|
209
|
-
headers:
|
|
220
|
+
headers: pe,
|
|
210
221
|
ariaLabel: n("FORMS_HEADING"),
|
|
211
222
|
rows: [],
|
|
212
223
|
loading: B,
|
|
213
224
|
errorStateMessage: U ? te?.message : void 0,
|
|
214
225
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
215
226
|
renderCell: $,
|
|
216
|
-
className:
|
|
227
|
+
className: T.formsTableBody,
|
|
217
228
|
dataTestId: "forms-table"
|
|
218
229
|
}
|
|
219
|
-
) : /* @__PURE__ */ i(
|
|
220
|
-
const { formName: o, records: t } = e, s =
|
|
230
|
+
) : /* @__PURE__ */ i(Ce, { align: "start", children: P.map((e, r) => {
|
|
231
|
+
const { formName: o, records: t } = e, s = fe(t);
|
|
221
232
|
return /* @__PURE__ */ i(
|
|
222
|
-
|
|
233
|
+
Le,
|
|
223
234
|
{
|
|
224
235
|
title: o,
|
|
225
|
-
className:
|
|
236
|
+
className: T.customAccordianItem,
|
|
226
237
|
testId: `accordian-title-${o}`,
|
|
227
238
|
open: r === 0,
|
|
228
239
|
children: /* @__PURE__ */ i(
|
|
@@ -236,7 +247,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
236
247
|
sortable: he,
|
|
237
248
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
238
249
|
renderCell: $,
|
|
239
|
-
className:
|
|
250
|
+
className: T.formsTableBody,
|
|
240
251
|
dataTestId: `forms-table-${o}`
|
|
241
252
|
}
|
|
242
253
|
)
|
|
@@ -244,14 +255,14 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
244
255
|
o
|
|
245
256
|
);
|
|
246
257
|
}) }) }),
|
|
247
|
-
|
|
248
|
-
|
|
258
|
+
g && a && /* @__PURE__ */ i(
|
|
259
|
+
Se,
|
|
249
260
|
{
|
|
250
261
|
id: "modalIdForActionAreaLayout",
|
|
251
262
|
portalId: "main-display-area",
|
|
252
|
-
open:
|
|
263
|
+
open: g,
|
|
253
264
|
onRequestClose: x,
|
|
254
|
-
modalHeading: /* @__PURE__ */
|
|
265
|
+
modalHeading: /* @__PURE__ */ j("div", { className: T.modalHeading, children: [
|
|
255
266
|
/* @__PURE__ */ i("span", { children: a.formName }),
|
|
256
267
|
F && f(a) && /* @__PURE__ */ i(
|
|
257
268
|
G,
|
|
@@ -272,17 +283,18 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
272
283
|
size: "md",
|
|
273
284
|
testId: "form-details-modal",
|
|
274
285
|
children: /* @__PURE__ */ i(
|
|
275
|
-
|
|
286
|
+
Be,
|
|
276
287
|
{
|
|
277
288
|
observations: de,
|
|
278
289
|
isLoading: se || ne,
|
|
279
290
|
isError: ae || ie,
|
|
280
|
-
errorMessage:
|
|
291
|
+
errorMessage: ue,
|
|
281
292
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
282
293
|
testIdPrefix: a.formName,
|
|
283
294
|
hideThumbnail: Z,
|
|
284
295
|
controlOrder: le,
|
|
285
|
-
sectionMap: ce
|
|
296
|
+
sectionMap: ce,
|
|
297
|
+
conceptDatatypeMap: me
|
|
286
298
|
}
|
|
287
299
|
)
|
|
288
300
|
}
|
|
@@ -290,5 +302,5 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
290
302
|
] });
|
|
291
303
|
};
|
|
292
304
|
export {
|
|
293
|
-
|
|
305
|
+
Ke as default
|
|
294
306
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as d, jsxs as N } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { g as K, h as D, j as V, I as q, k as Q, l as k, r as G, n as H, u as P, a as j, w as z, m as J, p as W, o as Y, s as X, v as Z, y as x, q as ee } from "./index-D9XqmG48.js";
|
|
3
3
|
import { useQueries as te, useQuery as se } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as oe, useEffect as C, useMemo as g } from "react";
|
|
5
5
|
import { useTranslation as U } from "react-i18next";
|
|
6
6
|
const B = (t, i, c, l, u, r) => {
|
|
7
|
-
const s =
|
|
7
|
+
const s = V(t, i, u), o = s.value, a = q(o);
|
|
8
8
|
let n = o;
|
|
9
9
|
a === "Image" && (n = /* @__PURE__ */ d(
|
|
10
10
|
k,
|
|
@@ -24,7 +24,7 @@ const B = (t, i, c, l, u, r) => {
|
|
|
24
24
|
)), a === "PDF" && (n = /* @__PURE__ */ d(H, { id: `${o}-pdf`, src: o }));
|
|
25
25
|
const b = u("OBSERVATIONS_RECORDED_BY", {
|
|
26
26
|
provider: s.provider
|
|
27
|
-
}),
|
|
27
|
+
}), p = t.display, m = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y = l ? `${l}-${m}-${p}-${c}-${i}` : `${m}-${p}-${c}-${i}`;
|
|
28
28
|
return /* @__PURE__ */ d(
|
|
29
29
|
Q,
|
|
30
30
|
{
|
|
@@ -61,7 +61,7 @@ const B = (t, i, c, l, u, r) => {
|
|
|
61
61
|
hideThumbnail: c
|
|
62
62
|
}) => {
|
|
63
63
|
const { t: l } = U(), u = (r, s, o) => {
|
|
64
|
-
const a =
|
|
64
|
+
const a = K(r.encounterDetails, l);
|
|
65
65
|
return /* @__PURE__ */ N(
|
|
66
66
|
D,
|
|
67
67
|
{
|
|
@@ -133,20 +133,20 @@ const B = (t, i, c, l, u, r) => {
|
|
|
133
133
|
} else e.isError || r.current.delete(v);
|
|
134
134
|
});
|
|
135
135
|
}, [n, c]);
|
|
136
|
-
const b = g(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]),
|
|
137
|
-
data:
|
|
136
|
+
const b = g(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = g(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), f = g(() => c.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, c.length]), {
|
|
137
|
+
data: m,
|
|
138
138
|
isLoading: y,
|
|
139
139
|
isError: h,
|
|
140
140
|
refetch: T
|
|
141
141
|
} = se({
|
|
142
|
-
queryKey: le(s,
|
|
143
|
-
queryFn: () => J(s,
|
|
144
|
-
enabled: !!s &&
|
|
142
|
+
queryKey: le(s, p),
|
|
143
|
+
queryFn: () => J(s, p),
|
|
144
|
+
enabled: !!s && p.length > 0 && f
|
|
145
145
|
});
|
|
146
146
|
W(
|
|
147
147
|
(e) => {
|
|
148
148
|
e.patientUUID === s && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
149
|
-
(R) =>
|
|
149
|
+
(R) => p.includes(R)
|
|
150
150
|
) && T();
|
|
151
151
|
},
|
|
152
152
|
[s, T]
|
|
@@ -158,14 +158,14 @@ const B = (t, i, c, l, u, r) => {
|
|
|
158
158
|
});
|
|
159
159
|
}, [h]);
|
|
160
160
|
const I = g(() => {
|
|
161
|
-
if (!
|
|
162
|
-
const e = Y(
|
|
161
|
+
if (!m) return [];
|
|
162
|
+
const e = Y(m), v = X(e);
|
|
163
163
|
return Z(v);
|
|
164
|
-
}, [
|
|
164
|
+
}, [m]), A = [
|
|
165
165
|
{ key: "name", header: "name" },
|
|
166
166
|
{ key: "value", header: "value" },
|
|
167
167
|
{ key: "form", header: "form" }
|
|
168
|
-
], _ = y || !f, $ = h && f, F = (!
|
|
168
|
+
], _ = y || !f, $ = h && f, F = (!m || m.entry?.length === 0 || p.length === 0) && f, L = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = F ? a("NO_OBSERVATIONS_FOUND") : void 0, w = I.length > 0 && !_ && !$, O = i.titleTranslationKey, E = O ? a(O) : "";
|
|
169
169
|
return /* @__PURE__ */ N(
|
|
170
170
|
"div",
|
|
171
171
|
{
|
|
@@ -184,7 +184,7 @@ const B = (t, i, c, l, u, r) => {
|
|
|
184
184
|
children: /* @__PURE__ */ d("p", { children: E })
|
|
185
185
|
}
|
|
186
186
|
),
|
|
187
|
-
|
|
187
|
+
w ? /* @__PURE__ */ d(
|
|
188
188
|
ae,
|
|
189
189
|
{
|
|
190
190
|
groupedData: I,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { WidgetProps } from '../registry/model';
|
|
3
|
-
/**
|
|
4
|
-
* Component to display patient forms grouped by form name in accordion format
|
|
5
|
-
* Each accordion item contains a SortableDataTable with form records for that form type
|
|
6
|
-
*/
|
|
3
|
+
/** Displays patient forms grouped by form name in accordion format. */
|
|
7
4
|
declare const FormsTable: React.FC<WidgetProps>;
|
|
8
5
|
export default FormsTable;
|
|
9
6
|
//# sourceMappingURL=FormsTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormsTable.d.ts","sourceRoot":"","sources":["../../src/forms/FormsTable.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAehD
|
|
1
|
+
{"version":3,"file":"FormsTable.d.ts","sourceRoot":"","sources":["../../src/forms/FormsTable.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAehD,uEAAuE;AACvE,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA8drC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -99869,17 +99869,22 @@ const $Se = (t) => t ? t.extension?.find(
|
|
|
99869
99869
|
const r = e.split("/")[0].split("^").pop()?.replace(/\.\d+$/, "");
|
|
99870
99870
|
if (r)
|
|
99871
99871
|
return r;
|
|
99872
|
-
}, LYt = (t, e) => t?.date ? gt(t.date, e).formattedResult : e("DATE_ERROR_PARSE"), K6 = (t, e) => {
|
|
99872
|
+
}, LYt = (t, e) => t?.date ? gt(t.date, e).formattedResult : e("DATE_ERROR_PARSE"), K6 = (t, e, r) => {
|
|
99873
99873
|
if (t.observationValue?.value == null)
|
|
99874
99874
|
return "";
|
|
99875
|
-
const { value:
|
|
99876
|
-
if (
|
|
99877
|
-
|
|
99878
|
-
|
|
99879
|
-
|
|
99880
|
-
|
|
99881
|
-
|
|
99882
|
-
|
|
99875
|
+
const { value: n, unit: a, type: i } = t.observationValue;
|
|
99876
|
+
if (i === "dateTime") {
|
|
99877
|
+
const l = t.conceptId ? r?.[t.conceptId] : void 0, c = (u) => {
|
|
99878
|
+
const d = l != null ? l === "Datetime" : /T\d{2}:\d{2}:\d{2}/.test(u) && !/T00:00:00/.test(u);
|
|
99879
|
+
return gt(u, e, d).formattedResult;
|
|
99880
|
+
};
|
|
99881
|
+
return String(n).split(", ").map(c).join(", ");
|
|
99882
|
+
}
|
|
99883
|
+
if (i === "boolean") {
|
|
99884
|
+
const l = (c) => c === !0 || c === "true" ? e ? e("YES") : "Yes" : e ? e("NO") : "No";
|
|
99885
|
+
return typeof n == "boolean" ? l(n) : String(n).split(", ").map(l).join(", ");
|
|
99886
|
+
}
|
|
99887
|
+
return a ? `${n} ${a}` : String(n);
|
|
99883
99888
|
}, XZt = (t) => {
|
|
99884
99889
|
const e = t.display;
|
|
99885
99890
|
if (!t.observationValue)
|
|
@@ -100037,53 +100042,55 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100037
100042
|
depth: e = 0,
|
|
100038
100043
|
memberIndex: r = 0,
|
|
100039
100044
|
testIdPrefix: n = "",
|
|
100040
|
-
hideThumbnail: a = !1
|
|
100045
|
+
hideThumbnail: a = !1,
|
|
100046
|
+
conceptDatatypeMap: i
|
|
100041
100047
|
}) => {
|
|
100042
|
-
const { t:
|
|
100043
|
-
if (
|
|
100048
|
+
const { t: s } = dt(), l = t.members && t.members.length > 0, c = t.display, u = n ? `${n}-` : "";
|
|
100049
|
+
if (l)
|
|
100044
100050
|
return /* @__PURE__ */ _e(
|
|
100045
100051
|
"div",
|
|
100046
100052
|
{
|
|
100047
100053
|
className: Ut.nestedGroup,
|
|
100048
|
-
"data-testid": `${
|
|
100054
|
+
"data-testid": `${u}obs-nested-group-${c}-${r}`,
|
|
100049
100055
|
children: [
|
|
100050
100056
|
/* @__PURE__ */ L(
|
|
100051
100057
|
"div",
|
|
100052
100058
|
{
|
|
100053
100059
|
className: Ut.nestedGroupLabel,
|
|
100054
|
-
"data-testid": `${
|
|
100060
|
+
"data-testid": `${u}obs-nested-group-label-${c}-${r}`,
|
|
100055
100061
|
style: { paddingLeft: `${e * 16}px` },
|
|
100056
|
-
children:
|
|
100062
|
+
children: c
|
|
100057
100063
|
}
|
|
100058
100064
|
),
|
|
100059
100065
|
/* @__PURE__ */ L(
|
|
100060
100066
|
"div",
|
|
100061
100067
|
{
|
|
100062
100068
|
className: Ut.nestedGroupMembers,
|
|
100063
|
-
"data-testid": `${
|
|
100064
|
-
children: t.members?.map((
|
|
100069
|
+
"data-testid": `${u}obs-nested-group-members-${c}-${r}`,
|
|
100070
|
+
children: t.members?.map((H, E) => /* @__PURE__ */ L(
|
|
100065
100071
|
Y6,
|
|
100066
100072
|
{
|
|
100067
|
-
member:
|
|
100073
|
+
member: H,
|
|
100068
100074
|
depth: e + 1,
|
|
100069
|
-
memberIndex:
|
|
100075
|
+
memberIndex: E,
|
|
100070
100076
|
testIdPrefix: n,
|
|
100071
|
-
hideThumbnail: a
|
|
100077
|
+
hideThumbnail: a,
|
|
100078
|
+
conceptDatatypeMap: i
|
|
100072
100079
|
},
|
|
100073
|
-
|
|
100080
|
+
H.id
|
|
100074
100081
|
))
|
|
100075
100082
|
}
|
|
100076
100083
|
)
|
|
100077
100084
|
]
|
|
100078
100085
|
}
|
|
100079
100086
|
);
|
|
100080
|
-
const { rangeString:
|
|
100087
|
+
const { rangeString: d, isAbnormal: m } = RSe(t), w = K6(t, s, i), g = w ? G6(w, a) : null;
|
|
100081
100088
|
return /* @__PURE__ */ _e(p1, { children: [
|
|
100082
100089
|
/* @__PURE__ */ _e(
|
|
100083
100090
|
"div",
|
|
100084
100091
|
{
|
|
100085
100092
|
className: Ut.memberRow,
|
|
100086
|
-
"data-testid": `${
|
|
100093
|
+
"data-testid": `${u}obs-member-row-${c}-${r}`,
|
|
100087
100094
|
style: { paddingLeft: `${e * 16}px` },
|
|
100088
100095
|
children: [
|
|
100089
100096
|
/* @__PURE__ */ _e(
|
|
@@ -100091,12 +100098,12 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100091
100098
|
{
|
|
100092
100099
|
className: _t(
|
|
100093
100100
|
Ut.memberLabel,
|
|
100094
|
-
|
|
100101
|
+
m ? Ut.abnormalValue : ""
|
|
100095
100102
|
),
|
|
100096
|
-
"data-testid": `${
|
|
100103
|
+
"data-testid": `${u}obs-member-label-${c}-${r}`,
|
|
100097
100104
|
children: [
|
|
100098
|
-
/* @__PURE__ */ L("span", { children:
|
|
100099
|
-
|
|
100105
|
+
/* @__PURE__ */ L("span", { children: c }),
|
|
100106
|
+
d && /* @__PURE__ */ L("p", { className: Ut.rangeInfo, children: d })
|
|
100100
100107
|
]
|
|
100101
100108
|
}
|
|
100102
100109
|
),
|
|
@@ -100105,10 +100112,10 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100105
100112
|
{
|
|
100106
100113
|
className: _t(
|
|
100107
100114
|
Ut.memberValue,
|
|
100108
|
-
|
|
100115
|
+
m ? Ut.abnormalValue : ""
|
|
100109
100116
|
),
|
|
100110
|
-
"data-testid": `${
|
|
100111
|
-
children:
|
|
100117
|
+
"data-testid": `${u}obs-member-value-${c}-${r}`,
|
|
100118
|
+
children: g
|
|
100112
100119
|
}
|
|
100113
100120
|
)
|
|
100114
100121
|
]
|
|
@@ -100118,7 +100125,7 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100118
100125
|
"p",
|
|
100119
100126
|
{
|
|
100120
100127
|
className: Ut.commentSection,
|
|
100121
|
-
"data-testid": `${
|
|
100128
|
+
"data-testid": `${u}obs-member-comment-${c}-${r}`,
|
|
100122
100129
|
style: { paddingLeft: `${e * 16}px` },
|
|
100123
100130
|
children: [
|
|
100124
100131
|
t.comment,
|
|
@@ -100127,49 +100134,54 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100127
100134
|
}
|
|
100128
100135
|
)
|
|
100129
100136
|
] });
|
|
100130
|
-
}, EBt = (t, e, r, n = "", a = !1) => {
|
|
100131
|
-
const
|
|
100137
|
+
}, EBt = (t, e, r, n = "", a = !1, i) => {
|
|
100138
|
+
const s = t.members && t.members.length > 0, { rangeString: l, isAbnormal: c } = RSe(t), u = K6(
|
|
100139
|
+
t,
|
|
100140
|
+
r,
|
|
100141
|
+
i
|
|
100142
|
+
), d = u ? G6(u, a) : null, m = n ? `${n}-` : "";
|
|
100132
100143
|
return /* @__PURE__ */ _e(
|
|
100133
100144
|
"div",
|
|
100134
100145
|
{
|
|
100135
100146
|
className: Ut.observation,
|
|
100136
|
-
"data-testid": `${
|
|
100147
|
+
"data-testid": `${m}observation-item-${t.display}-${e}`,
|
|
100137
100148
|
children: [
|
|
100138
100149
|
/* @__PURE__ */ _e(
|
|
100139
100150
|
"div",
|
|
100140
100151
|
{
|
|
100141
|
-
className:
|
|
100142
|
-
"data-testid": `${
|
|
100152
|
+
className: s ? Ut.groupContainer : Ut.rowContainer,
|
|
100153
|
+
"data-testid": `${m}observation-container-${t.display}-${e}`,
|
|
100143
100154
|
children: [
|
|
100144
100155
|
/* @__PURE__ */ _e(
|
|
100145
100156
|
"div",
|
|
100146
100157
|
{
|
|
100147
100158
|
className: _t(
|
|
100148
|
-
|
|
100149
|
-
!
|
|
100159
|
+
s ? Ut.groupLabel : Ut.rowLabel,
|
|
100160
|
+
!s && c ? Ut.abnormalValue : ""
|
|
100150
100161
|
),
|
|
100151
|
-
"data-testid": `${
|
|
100162
|
+
"data-testid": `${m}observation-label-${t.display}-${e}`,
|
|
100152
100163
|
children: [
|
|
100153
100164
|
/* @__PURE__ */ L("span", { children: t.display }),
|
|
100154
|
-
!
|
|
100165
|
+
!s && l && /* @__PURE__ */ L("p", { className: Ut.rangeInfo, children: l })
|
|
100155
100166
|
]
|
|
100156
100167
|
}
|
|
100157
100168
|
),
|
|
100158
|
-
|
|
100169
|
+
s ? /* @__PURE__ */ L(
|
|
100159
100170
|
"div",
|
|
100160
100171
|
{
|
|
100161
100172
|
className: Ut.groupMembers,
|
|
100162
|
-
"data-testid": `${
|
|
100163
|
-
children: t.members?.map((
|
|
100173
|
+
"data-testid": `${m}observation-group-members-${t.display}-${e}`,
|
|
100174
|
+
children: t.members?.map((w, g) => /* @__PURE__ */ L(
|
|
100164
100175
|
Y6,
|
|
100165
100176
|
{
|
|
100166
|
-
member:
|
|
100177
|
+
member: w,
|
|
100167
100178
|
depth: 0,
|
|
100168
|
-
memberIndex:
|
|
100179
|
+
memberIndex: g,
|
|
100169
100180
|
testIdPrefix: n,
|
|
100170
|
-
hideThumbnail: a
|
|
100181
|
+
hideThumbnail: a,
|
|
100182
|
+
conceptDatatypeMap: i
|
|
100171
100183
|
},
|
|
100172
|
-
|
|
100184
|
+
w.id
|
|
100173
100185
|
))
|
|
100174
100186
|
}
|
|
100175
100187
|
) : /* @__PURE__ */ L(
|
|
@@ -100177,10 +100189,10 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100177
100189
|
{
|
|
100178
100190
|
className: _t(
|
|
100179
100191
|
Ut.rowValue,
|
|
100180
|
-
|
|
100192
|
+
c ? Ut.abnormalValue : ""
|
|
100181
100193
|
),
|
|
100182
|
-
"data-testid": `${
|
|
100183
|
-
children:
|
|
100194
|
+
"data-testid": `${m}observation-value-${t.display}-${e}`,
|
|
100195
|
+
children: d
|
|
100184
100196
|
}
|
|
100185
100197
|
)
|
|
100186
100198
|
]
|
|
@@ -100190,7 +100202,7 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100190
100202
|
"p",
|
|
100191
100203
|
{
|
|
100192
100204
|
className: Ut.commentSection,
|
|
100193
|
-
"data-testid": `${
|
|
100205
|
+
"data-testid": `${m}observation-comment-${t.display}-${e}`,
|
|
100194
100206
|
children: [
|
|
100195
100207
|
t.comment,
|
|
100196
100208
|
t.encounter?.provider && ` - by ${t.encounter.provider}`
|
|
@@ -100211,13 +100223,14 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100211
100223
|
testIdPrefix: s = "",
|
|
100212
100224
|
hideThumbnail: l = !1,
|
|
100213
100225
|
controlOrder: c,
|
|
100214
|
-
sectionMap: u
|
|
100226
|
+
sectionMap: u,
|
|
100227
|
+
conceptDatatypeMap: d
|
|
100215
100228
|
}) => {
|
|
100216
|
-
const { t:
|
|
100229
|
+
const { t: m } = dt(), w = ke(() => {
|
|
100217
100230
|
if (t.length === 0) return [];
|
|
100218
|
-
const
|
|
100219
|
-
return SSe(
|
|
100220
|
-
}, [t, c]),
|
|
100231
|
+
const v = JZt(t), y = c && c.length > 0 ? YZt(v, c) : DSe(v);
|
|
100232
|
+
return SSe(y);
|
|
100233
|
+
}, [t, c]), g = [
|
|
100221
100234
|
{ key: "label", header: "label" },
|
|
100222
100235
|
{ key: "value", header: "value" }
|
|
100223
100236
|
];
|
|
@@ -100225,7 +100238,7 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100225
100238
|
return /* @__PURE__ */ L(
|
|
100226
100239
|
W1,
|
|
100227
100240
|
{
|
|
100228
|
-
headers:
|
|
100241
|
+
headers: g,
|
|
100229
100242
|
rows: [],
|
|
100230
100243
|
loading: !0,
|
|
100231
100244
|
ariaLabel: "Loading observations",
|
|
@@ -100237,68 +100250,70 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100237
100250
|
return /* @__PURE__ */ L(
|
|
100238
100251
|
W1,
|
|
100239
100252
|
{
|
|
100240
|
-
headers:
|
|
100253
|
+
headers: g,
|
|
100241
100254
|
rows: [],
|
|
100242
|
-
errorStateMessage: n ??
|
|
100255
|
+
errorStateMessage: n ?? m("ERROR_LOADING_OBSERVATIONS"),
|
|
100243
100256
|
ariaLabel: "Observations error",
|
|
100244
100257
|
className: _t(Ut.fullWidth, i)
|
|
100245
100258
|
}
|
|
100246
100259
|
);
|
|
100247
|
-
if (
|
|
100260
|
+
if (w.length === 0)
|
|
100248
100261
|
return /* @__PURE__ */ L(
|
|
100249
100262
|
W1,
|
|
100250
100263
|
{
|
|
100251
|
-
headers:
|
|
100264
|
+
headers: g,
|
|
100252
100265
|
rows: [],
|
|
100253
|
-
emptyStateMessage: a ??
|
|
100266
|
+
emptyStateMessage: a ?? m("NO_OBSERVATIONS_AVAILABLE"),
|
|
100254
100267
|
ariaLabel: "No observations",
|
|
100255
100268
|
className: _t(Ut.fullWidth, i)
|
|
100256
100269
|
}
|
|
100257
100270
|
);
|
|
100258
|
-
const
|
|
100259
|
-
let
|
|
100260
|
-
|
|
100261
|
-
const
|
|
100262
|
-
|
|
100271
|
+
const H = [];
|
|
100272
|
+
let E = null;
|
|
100273
|
+
w.forEach((v, y) => {
|
|
100274
|
+
const x = v.sortId?.split("-")[0] ?? "", V = u?.[x] ?? null;
|
|
100275
|
+
V ? (E?.name !== V && (E = {
|
|
100263
100276
|
kind: "section",
|
|
100264
|
-
name:
|
|
100277
|
+
name: V,
|
|
100265
100278
|
members: []
|
|
100266
|
-
},
|
|
100279
|
+
}, H.push(E)), E.members.push({ obs: v, index: y })) : (E = null, H.push({ kind: "obs", obs: v, index: y }));
|
|
100267
100280
|
});
|
|
100268
|
-
const
|
|
100269
|
-
|
|
100270
|
-
|
|
100271
|
-
|
|
100281
|
+
const M = s ? `${s}-` : "", b = H.map((v) => v.kind === "obs" ? EBt(
|
|
100282
|
+
v.obs,
|
|
100283
|
+
v.index,
|
|
100284
|
+
m,
|
|
100272
100285
|
s,
|
|
100273
|
-
l
|
|
100286
|
+
l,
|
|
100287
|
+
d
|
|
100274
100288
|
) : /* @__PURE__ */ L(
|
|
100275
100289
|
"div",
|
|
100276
100290
|
{
|
|
100277
100291
|
className: Ut.observation,
|
|
100278
|
-
"data-testid": `${
|
|
100292
|
+
"data-testid": `${M}section-${v.name}`,
|
|
100279
100293
|
children: /* @__PURE__ */ _e("div", { className: Ut.groupContainer, children: [
|
|
100280
100294
|
/* @__PURE__ */ L(
|
|
100281
100295
|
"div",
|
|
100282
100296
|
{
|
|
100283
100297
|
className: Ut.groupLabel,
|
|
100284
|
-
"data-testid": `${
|
|
100285
|
-
children:
|
|
100298
|
+
"data-testid": `${M}section-label-${v.name}`,
|
|
100299
|
+
children: v.name
|
|
100286
100300
|
}
|
|
100287
100301
|
),
|
|
100288
|
-
/* @__PURE__ */ L("div", { className: Ut.groupMembers, children:
|
|
100302
|
+
/* @__PURE__ */ L("div", { className: Ut.groupMembers, children: v.members.map(({ obs: y, index: x }) => /* @__PURE__ */ L(
|
|
100289
100303
|
Y6,
|
|
100290
100304
|
{
|
|
100291
|
-
member:
|
|
100305
|
+
member: y,
|
|
100292
100306
|
depth: 0,
|
|
100293
|
-
memberIndex:
|
|
100307
|
+
memberIndex: x,
|
|
100294
100308
|
testIdPrefix: s,
|
|
100295
|
-
hideThumbnail: l
|
|
100309
|
+
hideThumbnail: l,
|
|
100310
|
+
conceptDatatypeMap: d
|
|
100296
100311
|
},
|
|
100297
|
-
|
|
100312
|
+
y.id
|
|
100298
100313
|
)) })
|
|
100299
100314
|
] })
|
|
100300
100315
|
},
|
|
100301
|
-
`section-${
|
|
100316
|
+
`section-${v.name}`
|
|
100302
100317
|
));
|
|
100303
100318
|
return /* @__PURE__ */ L(
|
|
100304
100319
|
"div",
|
|
@@ -100307,7 +100322,7 @@ const eBt = "ObservationsRenderer-module_resultsContainer__xvAwi", tBt = "Observ
|
|
|
100307
100322
|
"data-testid": "observations-renderer-test-id",
|
|
100308
100323
|
"aria-label": "observations-renderer-aria-label",
|
|
100309
100324
|
className: _t(Ut.resultsContainer, i),
|
|
100310
|
-
children:
|
|
100325
|
+
children: b
|
|
100311
100326
|
}
|
|
100312
100327
|
);
|
|
100313
100328
|
}, kSe = ({ reportId: t }) => {
|
|
@@ -111110,7 +111125,7 @@ const RGt = [
|
|
|
111110
111125
|
},
|
|
111111
111126
|
{
|
|
111112
111127
|
type: "patientDocuments",
|
|
111113
|
-
component: lr(() => import("./DocumentsTable-
|
|
111128
|
+
component: lr(() => import("./DocumentsTable-C_-YzxGb.js"))
|
|
111114
111129
|
},
|
|
111115
111130
|
{
|
|
111116
111131
|
type: "flowSheet",
|
|
@@ -111118,7 +111133,7 @@ const RGt = [
|
|
|
111118
111133
|
},
|
|
111119
111134
|
{
|
|
111120
111135
|
type: "forms",
|
|
111121
|
-
component: lr(() => import("./FormsTable-
|
|
111136
|
+
component: lr(() => import("./FormsTable-_NogPmEX.js"))
|
|
111122
111137
|
},
|
|
111123
111138
|
{
|
|
111124
111139
|
type: "labOrders",
|
|
@@ -111126,7 +111141,7 @@ const RGt = [
|
|
|
111126
111141
|
},
|
|
111127
111142
|
{
|
|
111128
111143
|
type: "observations",
|
|
111129
|
-
component: lr(() => import("./Observations-
|
|
111144
|
+
component: lr(() => import("./Observations-qZwvlxRo.js"))
|
|
111130
111145
|
},
|
|
111131
111146
|
{
|
|
111132
111147
|
type: "ordersControl",
|
|
@@ -111424,29 +111439,29 @@ export {
|
|
|
111424
111439
|
KSt as B,
|
|
111425
111440
|
rbt as C,
|
|
111426
111441
|
_Yt as D,
|
|
111427
|
-
|
|
111442
|
+
TYt as E,
|
|
111428
111443
|
pr as F,
|
|
111429
|
-
|
|
111430
|
-
|
|
111444
|
+
b$t as G,
|
|
111445
|
+
J$t as H,
|
|
111431
111446
|
Ehe as I,
|
|
111432
111447
|
bYt as J,
|
|
111433
|
-
|
|
111434
|
-
|
|
111435
|
-
|
|
111436
|
-
|
|
111448
|
+
CIt as K,
|
|
111449
|
+
SIt as L,
|
|
111450
|
+
IZt as M,
|
|
111451
|
+
qBt as N,
|
|
111437
111452
|
J6 as O,
|
|
111438
111453
|
g0 as P,
|
|
111439
|
-
|
|
111454
|
+
kSe as Q,
|
|
111440
111455
|
ko as R,
|
|
111441
|
-
|
|
111456
|
+
xPt as S,
|
|
111442
111457
|
Io as T,
|
|
111443
|
-
|
|
111444
|
-
|
|
111458
|
+
gFt as U,
|
|
111459
|
+
TFt as V,
|
|
111445
111460
|
fbt as W,
|
|
111446
111461
|
xYt as X,
|
|
111447
111462
|
sr as Y,
|
|
111448
|
-
|
|
111449
|
-
|
|
111463
|
+
mjt as Z,
|
|
111464
|
+
AYt as _,
|
|
111450
111465
|
G1 as a,
|
|
111451
111466
|
qSe as a0,
|
|
111452
111467
|
Mjt as a1,
|
|
@@ -111483,28 +111498,28 @@ export {
|
|
|
111483
111498
|
FGt as aw,
|
|
111484
111499
|
XYt as ax,
|
|
111485
111500
|
QYt as ay,
|
|
111486
|
-
|
|
111487
|
-
|
|
111488
|
-
|
|
111501
|
+
M3 as b,
|
|
111502
|
+
Qn as c,
|
|
111503
|
+
OYt as d,
|
|
111489
111504
|
$Se as e,
|
|
111490
|
-
|
|
111491
|
-
|
|
111492
|
-
|
|
111505
|
+
PYt as f,
|
|
111506
|
+
LYt as g,
|
|
111507
|
+
nYt as h,
|
|
111493
111508
|
x2 as i,
|
|
111494
|
-
|
|
111495
|
-
|
|
111496
|
-
|
|
111497
|
-
|
|
111498
|
-
|
|
111499
|
-
|
|
111500
|
-
|
|
111509
|
+
RYt as j,
|
|
111510
|
+
B9t as k,
|
|
111511
|
+
dRe as l,
|
|
111512
|
+
MYt as m,
|
|
111513
|
+
hRe as n,
|
|
111514
|
+
DYt as o,
|
|
111515
|
+
mn as p,
|
|
111501
111516
|
W1 as q,
|
|
111502
111517
|
pRe as r,
|
|
111503
|
-
|
|
111518
|
+
SYt as s,
|
|
111504
111519
|
fi as t,
|
|
111505
111520
|
gr as u,
|
|
111506
|
-
|
|
111507
|
-
|
|
111521
|
+
$Yt as v,
|
|
111522
|
+
HYt as w,
|
|
111508
111523
|
gt as x,
|
|
111509
111524
|
ii as y,
|
|
111510
111525
|
xwt as z
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ae as o, ac as r,
|
|
1
|
+
import { ae as o, ac as r, G as n, ab as g, H as c, f as l, a4 as d, ak as P, K as m, z as v, L as u, D as T, A, aa as b, Z as C, a2 as p, S, av as f, ax as I, ay as W, M as D, a6 as L, a7 as R, O as U, E as h, a1 as y, a3 as N, Q as E, N as x, U as G, a0 as O, at as H, as as _, a9 as V, V as k, aj as M, ag as q, af as w, d as z, aq as B, ap as F, ai as j, am as K, an as Q, ao as Z, ah as J, al as X, B as Y, ar as $, ad as aa, a5 as ea, a8 as sa, b as ta, aw as ia, a as oa, u as ra, au as na, c as ga } from "./index-D9XqmG48.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "@tanstack/react-query";
|
|
@@ -16,13 +16,13 @@ export {
|
|
|
16
16
|
u as DiagnosesTable,
|
|
17
17
|
T as DocumentPrintButton,
|
|
18
18
|
A as DocumentUpload,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
b as GET_PATIENT_PHOTO_PRIVILEGE,
|
|
20
|
+
C as GenericServiceRequestTable,
|
|
21
21
|
p as ImmunizationHistory,
|
|
22
22
|
S as LabInvestigation,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
f as LocationContext,
|
|
24
|
+
I as LocationProvider,
|
|
25
|
+
W as LocationSelector,
|
|
26
26
|
D as MedicationsTable,
|
|
27
27
|
L as NotificationProvider,
|
|
28
28
|
R as NotificationServiceComponent,
|
|
@@ -30,12 +30,12 @@ export {
|
|
|
30
30
|
h as PatientDetails,
|
|
31
31
|
y as PatientProgramsTable,
|
|
32
32
|
N as ProgramDetails,
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
E as RadiologyInvestigationReport,
|
|
34
|
+
x as RadiologyInvestigationTable,
|
|
35
35
|
G as SearchPatient,
|
|
36
36
|
O as TaskList,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
H as UserActionProvider,
|
|
38
|
+
_ as UserGlobalAction,
|
|
39
39
|
V as UserPrivilegeProvider,
|
|
40
40
|
k as VitalFlowSheet,
|
|
41
41
|
M as clearSearchWidgetRegistry,
|
|
@@ -3,7 +3,7 @@ import { EncounterDetails, ExtractedObservation, ExtractedObservationsResult, Ob
|
|
|
3
3
|
export declare const extractFormFieldPath: (observation: Observation | undefined) => string | undefined;
|
|
4
4
|
export declare const extractFormName: (observation: Observation | undefined) => string | undefined;
|
|
5
5
|
export declare const formatEncounterTitle: (encounterDetails: EncounterDetails | undefined, t: (key: string) => string) => string;
|
|
6
|
-
export declare const formatObservationValue: (observation: ExtractedObservation, t?: (key: string) => string) => string;
|
|
6
|
+
export declare const formatObservationValue: (observation: ExtractedObservation, t?: (key: string) => string, conceptDatatypeMap?: Record<string, string>) => string;
|
|
7
7
|
export declare const transformObservationToRowCell: (observation: ExtractedObservation, index: number, t?: (key: string) => string) => {
|
|
8
8
|
index: number;
|
|
9
9
|
header: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/observations/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzD,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,oBAAoB,GAC/B,aAAa,WAAW,GAAG,SAAS,KACnC,MAAM,GAAG,SAQX,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,aAAa,WAAW,GAAG,SAAS,KACnC,MAAM,GAAG,SAYX,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,kBAAkB,gBAAgB,GAAG,SAAS,EAC9C,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACzB,MAMF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,aAAa,oBAAoB,EACjC,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/observations/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzD,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,oBAAoB,GAC/B,aAAa,WAAW,GAAG,SAAS,KACnC,MAAM,GAAG,SAQX,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,aAAa,WAAW,GAAG,SAAS,KACnC,MAAM,GAAG,SAYX,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,kBAAkB,gBAAgB,GAAG,SAAS,EAC9C,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACzB,MAMF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,aAAa,oBAAoB,EACjC,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAC3B,qBAAqB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC1C,MAsCF,CAAC;AAoDF,eAAO,MAAM,6BAA6B,GACxC,aAAa,oBAAoB,EACjC,OAAO,MAAM,EACb,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM;;;;;CAQ5B,CAAC;AAsDF,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,GACtC,2BAA2B,CAuC7B;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,2BAA2B,GAClC,uBAAuB,EAAE,CA8C3B;AAED,wBAAgB,+BAA+B,CAC7C,YAAY,EAAE,uBAAuB,EAAE,GACtC,uBAAuB,EAAE,CAW3B"}
|
|
@@ -11,6 +11,7 @@ export interface ObservationsRendererProps {
|
|
|
11
11
|
hideThumbnail?: boolean;
|
|
12
12
|
controlOrder?: string[];
|
|
13
13
|
sectionMap?: Record<string, string>;
|
|
14
|
+
conceptDatatypeMap?: Record<string, string>;
|
|
14
15
|
}
|
|
15
16
|
export declare const ObservationsRenderer: React.FC<ObservationsRendererProps>;
|
|
16
17
|
export default ObservationsRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservationsRenderer.d.ts","sourceRoot":"","sources":["../../src/observationsRenderer/ObservationsRenderer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAYvC,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"ObservationsRenderer.d.ts","sourceRoot":"","sources":["../../src/observationsRenderer/ObservationsRenderer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAYvC,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAsPD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA6JpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|