@bahmni/clinical-app 0.0.1-dev.117 → 0.0.1-dev.119
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-DPM6KWDN-DsJDNtml.js → FormsTable-B3aV3wve-D9ogh7Uh.js} +43 -43
- package/dist/{LNWAZHJI-Ccsh-Js9.js → LNWAZHJI-R4bHJQFP.js} +2 -2
- package/dist/{MWZ6AO7Z-REDYB8B_.js → MWZ6AO7Z-dYsrujMJ.js} +2 -2
- package/dist/Observations-DejWaIb1-BK8LvbgH.js +527 -0
- package/dist/{YPM2AS64-BAnixaDs.js → YPM2AS64-BwafKS9M.js} +1 -1
- package/dist/{index-CSiQxsZu.js → index-aCQK8yvY.js} +57499 -55615
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/pages/ConsultationPage.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/Observations-DNy4Rf1T-DP8m5_cB.js +0 -503
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as o, jsxs as p, Fragment as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as o, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { u as J, O as W, K as X, a as f, _ as Z, T as ee, e as $, b as re, c as ae, D as oe, C as ne, w as I, q as te, L as N, S as se, d as de, R as me, f as ie } from "./index-aCQK8yvY.js";
|
|
3
3
|
import { useState as x, useMemo as b, useCallback as g } from "react";
|
|
4
4
|
import { createPortal as le } from "react-dom";
|
|
5
5
|
const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18", _e = "_formDetailsContainer_1pd36_25", be = "_observation_1pd36_30", fe = "_groupContainer_1pd36_39", ge = "_rowContainer_1pd36_43", Ne = "_groupLabel_1pd36_48", he = "_rowLabel_1pd36_58", ye = "_rowValue_1pd36_67", ve = "_groupMembers_1pd36_75", Le = "_memberRow_1pd36_81", Me = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Oe = "_abnormalValue_1pd36_102", Ce = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Te = "_nestedGroup_1pd36_125", De = "_nestedGroupLabel_1pd36_132", Fe = "_nestedGroupMembers_1pd36_141", r = {
|
|
@@ -24,20 +24,20 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
24
24
|
nestedGroupLabel: De,
|
|
25
25
|
nestedGroupMembers: Fe
|
|
26
26
|
}, we = "ABNORMAL", U = (e) => {
|
|
27
|
-
const
|
|
28
|
-
return { units:
|
|
27
|
+
const m = e.concept?.units, i = e.concept?.lowNormal, a = e.concept?.hiNormal, l = i != null, c = a != null, u = l && c ? ` (${i} - ${a})` : l ? ` (>${i})` : c ? ` (<${a})` : "", t = e.interpretation && e.interpretation.toUpperCase() === we;
|
|
28
|
+
return { units: m, rangeString: u, isAbnormal: t };
|
|
29
29
|
}, q = ({
|
|
30
30
|
member: e,
|
|
31
|
-
depth:
|
|
31
|
+
depth: m = 0
|
|
32
32
|
}) => {
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
33
|
+
const i = e.groupMembers && e.groupMembers.length > 0, a = e.conceptNameToDisplay ?? e.concept?.shortName ?? e.concept?.name;
|
|
34
|
+
if (i)
|
|
35
35
|
return /* @__PURE__ */ p("div", { className: r.nestedGroup, children: [
|
|
36
36
|
/* @__PURE__ */ o(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
39
|
className: r.nestedGroupLabel,
|
|
40
|
-
style: { paddingLeft: `${
|
|
40
|
+
style: { paddingLeft: `${m * 16}px` },
|
|
41
41
|
children: a
|
|
42
42
|
}
|
|
43
43
|
),
|
|
@@ -45,7 +45,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
45
45
|
q,
|
|
46
46
|
{
|
|
47
47
|
member: t,
|
|
48
|
-
depth:
|
|
48
|
+
depth: m + 1
|
|
49
49
|
},
|
|
50
50
|
`${t.concept.uuid}`
|
|
51
51
|
)) })
|
|
@@ -55,7 +55,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
57
|
className: r.memberRow,
|
|
58
|
-
style: { paddingLeft: `${
|
|
58
|
+
style: { paddingLeft: `${m * 16}px` },
|
|
59
59
|
children: [
|
|
60
60
|
/* @__PURE__ */ p(
|
|
61
61
|
"p",
|
|
@@ -88,9 +88,9 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
88
88
|
);
|
|
89
89
|
}, Se = ({
|
|
90
90
|
observation: e,
|
|
91
|
-
index:
|
|
91
|
+
index: m
|
|
92
92
|
}) => {
|
|
93
|
-
const
|
|
93
|
+
const i = e.groupMembers && e.groupMembers.length > 0, { units: a, rangeString: l, isAbnormal: c } = U(e);
|
|
94
94
|
return /* @__PURE__ */ p(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
@@ -99,22 +99,22 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
99
99
|
/* @__PURE__ */ p(
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
102
|
-
className:
|
|
102
|
+
className: i ? r.groupContainer : r.rowContainer,
|
|
103
103
|
children: [
|
|
104
104
|
/* @__PURE__ */ p(
|
|
105
105
|
"p",
|
|
106
106
|
{
|
|
107
107
|
className: N(
|
|
108
|
-
|
|
109
|
-
!
|
|
108
|
+
i ? r.groupLabel : r.rowLabel,
|
|
109
|
+
!i && c ? r.abnormalValue : ""
|
|
110
110
|
),
|
|
111
111
|
children: [
|
|
112
112
|
e.conceptNameToDisplay,
|
|
113
|
-
!
|
|
113
|
+
!i && l && /* @__PURE__ */ o("span", { className: r.rangeInfo, children: l })
|
|
114
114
|
]
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
|
-
|
|
117
|
+
i ? /* @__PURE__ */ o("div", { className: r.groupMembers, children: e.groupMembers?.map((u) => /* @__PURE__ */ o(
|
|
118
118
|
q,
|
|
119
119
|
{
|
|
120
120
|
member: u,
|
|
@@ -143,16 +143,16 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
143
143
|
] }) })
|
|
144
144
|
]
|
|
145
145
|
},
|
|
146
|
-
`${e.concept.uuid}-${
|
|
146
|
+
`${e.concept.uuid}-${m}`
|
|
147
147
|
);
|
|
148
|
-
},
|
|
148
|
+
}, Ie = ({
|
|
149
149
|
episodeOfCareUuids: e,
|
|
150
|
-
encounterUuids:
|
|
151
|
-
config:
|
|
150
|
+
encounterUuids: m,
|
|
151
|
+
config: i
|
|
152
152
|
}) => {
|
|
153
|
-
const { t: a } =
|
|
153
|
+
const { t: a } = J(), l = W(), [c, u] = x(!1), [t, M] = x(null), k = i?.numberOfVisits, A = X(
|
|
154
154
|
e,
|
|
155
|
-
|
|
155
|
+
m
|
|
156
156
|
), {
|
|
157
157
|
data: h = [],
|
|
158
158
|
isLoading: O,
|
|
@@ -162,9 +162,9 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
162
162
|
queryKey: ["forms", l, e],
|
|
163
163
|
queryFn: () => se(l, void 0, k),
|
|
164
164
|
enabled: !!l && !A
|
|
165
|
-
}), R = b(() => !
|
|
166
|
-
(n) =>
|
|
167
|
-
), [h,
|
|
165
|
+
}), R = b(() => !m || m.length === 0 ? h : h.filter(
|
|
166
|
+
(n) => m.includes(n.encounterUuid)
|
|
167
|
+
), [h, m]), { data: T = [] } = f({
|
|
168
168
|
queryKey: ["observationForms"],
|
|
169
169
|
queryFn: de
|
|
170
170
|
}), D = g(
|
|
@@ -179,7 +179,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
179
179
|
error: F
|
|
180
180
|
} = f({
|
|
181
181
|
queryKey: ["formMetadata", y],
|
|
182
|
-
queryFn: () =>
|
|
182
|
+
queryFn: () => me(y),
|
|
183
183
|
enabled: !!y && c
|
|
184
184
|
}), {
|
|
185
185
|
data: v,
|
|
@@ -187,7 +187,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
187
187
|
error: w
|
|
188
188
|
} = f({
|
|
189
189
|
queryKey: ["formsEncounter", t?.encounterUuid],
|
|
190
|
-
queryFn: () =>
|
|
190
|
+
queryFn: () => ie(t.encounterUuid, !0),
|
|
191
191
|
enabled: !!t?.encounterUuid && c
|
|
192
192
|
}), S = b(() => !v?.observations || !t?.formName ? [] : v.observations.filter(
|
|
193
193
|
(n) => "formFieldPath" in n && typeof n.formFieldPath == "string" && n.formFieldPath.includes(t.formName)
|
|
@@ -197,7 +197,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
197
197
|
{ key: "recordedBy", header: a("FORM_RECORDED_BY") }
|
|
198
198
|
],
|
|
199
199
|
[a]
|
|
200
|
-
),
|
|
200
|
+
), P = b(
|
|
201
201
|
() => [
|
|
202
202
|
{ key: "recordedOn", sortable: !0 },
|
|
203
203
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -228,26 +228,26 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
228
228
|
)
|
|
229
229
|
})
|
|
230
230
|
).sort((s, d) => s.formName.localeCompare(d.formName));
|
|
231
|
-
}, [R, a]),
|
|
231
|
+
}, [R, a]), G = g((n) => {
|
|
232
232
|
M(n), u(!0);
|
|
233
|
-
}, []),
|
|
233
|
+
}, []), z = g(() => {
|
|
234
234
|
u(!1), M(null);
|
|
235
|
-
}, []),
|
|
235
|
+
}, []), V = g(
|
|
236
236
|
(n, s) => {
|
|
237
237
|
switch (s) {
|
|
238
238
|
case "recordedOn":
|
|
239
|
-
return /* @__PURE__ */ o(ee, { onClick: () =>
|
|
239
|
+
return /* @__PURE__ */ o(ee, { onClick: () => G(n), children: n.recordedOn });
|
|
240
240
|
case "recordedBy":
|
|
241
241
|
return n.recordedBy;
|
|
242
242
|
default:
|
|
243
243
|
return null;
|
|
244
244
|
}
|
|
245
245
|
},
|
|
246
|
-
[
|
|
246
|
+
[G]
|
|
247
247
|
);
|
|
248
|
-
return /* @__PURE__ */ p(
|
|
248
|
+
return /* @__PURE__ */ p(Y, { children: [
|
|
249
249
|
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: O || C || E.length === 0 || A ? /* @__PURE__ */ o(
|
|
250
|
-
|
|
250
|
+
$,
|
|
251
251
|
{
|
|
252
252
|
headers: B,
|
|
253
253
|
ariaLabel: a("FORMS_HEADING"),
|
|
@@ -255,7 +255,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
255
255
|
loading: O,
|
|
256
256
|
errorStateMessage: C ? K?.message : void 0,
|
|
257
257
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
258
|
-
renderCell:
|
|
258
|
+
renderCell: V,
|
|
259
259
|
className: r.formsTableBody,
|
|
260
260
|
"data-testid": "sortable-data-table"
|
|
261
261
|
}
|
|
@@ -269,16 +269,16 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
269
269
|
testId: `accordian-title-${d}`,
|
|
270
270
|
open: s === 0,
|
|
271
271
|
children: /* @__PURE__ */ o(
|
|
272
|
-
|
|
272
|
+
$,
|
|
273
273
|
{
|
|
274
274
|
headers: B,
|
|
275
275
|
ariaLabel: a("FORMS_HEADING"),
|
|
276
276
|
rows: _,
|
|
277
277
|
loading: !1,
|
|
278
278
|
errorStateMessage: "",
|
|
279
|
-
sortable:
|
|
279
|
+
sortable: P,
|
|
280
280
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
281
|
-
renderCell:
|
|
281
|
+
renderCell: V,
|
|
282
282
|
className: r.formsTableBody,
|
|
283
283
|
"data-testid": "forms-data-table"
|
|
284
284
|
}
|
|
@@ -293,13 +293,13 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
293
293
|
{
|
|
294
294
|
id: "formDetailsModal",
|
|
295
295
|
open: c,
|
|
296
|
-
onRequestClose:
|
|
296
|
+
onRequestClose: z,
|
|
297
297
|
modalHeading: t.formName,
|
|
298
298
|
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
299
299
|
passiveModal: !0,
|
|
300
300
|
size: "md",
|
|
301
301
|
testId: "form-details-modal",
|
|
302
|
-
children: /* @__PURE__ */ o("div", { className: r.formContent, children: H || j ? /* @__PURE__ */ o(ne, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ o("div", { children:
|
|
302
|
+
children: /* @__PURE__ */ o("div", { className: r.formContent, children: H || j ? /* @__PURE__ */ o(ne, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ o("div", { children: I(F).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ o("div", { children: I(w).message ?? a("ERROR_FETCHING_FORM_DATA") }) : S.length > 0 ? /* @__PURE__ */ o("div", { className: r.formDetailsContainer, children: S.map((n, s) => /* @__PURE__ */ o(
|
|
303
303
|
Se,
|
|
304
304
|
{
|
|
305
305
|
observation: n,
|
|
@@ -314,5 +314,5 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
314
314
|
] });
|
|
315
315
|
};
|
|
316
316
|
export {
|
|
317
|
-
|
|
317
|
+
Ie as default
|
|
318
318
|
};
|
|
@@ -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 { H as d, I as f, J as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BwafKS9M.js";
|
|
2
|
+
import { H as d, I as f, J as e } from "./index-aCQK8yvY.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 { H as v, I as C, J as e } from "./index-
|
|
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-BwafKS9M.js";
|
|
2
|
+
import { H as v, I as C, J as e } from "./index-aCQK8yvY.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|