@bahmni/admin-app 0.0.1-dev.451 → 0.0.1-dev.452
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/{AdminDashboard-CYVM_EiQ.js → AdminDashboard-4L5vxprA.js} +2 -2
- package/dist/{AuditLog-iZ1rzQJi.js → AuditLog-DnSXSTJ_.js} +46 -46
- package/dist/{CsvExport-BmvkLPfn.js → CsvExport-OtNzuu0e.js} +33 -33
- package/dist/{CsvUpload-DDAAxlOP.js → CsvUpload-CAF80PsH.js} +1 -1
- package/dist/DocumentsTable-DH1dnlXy-hDxq_tz2.js +439 -0
- package/dist/{FormsTable-BkZ7CAhs-DDzwQf_5.js → FormsTable-B8Zxjboo-Cerow-cD.js} +83 -83
- package/dist/{LNWAZHJI-31a14RWE.js → LNWAZHJI-DVbBzE5X.js} +7 -7
- package/dist/{MWZ6AO7Z-bMqYgWjk.js → MWZ6AO7Z-CYl-OPQp.js} +9 -9
- package/dist/{Observations-ByaPCQhx-BxI4Sxh_.js → Observations-BzjjSeWg-tAqFoqhr.js} +41 -41
- package/dist/{YPM2AS64-CniKvC2e.js → YPM2AS64-CLLOAMRV.js} +1 -1
- package/dist/{index-D408E2pe.js → index-Grpo3EV8.js} +64760 -73314
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/DocumentsTable-cTYcbFbC-B13N7Kaf.js +0 -227
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { u as ie, d as de,
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
1
|
+
import { jsx as n, jsxs as H, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { u as ie, d as de, w as le, Z as me, g as ue, x as ce, i as fe, p as ye, a as ge, C as he, k as be, R as pe, h as Te, j as V, l as K, K as Ie, I as j, q as Ne, W as Oe, n as Ee, M as Ae, m as _e } from "./index-Grpo3EV8.js";
|
|
3
|
+
import { useQueryClient as Ce, useQuery as E } from "@tanstack/react-query";
|
|
4
|
+
import { useState as x, useMemo as i, useCallback as d } from "react";
|
|
5
|
+
const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_modalHeading__wnTmA", Le = "FormsTable-module_customAccordianItem__isszs", b = {
|
|
6
|
+
formsTableBody: Re,
|
|
7
7
|
modalHeading: ve,
|
|
8
8
|
customAccordianItem: Le
|
|
9
|
-
},
|
|
10
|
-
episodeOfCareUuids:
|
|
9
|
+
}, Fe = "startConsultation", Se = ({
|
|
10
|
+
episodeOfCareUuids: A,
|
|
11
11
|
encounterUuids: l,
|
|
12
|
-
config:
|
|
13
|
-
disableActions:
|
|
12
|
+
config: z,
|
|
13
|
+
disableActions: $ = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: o } = ie(), m = de(), [
|
|
17
|
-
numberOfVisits:
|
|
18
|
-
hideThumbnail:
|
|
19
|
-
forms:
|
|
20
|
-
} =
|
|
16
|
+
const { t: o } = ie(), m = de(), [p, _] = x(!1), [t, C] = x(null), {
|
|
17
|
+
numberOfVisits: G,
|
|
18
|
+
hideThumbnail: P = !1,
|
|
19
|
+
forms: g
|
|
20
|
+
} = z ?? {}, Q = le(
|
|
21
21
|
_e.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges:
|
|
23
|
-
|
|
22
|
+
), { userPrivileges: h } = me(), T = Q && !$ && !!y, R = ue(
|
|
23
|
+
A,
|
|
24
24
|
l
|
|
25
|
-
),
|
|
25
|
+
), W = Ce(), {
|
|
26
26
|
data: v = [],
|
|
27
27
|
isLoading: L,
|
|
28
|
-
isError:
|
|
29
|
-
error:
|
|
30
|
-
refetch:
|
|
31
|
-
} =
|
|
32
|
-
queryKey: ["forms", m,
|
|
33
|
-
queryFn: () => ce(m, void 0,
|
|
34
|
-
enabled: !!m && !
|
|
28
|
+
isError: F,
|
|
29
|
+
error: Z,
|
|
30
|
+
refetch: Y
|
|
31
|
+
} = E({
|
|
32
|
+
queryKey: ["forms", m, A],
|
|
33
|
+
queryFn: () => ce(m, void 0, G),
|
|
34
|
+
enabled: !!m && !R
|
|
35
35
|
}), B = i(() => {
|
|
36
36
|
let e = v;
|
|
37
37
|
return l && l.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => l.includes(r.encounterUuid)
|
|
39
|
-
)), Array.isArray(
|
|
40
|
-
(r) =>
|
|
39
|
+
)), Array.isArray(g) && g.length > 0 && (e = e.filter(
|
|
40
|
+
(r) => g.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [v, l,
|
|
42
|
+
}, [v, l, g]), { data: M = [] } = E({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => fe()
|
|
45
|
-
}),
|
|
45
|
+
}), U = d(
|
|
46
46
|
(e) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = M.find(
|
|
48
48
|
(s) => s.name.toLowerCase() === e.toLowerCase()
|
|
49
49
|
);
|
|
50
50
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
51
|
-
if (!
|
|
52
|
-
const a = new Set(
|
|
51
|
+
if (!h || h.length === 0) return !1;
|
|
52
|
+
const a = new Set(h.map((s) => s.name));
|
|
53
53
|
return r.privileges.some(
|
|
54
54
|
(s) => a.has(s.privilegeName) && s.editable
|
|
55
55
|
);
|
|
56
56
|
},
|
|
57
|
-
[
|
|
57
|
+
[M, h]
|
|
58
58
|
), u = d(
|
|
59
|
-
(e) => !y || e.encounterUuid !== y ? !1 :
|
|
60
|
-
[y,
|
|
59
|
+
(e) => !y || e.encounterUuid !== y ? !1 : U(e.formName),
|
|
60
|
+
[y, U]
|
|
61
61
|
), {
|
|
62
62
|
data: I,
|
|
63
|
-
isLoading:
|
|
64
|
-
isError:
|
|
65
|
-
error:
|
|
66
|
-
} =
|
|
63
|
+
isLoading: J,
|
|
64
|
+
isError: X,
|
|
65
|
+
error: N
|
|
66
|
+
} = E({
|
|
67
67
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
68
68
|
queryFn: () => ye(t.encounterUuid),
|
|
69
|
-
enabled: !!t?.encounterUuid &&
|
|
69
|
+
enabled: !!t?.encounterUuid && p
|
|
70
70
|
});
|
|
71
|
-
|
|
71
|
+
ge(
|
|
72
72
|
(e) => {
|
|
73
|
-
e.patientUUID === m && (
|
|
73
|
+
e.patientUUID === m && (Y(), W.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
74
|
},
|
|
75
75
|
[m]
|
|
76
76
|
);
|
|
77
|
-
const ee = i(() => !I?.entry || !t?.formName ? [] : I.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) =>
|
|
78
|
-
if (
|
|
79
|
-
return
|
|
80
|
-
}, [
|
|
77
|
+
const ee = i(() => !I?.entry || !t?.formName ? [] : I.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => he(e) ? be(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [I, t?.formName]), re = i(() => {
|
|
78
|
+
if (N)
|
|
79
|
+
return pe(N).message;
|
|
80
|
+
}, [N]), c = i(
|
|
81
81
|
() => [
|
|
82
82
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
83
83
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
84
84
|
],
|
|
85
85
|
[o]
|
|
86
|
-
),
|
|
86
|
+
), D = i(
|
|
87
87
|
() => [...c, { key: "actions", header: o("ACTIONS") }],
|
|
88
88
|
[c, o]
|
|
89
89
|
), ae = d(
|
|
90
|
-
(e) =>
|
|
91
|
-
[
|
|
90
|
+
(e) => T && e.some((r) => u(r)) ? D : c,
|
|
91
|
+
[T, u, D, c]
|
|
92
92
|
), oe = c, te = i(
|
|
93
93
|
() => [
|
|
94
94
|
{ key: "recordedOn", sortable: !0 },
|
|
95
95
|
{ key: "recordedBy", sortable: !0 }
|
|
96
96
|
],
|
|
97
97
|
[]
|
|
98
|
-
),
|
|
98
|
+
), S = i(() => {
|
|
99
99
|
const e = B.reduce(
|
|
100
100
|
(r, a) => {
|
|
101
101
|
const s = a.formName;
|
|
@@ -104,7 +104,7 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
104
104
|
return r[s].push({
|
|
105
105
|
id: a.encounterUuid,
|
|
106
106
|
formName: a.formName,
|
|
107
|
-
recordedOn:
|
|
107
|
+
recordedOn: Te(a.encounterDateTime, o, !0).formattedResult,
|
|
108
108
|
recordedBy: f ?? "--",
|
|
109
109
|
encounterDateTime: a.encounterDateTime,
|
|
110
110
|
encounterUuid: a.encounterUuid
|
|
@@ -121,12 +121,12 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
121
121
|
})
|
|
122
122
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
123
|
}, [B, o]), k = d((e) => {
|
|
124
|
-
|
|
124
|
+
C(e), _(!0);
|
|
125
125
|
}, []), w = d(() => {
|
|
126
|
-
_(!1),
|
|
127
|
-
}, []),
|
|
126
|
+
_(!1), C(null);
|
|
127
|
+
}, []), O = d((e) => {
|
|
128
128
|
globalThis.dispatchEvent(
|
|
129
|
-
new CustomEvent(
|
|
129
|
+
new CustomEvent(Fe, {
|
|
130
130
|
detail: {
|
|
131
131
|
editOnly: "observationForms",
|
|
132
132
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -136,7 +136,7 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
136
136
|
}
|
|
137
137
|
})
|
|
138
138
|
);
|
|
139
|
-
}, []),
|
|
139
|
+
}, []), q = d(
|
|
140
140
|
(e, r) => {
|
|
141
141
|
switch (r) {
|
|
142
142
|
case "recordedOn":
|
|
@@ -151,41 +151,41 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
151
151
|
kind: "ghost",
|
|
152
152
|
size: "sm",
|
|
153
153
|
testId: `edit-form-${e.encounterUuid}`,
|
|
154
|
-
onClick: () =>
|
|
155
|
-
children: /* @__PURE__ */ n(
|
|
154
|
+
onClick: () => O(e),
|
|
155
|
+
children: /* @__PURE__ */ n(K, {})
|
|
156
156
|
}
|
|
157
157
|
) : null;
|
|
158
158
|
default:
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
[k,
|
|
162
|
+
[k, O, u, o]
|
|
163
163
|
);
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L ||
|
|
166
|
-
|
|
164
|
+
return /* @__PURE__ */ H(ne, { children: [
|
|
165
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L || F || S.length === 0 || R ? /* @__PURE__ */ n(
|
|
166
|
+
j,
|
|
167
167
|
{
|
|
168
168
|
headers: oe,
|
|
169
169
|
ariaLabel: o("FORMS_HEADING"),
|
|
170
170
|
rows: [],
|
|
171
171
|
loading: L,
|
|
172
|
-
errorStateMessage:
|
|
172
|
+
errorStateMessage: F ? Z?.message : void 0,
|
|
173
173
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
174
|
-
renderCell:
|
|
175
|
-
className:
|
|
174
|
+
renderCell: q,
|
|
175
|
+
className: b.formsTableBody,
|
|
176
176
|
dataTestId: "forms-table"
|
|
177
177
|
}
|
|
178
|
-
) : /* @__PURE__ */ n(
|
|
178
|
+
) : /* @__PURE__ */ n(Ne, { align: "start", children: S.map((e, r) => {
|
|
179
179
|
const { formName: a, records: s } = e, f = ae(s);
|
|
180
180
|
return /* @__PURE__ */ n(
|
|
181
|
-
|
|
181
|
+
Oe,
|
|
182
182
|
{
|
|
183
183
|
title: a,
|
|
184
|
-
className:
|
|
184
|
+
className: b.customAccordianItem,
|
|
185
185
|
testId: `accordian-title-${a}`,
|
|
186
186
|
open: r === 0,
|
|
187
187
|
children: /* @__PURE__ */ n(
|
|
188
|
-
|
|
188
|
+
j,
|
|
189
189
|
{
|
|
190
190
|
headers: f,
|
|
191
191
|
ariaLabel: o("FORMS_HEADING"),
|
|
@@ -194,8 +194,8 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
194
194
|
errorStateMessage: "",
|
|
195
195
|
sortable: te,
|
|
196
196
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
197
|
-
renderCell:
|
|
198
|
-
className:
|
|
197
|
+
renderCell: q,
|
|
198
|
+
className: b.formsTableBody,
|
|
199
199
|
dataTestId: `forms-table-${a}`
|
|
200
200
|
}
|
|
201
201
|
)
|
|
@@ -203,16 +203,16 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
203
203
|
a
|
|
204
204
|
);
|
|
205
205
|
}) }) }),
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
p && t && /* @__PURE__ */ n(
|
|
207
|
+
Ee,
|
|
208
208
|
{
|
|
209
209
|
id: "modalIdForActionAreaLayout",
|
|
210
210
|
portalId: "main-display-area",
|
|
211
|
-
open:
|
|
211
|
+
open: p,
|
|
212
212
|
onRequestClose: w,
|
|
213
|
-
modalHeading: /* @__PURE__ */
|
|
213
|
+
modalHeading: /* @__PURE__ */ H("div", { className: b.modalHeading, children: [
|
|
214
214
|
/* @__PURE__ */ n("span", { children: t.formName }),
|
|
215
|
-
|
|
215
|
+
T && u(t) && /* @__PURE__ */ n(
|
|
216
216
|
V,
|
|
217
217
|
{
|
|
218
218
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
@@ -220,9 +220,9 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
220
220
|
size: "sm",
|
|
221
221
|
testId: `edit-form-modal-${t.encounterUuid}`,
|
|
222
222
|
onClick: () => {
|
|
223
|
-
w(),
|
|
223
|
+
w(), O(t);
|
|
224
224
|
},
|
|
225
|
-
children: /* @__PURE__ */ n(
|
|
225
|
+
children: /* @__PURE__ */ n(K, {})
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
@@ -231,15 +231,15 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
231
231
|
size: "md",
|
|
232
232
|
testId: "form-details-modal",
|
|
233
233
|
children: /* @__PURE__ */ n(
|
|
234
|
-
|
|
234
|
+
Ae,
|
|
235
235
|
{
|
|
236
236
|
observations: ee,
|
|
237
|
-
isLoading:
|
|
238
|
-
isError:
|
|
237
|
+
isLoading: J,
|
|
238
|
+
isError: X,
|
|
239
239
|
errorMessage: re,
|
|
240
240
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
241
241
|
testIdPrefix: t.formName,
|
|
242
|
-
hideThumbnail:
|
|
242
|
+
hideThumbnail: P,
|
|
243
243
|
formName: t.formName
|
|
244
244
|
}
|
|
245
245
|
)
|
|
@@ -248,5 +248,5 @@ const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
248
248
|
] });
|
|
249
249
|
};
|
|
250
250
|
export {
|
|
251
|
-
|
|
251
|
+
Se as default
|
|
252
252
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
1
|
+
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-CLLOAMRV.js";
|
|
2
|
+
import { ah as d, ai as f, aj as e } from "./index-Grpo3EV8.js";
|
|
3
|
+
var h = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
6
|
}), n = d(), s = f(() => {
|
|
7
7
|
const o = r.theme_preference || l;
|
|
8
8
|
return o !== "system" ? o : n();
|
|
9
9
|
});
|
|
10
|
-
return e(
|
|
10
|
+
return e(v.Provider, {
|
|
11
11
|
value: a,
|
|
12
12
|
get children() {
|
|
13
13
|
return e(m, {
|
|
14
14
|
localStore: r,
|
|
15
15
|
setLocalStore: t,
|
|
16
16
|
get children() {
|
|
17
|
-
return e(
|
|
17
|
+
return e(i.Provider, {
|
|
18
18
|
value: s,
|
|
19
19
|
get children() {
|
|
20
|
-
return e(
|
|
20
|
+
return e(u, {
|
|
21
21
|
localStore: r,
|
|
22
22
|
setLocalStore: t
|
|
23
23
|
});
|
|
@@ -27,7 +27,7 @@ var p = (a) => {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
}, C =
|
|
30
|
+
}, C = h;
|
|
31
31
|
export {
|
|
32
32
|
C as default
|
|
33
33
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { c as s, T as c, P as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
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-CLLOAMRV.js";
|
|
2
|
+
import { ah as h, ai as v, aj as e } from "./index-Grpo3EV8.js";
|
|
3
|
+
var C = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}),
|
|
7
|
-
const
|
|
8
|
-
return
|
|
6
|
+
}), a = h(), l = v(() => {
|
|
7
|
+
const n = r.theme_preference || c;
|
|
8
|
+
return n !== "system" ? n : a();
|
|
9
9
|
});
|
|
10
10
|
return e(d.Provider, {
|
|
11
11
|
value: t,
|
|
12
12
|
get children() {
|
|
13
|
-
return e(
|
|
13
|
+
return e(i, {
|
|
14
14
|
disabled: !0,
|
|
15
15
|
localStore: r,
|
|
16
16
|
setLocalStore: o,
|
|
17
17
|
get children() {
|
|
18
|
-
return e(
|
|
18
|
+
return e(u.Provider, {
|
|
19
19
|
value: l,
|
|
20
20
|
get children() {
|
|
21
21
|
return e(m, {
|
|
@@ -36,7 +36,7 @@ var h = (t) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
}, p =
|
|
39
|
+
}, p = C;
|
|
40
40
|
export {
|
|
41
41
|
p as default
|
|
42
42
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as I, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { d as
|
|
2
|
+
import { d as z, z as M, u as L, o as G, g as x, r as J, s as Y, a as j, t as X, v as P, $ as Z, y as W, b as ee, I as ae, D as se, B, S as te, X as re, h as ie, Q as oe, F as ne, J as de, Y as le } from "./index-Grpo3EV8.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as pe, useEffect as
|
|
4
|
+
import { useRef as pe, useEffect as A, useMemo as T } from "react";
|
|
5
5
|
const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
|
|
6
6
|
observations: me,
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
|
-
},
|
|
10
|
+
}, U = (s, l, o, d, c, t) => {
|
|
11
11
|
const r = te(s, l, c), e = r.value, p = re(e);
|
|
12
12
|
let i = e;
|
|
13
13
|
p === "Image" && (i = /* @__PURE__ */ n(
|
|
@@ -31,19 +31,19 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
31
31
|
r.header.referenceRange && /* @__PURE__ */ n("span", { className: O.secondary, children: r.header.referenceRange })
|
|
32
32
|
] }), u = c("OBSERVATIONS_RECORDED_BY", {
|
|
33
33
|
provider: r.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0,
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, E = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
35
35
|
/* @__PURE__ */ n("span", { children: u }),
|
|
36
36
|
b && /* @__PURE__ */ n("span", { className: O.secondary, children: b })
|
|
37
|
-
] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs",
|
|
37
|
+
] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${v}-${h}-${o}-${l}` : `${v}-${h}-${o}-${l}`;
|
|
38
38
|
return /* @__PURE__ */ n(
|
|
39
39
|
oe,
|
|
40
40
|
{
|
|
41
41
|
header: m,
|
|
42
42
|
value: i,
|
|
43
|
-
info:
|
|
44
|
-
id:
|
|
45
|
-
testId:
|
|
46
|
-
ariaLabel:
|
|
43
|
+
info: E,
|
|
44
|
+
id: R,
|
|
45
|
+
testId: R,
|
|
46
|
+
ariaLabel: R
|
|
47
47
|
},
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
@@ -54,7 +54,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: o,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e, p) =>
|
|
57
|
+
(e, p) => U(
|
|
58
58
|
e,
|
|
59
59
|
p,
|
|
60
60
|
c,
|
|
@@ -70,7 +70,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
70
70
|
title: l = "",
|
|
71
71
|
hideThumbnail: o
|
|
72
72
|
}) => {
|
|
73
|
-
const { t: d } =
|
|
73
|
+
const { t: d } = L(), c = (t, r, e) => {
|
|
74
74
|
const p = se(t.encounterDetails, d);
|
|
75
75
|
return /* @__PURE__ */ I(
|
|
76
76
|
B,
|
|
@@ -80,7 +80,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
80
80
|
open: r,
|
|
81
81
|
children: [
|
|
82
82
|
t.observations.map(
|
|
83
|
-
(i, m) =>
|
|
83
|
+
(i, m) => U(
|
|
84
84
|
i,
|
|
85
85
|
m,
|
|
86
86
|
e,
|
|
@@ -116,7 +116,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
},
|
|
119
|
+
}, Re = (s) => ["conceptUuid", s], _e = (s, l, o, d) => [
|
|
120
120
|
"observations",
|
|
121
121
|
s,
|
|
122
122
|
...l,
|
|
@@ -132,37 +132,37 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: t = [],
|
|
133
133
|
hideThumbnail: r = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d, p = pe(/* @__PURE__ */ new Set()), i =
|
|
135
|
+
} = d, p = pe(/* @__PURE__ */ new Set()), i = z(), { addNotification: m } = M(), { t: u } = L(), b = ue({
|
|
136
136
|
queries: c.map((a) => ({
|
|
137
|
-
queryKey:
|
|
138
|
-
queryFn: () =>
|
|
137
|
+
queryKey: Re(a),
|
|
138
|
+
queryFn: () => G(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
const a = b.some((
|
|
142
|
+
A(() => {
|
|
143
|
+
const a = b.some((q) => q.isError), y = p.current.size > 0;
|
|
144
144
|
a && !y ? (m({
|
|
145
145
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
148
|
}), p.current.add(0)) : !a && y && p.current.clear();
|
|
149
149
|
}, [b, m, u]);
|
|
150
|
-
const
|
|
150
|
+
const E = T(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = T(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = T(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V = x(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
|
-
data:
|
|
155
|
-
isLoading:
|
|
154
|
+
data: _,
|
|
155
|
+
isLoading: F,
|
|
156
156
|
isError: S,
|
|
157
157
|
refetch: N
|
|
158
158
|
} = ce({
|
|
159
|
-
queryKey:
|
|
159
|
+
queryKey: _e(
|
|
160
160
|
i,
|
|
161
161
|
h,
|
|
162
162
|
o,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () =>
|
|
165
|
+
queryFn: () => R ? J(
|
|
166
166
|
i,
|
|
167
167
|
h,
|
|
168
168
|
o
|
|
@@ -171,38 +171,38 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
171
171
|
h,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && h.length > 0 && v && !
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !V
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
j(
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
179
|
(y) => h.includes(y)
|
|
180
180
|
) && N();
|
|
181
181
|
},
|
|
182
182
|
[i, N]
|
|
183
|
-
),
|
|
183
|
+
), A(() => {
|
|
184
184
|
S && m({
|
|
185
185
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
189
|
}, [S]);
|
|
190
|
-
const $ =
|
|
191
|
-
if (!
|
|
192
|
-
let a =
|
|
193
|
-
e === "latest-encounter" && (a =
|
|
194
|
-
const y =
|
|
195
|
-
return
|
|
196
|
-
}, [
|
|
190
|
+
const $ = T(() => {
|
|
191
|
+
if (!_) return [];
|
|
192
|
+
let a = X(_);
|
|
193
|
+
e === "latest-encounter" && (a = P(a));
|
|
194
|
+
const y = Z(a);
|
|
195
|
+
return W(y);
|
|
196
|
+
}, [_, e]), w = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
],
|
|
200
|
+
], k = F || !v, D = S && v, K = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, H = K ? u("NO_OBSERVATIONS_FOUND") : void 0, Q = $.length > 0 && !k && !D, g = d.titleTranslationKey, f = g ? u(g) : "";
|
|
201
201
|
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid":
|
|
205
|
+
"data-testid": g ? `observations-${f}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
207
|
className: O.observations,
|
|
208
208
|
children: [
|
|
@@ -210,13 +210,13 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId:
|
|
213
|
+
testId: g ? `observations-title-${f}` : "observations-title",
|
|
214
214
|
title: f,
|
|
215
215
|
className: O.title,
|
|
216
216
|
children: /* @__PURE__ */ n("p", { children: f })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
219
|
+
Q ? /* @__PURE__ */ n(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
@@ -229,9 +229,9 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
229
229
|
headers: w,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: u("OBSERVATIONS"),
|
|
232
|
-
loading:
|
|
232
|
+
loading: k,
|
|
233
233
|
errorStateMessage: C,
|
|
234
|
-
emptyStateMessage:
|
|
234
|
+
emptyStateMessage: H ?? u("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -240,7 +240,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
240
240
|
);
|
|
241
241
|
};
|
|
242
242
|
export {
|
|
243
|
-
|
|
243
|
+
Re as conceptUuidQueryKeys,
|
|
244
244
|
Ie as default,
|
|
245
|
-
|
|
245
|
+
_e as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ak as we, al as z, am as xt, an as B, ai as q, aj as y, ao as Ro, ap as ye, aq as R, ar as _, as as k, at as N, au as A, av as bs, aw as ir, ax as $e, ay as U, az as Hn, aA as Vn, aB as dt, aC as D, aD as xs, aE as cn, aF as Be, aG as ws, aH as qt, aI as zt, aJ as $s, aK as Cs, aL as $n, aM as Ss, aN as Nr, aO as Bt, aP as zo, aQ as ks, aR as Es, aS as j, aT as Ur, aU as Ms, aV as Ds, aW as sr, aX as As, aY as Ts, aZ as zn, a_ as Fs, a$ as Is, b0 as Z, b1 as Ps, b2 as Ls } from "./index-Grpo3EV8.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|