@bahmni/widgets 0.0.1-dev.289 → 0.0.1-dev.292
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-C3NxQB1N.js → DocumentsTable-BuCm6KdH.js} +1 -1
- package/dist/{FormsTable-CmJsWJ2O.js → FormsTable-Xv8BgYY6.js} +30 -30
- package/dist/{Observations-B48aWdf7.js → Observations-B81mlEMg.js} +16 -16
- package/dist/{index-BBcf9Ywd.js → index-C0VMuD23.js} +23 -23
- package/dist/index.js +6 -6
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as T, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { u as W, a as X, y as J, t as Z,
|
|
2
|
+
import { u as W, a as X, y as J, t as Z, T as x, i as ee, I as te } from "./index-C0VMuD23.js";
|
|
3
3
|
import { useQuery as ne } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as g, useMemo as p } from "react";
|
|
5
5
|
import { useTranslation as ae } from "react-i18next";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, jsxs as Z, Fragment as ee } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { G as re, u as te, k as oe, Q as ae, W as se, J as ne, x as de, d as ie, M as U, T as me, t as le, i as x, X as ce, b as ue, I as fe, O as ye } from "./index-C0VMuD23.js";
|
|
3
3
|
import { useQueryClient as be, useQuery as y } from "@tanstack/react-query";
|
|
4
4
|
import { useState as k, useMemo as d, useCallback as b } from "react";
|
|
5
5
|
import { useTranslation as pe } from "react-i18next";
|
|
@@ -22,10 +22,10 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
22
22
|
i
|
|
23
23
|
), Q = be(), {
|
|
24
24
|
data: D = [],
|
|
25
|
-
isLoading:
|
|
26
|
-
isError:
|
|
27
|
-
error:
|
|
28
|
-
refetch:
|
|
25
|
+
isLoading: T,
|
|
26
|
+
isError: v,
|
|
27
|
+
error: G,
|
|
28
|
+
refetch: H
|
|
29
29
|
} = y({
|
|
30
30
|
queryKey: ["forms", l, m],
|
|
31
31
|
queryFn: () => ae(l, void 0, w),
|
|
@@ -37,18 +37,18 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
37
37
|
)), Array.isArray(u) && u.length > 0 && (e = e.filter(
|
|
38
38
|
(t) => u.some((r) => r.toLowerCase() === t.formName.toLowerCase())
|
|
39
39
|
)), e;
|
|
40
|
-
}, [D, i, u]), { data:
|
|
40
|
+
}, [D, i, u]), { data: L = [] } = y({
|
|
41
41
|
queryKey: ["observationForms"],
|
|
42
42
|
queryFn: () => se()
|
|
43
|
-
}),
|
|
44
|
-
(e) =>
|
|
45
|
-
[
|
|
43
|
+
}), R = b(
|
|
44
|
+
(e) => L.find((r) => r.name === e)?.uuid,
|
|
45
|
+
[L]
|
|
46
46
|
), g = d(() => {
|
|
47
47
|
if (o)
|
|
48
|
-
return
|
|
49
|
-
}, [o,
|
|
50
|
-
isLoading:
|
|
51
|
-
isError:
|
|
48
|
+
return R(o.formName);
|
|
49
|
+
}, [o, R]), {
|
|
50
|
+
isLoading: K,
|
|
51
|
+
isError: j,
|
|
52
52
|
error: F
|
|
53
53
|
} = y({
|
|
54
54
|
queryKey: ["formMetadata", g],
|
|
@@ -56,8 +56,8 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
56
56
|
enabled: !!g && c
|
|
57
57
|
}), {
|
|
58
58
|
data: h,
|
|
59
|
-
isLoading:
|
|
60
|
-
isError:
|
|
59
|
+
isLoading: V,
|
|
60
|
+
isError: $,
|
|
61
61
|
error: N
|
|
62
62
|
} = y({
|
|
63
63
|
queryKey: ["formsEncounterFHIR", o?.encounterUuid],
|
|
@@ -66,14 +66,14 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
66
66
|
});
|
|
67
67
|
ie(
|
|
68
68
|
(e) => {
|
|
69
|
-
e.patientUUID === l && e.updatedConcepts.size > 0 && (
|
|
69
|
+
e.patientUUID === l && e.updatedConcepts.size > 0 && (H(), Q.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
70
70
|
},
|
|
71
71
|
[l]
|
|
72
72
|
);
|
|
73
|
-
const
|
|
73
|
+
const z = d(() => !h?.entry || !o?.formName ? [] : h.entry.filter((t) => t.resource?.resourceType === "Observation").map((t) => t.resource).filter((t) => {
|
|
74
74
|
const r = he(t);
|
|
75
75
|
return !r || r.includes(o.formName);
|
|
76
|
-
}), [h, o?.formName]),
|
|
76
|
+
}), [h, o?.formName]), J = d(() => {
|
|
77
77
|
if (F)
|
|
78
78
|
return U(F).message;
|
|
79
79
|
if (N)
|
|
@@ -84,7 +84,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
84
84
|
{ key: "recordedBy", header: s("RECORDED_BY") }
|
|
85
85
|
],
|
|
86
86
|
[s]
|
|
87
|
-
),
|
|
87
|
+
), W = d(
|
|
88
88
|
() => [
|
|
89
89
|
{ key: "recordedOn", sortable: !0 },
|
|
90
90
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -95,7 +95,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
95
95
|
(r, a) => {
|
|
96
96
|
const f = a.formName;
|
|
97
97
|
r[f] ??= [];
|
|
98
|
-
const E = a.providers.map((
|
|
98
|
+
const E = a.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
|
|
99
99
|
return r[f].push({
|
|
100
100
|
id: a.encounterUuid,
|
|
101
101
|
formName: a.formName,
|
|
@@ -117,7 +117,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
117
117
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
118
118
|
}, [B, s]), S = b((e) => {
|
|
119
119
|
M(e), I(!0);
|
|
120
|
-
}, []),
|
|
120
|
+
}, []), X = b(() => {
|
|
121
121
|
I(!1), M(null);
|
|
122
122
|
}, []), q = b(
|
|
123
123
|
(e, t) => {
|
|
@@ -133,14 +133,14 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
133
133
|
[S]
|
|
134
134
|
);
|
|
135
135
|
return /* @__PURE__ */ Z(ee, { children: [
|
|
136
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
136
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: T || v || C.length === 0 || A ? /* @__PURE__ */ n(
|
|
137
137
|
x,
|
|
138
138
|
{
|
|
139
139
|
headers: _,
|
|
140
140
|
ariaLabel: s("FORMS_HEADING"),
|
|
141
141
|
rows: [],
|
|
142
|
-
loading:
|
|
143
|
-
errorStateMessage:
|
|
142
|
+
loading: T,
|
|
143
|
+
errorStateMessage: v ? G?.message : void 0,
|
|
144
144
|
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
145
145
|
renderCell: q,
|
|
146
146
|
className: O.formsTableBody,
|
|
@@ -163,7 +163,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
163
163
|
rows: a,
|
|
164
164
|
loading: !1,
|
|
165
165
|
errorStateMessage: "",
|
|
166
|
-
sortable:
|
|
166
|
+
sortable: W,
|
|
167
167
|
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
168
168
|
renderCell: q,
|
|
169
169
|
className: O.formsTableBody,
|
|
@@ -180,7 +180,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
180
180
|
id: "modalIdForActionAreaLayout",
|
|
181
181
|
portalId: "main-display-area",
|
|
182
182
|
open: c,
|
|
183
|
-
onRequestClose:
|
|
183
|
+
onRequestClose: X,
|
|
184
184
|
modalHeading: o.formName,
|
|
185
185
|
modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
|
|
186
186
|
passiveModal: !0,
|
|
@@ -189,10 +189,10 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
|
|
|
189
189
|
children: /* @__PURE__ */ n(
|
|
190
190
|
ye,
|
|
191
191
|
{
|
|
192
|
-
observations:
|
|
193
|
-
isLoading:
|
|
194
|
-
isError:
|
|
195
|
-
errorMessage:
|
|
192
|
+
observations: z,
|
|
193
|
+
isLoading: K || V,
|
|
194
|
+
isError: j || $,
|
|
195
|
+
errorMessage: J,
|
|
196
196
|
emptyStateMessage: s("NO_FORM_DATA_AVAILABLE"),
|
|
197
197
|
testIdPrefix: o.formName,
|
|
198
198
|
hideThumbnail: P
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as l, jsxs as C } from "react/jsx-runtime";
|
|
2
|
-
import { f as
|
|
2
|
+
import { f as K, c as D, e as V, g as Q, o as H, h as k, w as q, m as G, u as P, a as j, j as z, N as J, d as Y, l as W, n as X, s as Z, H as x, i as ee } from "./index-C0VMuD23.js";
|
|
3
3
|
import { useQueries as te, useQuery as se } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as oe, useEffect as
|
|
4
|
+
import { useRef as oe, useEffect as N, useMemo as h } from "react";
|
|
5
5
|
import { useTranslation as U } from "react-i18next";
|
|
6
6
|
const w = (t, i, c, d, u, r) => {
|
|
7
|
-
const s = V(t, i, u), o = s.value, a =
|
|
7
|
+
const s = V(t, i, u), o = s.value, a = Q(o);
|
|
8
8
|
let n = o;
|
|
9
9
|
a === "Image" && (n = /* @__PURE__ */ l(
|
|
10
|
-
|
|
10
|
+
k,
|
|
11
11
|
{
|
|
12
12
|
imageSrc: o,
|
|
13
13
|
alt: o,
|
|
@@ -26,7 +26,7 @@ const w = (t, i, c, d, u, r) => {
|
|
|
26
26
|
provider: s.provider
|
|
27
27
|
}), m = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y = d ? `${d}-${p}-${m}-${c}-${i}` : `${p}-${m}-${c}-${i}`;
|
|
28
28
|
return /* @__PURE__ */ l(
|
|
29
|
-
|
|
29
|
+
H,
|
|
30
30
|
{
|
|
31
31
|
header: s.header,
|
|
32
32
|
value: n,
|
|
@@ -61,7 +61,7 @@ const w = (t, i, c, d, u, r) => {
|
|
|
61
61
|
hideThumbnail: c
|
|
62
62
|
}) => {
|
|
63
63
|
const { t: d } = U(), u = (r, s, o) => {
|
|
64
|
-
const a =
|
|
64
|
+
const a = K(r.encounterDetails, d);
|
|
65
65
|
return /* @__PURE__ */ C(
|
|
66
66
|
D,
|
|
67
67
|
{
|
|
@@ -106,7 +106,7 @@ const w = (t, i, c, d, u, r) => {
|
|
|
106
106
|
)
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
|
-
}, ne = "Observations-module_observations__RKSyo", ie = "Observations-module_title__TJL3z",
|
|
109
|
+
}, ne = "Observations-module_observations__RKSyo", ie = "Observations-module_title__TJL3z", S = {
|
|
110
110
|
observations: ne,
|
|
111
111
|
title: ie
|
|
112
112
|
}, ce = (t) => ["conceptUuid", t], de = (t, i) => ["observations", t, ...i], ve = ({ config: t }) => {
|
|
@@ -121,7 +121,7 @@ const w = (t, i, c, d, u, r) => {
|
|
|
121
121
|
enabled: !!e
|
|
122
122
|
}))
|
|
123
123
|
});
|
|
124
|
-
|
|
124
|
+
N(() => {
|
|
125
125
|
n.forEach((e, v) => {
|
|
126
126
|
if (e.isError && !r.current.has(v)) {
|
|
127
127
|
const R = c[v];
|
|
@@ -150,14 +150,14 @@ const w = (t, i, c, d, u, r) => {
|
|
|
150
150
|
) && T();
|
|
151
151
|
},
|
|
152
152
|
[s, T]
|
|
153
|
-
),
|
|
153
|
+
), N(() => {
|
|
154
154
|
g && o({
|
|
155
155
|
title: a("ERROR_DEFAULT_TITLE"),
|
|
156
156
|
message: a("ERROR_FETCHING_OBSERVATIONS"),
|
|
157
157
|
type: "error"
|
|
158
158
|
});
|
|
159
159
|
}, [g]);
|
|
160
|
-
const
|
|
160
|
+
const _ = h(() => {
|
|
161
161
|
if (!p) return [];
|
|
162
162
|
const e = W(p), v = X(e);
|
|
163
163
|
return Z(v);
|
|
@@ -165,14 +165,14 @@ const w = (t, i, c, d, u, r) => {
|
|
|
165
165
|
{ key: "name", header: "name" },
|
|
166
166
|
{ key: "value", header: "value" },
|
|
167
167
|
{ key: "form", header: "form" }
|
|
168
|
-
],
|
|
168
|
+
], I = y || !f, $ = g && f, A = (!p || p.entry?.length === 0 || m.length === 0) && f, F = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? a("NO_OBSERVATIONS_FOUND") : void 0, M = _.length > 0 && !I && !$, O = i.titleTranslationKey, E = O ? a(O) : "";
|
|
169
169
|
return /* @__PURE__ */ C(
|
|
170
170
|
"div",
|
|
171
171
|
{
|
|
172
172
|
id: "observations",
|
|
173
173
|
"data-testid": O ? `observations-${E}` : "observations",
|
|
174
174
|
"aria-label": "observations-aria-label",
|
|
175
|
-
className:
|
|
175
|
+
className: S.observations,
|
|
176
176
|
children: [
|
|
177
177
|
/* @__PURE__ */ l(
|
|
178
178
|
x,
|
|
@@ -180,14 +180,14 @@ const w = (t, i, c, d, u, r) => {
|
|
|
180
180
|
id: "observations-title",
|
|
181
181
|
testId: O ? `observations-title-${E}` : "observations-title",
|
|
182
182
|
title: E,
|
|
183
|
-
className:
|
|
183
|
+
className: S.title,
|
|
184
184
|
children: /* @__PURE__ */ l("p", { children: E })
|
|
185
185
|
}
|
|
186
186
|
),
|
|
187
|
-
|
|
187
|
+
M ? /* @__PURE__ */ l(
|
|
188
188
|
ae,
|
|
189
189
|
{
|
|
190
|
-
groupedData:
|
|
190
|
+
groupedData: _,
|
|
191
191
|
title: E,
|
|
192
192
|
hideThumbnail: u
|
|
193
193
|
}
|
|
@@ -197,7 +197,7 @@ const w = (t, i, c, d, u, r) => {
|
|
|
197
197
|
headers: B,
|
|
198
198
|
rows: [],
|
|
199
199
|
ariaLabel: a("OBSERVATIONS"),
|
|
200
|
-
loading:
|
|
200
|
+
loading: I,
|
|
201
201
|
errorStateMessage: F,
|
|
202
202
|
emptyStateMessage: L,
|
|
203
203
|
dataTestId: "observations-table"
|
|
@@ -93258,7 +93258,7 @@ const rHt = [
|
|
|
93258
93258
|
},
|
|
93259
93259
|
{
|
|
93260
93260
|
type: "patientDocuments",
|
|
93261
|
-
component: B1(() => import("./DocumentsTable-
|
|
93261
|
+
component: B1(() => import("./DocumentsTable-BuCm6KdH.js"))
|
|
93262
93262
|
},
|
|
93263
93263
|
{
|
|
93264
93264
|
type: "flowSheet",
|
|
@@ -93266,7 +93266,7 @@ const rHt = [
|
|
|
93266
93266
|
},
|
|
93267
93267
|
{
|
|
93268
93268
|
type: "forms",
|
|
93269
|
-
component: B1(() => import("./FormsTable-
|
|
93269
|
+
component: B1(() => import("./FormsTable-Xv8BgYY6.js"))
|
|
93270
93270
|
},
|
|
93271
93271
|
{
|
|
93272
93272
|
type: "labOrders",
|
|
@@ -93274,7 +93274,7 @@ const rHt = [
|
|
|
93274
93274
|
},
|
|
93275
93275
|
{
|
|
93276
93276
|
type: "observations",
|
|
93277
|
-
component: B1(() => import("./Observations-
|
|
93277
|
+
component: B1(() => import("./Observations-B81mlEMg.js"))
|
|
93278
93278
|
},
|
|
93279
93279
|
{
|
|
93280
93280
|
type: "ordersControl",
|
|
@@ -93446,34 +93446,34 @@ const rMt = (r) => {
|
|
|
93446
93446
|
) });
|
|
93447
93447
|
};
|
|
93448
93448
|
export {
|
|
93449
|
-
|
|
93449
|
+
YVt as $,
|
|
93450
93450
|
kwt as A,
|
|
93451
|
-
|
|
93451
|
+
dVt as B,
|
|
93452
93452
|
Zat as C,
|
|
93453
93453
|
PHt as D,
|
|
93454
93454
|
gVt as E,
|
|
93455
93455
|
SVt as F,
|
|
93456
|
-
|
|
93456
|
+
RHt as G,
|
|
93457
93457
|
zo as H,
|
|
93458
93458
|
n0 as I,
|
|
93459
93459
|
ZHt as J,
|
|
93460
93460
|
JHt as K,
|
|
93461
|
-
|
|
93461
|
+
Ayt as L,
|
|
93462
93462
|
_1 as M,
|
|
93463
|
-
|
|
93463
|
+
$Ht as N,
|
|
93464
93464
|
KMe as O,
|
|
93465
93465
|
FHt as P,
|
|
93466
93466
|
kHt as Q,
|
|
93467
|
-
|
|
93467
|
+
GEt as R,
|
|
93468
93468
|
YHt as S,
|
|
93469
|
-
|
|
93470
|
-
|
|
93469
|
+
mt as T,
|
|
93470
|
+
Mwt as U,
|
|
93471
93471
|
eVt as V,
|
|
93472
93472
|
IHt as W,
|
|
93473
93473
|
Oo as X,
|
|
93474
|
-
|
|
93475
|
-
|
|
93476
|
-
|
|
93474
|
+
jHt as Y,
|
|
93475
|
+
zl as Z,
|
|
93476
|
+
Cl as _,
|
|
93477
93477
|
h0 as a,
|
|
93478
93478
|
XHt as a0,
|
|
93479
93479
|
uwt as a1,
|
|
@@ -93502,21 +93502,21 @@ export {
|
|
|
93502
93502
|
vlt as g,
|
|
93503
93503
|
Mat as h,
|
|
93504
93504
|
c1 as i,
|
|
93505
|
-
|
|
93506
|
-
|
|
93507
|
-
|
|
93505
|
+
DHt as j,
|
|
93506
|
+
vl as k,
|
|
93507
|
+
qHt as l,
|
|
93508
93508
|
Aat as m,
|
|
93509
|
-
|
|
93509
|
+
KHt as n,
|
|
93510
93510
|
Kot as o,
|
|
93511
|
-
|
|
93512
|
-
|
|
93513
|
-
|
|
93511
|
+
pvt as p,
|
|
93512
|
+
jvt as q,
|
|
93513
|
+
Jvt as r,
|
|
93514
93514
|
GHt as s,
|
|
93515
93515
|
wi as t,
|
|
93516
93516
|
u0 as u,
|
|
93517
|
-
|
|
93517
|
+
Bgt as v,
|
|
93518
93518
|
Rat as w,
|
|
93519
|
-
|
|
93519
|
+
SHt as x,
|
|
93520
93520
|
BHt as y,
|
|
93521
93521
|
GMe as z
|
|
93522
93522
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a5 as t, a3 as s, A as o, a2 as r, n, a0 as g,
|
|
1
|
+
import { a5 as t, a3 as s, A as o, a2 as r, p as n, a0 as g, q as l, C as P, r as c, D as d, a1 as v, B as T, F as A, L as C, af as b, ah as u, ai as I, v as f, U as m, Y as p, O as L, P as R, E as S, K as D, z as E, R as W, S as N, $ as O, V as U, a7 as _, a6 as y, ad as h, ac as x, a9 as G, aa as H, ab as V, a8 as q, ae as z, a4 as B, _ as F, ag as M, a as k, u as w, Z as K } from "./index-C0VMuD23.js";
|
|
2
2
|
import "react";
|
|
3
3
|
export {
|
|
4
4
|
t as ActivePractitionerContext,
|
|
@@ -26,15 +26,15 @@ export {
|
|
|
26
26
|
S as PatientProgramsTable,
|
|
27
27
|
D as ProgramDetails,
|
|
28
28
|
E as RadiologyInvestigationReport,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
W as RadiologyInvestigationTable,
|
|
30
|
+
N as SearchPatient,
|
|
31
31
|
O as UserPrivilegeProvider,
|
|
32
32
|
U as VitalFlowSheet,
|
|
33
33
|
_ as createConfigHook,
|
|
34
34
|
y as createConfigProvider,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
h as getAllWidgetConfigs,
|
|
36
|
+
x as getAllWidgetTypes,
|
|
37
|
+
G as getWidget,
|
|
38
38
|
H as getWidgetConfig,
|
|
39
39
|
V as hasWidget,
|
|
40
40
|
q as registerWidget,
|