@bahmni/appointments-app 0.0.1-dev.398 → 0.0.1-dev.401
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-CyCmTrjB-DB3bllk4.js → DocumentsTable-BYyXnEYb-DVvHlY_b.js} +23 -23
- package/dist/{FormsTable-CMtT3i5o-CMUc-_U8.js → FormsTable-lAAkDRQQ-DxDgcp86.js} +11 -11
- package/dist/{LNWAZHJI-Dj2t68TS.js → LNWAZHJI-2hNd5SEB.js} +2 -2
- package/dist/{MWZ6AO7Z-CVK0RtJg.js → MWZ6AO7Z-D4kHlEjD.js} +2 -2
- package/dist/{Observations-Cco2HyR_-BnfST746.js → Observations-DGEkuYFv-Cz4I1O7m.js} +14 -14
- package/dist/{YPM2AS64-B_E24tMN.js → YPM2AS64-PInLdgeX.js} +1 -1
- package/dist/{index-Cjx4xv_3.js → index-BtK4jcwc.js} +196 -178
- package/dist/{index-D_O_BwJy.js → index-Cg1sZ8wQ.js} +6 -6
- package/dist/{index-BOlu0-kU.js → index-DiUwH_qI.js} +23 -23
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as G } from "react/jsx-runtime";
|
|
2
|
-
import { g as Q, u as Y,
|
|
2
|
+
import { g as Q, u as Y, C as W, B as J, q as X, w as Z, K as ee, p as te } from "./index-BtK4jcwc.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as l, useCallback as h, useEffect as
|
|
4
|
+
import { useState as l, useCallback as h, useEffect as D, useMemo as _ } from "react";
|
|
5
5
|
const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
@@ -34,22 +34,22 @@ const Te = [
|
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
36
|
], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, R = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids: g }) => {
|
|
37
|
-
const [s, w] = l(!1), [o,
|
|
37
|
+
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
|
-
), [$,
|
|
39
|
+
), [$, I] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = Q(), { t: n } = Y(), { addNotification:
|
|
42
|
-
|
|
41
|
+
), E = Q(), { t: n } = Y(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [O, f] = l(1), [u, V] = l(k), [q, A] = l(void 0), M = h((e) => {
|
|
42
|
+
U(e), w(!0);
|
|
43
43
|
}, []), F = h(() => {
|
|
44
|
-
w(!1),
|
|
44
|
+
w(!1), U(null), I(/* @__PURE__ */ new Set());
|
|
45
45
|
}, []), v = h((e) => {
|
|
46
|
-
|
|
46
|
+
I((t) => new Set(t).add(e));
|
|
47
47
|
}, []), { data: i, isLoading: H, isError: y, error: b } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
50
50
|
E,
|
|
51
51
|
g,
|
|
52
|
-
|
|
52
|
+
O,
|
|
53
53
|
u
|
|
54
54
|
],
|
|
55
55
|
enabled: !!E,
|
|
@@ -57,20 +57,20 @@ const Te = [
|
|
|
57
57
|
E,
|
|
58
58
|
g,
|
|
59
59
|
u,
|
|
60
|
-
|
|
60
|
+
O
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
D(() => {
|
|
64
64
|
i && A(i.total);
|
|
65
|
-
}, [i]),
|
|
66
|
-
|
|
67
|
-
}, [E]),
|
|
68
|
-
y &&
|
|
65
|
+
}, [i]), D(() => {
|
|
66
|
+
f(1), A(void 0);
|
|
67
|
+
}, [E]), D(() => {
|
|
68
|
+
y && L({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: b?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [y, b,
|
|
73
|
+
}, [y, b, L, n]), D(() => {
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
@@ -82,16 +82,16 @@ const Te = [
|
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
84
|
})).ok || t.add(c);
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
85
|
+
} catch (C) {
|
|
86
|
+
C instanceof Error && C.name !== "AbortError" && t.add(c);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
e.signal.aborted ||
|
|
89
|
+
e.signal.aborted || I(t);
|
|
90
90
|
})(), () => e.abort();
|
|
91
91
|
}, [s, o]);
|
|
92
92
|
const K = h(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !== u ? (V(t),
|
|
94
|
+
t !== u ? (V(t), f(1), A(void 0)) : f(e);
|
|
95
95
|
},
|
|
96
96
|
[u]
|
|
97
97
|
), N = _(
|
|
@@ -153,7 +153,7 @@ const Te = [
|
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
155
155
|
totalItems: q,
|
|
156
|
-
page:
|
|
156
|
+
page: O,
|
|
157
157
|
onPageChange: K
|
|
158
158
|
}
|
|
159
159
|
) }),
|
|
@@ -169,8 +169,8 @@ const Te = [
|
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
171
|
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: T.map((e, t) => {
|
|
172
|
-
const m = B(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""),
|
|
173
|
-
return m === "#" ||
|
|
172
|
+
const m = B(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), C = $.has(t);
|
|
173
|
+
return m === "#" || C ? /* @__PURE__ */ p(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as P, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import { u as ge, g as be,
|
|
2
|
+
import { u as ge, g as be, e as Ne, a as Oe, v as Te, k as Ee, o as Ie, Z as ve, F as Ae, m as _e, Y as Fe, G as Se, b as $, w as Be, N as x, E as G, q as Me, K as Y, c as Re, P as Ce, p as Le, d as Ue, n as ke } from "./index-BtK4jcwc.js";
|
|
3
3
|
import { useQueryClient as De, useQuery as O } from "@tanstack/react-query";
|
|
4
4
|
import { useState as Q, useMemo as d, useCallback as c } from "react";
|
|
5
5
|
const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
@@ -66,28 +66,28 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
66
66
|
data: l,
|
|
67
67
|
isLoading: te,
|
|
68
68
|
isError: se,
|
|
69
|
-
error:
|
|
69
|
+
error: v
|
|
70
70
|
} = O({
|
|
71
71
|
queryKey: ["formMetadata", I],
|
|
72
|
-
queryFn: () =>
|
|
72
|
+
queryFn: () => ve(I),
|
|
73
73
|
enabled: !!I && y
|
|
74
74
|
}), {
|
|
75
|
-
data:
|
|
75
|
+
data: A,
|
|
76
76
|
isLoading: ne,
|
|
77
77
|
isError: ie,
|
|
78
|
-
error:
|
|
78
|
+
error: _
|
|
79
79
|
} = O({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
81
|
-
queryFn: () =>
|
|
81
|
+
queryFn: () => Ae(s.encounterUuid),
|
|
82
82
|
enabled: !!s?.encounterUuid && y
|
|
83
83
|
});
|
|
84
|
-
|
|
84
|
+
_e(
|
|
85
85
|
(e) => {
|
|
86
86
|
e.patientUUID === u && (ae(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
87
87
|
},
|
|
88
88
|
[u]
|
|
89
89
|
);
|
|
90
|
-
const de = d(() => !
|
|
90
|
+
const de = d(() => !A?.entry || !s?.formName ? [] : A.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Se(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [A, s?.formName]), le = d(() => {
|
|
91
91
|
if (!l?.schema) return;
|
|
92
92
|
const e = [], r = (o) => {
|
|
93
93
|
(o ?? []).forEach((t) => {
|
|
@@ -124,11 +124,11 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
124
124
|
l.schema.controls ?? []
|
|
125
125
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
126
126
|
}, [l]), ue = d(() => {
|
|
127
|
+
if (v)
|
|
128
|
+
return $(v).message;
|
|
127
129
|
if (_)
|
|
128
130
|
return $(_).message;
|
|
129
|
-
|
|
130
|
-
return $(A).message;
|
|
131
|
-
}, [_, A]), p = d(
|
|
131
|
+
}, [v, _]), p = d(
|
|
132
132
|
() => [
|
|
133
133
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
134
134
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
@@ -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 { an as p, ao as d, ap as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-PInLdgeX.js";
|
|
2
|
+
import { an as p, ao as d, ap as e } from "./index-BtK4jcwc.js";
|
|
3
3
|
var f = (a) => {
|
|
4
4
|
const [r, o] = 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 { an as v, ao as C, ap 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-PInLdgeX.js";
|
|
2
|
+
import { an as v, ao as C, ap as e } from "./index-BtK4jcwc.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { g as q,
|
|
2
|
+
import { g as q, C as k, u as N, $ as x, I as G, m as Q, f as j, h as w, J as H, i as J, K as M, j as z, l as C, r as P, s as Y, y as W, t as X, V as Z, x as ee } from "./index-BtK4jcwc.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as $, useMemo as g } from "react";
|
|
5
|
-
const
|
|
5
|
+
const D = (a, n, d, l, b, r) => {
|
|
6
6
|
const t = P(a, n, b), s = t.value, i = Y(s);
|
|
7
7
|
let o = s;
|
|
8
8
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
@@ -37,13 +37,13 @@ const C = (a, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${a.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
C,
|
|
41
41
|
{
|
|
42
42
|
title: a.display,
|
|
43
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: a.members?.map(
|
|
46
|
-
(s, i) =>
|
|
46
|
+
(s, i) => D(
|
|
47
47
|
s,
|
|
48
48
|
i,
|
|
49
49
|
b,
|
|
@@ -62,14 +62,14 @@ const C = (a, n, d, l, b, r) => {
|
|
|
62
62
|
const { t: l } = N(), b = (r, t, s) => {
|
|
63
63
|
const i = z(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ S(
|
|
65
|
-
|
|
65
|
+
C,
|
|
66
66
|
{
|
|
67
67
|
title: i,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(o, m) =>
|
|
72
|
+
(o, m) => D(
|
|
73
73
|
o,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -116,7 +116,7 @@ const C = (a, n, d, l, b, r) => {
|
|
|
116
116
|
} = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = k(), { t: i } = N(), o = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => x(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
@@ -134,15 +134,15 @@ const C = (a, n, d, l, b, r) => {
|
|
|
134
134
|
}, [o, d]);
|
|
135
135
|
const m = g(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), h = g(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: F,
|
|
138
138
|
isError: R,
|
|
139
139
|
refetch: T
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => G(t, p),
|
|
143
143
|
enabled: !!t && p.length > 0 && h
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
Q(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(y) => p.includes(y)
|
|
@@ -158,13 +158,13 @@ const C = (a, n, d, l, b, r) => {
|
|
|
158
158
|
}, [R]);
|
|
159
159
|
const f = g(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
161
|
+
const e = j(c), y = w(e);
|
|
162
162
|
return H(y);
|
|
163
|
-
}, [c]),
|
|
163
|
+
}, [c]), K = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], I =
|
|
167
|
+
], I = F || !h, O = R && h, L = (!c || c.entry?.length === 0 || p.length === 0) && h, V = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, A = L ? i("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !I && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -193,7 +193,7 @@ const C = (a, n, d, l, b, r) => {
|
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
194
|
M,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: K,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: i("OBSERVATIONS"),
|
|
199
199
|
loading: I,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-
|
|
1
|
+
import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-BtK4jcwc.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|