@bahmni/clinical-app 0.0.1-dev.339 → 0.0.1-dev.340
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/App.d.ts.map +1 -1
- package/dist/{ConsultationPage-CkIs95Tn.js → ConsultationPage-DV_rAqfb.js} +5068 -5081
- package/dist/{DocumentsTable-Cq55el4h-BI6aCptF.js → DocumentsTable-DLUCAqub-7MZ-jtOy.js} +7 -7
- package/dist/{FormsTable-DJJY3k8g-D4eZkTIH.js → FormsTable-DfcTBBcW-B3syUNtU.js} +58 -58
- package/dist/{LNWAZHJI-DEcVRHsU.js → LNWAZHJI-CnWQSbaJ.js} +2 -2
- package/dist/{MWZ6AO7Z-bMcj2-MT.js → MWZ6AO7Z-DJMaWAVS.js} +2 -2
- package/dist/{Observations-CHGrTi3--mevsjjwd.js → Observations-d1dtuDfC-DE0z3sj5.js} +32 -32
- package/dist/{YPM2AS64-I_HerEew.js → YPM2AS64-B8CC0TXw.js} +1 -1
- package/dist/{hook-DEiGaCdw.js → hook-DcaYKufJ.js} +1 -1
- package/dist/{index-CB8k8eHO.js → index-BLDgLL29.js} +8 -8
- package/dist/{index-DisMlvZ8.js → index-CMVp6iIP.js} +19 -19
- package/dist/{index-CY5LDnxk.js → index-CahBjLsU.js} +33444 -33310
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +3 -0
- package/dist/locales/locale_es.json +3 -0
- package/dist/pages/ConsultationPage.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { l as G, u as W, B as Y,
|
|
2
|
+
import { l as G, u as W, B as Y, E as J, j as X, a as Z, S as ee, m as te } from "./index-CahBjLsU.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as c, useCallback as _, useEffect as I, useMemo as p } 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", le = "DocumentsTable-module_documentIframe__ptq5I", ce = "DocumentsTable-module_documentImage__KQVgS", d = {
|
|
@@ -40,11 +40,11 @@ const Te = [
|
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
41
|
), g = G(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = c(1), [u, V] = c(k), [F, A] = c(void 0), M = _((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
|
-
}, []),
|
|
43
|
+
}, []), j = _(() => {
|
|
44
44
|
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
45
45
|
}, []), v = _((e) => {
|
|
46
46
|
O((t) => new Set(t).add(e));
|
|
47
|
-
}, []), { data: i, isLoading:
|
|
47
|
+
}, []), { data: i, isLoading: H, isError: b, error: y } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
50
50
|
g,
|
|
@@ -97,7 +97,7 @@ const Te = [
|
|
|
97
97
|
), N = p(
|
|
98
98
|
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
),
|
|
100
|
+
), P = p(() => [...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]), z = p(() => ie(N, n), [N, n]), K = p(
|
|
101
101
|
() => N.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "attachments"
|
|
@@ -143,8 +143,8 @@ const Te = [
|
|
|
143
143
|
{
|
|
144
144
|
headers: z,
|
|
145
145
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
146
|
-
rows:
|
|
147
|
-
loading:
|
|
146
|
+
rows: P,
|
|
147
|
+
loading: H,
|
|
148
148
|
errorStateMessage: b ? y?.message : null,
|
|
149
149
|
sortable: K,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
@@ -163,7 +163,7 @@ const Te = [
|
|
|
163
163
|
id: "modalIdForActionAreaLayout",
|
|
164
164
|
portalId: "main-display-area",
|
|
165
165
|
open: s,
|
|
166
|
-
onRequestClose:
|
|
166
|
+
onRequestClose: j,
|
|
167
167
|
modalHeading: o.documentIdentifier,
|
|
168
168
|
passiveModal: !0,
|
|
169
169
|
size: "lg",
|
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import { jsx as i, jsxs as re, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
import { u as ae, l as se,
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as
|
|
2
|
+
import { u as ae, l as se, k as te, v as ne, N as de, g as ie, w as me, K as le, x as ce, Z as q, a as ue, j as fe, S as k, L as ye, R as he, m as be, H as ge } from "./index-CahBjLsU.js";
|
|
3
|
+
import { useQueryClient as pe, useQuery as y } from "@tanstack/react-query";
|
|
4
|
+
import { useState as w, useMemo as d, useCallback as h } from "react";
|
|
5
5
|
const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", A = {
|
|
6
6
|
formsTableBody: Ne,
|
|
7
7
|
customAccordianItem: Oe
|
|
8
|
-
},
|
|
9
|
-
episodeOfCareUuids:
|
|
8
|
+
}, ve = ({
|
|
9
|
+
episodeOfCareUuids: I,
|
|
10
10
|
encounterUuids: l,
|
|
11
|
-
config:
|
|
11
|
+
config: H
|
|
12
12
|
}) => {
|
|
13
|
-
const { t: n } = ae(), c = se(), [u,
|
|
14
|
-
numberOfVisits:
|
|
13
|
+
const { t: n } = ae(), c = se(), [u, L] = w(!1), [s, T] = w(null), {
|
|
14
|
+
numberOfVisits: K,
|
|
15
15
|
hideThumbnail: j = !1,
|
|
16
16
|
forms: f
|
|
17
|
-
} =
|
|
18
|
-
|
|
17
|
+
} = H ?? {}, v = te(
|
|
18
|
+
I,
|
|
19
19
|
l
|
|
20
|
-
), x =
|
|
20
|
+
), x = pe(), {
|
|
21
21
|
data: B = [],
|
|
22
22
|
isLoading: F,
|
|
23
23
|
isError: S,
|
|
24
24
|
error: G,
|
|
25
|
-
refetch:
|
|
25
|
+
refetch: V
|
|
26
26
|
} = y({
|
|
27
|
-
queryKey: ["forms", c,
|
|
28
|
-
queryFn: () => ne(c, void 0,
|
|
29
|
-
enabled: !!c && !
|
|
30
|
-
}),
|
|
27
|
+
queryKey: ["forms", c, I],
|
|
28
|
+
queryFn: () => ne(c, void 0, K),
|
|
29
|
+
enabled: !!c && !v
|
|
30
|
+
}), E = d(() => {
|
|
31
31
|
let e = B;
|
|
32
32
|
return l && l.length > 0 && (e = e.filter(
|
|
33
33
|
(r) => l.includes(r.encounterUuid)
|
|
34
34
|
)), Array.isArray(f) && f.length > 0 && (e = e.filter(
|
|
35
35
|
(r) => f.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
36
36
|
)), e;
|
|
37
|
-
}, [B, l, f]), { data:
|
|
37
|
+
}, [B, l, f]), { data: M = [] } = y({
|
|
38
38
|
queryKey: ["observationForms"],
|
|
39
39
|
queryFn: () => de()
|
|
40
|
-
}),
|
|
41
|
-
(e) =>
|
|
42
|
-
[
|
|
43
|
-
),
|
|
40
|
+
}), R = h(
|
|
41
|
+
(e) => M.find((r) => r.name === e)?.uuid,
|
|
42
|
+
[M]
|
|
43
|
+
), b = d(() => {
|
|
44
44
|
if (s)
|
|
45
|
-
return
|
|
46
|
-
}, [s,
|
|
45
|
+
return R(s.formName);
|
|
46
|
+
}, [s, R]), {
|
|
47
47
|
data: m,
|
|
48
48
|
isLoading: $,
|
|
49
49
|
isError: z,
|
|
50
|
-
error:
|
|
50
|
+
error: g
|
|
51
51
|
} = y({
|
|
52
|
-
queryKey: ["formMetadata",
|
|
53
|
-
queryFn: () => ie(
|
|
54
|
-
enabled: !!
|
|
52
|
+
queryKey: ["formMetadata", b],
|
|
53
|
+
queryFn: () => ie(b),
|
|
54
|
+
enabled: !!b && u
|
|
55
55
|
}), {
|
|
56
|
-
data:
|
|
57
|
-
isLoading:
|
|
58
|
-
isError:
|
|
56
|
+
data: p,
|
|
57
|
+
isLoading: Q,
|
|
58
|
+
isError: Z,
|
|
59
59
|
error: N
|
|
60
60
|
} = y({
|
|
61
61
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
@@ -64,14 +64,14 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
64
64
|
});
|
|
65
65
|
le(
|
|
66
66
|
(e) => {
|
|
67
|
-
e.patientUUID === c && e.updatedConcepts.size > 0 && (
|
|
67
|
+
e.patientUUID === c && e.updatedConcepts.size > 0 && (V(), x.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
68
68
|
},
|
|
69
69
|
[c]
|
|
70
70
|
);
|
|
71
|
-
const
|
|
71
|
+
const P = d(() => !p?.entry || !s?.formName ? [] : p.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
72
72
|
const r = ce(e);
|
|
73
73
|
return !r || r.includes(s.formName);
|
|
74
|
-
}), [
|
|
74
|
+
}), [p, s?.formName]), Y = d(() => {
|
|
75
75
|
if (!m?.schema) return;
|
|
76
76
|
const e = [], r = (o) => {
|
|
77
77
|
(o ?? []).forEach((t) => {
|
|
@@ -97,11 +97,11 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
97
97
|
null
|
|
98
98
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
99
99
|
}, [m]), W = d(() => {
|
|
100
|
-
if (
|
|
101
|
-
return q(
|
|
100
|
+
if (g)
|
|
101
|
+
return q(g).message;
|
|
102
102
|
if (N)
|
|
103
103
|
return q(N).message;
|
|
104
|
-
}, [
|
|
104
|
+
}, [g, N]), _ = d(
|
|
105
105
|
() => [
|
|
106
106
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
107
107
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
@@ -113,8 +113,8 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
113
113
|
{ key: "recordedBy", sortable: !0 }
|
|
114
114
|
],
|
|
115
115
|
[]
|
|
116
|
-
),
|
|
117
|
-
const e =
|
|
116
|
+
), C = d(() => {
|
|
117
|
+
const e = E.reduce(
|
|
118
118
|
(r, o) => {
|
|
119
119
|
const t = o.formName;
|
|
120
120
|
r[t] ??= [];
|
|
@@ -138,28 +138,28 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
138
138
|
)
|
|
139
139
|
})
|
|
140
140
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
141
|
-
}, [
|
|
142
|
-
|
|
143
|
-
}, []), ee =
|
|
144
|
-
|
|
145
|
-
}, []), U =
|
|
141
|
+
}, [E, n]), D = h((e) => {
|
|
142
|
+
T(e), L(!0);
|
|
143
|
+
}, []), ee = h(() => {
|
|
144
|
+
L(!1), T(null);
|
|
145
|
+
}, []), U = h(
|
|
146
146
|
(e, r) => {
|
|
147
147
|
switch (r) {
|
|
148
148
|
case "recordedOn":
|
|
149
|
-
return /* @__PURE__ */ i(fe, { onClick: () =>
|
|
149
|
+
return /* @__PURE__ */ i(fe, { onClick: () => D(e), children: e.recordedOn });
|
|
150
150
|
case "recordedBy":
|
|
151
151
|
return e.recordedBy;
|
|
152
152
|
default:
|
|
153
153
|
return null;
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
|
-
[
|
|
156
|
+
[D]
|
|
157
157
|
);
|
|
158
158
|
return /* @__PURE__ */ re(oe, { children: [
|
|
159
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: F || S ||
|
|
160
|
-
|
|
159
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: F || S || C.length === 0 || v ? /* @__PURE__ */ i(
|
|
160
|
+
k,
|
|
161
161
|
{
|
|
162
|
-
headers:
|
|
162
|
+
headers: _,
|
|
163
163
|
ariaLabel: n("FORMS_HEADING"),
|
|
164
164
|
rows: [],
|
|
165
165
|
loading: F,
|
|
@@ -169,19 +169,19 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
169
169
|
className: A.formsTableBody,
|
|
170
170
|
dataTestId: "forms-table"
|
|
171
171
|
}
|
|
172
|
-
) : /* @__PURE__ */ i(ye, { align: "start", children:
|
|
172
|
+
) : /* @__PURE__ */ i(ye, { align: "start", children: C.map((e, r) => {
|
|
173
173
|
const { formName: o, records: t } = e;
|
|
174
174
|
return /* @__PURE__ */ i(
|
|
175
|
-
|
|
175
|
+
he,
|
|
176
176
|
{
|
|
177
177
|
title: o,
|
|
178
178
|
className: A.customAccordianItem,
|
|
179
179
|
testId: `accordian-title-${o}`,
|
|
180
180
|
open: r === 0,
|
|
181
181
|
children: /* @__PURE__ */ i(
|
|
182
|
-
|
|
182
|
+
k,
|
|
183
183
|
{
|
|
184
|
-
headers:
|
|
184
|
+
headers: _,
|
|
185
185
|
ariaLabel: n("FORMS_HEADING"),
|
|
186
186
|
rows: t,
|
|
187
187
|
loading: !1,
|
|
@@ -198,7 +198,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
198
198
|
);
|
|
199
199
|
}) }) }),
|
|
200
200
|
u && s && /* @__PURE__ */ i(
|
|
201
|
-
|
|
201
|
+
be,
|
|
202
202
|
{
|
|
203
203
|
id: "modalIdForActionAreaLayout",
|
|
204
204
|
portalId: "main-display-area",
|
|
@@ -210,11 +210,11 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
210
210
|
size: "md",
|
|
211
211
|
testId: "form-details-modal",
|
|
212
212
|
children: /* @__PURE__ */ i(
|
|
213
|
-
|
|
213
|
+
ge,
|
|
214
214
|
{
|
|
215
|
-
observations:
|
|
216
|
-
isLoading: $ ||
|
|
217
|
-
isError: z ||
|
|
215
|
+
observations: P,
|
|
216
|
+
isLoading: $ || Q,
|
|
217
|
+
isError: z || Z,
|
|
218
218
|
errorMessage: W,
|
|
219
219
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
220
220
|
testIdPrefix: s.formName,
|
|
@@ -228,5 +228,5 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
228
228
|
] });
|
|
229
229
|
};
|
|
230
230
|
export {
|
|
231
|
-
|
|
231
|
+
ve as default
|
|
232
232
|
};
|
|
@@ -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 {
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-B8CC0TXw.js";
|
|
2
|
+
import { bI as d, bJ as f, bK as e } from "./index-CahBjLsU.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 {
|
|
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-B8CC0TXw.js";
|
|
2
|
+
import { bI as v, bJ as C, bK as e } from "./index-CahBjLsU.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { l as
|
|
2
|
+
import { l as q, B as G, u as N, f as Q, b as k, K as x, c as H, A as M, C as w, V as j, S as z, d as P, G as A, _ as J, e as Y, h as W, o as X, i as Z, n as ee } from "./index-CahBjLsU.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
5
|
-
const
|
|
4
|
+
import { useRef as se, useEffect as I, useMemo as R } from "react";
|
|
5
|
+
const C = (a, n, d, l, b, r) => {
|
|
6
6
|
const t = J(a, n, b), s = t.value, o = Y(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
@@ -37,13 +37,13 @@ const F = (a, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${a.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
A,
|
|
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
|
-
(s, o) =>
|
|
46
|
+
(s, o) => C(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
@@ -62,14 +62,14 @@ const F = (a, n, d, l, b, r) => {
|
|
|
62
62
|
const { t: l } = N(), b = (r, t, s) => {
|
|
63
63
|
const o = P(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ S(
|
|
65
|
-
|
|
65
|
+
A,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => C(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -105,7 +105,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
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,14 +113,14 @@ const F = (a, n, d, l, b, r) => {
|
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = G(), { t: o } = 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
|
+
I(() => {
|
|
124
124
|
i.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
126
|
const U = d[h];
|
|
@@ -132,73 +132,73 @@ const F = (a, n, d, l, b, r) => {
|
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: D,
|
|
138
138
|
isError: T,
|
|
139
|
-
refetch:
|
|
139
|
+
refetch: f
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => k(t, p),
|
|
143
143
|
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
x(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && f();
|
|
150
150
|
},
|
|
151
|
-
[t,
|
|
152
|
-
),
|
|
151
|
+
[t, f]
|
|
152
|
+
), I(() => {
|
|
153
153
|
T && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [T]);
|
|
159
|
-
const
|
|
159
|
+
const g = R(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = H(c), h = M(e);
|
|
162
|
+
return w(h);
|
|
163
|
+
}, [c]), F = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], O =
|
|
167
|
+
], O = D || !y, _ = T && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, B = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? o("NO_OBSERVATIONS_FOUND") : void 0, K = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid":
|
|
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
|
+
j,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId:
|
|
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
|
K ? /* @__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
|
z,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: F,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
199
|
loading: O,
|
|
200
200
|
errorStateMessage: B,
|
|
201
|
-
emptyStateMessage:
|
|
201
|
+
emptyStateMessage: V,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bL as we, bM as z, bN as xt, bO as B, bJ as q, bK as y, bP as Ro, bQ as ye, bR as R, bS as _, bT as k, bU as N, bV as A, bW as bs, bX as ir, bY as $e, bZ as U, b_ as Hn, b$ as Vn, c0 as dt, c1 as D, c2 as xs, c3 as cn, c4 as Be, c5 as ws, c6 as qt, c7 as zt, c8 as $s, c9 as Cs, ca as $n, cb as Ss, cc as Nr, cd as Bt, ce as zo, cf as ks, cg as Es, ch as j, ci as Ur, cj as Ms, ck as Ds, cl as sr, cm as As, cn as Ts, co as zn, cp as Fs, cq as Is, cr as Z, cs as Ps, ct as Ls } from "./index-CahBjLsU.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { u as r,
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { u as r, cu as o, cv as l, cw as c, b4 as m, b5 as g, cx as h, cy as b, cz as u, aF as p } from "./index-CahBjLsU.js";
|
|
3
3
|
import { Suspense as $ } from "react";
|
|
4
|
-
const _ = "index-module_loading__FAL7n", E = "index-module_message__KjCnF",
|
|
4
|
+
const _ = "index-module_loading__FAL7n", E = "index-module_message__KjCnF", d = {
|
|
5
5
|
loading: _,
|
|
6
6
|
message: E
|
|
7
|
-
},
|
|
7
|
+
}, f = ({ extensions: i }) => {
|
|
8
8
|
const { t: s } = r();
|
|
9
|
-
return i.length === 0 ? null : /* @__PURE__ */
|
|
9
|
+
return i.length === 0 ? null : /* @__PURE__ */ t(o, { children: [
|
|
10
10
|
/* @__PURE__ */ e(
|
|
11
11
|
l,
|
|
12
12
|
{
|
|
@@ -52,7 +52,7 @@ const _ = "index-module_loading__FAL7n", E = "index-module_message__KjCnF", t =
|
|
|
52
52
|
p,
|
|
53
53
|
{
|
|
54
54
|
type: "multi",
|
|
55
|
-
className:
|
|
55
|
+
className: d.loading
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
58
|
children: /* @__PURE__ */ e(n, { extensionParams: a.extensionParams })
|
|
@@ -63,7 +63,7 @@ const _ = "index-module_loading__FAL7n", E = "index-module_message__KjCnF", t =
|
|
|
63
63
|
id: "extension-widget-not-registered",
|
|
64
64
|
"data-testid": "extension-widget-not-registered-test-id",
|
|
65
65
|
"aria-label": "Extension widget not registered",
|
|
66
|
-
className:
|
|
66
|
+
className: d.message,
|
|
67
67
|
children: s("EXTENSION_WIDGET_NOT_REGISTERED")
|
|
68
68
|
}
|
|
69
69
|
)
|
|
@@ -74,5 +74,5 @@ const _ = "index-module_loading__FAL7n", E = "index-module_message__KjCnF", t =
|
|
|
74
74
|
] });
|
|
75
75
|
};
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
f as default
|
|
78
78
|
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { by as m, u, aM as
|
|
2
|
+
import { by as m, u, aM as f, bv as p, bF as b, aF as _, bB as x } from "./index-CahBjLsU.js";
|
|
3
3
|
import { lazy as N, useMemo as r, Suspense as h } from "react";
|
|
4
|
-
import { u as E } from "./hook-
|
|
5
|
-
const
|
|
4
|
+
import { u as E } from "./hook-DcaYKufJ.js";
|
|
5
|
+
const P = (s) => {
|
|
6
6
|
const i = /* @__PURE__ */ new Map();
|
|
7
7
|
for (const e of s) {
|
|
8
|
-
const
|
|
9
|
-
|
|
8
|
+
const o = i.get(e.extensionPointId) ?? [];
|
|
9
|
+
o.push(e), i.set(e.extensionPointId, o);
|
|
10
10
|
}
|
|
11
11
|
return i;
|
|
12
|
-
},
|
|
12
|
+
}, v = (s, i) => s.filter(
|
|
13
13
|
(e) => !e.requiredPrivileges || e.requiredPrivileges.length === 0 || m(i, e.requiredPrivileges)
|
|
14
14
|
), C = {
|
|
15
15
|
"org.bahmni.clinical.v2.search": N(
|
|
16
|
-
() => import("./index-
|
|
16
|
+
() => import("./index-BLDgLL29.js")
|
|
17
17
|
)
|
|
18
|
-
}, L = "index-module_page__16xxw", y = "index-module_loading__wNI-4", I = "index-module_tabs__ZZv8Y",
|
|
18
|
+
}, L = "index-module_page__16xxw", y = "index-module_loading__wNI-4", I = "index-module_tabs__ZZv8Y", w = "index-module_message__Ib5Iw", l = {
|
|
19
19
|
page: L,
|
|
20
20
|
loading: y,
|
|
21
21
|
tabs: I,
|
|
22
|
-
message:
|
|
22
|
+
message: w
|
|
23
23
|
}, S = () => {
|
|
24
|
-
const { t: s } = u(), { clinicalConfig: i } = E(), { userPrivileges: e } =
|
|
24
|
+
const { t: s } = u(), { clinicalConfig: i } = E(), { userPrivileges: e } = f(), o = r(
|
|
25
25
|
() => [
|
|
26
|
-
{ id: "home", label: s("HOME_LABEL"), href:
|
|
26
|
+
{ id: "home", label: s("HOME_LABEL"), href: p },
|
|
27
27
|
{ id: "clinical", label: s("CLINICAL_LABEL"), isCurrentPage: !0 }
|
|
28
28
|
],
|
|
29
29
|
[s]
|
|
30
30
|
), c = r(
|
|
31
|
-
() =>
|
|
31
|
+
() => P(i?.extensions ?? []),
|
|
32
32
|
[i]
|
|
33
33
|
), d = r(
|
|
34
34
|
() => Array.from(c.entries()).map(([n, t]) => ({
|
|
35
35
|
pointId: n,
|
|
36
36
|
Handler: C[n],
|
|
37
|
-
filtered:
|
|
37
|
+
filtered: v(t, e)
|
|
38
38
|
})).filter(({ Handler: n, filtered: t }) => !!n && t.length > 0),
|
|
39
39
|
[c, e]
|
|
40
40
|
);
|
|
41
41
|
return /* @__PURE__ */ a(
|
|
42
|
-
|
|
42
|
+
b,
|
|
43
43
|
{
|
|
44
|
-
header: /* @__PURE__ */ a(x, { breadcrumbItems:
|
|
44
|
+
header: /* @__PURE__ */ a(x, { breadcrumbItems: o }),
|
|
45
45
|
main: /* @__PURE__ */ a(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
48
|
id: "clinical-list-page",
|
|
49
49
|
"data-testid": "clinical-list-page-test-id",
|
|
50
50
|
"aria-label": "Clinical List Page",
|
|
51
|
-
className:
|
|
51
|
+
className: l.page,
|
|
52
52
|
children: d.length > 0 ? d.map(({ pointId: n, Handler: t, filtered: g }) => /* @__PURE__ */ a(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
55
|
id: n,
|
|
56
56
|
"data-testid": `${n}-test-id`,
|
|
57
|
-
className:
|
|
57
|
+
className: l.tabs,
|
|
58
58
|
children: /* @__PURE__ */ a(
|
|
59
59
|
h,
|
|
60
60
|
{
|
|
@@ -62,7 +62,7 @@ const v = (s) => {
|
|
|
62
62
|
_,
|
|
63
63
|
{
|
|
64
64
|
type: "multi",
|
|
65
|
-
className:
|
|
65
|
+
className: l.loading
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
68
|
children: /* @__PURE__ */ a(t, { extensions: g })
|
|
@@ -76,7 +76,7 @@ const v = (s) => {
|
|
|
76
76
|
id: "no-extensions-configured",
|
|
77
77
|
"data-testid": "no-extensions-configured-test-id",
|
|
78
78
|
"aria-label": "No extensions configured",
|
|
79
|
-
className:
|
|
79
|
+
className: l.message,
|
|
80
80
|
children: s("NO_EXTENSIONS_CONFIGURED")
|
|
81
81
|
}
|
|
82
82
|
)
|