@bahmni/appointments-app 0.0.1-dev.216 → 0.0.1-dev.217
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-D50V1AD8-C3_DvMLV.js → DocumentsTable-DGp_CqcQ-D-BLc2Nz.js} +1 -1
- package/dist/{FormsTable-EzH-Rlao-EiZAtxG3.js → FormsTable-C1opmUvf-D2FsTOrx.js} +25 -25
- package/dist/{LNWAZHJI-CJraoryj.js → LNWAZHJI-DXRrdHVE.js} +2 -2
- package/dist/{MWZ6AO7Z-CPbDdbjM.js → MWZ6AO7Z-CihlOsvX.js} +2 -2
- package/dist/{Observations-CL78DUzD-CguULqBm.js → Observations-DoglMWsy-BC0QHWgk.js} +20 -20
- package/dist/{YPM2AS64-B-ZpyorD.js → YPM2AS64-D8cIIvPg.js} +1 -1
- package/dist/{index-B1RcPdJt.js → index-B7yw-zcZ.js} +11310 -11298
- package/dist/{index-BkDdzYW6.js → index-DQq8gS1R.js} +14 -14
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { u as K, a as Q, e as W, b as J, E as X, T as Z, h as ee, c as te, y as ae } from "./index-
|
|
2
|
+
import { u as K, a as Q, e as W, b as J, E as X, T as Z, h as ee, c as te, y as ae } from "./index-B7yw-zcZ.js";
|
|
3
3
|
import { useState as l, useCallback as p, useEffect as f, useMemo as T } from "react";
|
|
4
4
|
const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", le = "_documentImage_1voj8_50", d = {
|
|
5
5
|
documentsTableBody: ne,
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { jsx as o, jsxs as J, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { a as Z, u as ee, d as re, f as ae, b as c, g as te, V as R, T as se, E as oe, h as q, q as ne, U as de, c as ie,
|
|
2
|
+
import { a as Z, u as ee, d as re, f as ae, b as c, g as te, V as R, T as se, E as oe, h as q, q as ne, U as de, c as ie, L as ue, i as me, j as le, k as ce, v as fe, w as ye } from "./index-B7yw-zcZ.js";
|
|
3
3
|
import { useState as C, useMemo as d, useCallback as f } from "react";
|
|
4
|
-
const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6",
|
|
4
|
+
const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", A = {
|
|
5
5
|
formsTableBody: be,
|
|
6
6
|
customAccordianItem: ge
|
|
7
7
|
}, he = (u) => u ? u.extension?.find(
|
|
8
8
|
(n) => n.url === me
|
|
9
|
-
)?.valueString : void 0,
|
|
9
|
+
)?.valueString : void 0, Oe = ({
|
|
10
10
|
episodeOfCareUuids: u,
|
|
11
11
|
encounterUuids: n,
|
|
12
12
|
config: S
|
|
13
13
|
}) => {
|
|
14
|
-
const { t: s } = Z(), m = ee(), [l,
|
|
14
|
+
const { t: s } = Z(), m = ee(), [l, O] = C(!1), [t, E] = C(null), { numberOfVisits: k, hideThumbnail: V = !1 } = S ?? {}, I = re(
|
|
15
15
|
u,
|
|
16
16
|
n
|
|
17
17
|
), j = ae(), {
|
|
18
18
|
data: y = [],
|
|
19
19
|
isLoading: T,
|
|
20
|
-
isError:
|
|
20
|
+
isError: L,
|
|
21
21
|
error: w,
|
|
22
22
|
refetch: H
|
|
23
23
|
} = c({
|
|
24
24
|
queryKey: ["forms", m, u],
|
|
25
25
|
queryFn: () => le(m, void 0, k),
|
|
26
26
|
enabled: !!m && !I
|
|
27
|
-
}),
|
|
27
|
+
}), B = d(() => !n || n.length === 0 ? y : y.filter(
|
|
28
28
|
(e) => n.includes(e.encounterUuid)
|
|
29
|
-
), [y, n]), { data:
|
|
29
|
+
), [y, n]), { data: _ = [] } = c({
|
|
30
30
|
queryKey: ["observationForms"],
|
|
31
31
|
queryFn: () => ce()
|
|
32
|
-
}),
|
|
33
|
-
(e) =>
|
|
34
|
-
[
|
|
32
|
+
}), v = f(
|
|
33
|
+
(e) => _.find((r) => r.name === e)?.uuid,
|
|
34
|
+
[_]
|
|
35
35
|
), b = d(() => {
|
|
36
36
|
if (t)
|
|
37
|
-
return
|
|
38
|
-
}, [t,
|
|
37
|
+
return v(t.formName);
|
|
38
|
+
}, [t, v]), {
|
|
39
39
|
isLoading: K,
|
|
40
40
|
isError: x,
|
|
41
41
|
error: g
|
|
@@ -67,7 +67,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
67
67
|
return R(g).message;
|
|
68
68
|
if (p)
|
|
69
69
|
return R(p).message;
|
|
70
|
-
}, [g, p]),
|
|
70
|
+
}, [g, p]), F = d(
|
|
71
71
|
() => [
|
|
72
72
|
{ key: "recordedOn", header: s("RECORDED_ON") },
|
|
73
73
|
{ key: "recordedBy", header: s("RECORDED_BY") }
|
|
@@ -80,7 +80,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
80
80
|
],
|
|
81
81
|
[]
|
|
82
82
|
), M = d(() => {
|
|
83
|
-
const e =
|
|
83
|
+
const e = B.reduce(
|
|
84
84
|
(r, a) => {
|
|
85
85
|
const i = a.formName;
|
|
86
86
|
r[i] ??= [];
|
|
@@ -104,10 +104,10 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
104
104
|
)
|
|
105
105
|
})
|
|
106
106
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
107
|
-
}, [
|
|
108
|
-
E(e),
|
|
107
|
+
}, [B, s]), U = f((e) => {
|
|
108
|
+
E(e), O(!0);
|
|
109
109
|
}, []), Y = f(() => {
|
|
110
|
-
|
|
110
|
+
O(!1), E(null);
|
|
111
111
|
}, []), D = f(
|
|
112
112
|
(e, r) => {
|
|
113
113
|
switch (r) {
|
|
@@ -122,17 +122,17 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
122
122
|
[U]
|
|
123
123
|
);
|
|
124
124
|
return /* @__PURE__ */ J(W, { children: [
|
|
125
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: T ||
|
|
125
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: T || L || M.length === 0 || I ? /* @__PURE__ */ o(
|
|
126
126
|
q,
|
|
127
127
|
{
|
|
128
|
-
headers:
|
|
128
|
+
headers: F,
|
|
129
129
|
ariaLabel: s("FORMS_HEADING"),
|
|
130
130
|
rows: [],
|
|
131
131
|
loading: T,
|
|
132
|
-
errorStateMessage:
|
|
132
|
+
errorStateMessage: L ? w?.message : void 0,
|
|
133
133
|
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
134
134
|
renderCell: D,
|
|
135
|
-
className:
|
|
135
|
+
className: A.formsTableBody,
|
|
136
136
|
dataTestId: "forms-table"
|
|
137
137
|
}
|
|
138
138
|
) : /* @__PURE__ */ o(ne, { align: "start", children: M.map((e, r) => {
|
|
@@ -141,13 +141,13 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
141
141
|
de,
|
|
142
142
|
{
|
|
143
143
|
title: a,
|
|
144
|
-
className:
|
|
144
|
+
className: A.customAccordianItem,
|
|
145
145
|
testId: `accordian-title-${a}`,
|
|
146
146
|
open: r === 0,
|
|
147
147
|
children: /* @__PURE__ */ o(
|
|
148
148
|
q,
|
|
149
149
|
{
|
|
150
|
-
headers:
|
|
150
|
+
headers: F,
|
|
151
151
|
ariaLabel: s("FORMS_HEADING"),
|
|
152
152
|
rows: i,
|
|
153
153
|
loading: !1,
|
|
@@ -155,7 +155,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
155
155
|
sortable: P,
|
|
156
156
|
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
157
157
|
renderCell: D,
|
|
158
|
-
className:
|
|
158
|
+
className: A.formsTableBody,
|
|
159
159
|
dataTestId: `forms-table-${a}`
|
|
160
160
|
}
|
|
161
161
|
)
|
|
@@ -192,5 +192,5 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
192
192
|
] });
|
|
193
193
|
};
|
|
194
194
|
export {
|
|
195
|
-
|
|
195
|
+
Oe as default
|
|
196
196
|
};
|
|
@@ -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-D8cIIvPg.js";
|
|
2
|
+
import { W as d, X as f, Y as e } from "./index-B7yw-zcZ.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-D8cIIvPg.js";
|
|
2
|
+
import { W as v, X as C, Y as e } from "./index-B7yw-zcZ.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
|
|
3
|
-
import { useRef as se, useEffect as
|
|
4
|
-
const
|
|
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 U, M as J, $ as W, _ as X, t as Z, o as ee, r as ae, s as te } from "./index-B7yw-zcZ.js";
|
|
3
|
+
import { useRef as se, useEffect as O, useMemo as g } from "react";
|
|
4
|
+
const D = (a, n, d, l, c, r) => {
|
|
5
5
|
const t = J(a, n, c), s = t.value, i = W(s);
|
|
6
6
|
let o = s;
|
|
7
7
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
@@ -36,13 +36,13 @@ const U = (a, n, d, l, c, r) => {
|
|
|
36
36
|
`obs-${a.id}`
|
|
37
37
|
);
|
|
38
38
|
}, re = (a, n, d, l, c, r, t) => /* @__PURE__ */ u(
|
|
39
|
-
|
|
39
|
+
U,
|
|
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) => D(
|
|
46
46
|
s,
|
|
47
47
|
i,
|
|
48
48
|
c,
|
|
@@ -61,14 +61,14 @@ const U = (a, n, d, l, c, r) => {
|
|
|
61
61
|
const { t: l } = S(), c = (r, t, s) => {
|
|
62
62
|
const i = Y(r.encounterDetails, l);
|
|
63
63
|
return /* @__PURE__ */ I(
|
|
64
|
-
|
|
64
|
+
U,
|
|
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
|
-
(o, p) =>
|
|
71
|
+
(o, p) => D(
|
|
72
72
|
o,
|
|
73
73
|
p,
|
|
74
74
|
s,
|
|
@@ -119,7 +119,7 @@ const U = (a, n, d, l, c, r) => {
|
|
|
119
119
|
enabled: !!e
|
|
120
120
|
}))
|
|
121
121
|
});
|
|
122
|
-
|
|
122
|
+
O(() => {
|
|
123
123
|
o.forEach((e, h) => {
|
|
124
124
|
if (e.isError && !r.current.has(h)) {
|
|
125
125
|
const B = d[h];
|
|
@@ -131,10 +131,10 @@ const U = (a, n, d, l, c, r) => {
|
|
|
131
131
|
} else e.isError || r.current.delete(h);
|
|
132
132
|
});
|
|
133
133
|
}, [o, d]);
|
|
134
|
-
const p =
|
|
134
|
+
const p = g(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), m = g(() => [.../* @__PURE__ */ new Set([...p, ...l])], [p, l]), v = g(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
135
135
|
data: b,
|
|
136
|
-
isLoading:
|
|
137
|
-
isError:
|
|
136
|
+
isLoading: F,
|
|
137
|
+
isError: R,
|
|
138
138
|
refetch: T
|
|
139
139
|
} = G({
|
|
140
140
|
queryKey: le(t, m),
|
|
@@ -148,22 +148,22 @@ const U = (a, n, d, l, c, r) => {
|
|
|
148
148
|
) && T();
|
|
149
149
|
},
|
|
150
150
|
[t, T]
|
|
151
|
-
),
|
|
152
|
-
|
|
151
|
+
), O(() => {
|
|
152
|
+
R && s({
|
|
153
153
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
154
154
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
155
155
|
type: "error"
|
|
156
156
|
});
|
|
157
|
-
}, [
|
|
158
|
-
const
|
|
157
|
+
}, [R]);
|
|
158
|
+
const _ = g(() => {
|
|
159
159
|
if (!b) return [];
|
|
160
160
|
const e = w(b), h = z(e);
|
|
161
161
|
return H(h);
|
|
162
|
-
}, [b]),
|
|
162
|
+
}, [b]), q = [
|
|
163
163
|
{ key: "name", header: "name" },
|
|
164
164
|
{ key: "value", header: "value" },
|
|
165
165
|
{ key: "form", header: "form" }
|
|
166
|
-
],
|
|
166
|
+
], $ = F || !v, f = R && v, A = (!b || b.entry?.length === 0 || m.length === 0) && v, L = f ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = A ? i("NO_OBSERVATIONS_FOUND") : void 0, V = _.length > 0 && !$ && !f, E = n.titleTranslationKey, y = E ? i(E) : "";
|
|
167
167
|
return /* @__PURE__ */ I(
|
|
168
168
|
"div",
|
|
169
169
|
{
|
|
@@ -185,17 +185,17 @@ const U = (a, n, d, l, c, r) => {
|
|
|
185
185
|
V ? /* @__PURE__ */ u(
|
|
186
186
|
ie,
|
|
187
187
|
{
|
|
188
|
-
groupedData:
|
|
188
|
+
groupedData: _,
|
|
189
189
|
title: y,
|
|
190
190
|
hideThumbnail: c
|
|
191
191
|
}
|
|
192
192
|
) : /* @__PURE__ */ u(
|
|
193
193
|
P,
|
|
194
194
|
{
|
|
195
|
-
headers:
|
|
195
|
+
headers: q,
|
|
196
196
|
rows: [],
|
|
197
197
|
ariaLabel: i("OBSERVATIONS"),
|
|
198
|
-
loading:
|
|
198
|
+
loading: $,
|
|
199
199
|
errorStateMessage: L,
|
|
200
200
|
emptyStateMessage: C,
|
|
201
201
|
dataTestId: "observations-table"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Z as we, a0 as z, a1 as xt, a2 as B, X as q, Y 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-B7yw-zcZ.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|