@bahmni/appointments-app 0.0.1-dev.215 → 0.0.1-dev.216
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-fzVaPEDf-DOOqOOKE.js → DocumentsTable-D50V1AD8-C3_DvMLV.js} +48 -48
- package/dist/FormsTable-EzH-Rlao-EiZAtxG3.js +196 -0
- package/dist/{LNWAZHJI-CLYlIjsZ.js → LNWAZHJI-CJraoryj.js} +2 -2
- package/dist/{MWZ6AO7Z-CL71PInM.js → MWZ6AO7Z-CPbDdbjM.js} +2 -2
- package/dist/{Observations-CVJq7iSk-DiJewdz-.js → Observations-CL78DUzD-CguULqBm.js} +70 -70
- package/dist/{YPM2AS64-Bpoe3cvd.js → YPM2AS64-B-ZpyorD.js} +1 -1
- package/dist/{index-CU8j8cbs.js → index-B1RcPdJt.js} +28920 -28780
- package/dist/{index-D_WlGA5d.js → index-BkDdzYW6.js} +25 -25
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/FormsTable-jpNE9pzC-TG5gdiOo.js +0 -434
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { u as k, e as K, a as S, l as M, p as x, b as G, g as Q, x as w, z, N as H, m as j, h as P, n as Y, G as A, M as J, R as W, A as X, o as Z, r as ee, s as ae, t as te } from "./index-B1RcPdJt.js";
|
|
3
3
|
import { useRef as se, useEffect as $, useMemo as R } from "react";
|
|
4
|
-
const
|
|
5
|
-
const t =
|
|
6
|
-
let
|
|
7
|
-
i === "Image" && (
|
|
8
|
-
|
|
4
|
+
const U = (a, n, d, l, c, r) => {
|
|
5
|
+
const t = J(a, n, c), s = t.value, i = W(s);
|
|
6
|
+
let o = s;
|
|
7
|
+
i === "Image" && (o = /* @__PURE__ */ u(
|
|
8
|
+
Z,
|
|
9
9
|
{
|
|
10
10
|
imageSrc: s,
|
|
11
11
|
alt: s,
|
|
12
12
|
id: `${s}-img`,
|
|
13
13
|
hideThumbnail: r
|
|
14
14
|
}
|
|
15
|
-
)), i === "Video" && (
|
|
15
|
+
)), i === "Video" && (o = /* @__PURE__ */ u(
|
|
16
16
|
ee,
|
|
17
17
|
{
|
|
18
18
|
id: `${s}-video`,
|
|
19
19
|
videoSrc: s,
|
|
20
20
|
hideThumbnail: r
|
|
21
21
|
}
|
|
22
|
-
)), i === "PDF" && (
|
|
23
|
-
const p =
|
|
22
|
+
)), i === "PDF" && (o = /* @__PURE__ */ u(ae, { id: `${s}-pdf`, src: s }));
|
|
23
|
+
const p = c("OBSERVATIONS_RECORDED_BY", {
|
|
24
24
|
provider: t.provider
|
|
25
|
-
}), m = a.display, v = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs",
|
|
25
|
+
}), m = a.display, v = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", b = l ? `${l}-${v}-${m}-${d}-${n}` : `${v}-${m}-${d}-${n}`;
|
|
26
26
|
return /* @__PURE__ */ u(
|
|
27
|
-
|
|
27
|
+
X,
|
|
28
28
|
{
|
|
29
29
|
header: t.header,
|
|
30
|
-
value:
|
|
30
|
+
value: o,
|
|
31
31
|
info: p,
|
|
32
|
-
id:
|
|
33
|
-
testId:
|
|
34
|
-
ariaLabel:
|
|
32
|
+
id: b,
|
|
33
|
+
testId: b,
|
|
34
|
+
ariaLabel: b
|
|
35
35
|
},
|
|
36
36
|
`obs-${a.id}`
|
|
37
37
|
);
|
|
38
|
-
}, re = (a,
|
|
39
|
-
|
|
38
|
+
}, re = (a, n, d, l, c, r, t) => /* @__PURE__ */ u(
|
|
39
|
+
A,
|
|
40
40
|
{
|
|
41
41
|
title: a.display,
|
|
42
42
|
id: `grouped-obs-${a.display}-${l}`,
|
|
43
43
|
open: d,
|
|
44
44
|
children: a.members?.map(
|
|
45
|
-
(s, i) =>
|
|
45
|
+
(s, i) => U(
|
|
46
46
|
s,
|
|
47
47
|
i,
|
|
48
|
-
|
|
48
|
+
c,
|
|
49
49
|
r,
|
|
50
|
-
|
|
50
|
+
n,
|
|
51
51
|
t
|
|
52
52
|
)
|
|
53
53
|
)
|
|
@@ -55,36 +55,36 @@ const A = (a, o, d, l, b, r) => {
|
|
|
55
55
|
`grouped-obs-${a.id}`
|
|
56
56
|
), ie = ({
|
|
57
57
|
groupedData: a,
|
|
58
|
-
title:
|
|
58
|
+
title: n = "",
|
|
59
59
|
hideThumbnail: d
|
|
60
60
|
}) => {
|
|
61
|
-
const { t: l } =
|
|
61
|
+
const { t: l } = S(), c = (r, t, s) => {
|
|
62
62
|
const i = Y(r.encounterDetails, l);
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
|
|
63
|
+
return /* @__PURE__ */ I(
|
|
64
|
+
A,
|
|
65
65
|
{
|
|
66
66
|
title: i,
|
|
67
67
|
id: `encounter-${r.encounterId}`,
|
|
68
68
|
open: t,
|
|
69
69
|
children: [
|
|
70
70
|
r.observations.map(
|
|
71
|
-
(
|
|
72
|
-
|
|
71
|
+
(o, p) => U(
|
|
72
|
+
o,
|
|
73
73
|
p,
|
|
74
74
|
s,
|
|
75
|
-
|
|
75
|
+
n,
|
|
76
76
|
l,
|
|
77
77
|
d
|
|
78
78
|
)
|
|
79
79
|
),
|
|
80
80
|
r.groupedObservations.map(
|
|
81
|
-
(
|
|
82
|
-
|
|
81
|
+
(o, p) => re(
|
|
82
|
+
o,
|
|
83
83
|
l,
|
|
84
84
|
t,
|
|
85
85
|
p,
|
|
86
86
|
s,
|
|
87
|
-
|
|
87
|
+
n,
|
|
88
88
|
d
|
|
89
89
|
)
|
|
90
90
|
)
|
|
@@ -100,104 +100,104 @@ const A = (a, o, d, l, b, r) => {
|
|
|
100
100
|
"data-testid": "obs-by-encounter-test-id",
|
|
101
101
|
"aria-label": "obs-by-encounter-aria-label",
|
|
102
102
|
children: a.map(
|
|
103
|
-
(r, t) =>
|
|
103
|
+
(r, t) => c(r, t === 0, t)
|
|
104
104
|
)
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
|
-
},
|
|
108
|
-
observations:
|
|
109
|
-
title:
|
|
110
|
-
}, de = (a) => ["conceptUuid", a], le = (a,
|
|
111
|
-
const
|
|
107
|
+
}, oe = "_observations_kfbhq_1", ne = "_title_kfbhq_12", N = {
|
|
108
|
+
observations: oe,
|
|
109
|
+
title: ne
|
|
110
|
+
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
111
|
+
const n = a, {
|
|
112
112
|
conceptNames: d = [],
|
|
113
113
|
conceptUuid: l = [],
|
|
114
|
-
hideThumbnail:
|
|
115
|
-
} =
|
|
114
|
+
hideThumbnail: c = !1
|
|
115
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = k(), { addNotification: s } = K(), { t: i } = S(), o = M({
|
|
116
116
|
queries: d.map((e) => ({
|
|
117
117
|
queryKey: de(e),
|
|
118
|
-
queryFn: () =>
|
|
118
|
+
queryFn: () => x(e),
|
|
119
119
|
enabled: !!e
|
|
120
120
|
}))
|
|
121
121
|
});
|
|
122
122
|
$(() => {
|
|
123
|
-
|
|
123
|
+
o.forEach((e, h) => {
|
|
124
124
|
if (e.isError && !r.current.has(h)) {
|
|
125
|
-
const
|
|
125
|
+
const B = d[h];
|
|
126
126
|
s({
|
|
127
127
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
128
|
-
message: i("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
128
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
|
|
129
129
|
type: "error"
|
|
130
130
|
}), r.current.add(h);
|
|
131
131
|
} else e.isError || r.current.delete(h);
|
|
132
132
|
});
|
|
133
|
-
}, [
|
|
134
|
-
const p = R(() =>
|
|
135
|
-
data:
|
|
133
|
+
}, [o, d]);
|
|
134
|
+
const p = R(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), m = R(() => [.../* @__PURE__ */ new Set([...p, ...l])], [p, l]), v = R(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
135
|
+
data: b,
|
|
136
136
|
isLoading: D,
|
|
137
|
-
isError:
|
|
138
|
-
refetch:
|
|
139
|
-
} =
|
|
137
|
+
isError: g,
|
|
138
|
+
refetch: T
|
|
139
|
+
} = G({
|
|
140
140
|
queryKey: le(t, m),
|
|
141
141
|
queryFn: () => te(t, m),
|
|
142
142
|
enabled: !!t && m.length > 0 && v
|
|
143
143
|
});
|
|
144
|
-
|
|
144
|
+
Q(
|
|
145
145
|
(e) => {
|
|
146
146
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
147
147
|
(h) => m.includes(h)
|
|
148
|
-
) &&
|
|
148
|
+
) && T();
|
|
149
149
|
},
|
|
150
|
-
[t,
|
|
150
|
+
[t, T]
|
|
151
151
|
), $(() => {
|
|
152
|
-
|
|
152
|
+
g && s({
|
|
153
153
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
154
154
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
155
155
|
type: "error"
|
|
156
156
|
});
|
|
157
|
-
}, [
|
|
158
|
-
const
|
|
159
|
-
if (!
|
|
160
|
-
const e =
|
|
161
|
-
return
|
|
162
|
-
}, [
|
|
157
|
+
}, [g]);
|
|
158
|
+
const f = R(() => {
|
|
159
|
+
if (!b) return [];
|
|
160
|
+
const e = w(b), h = z(e);
|
|
161
|
+
return H(h);
|
|
162
|
+
}, [b]), F = [
|
|
163
163
|
{ key: "name", header: "name" },
|
|
164
164
|
{ key: "value", header: "value" },
|
|
165
165
|
{ key: "form", header: "form" }
|
|
166
|
-
], O = D || !v, _ =
|
|
167
|
-
return /* @__PURE__ */
|
|
166
|
+
], O = D || !v, _ = g && v, q = (!b || b.entry?.length === 0 || m.length === 0) && v, L = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = q ? i("NO_OBSERVATIONS_FOUND") : void 0, V = f.length > 0 && !O && !_, E = n.titleTranslationKey, y = E ? i(E) : "";
|
|
167
|
+
return /* @__PURE__ */ I(
|
|
168
168
|
"div",
|
|
169
169
|
{
|
|
170
170
|
id: "observations",
|
|
171
171
|
"data-testid": E ? `observations-${y}` : "observations",
|
|
172
172
|
"aria-label": "observations-aria-label",
|
|
173
|
-
className:
|
|
173
|
+
className: N.observations,
|
|
174
174
|
children: [
|
|
175
175
|
/* @__PURE__ */ u(
|
|
176
|
-
|
|
176
|
+
j,
|
|
177
177
|
{
|
|
178
178
|
id: "observations-title",
|
|
179
179
|
testId: E ? `observations-title-${y}` : "observations-title",
|
|
180
180
|
title: y,
|
|
181
|
-
className:
|
|
181
|
+
className: N.title,
|
|
182
182
|
children: /* @__PURE__ */ u("p", { children: y })
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
|
|
185
|
+
V ? /* @__PURE__ */ u(
|
|
186
186
|
ie,
|
|
187
187
|
{
|
|
188
|
-
groupedData:
|
|
188
|
+
groupedData: f,
|
|
189
189
|
title: y,
|
|
190
|
-
hideThumbnail:
|
|
190
|
+
hideThumbnail: c
|
|
191
191
|
}
|
|
192
192
|
) : /* @__PURE__ */ u(
|
|
193
|
-
|
|
193
|
+
P,
|
|
194
194
|
{
|
|
195
195
|
headers: F,
|
|
196
196
|
rows: [],
|
|
197
197
|
ariaLabel: i("OBSERVATIONS"),
|
|
198
198
|
loading: O,
|
|
199
|
-
errorStateMessage:
|
|
200
|
-
emptyStateMessage:
|
|
199
|
+
errorStateMessage: L,
|
|
200
|
+
emptyStateMessage: C,
|
|
201
201
|
dataTestId: "observations-table"
|
|
202
202
|
}
|
|
203
203
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as we, a0 as z, a1 as xt, a2 as B, Z as q, _ as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-B1RcPdJt.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|