@bahmni/widgets 0.0.1-dev.108 → 0.0.1-dev.109
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/{FormsTable-TnUjpfur.js → FormsTable-0aWt0WZd.js} +26 -26
- package/dist/{index-BaqvPC9o.js → index-Z7N8pibh.js} +4245 -4199
- package/dist/index.css +1 -1
- package/dist/index.js +8 -8
- package/dist/medications/MedicationsTable.d.ts +2 -1
- package/dist/medications/MedicationsTable.d.ts.map +1 -1
- package/dist/medications/useMedicationRequest.d.ts +1 -1
- package/dist/medications/useMedicationRequest.d.ts.map +1 -1
- package/dist/medications/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsxs as _, jsx as t, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as h, u as W, E as X, O as Z, P as ee, A as re, b as oe, i as te, R as ae, x as $, h as ne, d as se, a as de, y as ce, e as x, s as me } from "./index-Z7N8pibh.js";
|
|
3
3
|
import { useQuery as g } from "@tanstack/react-query";
|
|
4
|
-
import { useState as U, useMemo as b, useCallback as
|
|
4
|
+
import { useState as U, useMemo as b, useCallback as N } from "react";
|
|
5
5
|
import { createPortal as le } from "react-dom";
|
|
6
6
|
import { useTranslation as ie } from "react-i18next";
|
|
7
|
-
const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e = "_formContent_1pd36_18", be = "_formDetailsContainer_1pd36_25", fe = "_observation_1pd36_30", ge = "_groupContainer_1pd36_39",
|
|
7
|
+
const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e = "_formContent_1pd36_18", be = "_formDetailsContainer_1pd36_25", fe = "_observation_1pd36_30", ge = "_groupContainer_1pd36_39", Ne = "_rowContainer_1pd36_43", he = "_groupLabel_1pd36_48", ye = "_rowLabel_1pd36_58", Me = "_rowValue_1pd36_67", Le = "_groupMembers_1pd36_75", Ae = "_memberRow_1pd36_81", Oe = "_memberLabel_1pd36_86", Re = "_memberValue_1pd36_94", De = "_abnormalValue_1pd36_102", we = "_commentSection_1pd36_110", Ce = "_commentText_1pd36_116", Fe = "_nestedGroup_1pd36_125", Te = "_nestedGroupLabel_1pd36_132", Ee = "_nestedGroupMembers_1pd36_141", r = {
|
|
8
8
|
formsTableBody: ue,
|
|
9
9
|
customAccordianItem: pe,
|
|
10
10
|
formContent: _e,
|
|
11
11
|
formDetailsContainer: be,
|
|
12
12
|
observation: fe,
|
|
13
13
|
groupContainer: ge,
|
|
14
|
-
rowContainer:
|
|
15
|
-
groupLabel:
|
|
14
|
+
rowContainer: Ne,
|
|
15
|
+
groupLabel: he,
|
|
16
16
|
rowLabel: ye,
|
|
17
17
|
rowValue: Me,
|
|
18
18
|
groupMembers: Le,
|
|
19
19
|
memberRow: Ae,
|
|
20
|
-
memberLabel:
|
|
21
|
-
memberValue:
|
|
20
|
+
memberLabel: Oe,
|
|
21
|
+
memberValue: Re,
|
|
22
22
|
abnormalValue: De,
|
|
23
23
|
commentSection: we,
|
|
24
24
|
commentText: Ce,
|
|
@@ -28,7 +28,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
28
28
|
}, ve = "ABNORMAL", q = (e) => {
|
|
29
29
|
const s = e.concept?.units, d = e.concept?.lowNormal, o = e.concept?.hiNormal, l = d != null, i = o != null, p = l && i ? ` (${d} - ${o})` : l ? ` (>${d})` : i ? ` (<${o})` : "", a = e.interpretation && e.interpretation.toUpperCase() === ve;
|
|
30
30
|
return { units: s, rangeString: p, isAbnormal: a };
|
|
31
|
-
},
|
|
31
|
+
}, P = ({
|
|
32
32
|
member: e,
|
|
33
33
|
depth: s = 0
|
|
34
34
|
}) => {
|
|
@@ -44,7 +44,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
46
|
/* @__PURE__ */ t("div", { className: r.nestedGroupMembers, children: e.groupMembers?.map((a) => /* @__PURE__ */ t(
|
|
47
|
-
|
|
47
|
+
P,
|
|
48
48
|
{
|
|
49
49
|
member: a,
|
|
50
50
|
depth: s + 1
|
|
@@ -62,7 +62,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
62
62
|
/* @__PURE__ */ _(
|
|
63
63
|
"p",
|
|
64
64
|
{
|
|
65
|
-
className:
|
|
65
|
+
className: h(
|
|
66
66
|
r.memberLabel,
|
|
67
67
|
p ? r.abnormalValue : ""
|
|
68
68
|
),
|
|
@@ -75,7 +75,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
75
75
|
/* @__PURE__ */ _(
|
|
76
76
|
"p",
|
|
77
77
|
{
|
|
78
|
-
className:
|
|
78
|
+
className: h(
|
|
79
79
|
r.memberValue,
|
|
80
80
|
p ? r.abnormalValue : ""
|
|
81
81
|
),
|
|
@@ -106,7 +106,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
106
106
|
/* @__PURE__ */ _(
|
|
107
107
|
"p",
|
|
108
108
|
{
|
|
109
|
-
className:
|
|
109
|
+
className: h(
|
|
110
110
|
d ? r.groupLabel : r.rowLabel,
|
|
111
111
|
!d && i ? r.abnormalValue : ""
|
|
112
112
|
),
|
|
@@ -117,7 +117,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
117
117
|
}
|
|
118
118
|
),
|
|
119
119
|
d ? /* @__PURE__ */ t("div", { className: r.groupMembers, children: e.groupMembers?.map((p) => /* @__PURE__ */ t(
|
|
120
|
-
|
|
120
|
+
P,
|
|
121
121
|
{
|
|
122
122
|
member: p,
|
|
123
123
|
depth: 0
|
|
@@ -126,7 +126,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
126
126
|
)) }) : /* @__PURE__ */ _(
|
|
127
127
|
"p",
|
|
128
128
|
{
|
|
129
|
-
className:
|
|
129
|
+
className: h(
|
|
130
130
|
r.rowValue,
|
|
131
131
|
i ? r.abnormalValue : ""
|
|
132
132
|
),
|
|
@@ -152,24 +152,24 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
152
152
|
encounterUuids: s,
|
|
153
153
|
config: d
|
|
154
154
|
}) => {
|
|
155
|
-
const { t: o } = ie(), l = W(), [i, p] = U(!1), [a,
|
|
155
|
+
const { t: o } = ie(), l = W(), [i, p] = U(!1), [a, O] = U(null), k = d?.numberOfVisits, R = X(
|
|
156
156
|
e,
|
|
157
157
|
s
|
|
158
158
|
), {
|
|
159
159
|
data: y = [],
|
|
160
160
|
isLoading: D,
|
|
161
161
|
isError: w,
|
|
162
|
-
error:
|
|
162
|
+
error: H
|
|
163
163
|
} = g({
|
|
164
164
|
queryKey: ["forms", l, e],
|
|
165
|
-
queryFn: () => Z(l, void 0,
|
|
166
|
-
enabled: !!l && !
|
|
165
|
+
queryFn: () => Z(l, void 0, k),
|
|
166
|
+
enabled: !!l && !R
|
|
167
167
|
}), C = b(() => !s || s.length === 0 ? y : y.filter(
|
|
168
168
|
(n) => s.includes(n.encounterUuid)
|
|
169
169
|
), [y, s]), { data: F = [] } = g({
|
|
170
170
|
queryKey: ["observationForms"],
|
|
171
171
|
queryFn: ee
|
|
172
|
-
}), T =
|
|
172
|
+
}), T = N(
|
|
173
173
|
(n) => F.find((c) => c.name === n)?.uuid,
|
|
174
174
|
[F]
|
|
175
175
|
), M = b(() => {
|
|
@@ -230,11 +230,11 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
230
230
|
)
|
|
231
231
|
})
|
|
232
232
|
).sort((c, m) => c.formName.localeCompare(m.formName));
|
|
233
|
-
}, [C, o]), S =
|
|
234
|
-
|
|
235
|
-
}, []), Q =
|
|
236
|
-
p(!1),
|
|
237
|
-
}, []), G =
|
|
233
|
+
}, [C, o]), S = N((n) => {
|
|
234
|
+
O(n), p(!0);
|
|
235
|
+
}, []), Q = N(() => {
|
|
236
|
+
p(!1), O(null);
|
|
237
|
+
}, []), G = N(
|
|
238
238
|
(n, u) => {
|
|
239
239
|
switch (u) {
|
|
240
240
|
case "recordedOn":
|
|
@@ -248,14 +248,14 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e =
|
|
|
248
248
|
[S]
|
|
249
249
|
);
|
|
250
250
|
return /* @__PURE__ */ _(J, { children: [
|
|
251
|
-
/* @__PURE__ */ t("div", { "data-testid": "forms-table", children: D || w || V.length === 0 ||
|
|
251
|
+
/* @__PURE__ */ t("div", { "data-testid": "forms-table", children: D || w || V.length === 0 || R ? /* @__PURE__ */ t(
|
|
252
252
|
$,
|
|
253
253
|
{
|
|
254
254
|
headers: I,
|
|
255
255
|
ariaLabel: o("FORMS_HEADING"),
|
|
256
256
|
rows: [],
|
|
257
257
|
loading: D,
|
|
258
|
-
errorStateMessage: w ?
|
|
258
|
+
errorStateMessage: w ? H?.message : void 0,
|
|
259
259
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
260
260
|
renderCell: G,
|
|
261
261
|
className: r.formsTableBody,
|