@bahmni/clinical-app 0.0.1-dev.444 → 0.0.1-dev.446
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/{ConsultationPage-2KQWgMXU.js → ConsultationPage-8YBfxm0d.js} +69 -69
- package/dist/{DocumentsTable-v6NhgJsj-BVgykBQY.js → DocumentsTable-CSCabXWL-8skO2fn9.js} +9 -9
- package/dist/{FormsTable-DiD-aWUg-DVh78vZB.js → FormsTable-CxEQWZt3-B2I59kqF.js} +71 -71
- package/dist/{LNWAZHJI-DNchxgkd.js → LNWAZHJI-DgQwx5H4.js} +2 -2
- package/dist/{MWZ6AO7Z-DqtTpg61.js → MWZ6AO7Z-D0nHFqJz.js} +2 -2
- package/dist/{Observations-B2kwkXq0-Cuj1y61E.js → Observations-CAedz2J9-B4laX18e.js} +52 -52
- package/dist/{YPM2AS64-vFybs_ep.js → YPM2AS64-r4Lc-1Zs.js} +1 -1
- package/dist/{hook-D_bVbnnT.js → hook-CPfpyOdi.js} +1 -1
- package/dist/{index-BFAykipS.js → index-BEwy7v4s.js} +3 -3
- package/dist/{index-Gaen1COw.js → index-CWrIj17R.js} +42141 -42735
- package/dist/{index-DOONSy3q.js → index-DG_W9Zdm.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { u as ie, d as de,
|
|
3
|
-
import { useQueryClient as Re, useQuery as
|
|
4
|
-
import { useState as
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
7
|
-
modalHeading:
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
},
|
|
10
|
-
episodeOfCareUuids:
|
|
1
|
+
import { jsx as n, jsxs as H, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { u as ie, d as de, y as le, k as me, V as ue, G as ce, m as fe, b as ye, w as he, c as Ne, e as ge, R as Te, h as pe, f as q, g as $, Y as Oe, $ as z, j as be, U as Ie, a as Ae, A as Ee, i as _e } from "./index-CWrIj17R.js";
|
|
3
|
+
import { useQueryClient as Re, useQuery as A } from "@tanstack/react-query";
|
|
4
|
+
import { useState as j, useMemo as i, useCallback as d } from "react";
|
|
5
|
+
const Ce = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_modalHeading__wnTmA", Le = "FormsTable-module_customAccordianItem__isszs", g = {
|
|
6
|
+
formsTableBody: Ce,
|
|
7
|
+
modalHeading: ve,
|
|
8
|
+
customAccordianItem: Le
|
|
9
|
+
}, Ue = "startConsultation", Me = ({
|
|
10
|
+
episodeOfCareUuids: E,
|
|
11
11
|
encounterUuids: l,
|
|
12
|
-
config:
|
|
13
|
-
disableActions:
|
|
12
|
+
config: K,
|
|
13
|
+
disableActions: G = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: o } = ie(), m = de(), [
|
|
17
|
-
numberOfVisits:
|
|
18
|
-
hideThumbnail:
|
|
19
|
-
forms:
|
|
20
|
-
} =
|
|
21
|
-
|
|
22
|
-
), { userPrivileges:
|
|
23
|
-
|
|
16
|
+
const { t: o } = ie(), m = de(), [T, _] = j(!1), [t, R] = j(null), {
|
|
17
|
+
numberOfVisits: Y,
|
|
18
|
+
hideThumbnail: x = !1,
|
|
19
|
+
forms: h
|
|
20
|
+
} = K ?? {}, Q = le(
|
|
21
|
+
_e.EDIT_OBSERVATIONS
|
|
22
|
+
), { userPrivileges: N } = me(), p = Q && !G && !!y, C = ue(
|
|
23
|
+
E,
|
|
24
24
|
l
|
|
25
25
|
), P = Re(), {
|
|
26
|
-
data:
|
|
27
|
-
isLoading:
|
|
28
|
-
isError:
|
|
29
|
-
error:
|
|
30
|
-
refetch:
|
|
31
|
-
} =
|
|
32
|
-
queryKey: ["forms", m,
|
|
33
|
-
queryFn: () => ce(m, void 0,
|
|
34
|
-
enabled: !!m && !
|
|
35
|
-
}),
|
|
36
|
-
let e =
|
|
26
|
+
data: v = [],
|
|
27
|
+
isLoading: L,
|
|
28
|
+
isError: U,
|
|
29
|
+
error: J,
|
|
30
|
+
refetch: W
|
|
31
|
+
} = A({
|
|
32
|
+
queryKey: ["forms", m, E],
|
|
33
|
+
queryFn: () => ce(m, void 0, Y),
|
|
34
|
+
enabled: !!m && !C
|
|
35
|
+
}), B = i(() => {
|
|
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(h) && h.length > 0 && (e = e.filter(
|
|
40
|
+
(r) => h.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [v, l, h]), { data: F = [] } = A({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => fe()
|
|
45
|
-
}),
|
|
45
|
+
}), D = d(
|
|
46
46
|
(e) => {
|
|
47
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;
|
|
51
|
-
if (!
|
|
52
|
-
const a = new Set(
|
|
51
|
+
if (!N || N.length === 0) return !1;
|
|
52
|
+
const a = new Set(N.map((s) => s.name));
|
|
53
53
|
return r.privileges.some(
|
|
54
54
|
(s) => a.has(s.privilegeName) && s.editable
|
|
55
55
|
);
|
|
56
56
|
},
|
|
57
|
-
[F,
|
|
57
|
+
[F, N]
|
|
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
63
|
isLoading: X,
|
|
64
64
|
isError: Z,
|
|
65
65
|
error: b
|
|
66
|
-
} =
|
|
66
|
+
} = A({
|
|
67
67
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
68
68
|
queryFn: () => ye(t.encounterUuid),
|
|
69
|
-
enabled: !!t?.encounterUuid &&
|
|
69
|
+
enabled: !!t?.encounterUuid && T
|
|
70
70
|
});
|
|
71
|
-
|
|
71
|
+
he(
|
|
72
72
|
(e) => {
|
|
73
|
-
e.patientUUID === m && (
|
|
73
|
+
e.patientUUID === m && (W(), P.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
74
|
},
|
|
75
75
|
[m]
|
|
76
76
|
);
|
|
77
|
-
const ee = i(() => !O?.entry || !t?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) =>
|
|
77
|
+
const ee = i(() => !O?.entry || !t?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Ne(e) ? ge(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [O, t?.formName]), re = i(() => {
|
|
78
78
|
if (b)
|
|
79
|
-
return
|
|
79
|
+
return Te(b).message;
|
|
80
80
|
}, [b]), c = i(
|
|
81
81
|
() => [
|
|
82
82
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
@@ -96,7 +96,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
96
96
|
],
|
|
97
97
|
[]
|
|
98
98
|
), M = i(() => {
|
|
99
|
-
const e =
|
|
99
|
+
const e = B.reduce(
|
|
100
100
|
(r, a) => {
|
|
101
101
|
const s = a.formName;
|
|
102
102
|
r[s] ??= [];
|
|
@@ -120,13 +120,13 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
120
120
|
)
|
|
121
121
|
})
|
|
122
122
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
|
-
}, [
|
|
124
|
-
R(e),
|
|
123
|
+
}, [B, o]), k = d((e) => {
|
|
124
|
+
R(e), _(!0);
|
|
125
125
|
}, []), w = d(() => {
|
|
126
|
-
|
|
126
|
+
_(!1), R(null);
|
|
127
127
|
}, []), I = 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,7 +136,7 @@ const Le = "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":
|
|
@@ -145,7 +145,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
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",
|
|
@@ -161,18 +161,18 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
161
161
|
},
|
|
162
162
|
[k, I, u, o]
|
|
163
163
|
);
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
166
|
-
|
|
164
|
+
return /* @__PURE__ */ H(ne, { children: [
|
|
165
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L || U || M.length === 0 || C ? /* @__PURE__ */ n(
|
|
166
|
+
z,
|
|
167
167
|
{
|
|
168
168
|
headers: oe,
|
|
169
169
|
ariaLabel: o("FORMS_HEADING"),
|
|
170
170
|
rows: [],
|
|
171
|
-
loading:
|
|
172
|
-
errorStateMessage:
|
|
171
|
+
loading: L,
|
|
172
|
+
errorStateMessage: U ? J?.message : void 0,
|
|
173
173
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
174
|
-
renderCell:
|
|
175
|
-
className:
|
|
174
|
+
renderCell: V,
|
|
175
|
+
className: g.formsTableBody,
|
|
176
176
|
dataTestId: "forms-table"
|
|
177
177
|
}
|
|
178
178
|
) : /* @__PURE__ */ n(be, { align: "start", children: M.map((e, r) => {
|
|
@@ -181,11 +181,11 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
181
181
|
Ie,
|
|
182
182
|
{
|
|
183
183
|
title: a,
|
|
184
|
-
className:
|
|
184
|
+
className: g.customAccordianItem,
|
|
185
185
|
testId: `accordian-title-${a}`,
|
|
186
186
|
open: r === 0,
|
|
187
187
|
children: /* @__PURE__ */ n(
|
|
188
|
-
|
|
188
|
+
z,
|
|
189
189
|
{
|
|
190
190
|
headers: f,
|
|
191
191
|
ariaLabel: o("FORMS_HEADING"),
|
|
@@ -194,8 +194,8 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
194
194
|
errorStateMessage: "",
|
|
195
195
|
sortable: te,
|
|
196
196
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
197
|
-
renderCell:
|
|
198
|
-
className:
|
|
197
|
+
renderCell: V,
|
|
198
|
+
className: g.formsTableBody,
|
|
199
199
|
dataTestId: `forms-table-${a}`
|
|
200
200
|
}
|
|
201
201
|
)
|
|
@@ -203,17 +203,17 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
203
203
|
a
|
|
204
204
|
);
|
|
205
205
|
}) }) }),
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
T && t && /* @__PURE__ */ n(
|
|
207
|
+
Ae,
|
|
208
208
|
{
|
|
209
209
|
id: "modalIdForActionAreaLayout",
|
|
210
210
|
portalId: "main-display-area",
|
|
211
|
-
open:
|
|
211
|
+
open: T,
|
|
212
212
|
onRequestClose: w,
|
|
213
|
-
modalHeading: /* @__PURE__ */
|
|
213
|
+
modalHeading: /* @__PURE__ */ H("div", { className: g.modalHeading, children: [
|
|
214
214
|
/* @__PURE__ */ n("span", { children: t.formName }),
|
|
215
215
|
p && u(t) && /* @__PURE__ */ n(
|
|
216
|
-
|
|
216
|
+
q,
|
|
217
217
|
{
|
|
218
218
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
219
219
|
kind: "ghost",
|
|
@@ -231,7 +231,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
231
231
|
size: "md",
|
|
232
232
|
testId: "form-details-modal",
|
|
233
233
|
children: /* @__PURE__ */ n(
|
|
234
|
-
|
|
234
|
+
Ee,
|
|
235
235
|
{
|
|
236
236
|
observations: ee,
|
|
237
237
|
isLoading: X,
|
|
@@ -239,7 +239,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
239
239
|
errorMessage: re,
|
|
240
240
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
241
241
|
testIdPrefix: t.formName,
|
|
242
|
-
hideThumbnail:
|
|
242
|
+
hideThumbnail: x,
|
|
243
243
|
formName: t.formName
|
|
244
244
|
}
|
|
245
245
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { c3 as d, c4 as f, c5 as e } from "./index-
|
|
1
|
+
import { c as s, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-r4Lc-1Zs.js";
|
|
2
|
+
import { c3 as d, c4 as f, c5 as e } from "./index-CWrIj17R.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { c3 as v, c4 as C, c5 as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-r4Lc-1Zs.js";
|
|
2
|
+
import { c3 as v, c4 as C, c5 as e } from "./index-CWrIj17R.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { d as
|
|
1
|
+
import { jsxs as I, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { d as x, z as G, u as L, l as M, V as H, q as j, W, w as Y, n as J, o as P, p as X, r as Z, s as ee, $ as ae, t as se, v as B, x as te, B as re, h as ie, C as oe, D as ne, E as de, F as le } from "./index-CWrIj17R.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 V, 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
|
+
}, F = (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(
|
|
@@ -26,24 +26,24 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
26
26
|
hideThumbnail: t
|
|
27
27
|
}
|
|
28
28
|
)), p === "PDF" && (i = /* @__PURE__ */ n(le, { id: `${e}-pdf`, src: e }));
|
|
29
|
-
const m = /* @__PURE__ */
|
|
29
|
+
const m = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
30
30
|
/* @__PURE__ */ n("span", { children: r.header.display }),
|
|
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) => F(
|
|
58
58
|
e,
|
|
59
59
|
p,
|
|
60
60
|
c,
|
|
@@ -70,9 +70,9 @@ 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
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ I(
|
|
76
76
|
B,
|
|
77
77
|
{
|
|
78
78
|
title: p,
|
|
@@ -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) => F(
|
|
84
84
|
i,
|
|
85
85
|
m,
|
|
86
86
|
e,
|
|
@@ -116,13 +116,13 @@ 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,
|
|
123
123
|
o,
|
|
124
124
|
d
|
|
125
|
-
],
|
|
125
|
+
], Ie = ({
|
|
126
126
|
config: s,
|
|
127
127
|
episodeOfCareUuids: l,
|
|
128
128
|
encounterUuids: o
|
|
@@ -132,77 +132,77 @@ 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 = x(), { addNotification: m } = G(), { t: u } = L(), b = ue({
|
|
136
136
|
queries: c.map((a) => ({
|
|
137
|
-
queryKey:
|
|
137
|
+
queryKey: Re(a),
|
|
138
138
|
queryFn: () => M(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
const a = b.some((
|
|
142
|
+
V(() => {
|
|
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 = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", U = H(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
|
-
data:
|
|
155
|
-
isLoading:
|
|
156
|
-
isError:
|
|
154
|
+
data: _,
|
|
155
|
+
isLoading: w,
|
|
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
|
|
169
|
-
) :
|
|
169
|
+
) : W(
|
|
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 && !U
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
Y(
|
|
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
|
-
),
|
|
184
|
-
|
|
183
|
+
), V(() => {
|
|
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
190
|
const $ = g(() => {
|
|
191
|
-
if (!
|
|
192
|
-
let a =
|
|
193
|
-
e === "latest-encounter" && (a =
|
|
194
|
-
const y =
|
|
191
|
+
if (!_) return [];
|
|
192
|
+
let a = J(_);
|
|
193
|
+
e === "latest-encounter" && (a = P(a));
|
|
194
|
+
const y = X(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [
|
|
196
|
+
}, [_, e]), q = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A =
|
|
201
|
-
return /* @__PURE__ */
|
|
200
|
+
], A = w || !v, D = S && v, C = (!_ || _.entry?.length === 0 || h.length === 0) && v, K = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, k = C ? u("NO_OBSERVATIONS_FOUND") : void 0, z = $.length > 0 && !A && !D, T = d.titleTranslationKey, f = T ? u(T) : "";
|
|
201
|
+
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid":
|
|
205
|
+
"data-testid": T ? `observations-${f}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
207
|
className: O.observations,
|
|
208
208
|
children: [
|
|
@@ -210,28 +210,28 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId:
|
|
214
|
-
title:
|
|
213
|
+
testId: T ? `observations-title-${f}` : "observations-title",
|
|
214
|
+
title: f,
|
|
215
215
|
className: O.title,
|
|
216
|
-
children: /* @__PURE__ */ n("p", { children:
|
|
216
|
+
children: /* @__PURE__ */ n("p", { children: f })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
219
|
+
z ? /* @__PURE__ */ n(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
223
|
-
title:
|
|
223
|
+
title: f,
|
|
224
224
|
hideThumbnail: r
|
|
225
225
|
}
|
|
226
226
|
) : /* @__PURE__ */ n(
|
|
227
227
|
ae,
|
|
228
228
|
{
|
|
229
|
-
headers:
|
|
229
|
+
headers: q,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: u("OBSERVATIONS"),
|
|
232
232
|
loading: A,
|
|
233
|
-
errorStateMessage:
|
|
234
|
-
emptyStateMessage:
|
|
233
|
+
errorStateMessage: K,
|
|
234
|
+
emptyStateMessage: k ?? 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
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
Re as conceptUuidQueryKeys,
|
|
244
|
+
Ie as default,
|
|
245
|
+
_e as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c6 as we, c7 as z, c8 as xt, c9 as B, c4 as q, c5 as y, ca as Ro, cb as ye, cc as R, cd as _, ce as k, cf as N, cg as A, ch as bs, ci as ir, cj as $e, ck as G, cl as Hn, cm as Vn, cn as dt, co as D, cp as xs, cq as cn, cr as Be, cs as ws, ct as qt, cu as zt, cv as $s, cw as Cs, cx as $n, cy as Ss, cz as Nr, cA as Bt, cB as zo, cC as ks, cD as Es, cE as j, cF as Gr, cG as Ms, cH as Ds, cI as sr, cJ as As, cK as Ts, cL as zn, cM as Fs, cN as Is, cO as Z, cP as Ps, cQ as Ls } from "./index-
|
|
1
|
+
import { c6 as we, c7 as z, c8 as xt, c9 as B, c4 as q, c5 as y, ca as Ro, cb as ye, cc as R, cd as _, ce as k, cf as N, cg as A, ch as bs, ci as ir, cj as $e, ck as G, cl as Hn, cm as Vn, cn as dt, co as D, cp as xs, cq as cn, cr as Be, cs as ws, ct as qt, cu as zt, cv as $s, cw as Cs, cx as $n, cy as Ss, cz as Nr, cA as Bt, cB as zo, cC as ks, cD as Es, cE as j, cF as Gr, cG as Ms, cH as Ds, cI as sr, cJ as As, cK as Ts, cL as zn, cM as Fs, cN as Is, cO as Z, cP as Ps, cQ as Ls } from "./index-CWrIj17R.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { u as g, k as u, bQ as b, b_ as f, b$ as _, c0 as p, aO as x, bW as N } from "./index-
|
|
2
|
+
import { u as g, k as u, bQ as b, b_ as f, b$ as _, c0 as p, aO as x, bW as N } from "./index-CWrIj17R.js";
|
|
3
3
|
import { lazy as h, useMemo as t, Suspense as E } from "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
|
-
import { u as C } from "./hook-
|
|
5
|
+
import { u as C } from "./hook-CPfpyOdi.js";
|
|
6
6
|
const L = {
|
|
7
7
|
"org.bahmni.clinical.v2.search": h(
|
|
8
|
-
() => import("./index-
|
|
8
|
+
() => import("./index-DG_W9Zdm.js")
|
|
9
9
|
)
|
|
10
10
|
}, I = "index-module_page__16xxw", O = "index-module_loading__wNI-4", P = "index-module_message__Ib5Iw", l = {
|
|
11
11
|
page: I,
|