@bahmni/appointments-app 0.0.1-dev.227 → 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-shXAD18V-DsaBw_ir.js → DocumentsTable-6tDw4SyX-DfiYQ172.js} +2 -2
- package/dist/{FormsTable-c_7c8Ui_-CfqjTwJ7.js → FormsTable-BXY2feyi-BdZT4I1H.js} +28 -28
- package/dist/{LNWAZHJI-FQiwVjA9.js → LNWAZHJI-BY5aGxON.js} +2 -2
- package/dist/{MWZ6AO7Z-8W43Qh6F.js → MWZ6AO7Z-CjkrcQyI.js} +2 -2
- package/dist/{Observations-l5ywNrSr-fPnAV9OO.js → Observations-BEqqihoJ-CoEpsvA3.js} +28 -28
- package/dist/{YPM2AS64-DiNOK4y3.js → YPM2AS64-CeVAFQXP.js} +138 -138
- package/dist/{index-CfxTqOlJ.js → index-CxnXRrUj.js} +17 -17
- package/dist/{index-C9IugmAj.js → index-DgXd_LG2.js} +22866 -22827
- package/dist/index.css +1 -1
- package/dist/index.js +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
|
|
2
|
+
import { t as K, u as Q, r as W, a as J, M as X, N as Z, o as ee, s as te, b as ae } from "./index-DgXd_LG2.js";
|
|
3
3
|
import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
|
|
4
4
|
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 = {
|
|
5
5
|
documentsTableBody: ne,
|
|
@@ -37,7 +37,7 @@ const _e = [
|
|
|
37
37
|
null
|
|
38
38
|
), [R, I] = l(
|
|
39
39
|
/* @__PURE__ */ new Set()
|
|
40
|
-
), E =
|
|
40
|
+
), E = K(), { t: n } = Q(), { addNotification: L } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), U = h((e) => {
|
|
41
41
|
M(e), w(!0);
|
|
42
42
|
}, []), F = h(() => {
|
|
43
43
|
w(!1), M(null), I(/* @__PURE__ */ new Set());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as W, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import { u as Z, t as ee, m as re, c as ae, a as c, k as te, V as U, N as se, M as oe, o as S, G as ne, J as de, s as ie, P as ue, d as me, i as le, e as ce, f as fe, n as ye } from "./index-DgXd_LG2.js";
|
|
3
|
+
import { useState as q, useMemo as d, useCallback as f } from "react";
|
|
4
4
|
const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
5
5
|
formsTableBody: be,
|
|
6
6
|
customAccordianItem: Ne
|
|
@@ -9,17 +9,17 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
9
9
|
)?.valueString : void 0, Ae = ({
|
|
10
10
|
episodeOfCareUuids: u,
|
|
11
11
|
encounterUuids: n,
|
|
12
|
-
config:
|
|
12
|
+
config: C
|
|
13
13
|
}) => {
|
|
14
|
-
const { t: s } =
|
|
14
|
+
const { t: s } = Z(), m = ee(), [l, A] = q(!1), [t, I] = q(null), { numberOfVisits: k, hideThumbnail: V = !1 } = C ?? {}, M = re(
|
|
15
15
|
u,
|
|
16
16
|
n
|
|
17
|
-
),
|
|
17
|
+
), H = ae(), {
|
|
18
18
|
data: y = [],
|
|
19
19
|
isLoading: T,
|
|
20
20
|
isError: B,
|
|
21
|
-
error:
|
|
22
|
-
refetch:
|
|
21
|
+
error: K,
|
|
22
|
+
refetch: j
|
|
23
23
|
} = c({
|
|
24
24
|
queryKey: ["forms", m, u],
|
|
25
25
|
queryFn: () => le(m, void 0, k),
|
|
@@ -36,8 +36,8 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
36
36
|
if (t)
|
|
37
37
|
return D(t.formName);
|
|
38
38
|
}, [t, D]), {
|
|
39
|
-
isLoading:
|
|
40
|
-
isError:
|
|
39
|
+
isLoading: x,
|
|
40
|
+
isError: G,
|
|
41
41
|
error: N
|
|
42
42
|
} = c({
|
|
43
43
|
queryKey: ["formMetadata", b],
|
|
@@ -45,8 +45,8 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
45
45
|
enabled: !!b && l
|
|
46
46
|
}), {
|
|
47
47
|
data: p,
|
|
48
|
-
isLoading:
|
|
49
|
-
isError:
|
|
48
|
+
isLoading: $,
|
|
49
|
+
isError: w,
|
|
50
50
|
error: g
|
|
51
51
|
} = c({
|
|
52
52
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
@@ -55,14 +55,14 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
55
55
|
});
|
|
56
56
|
te(
|
|
57
57
|
(e) => {
|
|
58
|
-
e.patientUUID === m && e.updatedConcepts.size > 0 && (
|
|
58
|
+
e.patientUUID === m && e.updatedConcepts.size > 0 && (j(), H.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
59
59
|
},
|
|
60
60
|
[m]
|
|
61
61
|
);
|
|
62
|
-
const
|
|
62
|
+
const P = d(() => !p?.entry || !t?.formName ? [] : p.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
63
63
|
const r = pe(e);
|
|
64
64
|
return !r || r.includes(t.formName);
|
|
65
|
-
}), [p, t?.formName]),
|
|
65
|
+
}), [p, t?.formName]), Q = d(() => {
|
|
66
66
|
if (N)
|
|
67
67
|
return U(N).message;
|
|
68
68
|
if (g)
|
|
@@ -73,7 +73,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
73
73
|
{ key: "recordedBy", header: s("RECORDED_BY") }
|
|
74
74
|
],
|
|
75
75
|
[s]
|
|
76
|
-
),
|
|
76
|
+
), z = d(
|
|
77
77
|
() => [
|
|
78
78
|
{ key: "recordedOn", sortable: !0 },
|
|
79
79
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -84,7 +84,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
84
84
|
(r, a) => {
|
|
85
85
|
const i = a.formName;
|
|
86
86
|
r[i] ??= [];
|
|
87
|
-
const h = a.providers.map((
|
|
87
|
+
const h = a.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
|
|
88
88
|
return r[i].push({
|
|
89
89
|
id: a.encounterUuid,
|
|
90
90
|
formName: a.formName,
|
|
@@ -106,7 +106,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
106
106
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
107
107
|
}, [E, s]), R = f((e) => {
|
|
108
108
|
I(e), A(!0);
|
|
109
|
-
}, []),
|
|
109
|
+
}, []), J = f(() => {
|
|
110
110
|
A(!1), I(null);
|
|
111
111
|
}, []), v = f(
|
|
112
112
|
(e, r) => {
|
|
@@ -121,15 +121,15 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
121
121
|
},
|
|
122
122
|
[R]
|
|
123
123
|
);
|
|
124
|
-
return /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ W(X, { children: [
|
|
125
125
|
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: T || B || L.length === 0 || M ? /* @__PURE__ */ o(
|
|
126
|
-
|
|
126
|
+
S,
|
|
127
127
|
{
|
|
128
128
|
headers: F,
|
|
129
129
|
ariaLabel: s("FORMS_HEADING"),
|
|
130
130
|
rows: [],
|
|
131
131
|
loading: T,
|
|
132
|
-
errorStateMessage: B ?
|
|
132
|
+
errorStateMessage: B ? K?.message : void 0,
|
|
133
133
|
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
134
134
|
renderCell: v,
|
|
135
135
|
className: O.formsTableBody,
|
|
@@ -145,14 +145,14 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
145
145
|
testId: `accordian-title-${a}`,
|
|
146
146
|
open: r === 0,
|
|
147
147
|
children: /* @__PURE__ */ o(
|
|
148
|
-
|
|
148
|
+
S,
|
|
149
149
|
{
|
|
150
150
|
headers: F,
|
|
151
151
|
ariaLabel: s("FORMS_HEADING"),
|
|
152
152
|
rows: i,
|
|
153
153
|
loading: !1,
|
|
154
154
|
errorStateMessage: "",
|
|
155
|
-
sortable:
|
|
155
|
+
sortable: z,
|
|
156
156
|
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
157
157
|
renderCell: v,
|
|
158
158
|
className: O.formsTableBody,
|
|
@@ -169,7 +169,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
169
169
|
id: "modalIdForActionAreaLayout",
|
|
170
170
|
portalId: "main-display-area",
|
|
171
171
|
open: l,
|
|
172
|
-
onRequestClose:
|
|
172
|
+
onRequestClose: J,
|
|
173
173
|
modalHeading: t.formName,
|
|
174
174
|
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
175
175
|
passiveModal: !0,
|
|
@@ -178,10 +178,10 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
|
|
|
178
178
|
children: /* @__PURE__ */ o(
|
|
179
179
|
ue,
|
|
180
180
|
{
|
|
181
|
-
observations:
|
|
182
|
-
isLoading:
|
|
183
|
-
isError:
|
|
184
|
-
errorMessage:
|
|
181
|
+
observations: P,
|
|
182
|
+
isLoading: x || $,
|
|
183
|
+
isError: G || w,
|
|
184
|
+
errorMessage: Q,
|
|
185
185
|
emptyStateMessage: s("NO_FORM_DATA_AVAILABLE"),
|
|
186
186
|
testIdPrefix: t.formName,
|
|
187
187
|
hideThumbnail: V
|
|
@@ -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-CeVAFQXP.js";
|
|
2
|
+
import { X as d, Y as f, Z as e } from "./index-DgXd_LG2.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-CeVAFQXP.js";
|
|
2
|
+
import { X as v, Y as C, Z as e } from "./index-DgXd_LG2.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
|
|
3
|
-
import { useRef as se, useEffect as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { t as B, r as K, u as N, g as j, h as w, a as x, k as G, j as M, p as Q, l as H, q as z, o as P, v as Y, $ as U, w as J, x as W, y as X, E as Z, T as ee, z as ae, A as te } from "./index-DgXd_LG2.js";
|
|
3
|
+
import { useRef as se, useEffect as _, useMemo as T } from "react";
|
|
4
|
+
const A = (a, n, d, l, b, r) => {
|
|
5
5
|
const t = J(a, n, b), s = t.value, i = W(s);
|
|
6
6
|
let o = s;
|
|
7
7
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
@@ -42,7 +42,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
42
42
|
id: `grouped-obs-${a.display}-${l}`,
|
|
43
43
|
open: d,
|
|
44
44
|
children: a.members?.map(
|
|
45
|
-
(s, i) =>
|
|
45
|
+
(s, i) => A(
|
|
46
46
|
s,
|
|
47
47
|
i,
|
|
48
48
|
b,
|
|
@@ -58,9 +58,9 @@ const D = (a, n, d, l, b, r) => {
|
|
|
58
58
|
title: n = "",
|
|
59
59
|
hideThumbnail: d
|
|
60
60
|
}) => {
|
|
61
|
-
const { t: l } =
|
|
62
|
-
const i =
|
|
63
|
-
return /* @__PURE__ */
|
|
61
|
+
const { t: l } = N(), b = (r, t, s) => {
|
|
62
|
+
const i = Y(r.encounterDetails, l);
|
|
63
|
+
return /* @__PURE__ */ S(
|
|
64
64
|
U,
|
|
65
65
|
{
|
|
66
66
|
title: i,
|
|
@@ -68,7 +68,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
68
68
|
open: t,
|
|
69
69
|
children: [
|
|
70
70
|
r.observations.map(
|
|
71
|
-
(o, p) =>
|
|
71
|
+
(o, p) => A(
|
|
72
72
|
o,
|
|
73
73
|
p,
|
|
74
74
|
s,
|
|
@@ -112,59 +112,59 @@ const D = (a, n, d, l, b, r) => {
|
|
|
112
112
|
conceptNames: d = [],
|
|
113
113
|
conceptUuid: l = [],
|
|
114
114
|
hideThumbnail: b = !1
|
|
115
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t =
|
|
115
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = K(), { t: i } = N(), o = j({
|
|
116
116
|
queries: d.map((e) => ({
|
|
117
117
|
queryKey: de(e),
|
|
118
118
|
queryFn: () => w(e),
|
|
119
119
|
enabled: !!e
|
|
120
120
|
}))
|
|
121
121
|
});
|
|
122
|
-
|
|
122
|
+
_(() => {
|
|
123
123
|
o.forEach((e, h) => {
|
|
124
124
|
if (e.isError && !r.current.has(h)) {
|
|
125
|
-
const
|
|
125
|
+
const V = d[h];
|
|
126
126
|
s({
|
|
127
127
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
128
|
-
message: i("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
128
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
|
|
129
129
|
type: "error"
|
|
130
130
|
}), r.current.add(h);
|
|
131
131
|
} else e.isError || r.current.delete(h);
|
|
132
132
|
});
|
|
133
133
|
}, [o, d]);
|
|
134
|
-
const p =
|
|
134
|
+
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]), {
|
|
135
135
|
data: c,
|
|
136
|
-
isLoading:
|
|
137
|
-
isError:
|
|
136
|
+
isLoading: D,
|
|
137
|
+
isError: R,
|
|
138
138
|
refetch: f
|
|
139
139
|
} = x({
|
|
140
140
|
queryKey: le(t, m),
|
|
141
141
|
queryFn: () => te(t, m),
|
|
142
142
|
enabled: !!t && m.length > 0 && y
|
|
143
143
|
});
|
|
144
|
-
|
|
144
|
+
G(
|
|
145
145
|
(e) => {
|
|
146
146
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
147
147
|
(h) => m.includes(h)
|
|
148
148
|
) && f();
|
|
149
149
|
},
|
|
150
150
|
[t, f]
|
|
151
|
-
),
|
|
152
|
-
|
|
151
|
+
), _(() => {
|
|
152
|
+
R && s({
|
|
153
153
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
154
154
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
155
155
|
type: "error"
|
|
156
156
|
});
|
|
157
|
-
}, [
|
|
158
|
-
const g =
|
|
157
|
+
}, [R]);
|
|
158
|
+
const g = T(() => {
|
|
159
159
|
if (!c) return [];
|
|
160
|
-
const e =
|
|
160
|
+
const e = M(c), h = Q(e);
|
|
161
161
|
return H(h);
|
|
162
|
-
}, [c]),
|
|
162
|
+
}, [c]), F = [
|
|
163
163
|
{ key: "name", header: "name" },
|
|
164
164
|
{ key: "value", header: "value" },
|
|
165
165
|
{ key: "form", header: "form" }
|
|
166
|
-
],
|
|
167
|
-
return /* @__PURE__ */
|
|
166
|
+
], $ = D || !y, O = R && y, q = (!c || c.entry?.length === 0 || m.length === 0) && y, L = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, k = q ? i("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !$ && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
167
|
+
return /* @__PURE__ */ S(
|
|
168
168
|
"div",
|
|
169
169
|
{
|
|
170
170
|
id: "observations",
|
|
@@ -173,7 +173,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
173
173
|
className: I.observations,
|
|
174
174
|
children: [
|
|
175
175
|
/* @__PURE__ */ u(
|
|
176
|
-
|
|
176
|
+
z,
|
|
177
177
|
{
|
|
178
178
|
id: "observations-title",
|
|
179
179
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
@@ -192,10 +192,10 @@ const D = (a, n, d, l, b, r) => {
|
|
|
192
192
|
) : /* @__PURE__ */ u(
|
|
193
193
|
P,
|
|
194
194
|
{
|
|
195
|
-
headers:
|
|
195
|
+
headers: F,
|
|
196
196
|
rows: [],
|
|
197
197
|
ariaLabel: i("OBSERVATIONS"),
|
|
198
|
-
loading:
|
|
198
|
+
loading: $,
|
|
199
199
|
errorStateMessage: L,
|
|
200
200
|
emptyStateMessage: k,
|
|
201
201
|
dataTestId: "observations-table"
|