@bahmni/clinical-app 0.0.1-dev.407 → 0.0.1-dev.408
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-CTWwCFsm.js → ConsultationPage-CXlgXtX3.js} +247 -247
- package/dist/{DocumentsTable-CIJwgXmb-875UEKW0.js → DocumentsTable-BSBWfrYe-Ciu2xFXn.js} +11 -11
- package/dist/{FormsTable-DMPfuqmY-B2f5iV-l.js → FormsTable-D8eS1feV-D-x33gvI.js} +39 -39
- package/dist/{LNWAZHJI-BGFtgQ5u.js → LNWAZHJI-CDOz43Mm.js} +2 -2
- package/dist/{MWZ6AO7Z-DjrISeAa.js → MWZ6AO7Z-B-xclr74.js} +2 -2
- package/dist/{Observations-BflI1_YX-Cn0QF4T8.js → Observations-CbJng7Yn-BY-Iz7zt.js} +66 -66
- package/dist/{YPM2AS64-CQLElo0h.js → YPM2AS64-CfS8GmAE.js} +1 -1
- package/dist/{hook-BHuXXaPS.js → hook-ZFTGrxft.js} +1 -1
- package/dist/{index-Dw9o1Yxj.js → index-B-n9uW0s.js} +1 -1
- package/dist/{index-B-RvOors.js → index-B2fx8cxV.js} +3 -3
- package/dist/{index-C-cFWAl8.js → index-BEwvzERM.js} +27676 -27653
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as r, jsxs as p, Fragment as
|
|
2
|
-
import { v as
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { v as x, u as G, z as W, t as J, q as X, w as Z, Y as ee, p as te } from "./index-BEwvzERM.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as h, useEffect as I, useMemo as _ } from "react";
|
|
5
5
|
const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
|
|
@@ -38,7 +38,7 @@ const Te = [
|
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), g =
|
|
41
|
+
), g = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [q, A] = l(void 0), M = h((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
43
|
}, []), F = h(() => {
|
|
44
44
|
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
@@ -53,7 +53,7 @@ const Te = [
|
|
|
53
53
|
u
|
|
54
54
|
],
|
|
55
55
|
enabled: !!g,
|
|
56
|
-
queryFn: () =>
|
|
56
|
+
queryFn: () => J(
|
|
57
57
|
g,
|
|
58
58
|
E,
|
|
59
59
|
u,
|
|
@@ -97,7 +97,7 @@ const Te = [
|
|
|
97
97
|
), N = _(
|
|
98
98
|
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
),
|
|
100
|
+
), j = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), P = _(() => ie(N, n), [N, n]), K = _(
|
|
101
101
|
() => N.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "attachments"
|
|
@@ -106,7 +106,7 @@ const Te = [
|
|
|
106
106
|
), T = _(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
|
-
),
|
|
109
|
+
), Q = h(
|
|
110
110
|
(e, t) => {
|
|
111
111
|
switch (t) {
|
|
112
112
|
case "documentIdentifier":
|
|
@@ -137,18 +137,18 @@ const Te = [
|
|
|
137
137
|
},
|
|
138
138
|
[M, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */ p(
|
|
140
|
+
return /* @__PURE__ */ p(Y, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
144
|
-
headers:
|
|
144
|
+
headers: P,
|
|
145
145
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
146
|
-
rows:
|
|
146
|
+
rows: j,
|
|
147
147
|
loading: H,
|
|
148
148
|
errorStateMessage: y ? b?.message : null,
|
|
149
|
-
sortable:
|
|
149
|
+
sortable: K,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
151
|
-
renderCell:
|
|
151
|
+
renderCell: Q,
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as i, jsxs as P, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import { u as ge, v as be, e as Oe, a as Ne, b as Te,
|
|
2
|
+
import { u as ge, v as be, e as Oe, a as Ne, b as Te, c as Ie, f as Ae, Q as Ee, d as ve, m as _e, g as Fe, o as Se, S as Q, w as Be, A as $, V as x, q as Me, Y as G, P as Re, F as Ce, p as Le, h as Ue, i as De } from "./index-BEwvzERM.js";
|
|
3
3
|
import { useQueryClient as ke, useQuery as N } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as Y, useMemo as d, useCallback as c } from "react";
|
|
5
5
|
const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", Ve = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
6
|
formsTableBody: qe,
|
|
7
7
|
modalHeading: we,
|
|
8
8
|
customAccordianItem: Ve
|
|
9
|
-
}, He = "startConsultation",
|
|
10
|
-
episodeOfCareUuids:
|
|
9
|
+
}, He = "startConsultation", Qe = ({
|
|
10
|
+
episodeOfCareUuids: B,
|
|
11
11
|
encounterUuids: m,
|
|
12
12
|
config: X,
|
|
13
13
|
disableActions: Z = !1,
|
|
14
|
-
activeEncounterUuid:
|
|
14
|
+
activeEncounterUuid: p = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } = ge(), u = be(), [y,
|
|
16
|
+
const { t: n } = ge(), u = be(), [y, M] = Y(!1), [s, R] = Y(null), {
|
|
17
17
|
numberOfVisits: J,
|
|
18
18
|
hideThumbnail: W = !1,
|
|
19
19
|
forms: g
|
|
20
20
|
} = X ?? {}, ee = Oe(
|
|
21
21
|
De.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: b } = Ne(), I = ee && !Z && !!
|
|
23
|
-
|
|
22
|
+
), { userPrivileges: b } = Ne(), I = ee && !Z && !!p, C = Te(
|
|
23
|
+
B,
|
|
24
24
|
m
|
|
25
25
|
), re = ke(), {
|
|
26
26
|
data: L = [],
|
|
@@ -29,7 +29,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = N({
|
|
32
|
-
queryKey: ["forms", u,
|
|
32
|
+
queryKey: ["forms", u, B],
|
|
33
33
|
queryFn: () => Ie(u, void 0, J),
|
|
34
34
|
enabled: !!u && !C
|
|
35
35
|
}), k = d(() => {
|
|
@@ -54,8 +54,8 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
54
54
|
},
|
|
55
55
|
[O, b]
|
|
56
56
|
), f = c(
|
|
57
|
-
(e) => !
|
|
58
|
-
[
|
|
57
|
+
(e) => !p || e.encounterUuid !== p ? !1 : q(e.formName),
|
|
58
|
+
[p, q]
|
|
59
59
|
), w = c(
|
|
60
60
|
(e) => O.find((r) => r.name === e)?.uuid,
|
|
61
61
|
[O]
|
|
@@ -125,22 +125,22 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
125
125
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
126
126
|
}, [l]), ue = d(() => {
|
|
127
127
|
if (E)
|
|
128
|
-
return
|
|
128
|
+
return Q(E).message;
|
|
129
129
|
if (_)
|
|
130
|
-
return
|
|
131
|
-
}, [E, _]),
|
|
130
|
+
return Q(_).message;
|
|
131
|
+
}, [E, _]), h = d(
|
|
132
132
|
() => [
|
|
133
133
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
134
134
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
135
135
|
],
|
|
136
136
|
[n]
|
|
137
137
|
), V = d(
|
|
138
|
-
() => [...
|
|
139
|
-
[
|
|
138
|
+
() => [...h, { key: "actions", header: n("ACTIONS") }],
|
|
139
|
+
[h, n]
|
|
140
140
|
), fe = c(
|
|
141
|
-
(e) => I && e.some((r) => f(r)) ? V :
|
|
142
|
-
[I, f, V,
|
|
143
|
-
),
|
|
141
|
+
(e) => I && e.some((r) => f(r)) ? V : h,
|
|
142
|
+
[I, f, V, h]
|
|
143
|
+
), he = h, pe = d(
|
|
144
144
|
() => [
|
|
145
145
|
{ key: "recordedOn", sortable: !0 },
|
|
146
146
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -155,7 +155,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
155
155
|
return r[t].push({
|
|
156
156
|
id: o.encounterUuid,
|
|
157
157
|
formName: o.formName,
|
|
158
|
-
recordedOn:
|
|
158
|
+
recordedOn: Be(o.encounterDateTime, n, !0).formattedResult,
|
|
159
159
|
recordedBy: a ?? "--",
|
|
160
160
|
encounterDateTime: o.encounterDateTime,
|
|
161
161
|
encounterUuid: o.encounterUuid
|
|
@@ -171,10 +171,10 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
171
171
|
)
|
|
172
172
|
})
|
|
173
173
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
174
|
-
}, [k, n]),
|
|
175
|
-
|
|
176
|
-
}, []),
|
|
177
|
-
|
|
174
|
+
}, [k, n]), j = c((e) => {
|
|
175
|
+
R(e), M(!0);
|
|
176
|
+
}, []), z = c(() => {
|
|
177
|
+
M(!1), R(null);
|
|
178
178
|
}, []), F = c((e) => {
|
|
179
179
|
globalThis.dispatchEvent(
|
|
180
180
|
new CustomEvent(He, {
|
|
@@ -187,46 +187,46 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
187
187
|
}
|
|
188
188
|
})
|
|
189
189
|
);
|
|
190
|
-
}, []),
|
|
190
|
+
}, []), K = c(
|
|
191
191
|
(e, r) => {
|
|
192
192
|
switch (r) {
|
|
193
193
|
case "recordedOn":
|
|
194
|
-
return /* @__PURE__ */ i(
|
|
194
|
+
return /* @__PURE__ */ i(Me, { onClick: () => j(e), children: e.recordedOn });
|
|
195
195
|
case "recordedBy":
|
|
196
196
|
return e.recordedBy;
|
|
197
197
|
case "actions":
|
|
198
198
|
return f(e) ? /* @__PURE__ */ i(
|
|
199
|
-
|
|
199
|
+
$,
|
|
200
200
|
{
|
|
201
201
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
202
202
|
kind: "ghost",
|
|
203
203
|
size: "sm",
|
|
204
204
|
testId: `edit-form-${e.encounterUuid}`,
|
|
205
205
|
onClick: () => F(e),
|
|
206
|
-
children: /* @__PURE__ */ i(
|
|
206
|
+
children: /* @__PURE__ */ i(x, {})
|
|
207
207
|
}
|
|
208
208
|
) : null;
|
|
209
209
|
default:
|
|
210
210
|
return null;
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
|
-
[
|
|
213
|
+
[j, F, f, n]
|
|
214
214
|
);
|
|
215
215
|
return /* @__PURE__ */ P(ye, { children: [
|
|
216
216
|
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || H.length === 0 || C ? /* @__PURE__ */ i(
|
|
217
217
|
G,
|
|
218
218
|
{
|
|
219
|
-
headers:
|
|
219
|
+
headers: he,
|
|
220
220
|
ariaLabel: n("FORMS_HEADING"),
|
|
221
221
|
rows: [],
|
|
222
222
|
loading: U,
|
|
223
223
|
errorStateMessage: D ? oe?.message : void 0,
|
|
224
224
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
225
|
-
renderCell:
|
|
225
|
+
renderCell: K,
|
|
226
226
|
className: T.formsTableBody,
|
|
227
227
|
dataTestId: "forms-table"
|
|
228
228
|
}
|
|
229
|
-
) : /* @__PURE__ */ i(
|
|
229
|
+
) : /* @__PURE__ */ i(Re, { align: "start", children: H.map((e, r) => {
|
|
230
230
|
const { formName: o, records: t } = e, a = fe(t);
|
|
231
231
|
return /* @__PURE__ */ i(
|
|
232
232
|
Ce,
|
|
@@ -243,9 +243,9 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
243
243
|
rows: t,
|
|
244
244
|
loading: !1,
|
|
245
245
|
errorStateMessage: "",
|
|
246
|
-
sortable:
|
|
246
|
+
sortable: pe,
|
|
247
247
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
248
|
-
renderCell:
|
|
248
|
+
renderCell: K,
|
|
249
249
|
className: T.formsTableBody,
|
|
250
250
|
dataTestId: `forms-table-${o}`
|
|
251
251
|
}
|
|
@@ -260,20 +260,20 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
260
260
|
id: "modalIdForActionAreaLayout",
|
|
261
261
|
portalId: "main-display-area",
|
|
262
262
|
open: y,
|
|
263
|
-
onRequestClose:
|
|
263
|
+
onRequestClose: z,
|
|
264
264
|
modalHeading: /* @__PURE__ */ P("div", { className: T.modalHeading, children: [
|
|
265
265
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
266
266
|
I && f(s) && /* @__PURE__ */ i(
|
|
267
|
-
|
|
267
|
+
$,
|
|
268
268
|
{
|
|
269
269
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
270
270
|
kind: "ghost",
|
|
271
271
|
size: "sm",
|
|
272
272
|
testId: `edit-form-modal-${s.encounterUuid}`,
|
|
273
273
|
onClick: () => {
|
|
274
|
-
|
|
274
|
+
z(), F(s);
|
|
275
275
|
},
|
|
276
|
-
children: /* @__PURE__ */ i(
|
|
276
|
+
children: /* @__PURE__ */ i(x, {})
|
|
277
277
|
}
|
|
278
278
|
)
|
|
279
279
|
] }),
|
|
@@ -301,5 +301,5 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
301
301
|
] });
|
|
302
302
|
};
|
|
303
303
|
export {
|
|
304
|
-
|
|
304
|
+
Qe as default
|
|
305
305
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { bY as d, bZ as f, b_ as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CfS8GmAE.js";
|
|
2
|
+
import { bY as d, bZ as f, b_ as e } from "./index-BEwvzERM.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
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 { bY as v, bZ as C, b_ 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-CfS8GmAE.js";
|
|
2
|
+
import { bY as v, bZ as C, b_ as e } from "./index-BEwvzERM.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { v as
|
|
1
|
+
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { v as x, z as k, u as N, J as q, X as M, m as z, j as Q, k as j, l as w, n as G, Y as H, s as J, O as L, r as Y, L as P, x as X, M as W, y as Z, B as ee } from "./index-BEwvzERM.js";
|
|
3
3
|
import { useQueries as ae, useQuery as re } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as
|
|
5
|
-
const
|
|
6
|
-
const r =
|
|
7
|
-
let i =
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { useRef as se, useEffect as f, useMemo as O } from "react";
|
|
5
|
+
const A = (a, n, d, l, b, o) => {
|
|
6
|
+
const r = Y(a, n, b), s = r.value, t = P(s);
|
|
7
|
+
let i = s;
|
|
8
|
+
t === "Image" && (i = /* @__PURE__ */ u(
|
|
9
|
+
W,
|
|
10
10
|
{
|
|
11
|
-
imageSrc:
|
|
12
|
-
alt:
|
|
13
|
-
id: `${
|
|
11
|
+
imageSrc: s,
|
|
12
|
+
alt: s,
|
|
13
|
+
id: `${s}-img`,
|
|
14
14
|
hideThumbnail: o
|
|
15
15
|
}
|
|
16
|
-
)),
|
|
16
|
+
)), t === "Video" && (i = /* @__PURE__ */ u(
|
|
17
17
|
Z,
|
|
18
18
|
{
|
|
19
|
-
id: `${
|
|
20
|
-
videoSrc:
|
|
19
|
+
id: `${s}-video`,
|
|
20
|
+
videoSrc: s,
|
|
21
21
|
hideThumbnail: o
|
|
22
22
|
}
|
|
23
|
-
)),
|
|
23
|
+
)), t === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
24
|
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: r.provider
|
|
26
|
-
}), p = a.display,
|
|
26
|
+
}), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
X,
|
|
29
29
|
{
|
|
30
30
|
header: r.header,
|
|
31
31
|
value: i,
|
|
@@ -36,16 +36,16 @@ const L = (a, n, d, l, b, o) => {
|
|
|
36
36
|
},
|
|
37
37
|
`obs-${a.id}`
|
|
38
38
|
);
|
|
39
|
-
},
|
|
40
|
-
|
|
39
|
+
}, te = (a, n, d, l, b, o, r) => /* @__PURE__ */ u(
|
|
40
|
+
L,
|
|
41
41
|
{
|
|
42
42
|
title: a.display,
|
|
43
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: a.members?.map(
|
|
46
|
-
(
|
|
47
|
-
t,
|
|
46
|
+
(s, t) => A(
|
|
48
47
|
s,
|
|
48
|
+
t,
|
|
49
49
|
b,
|
|
50
50
|
o,
|
|
51
51
|
n,
|
|
@@ -59,32 +59,32 @@ const L = (a, n, d, l, b, o) => {
|
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } = N(), b = (o, r,
|
|
63
|
-
const
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
62
|
+
const { t: l } = N(), b = (o, r, s) => {
|
|
63
|
+
const t = J(o.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ S(
|
|
65
|
+
L,
|
|
66
66
|
{
|
|
67
|
-
title:
|
|
67
|
+
title: t,
|
|
68
68
|
id: `encounter-${o.encounterId}`,
|
|
69
69
|
open: r,
|
|
70
70
|
children: [
|
|
71
71
|
o.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => A(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
|
-
|
|
75
|
+
s,
|
|
76
76
|
n,
|
|
77
77
|
l,
|
|
78
78
|
d
|
|
79
79
|
)
|
|
80
80
|
),
|
|
81
81
|
o.groupedObservations.map(
|
|
82
|
-
(i, m) =>
|
|
82
|
+
(i, m) => te(
|
|
83
83
|
i,
|
|
84
84
|
l,
|
|
85
85
|
r,
|
|
86
86
|
m,
|
|
87
|
-
|
|
87
|
+
s,
|
|
88
88
|
n,
|
|
89
89
|
d
|
|
90
90
|
)
|
|
@@ -105,7 +105,7 @@ const L = (a, n, d, l, b, o) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z",
|
|
108
|
+
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", $ = {
|
|
109
109
|
observations: ie,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
@@ -113,92 +113,92 @@ const L = (a, n, d, l, b, o) => {
|
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, o =
|
|
116
|
+
} = n, o = se(/* @__PURE__ */ new Set()), r = x(), { addNotification: s } = k(), { t } = N(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => q(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
f(() => {
|
|
124
|
-
i.forEach((e,
|
|
125
|
-
if (e.isError && !o.current.has(
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
title:
|
|
129
|
-
message:
|
|
124
|
+
i.forEach((e, h) => {
|
|
125
|
+
if (e.isError && !o.current.has(h)) {
|
|
126
|
+
const K = d[h];
|
|
127
|
+
s({
|
|
128
|
+
title: t("ERROR_DEFAULT_TITLE"),
|
|
129
|
+
message: t("ERROR_FETCHING_CONCEPT", { conceptName: K }),
|
|
130
130
|
type: "error"
|
|
131
|
-
}), o.current.add(
|
|
132
|
-
} else e.isError || o.current.delete(
|
|
131
|
+
}), o.current.add(h);
|
|
132
|
+
} else e.isError || o.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m = O(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = O(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]),
|
|
135
|
+
const m = O(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = O(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = O(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: B,
|
|
138
138
|
isError: T,
|
|
139
139
|
refetch: R
|
|
140
140
|
} = re({
|
|
141
141
|
queryKey: le(r, p),
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!r && p.length > 0 &&
|
|
142
|
+
queryFn: () => M(r, p),
|
|
143
|
+
enabled: !!r && p.length > 0 && y
|
|
144
144
|
});
|
|
145
145
|
z(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === r && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
|
-
(
|
|
148
|
+
(h) => p.includes(h)
|
|
149
149
|
) && R();
|
|
150
150
|
},
|
|
151
151
|
[r, R]
|
|
152
152
|
), f(() => {
|
|
153
|
-
T &&
|
|
154
|
-
title:
|
|
155
|
-
message:
|
|
153
|
+
T && s({
|
|
154
|
+
title: t("ERROR_DEFAULT_TITLE"),
|
|
155
|
+
message: t("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [T]);
|
|
159
|
-
const
|
|
159
|
+
const g = O(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e = Q(c),
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = Q(c), h = j(e);
|
|
162
|
+
return w(h);
|
|
163
|
+
}, [c]), D = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], I = B || !y, _ = T && y, F = (!c || c.entry?.length === 0 || p.length === 0) && y, V = _ ? t("ERROR_FETCHING_OBSERVATIONS") : null, U = F ? t("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !I && !_, E = n.titleTranslationKey, v = E ? t(E) : "";
|
|
168
|
+
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
172
|
"data-testid": E ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
|
-
className:
|
|
174
|
+
className: $.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
G,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
181
181
|
title: v,
|
|
182
|
-
className:
|
|
182
|
+
className: $.title,
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
C ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: g,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
H,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: D,
|
|
197
197
|
rows: [],
|
|
198
|
-
ariaLabel:
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
198
|
+
ariaLabel: t("OBSERVATIONS"),
|
|
199
|
+
loading: I,
|
|
200
|
+
errorStateMessage: V,
|
|
201
|
+
emptyStateMessage: U ?? t("NO_OBSERVATIONS_AVAILABLE"),
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b$ as we, c0 as z, c1 as xt, c2 as B, bZ as q, b_ as y, c3 as Ro, c4 as ye, c5 as R, c6 as _, c7 as k, c8 as N, c9 as A, ca as bs, cb as ir, cc as $e, cd as G, ce as Hn, cf as Vn, cg as dt, ch as D, ci as xs, cj as cn, ck as Be, cl as ws, cm as qt, cn as zt, co as $s, cp as Cs, cq as $n, cr as Ss, cs as Nr, ct as Bt, cu as zo, cv as ks, cw as Es, cx as j, cy as Gr, cz as Ms, cA as Ds, cB as sr, cC as As, cD as Ts, cE as zn, cF as Fs, cG as Is, cH as Z, cI as Ps, cJ as Ls } from "./index-
|
|
1
|
+
import { b$ as we, c0 as z, c1 as xt, c2 as B, bZ as q, b_ as y, c3 as Ro, c4 as ye, c5 as R, c6 as _, c7 as k, c8 as N, c9 as A, ca as bs, cb as ir, cc as $e, cd as G, ce as Hn, cf as Vn, cg as dt, ch as D, ci as xs, cj as cn, ck as Be, cl as ws, cm as qt, cn as zt, co as $s, cp as Cs, cq as $n, cr as Ss, cs as Nr, ct as Bt, cu as zo, cv as ks, cw as Es, cx as j, cy as Gr, cz as Ms, cA as Ds, cB as sr, cC as As, cD as Ts, cE as zn, cF as Fs, cG as Is, cH as Z, cI as Ps, cJ as Ls } from "./index-BEwvzERM.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { u as r, cK as l, cL as o, cM as c, b9 as m, ba as g, cN as h, cO as p, cP as b, aH as u } from "./index-
|
|
2
|
+
import { u as r, cK as l, cL as o, cM as c, b9 as m, ba as g, cN as h, cO as p, cP as b, aH as u } from "./index-BEwvzERM.js";
|
|
3
3
|
import { Suspense as _ } from "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
5
|
const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y = "index-module_panel__8VJh2", s = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { u as g, a as u, bJ as b, bT as f, bU as x, bV as p, aH as _, bP as N } from "./index-
|
|
2
|
+
import { u as g, a as u, bJ as b, bT as f, bU as x, bV as p, aH as _, bP as N } from "./index-BEwvzERM.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-ZFTGrxft.js";
|
|
6
6
|
const L = {
|
|
7
7
|
"org.bahmni.clinical.v2.search": h(
|
|
8
|
-
() => import("./index-
|
|
8
|
+
() => import("./index-B-n9uW0s.js")
|
|
9
9
|
)
|
|
10
10
|
}, v = "index-module_page__16xxw", P = "index-module_loading__wNI-4", H = "index-module_message__Ib5Iw", l = {
|
|
11
11
|
page: v,
|