@bahmni/clinical-app 0.0.1-dev.119 → 0.0.1-dev.121
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-B3aV3wve-D9ogh7Uh.js → FormsTable-1YKJ9smH-BM7aXhYn.js} +84 -84
- package/dist/{LNWAZHJI-R4bHJQFP.js → LNWAZHJI-C_dlG_LE.js} +5 -5
- package/dist/{MWZ6AO7Z-dYsrujMJ.js → MWZ6AO7Z-DN8ct8ry.js} +4 -4
- package/dist/Observations-DUCNXnZJ-BOPLq1MC.js +328 -0
- package/dist/{YPM2AS64-BwafKS9M.js → YPM2AS64-CmoJrkTn.js} +1 -1
- package/dist/{index-aCQK8yvY.js → index-DwCJMWny.js} +42866 -42425
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +6 -0
- package/dist/locales/locale_es.json +5 -0
- package/dist/pages/ConsultationPage.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/Observations-DejWaIb1-BK8LvbgH.js +0 -527
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { jsx as o, jsxs as p, Fragment as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useState as x, useMemo as
|
|
1
|
+
import { jsx as o, jsxs as p, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import { u as Q, C as Y, K as W, a as f, H as Z, R as ee, q as V, O as re, T as ae, L as oe, b as ne, w as $, G as te, I as N, c as se, n as de, o as ie, r as me } from "./index-DwCJMWny.js";
|
|
3
|
+
import { useState as x, useMemo as _, useCallback as g } from "react";
|
|
4
4
|
import { createPortal as le } from "react-dom";
|
|
5
|
-
const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18",
|
|
5
|
+
const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18", be = "_formDetailsContainer_1pd36_25", _e = "_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", Me = "_memberRow_1pd36_81", Le = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Ce = "_abnormalValue_1pd36_102", Oe = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Te = "_nestedGroup_1pd36_125", Fe = "_nestedGroupLabel_1pd36_132", De = "_nestedGroupMembers_1pd36_141", r = {
|
|
6
6
|
formsTableBody: ce,
|
|
7
7
|
customAccordianItem: ue,
|
|
8
8
|
formContent: pe,
|
|
9
|
-
formDetailsContainer:
|
|
10
|
-
observation:
|
|
9
|
+
formDetailsContainer: be,
|
|
10
|
+
observation: _e,
|
|
11
11
|
groupContainer: fe,
|
|
12
12
|
rowContainer: ge,
|
|
13
13
|
groupLabel: Ne,
|
|
14
14
|
rowLabel: he,
|
|
15
15
|
rowValue: ye,
|
|
16
16
|
groupMembers: ve,
|
|
17
|
-
memberRow:
|
|
18
|
-
memberLabel:
|
|
17
|
+
memberRow: Me,
|
|
18
|
+
memberLabel: Le,
|
|
19
19
|
memberValue: Ae,
|
|
20
|
-
abnormalValue:
|
|
21
|
-
commentSection:
|
|
20
|
+
abnormalValue: Ce,
|
|
21
|
+
commentSection: Oe,
|
|
22
22
|
commentText: Re,
|
|
23
23
|
nestedGroup: Te,
|
|
24
|
-
nestedGroupLabel:
|
|
25
|
-
nestedGroupMembers:
|
|
24
|
+
nestedGroupLabel: Fe,
|
|
25
|
+
nestedGroupMembers: De
|
|
26
26
|
}, we = "ABNORMAL", U = (e) => {
|
|
27
|
-
const
|
|
28
|
-
return { units:
|
|
27
|
+
const i = e.concept?.units, m = e.concept?.lowNormal, a = e.concept?.hiNormal, l = m != null, c = a != null, u = l && c ? ` (${m} - ${a})` : l ? ` (>${m})` : c ? ` (<${a})` : "", t = e.interpretation && e.interpretation.toUpperCase() === we;
|
|
28
|
+
return { units: i, rangeString: u, isAbnormal: t };
|
|
29
29
|
}, q = ({
|
|
30
30
|
member: e,
|
|
31
|
-
depth:
|
|
31
|
+
depth: i = 0
|
|
32
32
|
}) => {
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
33
|
+
const m = e.groupMembers && e.groupMembers.length > 0, a = e.conceptNameToDisplay ?? e.concept?.shortName ?? e.concept?.name;
|
|
34
|
+
if (m)
|
|
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: `${i * 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: i + 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: `${i * 16}px` },
|
|
59
59
|
children: [
|
|
60
60
|
/* @__PURE__ */ p(
|
|
61
61
|
"p",
|
|
@@ -86,11 +86,11 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
86
86
|
]
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
|
-
},
|
|
89
|
+
}, Be = ({
|
|
90
90
|
observation: e,
|
|
91
|
-
index:
|
|
91
|
+
index: i
|
|
92
92
|
}) => {
|
|
93
|
-
const
|
|
93
|
+
const m = 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: m ? r.groupContainer : r.rowContainer,
|
|
103
103
|
children: [
|
|
104
104
|
/* @__PURE__ */ p(
|
|
105
105
|
"p",
|
|
106
106
|
{
|
|
107
107
|
className: N(
|
|
108
|
-
|
|
109
|
-
!
|
|
108
|
+
m ? r.groupLabel : r.rowLabel,
|
|
109
|
+
!m && c ? r.abnormalValue : ""
|
|
110
110
|
),
|
|
111
111
|
children: [
|
|
112
112
|
e.conceptNameToDisplay,
|
|
113
|
-
!
|
|
113
|
+
!m && l && /* @__PURE__ */ o("span", { className: r.rangeInfo, children: l })
|
|
114
114
|
]
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
|
-
|
|
117
|
+
m ? /* @__PURE__ */ o("div", { className: r.groupMembers, children: e.groupMembers?.map((u) => /* @__PURE__ */ o(
|
|
118
118
|
q,
|
|
119
119
|
{
|
|
120
120
|
member: u,
|
|
@@ -143,43 +143,43 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
143
143
|
] }) })
|
|
144
144
|
]
|
|
145
145
|
},
|
|
146
|
-
`${e.concept.uuid}-${
|
|
146
|
+
`${e.concept.uuid}-${i}`
|
|
147
147
|
);
|
|
148
|
-
},
|
|
148
|
+
}, $e = ({
|
|
149
149
|
episodeOfCareUuids: e,
|
|
150
|
-
encounterUuids:
|
|
151
|
-
config:
|
|
150
|
+
encounterUuids: i,
|
|
151
|
+
config: m
|
|
152
152
|
}) => {
|
|
153
|
-
const { t: a } =
|
|
153
|
+
const { t: a } = Q(), l = Y(), [c, u] = x(!1), [t, L] = x(null), H = m?.numberOfVisits, A = W(
|
|
154
154
|
e,
|
|
155
|
-
|
|
155
|
+
i
|
|
156
156
|
), {
|
|
157
157
|
data: h = [],
|
|
158
|
-
isLoading:
|
|
159
|
-
isError:
|
|
160
|
-
error:
|
|
158
|
+
isLoading: C,
|
|
159
|
+
isError: O,
|
|
160
|
+
error: k
|
|
161
161
|
} = f({
|
|
162
162
|
queryKey: ["forms", l, e],
|
|
163
|
-
queryFn: () => se(l, void 0,
|
|
163
|
+
queryFn: () => se(l, void 0, H),
|
|
164
164
|
enabled: !!l && !A
|
|
165
|
-
}), R =
|
|
166
|
-
(n) =>
|
|
167
|
-
), [h,
|
|
165
|
+
}), R = _(() => !i || i.length === 0 ? h : h.filter(
|
|
166
|
+
(n) => i.includes(n.encounterUuid)
|
|
167
|
+
), [h, i]), { data: T = [] } = f({
|
|
168
168
|
queryKey: ["observationForms"],
|
|
169
169
|
queryFn: de
|
|
170
|
-
}),
|
|
170
|
+
}), F = g(
|
|
171
171
|
(n) => T.find((s) => s.name === n)?.uuid,
|
|
172
172
|
[T]
|
|
173
|
-
), y =
|
|
173
|
+
), y = _(() => {
|
|
174
174
|
if (t)
|
|
175
|
-
return
|
|
176
|
-
}, [t,
|
|
177
|
-
data:
|
|
178
|
-
isLoading:
|
|
179
|
-
error:
|
|
175
|
+
return F(t.formName);
|
|
176
|
+
}, [t, F]), {
|
|
177
|
+
data: Ee,
|
|
178
|
+
isLoading: K,
|
|
179
|
+
error: D
|
|
180
180
|
} = f({
|
|
181
181
|
queryKey: ["formMetadata", y],
|
|
182
|
-
queryFn: () =>
|
|
182
|
+
queryFn: () => ie(y),
|
|
183
183
|
enabled: !!y && c
|
|
184
184
|
}), {
|
|
185
185
|
data: v,
|
|
@@ -187,33 +187,33 @@ 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: () => me(t.encounterUuid, !0),
|
|
191
191
|
enabled: !!t?.encounterUuid && c
|
|
192
|
-
}),
|
|
192
|
+
}), B = _(() => !v?.observations || !t?.formName ? [] : v.observations.filter(
|
|
193
193
|
(n) => "formFieldPath" in n && typeof n.formFieldPath == "string" && n.formFieldPath.includes(t.formName)
|
|
194
|
-
), [v?.observations, t?.formName]),
|
|
194
|
+
), [v?.observations, t?.formName]), E = _(
|
|
195
195
|
() => [
|
|
196
196
|
{ key: "recordedOn", header: a("FORM_RECORDED_ON") },
|
|
197
197
|
{ key: "recordedBy", header: a("FORM_RECORDED_BY") }
|
|
198
198
|
],
|
|
199
199
|
[a]
|
|
200
|
-
), P =
|
|
200
|
+
), P = _(
|
|
201
201
|
() => [
|
|
202
202
|
{ key: "recordedOn", sortable: !0 },
|
|
203
203
|
{ key: "recordedBy", sortable: !0 }
|
|
204
204
|
],
|
|
205
205
|
[]
|
|
206
|
-
),
|
|
206
|
+
), I = _(() => {
|
|
207
207
|
const n = R.reduce(
|
|
208
208
|
(s, d) => {
|
|
209
|
-
const
|
|
210
|
-
s[
|
|
211
|
-
const
|
|
212
|
-
return s[
|
|
209
|
+
const b = d.formName;
|
|
210
|
+
s[b] ??= [];
|
|
211
|
+
const M = d.providers.map((z) => z.providerName).filter(Boolean).join(", ");
|
|
212
|
+
return s[b].push({
|
|
213
213
|
id: d.encounterUuid,
|
|
214
214
|
formName: d.formName,
|
|
215
215
|
recordedOn: Z(d.encounterDateTime, a, te).formattedResult,
|
|
216
|
-
recordedBy:
|
|
216
|
+
recordedBy: M ?? "--",
|
|
217
217
|
encounterDateTime: d.encounterDateTime,
|
|
218
218
|
encounterUuid: d.encounterUuid
|
|
219
219
|
}), s;
|
|
@@ -224,43 +224,43 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
224
224
|
([s, d]) => ({
|
|
225
225
|
formName: s,
|
|
226
226
|
records: d.sort(
|
|
227
|
-
(
|
|
227
|
+
(b, M) => M.encounterDateTime - b.encounterDateTime
|
|
228
228
|
)
|
|
229
229
|
})
|
|
230
230
|
).sort((s, d) => s.formName.localeCompare(d.formName));
|
|
231
|
-
}, [R, a]),
|
|
232
|
-
|
|
233
|
-
}, []),
|
|
234
|
-
u(!1),
|
|
235
|
-
}, []),
|
|
231
|
+
}, [R, a]), S = g((n) => {
|
|
232
|
+
L(n), u(!0);
|
|
233
|
+
}, []), X = g(() => {
|
|
234
|
+
u(!1), L(null);
|
|
235
|
+
}, []), G = 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: () => S(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
|
+
[S]
|
|
247
247
|
);
|
|
248
|
-
return /* @__PURE__ */ p(
|
|
249
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children:
|
|
250
|
-
|
|
248
|
+
return /* @__PURE__ */ p(J, { children: [
|
|
249
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: C || O || I.length === 0 || A ? /* @__PURE__ */ o(
|
|
250
|
+
V,
|
|
251
251
|
{
|
|
252
|
-
headers:
|
|
252
|
+
headers: E,
|
|
253
253
|
ariaLabel: a("FORMS_HEADING"),
|
|
254
254
|
rows: [],
|
|
255
|
-
loading:
|
|
256
|
-
errorStateMessage:
|
|
255
|
+
loading: C,
|
|
256
|
+
errorStateMessage: O ? k?.message : void 0,
|
|
257
257
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
258
|
-
renderCell:
|
|
258
|
+
renderCell: G,
|
|
259
259
|
className: r.formsTableBody,
|
|
260
260
|
"data-testid": "sortable-data-table"
|
|
261
261
|
}
|
|
262
|
-
) : /* @__PURE__ */ o(re, { align: "start", children:
|
|
263
|
-
const { formName: d, records:
|
|
262
|
+
) : /* @__PURE__ */ o(re, { align: "start", children: I.map((n, s) => {
|
|
263
|
+
const { formName: d, records: b } = n;
|
|
264
264
|
return /* @__PURE__ */ o(
|
|
265
265
|
ae,
|
|
266
266
|
{
|
|
@@ -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
|
+
V,
|
|
273
273
|
{
|
|
274
|
-
headers:
|
|
274
|
+
headers: E,
|
|
275
275
|
ariaLabel: a("FORMS_HEADING"),
|
|
276
|
-
rows:
|
|
276
|
+
rows: b,
|
|
277
277
|
loading: !1,
|
|
278
278
|
errorStateMessage: "",
|
|
279
279
|
sortable: P,
|
|
280
280
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
281
|
-
renderCell:
|
|
281
|
+
renderCell: G,
|
|
282
282
|
className: r.formsTableBody,
|
|
283
283
|
"data-testid": "forms-data-table"
|
|
284
284
|
}
|
|
@@ -293,14 +293,14 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
293
293
|
{
|
|
294
294
|
id: "formDetailsModal",
|
|
295
295
|
open: c,
|
|
296
|
-
onRequestClose:
|
|
296
|
+
onRequestClose: X,
|
|
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:
|
|
303
|
-
|
|
302
|
+
children: /* @__PURE__ */ o("div", { className: r.formContent, children: K || j ? /* @__PURE__ */ o(ne, { width: "100%", lineCount: 3 }) : D ? /* @__PURE__ */ o("div", { children: $(D).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ o("div", { children: $(w).message ?? a("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ o("div", { className: r.formDetailsContainer, children: B.map((n, s) => /* @__PURE__ */ o(
|
|
303
|
+
Be,
|
|
304
304
|
{
|
|
305
305
|
observation: n,
|
|
306
306
|
index: s
|
|
@@ -314,5 +314,5 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
314
314
|
] });
|
|
315
315
|
};
|
|
316
316
|
export {
|
|
317
|
-
|
|
317
|
+
$e as default
|
|
318
318
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as
|
|
2
|
-
import {
|
|
1
|
+
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-CmoJrkTn.js";
|
|
2
|
+
import { i as d, j as f, k as e } from "./index-DwCJMWny.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -7,17 +7,17 @@ var p = (a) => {
|
|
|
7
7
|
const o = r.theme_preference || l;
|
|
8
8
|
return o !== "system" ? o : n();
|
|
9
9
|
});
|
|
10
|
-
return e(
|
|
10
|
+
return e(v.Provider, {
|
|
11
11
|
value: a,
|
|
12
12
|
get children() {
|
|
13
13
|
return e(m, {
|
|
14
14
|
localStore: r,
|
|
15
15
|
setLocalStore: t,
|
|
16
16
|
get children() {
|
|
17
|
-
return e(
|
|
17
|
+
return e(i.Provider, {
|
|
18
18
|
value: s,
|
|
19
19
|
get children() {
|
|
20
|
-
return e(
|
|
20
|
+
return e(u, {
|
|
21
21
|
localStore: r,
|
|
22
22
|
setLocalStore: t
|
|
23
23
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as
|
|
2
|
-
import {
|
|
1
|
+
import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-CmoJrkTn.js";
|
|
2
|
+
import { i as v, j as C, k as e } from "./index-DwCJMWny.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -10,12 +10,12 @@ var h = (t) => {
|
|
|
10
10
|
return e(d.Provider, {
|
|
11
11
|
value: t,
|
|
12
12
|
get children() {
|
|
13
|
-
return e(
|
|
13
|
+
return e(i, {
|
|
14
14
|
disabled: !0,
|
|
15
15
|
localStore: r,
|
|
16
16
|
setLocalStore: o,
|
|
17
17
|
get children() {
|
|
18
|
-
return e(
|
|
18
|
+
return e(u.Provider, {
|
|
19
19
|
value: l,
|
|
20
20
|
get children() {
|
|
21
21
|
return e(m, {
|