@bahmni/registration-app 0.0.1-dev.265 → 0.0.1-dev.267
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-CTpGjHXi-CKKiZo45.js → DocumentsTable-B5KzNxpE-BqHYdIy5.js} +27 -27
- package/dist/{FormsTable-BIz1A-5g-B4tz9UfU.js → FormsTable-E-Ya0wBK-D2j0IyQA.js} +21 -21
- package/dist/{LNWAZHJI-r-79-T5p.js → LNWAZHJI-BsmXQdxr.js} +2 -2
- package/dist/{MWZ6AO7Z-DOFFe8uz.js → MWZ6AO7Z-Ceccyaia.js} +2 -2
- package/dist/{Observations-Cf7HY6Zc-BwzuDZ2e.js → Observations-DO36Czp5-BTwYZXDR.js} +5 -5
- package/dist/{YPM2AS64-CY4CSO5N.js → YPM2AS64-QmRjMppG.js} +1 -1
- package/dist/{index-rMUBJNQi.js → index-BxuQZOhE.js} +107 -107
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { d as K, u as Q, a as W, F as J, b as X, m as Z, c as ee, r as te } from "./index-
|
|
1
|
+
import { jsx as r, jsxs as _, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { d as K, u as Q, a as W, F as J, b as X, m as Z, c as ee, r as te } from "./index-BxuQZOhE.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as m, useCallback as h, useEffect as
|
|
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 = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
@@ -27,13 +27,13 @@ function ue(a, g) {
|
|
|
27
27
|
header: g(le[s])
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const pe = [
|
|
31
31
|
"documentIdentifier",
|
|
32
32
|
"documentType",
|
|
33
33
|
"uploadedOn",
|
|
34
34
|
"uploadedBy",
|
|
35
35
|
"action"
|
|
36
|
-
],
|
|
36
|
+
], _e = /\.(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
37
|
const [s, w] = m(!1), [o, L] = m(
|
|
38
38
|
null
|
|
39
39
|
), [R, I] = m(
|
|
@@ -60,17 +60,17 @@ const _e = [
|
|
|
60
60
|
C
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
f(() => {
|
|
64
64
|
u && y(u.total);
|
|
65
|
-
}, [u]),
|
|
65
|
+
}, [u]), f(() => {
|
|
66
66
|
A(1), y(void 0);
|
|
67
|
-
}, [E]),
|
|
67
|
+
}, [E]), f(() => {
|
|
68
68
|
D && U({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: v?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [D, v, U, n]),
|
|
73
|
+
}, [D, v, U, n]), f(() => {
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
@@ -82,8 +82,8 @@ const _e = [
|
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
84
|
})).ok || t.add(i);
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
85
|
+
} catch (O) {
|
|
86
|
+
O instanceof Error && O.name !== "AbortError" && t.add(i);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
e.signal.aborted || I(t);
|
|
@@ -94,16 +94,16 @@ const _e = [
|
|
|
94
94
|
t !== l ? (k(t), A(1), y(void 0)) : A(e);
|
|
95
95
|
},
|
|
96
96
|
[l]
|
|
97
|
-
),
|
|
98
|
-
() => a?.fields ??
|
|
97
|
+
), N = T(
|
|
98
|
+
() => a?.fields ?? pe,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
), P = T(() => [...u?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [u]), z = T(() => ue(
|
|
101
|
-
() =>
|
|
100
|
+
), P = T(() => [...u?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [u]), z = T(() => ue(N, n), [N, n]), x = T(
|
|
101
|
+
() => N.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "action"
|
|
104
104
|
})),
|
|
105
|
-
[
|
|
106
|
-
),
|
|
105
|
+
[N]
|
|
106
|
+
), p = T(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
109
|
), G = h(
|
|
@@ -137,7 +137,7 @@ const _e = [
|
|
|
137
137
|
},
|
|
138
138
|
[b, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ _(Y, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
@@ -168,33 +168,33 @@ const _e = [
|
|
|
168
168
|
passiveModal: !0,
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
|
-
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children:
|
|
172
|
-
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) ||
|
|
173
|
-
return c === "#" ||
|
|
171
|
+
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: p.map((e, t) => {
|
|
172
|
+
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || _e.test(e.url ?? ""), O = R.has(t);
|
|
173
|
+
return c === "#" || O ? /* @__PURE__ */ _(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
177
177
|
"data-testid": `attachment-error-${t}`,
|
|
178
178
|
children: [
|
|
179
|
-
|
|
179
|
+
p.length > 1 && /* @__PURE__ */ _("p", { className: d.attachmentCounter, children: [
|
|
180
180
|
t + 1,
|
|
181
181
|
"/",
|
|
182
|
-
|
|
182
|
+
p.length
|
|
183
183
|
] }),
|
|
184
184
|
/* @__PURE__ */ r("p", { children: n("DOCUMENTS_ERROR_LOADING_ATTACHMENT") })
|
|
185
185
|
]
|
|
186
186
|
},
|
|
187
187
|
`${o.id}-${e.url}`
|
|
188
|
-
) : /* @__PURE__ */
|
|
188
|
+
) : /* @__PURE__ */ _(
|
|
189
189
|
"div",
|
|
190
190
|
{
|
|
191
191
|
className: d.attachmentItem,
|
|
192
192
|
"data-testid": `attachment-item-${t}`,
|
|
193
193
|
children: [
|
|
194
|
-
|
|
194
|
+
p.length > 1 && /* @__PURE__ */ _("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
|
-
|
|
197
|
+
p.length
|
|
198
198
|
] }),
|
|
199
199
|
S ? /* @__PURE__ */ r(
|
|
200
200
|
"img",
|
|
@@ -223,5 +223,5 @@ const _e = [
|
|
|
223
223
|
] });
|
|
224
224
|
};
|
|
225
225
|
export {
|
|
226
|
-
|
|
226
|
+
Ne as default
|
|
227
227
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { u as Z, d as ee, e as re, j as ae, B as te, P as oe, k as se, X as ne, R as
|
|
2
|
+
import { u as Z, d as ee, e as re, j as ae, B as te, P as oe, k as se, X as ne, R as v, m as de, b as ie, c as U, A as me, _ as ue, r as le, Y as ce, I as fe } from "./index-BxuQZOhE.js";
|
|
3
3
|
import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
|
|
4
4
|
import { useState as S, useMemo as d, useCallback as f } from "react";
|
|
5
|
-
const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10",
|
|
5
|
+
const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A = {
|
|
6
6
|
formsTableBody: pe,
|
|
7
7
|
customAccordianItem: be
|
|
8
8
|
}, ge = (m) => m ? m.extension?.find(
|
|
@@ -15,12 +15,12 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
|
|
|
15
15
|
const { t: o } = Z(), u = ee(), [l, h] = S(!1), [t, O] = S(null), { numberOfVisits: k, hideThumbnail: j = !1 } = C ?? {}, B = re(
|
|
16
16
|
m,
|
|
17
17
|
n
|
|
18
|
-
),
|
|
18
|
+
), H = ye(), {
|
|
19
19
|
data: y = [],
|
|
20
20
|
isLoading: _,
|
|
21
21
|
isError: E,
|
|
22
|
-
error:
|
|
23
|
-
refetch:
|
|
22
|
+
error: K,
|
|
23
|
+
refetch: x
|
|
24
24
|
} = c({
|
|
25
25
|
queryKey: ["forms", u, m],
|
|
26
26
|
queryFn: () => ae(u, void 0, k),
|
|
@@ -56,7 +56,7 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
|
|
|
56
56
|
});
|
|
57
57
|
ne(
|
|
58
58
|
(e) => {
|
|
59
|
-
e.patientUUID === u && e.updatedConcepts.size > 0 && (
|
|
59
|
+
e.patientUUID === u && e.updatedConcepts.size > 0 && (x(), H.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
60
60
|
},
|
|
61
61
|
[u]
|
|
62
62
|
);
|
|
@@ -65,9 +65,9 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
|
|
|
65
65
|
return !r || r.includes(t.formName);
|
|
66
66
|
}), [g, t?.formName]), Y = d(() => {
|
|
67
67
|
if (b)
|
|
68
|
-
return
|
|
68
|
+
return v(b).message;
|
|
69
69
|
if (N)
|
|
70
|
-
return
|
|
70
|
+
return v(N).message;
|
|
71
71
|
}, [b, N]), L = d(
|
|
72
72
|
() => [
|
|
73
73
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
@@ -85,12 +85,12 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
|
|
|
85
85
|
(r, a) => {
|
|
86
86
|
const i = a.formName;
|
|
87
87
|
r[i] ??= [];
|
|
88
|
-
const
|
|
88
|
+
const I = a.providers.map((X) => X.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: I ?? "--",
|
|
94
94
|
encounterDateTime: a.encounterDateTime,
|
|
95
95
|
encounterUuid: a.encounterUuid
|
|
96
96
|
}), r;
|
|
@@ -101,26 +101,26 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
|
|
|
101
101
|
([r, a]) => ({
|
|
102
102
|
formName: r,
|
|
103
103
|
records: a.sort(
|
|
104
|
-
(i,
|
|
104
|
+
(i, I) => I.encounterDateTime - i.encounterDateTime
|
|
105
105
|
)
|
|
106
106
|
})
|
|
107
107
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
108
|
-
}, [T, o]),
|
|
108
|
+
}, [T, o]), D = f((e) => {
|
|
109
109
|
O(e), h(!0);
|
|
110
110
|
}, []), G = f(() => {
|
|
111
111
|
h(!1), O(null);
|
|
112
|
-
}, []),
|
|
112
|
+
}, []), q = f(
|
|
113
113
|
(e, r) => {
|
|
114
114
|
switch (r) {
|
|
115
115
|
case "recordedOn":
|
|
116
|
-
return /* @__PURE__ */ s(ie, { onClick: () =>
|
|
116
|
+
return /* @__PURE__ */ s(ie, { onClick: () => D(e), children: e.recordedOn });
|
|
117
117
|
case "recordedBy":
|
|
118
118
|
return e.recordedBy;
|
|
119
119
|
default:
|
|
120
120
|
return null;
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
-
[
|
|
123
|
+
[D]
|
|
124
124
|
);
|
|
125
125
|
return /* @__PURE__ */ J(W, { children: [
|
|
126
126
|
/* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: _ || E || M.length === 0 || B ? /* @__PURE__ */ s(
|
|
@@ -130,10 +130,10 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
|
|
|
130
130
|
ariaLabel: o("FORMS_HEADING"),
|
|
131
131
|
rows: [],
|
|
132
132
|
loading: _,
|
|
133
|
-
errorStateMessage: E ?
|
|
133
|
+
errorStateMessage: E ? K?.message : void 0,
|
|
134
134
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
135
|
-
renderCell:
|
|
136
|
-
className:
|
|
135
|
+
renderCell: q,
|
|
136
|
+
className: A.formsTableBody,
|
|
137
137
|
dataTestId: "forms-table"
|
|
138
138
|
}
|
|
139
139
|
) : /* @__PURE__ */ s(me, { align: "start", children: M.map((e, r) => {
|
|
@@ -142,7 +142,7 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
|
|
|
142
142
|
ue,
|
|
143
143
|
{
|
|
144
144
|
title: a,
|
|
145
|
-
className:
|
|
145
|
+
className: A.customAccordianItem,
|
|
146
146
|
testId: `accordian-title-${a}`,
|
|
147
147
|
open: r === 0,
|
|
148
148
|
children: /* @__PURE__ */ s(
|
|
@@ -155,8 +155,8 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
|
|
|
155
155
|
errorStateMessage: "",
|
|
156
156
|
sortable: z,
|
|
157
157
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
158
|
-
renderCell:
|
|
159
|
-
className:
|
|
158
|
+
renderCell: q,
|
|
159
|
+
className: A.formsTableBody,
|
|
160
160
|
dataTestId: `forms-table-${a}`
|
|
161
161
|
}
|
|
162
162
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-
|
|
2
|
-
import { h as d, i as f, l as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-QmRjMppG.js";
|
|
2
|
+
import { h as d, i as f, l as e } from "./index-BxuQZOhE.js";
|
|
3
3
|
var h = (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 i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { h, i as v, l as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-QmRjMppG.js";
|
|
2
|
+
import { h, i as v, l as e } from "./index-BxuQZOhE.js";
|
|
3
3
|
var C = (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 { d as V, a as w, u as S, $ as q, Z as G, X as H, f as Q, G as X, J as k, x as M, c as W, W as j, E as D, K as J, v as P, g as Y, H as Z, D as z, N as ee } from "./index-
|
|
2
|
+
import { d as V, a as w, u as S, $ as q, Z as G, X as H, f as Q, G as X, J as k, x as M, c as W, W as j, E as D, K as J, v as P, g as Y, H as Z, D as z, N as ee } from "./index-BxuQZOhE.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
4
|
+
import { useRef as se, useEffect as _, useMemo as g } from "react";
|
|
5
5
|
const F = (a, n, d, l, p, r) => {
|
|
6
6
|
const t = J(a, n, p), s = t.value, i = P(s);
|
|
7
7
|
let o = s;
|
|
@@ -120,7 +120,7 @@ const F = (a, n, d, l, p, r) => {
|
|
|
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
126
|
const K = d[h];
|
|
@@ -149,7 +149,7 @@ const F = (a, n, d, l, p, r) => {
|
|
|
149
149
|
) && T();
|
|
150
150
|
},
|
|
151
151
|
[t, T]
|
|
152
|
-
),
|
|
152
|
+
), _(() => {
|
|
153
153
|
R && s({
|
|
154
154
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
@@ -164,7 +164,7 @@ const F = (a, n, d, l, p, r) => {
|
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], f = A || !v,
|
|
167
|
+
], f = A || !v, O = R && v, C = (!c || c.entry?.length === 0 || m.length === 0) && v, U = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, x = C ? i("NO_OBSERVATIONS_FOUND") : void 0, B = $.length > 0 && !f && !O, E = n.titleTranslationKey, y = E ? i(E) : "";
|
|
168
168
|
return /* @__PURE__ */ I(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as we, o as z, p as xt, q as B, i as q, l as y, s as Ro, t as ye, S as R, w as _, y as k, z as N, C as A, L as bs, M as ir, O as $e, Q as U, T as Hn, U as Vn, V 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-
|
|
1
|
+
import { n as we, o as z, p as xt, q as B, i as q, l as y, s as Ro, t as ye, S as R, w as _, y as k, z as N, C as A, L as bs, M as ir, O as $e, Q as U, T as Hn, U as Vn, V 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-BxuQZOhE.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|