@bahmni/registration-app 0.0.1-dev.118 → 0.0.1-dev.120
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-DGMnOsw7-BLXRYHxq.js → FormsTable-1YKJ9smH-OH0OWF5b.js} +81 -81
- package/dist/LNWAZHJI-Dlr3nvjZ.js +33 -0
- package/dist/{MWZ6AO7Z-C6ordGr4.js → MWZ6AO7Z-Cjb2j1x8.js} +8 -8
- package/dist/Observations-DUCNXnZJ-BM5N7jaf.js +329 -0
- package/dist/{YPM2AS64-C9-Y0_W9.js → YPM2AS64-BR6gQKF0.js} +1 -1
- package/dist/{index-CkeU8lKx.js → index-BfJu4sPw.js} +25924 -25700
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/LNWAZHJI-rOmxwURe.js +0 -33
- package/dist/Observations-nESYMiLR-BRY7RB1V.js +0 -305
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { jsx as o, jsxs as p, Fragment as
|
|
2
|
-
import { u 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 Z, n as ee, o as re, r as ae, H as oe, R as ne, q as V, O as te, T as se, L as de, b as ie, w as $, G as me, I as N } from "./index-BfJu4sPw.js";
|
|
3
3
|
import { useQuery as f } from "@tanstack/react-query";
|
|
4
|
-
import { useState as x, useMemo as
|
|
4
|
+
import { useState as x, useMemo as _, useCallback as g } from "react";
|
|
5
5
|
import { createPortal as le } from "react-dom";
|
|
6
|
-
const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18",
|
|
6
|
+
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 = {
|
|
7
7
|
formsTableBody: ce,
|
|
8
8
|
customAccordianItem: ue,
|
|
9
9
|
formContent: pe,
|
|
10
|
-
formDetailsContainer:
|
|
11
|
-
observation:
|
|
10
|
+
formDetailsContainer: be,
|
|
11
|
+
observation: _e,
|
|
12
12
|
groupContainer: fe,
|
|
13
13
|
rowContainer: ge,
|
|
14
14
|
groupLabel: Ne,
|
|
15
15
|
rowLabel: he,
|
|
16
16
|
rowValue: ye,
|
|
17
17
|
groupMembers: ve,
|
|
18
|
-
memberRow:
|
|
19
|
-
memberLabel:
|
|
18
|
+
memberRow: Me,
|
|
19
|
+
memberLabel: Le,
|
|
20
20
|
memberValue: Ae,
|
|
21
|
-
abnormalValue:
|
|
22
|
-
commentSection:
|
|
21
|
+
abnormalValue: Ce,
|
|
22
|
+
commentSection: Oe,
|
|
23
23
|
commentText: Re,
|
|
24
24
|
nestedGroup: Te,
|
|
25
|
-
nestedGroupLabel:
|
|
26
|
-
nestedGroupMembers:
|
|
25
|
+
nestedGroupLabel: Fe,
|
|
26
|
+
nestedGroupMembers: De
|
|
27
27
|
}, we = "ABNORMAL", U = (e) => {
|
|
28
|
-
const
|
|
29
|
-
return { units:
|
|
28
|
+
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;
|
|
29
|
+
return { units: i, rangeString: u, isAbnormal: t };
|
|
30
30
|
}, q = ({
|
|
31
31
|
member: e,
|
|
32
|
-
depth:
|
|
32
|
+
depth: i = 0
|
|
33
33
|
}) => {
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
34
|
+
const m = e.groupMembers && e.groupMembers.length > 0, a = e.conceptNameToDisplay ?? e.concept?.shortName ?? e.concept?.name;
|
|
35
|
+
if (m)
|
|
36
36
|
return /* @__PURE__ */ p("div", { className: r.nestedGroup, children: [
|
|
37
37
|
/* @__PURE__ */ o(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
40
|
className: r.nestedGroupLabel,
|
|
41
|
-
style: { paddingLeft: `${
|
|
41
|
+
style: { paddingLeft: `${i * 16}px` },
|
|
42
42
|
children: a
|
|
43
43
|
}
|
|
44
44
|
),
|
|
@@ -46,7 +46,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
46
46
|
q,
|
|
47
47
|
{
|
|
48
48
|
member: t,
|
|
49
|
-
depth:
|
|
49
|
+
depth: i + 1
|
|
50
50
|
},
|
|
51
51
|
`${t.concept.uuid}`
|
|
52
52
|
)) })
|
|
@@ -56,7 +56,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
58
|
className: r.memberRow,
|
|
59
|
-
style: { paddingLeft: `${
|
|
59
|
+
style: { paddingLeft: `${i * 16}px` },
|
|
60
60
|
children: [
|
|
61
61
|
/* @__PURE__ */ p(
|
|
62
62
|
"p",
|
|
@@ -87,11 +87,11 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
87
87
|
]
|
|
88
88
|
}
|
|
89
89
|
);
|
|
90
|
-
},
|
|
90
|
+
}, Be = ({
|
|
91
91
|
observation: e,
|
|
92
|
-
index:
|
|
92
|
+
index: i
|
|
93
93
|
}) => {
|
|
94
|
-
const
|
|
94
|
+
const m = e.groupMembers && e.groupMembers.length > 0, { units: a, rangeString: l, isAbnormal: c } = U(e);
|
|
95
95
|
return /* @__PURE__ */ p(
|
|
96
96
|
"div",
|
|
97
97
|
{
|
|
@@ -100,22 +100,22 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
100
100
|
/* @__PURE__ */ p(
|
|
101
101
|
"div",
|
|
102
102
|
{
|
|
103
|
-
className:
|
|
103
|
+
className: m ? r.groupContainer : r.rowContainer,
|
|
104
104
|
children: [
|
|
105
105
|
/* @__PURE__ */ p(
|
|
106
106
|
"p",
|
|
107
107
|
{
|
|
108
108
|
className: N(
|
|
109
|
-
|
|
110
|
-
!
|
|
109
|
+
m ? r.groupLabel : r.rowLabel,
|
|
110
|
+
!m && c ? r.abnormalValue : ""
|
|
111
111
|
),
|
|
112
112
|
children: [
|
|
113
113
|
e.conceptNameToDisplay,
|
|
114
|
-
!
|
|
114
|
+
!m && l && /* @__PURE__ */ o("span", { className: r.rangeInfo, children: l })
|
|
115
115
|
]
|
|
116
116
|
}
|
|
117
117
|
),
|
|
118
|
-
|
|
118
|
+
m ? /* @__PURE__ */ o("div", { className: r.groupMembers, children: e.groupMembers?.map((u) => /* @__PURE__ */ o(
|
|
119
119
|
q,
|
|
120
120
|
{
|
|
121
121
|
member: u,
|
|
@@ -144,40 +144,40 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
144
144
|
] }) })
|
|
145
145
|
]
|
|
146
146
|
},
|
|
147
|
-
`${e.concept.uuid}-${
|
|
147
|
+
`${e.concept.uuid}-${i}`
|
|
148
148
|
);
|
|
149
149
|
}, xe = ({
|
|
150
150
|
episodeOfCareUuids: e,
|
|
151
|
-
encounterUuids:
|
|
152
|
-
config:
|
|
151
|
+
encounterUuids: i,
|
|
152
|
+
config: m
|
|
153
153
|
}) => {
|
|
154
|
-
const { t: a } =
|
|
154
|
+
const { t: a } = Q(), l = Y(), [c, u] = x(!1), [t, L] = x(null), H = m?.numberOfVisits, A = W(
|
|
155
155
|
e,
|
|
156
|
-
|
|
156
|
+
i
|
|
157
157
|
), {
|
|
158
158
|
data: h = [],
|
|
159
|
-
isLoading:
|
|
160
|
-
isError:
|
|
161
|
-
error:
|
|
159
|
+
isLoading: C,
|
|
160
|
+
isError: O,
|
|
161
|
+
error: k
|
|
162
162
|
} = f({
|
|
163
163
|
queryKey: ["forms", l, e],
|
|
164
|
-
queryFn: () => Z(l, void 0,
|
|
164
|
+
queryFn: () => Z(l, void 0, H),
|
|
165
165
|
enabled: !!l && !A
|
|
166
|
-
}), R =
|
|
167
|
-
(n) =>
|
|
168
|
-
), [h,
|
|
166
|
+
}), R = _(() => !i || i.length === 0 ? h : h.filter(
|
|
167
|
+
(n) => i.includes(n.encounterUuid)
|
|
168
|
+
), [h, i]), { data: T = [] } = f({
|
|
169
169
|
queryKey: ["observationForms"],
|
|
170
170
|
queryFn: ee
|
|
171
|
-
}),
|
|
171
|
+
}), F = g(
|
|
172
172
|
(n) => T.find((s) => s.name === n)?.uuid,
|
|
173
173
|
[T]
|
|
174
|
-
), y =
|
|
174
|
+
), y = _(() => {
|
|
175
175
|
if (t)
|
|
176
|
-
return
|
|
177
|
-
}, [t,
|
|
178
|
-
data:
|
|
179
|
-
isLoading:
|
|
180
|
-
error:
|
|
176
|
+
return F(t.formName);
|
|
177
|
+
}, [t, F]), {
|
|
178
|
+
data: Ee,
|
|
179
|
+
isLoading: K,
|
|
180
|
+
error: D
|
|
181
181
|
} = f({
|
|
182
182
|
queryKey: ["formMetadata", y],
|
|
183
183
|
queryFn: () => re(y),
|
|
@@ -190,31 +190,31 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
190
190
|
queryKey: ["formsEncounter", t?.encounterUuid],
|
|
191
191
|
queryFn: () => ae(t.encounterUuid, !0),
|
|
192
192
|
enabled: !!t?.encounterUuid && c
|
|
193
|
-
}),
|
|
193
|
+
}), B = _(() => !v?.observations || !t?.formName ? [] : v.observations.filter(
|
|
194
194
|
(n) => "formFieldPath" in n && typeof n.formFieldPath == "string" && n.formFieldPath.includes(t.formName)
|
|
195
|
-
), [v?.observations, t?.formName]),
|
|
195
|
+
), [v?.observations, t?.formName]), E = _(
|
|
196
196
|
() => [
|
|
197
197
|
{ key: "recordedOn", header: a("FORM_RECORDED_ON") },
|
|
198
198
|
{ key: "recordedBy", header: a("FORM_RECORDED_BY") }
|
|
199
199
|
],
|
|
200
200
|
[a]
|
|
201
|
-
), P =
|
|
201
|
+
), P = _(
|
|
202
202
|
() => [
|
|
203
203
|
{ key: "recordedOn", sortable: !0 },
|
|
204
204
|
{ key: "recordedBy", sortable: !0 }
|
|
205
205
|
],
|
|
206
206
|
[]
|
|
207
|
-
),
|
|
207
|
+
), I = _(() => {
|
|
208
208
|
const n = R.reduce(
|
|
209
209
|
(s, d) => {
|
|
210
|
-
const
|
|
211
|
-
s[
|
|
212
|
-
const
|
|
213
|
-
return s[
|
|
210
|
+
const b = d.formName;
|
|
211
|
+
s[b] ??= [];
|
|
212
|
+
const M = d.providers.map((z) => z.providerName).filter(Boolean).join(", ");
|
|
213
|
+
return s[b].push({
|
|
214
214
|
id: d.encounterUuid,
|
|
215
215
|
formName: d.formName,
|
|
216
|
-
recordedOn: oe(d.encounterDateTime, a,
|
|
217
|
-
recordedBy:
|
|
216
|
+
recordedOn: oe(d.encounterDateTime, a, me).formattedResult,
|
|
217
|
+
recordedBy: M ?? "--",
|
|
218
218
|
encounterDateTime: d.encounterDateTime,
|
|
219
219
|
encounterUuid: d.encounterUuid
|
|
220
220
|
}), s;
|
|
@@ -225,43 +225,43 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
225
225
|
([s, d]) => ({
|
|
226
226
|
formName: s,
|
|
227
227
|
records: d.sort(
|
|
228
|
-
(
|
|
228
|
+
(b, M) => M.encounterDateTime - b.encounterDateTime
|
|
229
229
|
)
|
|
230
230
|
})
|
|
231
231
|
).sort((s, d) => s.formName.localeCompare(d.formName));
|
|
232
|
-
}, [R, a]),
|
|
233
|
-
|
|
234
|
-
}, []),
|
|
235
|
-
u(!1),
|
|
236
|
-
}, []),
|
|
232
|
+
}, [R, a]), S = g((n) => {
|
|
233
|
+
L(n), u(!0);
|
|
234
|
+
}, []), X = g(() => {
|
|
235
|
+
u(!1), L(null);
|
|
236
|
+
}, []), G = g(
|
|
237
237
|
(n, s) => {
|
|
238
238
|
switch (s) {
|
|
239
239
|
case "recordedOn":
|
|
240
|
-
return /* @__PURE__ */ o(ne, { onClick: () =>
|
|
240
|
+
return /* @__PURE__ */ o(ne, { onClick: () => S(n), children: n.recordedOn });
|
|
241
241
|
case "recordedBy":
|
|
242
242
|
return n.recordedBy;
|
|
243
243
|
default:
|
|
244
244
|
return null;
|
|
245
245
|
}
|
|
246
246
|
},
|
|
247
|
-
[
|
|
247
|
+
[S]
|
|
248
248
|
);
|
|
249
|
-
return /* @__PURE__ */ p(
|
|
250
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children:
|
|
251
|
-
|
|
249
|
+
return /* @__PURE__ */ p(J, { children: [
|
|
250
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: C || O || I.length === 0 || A ? /* @__PURE__ */ o(
|
|
251
|
+
V,
|
|
252
252
|
{
|
|
253
|
-
headers:
|
|
253
|
+
headers: E,
|
|
254
254
|
ariaLabel: a("FORMS_HEADING"),
|
|
255
255
|
rows: [],
|
|
256
|
-
loading:
|
|
257
|
-
errorStateMessage:
|
|
256
|
+
loading: C,
|
|
257
|
+
errorStateMessage: O ? k?.message : void 0,
|
|
258
258
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
259
|
-
renderCell:
|
|
259
|
+
renderCell: G,
|
|
260
260
|
className: r.formsTableBody,
|
|
261
261
|
"data-testid": "sortable-data-table"
|
|
262
262
|
}
|
|
263
|
-
) : /* @__PURE__ */ o(te, { align: "start", children:
|
|
264
|
-
const { formName: d, records:
|
|
263
|
+
) : /* @__PURE__ */ o(te, { align: "start", children: I.map((n, s) => {
|
|
264
|
+
const { formName: d, records: b } = n;
|
|
265
265
|
return /* @__PURE__ */ o(
|
|
266
266
|
se,
|
|
267
267
|
{
|
|
@@ -270,16 +270,16 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
270
270
|
testId: `accordian-title-${d}`,
|
|
271
271
|
open: s === 0,
|
|
272
272
|
children: /* @__PURE__ */ o(
|
|
273
|
-
|
|
273
|
+
V,
|
|
274
274
|
{
|
|
275
|
-
headers:
|
|
275
|
+
headers: E,
|
|
276
276
|
ariaLabel: a("FORMS_HEADING"),
|
|
277
|
-
rows:
|
|
277
|
+
rows: b,
|
|
278
278
|
loading: !1,
|
|
279
279
|
errorStateMessage: "",
|
|
280
280
|
sortable: P,
|
|
281
281
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
282
|
-
renderCell:
|
|
282
|
+
renderCell: G,
|
|
283
283
|
className: r.formsTableBody,
|
|
284
284
|
"data-testid": "forms-data-table"
|
|
285
285
|
}
|
|
@@ -294,14 +294,14 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
294
294
|
{
|
|
295
295
|
id: "formDetailsModal",
|
|
296
296
|
open: c,
|
|
297
|
-
onRequestClose:
|
|
297
|
+
onRequestClose: X,
|
|
298
298
|
modalHeading: t.formName,
|
|
299
299
|
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
300
300
|
passiveModal: !0,
|
|
301
301
|
size: "md",
|
|
302
302
|
testId: "form-details-modal",
|
|
303
|
-
children: /* @__PURE__ */ o("div", { className: r.formContent, children:
|
|
304
|
-
|
|
303
|
+
children: /* @__PURE__ */ o("div", { className: r.formContent, children: K || j ? /* @__PURE__ */ o(ie, { 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(
|
|
304
|
+
Be,
|
|
305
305
|
{
|
|
306
306
|
observation: n,
|
|
307
307
|
index: s
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-BR6gQKF0.js";
|
|
2
|
+
import { g as d, h as f, i as e } from "./index-BfJu4sPw.js";
|
|
3
|
+
var h = (a) => {
|
|
4
|
+
const [r, t] = c({
|
|
5
|
+
prefix: "TanstackQueryDevtools"
|
|
6
|
+
}), n = d(), s = f(() => {
|
|
7
|
+
const o = r.theme_preference || l;
|
|
8
|
+
return o !== "system" ? o : n();
|
|
9
|
+
});
|
|
10
|
+
return e(v.Provider, {
|
|
11
|
+
value: a,
|
|
12
|
+
get children() {
|
|
13
|
+
return e(m, {
|
|
14
|
+
localStore: r,
|
|
15
|
+
setLocalStore: t,
|
|
16
|
+
get children() {
|
|
17
|
+
return e(i.Provider, {
|
|
18
|
+
value: s,
|
|
19
|
+
get children() {
|
|
20
|
+
return e(u, {
|
|
21
|
+
localStore: r,
|
|
22
|
+
setLocalStore: t
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}, C = h;
|
|
31
|
+
export {
|
|
32
|
+
C as default
|
|
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 i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-BR6gQKF0.js";
|
|
2
|
+
import { g as h, h as v, i as e } from "./index-BfJu4sPw.js";
|
|
3
|
+
var C = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), a =
|
|
6
|
+
}), a = h(), l = v(() => {
|
|
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(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, {
|
|
@@ -36,7 +36,7 @@ var h = (t) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
},
|
|
39
|
+
}, p = C;
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
p as default
|
|
42
42
|
};
|