@bahmni/registration-app 0.0.1-dev.228 → 0.0.1-dev.229
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-Dmmx1Tly-Bhr8arPB.js → DocumentsTable-6tDw4SyX-BWGrInwV.js} +14 -14
- package/dist/{FormsTable-BJZSRY_P-BQlMUT6L.js → FormsTable-BXY2feyi-BedI_bwA.js} +6 -6
- package/dist/{LNWAZHJI-D63tdY33.js → LNWAZHJI-C9wox7lt.js} +2 -2
- package/dist/{MWZ6AO7Z-7zfwMBXd.js → MWZ6AO7Z-C-4LRG3U.js} +2 -2
- package/dist/{Observations-Dj2QMfNh-djN-X2kZ.js → Observations-BEqqihoJ-DZCp5qMP.js} +27 -27
- package/dist/{YPM2AS64-BwVEx6si.js → YPM2AS64-M1wy1Zyd.js} +1 -1
- package/dist/{index-CfOuMw7G.js → index-UAAQaH3g.js} +1507 -1521
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as K, u as Q, r as W, s as J, M as X, N as Z, o as ee, a as te } from "./index-UAAQaH3g.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
5
|
-
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",
|
|
4
|
+
import { useState as m, useCallback as h, useEffect as f, useMemo as T } from "react";
|
|
5
|
+
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", me = "_documentImage_1voj8_50", d = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
8
8
|
documentViewerContainer: re,
|
|
@@ -10,8 +10,8 @@ const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11",
|
|
|
10
10
|
attachmentCounter: se,
|
|
11
11
|
attachmentError: ce,
|
|
12
12
|
documentIframe: ie,
|
|
13
|
-
documentImage:
|
|
14
|
-
},
|
|
13
|
+
documentImage: me
|
|
14
|
+
}, le = {
|
|
15
15
|
documentIdentifier: "DOCUMENTS_DOCUMENT_IDENTIFIER",
|
|
16
16
|
documentType: "DOCUMENTS_TYPE",
|
|
17
17
|
uploadedOn: "DOCUMENTS_UPLOADED_ON",
|
|
@@ -24,7 +24,7 @@ function j(a) {
|
|
|
24
24
|
function ue(a, g) {
|
|
25
25
|
return a.map((s) => ({
|
|
26
26
|
key: s,
|
|
27
|
-
header: g(
|
|
27
|
+
header: g(le[s])
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
const _e = [
|
|
@@ -34,11 +34,11 @@ const _e = [
|
|
|
34
34
|
"uploadedBy",
|
|
35
35
|
"action"
|
|
36
36
|
], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids: g }) => {
|
|
37
|
-
const [s, w] =
|
|
37
|
+
const [s, w] = m(!1), [o, M] = m(
|
|
38
38
|
null
|
|
39
|
-
), [R, I] =
|
|
39
|
+
), [R, I] = m(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E =
|
|
41
|
+
), E = K(), { t: n } = Q(), { addNotification: L } = W(), $ = Number(a?.pageSize) || 5, [C, A] = m(1), [l, k] = m($), [V, y] = m(void 0), U = h((e) => {
|
|
42
42
|
M(e), w(!0);
|
|
43
43
|
}, []), F = h(() => {
|
|
44
44
|
w(!1), M(null), I(/* @__PURE__ */ new Set());
|
|
@@ -50,13 +50,13 @@ const _e = [
|
|
|
50
50
|
E,
|
|
51
51
|
g,
|
|
52
52
|
C,
|
|
53
|
-
|
|
53
|
+
l
|
|
54
54
|
],
|
|
55
55
|
enabled: !!E,
|
|
56
56
|
queryFn: () => J(
|
|
57
57
|
E,
|
|
58
58
|
g,
|
|
59
|
-
|
|
59
|
+
l,
|
|
60
60
|
C
|
|
61
61
|
)
|
|
62
62
|
});
|
|
@@ -91,9 +91,9 @@ const _e = [
|
|
|
91
91
|
}, [s, o]);
|
|
92
92
|
const q = h(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !==
|
|
94
|
+
t !== l ? (k(t), A(1), y(void 0)) : A(e);
|
|
95
95
|
},
|
|
96
|
-
[
|
|
96
|
+
[l]
|
|
97
97
|
), N = T(
|
|
98
98
|
() => a?.fields ?? _e,
|
|
99
99
|
[a?.fields]
|
|
@@ -151,7 +151,7 @@ const _e = [
|
|
|
151
151
|
renderCell: G,
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
|
-
pageSize:
|
|
154
|
+
pageSize: l,
|
|
155
155
|
totalItems: V,
|
|
156
156
|
page: C,
|
|
157
157
|
onPageChange: q
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s, jsxs as W, Fragment as X } from "react/jsx-runtime";
|
|
2
|
-
import { u as Z, t as ee, m as re,
|
|
2
|
+
import { u as Z, t as ee, m as re, i as ae, b as te, c as oe, n as se, k as ne, V as U, N as de, M as ie, o as S, G as me, J as ue, a as le, P as ce, d as fe } from "./index-UAAQaH3g.js";
|
|
3
3
|
import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as q, useMemo as d, useCallback as f } from "react";
|
|
5
5
|
const be = "_formsTableBody_81hra_1", pe = "_customAccordianItem_81hra_6", O = {
|
|
6
6
|
formsTableBody: be,
|
|
7
7
|
customAccordianItem: pe
|
|
@@ -10,9 +10,9 @@ const be = "_formsTableBody_81hra_1", pe = "_customAccordianItem_81hra_6", O = {
|
|
|
10
10
|
)?.valueString : void 0, Ie = ({
|
|
11
11
|
episodeOfCareUuids: m,
|
|
12
12
|
encounterUuids: n,
|
|
13
|
-
config:
|
|
13
|
+
config: C
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: o } = Z(), u = ee(), [l, A] =
|
|
15
|
+
const { t: o } = Z(), u = ee(), [l, A] = q(!1), [t, I] = q(null), { numberOfVisits: k, hideThumbnail: V = !1 } = C ?? {}, M = re(
|
|
16
16
|
m,
|
|
17
17
|
n
|
|
18
18
|
), H = ye(), {
|
|
@@ -124,7 +124,7 @@ const be = "_formsTableBody_81hra_1", pe = "_customAccordianItem_81hra_6", O = {
|
|
|
124
124
|
);
|
|
125
125
|
return /* @__PURE__ */ W(X, { children: [
|
|
126
126
|
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children: T || B || L.length === 0 || M ? /* @__PURE__ */ s(
|
|
127
|
-
|
|
127
|
+
S,
|
|
128
128
|
{
|
|
129
129
|
headers: F,
|
|
130
130
|
ariaLabel: o("FORMS_HEADING"),
|
|
@@ -146,7 +146,7 @@ const be = "_formsTableBody_81hra_1", pe = "_customAccordianItem_81hra_6", O = {
|
|
|
146
146
|
testId: `accordian-title-${a}`,
|
|
147
147
|
open: r === 0,
|
|
148
148
|
children: /* @__PURE__ */ s(
|
|
149
|
-
|
|
149
|
+
S,
|
|
150
150
|
{
|
|
151
151
|
headers: F,
|
|
152
152
|
ariaLabel: o("FORMS_HEADING"),
|
|
@@ -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 { y as d, z as f, A as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-M1wy1Zyd.js";
|
|
2
|
+
import { y as d, z as f, A as e } from "./index-UAAQaH3g.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 { y as v, z as C, A as e } from "./index-
|
|
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-M1wy1Zyd.js";
|
|
2
|
+
import { y as v, z as C, A as e } from "./index-UAAQaH3g.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { t as B, r as K, u as N, e as j, f as w, k as x, h as G, p as M, g as Q, j as H, o as P, l as Y, $ as U, q as z, v as J, w as W, E as X, T as Z, x as ee } from "./index-UAAQaH3g.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
4
|
+
import { useRef as se, useEffect as _, useMemo as T } from "react";
|
|
5
5
|
const D = (t, n, d, l, b, r) => {
|
|
6
6
|
const a = z(t, n, b), s = a.value, i = J(s);
|
|
7
7
|
let o = s;
|
|
@@ -21,15 +21,15 @@ const D = (t, n, d, l, b, r) => {
|
|
|
21
21
|
hideThumbnail: r
|
|
22
22
|
}
|
|
23
23
|
)), i === "PDF" && (o = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
|
-
const
|
|
24
|
+
const p = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: a.provider
|
|
26
|
-
}),
|
|
26
|
+
}), m = t.display, y = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${m}-${d}-${n}` : `${y}-${m}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
28
|
W,
|
|
29
29
|
{
|
|
30
30
|
header: a.header,
|
|
31
31
|
value: o,
|
|
32
|
-
info:
|
|
32
|
+
info: p,
|
|
33
33
|
id: c,
|
|
34
34
|
testId: c,
|
|
35
35
|
ariaLabel: c
|
|
@@ -59,9 +59,9 @@ const D = (t, n, d, l, b, r) => {
|
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } =
|
|
62
|
+
const { t: l } = N(), b = (r, a, s) => {
|
|
63
63
|
const i = Y(r.encounterDetails, l);
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ S(
|
|
65
65
|
U,
|
|
66
66
|
{
|
|
67
67
|
title: i,
|
|
@@ -69,9 +69,9 @@ const D = (t, n, d, l, b, r) => {
|
|
|
69
69
|
open: a,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(o,
|
|
72
|
+
(o, p) => D(
|
|
73
73
|
o,
|
|
74
|
-
|
|
74
|
+
p,
|
|
75
75
|
s,
|
|
76
76
|
n,
|
|
77
77
|
l,
|
|
@@ -79,11 +79,11 @@ const D = (t, n, d, l, b, r) => {
|
|
|
79
79
|
)
|
|
80
80
|
),
|
|
81
81
|
r.groupedObservations.map(
|
|
82
|
-
(o,
|
|
82
|
+
(o, p) => re(
|
|
83
83
|
o,
|
|
84
84
|
l,
|
|
85
85
|
a,
|
|
86
|
-
|
|
86
|
+
p,
|
|
87
87
|
s,
|
|
88
88
|
n,
|
|
89
89
|
d
|
|
@@ -108,48 +108,48 @@ const D = (t, n, d, l, b, r) => {
|
|
|
108
108
|
}, oe = "_observations_kfbhq_1", ne = "_title_kfbhq_12", I = {
|
|
109
109
|
observations: oe,
|
|
110
110
|
title: ne
|
|
111
|
-
}, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n],
|
|
111
|
+
}, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n], me = ({ config: t }) => {
|
|
112
112
|
const n = t, {
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), a =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = K(), { t: i } = N(), o = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
119
|
queryFn: () => j(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
|
-
|
|
123
|
+
_(() => {
|
|
124
124
|
o.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const V = d[h];
|
|
127
127
|
s({
|
|
128
128
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: i("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [o, d]);
|
|
135
|
-
const
|
|
135
|
+
const p = T(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), m = T(() => [.../* @__PURE__ */ new Set([...p, ...l])], [p, l]), y = T(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
137
|
isLoading: F,
|
|
138
138
|
isError: f,
|
|
139
139
|
refetch: R
|
|
140
140
|
} = ae({
|
|
141
|
-
queryKey: le(a,
|
|
142
|
-
queryFn: () => w(a,
|
|
143
|
-
enabled: !!a &&
|
|
141
|
+
queryKey: le(a, m),
|
|
142
|
+
queryFn: () => w(a, m),
|
|
143
|
+
enabled: !!a && m.length > 0 && y
|
|
144
144
|
});
|
|
145
145
|
x(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
|
-
(h) =>
|
|
148
|
+
(h) => m.includes(h)
|
|
149
149
|
) && R();
|
|
150
150
|
},
|
|
151
151
|
[a, R]
|
|
152
|
-
),
|
|
152
|
+
), _(() => {
|
|
153
153
|
f && s({
|
|
154
154
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
@@ -164,8 +164,8 @@ const D = (t, n, d, l, b, r) => {
|
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], $ = F || !y, O = f && y, A = (!c || c.entry?.length === 0 || m.length === 0) && y, L = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, k = A ? i("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !$ && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
|
+
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
@@ -196,7 +196,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
196
196
|
headers: q,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: i("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
199
|
+
loading: $,
|
|
200
200
|
errorStateMessage: L,
|
|
201
201
|
emptyStateMessage: k,
|
|
202
202
|
dataTestId: "observations-table"
|
|
@@ -208,6 +208,6 @@ const D = (t, n, d, l, b, r) => {
|
|
|
208
208
|
};
|
|
209
209
|
export {
|
|
210
210
|
de as conceptUuidQueryKeys,
|
|
211
|
-
|
|
211
|
+
me as default,
|
|
212
212
|
le as observationsQueryKeys
|
|
213
213
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as we, C as z, D as xt, F as B, z as q, A as y, H as Ro,
|
|
1
|
+
import { B as we, C as z, D as xt, F as B, z as q, A as y, H as Ro, I as ye, S as R, K as _, L as k, O as N, Q as A, R as bs, U as ir, W as $e, X as U, Y as Hn, Z as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-UAAQaH3g.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|