@bahmni/appointments-app 0.0.1-dev.199 → 0.0.1-dev.201
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-CFwrptgn-HVHgyex_.js → DocumentsTable-Di3nGMxS-CeY3ibGG.js} +31 -31
- package/dist/{FormsTable-CB5_nrlS-Drmtu21a.js → FormsTable-CQD6_ATv-ftpA_iSj.js} +77 -77
- package/dist/{LNWAZHJI-C2UL-2iZ.js → LNWAZHJI-o-DswTpb.js} +2 -2
- package/dist/{MWZ6AO7Z-DXxXzMqv.js → MWZ6AO7Z-XjL2hD9v.js} +2 -2
- package/dist/{Observations-C7BBw4Hj-BfR9bRl4.js → Observations-BCqYbNXh-C32LJ91k.js} +39 -39
- package/dist/{YPM2AS64-1iM9GDfP.js → YPM2AS64-Dh3V7Wgt.js} +1 -1
- package/dist/{index-CVgIO3Cn.js → index-CUqj0-DQ.js} +23809 -23611
- package/dist/{index-DdKMP9Ia.js → index-CV_jAslP.js} +33 -33
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { l as B, Q
|
|
3
|
-
import { useRef as ae, useEffect as $, useMemo as
|
|
4
|
-
const
|
|
5
|
-
const a =
|
|
1
|
+
import { jsxs as I, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { l as B, Q, u as S, j as V, k as w, a as x, f as K, t as j, m as G, p as H, w as M, x as P, q as z, L as N, r as Y, d as J, E as W, D as X, S as Z, R as ee, v as te } from "./index-CUqj0-DQ.js";
|
|
3
|
+
import { useRef as ae, useEffect as $, useMemo as R } from "react";
|
|
4
|
+
const D = (t, d, i, u, r) => {
|
|
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
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
|
{
|
|
14
14
|
header: a.header,
|
|
15
15
|
value: n,
|
|
@@ -21,13 +21,13 @@ const A = (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) => D(s, o, r, a, d)
|
|
31
31
|
)
|
|
32
32
|
},
|
|
33
33
|
`grouped-obs-${t.id}`
|
|
@@ -35,17 +35,17 @@ const A = (t, d, i, u, r) => {
|
|
|
35
35
|
groupedData: t,
|
|
36
36
|
title: d = ""
|
|
37
37
|
}) => {
|
|
38
|
-
const { t: i } =
|
|
39
|
-
const o =
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
|
|
38
|
+
const { t: i } = S(), u = (r, a, s) => {
|
|
39
|
+
const o = z(r.encounterDetails, i);
|
|
40
|
+
return /* @__PURE__ */ I(
|
|
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) => D(n, b, s, d, i)
|
|
49
49
|
),
|
|
50
50
|
r.groupedObservations.map(
|
|
51
51
|
(n, b) => se(
|
|
@@ -73,40 +73,40 @@ const A = (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", T = {
|
|
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 = B(), { addNotification: s } =
|
|
80
|
+
const d = t, { conceptNames: i = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = Q(), { t: o } = S(), n = V({
|
|
81
81
|
queries: i.map((e) => ({
|
|
82
82
|
queryKey: ie(e),
|
|
83
|
-
queryFn: () =>
|
|
83
|
+
queryFn: () => w(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 C = 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: C }),
|
|
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 = R(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = R(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]), v = R(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
100
100
|
data: c,
|
|
101
|
-
isLoading:
|
|
102
|
-
isError:
|
|
101
|
+
isLoading: L,
|
|
102
|
+
isError: f,
|
|
103
103
|
refetch: h
|
|
104
|
-
} =
|
|
104
|
+
} = x({
|
|
105
105
|
queryKey: de(a, p),
|
|
106
106
|
queryFn: () => te(a, p),
|
|
107
107
|
enabled: !!a && p.length > 0 && v
|
|
108
108
|
});
|
|
109
|
-
|
|
109
|
+
K(
|
|
110
110
|
(e) => {
|
|
111
111
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
112
112
|
(m) => p.includes(m)
|
|
@@ -114,48 +114,48 @@ const A = (t, d, i, u, r) => {
|
|
|
114
114
|
},
|
|
115
115
|
[a, h]
|
|
116
116
|
), $(() => {
|
|
117
|
-
|
|
117
|
+
f && 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
|
+
}, [f]);
|
|
123
|
+
const g = R(() => {
|
|
124
124
|
if (!c) return [];
|
|
125
|
-
const e = j(c), m =
|
|
126
|
-
return
|
|
127
|
-
}, [c]),
|
|
125
|
+
const e = j(c), m = G(e);
|
|
126
|
+
return H(m);
|
|
127
|
+
}, [c]), F = [
|
|
128
128
|
{ key: "name", header: "name" },
|
|
129
129
|
{ key: "value", header: "value" },
|
|
130
130
|
{ key: "form", header: "form" }
|
|
131
|
-
], O =
|
|
132
|
-
return /* @__PURE__ */
|
|
131
|
+
], O = L || !v, _ = f && v, q = (!c || c.entry?.length === 0 || p.length === 0) && v, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = q ? o("NO_OBSERVATIONS_FOUND") : void 0, k = g.length > 0 && !O && !_, E = d.titleTranslationKey, y = E ? o(E) : "";
|
|
132
|
+
return /* @__PURE__ */ I(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
135
135
|
id: "observations",
|
|
136
136
|
"data-testid": E ? `observations-${y}` : "observations",
|
|
137
137
|
"aria-label": "observations-aria-label",
|
|
138
|
-
className:
|
|
138
|
+
className: T.observations,
|
|
139
139
|
children: [
|
|
140
140
|
/* @__PURE__ */ l(
|
|
141
|
-
|
|
141
|
+
M,
|
|
142
142
|
{
|
|
143
143
|
id: "observations-title",
|
|
144
144
|
testId: E ? `observations-title-${y}` : "observations-title",
|
|
145
145
|
title: y,
|
|
146
|
-
className:
|
|
146
|
+
className: T.title,
|
|
147
147
|
children: /* @__PURE__ */ l("p", { children: y })
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
k ? /* @__PURE__ */ l(re, { groupedData: g, title: y }) : /* @__PURE__ */ l(
|
|
151
|
+
P,
|
|
152
152
|
{
|
|
153
|
-
headers:
|
|
153
|
+
headers: F,
|
|
154
154
|
rows: [],
|
|
155
155
|
ariaLabel: o("OBSERVATIONS"),
|
|
156
156
|
loading: O,
|
|
157
|
-
errorStateMessage:
|
|
158
|
-
emptyStateMessage:
|
|
157
|
+
errorStateMessage: A,
|
|
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, Y 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-CUqj0-DQ.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|