@bahmni/widgets 0.0.1-dev.156 → 0.0.1-dev.160
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.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as b, jsx as d, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { useQueryClient as he, useQuery as
|
|
4
|
-
import { useState as P, useMemo as h, useCallback as
|
|
2
|
+
import { c as C, C as te, N as re, $ as ae, e as oe, a as se, u as ne, i as de, m as ie, p as le, h as ce, o as me, O as ue, y as pe, b as be, t as x, H as fe, d as _e, f as $e, g as ye, j as H, l as ge } from "./index-OaX83Bam.js";
|
|
3
|
+
import { useQueryClient as he, useQuery as F } from "@tanstack/react-query";
|
|
4
|
+
import { useState as P, useMemo as h, useCallback as L } from "react";
|
|
5
5
|
import { useTranslation as ve } from "react-i18next";
|
|
6
|
-
const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6",
|
|
6
|
+
const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Fe = "_formContent_1pd36_18", Le = "_formDetailsContainer_1pd36_25", Ce = "_observation_1pd36_30", Me = "_groupContainer_1pd36_39", Re = "_rowContainer_1pd36_43", we = "_groupLabel_1pd36_48", De = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", Ve = "_groupMembers_1pd36_75", Ae = "_memberRow_1pd36_81", Ee = "_memberLabel_1pd36_86", Ie = "_memberValue_1pd36_94", Be = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", Ge = "_commentText_1pd36_116", qe = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", xe = "_nestedGroupMembers_1pd36_141", o = {
|
|
7
7
|
formsTableBody: Ne,
|
|
8
8
|
customAccordianItem: Oe,
|
|
9
|
-
formContent:
|
|
10
|
-
formDetailsContainer:
|
|
11
|
-
observation:
|
|
9
|
+
formContent: Fe,
|
|
10
|
+
formDetailsContainer: Le,
|
|
11
|
+
observation: Ce,
|
|
12
12
|
groupContainer: Me,
|
|
13
13
|
rowContainer: Re,
|
|
14
14
|
groupLabel: we,
|
|
@@ -17,8 +17,8 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
17
17
|
groupMembers: Ve,
|
|
18
18
|
memberRow: Ae,
|
|
19
19
|
memberLabel: Ee,
|
|
20
|
-
memberValue:
|
|
21
|
-
abnormalValue:
|
|
20
|
+
memberValue: Ie,
|
|
21
|
+
abnormalValue: Be,
|
|
22
22
|
commentSection: Se,
|
|
23
23
|
commentText: Ge,
|
|
24
24
|
nestedGroup: qe,
|
|
@@ -93,7 +93,7 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
93
93
|
/* @__PURE__ */ b(
|
|
94
94
|
"p",
|
|
95
95
|
{
|
|
96
|
-
className:
|
|
96
|
+
className: C(
|
|
97
97
|
o.memberLabel,
|
|
98
98
|
f ? o.abnormalValue : ""
|
|
99
99
|
),
|
|
@@ -107,7 +107,7 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
107
107
|
/* @__PURE__ */ b(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
|
-
className:
|
|
110
|
+
className: C(
|
|
111
111
|
o.memberValue,
|
|
112
112
|
f ? o.abnormalValue : ""
|
|
113
113
|
),
|
|
@@ -156,7 +156,7 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
156
156
|
/* @__PURE__ */ b(
|
|
157
157
|
"p",
|
|
158
158
|
{
|
|
159
|
-
className:
|
|
159
|
+
className: C(
|
|
160
160
|
s ? o.groupLabel : o.rowLabel,
|
|
161
161
|
!s && r ? o.abnormalValue : ""
|
|
162
162
|
),
|
|
@@ -186,7 +186,7 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
186
186
|
) : /* @__PURE__ */ b(
|
|
187
187
|
"div",
|
|
188
188
|
{
|
|
189
|
-
className:
|
|
189
|
+
className: C(
|
|
190
190
|
o.rowValue,
|
|
191
191
|
r ? o.abnormalValue : ""
|
|
192
192
|
),
|
|
@@ -262,41 +262,41 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
262
262
|
isError: N,
|
|
263
263
|
error: z,
|
|
264
264
|
refetch: W
|
|
265
|
-
} =
|
|
265
|
+
} = F({
|
|
266
266
|
queryKey: ["forms", s, e],
|
|
267
267
|
queryFn: () => ie(s, void 0, g),
|
|
268
268
|
enabled: !!s && !f
|
|
269
269
|
}), T = h(() => !t || t.length === 0 ? $ : $.filter(
|
|
270
270
|
(l) => t.includes(l.encounterUuid)
|
|
271
|
-
), [$, t]), { data: V = [] } =
|
|
271
|
+
), [$, t]), { data: V = [] } = F({
|
|
272
272
|
queryKey: ["observationForms"],
|
|
273
273
|
queryFn: () => le()
|
|
274
|
-
}), A =
|
|
274
|
+
}), A = L(
|
|
275
275
|
(l) => V.find((m) => m.name === l)?.uuid,
|
|
276
276
|
[V]
|
|
277
277
|
), M = h(() => {
|
|
278
278
|
if (r)
|
|
279
279
|
return A(r.formName);
|
|
280
|
-
}, [r, A]), { isLoading: Y, error: E } =
|
|
280
|
+
}, [r, A]), { isLoading: Y, error: E } = F({
|
|
281
281
|
queryKey: ["formMetadata", M],
|
|
282
282
|
queryFn: () => ce(M),
|
|
283
283
|
enabled: !!M && c
|
|
284
284
|
}), {
|
|
285
285
|
data: R,
|
|
286
286
|
isLoading: J,
|
|
287
|
-
error:
|
|
288
|
-
} =
|
|
287
|
+
error: I
|
|
288
|
+
} = F({
|
|
289
289
|
queryKey: ["formsEncounterFHIR", r?.encounterUuid],
|
|
290
290
|
queryFn: () => me(r.encounterUuid),
|
|
291
291
|
enabled: !!r?.encounterUuid && c
|
|
292
292
|
});
|
|
293
293
|
ue(
|
|
294
294
|
(l) => {
|
|
295
|
-
l.patientUUID === s && l.updatedConcepts.size > 0 && (W(), _.invalidateQueries({ queryKey: ["
|
|
295
|
+
l.patientUUID === s && l.updatedConcepts.size > 0 && (W(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
296
296
|
},
|
|
297
297
|
[s]
|
|
298
298
|
);
|
|
299
|
-
const
|
|
299
|
+
const B = h(() => !R || !r?.formName ? [] : Ke(
|
|
300
300
|
R,
|
|
301
301
|
r.formName
|
|
302
302
|
), [R, r?.formName]), S = h(
|
|
@@ -336,11 +336,11 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
336
336
|
)
|
|
337
337
|
})
|
|
338
338
|
).sort((m, u) => m.formName.localeCompare(u.formName));
|
|
339
|
-
}, [T, n]), q =
|
|
339
|
+
}, [T, n]), q = L((l) => {
|
|
340
340
|
p(l), i(!0);
|
|
341
|
-
}, []), Z =
|
|
341
|
+
}, []), Z = L(() => {
|
|
342
342
|
i(!1), p(null);
|
|
343
|
-
}, []), U =
|
|
343
|
+
}, []), U = L(
|
|
344
344
|
(l, y) => {
|
|
345
345
|
switch (y) {
|
|
346
346
|
case "recordedOn":
|
|
@@ -406,7 +406,7 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
406
406
|
passiveModal: !0,
|
|
407
407
|
size: "md",
|
|
408
408
|
testId: "form-details-modal",
|
|
409
|
-
children: /* @__PURE__ */ d("div", { className: o.formContent, children: Y || J ? /* @__PURE__ */ d(ye, { width: "100%", lineCount: 3 }) : E ? /* @__PURE__ */ d("div", { children: H(E).message ?? n("ERROR_FETCHING_FORM_METADATA") }) :
|
|
409
|
+
children: /* @__PURE__ */ d("div", { className: o.formContent, children: Y || J ? /* @__PURE__ */ d(ye, { width: "100%", lineCount: 3 }) : E ? /* @__PURE__ */ d("div", { children: H(E).message ?? n("ERROR_FETCHING_FORM_METADATA") }) : I ? /* @__PURE__ */ d("div", { children: H(I).message ?? n("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ d("div", { className: o.formDetailsContainer, children: B.map(({ obs: l, comment: y }, m) => /* @__PURE__ */ d(
|
|
410
410
|
He,
|
|
411
411
|
{
|
|
412
412
|
observation: l,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as d, jsxs as C } from "react/jsx-runtime";
|
|
2
|
-
import { k, _ as S, n as q, C as M, q as V, N as K, $ as Q, u as G, r as H, s as P, v as j, O as z, e as Y, w as J, x as W, B as X, t as Z } from "./index-
|
|
2
|
+
import { k, _ as S, n as q, C as M, q as V, N as K, $ as Q, u as G, r as H, s as P, v as j, O as z, e as Y, w as J, x as W, B as X, t as Z } from "./index-OaX83Bam.js";
|
|
3
3
|
import { useQueries as x, useQuery as ee } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as te, useEffect as I, useMemo as h } from "react";
|
|
5
5
|
import { useTranslation as D } from "react-i18next";
|
|
@@ -78642,7 +78642,7 @@ const irt = () => {
|
|
|
78642
78642
|
},
|
|
78643
78643
|
{
|
|
78644
78644
|
type: "forms",
|
|
78645
|
-
component: nn(() => import("./FormsTable-
|
|
78645
|
+
component: nn(() => import("./FormsTable-BbCN8S0D.js"))
|
|
78646
78646
|
},
|
|
78647
78647
|
{
|
|
78648
78648
|
type: "labOrders",
|
|
@@ -78650,7 +78650,7 @@ const irt = () => {
|
|
|
78650
78650
|
},
|
|
78651
78651
|
{
|
|
78652
78652
|
type: "observations",
|
|
78653
|
-
component: nn(() => import("./Observations-
|
|
78653
|
+
component: nn(() => import("./Observations-uXr6YSmn.js"))
|
|
78654
78654
|
},
|
|
78655
78655
|
{
|
|
78656
78656
|
type: "ordersControl",
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as t, W as s, A as o, z as r, D as n, E as g, G as l, L as P, M as c, K as d, Q as v, P as T, I as b, J as A, F as W, R as p, S as f, U as m, V as u, a4 as R, a3 as C, a0 as D, a1 as I, a2 as S, Z as U, a5 as y, X as h, r as N, u as x, T as F } from "./index-
|
|
1
|
+
import { Y as t, W as s, A as o, z as r, D as n, E as g, G as l, L as P, M as c, K as d, Q as v, P as T, I as b, J as A, F as W, R as p, S as f, U as m, V as u, a4 as R, a3 as C, a0 as D, a1 as I, a2 as S, Z as U, a5 as y, X as h, r as N, u as x, T as F } from "./index-OaX83Bam.js";
|
|
2
2
|
import "react";
|
|
3
3
|
export {
|
|
4
4
|
t as ActivePractitionerContext,
|