@bahmni/appointments-app 0.0.1-dev.191 → 0.0.1-dev.192
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/{DocumentsTable-BCnYVvIx-DkjD5EMK.js → DocumentsTable-Cvp30zri-DiQIIQEq.js} +43 -43
- package/dist/FormsTable-ICc3VqdE-Da0nwLjU.js +421 -0
- package/dist/{LNWAZHJI-CcqFpevw.js → LNWAZHJI-BJmyYqN2.js} +2 -2
- package/dist/{MWZ6AO7Z-B2LG7tHX.js → MWZ6AO7Z-08X_36xS.js} +2 -2
- package/dist/{Observations-D0PH7TgR-Cm0LOrHD.js → Observations-CD5AxZVC-CUmCmZ7e.js} +50 -50
- package/dist/{YPM2AS64-BAceGX4o.js → YPM2AS64-cDoHkVJV.js} +1 -1
- package/dist/{index-DuYWQfRt.js → index-B8akCbvw.js} +19 -19
- package/dist/{index-DtAPMuCM.js → index-BDxHeigY.js} +33246 -34477
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/FormsTable-DFknJTr7-KWIKlcuY.js +0 -424
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as I, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useRef as ae, useEffect as $, useMemo as
|
|
4
|
-
const
|
|
5
|
-
const a =
|
|
2
|
+
import { d as k, t as B, u as N, i as K, j as Q, a as j, E as w, y as x, T as z, k as G, z as H, N as M, _ as P, X as S, l as X, v as Y, $ as J, Q as W, e as Z, f as ee, V as te } from "./index-BDxHeigY.js";
|
|
3
|
+
import { useRef as ae, useEffect as $, useMemo as R } from "react";
|
|
4
|
+
const C = (t, d, n, u, r) => {
|
|
5
|
+
const a = X(t, d, r), s = a.value, o = Y(s);
|
|
6
6
|
let i = s;
|
|
7
|
-
|
|
8
|
-
const b =
|
|
7
|
+
o === "Image" && (i = /* @__PURE__ */ l(W, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (i = /* @__PURE__ */ l(Z, { id: `${s}-video`, videoSrc: s })), o === "PDF" && (i = /* @__PURE__ */ l(ee, { id: `${s}-pdf`, src: s }));
|
|
8
|
+
const b = r("OBSERVATIONS_RECORDED_BY", {
|
|
9
9
|
provider: a.provider
|
|
10
10
|
}), p = t.display, v = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = u ? `${u}-${v}-${p}-${n}-${d}` : `${v}-${p}-${n}-${d}`;
|
|
11
11
|
return /* @__PURE__ */ l(
|
|
@@ -20,14 +20,14 @@ const F = (t, d, n, u, o) => {
|
|
|
20
20
|
},
|
|
21
21
|
`obs-${t.id}`
|
|
22
22
|
);
|
|
23
|
-
}, se = (t, d, n, u,
|
|
23
|
+
}, se = (t, d, n, u, r, a) => /* @__PURE__ */ l(
|
|
24
24
|
S,
|
|
25
25
|
{
|
|
26
26
|
title: t.display,
|
|
27
27
|
id: `grouped-obs-${t.display}-${u}`,
|
|
28
28
|
open: n,
|
|
29
29
|
children: t.members?.map(
|
|
30
|
-
(s,
|
|
30
|
+
(s, o) => C(s, o, r, a, d)
|
|
31
31
|
)
|
|
32
32
|
},
|
|
33
33
|
`grouped-obs-${t.id}`
|
|
@@ -35,19 +35,19 @@ const F = (t, d, n, u, o) => {
|
|
|
35
35
|
groupedData: t,
|
|
36
36
|
title: d = ""
|
|
37
37
|
}) => {
|
|
38
|
-
const { t: n } = N(), u = (
|
|
39
|
-
const
|
|
38
|
+
const { t: n } = N(), u = (r, a, s) => {
|
|
39
|
+
const o = P(r.encounterDetails, n);
|
|
40
40
|
return /* @__PURE__ */ I(
|
|
41
41
|
S,
|
|
42
42
|
{
|
|
43
|
-
title:
|
|
44
|
-
id: `encounter-${
|
|
43
|
+
title: o,
|
|
44
|
+
id: `encounter-${r.encounterId}`,
|
|
45
45
|
open: a,
|
|
46
46
|
children: [
|
|
47
|
-
|
|
48
|
-
(i, b) =>
|
|
47
|
+
r.observations.map(
|
|
48
|
+
(i, b) => C(i, b, s, d, n)
|
|
49
49
|
),
|
|
50
|
-
|
|
50
|
+
r.groupedObservations.map(
|
|
51
51
|
(i, b) => se(
|
|
52
52
|
i,
|
|
53
53
|
n,
|
|
@@ -59,7 +59,7 @@ const F = (t, d, n, u, o) => {
|
|
|
59
59
|
)
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
|
-
`encounter-${
|
|
62
|
+
`encounter-${r.encounterId}`
|
|
63
63
|
);
|
|
64
64
|
};
|
|
65
65
|
return /* @__PURE__ */ l(
|
|
@@ -69,7 +69,7 @@ const F = (t, d, n, u, o) => {
|
|
|
69
69
|
"data-testid": "obs-by-encounter-test-id",
|
|
70
70
|
"aria-label": "obs-by-encounter-aria-label",
|
|
71
71
|
children: t.map(
|
|
72
|
-
(
|
|
72
|
+
(r, a) => u(r, a === 0, a)
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
);
|
|
@@ -77,84 +77,84 @@ const F = (t, d, n, u, o) => {
|
|
|
77
77
|
observations: oe,
|
|
78
78
|
title: ie
|
|
79
79
|
}, ne = (t) => ["conceptUuid", t], de = (t, d) => ["observations", t, ...d], be = ({ config: t }) => {
|
|
80
|
-
const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d,
|
|
80
|
+
const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = k(), { addNotification: s } = B(), { t: o } = N(), i = K({
|
|
81
81
|
queries: n.map((e) => ({
|
|
82
82
|
queryKey: ne(e),
|
|
83
|
-
queryFn: () =>
|
|
83
|
+
queryFn: () => Q(e),
|
|
84
84
|
enabled: !!e
|
|
85
85
|
}))
|
|
86
86
|
});
|
|
87
87
|
$(() => {
|
|
88
88
|
i.forEach((e, m) => {
|
|
89
|
-
if (e.isError && !
|
|
90
|
-
const
|
|
89
|
+
if (e.isError && !r.current.has(m)) {
|
|
90
|
+
const q = n[m];
|
|
91
91
|
s({
|
|
92
|
-
title:
|
|
93
|
-
message:
|
|
92
|
+
title: o("ERROR_DEFAULT_TITLE"),
|
|
93
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: q }),
|
|
94
94
|
type: "error"
|
|
95
|
-
}),
|
|
96
|
-
} else e.isError ||
|
|
95
|
+
}), r.current.add(m);
|
|
96
|
+
} else e.isError || r.current.delete(m);
|
|
97
97
|
});
|
|
98
98
|
}, [i, n]);
|
|
99
|
-
const b =
|
|
99
|
+
const b = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]), v = R(() => n.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, n.length]), {
|
|
100
100
|
data: c,
|
|
101
|
-
isLoading:
|
|
102
|
-
isError:
|
|
103
|
-
refetch:
|
|
104
|
-
} =
|
|
101
|
+
isLoading: D,
|
|
102
|
+
isError: f,
|
|
103
|
+
refetch: g
|
|
104
|
+
} = j({
|
|
105
105
|
queryKey: de(a, p),
|
|
106
106
|
queryFn: () => te(a, p),
|
|
107
107
|
enabled: !!a && p.length > 0 && v
|
|
108
108
|
});
|
|
109
|
-
|
|
109
|
+
w(
|
|
110
110
|
(e) => {
|
|
111
111
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
112
112
|
(m) => p.includes(m)
|
|
113
|
-
) &&
|
|
113
|
+
) && g();
|
|
114
114
|
},
|
|
115
|
-
[a,
|
|
115
|
+
[a, g]
|
|
116
116
|
), $(() => {
|
|
117
|
-
|
|
118
|
-
title:
|
|
119
|
-
message:
|
|
117
|
+
f && s({
|
|
118
|
+
title: o("ERROR_DEFAULT_TITLE"),
|
|
119
|
+
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
120
120
|
type: "error"
|
|
121
121
|
});
|
|
122
|
-
}, [
|
|
123
|
-
const
|
|
122
|
+
}, [f]);
|
|
123
|
+
const h = R(() => {
|
|
124
124
|
if (!c) return [];
|
|
125
|
-
const e =
|
|
125
|
+
const e = x(c), m = z(e);
|
|
126
126
|
return G(m);
|
|
127
|
-
}, [c]),
|
|
127
|
+
}, [c]), F = [
|
|
128
128
|
{ key: "name", header: "name" },
|
|
129
129
|
{ key: "value", header: "value" },
|
|
130
130
|
{ key: "form", header: "form" }
|
|
131
|
-
],
|
|
131
|
+
], _ = D || !v, O = f && v, A = (!c || c.entry?.length === 0 || p.length === 0) && v, L = O ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, V = h.length > 0 && !_ && !O, E = d.titleTranslationKey, y = E ? o(E) : "";
|
|
132
132
|
return /* @__PURE__ */ I(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
135
135
|
id: "observations",
|
|
136
|
-
"data-testid":
|
|
136
|
+
"data-testid": E ? `observations-${y}` : "observations",
|
|
137
137
|
"aria-label": "observations-aria-label",
|
|
138
138
|
className: T.observations,
|
|
139
139
|
children: [
|
|
140
140
|
/* @__PURE__ */ l(
|
|
141
|
-
|
|
141
|
+
H,
|
|
142
142
|
{
|
|
143
143
|
id: "observations-title",
|
|
144
|
-
testId:
|
|
144
|
+
testId: E ? `observations-title-${y}` : "observations-title",
|
|
145
145
|
title: y,
|
|
146
146
|
className: T.title,
|
|
147
147
|
children: /* @__PURE__ */ l("p", { children: y })
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
|
-
V ? /* @__PURE__ */ l(re, { groupedData:
|
|
151
|
-
|
|
150
|
+
V ? /* @__PURE__ */ l(re, { groupedData: h, title: y }) : /* @__PURE__ */ l(
|
|
151
|
+
M,
|
|
152
152
|
{
|
|
153
|
-
headers:
|
|
153
|
+
headers: F,
|
|
154
154
|
rows: [],
|
|
155
|
-
ariaLabel:
|
|
156
|
-
loading:
|
|
157
|
-
errorStateMessage:
|
|
155
|
+
ariaLabel: o("OBSERVATIONS"),
|
|
156
|
+
loading: _,
|
|
157
|
+
errorStateMessage: L,
|
|
158
158
|
emptyStateMessage: U,
|
|
159
159
|
dataTestId: "observations-table"
|
|
160
160
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as we, S as z, U as xt, Y as B, D as q, F as y, Z as Ro, a0 as ye, a1 as R, a2 as _, a3 as k, a4 as N, a5 as A, a6 as bs, a7 as ir, a8 as $e, a9 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, aA as zn, aB as Fs, aC as Is, aD as Z, aE as Ps, aF as Ls } from "./index-BDxHeigY.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { o as E, A as S, p as C, u as M, a as f, q as L, G as N, r as g, s as y, w as I } from "./index-BDxHeigY.js";
|
|
3
3
|
import { useMemo as o } from "react";
|
|
4
|
-
const R =
|
|
5
|
-
|
|
4
|
+
const R = E(
|
|
5
|
+
S,
|
|
6
6
|
"useAppointmentsConfig",
|
|
7
7
|
"AppointmentsConfigProvider"
|
|
8
8
|
), l = [
|
|
@@ -11,19 +11,19 @@ const R = C(
|
|
|
11
11
|
"speciality",
|
|
12
12
|
"durationMins",
|
|
13
13
|
"description"
|
|
14
|
-
],
|
|
15
|
-
tableContainer:
|
|
16
|
-
table:
|
|
14
|
+
], h = "_tableContainer_jtyg5_1", D = "_table_jtyg5_1", c = {
|
|
15
|
+
tableContainer: h,
|
|
16
|
+
table: D
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function T(t) {
|
|
19
19
|
return t.filter((n) => !l.includes(n));
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function O(t, n) {
|
|
22
22
|
return [
|
|
23
23
|
...t.map((e) => ({
|
|
24
24
|
key: e,
|
|
25
25
|
header: n(
|
|
26
|
-
`ADMIN_ALL_SERVICES_COLUMN_${
|
|
26
|
+
`ADMIN_ALL_SERVICES_COLUMN_${C(e)}`
|
|
27
27
|
)
|
|
28
28
|
})),
|
|
29
29
|
{
|
|
@@ -32,7 +32,7 @@ function v(t, n) {
|
|
|
32
32
|
}
|
|
33
33
|
];
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function v(t, n) {
|
|
36
36
|
return t.map((e) => ({
|
|
37
37
|
id: e.uuid,
|
|
38
38
|
name: e.name,
|
|
@@ -48,31 +48,31 @@ function T(t, n) {
|
|
|
48
48
|
)
|
|
49
49
|
}));
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
const { t } =
|
|
51
|
+
const x = () => {
|
|
52
|
+
const { t } = M(), { appointmentsConfig: n } = R(), e = n?.serviceTableFields ?? [
|
|
53
53
|
...l
|
|
54
54
|
], a = o(
|
|
55
|
-
() =>
|
|
55
|
+
() => T(e),
|
|
56
56
|
[e]
|
|
57
57
|
), { data: i, isLoading: m, isError: p } = f({
|
|
58
58
|
queryKey: ["allAppointmentServices"],
|
|
59
59
|
queryFn: I
|
|
60
60
|
}), d = o(
|
|
61
|
-
() =>
|
|
61
|
+
() => O(e, t),
|
|
62
62
|
[e]
|
|
63
63
|
), _ = o(
|
|
64
|
-
() =>
|
|
64
|
+
() => v(i ?? [], a),
|
|
65
65
|
[i, a]
|
|
66
66
|
), b = (u, s) => s === "actions" ? null : l.includes(s) ? u[s] ?? "-" : u.attributes[s] ?? "-", A = [
|
|
67
67
|
{ id: "home", label: t("BREADCRUMB_HOME"), href: L },
|
|
68
68
|
{ id: "admin", label: t("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
69
69
|
];
|
|
70
70
|
return /* @__PURE__ */ r(
|
|
71
|
-
|
|
71
|
+
N,
|
|
72
72
|
{
|
|
73
|
-
header: /* @__PURE__ */ r(
|
|
73
|
+
header: /* @__PURE__ */ r(y, { breadcrumbItems: A }),
|
|
74
74
|
main: /* @__PURE__ */ r("div", { className: c.tableContainer, children: /* @__PURE__ */ r(
|
|
75
|
-
|
|
75
|
+
g,
|
|
76
76
|
{
|
|
77
77
|
id: "all-services",
|
|
78
78
|
title: t("ADMIN_ALL_SERVICES_TITLE"),
|
|
@@ -90,5 +90,5 @@ const j = () => {
|
|
|
90
90
|
);
|
|
91
91
|
};
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
x as default
|
|
94
94
|
};
|