@bahmni/widgets 0.0.1-dev.472 → 0.0.1-dev.476
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-DozLTWft.js → DocumentsTable-DpJOcXIi.js} +11 -11
- package/dist/{FormsTable-BLgMgigo.js → FormsTable-E1ZjD1EK.js} +62 -62
- package/dist/{Observations-BXBr-YR8.js → Observations-DX85kTDI.js} +36 -36
- package/dist/commandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/commandPalette/PatientCommandItem.d.ts.map +1 -1
- package/dist/{index-DawlQMVt.js → index-BvBWYChS.js} +1 -1
- package/dist/{index-BsguGr5X.js → index-Dbjt5_ga.js} +12608 -12623
- package/dist/index.css +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as h, Fragment as pe } from "react/jsx-runtime";
|
|
2
|
-
import { u as _e, a as Ae, b as ge,
|
|
2
|
+
import { u as _e, a as Ae, b as ge, i as Ee, y as fe, c as Ce, d as Ie, e as S, p as De, f as Ne, m as Le, g as be, S as ye, h as Q, j as Se, w as ve, A as Oe, F as we, k as Me, l as J, B as ee } from "./index-Dbjt5_ga.js";
|
|
3
3
|
import { useQuery as Ue } from "@tanstack/react-query";
|
|
4
4
|
import { useState as T, useRef as Re, useEffect as _, useMemo as A, useCallback as p } from "react";
|
|
5
5
|
import { useTranslation as ke } from "react-i18next";
|
|
@@ -100,7 +100,7 @@ const Be = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
100
100
|
if (!m || !r) return;
|
|
101
101
|
const n = /* @__PURE__ */ new Set(), i = x(r);
|
|
102
102
|
for (let c = 0; c < i.length; c++) {
|
|
103
|
-
const f =
|
|
103
|
+
const f = S(i[c].url);
|
|
104
104
|
try {
|
|
105
105
|
(await fetch(f, {
|
|
106
106
|
method: "HEAD",
|
|
@@ -138,20 +138,20 @@ const Be = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
138
138
|
t !== I ? (oe(t), U(1), R(void 0)) : U(e);
|
|
139
139
|
},
|
|
140
140
|
[I]
|
|
141
|
-
),
|
|
141
|
+
), y = A(
|
|
142
142
|
() => l?.fields ?? tt,
|
|
143
143
|
[l?.fields]
|
|
144
|
-
), ie = A(() => [...D?.documents ?? []].sort((t, n) => !t.uploadedOn && !n.uploadedOn ? 0 : t.uploadedOn ? n.uploadedOn ? new Date(n.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [D]), me = A(() => Ie(
|
|
145
|
-
() =>
|
|
144
|
+
), ie = A(() => [...D?.documents ?? []].sort((t, n) => !t.uploadedOn && !n.uploadedOn ? 0 : t.uploadedOn ? n.uploadedOn ? new Date(n.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [D]), me = A(() => Ie(y, o), [y, o]), ue = A(
|
|
145
|
+
() => y.map((e) => ({
|
|
146
146
|
key: e,
|
|
147
147
|
sortable: e !== "attachments"
|
|
148
148
|
})),
|
|
149
|
-
[
|
|
149
|
+
[y]
|
|
150
150
|
), d = A(
|
|
151
151
|
() => r ? x(r) : [],
|
|
152
152
|
[r]
|
|
153
153
|
), j = d.every(
|
|
154
|
-
(e, t) => L.has(t) || N.has(t) ||
|
|
154
|
+
(e, t) => L.has(t) || N.has(t) || S(e.url) === "#"
|
|
155
155
|
);
|
|
156
156
|
_(() => {
|
|
157
157
|
if (!m || d.length === 0) return;
|
|
@@ -186,7 +186,7 @@ const Be = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
186
186
|
[r, b, o]
|
|
187
187
|
), Y = A(
|
|
188
188
|
() => d.filter(
|
|
189
|
-
(e, t) =>
|
|
189
|
+
(e, t) => S(e.url) !== "#" && !N.has(t)
|
|
190
190
|
),
|
|
191
191
|
[d, N]
|
|
192
192
|
), he = p(
|
|
@@ -232,7 +232,7 @@ const Be = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
232
232
|
[V, o]
|
|
233
233
|
);
|
|
234
234
|
return /* @__PURE__ */ h(pe, { children: [
|
|
235
|
-
ne && /* @__PURE__ */ h(
|
|
235
|
+
ne && /* @__PURE__ */ h(ye, { className: s.header, testId: "documents-header", children: [
|
|
236
236
|
/* @__PURE__ */ a("p", { children: o("DOCUMENTS_TABLE_HEADING") }),
|
|
237
237
|
/* @__PURE__ */ a(
|
|
238
238
|
Q,
|
|
@@ -243,7 +243,7 @@ const Be = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
243
243
|
label: o(E.label),
|
|
244
244
|
testId: "documents-add-button",
|
|
245
245
|
onClick: ce,
|
|
246
|
-
children: /* @__PURE__ */ a(
|
|
246
|
+
children: /* @__PURE__ */ a(Se, { id: "documents-add-icon", name: "fa-plus", size: ve.LG })
|
|
247
247
|
}
|
|
248
248
|
)
|
|
249
249
|
] }),
|
|
@@ -292,7 +292,7 @@ const Be = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
292
292
|
}
|
|
293
293
|
),
|
|
294
294
|
d.map((e, t) => {
|
|
295
|
-
const n =
|
|
295
|
+
const n = S(e.url), i = e.contentType?.toLowerCase().includes("pdf"), c = (e.contentType?.toLowerCase().includes("image") ?? !1) || nt.test(e.url ?? ""), f = N.has(t);
|
|
296
296
|
return n === "#" || f ? /* @__PURE__ */ h(
|
|
297
297
|
"div",
|
|
298
298
|
{
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { jsx as n, jsxs as P, Fragment as ie } from "react/jsx-runtime";
|
|
2
|
-
import { u as de, b as le, n as me, q as ce,
|
|
2
|
+
import { u as de, b as le, n as me, q as ce, o as ue, r as fe, _ as ye, c as be, s as he, t as pe, W as ge, m as Ne, i as Oe, h as x, G as V, f as Fe, A as G, v as Ie, x as Te, F as Ae, O as Ee, C as ve } from "./index-Dbjt5_ga.js";
|
|
3
3
|
import { useQueryClient as Re, useQuery as A } from "@tanstack/react-query";
|
|
4
4
|
import { useState as $, useMemo as i, useCallback as d } from "react";
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const
|
|
7
|
-
formsTableBody:
|
|
8
|
-
modalHeading:
|
|
9
|
-
customAccordianItem:
|
|
5
|
+
import { useTranslation as _e } from "react-i18next";
|
|
6
|
+
const De = "FormsTable-module_formsTableBody__SvGha", Be = "FormsTable-module_modalHeading__wnTmA", Le = "FormsTable-module_customAccordianItem__isszs", p = {
|
|
7
|
+
formsTableBody: De,
|
|
8
|
+
modalHeading: Be,
|
|
9
|
+
customAccordianItem: Le
|
|
10
10
|
}, ke = ({
|
|
11
11
|
episodeOfCareUuids: E,
|
|
12
12
|
encounterUuids: m,
|
|
13
13
|
config: j,
|
|
14
|
-
disableActions:
|
|
14
|
+
disableActions: z = !1,
|
|
15
15
|
activeEncounterUuid: y = null
|
|
16
16
|
}) => {
|
|
17
|
-
const { t:
|
|
18
|
-
numberOfVisits:
|
|
19
|
-
hideThumbnail:
|
|
20
|
-
forms:
|
|
17
|
+
const { t: o } = _e(), c = de(), [g, v] = $(!1), [a, R] = $(null), {
|
|
18
|
+
numberOfVisits: K,
|
|
19
|
+
hideThumbnail: Q = !1,
|
|
20
|
+
forms: b
|
|
21
21
|
} = j ?? {}, W = le(
|
|
22
22
|
ve.EDIT_OBSERVATIONS
|
|
23
|
-
), { userPrivileges:
|
|
23
|
+
), { userPrivileges: h } = me(), N = W && !z && !!y, _ = ce(
|
|
24
24
|
E,
|
|
25
25
|
m
|
|
26
26
|
), Y = Re(), {
|
|
27
|
-
data:
|
|
28
|
-
isLoading:
|
|
29
|
-
isError:
|
|
27
|
+
data: D = [],
|
|
28
|
+
isLoading: B,
|
|
29
|
+
isError: L,
|
|
30
30
|
error: J,
|
|
31
31
|
refetch: X
|
|
32
32
|
} = A({
|
|
33
33
|
queryKey: ["forms", c, E],
|
|
34
|
-
queryFn: () => ue(c, void 0,
|
|
35
|
-
enabled: !!c && !
|
|
34
|
+
queryFn: () => ue(c, void 0, K),
|
|
35
|
+
enabled: !!c && !_
|
|
36
36
|
}), C = i(() => {
|
|
37
|
-
let e =
|
|
37
|
+
let e = D;
|
|
38
38
|
return m && m.length > 0 && (e = e.filter(
|
|
39
39
|
(t) => m.includes(t.encounterUuid)
|
|
40
|
-
)), Array.isArray(
|
|
41
|
-
(t) =>
|
|
40
|
+
)), Array.isArray(b) && b.length > 0 && (e = e.filter(
|
|
41
|
+
(t) => b.some((s) => s.toLowerCase() === t.formName.toLowerCase())
|
|
42
42
|
)), e;
|
|
43
|
-
}, [
|
|
43
|
+
}, [D, m, b]), { data: M = [] } = A({
|
|
44
44
|
queryKey: ["observationForms"],
|
|
45
45
|
queryFn: () => fe()
|
|
46
46
|
}), S = d(
|
|
@@ -49,13 +49,13 @@ const _e = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
49
49
|
(r) => r.name.toLowerCase() === e.toLowerCase()
|
|
50
50
|
);
|
|
51
51
|
if (!t?.privileges || t.privileges.length === 0) return !0;
|
|
52
|
-
if (!
|
|
53
|
-
const
|
|
52
|
+
if (!h || h.length === 0) return !1;
|
|
53
|
+
const s = new Set(h.map((r) => r.name));
|
|
54
54
|
return t.privileges.some(
|
|
55
|
-
(r) =>
|
|
55
|
+
(r) => s.has(r.privilegeName) && r.editable
|
|
56
56
|
);
|
|
57
57
|
},
|
|
58
|
-
[M,
|
|
58
|
+
[M, h]
|
|
59
59
|
), u = d(
|
|
60
60
|
(e) => !y || e.encounterUuid !== y ? !1 : S(e.formName),
|
|
61
61
|
[y, S]
|
|
@@ -69,28 +69,28 @@ const _e = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
69
69
|
queryFn: () => ye(a.encounterUuid),
|
|
70
70
|
enabled: !!a?.encounterUuid && g
|
|
71
71
|
});
|
|
72
|
-
|
|
72
|
+
be(
|
|
73
73
|
(e) => {
|
|
74
74
|
e.patientUUID === c && (X(), Y.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
75
75
|
},
|
|
76
76
|
[c]
|
|
77
77
|
);
|
|
78
|
-
const re = i(() => !O?.entry || !a?.formName ? [] : O.entry.filter((t) => t.resource?.resourceType === "Observation").map((t) => t.resource).filter((t) =>
|
|
78
|
+
const re = i(() => !O?.entry || !a?.formName ? [] : O.entry.filter((t) => t.resource?.resourceType === "Observation").map((t) => t.resource).filter((t) => he(t) ? pe(t)?.toLowerCase() === a.formName.toLowerCase() : !0), [O, a?.formName]), te = i(() => {
|
|
79
79
|
if (F)
|
|
80
80
|
return ge(F).message;
|
|
81
81
|
}, [F]), f = i(
|
|
82
82
|
() => [
|
|
83
|
-
{ key: "recordedOn", header:
|
|
84
|
-
{ key: "recordedBy", header:
|
|
83
|
+
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
84
|
+
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
85
85
|
],
|
|
86
|
-
[
|
|
86
|
+
[o]
|
|
87
87
|
), w = i(
|
|
88
|
-
() => [...f, { key: "actions", header:
|
|
89
|
-
[f,
|
|
90
|
-
),
|
|
91
|
-
(e) => N && e.some((
|
|
88
|
+
() => [...f, { key: "actions", header: o("ACTIONS") }],
|
|
89
|
+
[f, o]
|
|
90
|
+
), se = d(
|
|
91
|
+
(e) => N && e.some((s) => u(s)) ? w : f,
|
|
92
92
|
[N, u, w, f]
|
|
93
|
-
),
|
|
93
|
+
), oe = f, ae = i(
|
|
94
94
|
() => [
|
|
95
95
|
{ key: "recordedOn", sortable: !0 },
|
|
96
96
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -98,30 +98,30 @@ const _e = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
98
98
|
[]
|
|
99
99
|
), H = i(() => {
|
|
100
100
|
const e = C.reduce(
|
|
101
|
-
(
|
|
101
|
+
(s, r) => {
|
|
102
102
|
const l = r.formName;
|
|
103
|
-
|
|
103
|
+
s[l] ??= [];
|
|
104
104
|
const T = r.providers.map((ne) => ne.providerName).filter(Boolean).join(", ");
|
|
105
|
-
return
|
|
105
|
+
return s[l].push({
|
|
106
106
|
id: r.encounterUuid,
|
|
107
107
|
formName: r.formName,
|
|
108
|
-
recordedOn: Ne(r.encounterDateTime,
|
|
108
|
+
recordedOn: Ne(r.encounterDateTime, o, !0).formattedResult,
|
|
109
109
|
recordedBy: T ?? "--",
|
|
110
110
|
encounterDateTime: r.encounterDateTime,
|
|
111
111
|
encounterUuid: r.encounterUuid
|
|
112
|
-
}),
|
|
112
|
+
}), s;
|
|
113
113
|
},
|
|
114
114
|
{}
|
|
115
115
|
);
|
|
116
116
|
return Object.entries(e).map(
|
|
117
|
-
([
|
|
118
|
-
formName:
|
|
117
|
+
([s, r]) => ({
|
|
118
|
+
formName: s,
|
|
119
119
|
records: r.sort(
|
|
120
120
|
(l, T) => T.encounterDateTime - l.encounterDateTime
|
|
121
121
|
)
|
|
122
122
|
})
|
|
123
|
-
).sort((
|
|
124
|
-
}, [C,
|
|
123
|
+
).sort((s, r) => s.formName.localeCompare(r.formName));
|
|
124
|
+
}, [C, o]), k = d((e) => {
|
|
125
125
|
R(e), v(!0);
|
|
126
126
|
}, []), U = d(() => {
|
|
127
127
|
v(!1), R(null);
|
|
@@ -145,7 +145,7 @@ const _e = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
145
145
|
return u(e) ? /* @__PURE__ */ n(
|
|
146
146
|
x,
|
|
147
147
|
{
|
|
148
|
-
label:
|
|
148
|
+
label: o("EDIT_OBSERVATION_FORM"),
|
|
149
149
|
kind: "ghost",
|
|
150
150
|
size: "sm",
|
|
151
151
|
testId: `edit-form-${e.encounterUuid}`,
|
|
@@ -157,48 +157,48 @@ const _e = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
157
157
|
return null;
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
|
-
[k, I, u,
|
|
160
|
+
[k, I, u, o]
|
|
161
161
|
);
|
|
162
162
|
return /* @__PURE__ */ P(ie, { children: [
|
|
163
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
163
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: B || L || H.length === 0 || _ ? /* @__PURE__ */ n(
|
|
164
164
|
G,
|
|
165
165
|
{
|
|
166
|
-
headers:
|
|
167
|
-
ariaLabel:
|
|
166
|
+
headers: oe,
|
|
167
|
+
ariaLabel: o("FORMS_HEADING"),
|
|
168
168
|
rows: [],
|
|
169
|
-
loading:
|
|
170
|
-
errorStateMessage:
|
|
171
|
-
emptyStateMessage:
|
|
169
|
+
loading: B,
|
|
170
|
+
errorStateMessage: L ? J?.message : void 0,
|
|
171
|
+
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
172
172
|
renderCell: q,
|
|
173
173
|
className: p.formsTableBody,
|
|
174
174
|
dataTestId: "forms-table"
|
|
175
175
|
}
|
|
176
176
|
) : /* @__PURE__ */ n(Ie, { align: "start", children: H.map((e, t) => {
|
|
177
|
-
const { formName:
|
|
177
|
+
const { formName: s, records: r } = e, l = se(r);
|
|
178
178
|
return /* @__PURE__ */ n(
|
|
179
179
|
Te,
|
|
180
180
|
{
|
|
181
|
-
title:
|
|
181
|
+
title: s,
|
|
182
182
|
className: p.customAccordianItem,
|
|
183
|
-
testId: `accordian-title-${
|
|
183
|
+
testId: `accordian-title-${s}`,
|
|
184
184
|
open: t === 0,
|
|
185
185
|
children: /* @__PURE__ */ n(
|
|
186
186
|
G,
|
|
187
187
|
{
|
|
188
188
|
headers: l,
|
|
189
|
-
ariaLabel:
|
|
189
|
+
ariaLabel: o("FORMS_HEADING"),
|
|
190
190
|
rows: r,
|
|
191
191
|
loading: !1,
|
|
192
192
|
errorStateMessage: "",
|
|
193
193
|
sortable: ae,
|
|
194
|
-
emptyStateMessage:
|
|
194
|
+
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
195
195
|
renderCell: q,
|
|
196
196
|
className: p.formsTableBody,
|
|
197
|
-
dataTestId: `forms-table-${
|
|
197
|
+
dataTestId: `forms-table-${s}`
|
|
198
198
|
}
|
|
199
199
|
)
|
|
200
200
|
},
|
|
201
|
-
|
|
201
|
+
s
|
|
202
202
|
);
|
|
203
203
|
}) }) }),
|
|
204
204
|
g && a && /* @__PURE__ */ n(
|
|
@@ -213,7 +213,7 @@ const _e = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
213
213
|
N && u(a) && /* @__PURE__ */ n(
|
|
214
214
|
x,
|
|
215
215
|
{
|
|
216
|
-
label:
|
|
216
|
+
label: o("EDIT_OBSERVATION_FORM"),
|
|
217
217
|
kind: "ghost",
|
|
218
218
|
size: "sm",
|
|
219
219
|
testId: `edit-form-modal-${a.encounterUuid}`,
|
|
@@ -235,9 +235,9 @@ const _e = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
|
|
|
235
235
|
isLoading: Z,
|
|
236
236
|
isError: ee,
|
|
237
237
|
errorMessage: te,
|
|
238
|
-
emptyStateMessage:
|
|
238
|
+
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
239
239
|
testIdPrefix: a.formName,
|
|
240
|
-
hideThumbnail:
|
|
240
|
+
hideThumbnail: Q,
|
|
241
241
|
formName: a.formName
|
|
242
242
|
}
|
|
243
243
|
)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as i, jsxs as N } from "react/jsx-runtime";
|
|
2
|
-
import { z
|
|
2
|
+
import { z as H, D as U, E as z, H as G, m as P, I as j, J, L as x, K as Y, u as W, a as X, M as Z, q as ee, N as se, P as te, c as re, Q as ae, R as oe, T as ne, U as ie, S as ce, A as le } from "./index-Dbjt5_ga.js";
|
|
3
3
|
import { useQueries as de, useQuery as ue } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as pe, useEffect as C, useMemo as I } from "react";
|
|
5
|
-
import { useTranslation as
|
|
5
|
+
import { useTranslation as F } from "react-i18next";
|
|
6
6
|
const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", ye = "Observations-module_secondary__14nuS", y = {
|
|
7
7
|
observations: me,
|
|
8
8
|
title: be,
|
|
9
9
|
wrapper: ve,
|
|
10
10
|
secondary: ye
|
|
11
|
-
},
|
|
12
|
-
const a =
|
|
11
|
+
}, w = (t, l, n, c, u, r) => {
|
|
12
|
+
const a = z(t, l, u), e = a.value, p = G(e);
|
|
13
13
|
let o = e;
|
|
14
14
|
p === "Image" && (o = /* @__PURE__ */ i(
|
|
15
15
|
J,
|
|
@@ -35,27 +35,27 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
35
35
|
}), b = t.effectiveDateTime ? P(t.effectiveDateTime, u, !0).formattedResult : void 0, g = /* @__PURE__ */ N("div", { className: y.wrapper, children: [
|
|
36
36
|
/* @__PURE__ */ i("span", { children: d }),
|
|
37
37
|
b && /* @__PURE__ */ i("span", { className: y.secondary, children: b })
|
|
38
|
-
] }), v = t.display,
|
|
38
|
+
] }), v = t.display, T = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", E = c ? `${c}-${T}-${v}-${n}-${l}` : `${T}-${v}-${n}-${l}`;
|
|
39
39
|
return /* @__PURE__ */ i(
|
|
40
40
|
j,
|
|
41
41
|
{
|
|
42
42
|
header: m,
|
|
43
43
|
value: o,
|
|
44
44
|
info: g,
|
|
45
|
-
id:
|
|
46
|
-
testId:
|
|
47
|
-
ariaLabel:
|
|
45
|
+
id: E,
|
|
46
|
+
testId: E,
|
|
47
|
+
ariaLabel: E
|
|
48
48
|
},
|
|
49
49
|
`obs-${t.id}`
|
|
50
50
|
);
|
|
51
51
|
}, fe = (t, l, n, c, u, r, a) => /* @__PURE__ */ i(
|
|
52
|
-
|
|
52
|
+
U,
|
|
53
53
|
{
|
|
54
54
|
title: t.display,
|
|
55
55
|
id: `grouped-obs-${t.display}-${c}`,
|
|
56
56
|
open: n,
|
|
57
57
|
children: t.members?.map(
|
|
58
|
-
(e, p) =>
|
|
58
|
+
(e, p) => w(
|
|
59
59
|
e,
|
|
60
60
|
p,
|
|
61
61
|
u,
|
|
@@ -66,22 +66,22 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
66
66
|
)
|
|
67
67
|
},
|
|
68
68
|
`grouped-obs-${t.id}`
|
|
69
|
-
),
|
|
69
|
+
), Ee = ({
|
|
70
70
|
groupedData: t,
|
|
71
71
|
title: l = "",
|
|
72
72
|
hideThumbnail: n
|
|
73
73
|
}) => {
|
|
74
|
-
const { t: c } =
|
|
75
|
-
const p =
|
|
74
|
+
const { t: c } = F(), u = (r, a, e) => {
|
|
75
|
+
const p = H(r.encounterDetails, c);
|
|
76
76
|
return /* @__PURE__ */ N(
|
|
77
|
-
|
|
77
|
+
U,
|
|
78
78
|
{
|
|
79
79
|
title: p,
|
|
80
80
|
id: `encounter-${r.encounterId}`,
|
|
81
81
|
open: a,
|
|
82
82
|
children: [
|
|
83
83
|
r.observations.map(
|
|
84
|
-
(o, m) =>
|
|
84
|
+
(o, m) => w(
|
|
85
85
|
o,
|
|
86
86
|
m,
|
|
87
87
|
e,
|
|
@@ -117,7 +117,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
117
117
|
)
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
|
-
},
|
|
120
|
+
}, Oe = (t) => ["conceptUuid", t], he = (t, l, n, c) => [
|
|
121
121
|
"observations",
|
|
122
122
|
t,
|
|
123
123
|
...l,
|
|
@@ -133,9 +133,9 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
133
133
|
conceptUuid: r = [],
|
|
134
134
|
hideThumbnail: a = !1,
|
|
135
135
|
scope: e = "all"
|
|
136
|
-
} = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: m } = X(), { t: d } =
|
|
136
|
+
} = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: m } = X(), { t: d } = F(), b = de({
|
|
137
137
|
queries: u.map((s) => ({
|
|
138
|
-
queryKey:
|
|
138
|
+
queryKey: Oe(s),
|
|
139
139
|
queryFn: () => Z(s),
|
|
140
140
|
enabled: !!s
|
|
141
141
|
}))
|
|
@@ -148,22 +148,22 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
148
148
|
type: "error"
|
|
149
149
|
}), p.current.add(0)) : !s && R && p.current.clear();
|
|
150
150
|
}, [b, m, d]);
|
|
151
|
-
const g = I(() => b.map((s) => s.data?.uuid).filter((s) => !!s), [b]), v = I(() => [.../* @__PURE__ */ new Set([...g, ...r])], [g, r]), f = I(() => u.length === 0 ? !0 : b.every((s) => !s.isLoading), [b, u.length]),
|
|
151
|
+
const g = I(() => b.map((s) => s.data?.uuid).filter((s) => !!s), [b]), v = I(() => [.../* @__PURE__ */ new Set([...g, ...r])], [g, r]), f = I(() => u.length === 0 ? !0 : b.every((s) => !s.isLoading), [b, u.length]), T = e === "latest" || e === "latest-encounter", E = ee(
|
|
152
152
|
l,
|
|
153
153
|
n
|
|
154
154
|
), {
|
|
155
|
-
data:
|
|
156
|
-
isLoading:
|
|
155
|
+
data: O,
|
|
156
|
+
isLoading: V,
|
|
157
157
|
isError: S,
|
|
158
158
|
refetch: A
|
|
159
159
|
} = ue({
|
|
160
|
-
queryKey:
|
|
160
|
+
queryKey: he(
|
|
161
161
|
o,
|
|
162
162
|
v,
|
|
163
163
|
n,
|
|
164
164
|
e
|
|
165
165
|
),
|
|
166
|
-
queryFn: () =>
|
|
166
|
+
queryFn: () => T ? se(
|
|
167
167
|
o,
|
|
168
168
|
v,
|
|
169
169
|
n
|
|
@@ -172,7 +172,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
172
172
|
v,
|
|
173
173
|
n
|
|
174
174
|
),
|
|
175
|
-
enabled: !!o && v.length > 0 && f && !
|
|
175
|
+
enabled: !!o && v.length > 0 && f && !E
|
|
176
176
|
});
|
|
177
177
|
re(
|
|
178
178
|
(s) => {
|
|
@@ -189,21 +189,21 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
189
189
|
});
|
|
190
190
|
}, [S]);
|
|
191
191
|
const D = I(() => {
|
|
192
|
-
if (!
|
|
193
|
-
let s = ae(
|
|
192
|
+
if (!O) return [];
|
|
193
|
+
let s = ae(O);
|
|
194
194
|
e === "latest-encounter" && (s = oe(s));
|
|
195
195
|
const R = ne(s);
|
|
196
196
|
return ie(R);
|
|
197
|
-
}, [
|
|
197
|
+
}, [O, e]), K = [
|
|
198
198
|
{ key: "name", header: "name" },
|
|
199
199
|
{ key: "value", header: "value" },
|
|
200
200
|
{ key: "form", header: "form" }
|
|
201
|
-
], L =
|
|
201
|
+
], L = V || !f, B = S && f, M = (!O || O.entry?.length === 0 || v.length === 0) && f, q = B ? d("ERROR_FETCHING_OBSERVATIONS") : null, Q = M ? d("NO_OBSERVATIONS_FOUND") : void 0, k = D.length > 0 && !L && !B, _ = c.titleTranslationKey, h = _ ? d(_) : "";
|
|
202
202
|
return /* @__PURE__ */ N(
|
|
203
203
|
"div",
|
|
204
204
|
{
|
|
205
205
|
id: "observations",
|
|
206
|
-
"data-testid":
|
|
206
|
+
"data-testid": _ ? `observations-${h}` : "observations",
|
|
207
207
|
"aria-label": "observations-aria-label",
|
|
208
208
|
className: y.observations,
|
|
209
209
|
children: [
|
|
@@ -211,17 +211,17 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
211
211
|
ce,
|
|
212
212
|
{
|
|
213
213
|
id: "observations-title",
|
|
214
|
-
testId:
|
|
215
|
-
title:
|
|
214
|
+
testId: _ ? `observations-title-${h}` : "observations-title",
|
|
215
|
+
title: h,
|
|
216
216
|
className: y.title,
|
|
217
|
-
children: /* @__PURE__ */ i("p", { children:
|
|
217
|
+
children: /* @__PURE__ */ i("p", { children: h })
|
|
218
218
|
}
|
|
219
219
|
),
|
|
220
220
|
k ? /* @__PURE__ */ i(
|
|
221
|
-
|
|
221
|
+
Ee,
|
|
222
222
|
{
|
|
223
223
|
groupedData: D,
|
|
224
|
-
title:
|
|
224
|
+
title: h,
|
|
225
225
|
hideThumbnail: a
|
|
226
226
|
}
|
|
227
227
|
) : /* @__PURE__ */ i(
|
|
@@ -241,7 +241,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
241
241
|
);
|
|
242
242
|
};
|
|
243
243
|
export {
|
|
244
|
-
|
|
244
|
+
Oe as conceptUuidQueryKeys,
|
|
245
245
|
Ne as default,
|
|
246
|
-
|
|
246
|
+
he as observationsQueryKeys
|
|
247
247
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../../src/commandPalette/CommandPalette.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAC;AA4BrD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../../src/commandPalette/CommandPalette.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAC;AA4BrD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EA4SlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatientCommandItem.d.ts","sourceRoot":"","sources":["../../src/commandPalette/PatientCommandItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EACV,aAAa,EAEb,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAIlB,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"PatientCommandItem.d.ts","sourceRoot":"","sources":["../../src/commandPalette/PatientCommandItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EACV,aAAa,EAEb,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAIlB,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwHhE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as ge } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { V as Bh, u as zh, X as Gh, Y as Wh, Z as qh, $ as Xh, a0 as Zh, a1 as Yh, a2 as Kh } from "./index-Dbjt5_ga.js";
|
|
3
3
|
import { useQuery as ja } from "@tanstack/react-query";
|
|
4
4
|
import { useTranslation as Qh } from "react-i18next";
|
|
5
5
|
var Gl = /* @__PURE__ */ ((t) => (t.RENDER_FINISHED = "render-finished", t.RESIZE = "chart-resize", t.MOUSEOVER = "chart-mouseover", t.MOUSEOUT = "chart-mouseout", t))(Gl || {}), Wl = /* @__PURE__ */ ((t) => (t.SHOW = "show-modal", t.HIDE = "hide-modal", t))(Wl || {}), ql = /* @__PURE__ */ ((t) => (t.UPDATE = "model-update", t))(ql || {}), Xl = /* @__PURE__ */ ((t) => (t.SHOW_OVERFLOW_MENU = "show-toolbar-overflow-menu", t.HIDE_OVERFLOW_MENU = "hide-toolbar-overflow-menu", t.BUTTON_CLICK = "toolbar-button-click", t.SHOW_TOOLTIP = "toolbar-show-tooltip", t.HIDE_TOOLTIP = "toolbar-hide-tooltip", t))(Xl || {}), Zl = /* @__PURE__ */ ((t) => (t.UPDATE = "zoom-bar-update", t.SELECTION_START = "zoom-bar-selection-start", t.SELECTION_IN_PROGRESS = "zoom-bar-selection-in-progress", t.SELECTION_END = "zoom-bar-selection-end", t))(Zl || {}), Yl = /* @__PURE__ */ ((t) => (t.CHANGE = "zoom-domain-change", t))(Yl || {}), Kl = /* @__PURE__ */ ((t) => (t.CANVAS_ZOOM_IN = "canvas-zoom-in", t.CANVAS_ZOOM_OUT = "canvas-zoom-out", t))(Kl || {}), Ql = /* @__PURE__ */ ((t) => (t.LABEL_MOUSEOVER = "axis-label-mouseover", t.LABEL_MOUSEMOVE = "axis-label-mousemove", t.LABEL_CLICK = "axis-label-click", t.LABEL_MOUSEOUT = "axis-label-mouseout", t.LABEL_FOCUS = "axis-label-focus", t.LABEL_BLUR = "axis-label-blur", t.RENDER_COMPLETE = "axis-render-complete", t))(Ql || {}), Jl = /* @__PURE__ */ ((t) => (t.POINT_MOUSEOVER = "scatter-mouseover", t.POINT_MOUSEMOVE = "scatter-mousemove", t.POINT_CLICK = "scatter-click", t.POINT_MOUSEOUT = "scatter-mouseout", t))(Jl || {}), tu = /* @__PURE__ */ ((t) => (t.WORD_MOUSEOVER = "wordcloud-word-mouseover", t.WORD_MOUSEMOVE = "wordcloud-word-mousemove", t.WORD_CLICK = "wordcloud-word-click", t.WORD_MOUSEOUT = "wordcloud-word-mouseout", t))(tu || {}), eu = /* @__PURE__ */ ((t) => (t.SLICE_MOUSEOVER = "pie-slice-mouseover", t.SLICE_MOUSEMOVE = "pie-slice-mousemove", t.SLICE_CLICK = "pie-slice-click", t.SLICE_MOUSEOUT = "pie-slice-mouseout", t))(eu || {}), nu = /* @__PURE__ */ ((t) => (t.ARC_MOUSEOVER = "gauge-arc-mouseover", t.ARC_MOUSEMOVE = "gauge-arc-mousemove", t.ARC_CLICK = "gauge-arc-click", t.ARC_MOUSEOUT = "gauge-arc-mouseout", t))(nu || {}), ru = /* @__PURE__ */ ((t) => (t.BAR_MOUSEOVER = "bar-mouseover", t.BAR_MOUSEMOVE = "bar-mousemove", t.BAR_CLICK = "bar-click", t.BAR_MOUSEOUT = "bar-mouseout", t))(ru || {}), iu = /* @__PURE__ */ ((t) => (t.BOX_MOUSEOVER = "box-mouseover", t.BOX_MOUSEMOVE = "box-mousemove", t.BOX_CLICK = "box-click", t.BOX_MOUSEOUT = "box-mouseout", t.OUTLIER_MOUSEOVER = "outlier-mouseover", t.OUTLIER_MOUSEMOVE = "outlier-mousemove", t.OUTLIER_CLICK = "outlier-click", t.OUTLIER_MOUSEOUT = "outlier-mouseout", t))(iu || {}), ou = /* @__PURE__ */ ((t) => (t.SCATTER_MOUSEOVER = "scatter-mouseover", t.SCATTER_MOUSEMOVE = "scatter-mousemove", t.SCATTER_CLICK = "scatter-click", t.SCATTER_MOUSEOUT = "scatter-mouseout", t))(ou || {}), au = /* @__PURE__ */ ((t) => (t.POINT_MOUSEOVER = "scatter-mouseover", t.POINT_MOUSEMOVE = "scatter-mousemove", t.POINT_CLICK = "scatter-click", t.POINT_MOUSEOUT = "scatter-mouseout", t))(au || {}), su = /* @__PURE__ */ ((t) => (t.X_AXIS_MOUSEOVER = "radar-x-axis-mouseover", t.X_AXIS_MOUSEMOVE = "radar-x-axis-mousemove", t.X_AXIS_CLICK = "radar-x-axis-click", t.X_AXIS_MOUSEOUT = "radar-x-axis-mouseout", t))(su || {}), lu = /* @__PURE__ */ ((t) => (t.NODE_MOUSEOVER = "tree-node-mouseover", t.NODE_CLICK = "tree-node-click", t.NODE_MOUSEOUT = "tree-node-mouseout", t))(lu || {}), uu = /* @__PURE__ */ ((t) => (t.LEAF_MOUSEOVER = "leaf-mouseover", t.LEAF_MOUSEMOVE = "leaf-mousemove", t.LEAF_CLICK = "leaf-click", t.LEAF_MOUSEOUT = "leaf-mouseout", t))(uu || {}), cu = /* @__PURE__ */ ((t) => (t.SHOW = "show-tooltip", t.MOVE = "move-tooltip", t.HIDE = "hide-tooltip", t))(cu || {}), hu = /* @__PURE__ */ ((t) => (t.SHOW = "show-threshold", t.HIDE = "hide-threshold", t))(hu || {}), fu = /* @__PURE__ */ ((t) => (t.ITEM_HOVER = "legend-item-onhover", t.ITEM_CLICK = "legend-item-onclick", t.ITEM_MOUSEOUT = "legend-item-onmouseout", t.ITEMS_UPDATE = "legend-items-update", t))(fu || {}), du = /* @__PURE__ */ ((t) => (t.CIRCLE_MOUSEOVER = "circle-leaf-mouseover", t.CIRCLE_CLICK = "circle-leaf-click", t.CIRCLE_MOUSEOUT = "circle-leaf-mouseout", t.CIRCLE_MOUSEMOVE = "circle-leaf-mousemove", t))(du || {}), pu = /* @__PURE__ */ ((t) => (t.NODE_MOUSEOVER = "alluvial-node-mouseover", t.NODE_CLICK = "alluvial-node-click", t.NODE_MOUSEOUT = "alluvial-node-mouseout", t.NODE_MOUSEMOVE = "alluvial-node-mousemove", t.LINE_MOUSEOVER = "alluvial-line-mouseover", t.LINE_CLICK = "alluvial-line-click", t.LINE_MOUSEOUT = "alluvial-line-mouseout", t.LINE_MOUSEMOVE = "alluvial-line-mousemove", t))(pu || {}), gu = /* @__PURE__ */ ((t) => (t.METER_MOUSEOVER = "meter-mouseover", t.METER_CLICK = "meter-click", t.METER_MOUSEOUT = "meter-mouseout", t.METER_MOUSEMOVE = "meter-mousemove", t))(gu || {}), mu = /* @__PURE__ */ ((t) => (t.HEATMAP_MOUSEOVER = "heatmap-mouseover", t.HEATMAP_CLICK = "heatmap-click", t.HEATMAP_MOUSEOUT = "heatmap-mouseout", t.HEATMAP_MOUSEMOVE = "hetmap-mousemove", t))(mu || {}), yu = /* @__PURE__ */ ((t) => (t.CHOROPLETH_MOUSEOVER = "choropleth-mouseover", t.CHOROPLETH_CLICK = "choropleth-click", t.CHOROPLETH_MOUSEOUT = "choropleth-mouseout", t.CHOROPLETH_MOUSEMOVE = "choropleth-mousemove", t))(yu || {});
|