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