@bahmni/registration-app 0.0.1-dev.230 → 0.0.1-dev.233
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-asIFkp7i-CdIhp145.js → DocumentsTable-BIJPXmK5-BIgCBrmv.js} +4 -4
- package/dist/{FormsTable-Eps5HHdl-sKfb6pRt.js → FormsTable-9HO9pDns-8bJehL0H.js} +22 -22
- package/dist/{LNWAZHJI-DvJMWiNi.js → LNWAZHJI-DU16eVhG.js} +2 -2
- package/dist/{MWZ6AO7Z-Bt3rQzvv.js → MWZ6AO7Z-DTpy9e4f.js} +2 -2
- package/dist/{Observations-I6ZLFaJF-BijtJMzv.js → Observations-BmK9dOSk-g_-k5otC.js} +14 -14
- package/dist/{YPM2AS64-TV3Ut9cs.js → YPM2AS64-CeszjWCR.js} +1 -1
- package/dist/{index-CMiwOKw0.js → index-BnIEcatH.js} +16214 -16208
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as _, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { t as K, u as Q, r as W, p as J, x as X,
|
|
2
|
+
import { t as K, u as Q, r as W, p as J, x as X, V as Z, o as ee, s as te } from "./index-BnIEcatH.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as m, useCallback as h, useEffect as f, useMemo as T } from "react";
|
|
5
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 = {
|
|
@@ -38,7 +38,7 @@ const pe = [
|
|
|
38
38
|
null
|
|
39
39
|
), [R, I] = m(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = m(1), [l,
|
|
41
|
+
), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = m(1), [l, V] = m($), [k, y] = m(void 0), M = h((e) => {
|
|
42
42
|
L(e), w(!0);
|
|
43
43
|
}, []), F = h(() => {
|
|
44
44
|
w(!1), L(null), I(/* @__PURE__ */ new Set());
|
|
@@ -91,7 +91,7 @@ const pe = [
|
|
|
91
91
|
}, [s, o]);
|
|
92
92
|
const q = h(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !== l ? (
|
|
94
|
+
t !== l ? (V(t), A(1), y(void 0)) : A(e);
|
|
95
95
|
},
|
|
96
96
|
[l]
|
|
97
97
|
), N = T(
|
|
@@ -152,7 +152,7 @@ const pe = [
|
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: l,
|
|
155
|
-
totalItems:
|
|
155
|
+
totalItems: k,
|
|
156
156
|
page: C,
|
|
157
157
|
onPageChange: q
|
|
158
158
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as s, jsxs as W, Fragment as X } from "react/jsx-runtime";
|
|
2
|
-
import { u as Z, t as ee, g as re, h as ae, d as te, a as oe, c as se, k as ne,
|
|
2
|
+
import { u as Z, t as ee, g as re, h as ae, d as te, a as oe, c as se, k as ne, b as v, V as de, x as ie, o as q, J as ue, Q as me, s as le, e as ce, f as fe } from "./index-BnIEcatH.js";
|
|
3
3
|
import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
|
|
4
4
|
import { useState as C, useMemo as d, useCallback as f } from "react";
|
|
5
|
-
const be = "_formsTableBody_81hra_1",
|
|
5
|
+
const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
6
6
|
formsTableBody: be,
|
|
7
|
-
customAccordianItem:
|
|
8
|
-
},
|
|
7
|
+
customAccordianItem: ge
|
|
8
|
+
}, pe = (u) => u ? u.extension?.find(
|
|
9
9
|
(n) => n.url === fe
|
|
10
10
|
)?.valueString : void 0, Ae = ({
|
|
11
11
|
episodeOfCareUuids: u,
|
|
12
12
|
encounterUuids: n,
|
|
13
13
|
config: S
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: o } = Z(), m = ee(), [l, O] = C(!1), [t, A] = C(null), { numberOfVisits: k, hideThumbnail:
|
|
15
|
+
const { t: o } = Z(), m = ee(), [l, O] = C(!1), [t, A] = C(null), { numberOfVisits: k, hideThumbnail: V = !1 } = S ?? {}, T = re(
|
|
16
16
|
u,
|
|
17
17
|
n
|
|
18
|
-
),
|
|
18
|
+
), x = ye(), {
|
|
19
19
|
data: y = [],
|
|
20
20
|
isLoading: B,
|
|
21
21
|
isError: E,
|
|
@@ -39,16 +39,16 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
|
|
|
39
39
|
}, [t, L]), {
|
|
40
40
|
isLoading: Q,
|
|
41
41
|
isError: j,
|
|
42
|
-
error:
|
|
42
|
+
error: g
|
|
43
43
|
} = c({
|
|
44
44
|
queryKey: ["formMetadata", b],
|
|
45
45
|
queryFn: () => oe(b),
|
|
46
46
|
enabled: !!b && l
|
|
47
47
|
}), {
|
|
48
|
-
data:
|
|
48
|
+
data: p,
|
|
49
49
|
isLoading: $,
|
|
50
50
|
isError: w,
|
|
51
|
-
error:
|
|
51
|
+
error: h
|
|
52
52
|
} = c({
|
|
53
53
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
54
54
|
queryFn: () => se(t.encounterUuid),
|
|
@@ -56,19 +56,19 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
|
|
|
56
56
|
});
|
|
57
57
|
ne(
|
|
58
58
|
(e) => {
|
|
59
|
-
e.patientUUID === m && e.updatedConcepts.size > 0 && (K(),
|
|
59
|
+
e.patientUUID === m && e.updatedConcepts.size > 0 && (K(), x.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
60
60
|
},
|
|
61
61
|
[m]
|
|
62
62
|
);
|
|
63
|
-
const z = d(() => !
|
|
64
|
-
const r =
|
|
63
|
+
const z = d(() => !p?.entry || !t?.formName ? [] : p.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
64
|
+
const r = pe(e);
|
|
65
65
|
return !r || r.includes(t.formName);
|
|
66
|
-
}), [
|
|
67
|
-
if (
|
|
68
|
-
return v(
|
|
69
|
-
if (
|
|
70
|
-
return v(
|
|
71
|
-
}, [
|
|
66
|
+
}), [p, t?.formName]), G = d(() => {
|
|
67
|
+
if (g)
|
|
68
|
+
return v(g).message;
|
|
69
|
+
if (h)
|
|
70
|
+
return v(h).message;
|
|
71
|
+
}, [g, h]), M = d(
|
|
72
72
|
() => [
|
|
73
73
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
74
74
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
@@ -85,12 +85,12 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
|
|
|
85
85
|
(r, a) => {
|
|
86
86
|
const i = a.formName;
|
|
87
87
|
r[i] ??= [];
|
|
88
|
-
const
|
|
88
|
+
const N = a.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
|
|
89
89
|
return r[i].push({
|
|
90
90
|
id: a.encounterUuid,
|
|
91
91
|
formName: a.formName,
|
|
92
92
|
recordedOn: de(a.encounterDateTime, o, !0).formattedResult,
|
|
93
|
-
recordedBy:
|
|
93
|
+
recordedBy: N ?? "--",
|
|
94
94
|
encounterDateTime: a.encounterDateTime,
|
|
95
95
|
encounterUuid: a.encounterUuid
|
|
96
96
|
}), r;
|
|
@@ -101,7 +101,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
|
|
|
101
101
|
([r, a]) => ({
|
|
102
102
|
formName: r,
|
|
103
103
|
records: a.sort(
|
|
104
|
-
(i,
|
|
104
|
+
(i, N) => N.encounterDateTime - i.encounterDateTime
|
|
105
105
|
)
|
|
106
106
|
})
|
|
107
107
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
@@ -185,7 +185,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
|
|
|
185
185
|
errorMessage: G,
|
|
186
186
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
187
187
|
testIdPrefix: t.formName,
|
|
188
|
-
hideThumbnail:
|
|
188
|
+
hideThumbnail: V
|
|
189
189
|
}
|
|
190
190
|
)
|
|
191
191
|
}
|
|
@@ -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-CeszjWCR.js";
|
|
2
|
+
import { A as d, C as f, D as e } from "./index-BnIEcatH.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-CeszjWCR.js";
|
|
2
|
+
import { A as C, C as v, D as e } from "./index-BnIEcatH.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as N, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { t as C, r as w, u as S, i as K, l as M, k as P, v as Q, E as j, y as x,
|
|
2
|
+
import { t as C, r as w, u as S, i as K, l as M, k as P, v as Q, E as j, y as x, j as G, o as H, w as z, P as U, m as Y, n as J, B as W, q as X, _ as Z, z as ee } from "./index-BnIEcatH.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as g } from "react";
|
|
5
5
|
const D = (t, n, d, l, b, r) => {
|
|
6
|
-
const a =
|
|
6
|
+
const a = Y(t, n, b), s = a.value, i = J(s);
|
|
7
7
|
let o = s;
|
|
8
8
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
9
9
|
X,
|
|
@@ -60,7 +60,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = S(), b = (r, a, s) => {
|
|
63
|
-
const i =
|
|
63
|
+
const i = z(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ N(
|
|
65
65
|
U,
|
|
66
66
|
{
|
|
@@ -132,11 +132,11 @@ const D = (t, n, d, l, b, r) => {
|
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [o, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = g(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
137
|
isLoading: F,
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
138
|
+
isError: R,
|
|
139
|
+
refetch: T
|
|
140
140
|
} = ae({
|
|
141
141
|
queryKey: le(a, p),
|
|
142
142
|
queryFn: () => M(a, p),
|
|
@@ -146,17 +146,17 @@ const D = (t, n, d, l, b, r) => {
|
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && T();
|
|
150
150
|
},
|
|
151
|
-
[a,
|
|
151
|
+
[a, T]
|
|
152
152
|
), $(() => {
|
|
153
|
-
|
|
153
|
+
R && s({
|
|
154
154
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const
|
|
158
|
+
}, [R]);
|
|
159
|
+
const f = g(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
161
|
const e = Q(c), h = j(e);
|
|
162
162
|
return x(h);
|
|
@@ -164,7 +164,7 @@ 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
|
-
], _ = F || !y, O =
|
|
167
|
+
], _ = F || !y, O = R && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, B = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? i("NO_OBSERVATIONS_FOUND") : void 0, V = f.length > 0 && !_ && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
168
|
return /* @__PURE__ */ N(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -186,7 +186,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
186
186
|
V ? /* @__PURE__ */ u(
|
|
187
187
|
ie,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: f,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as we, G as z, H as xt, I as B, C as q, D as y, K as Ro, L as ye, S as R, M as _, N as k, O as N, R as A, T 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-BnIEcatH.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|