@bahmni/reports-app 0.0.1-dev.455 → 0.0.1-dev.457
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-DZ1zyEeJ-DABASslp.js → DocumentsTable-BY19cMyH-C_hDo9LW.js} +61 -61
- package/dist/{FormsTable-C1Yy7yQt-CNwCapgX.js → FormsTable-D04JNgYd-DHkJQESF.js} +57 -57
- package/dist/{LNWAZHJI-pbosfkqW.js → LNWAZHJI-Dp9-DjTn.js} +10 -10
- package/dist/{MWZ6AO7Z-a_vR_MdQ.js → MWZ6AO7Z-DCN3dl79.js} +7 -7
- package/dist/{Observations-D079FoDG-BGwIPW_z.js → Observations-B0V1ebXI-M-Exclxs.js} +21 -21
- package/dist/ReportsPage-DHGuOQY_.js +887 -0
- package/dist/{YPM2AS64-Cp3d5iX-.js → YPM2AS64-Dx-EiwQF.js} +1 -1
- package/dist/components/ReportList/ReportList.d.ts.map +1 -1
- package/dist/components/ReportList/ReportsTable.d.ts +1 -0
- package/dist/components/ReportList/ReportsTable.d.ts.map +1 -1
- package/dist/components/ReportList/TableFilters.d.ts.map +1 -1
- package/dist/components/ReportList/appConfigSchema.json.d.ts +4 -0
- package/dist/components/ReportList/constants.d.ts +2 -1
- package/dist/components/ReportList/constants.d.ts.map +1 -1
- package/dist/components/ReportList/models.d.ts +3 -0
- package/dist/components/ReportList/models.d.ts.map +1 -1
- package/dist/components/ReportList/utils.d.ts +4 -0
- package/dist/components/ReportList/utils.d.ts.map +1 -1
- package/dist/hooks/useQueueReport.d.ts +7 -0
- package/dist/hooks/useQueueReport.d.ts.map +1 -0
- package/dist/hooks/useReportTableState.d.ts +10 -2
- package/dist/hooks/useReportTableState.d.ts.map +1 -1
- package/dist/hooks/useRunReport.d.ts +1 -1
- package/dist/hooks/useRunReport.d.ts.map +1 -1
- package/dist/{index-j-6IAmqw.js → index-D-SD6TFa.js} +29047 -28995
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/locales/locale_en.json +16 -0
- package/dist/locales/locale_es.json +16 -0
- package/dist/utils/reportAuditEvent.d.ts +8 -0
- package/dist/utils/reportAuditEvent.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/ReportsPage-CcVV2dV0.js +0 -666
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { d as
|
|
2
|
+
import { d as Q, z as x, u as L, $ as M, f as G, p as J, H as P, a as X, r as Y, P as j, s as Z, v as W, b as ee, I as ae, S as se, y as B, B as te, X as re, h as ie, C as oe, Y as ne, D as de, J as le } from "./index-D-SD6TFa.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as pe, useEffect as
|
|
4
|
+
import { useRef as pe, useEffect as D, useMemo as g } from "react";
|
|
5
5
|
const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
|
|
6
6
|
observations: me,
|
|
7
7
|
title: be,
|
|
@@ -132,29 +132,29 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: t = [],
|
|
133
133
|
hideThumbnail: r = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d, p = pe(/* @__PURE__ */ new Set()), i =
|
|
135
|
+
} = d, p = pe(/* @__PURE__ */ new Set()), i = Q(), { addNotification: m } = x(), { t: u } = L(), b = ue({
|
|
136
136
|
queries: c.map((a) => ({
|
|
137
137
|
queryKey: Re(a),
|
|
138
|
-
queryFn: () =>
|
|
138
|
+
queryFn: () => M(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
const a = b.some((
|
|
142
|
+
D(() => {
|
|
143
|
+
const a = b.some((z) => z.isError), y = p.current.size > 0;
|
|
144
144
|
a && !y ? (m({
|
|
145
145
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
148
|
}), p.current.add(0)) : !a && y && p.current.clear();
|
|
149
149
|
}, [b, m, u]);
|
|
150
|
-
const E = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V =
|
|
150
|
+
const E = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V = G(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
154
|
data: _,
|
|
155
155
|
isLoading: F,
|
|
156
156
|
isError: I,
|
|
157
|
-
refetch:
|
|
157
|
+
refetch: $
|
|
158
158
|
} = ce({
|
|
159
159
|
queryKey: _e(
|
|
160
160
|
i,
|
|
@@ -166,38 +166,38 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
166
166
|
i,
|
|
167
167
|
h,
|
|
168
168
|
o
|
|
169
|
-
) :
|
|
169
|
+
) : P(
|
|
170
170
|
i,
|
|
171
171
|
h,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
174
|
enabled: !!i && h.length > 0 && v && !V
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
X(
|
|
177
177
|
(a) => {
|
|
178
178
|
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
179
|
(y) => h.includes(y)
|
|
180
|
-
) &&
|
|
180
|
+
) && $();
|
|
181
181
|
},
|
|
182
|
-
[i,
|
|
183
|
-
),
|
|
182
|
+
[i, $]
|
|
183
|
+
), D(() => {
|
|
184
184
|
I && m({
|
|
185
185
|
title: u("ERROR_DEFAULT_TITLE"),
|
|
186
186
|
message: u("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
187
|
type: "error"
|
|
188
188
|
});
|
|
189
189
|
}, [I]);
|
|
190
|
-
const
|
|
190
|
+
const N = g(() => {
|
|
191
191
|
if (!_) return [];
|
|
192
|
-
let a =
|
|
193
|
-
e === "latest-encounter" && (a =
|
|
192
|
+
let a = Y(_);
|
|
193
|
+
e === "latest-encounter" && (a = j(a));
|
|
194
194
|
const y = Z(a);
|
|
195
195
|
return W(y);
|
|
196
196
|
}, [_, e]), w = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], k = F || !v,
|
|
200
|
+
], k = F || !v, A = I && v, C = (!_ || _.entry?.length === 0 || h.length === 0) && v, H = A ? u("ERROR_FETCHING_OBSERVATIONS") : null, K = C ? u("NO_OBSERVATIONS_FOUND") : void 0, q = N.length > 0 && !k && !A, T = d.titleTranslationKey, f = T ? u(T) : "";
|
|
201
201
|
return /* @__PURE__ */ S(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
@@ -216,10 +216,10 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
216
216
|
children: /* @__PURE__ */ n("p", { children: f })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
219
|
+
q ? /* @__PURE__ */ n(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
|
-
groupedData:
|
|
222
|
+
groupedData: N,
|
|
223
223
|
title: f,
|
|
224
224
|
hideThumbnail: r
|
|
225
225
|
}
|
|
@@ -230,8 +230,8 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: u("OBSERVATIONS"),
|
|
232
232
|
loading: k,
|
|
233
|
-
errorStateMessage:
|
|
234
|
-
emptyStateMessage:
|
|
233
|
+
errorStateMessage: H,
|
|
234
|
+
emptyStateMessage: K ?? u("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
235
|
dataTestId: "observations-table"
|
|
236
236
|
}
|
|
237
237
|
)
|