@bahmni/registration-app 0.0.1-dev.237 → 0.0.1-dev.238
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-DZLV91xy-CxzeGcPE.js → DocumentsTable-1XgzVmNY-CUKwxyaB.js} +9 -9
- package/dist/{FormsTable-Yt3aI_e6-EwL8PKkT.js → FormsTable-B0J51cB5-CHAQaAvN.js} +38 -38
- package/dist/{LNWAZHJI-mqLi1yCc.js → LNWAZHJI-CwQl5Led.js} +2 -2
- package/dist/{MWZ6AO7Z-BW_x4w9P.js → MWZ6AO7Z-D6gT730N.js} +2 -2
- package/dist/{Observations-DoBEcLrI-CMpRZG3h.js → Observations-Cqov9775-Cwd1FjVt.js} +4 -4
- package/dist/{YPM2AS64-BUe6iWAq.js → YPM2AS64-BkOnKXVX.js} +1 -1
- package/dist/{index-CUhWstXf.js → index-CO8q6vad.js} +3350 -3350
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/providers/registrationConfig/schema.json.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { t as K, u as Q, r as W, V as J, N as X, d as Z, o as ee, l as te } from "./index-
|
|
2
|
+
import { t as K, u as Q, r as W, V as J, N as X, d as Z, o as ee, l as te } from "./index-CO8q6vad.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, 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", le = "_documentImage_1voj8_50", d = {
|
|
@@ -21,10 +21,10 @@ const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11",
|
|
|
21
21
|
function j(a) {
|
|
22
22
|
return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
|
|
23
23
|
}
|
|
24
|
-
function ue(a,
|
|
24
|
+
function ue(a, g) {
|
|
25
25
|
return a.map((s) => ({
|
|
26
26
|
key: s,
|
|
27
|
-
header:
|
|
27
|
+
header: g(me[s])
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
const _e = [
|
|
@@ -33,12 +33,12 @@ const _e = [
|
|
|
33
33
|
"uploadedOn",
|
|
34
34
|
"uploadedBy",
|
|
35
35
|
"action"
|
|
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:
|
|
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
37
|
const [s, w] = l(!1), [o, L] = l(
|
|
38
38
|
null
|
|
39
39
|
), [R, I] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
),
|
|
41
|
+
), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, V] = l($), [k, y] = l(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());
|
|
@@ -47,15 +47,15 @@ const _e = [
|
|
|
47
47
|
}, []), { data: u, isLoading: H, isError: D, error: v } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
50
|
-
g,
|
|
51
50
|
E,
|
|
51
|
+
g,
|
|
52
52
|
C,
|
|
53
53
|
m
|
|
54
54
|
],
|
|
55
|
-
enabled: !!
|
|
55
|
+
enabled: !!E,
|
|
56
56
|
queryFn: () => J(
|
|
57
|
-
g,
|
|
58
57
|
E,
|
|
58
|
+
g,
|
|
59
59
|
m,
|
|
60
60
|
C
|
|
61
61
|
)
|
|
@@ -64,7 +64,7 @@ const _e = [
|
|
|
64
64
|
u && y(u.total);
|
|
65
65
|
}, [u]), f(() => {
|
|
66
66
|
A(1), y(void 0);
|
|
67
|
-
}, [
|
|
67
|
+
}, [E]), f(() => {
|
|
68
68
|
D && U({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: v?.message ?? "",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { u as Z, t as ee, g as re, y as ae, v as te, E as oe, a as se, B as ne, b as U, d as de, N as ie, o as S, Q as me, X as ue, l as le, c as ce, m as fe } from "./index-
|
|
2
|
+
import { u as Z, t as ee, g as re, y as ae, v as te, E as oe, a as se, B as ne, b as U, d as de, N as ie, o as S, Q as me, X as ue, l as le, c as ce, m as fe } from "./index-CO8q6vad.js";
|
|
3
3
|
import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
5
|
-
const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6",
|
|
4
|
+
import { useState as q, useMemo as d, useCallback as f } from "react";
|
|
5
|
+
const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
6
6
|
formsTableBody: be,
|
|
7
7
|
customAccordianItem: ge
|
|
8
|
-
},
|
|
8
|
+
}, pe = (m) => m ? m.extension?.find(
|
|
9
9
|
(n) => n.url === fe
|
|
10
|
-
)?.valueString : void 0,
|
|
10
|
+
)?.valueString : void 0, Ae = ({
|
|
11
11
|
episodeOfCareUuids: m,
|
|
12
12
|
encounterUuids: n,
|
|
13
|
-
config:
|
|
13
|
+
config: C
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: o } = Z(), u = ee(), [l,
|
|
15
|
+
const { t: o } = Z(), u = ee(), [l, O] = q(!1), [t, A] = q(null), { numberOfVisits: k, hideThumbnail: H = !1 } = C ?? {}, B = re(
|
|
16
16
|
m,
|
|
17
17
|
n
|
|
18
18
|
), K = ye(), {
|
|
@@ -24,19 +24,19 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
24
24
|
} = c({
|
|
25
25
|
queryKey: ["forms", u, m],
|
|
26
26
|
queryFn: () => ae(u, void 0, k),
|
|
27
|
-
enabled: !!u && !
|
|
28
|
-
}),
|
|
27
|
+
enabled: !!u && !B
|
|
28
|
+
}), F = d(() => !n || n.length === 0 ? y : y.filter(
|
|
29
29
|
(e) => n.includes(e.encounterUuid)
|
|
30
|
-
), [y, n]), { data:
|
|
30
|
+
), [y, n]), { data: _ = [] } = c({
|
|
31
31
|
queryKey: ["observationForms"],
|
|
32
32
|
queryFn: () => te()
|
|
33
|
-
}),
|
|
34
|
-
(e) =>
|
|
35
|
-
[
|
|
33
|
+
}), v = f(
|
|
34
|
+
(e) => _.find((r) => r.name === e)?.uuid,
|
|
35
|
+
[_]
|
|
36
36
|
), b = d(() => {
|
|
37
37
|
if (t)
|
|
38
|
-
return
|
|
39
|
-
}, [t,
|
|
38
|
+
return v(t.formName);
|
|
39
|
+
}, [t, v]), {
|
|
40
40
|
isLoading: j,
|
|
41
41
|
isError: x,
|
|
42
42
|
error: g
|
|
@@ -45,10 +45,10 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
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: N
|
|
52
52
|
} = c({
|
|
53
53
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
54
54
|
queryFn: () => se(t.encounterUuid),
|
|
@@ -60,15 +60,15 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
60
60
|
},
|
|
61
61
|
[u]
|
|
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
|
-
}), [
|
|
66
|
+
}), [p, t?.formName]), G = d(() => {
|
|
67
67
|
if (g)
|
|
68
68
|
return U(g).message;
|
|
69
|
-
if (
|
|
70
|
-
return U(
|
|
71
|
-
}, [g,
|
|
69
|
+
if (N)
|
|
70
|
+
return U(N).message;
|
|
71
|
+
}, [g, N]), L = d(
|
|
72
72
|
() => [
|
|
73
73
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
74
74
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
@@ -80,8 +80,8 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
80
80
|
{ key: "recordedBy", sortable: !0 }
|
|
81
81
|
],
|
|
82
82
|
[]
|
|
83
|
-
),
|
|
84
|
-
const e =
|
|
83
|
+
), M = d(() => {
|
|
84
|
+
const e = F.reduce(
|
|
85
85
|
(r, a) => {
|
|
86
86
|
const i = a.formName;
|
|
87
87
|
r[i] ??= [];
|
|
@@ -105,50 +105,50 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
105
105
|
)
|
|
106
106
|
})
|
|
107
107
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
108
|
-
}, [
|
|
109
|
-
|
|
108
|
+
}, [F, o]), D = f((e) => {
|
|
109
|
+
A(e), O(!0);
|
|
110
110
|
}, []), X = f(() => {
|
|
111
|
-
|
|
111
|
+
O(!1), A(null);
|
|
112
112
|
}, []), R = 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
|
-
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children: E || T ||
|
|
126
|
+
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children: E || T || M.length === 0 || B ? /* @__PURE__ */ s(
|
|
127
127
|
S,
|
|
128
128
|
{
|
|
129
|
-
headers:
|
|
129
|
+
headers: L,
|
|
130
130
|
ariaLabel: o("FORMS_HEADING"),
|
|
131
131
|
rows: [],
|
|
132
132
|
loading: E,
|
|
133
133
|
errorStateMessage: T ? Q?.message : void 0,
|
|
134
134
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
135
135
|
renderCell: R,
|
|
136
|
-
className:
|
|
136
|
+
className: I.formsTableBody,
|
|
137
137
|
dataTestId: "forms-table"
|
|
138
138
|
}
|
|
139
|
-
) : /* @__PURE__ */ s(me, { align: "start", children:
|
|
139
|
+
) : /* @__PURE__ */ s(me, { align: "start", children: M.map((e, r) => {
|
|
140
140
|
const { formName: a, records: i } = e;
|
|
141
141
|
return /* @__PURE__ */ s(
|
|
142
142
|
ue,
|
|
143
143
|
{
|
|
144
144
|
title: a,
|
|
145
|
-
className:
|
|
145
|
+
className: I.customAccordianItem,
|
|
146
146
|
testId: `accordian-title-${a}`,
|
|
147
147
|
open: r === 0,
|
|
148
148
|
children: /* @__PURE__ */ s(
|
|
149
149
|
S,
|
|
150
150
|
{
|
|
151
|
-
headers:
|
|
151
|
+
headers: L,
|
|
152
152
|
ariaLabel: o("FORMS_HEADING"),
|
|
153
153
|
rows: i,
|
|
154
154
|
loading: !1,
|
|
@@ -156,7 +156,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
156
156
|
sortable: P,
|
|
157
157
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
158
158
|
renderCell: R,
|
|
159
|
-
className:
|
|
159
|
+
className: I.formsTableBody,
|
|
160
160
|
dataTestId: `forms-table-${a}`
|
|
161
161
|
}
|
|
162
162
|
)
|
|
@@ -193,5 +193,5 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
|
193
193
|
] });
|
|
194
194
|
};
|
|
195
195
|
export {
|
|
196
|
-
|
|
196
|
+
Ae as default
|
|
197
197
|
};
|
|
@@ -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 { k as p, n as d, p as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BkOnKXVX.js";
|
|
2
|
+
import { k as p, n as d, p as e } from "./index-CO8q6vad.js";
|
|
3
3
|
var f = (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 { k as v, n as C, p 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-BkOnKXVX.js";
|
|
2
|
+
import { k as v, n as C, p as e } from "./index-CO8q6vad.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as N, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { t as k, r as w, u as S, f as x, w as G, B as K, e as M, z as Q, A as Y, Y as j, o as z, M as H, G as F, x as P, h as J, F as W, i as X, T as Z, j as ee } from "./index-
|
|
2
|
+
import { t as k, r as w, u as S, f as x, w as G, B as K, e as M, z as Q, A as Y, Y as j, o as z, M as H, G as F, x as P, h as J, F as W, i as X, T as Z, j as ee } from "./index-CO8q6vad.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as $, useMemo as T } from "react";
|
|
5
5
|
const A = (t, n, d, l, b, r) => {
|
|
@@ -134,7 +134,7 @@ const A = (t, n, d, l, b, r) => {
|
|
|
134
134
|
}, [o, d]);
|
|
135
135
|
const m = T(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = T(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = T(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: U,
|
|
138
138
|
isError: f,
|
|
139
139
|
refetch: R
|
|
140
140
|
} = ae({
|
|
@@ -164,7 +164,7 @@ const A = (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
|
-
], O =
|
|
167
|
+
], O = U || !y, _ = f && y, B = (!c || c.entry?.length === 0 || p.length === 0) && y, L = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, q = B ? i("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
168
|
return /* @__PURE__ */ N(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -198,7 +198,7 @@ const A = (t, n, d, l, b, r) => {
|
|
|
198
198
|
ariaLabel: i("OBSERVATIONS"),
|
|
199
199
|
loading: O,
|
|
200
200
|
errorStateMessage: L,
|
|
201
|
-
emptyStateMessage:
|
|
201
|
+
emptyStateMessage: q,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as we, s as z, C as xt, D as B, n as q, p as y, P as Ro, H as ye, S as R, I as _, J as k, K as N, L as A, O as bs, R as ir, U as $e, W as U, Z as Hn, _ 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-
|
|
1
|
+
import { q as we, s as z, C as xt, D as B, n as q, p as y, P as Ro, H as ye, S as R, I as _, J as k, K as N, L as A, O as bs, R as ir, U as $e, W as U, Z as Hn, _ 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-CO8q6vad.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|