@bahmni/clinical-app 0.0.1-dev.109 → 0.0.1-dev.110
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-BanYzo5c-KsdVVSMe.js → FormsTable-DvQygCpm-DU5ePiaA.js} +66 -66
- package/dist/{LNWAZHJI-De-LKNGb.js → LNWAZHJI-DbMownaN.js} +7 -7
- package/dist/{MWZ6AO7Z-DYIVGZga.js → MWZ6AO7Z-BfeNGPBG.js} +7 -7
- package/dist/Observations-DHohreqe-DGIi6QZy.js +503 -0
- package/dist/{YPM2AS64-CIVqaRmV.js → YPM2AS64-BGgRsB8q.js} +1 -1
- package/dist/{index-BK9tPWzE.js → index-BzD6Dx9A.js} +42281 -41975
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/locales/locale_en.json +7 -0
- package/dist/locales/locale_es.json +7 -0
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as o, jsxs as p, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import { u as
|
|
3
|
-
import { useState as U, useMemo as
|
|
2
|
+
import { u as Y, T as W, K as X, a as f, C as Z, L as ee, Q as I, b as re, O as ae, D as oe, c as ne, r as G, F as te, d as N, R as se, e as de, f as ie, g as me } from "./index-BzD6Dx9A.js";
|
|
3
|
+
import { useState as U, 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", 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 = {
|
|
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:
|
|
19
|
-
memberValue:
|
|
20
|
-
abnormalValue:
|
|
21
|
-
commentSection:
|
|
17
|
+
memberRow: Le,
|
|
18
|
+
memberLabel: Me,
|
|
19
|
+
memberValue: Ae,
|
|
20
|
+
abnormalValue: Oe,
|
|
21
|
+
commentSection: Ce,
|
|
22
22
|
commentText: Re,
|
|
23
|
-
nestedGroup:
|
|
24
|
-
nestedGroupLabel:
|
|
25
|
-
nestedGroupMembers:
|
|
26
|
-
},
|
|
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() ===
|
|
23
|
+
nestedGroup: Te,
|
|
24
|
+
nestedGroupLabel: De,
|
|
25
|
+
nestedGroupMembers: Fe
|
|
26
|
+
}, we = "ABNORMAL", q = (e) => {
|
|
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
28
|
return { units: i, rangeString: u, isAbnormal: t };
|
|
29
29
|
}, x = ({
|
|
30
30
|
member: e,
|
|
@@ -86,7 +86,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
86
86
|
]
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
|
-
},
|
|
89
|
+
}, Be = ({
|
|
90
90
|
observation: e,
|
|
91
91
|
index: i
|
|
92
92
|
}) => {
|
|
@@ -145,75 +145,75 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
145
145
|
},
|
|
146
146
|
`${e.concept.uuid}-${i}`
|
|
147
147
|
);
|
|
148
|
-
},
|
|
148
|
+
}, Ge = ({
|
|
149
149
|
episodeOfCareUuids: e,
|
|
150
150
|
encounterUuids: i,
|
|
151
151
|
config: m
|
|
152
152
|
}) => {
|
|
153
|
-
const { t: a } =
|
|
153
|
+
const { t: a } = Y(), l = W(), [c, u] = U(!1), [t, M] = U(null), k = m?.numberOfVisits, A = X(
|
|
154
154
|
e,
|
|
155
155
|
i
|
|
156
156
|
), {
|
|
157
157
|
data: h = [],
|
|
158
|
-
isLoading:
|
|
159
|
-
isError:
|
|
160
|
-
error:
|
|
158
|
+
isLoading: O,
|
|
159
|
+
isError: C,
|
|
160
|
+
error: K
|
|
161
161
|
} = f({
|
|
162
162
|
queryKey: ["forms", l, e],
|
|
163
163
|
queryFn: () => se(l, void 0, k),
|
|
164
|
-
enabled: !!l && !
|
|
165
|
-
}), R =
|
|
164
|
+
enabled: !!l && !A
|
|
165
|
+
}), R = _(() => !i || i.length === 0 ? h : h.filter(
|
|
166
166
|
(n) => i.includes(n.encounterUuid)
|
|
167
|
-
), [h, i]), { data:
|
|
167
|
+
), [h, i]), { data: T = [] } = f({
|
|
168
168
|
queryKey: ["observationForms"],
|
|
169
169
|
queryFn: de
|
|
170
|
-
}),
|
|
171
|
-
(n) =>
|
|
172
|
-
[
|
|
173
|
-
), y =
|
|
170
|
+
}), D = g(
|
|
171
|
+
(n) => T.find((s) => s.name === n)?.uuid,
|
|
172
|
+
[T]
|
|
173
|
+
), y = _(() => {
|
|
174
174
|
if (t)
|
|
175
|
-
return
|
|
176
|
-
}, [t,
|
|
177
|
-
data:
|
|
178
|
-
isLoading:
|
|
179
|
-
error:
|
|
175
|
+
return D(t.formName);
|
|
176
|
+
}, [t, D]), {
|
|
177
|
+
data: Ee,
|
|
178
|
+
isLoading: H,
|
|
179
|
+
error: F
|
|
180
180
|
} = f({
|
|
181
181
|
queryKey: ["formMetadata", y],
|
|
182
182
|
queryFn: () => ie(y),
|
|
183
183
|
enabled: !!y && c
|
|
184
184
|
}), {
|
|
185
185
|
data: v,
|
|
186
|
-
isLoading:
|
|
187
|
-
error:
|
|
186
|
+
isLoading: j,
|
|
187
|
+
error: w
|
|
188
188
|
} = f({
|
|
189
189
|
queryKey: ["formsEncounter", t?.encounterUuid],
|
|
190
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
|
-
),
|
|
200
|
+
), J = _(
|
|
201
201
|
() => [
|
|
202
202
|
{ key: "recordedOn", sortable: !0 },
|
|
203
203
|
{ key: "recordedBy", sortable: !0 }
|
|
204
204
|
],
|
|
205
205
|
[]
|
|
206
|
-
),
|
|
206
|
+
), S = _(() => {
|
|
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 L = d.providers.map((Q) => Q.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: L ?? "--",
|
|
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, L) => L.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),
|
|
231
|
+
}, [R, a]), V = g((n) => {
|
|
232
|
+
M(n), u(!0);
|
|
233
|
+
}, []), P = g(() => {
|
|
234
|
+
u(!1), M(null);
|
|
235
235
|
}, []), $ = 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: () => V(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
|
+
[V]
|
|
247
247
|
);
|
|
248
248
|
return /* @__PURE__ */ p(z, { children: [
|
|
249
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children:
|
|
250
|
-
|
|
249
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: O || C || S.length === 0 || A ? /* @__PURE__ */ o(
|
|
250
|
+
I,
|
|
251
251
|
{
|
|
252
|
-
headers:
|
|
252
|
+
headers: E,
|
|
253
253
|
ariaLabel: a("FORMS_HEADING"),
|
|
254
254
|
rows: [],
|
|
255
|
-
loading:
|
|
256
|
-
errorStateMessage:
|
|
255
|
+
loading: O,
|
|
256
|
+
errorStateMessage: C ? K?.message : void 0,
|
|
257
257
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
258
258
|
renderCell: $,
|
|
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: S.map((n, s) => {
|
|
263
|
+
const { formName: d, records: b } = n;
|
|
264
264
|
return /* @__PURE__ */ o(
|
|
265
265
|
ae,
|
|
266
266
|
{
|
|
@@ -269,14 +269,14 @@ 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
|
+
I,
|
|
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
|
-
sortable:
|
|
279
|
+
sortable: J,
|
|
280
280
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
281
281
|
renderCell: $,
|
|
282
282
|
className: r.formsTableBody,
|
|
@@ -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: P,
|
|
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: H || j ? /* @__PURE__ */ o(ne, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ o("div", { children: G(F).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ o("div", { children: G(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
|
+
Ge as default
|
|
318
318
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BGgRsB8q.js";
|
|
2
|
+
import { J as d, M as f, N as e } from "./index-BzD6Dx9A.js";
|
|
3
|
+
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
6
|
}), n = d(), s = f(() => {
|
|
7
7
|
const o = r.theme_preference || l;
|
|
8
8
|
return o !== "system" ? o : n();
|
|
9
9
|
});
|
|
10
|
-
return e(
|
|
10
|
+
return e(i.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(u.Provider, {
|
|
18
18
|
value: s,
|
|
19
19
|
get children() {
|
|
20
|
-
return e(
|
|
20
|
+
return e(v, {
|
|
21
21
|
localStore: r,
|
|
22
22
|
setLocalStore: t
|
|
23
23
|
});
|
|
@@ -27,7 +27,7 @@ var h = (a) => {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
}, C =
|
|
30
|
+
}, C = p;
|
|
31
31
|
export {
|
|
32
32
|
C as default
|
|
33
33
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { c as s, T as c, P as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
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-BGgRsB8q.js";
|
|
2
|
+
import { J as v, M as C, N as e } from "./index-BzD6Dx9A.js";
|
|
3
|
+
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), a =
|
|
6
|
+
}), a = v(), l = C(() => {
|
|
7
7
|
const n = r.theme_preference || c;
|
|
8
8
|
return n !== "system" ? n : a();
|
|
9
9
|
});
|
|
10
10
|
return e(d.Provider, {
|
|
11
11
|
value: t,
|
|
12
12
|
get children() {
|
|
13
|
-
return e(
|
|
13
|
+
return e(u, {
|
|
14
14
|
disabled: !0,
|
|
15
15
|
localStore: r,
|
|
16
16
|
setLocalStore: o,
|
|
17
17
|
get children() {
|
|
18
|
-
return e(
|
|
18
|
+
return e(i.Provider, {
|
|
19
19
|
value: l,
|
|
20
20
|
get children() {
|
|
21
21
|
return e(m, {
|
|
@@ -36,7 +36,7 @@ var C = (t) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
}, p =
|
|
39
|
+
}, p = h;
|
|
40
40
|
export {
|
|
41
41
|
p as default
|
|
42
42
|
};
|