@bahmni/appointments-app 0.0.1-dev.206 → 0.0.1-dev.210
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-Xq284Jaw-C8FtKYOI.js → DocumentsTable-BxEpAJXn-B21DoZcl.js} +28 -28
- package/dist/{FormsTable-DLOTuk1I-DUAbL3qn.js → FormsTable-CB6ab-uN-B9GDPhdP.js} +75 -75
- package/dist/{LNWAZHJI-B6ujcQ3Q.js → LNWAZHJI-BwsgCtWr.js} +2 -2
- package/dist/{MWZ6AO7Z-CihbHZmG.js → MWZ6AO7Z-C98UroTn.js} +2 -2
- package/dist/{Observations-hudkuWv0-BT8_RK_v.js → Observations-B-3a239G-CDX6l7at.js} +40 -40
- package/dist/{YPM2AS64-D3CQ4VX-.js → YPM2AS64-D7_Y-B3I.js} +1 -1
- package/dist/{index-DJ2GBSY2.js → index-BzCyYXVL.js} +30 -30
- package/dist/{index-C0JEq2RR.js → index-DGhDkWpy.js} +13058 -13004
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as T, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { c as V, e as k, u as
|
|
3
|
-
import { useRef as ae, useEffect as
|
|
4
|
-
const
|
|
2
|
+
import { c as V, e as k, u as S, j as w, r as x, a as K, w as Q, o as j, m as z, p as G, y as H, x as M, q as P, R as N, v as Y, t as J, z as W, $ as X, I as Z, S as ee, A as te } from "./index-DGhDkWpy.js";
|
|
3
|
+
import { useRef as ae, useEffect as _, useMemo as h } from "react";
|
|
4
|
+
const q = (t, d, i, u, r) => {
|
|
5
5
|
const a = Y(t, d, r), s = a.value, o = J(s);
|
|
6
6
|
let n = s;
|
|
7
7
|
o === "Image" && (n = /* @__PURE__ */ l(X, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (n = /* @__PURE__ */ l(Z, { id: `${s}-video`, videoSrc: s })), o === "PDF" && (n = /* @__PURE__ */ l(ee, { id: `${s}-pdf`, src: s }));
|
|
8
8
|
const b = r("OBSERVATIONS_RECORDED_BY", {
|
|
9
9
|
provider: a.provider
|
|
10
|
-
}), p = t.display,
|
|
10
|
+
}), p = t.display, v = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = u ? `${u}-${v}-${p}-${i}-${d}` : `${v}-${p}-${i}-${d}`;
|
|
11
11
|
return /* @__PURE__ */ l(
|
|
12
12
|
W,
|
|
13
13
|
{
|
|
@@ -21,13 +21,13 @@ const F = (t, d, i, u, r) => {
|
|
|
21
21
|
`obs-${t.id}`
|
|
22
22
|
);
|
|
23
23
|
}, se = (t, d, i, u, r, a) => /* @__PURE__ */ l(
|
|
24
|
-
|
|
24
|
+
N,
|
|
25
25
|
{
|
|
26
26
|
title: t.display,
|
|
27
27
|
id: `grouped-obs-${t.display}-${u}`,
|
|
28
28
|
open: i,
|
|
29
29
|
children: t.members?.map(
|
|
30
|
-
(s, o) =>
|
|
30
|
+
(s, o) => q(s, o, r, a, d)
|
|
31
31
|
)
|
|
32
32
|
},
|
|
33
33
|
`grouped-obs-${t.id}`
|
|
@@ -35,17 +35,17 @@ const F = (t, d, i, u, r) => {
|
|
|
35
35
|
groupedData: t,
|
|
36
36
|
title: d = ""
|
|
37
37
|
}) => {
|
|
38
|
-
const { t: i } =
|
|
39
|
-
const o =
|
|
38
|
+
const { t: i } = S(), u = (r, a, s) => {
|
|
39
|
+
const o = P(r.encounterDetails, i);
|
|
40
40
|
return /* @__PURE__ */ T(
|
|
41
|
-
|
|
41
|
+
N,
|
|
42
42
|
{
|
|
43
43
|
title: o,
|
|
44
44
|
id: `encounter-${r.encounterId}`,
|
|
45
45
|
open: a,
|
|
46
46
|
children: [
|
|
47
47
|
r.observations.map(
|
|
48
|
-
(n, b) =>
|
|
48
|
+
(n, b) => q(n, b, s, d, i)
|
|
49
49
|
),
|
|
50
50
|
r.groupedObservations.map(
|
|
51
51
|
(n, b) => se(
|
|
@@ -73,89 +73,89 @@ const F = (t, d, i, u, r) => {
|
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
|
-
}, oe = "_observations_kfbhq_1", ne = "_title_kfbhq_12",
|
|
76
|
+
}, oe = "_observations_kfbhq_1", ne = "_title_kfbhq_12", I = {
|
|
77
77
|
observations: oe,
|
|
78
78
|
title: ne
|
|
79
79
|
}, ie = (t) => ["conceptUuid", t], de = (t, d) => ["observations", t, ...d], be = ({ config: t }) => {
|
|
80
|
-
const d = t, { conceptNames: i = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = V(), { addNotification: s } = k(), { t: o } =
|
|
80
|
+
const d = t, { conceptNames: i = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = V(), { addNotification: s } = k(), { t: o } = S(), n = w({
|
|
81
81
|
queries: i.map((e) => ({
|
|
82
82
|
queryKey: ie(e),
|
|
83
|
-
queryFn: () =>
|
|
83
|
+
queryFn: () => x(e),
|
|
84
84
|
enabled: !!e
|
|
85
85
|
}))
|
|
86
86
|
});
|
|
87
|
-
|
|
87
|
+
_(() => {
|
|
88
88
|
n.forEach((e, m) => {
|
|
89
89
|
if (e.isError && !r.current.has(m)) {
|
|
90
|
-
const
|
|
90
|
+
const B = i[m];
|
|
91
91
|
s({
|
|
92
92
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
93
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
93
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: B }),
|
|
94
94
|
type: "error"
|
|
95
95
|
}), r.current.add(m);
|
|
96
96
|
} else e.isError || r.current.delete(m);
|
|
97
97
|
});
|
|
98
98
|
}, [n, i]);
|
|
99
|
-
const b =
|
|
99
|
+
const b = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = h(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]), v = h(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
100
100
|
data: c,
|
|
101
101
|
isLoading: A,
|
|
102
|
-
isError:
|
|
103
|
-
refetch:
|
|
104
|
-
} =
|
|
102
|
+
isError: E,
|
|
103
|
+
refetch: f
|
|
104
|
+
} = K({
|
|
105
105
|
queryKey: de(a, p),
|
|
106
106
|
queryFn: () => te(a, p),
|
|
107
|
-
enabled: !!a && p.length > 0 &&
|
|
107
|
+
enabled: !!a && p.length > 0 && v
|
|
108
108
|
});
|
|
109
|
-
|
|
109
|
+
Q(
|
|
110
110
|
(e) => {
|
|
111
111
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
112
112
|
(m) => p.includes(m)
|
|
113
|
-
) &&
|
|
113
|
+
) && f();
|
|
114
114
|
},
|
|
115
|
-
[a,
|
|
116
|
-
),
|
|
117
|
-
|
|
115
|
+
[a, f]
|
|
116
|
+
), _(() => {
|
|
117
|
+
E && s({
|
|
118
118
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
119
119
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
120
120
|
type: "error"
|
|
121
121
|
});
|
|
122
|
-
}, [
|
|
123
|
-
const
|
|
122
|
+
}, [E]);
|
|
123
|
+
const g = h(() => {
|
|
124
124
|
if (!c) return [];
|
|
125
|
-
const e =
|
|
125
|
+
const e = j(c), m = z(e);
|
|
126
126
|
return G(m);
|
|
127
127
|
}, [c]), D = [
|
|
128
128
|
{ key: "name", header: "name" },
|
|
129
129
|
{ key: "value", header: "value" },
|
|
130
130
|
{ key: "form", header: "form" }
|
|
131
|
-
],
|
|
131
|
+
], $ = A || !v, O = E && v, F = (!c || c.entry?.length === 0 || p.length === 0) && v, L = O ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = F ? o("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !$ && !O, R = d.titleTranslationKey, y = R ? o(R) : "";
|
|
132
132
|
return /* @__PURE__ */ T(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
135
135
|
id: "observations",
|
|
136
|
-
"data-testid":
|
|
136
|
+
"data-testid": R ? `observations-${y}` : "observations",
|
|
137
137
|
"aria-label": "observations-aria-label",
|
|
138
|
-
className:
|
|
138
|
+
className: I.observations,
|
|
139
139
|
children: [
|
|
140
140
|
/* @__PURE__ */ l(
|
|
141
141
|
H,
|
|
142
142
|
{
|
|
143
143
|
id: "observations-title",
|
|
144
|
-
testId:
|
|
145
|
-
title:
|
|
146
|
-
className:
|
|
147
|
-
children: /* @__PURE__ */ l("p", { children:
|
|
144
|
+
testId: R ? `observations-title-${y}` : "observations-title",
|
|
145
|
+
title: y,
|
|
146
|
+
className: I.title,
|
|
147
|
+
children: /* @__PURE__ */ l("p", { children: y })
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
|
-
|
|
150
|
+
C ? /* @__PURE__ */ l(re, { groupedData: g, title: y }) : /* @__PURE__ */ l(
|
|
151
151
|
M,
|
|
152
152
|
{
|
|
153
153
|
headers: D,
|
|
154
154
|
rows: [],
|
|
155
155
|
ariaLabel: o("OBSERVATIONS"),
|
|
156
|
-
loading:
|
|
157
|
-
errorStateMessage:
|
|
158
|
-
emptyStateMessage:
|
|
156
|
+
loading: $,
|
|
157
|
+
errorStateMessage: L,
|
|
158
|
+
emptyStateMessage: U,
|
|
159
159
|
dataTestId: "observations-table"
|
|
160
160
|
}
|
|
161
161
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a1 as we, a2 as z, a3 as xt, a4 as B,
|
|
1
|
+
import { a1 as we, a2 as z, a3 as xt, a4 as B, _ as q, a0 as y, a5 as Ro, a6 as ye, a7 as R, a8 as _, a9 as k, aa as N, ab as A, ac as bs, ad as ir, ae as $e, af as G, ag as Hn, ah as Vn, ai as dt, aj as D, ak as xs, al as cn, am as Be, an as ws, ao as qt, ap as zt, aq as $s, ar as Cs, as as $n, at as Ss, au as Nr, av as Bt, aw as zo, ax as ks, ay as Es, az as j, aA as Gr, aB as Ms, aC as Ds, aD as sr, aE as As, aF as Ts, aG as zn, aH as Fs, aI as Is, aJ as Z, aK as Ps, aL as Ls } from "./index-DGhDkWpy.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
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { H as V, B as O, u as C, E as h, F as P, f as B, e as G, J as U, K as A, a as x, N as q, O as F, P as H, Q as k, T as Q, U as $, W as K, X as j } from "./index-DGhDkWpy.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
|
-
const
|
|
4
|
+
const W = V(
|
|
5
5
|
O,
|
|
6
6
|
"useAppointmentsConfig",
|
|
7
7
|
"AppointmentsConfigProvider"
|
|
8
|
-
),
|
|
8
|
+
), w = ({
|
|
9
9
|
serviceName: e,
|
|
10
10
|
isDeleting: a,
|
|
11
11
|
onConfirm: t,
|
|
@@ -35,10 +35,10 @@ const j = V(
|
|
|
35
35
|
"speciality",
|
|
36
36
|
"durationMins",
|
|
37
37
|
"description"
|
|
38
|
-
],
|
|
38
|
+
], J = "app:appointments:manageServices", Y = "app:appointments:adminTab", X = "_page_10v94_1", Z = "_noPrivilegeContainer_10v94_1", z = "_table_10v94_18", d = {
|
|
39
39
|
page: X,
|
|
40
|
-
noPrivilegeContainer:
|
|
41
|
-
table:
|
|
40
|
+
noPrivilegeContainer: Z,
|
|
41
|
+
table: z
|
|
42
42
|
};
|
|
43
43
|
function ee(e) {
|
|
44
44
|
return e.filter((a) => !p.includes(a));
|
|
@@ -74,28 +74,28 @@ function ae(e, a) {
|
|
|
74
74
|
}));
|
|
75
75
|
}
|
|
76
76
|
const re = () => {
|
|
77
|
-
const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } =
|
|
77
|
+
const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = W(), [E, c] = I(null), [v, S] = I(!1), l = i?.serviceTableFields ?? [
|
|
78
78
|
...p
|
|
79
|
-
], u =
|
|
79
|
+
], u = A(s, Y), M = A(
|
|
80
80
|
s,
|
|
81
|
-
|
|
81
|
+
J
|
|
82
82
|
), m = _(
|
|
83
83
|
() => ee(l),
|
|
84
84
|
[l]
|
|
85
|
-
), { data:
|
|
85
|
+
), { data: L, isLoading: b, isError: g } = x({
|
|
86
86
|
queryKey: ["allAppointmentServices"],
|
|
87
|
-
queryFn:
|
|
87
|
+
queryFn: j,
|
|
88
88
|
enabled: u
|
|
89
|
-
}),
|
|
89
|
+
}), D = _(
|
|
90
90
|
() => te(l, e),
|
|
91
91
|
[l]
|
|
92
|
-
),
|
|
93
|
-
() => ae(
|
|
94
|
-
[
|
|
95
|
-
),
|
|
92
|
+
), N = _(
|
|
93
|
+
() => ae(L ?? [], m),
|
|
94
|
+
[L, m]
|
|
95
|
+
), R = async () => {
|
|
96
96
|
S(!0);
|
|
97
97
|
try {
|
|
98
|
-
await
|
|
98
|
+
await K(E.id), t({
|
|
99
99
|
title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
|
|
100
100
|
message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
|
|
101
101
|
type: "success",
|
|
@@ -111,7 +111,7 @@ const re = () => {
|
|
|
111
111
|
S(!1);
|
|
112
112
|
}
|
|
113
113
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
|
|
114
|
-
|
|
114
|
+
Q,
|
|
115
115
|
{
|
|
116
116
|
id: `delete-service-${r.id}-btn`,
|
|
117
117
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
@@ -122,15 +122,15 @@ const re = () => {
|
|
|
122
122
|
onClick: () => c(r),
|
|
123
123
|
children: /* @__PURE__ */ n($, {})
|
|
124
124
|
}
|
|
125
|
-
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-",
|
|
125
|
+
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
126
126
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: q },
|
|
127
127
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
128
128
|
];
|
|
129
129
|
return /* @__PURE__ */ n(
|
|
130
|
-
|
|
130
|
+
F,
|
|
131
131
|
{
|
|
132
|
-
header: /* @__PURE__ */ n(
|
|
133
|
-
main: u ? /* @__PURE__ */
|
|
132
|
+
header: /* @__PURE__ */ n(k, { breadcrumbItems: f }),
|
|
133
|
+
main: u ? /* @__PURE__ */ y(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
136
|
id: "all-appointment-service-page",
|
|
@@ -139,26 +139,26 @@ const re = () => {
|
|
|
139
139
|
className: d.page,
|
|
140
140
|
children: [
|
|
141
141
|
/* @__PURE__ */ n(
|
|
142
|
-
|
|
142
|
+
H,
|
|
143
143
|
{
|
|
144
144
|
id: "all-services",
|
|
145
145
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
146
|
-
headers:
|
|
147
|
-
rows:
|
|
146
|
+
headers: D,
|
|
147
|
+
rows: N,
|
|
148
148
|
ariaLabel: "all-services-table",
|
|
149
|
-
loading:
|
|
150
|
-
errorStateMessage:
|
|
149
|
+
loading: b,
|
|
150
|
+
errorStateMessage: g ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
151
151
|
emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
|
|
152
152
|
renderCell: T,
|
|
153
153
|
className: d.table
|
|
154
154
|
}
|
|
155
155
|
),
|
|
156
156
|
E && /* @__PURE__ */ n(
|
|
157
|
-
|
|
157
|
+
w,
|
|
158
158
|
{
|
|
159
159
|
serviceName: E.name,
|
|
160
160
|
isDeleting: v,
|
|
161
|
-
onConfirm:
|
|
161
|
+
onConfirm: R,
|
|
162
162
|
onCancel: () => c(null)
|
|
163
163
|
}
|
|
164
164
|
)
|