@bahmni/registration-app 0.0.1-dev.168 → 0.0.1-dev.170
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-C7QfrmD1-C8xKxTFG.js → FormsTable-BPeGy94--DA_PuI0b.js} +40 -40
- package/dist/{LNWAZHJI-lDbx5Q3a.js → LNWAZHJI-CLn-YMPC.js} +7 -7
- package/dist/{MWZ6AO7Z-Dwh5b8AK.js → MWZ6AO7Z-CYnG06KQ.js} +2 -2
- package/dist/{Observations-BAaMZ7G3-DK11Ak19.js → Observations-DFn-QE1o-DAuZGKeT.js} +27 -27
- package/dist/{YPM2AS64-ZfjFK021.js → YPM2AS64-BqSb_VXD.js} +1 -1
- package/dist/components/common/PersonAttributeInput.d.ts +1 -1
- package/dist/components/common/PersonAttributeInput.d.ts.map +1 -1
- package/dist/components/common/personAttributeHelpers.d.ts +1 -0
- package/dist/components/common/personAttributeHelpers.d.ts.map +1 -1
- package/dist/components/common/personAttributeValidation.d.ts +2 -2
- package/dist/components/common/personAttributeValidation.d.ts.map +1 -1
- package/dist/components/forms/contactInfo/ContactInfo.d.ts.map +1 -1
- package/dist/hooks/usePersonAttributeFields.d.ts +1 -0
- package/dist/hooks/usePersonAttributeFields.d.ts.map +1 -1
- package/dist/{index-pMxrukjk.js → index-DA_fHx-R.js} +12451 -12414
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +1 -0
- package/dist/locales/locale_es.json +1 -0
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as s, jsxs as p, Fragment as H } from "react/jsx-runtime";
|
|
2
|
-
import { u as ee, h as re,
|
|
3
|
-
import { useQueryClient as he, useQuery as
|
|
4
|
-
import { useState as K, useMemo as h, useCallback as
|
|
5
|
-
const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6",
|
|
2
|
+
import { u as ee, h as re, v as ae, J as te, Y as oe, G as ne, K as se, e as de, i as me, T as ie, z as U, a as le, b as ce, c as ue, M as be, V as q, d as pe, g as _e, C as A, F as fe, N as $e, f as ve, U as ge } from "./index-DA_fHx-R.js";
|
|
3
|
+
import { useQueryClient as he, useQuery as L } from "@tanstack/react-query";
|
|
4
|
+
import { useState as K, useMemo as h, useCallback as R } from "react";
|
|
5
|
+
const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Ae = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", Fe = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Ve = "_rowLabel_1pd36_58", Oe = "_rowValue_1pd36_67", Te = "_groupMembers_1pd36_75", Ie = "_memberRow_1pd36_81", Se = "_memberLabel_1pd36_86", we = "_memberValue_1pd36_94", De = "_abnormalValue_1pd36_102", Ge = "_commentSection_1pd36_110", Ee = "_commentText_1pd36_116", xe = "_nestedGroup_1pd36_125", Be = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
|
|
6
6
|
formsTableBody: Ne,
|
|
7
7
|
customAccordianItem: ye,
|
|
8
|
-
formContent:
|
|
9
|
-
formDetailsContainer:
|
|
10
|
-
observation:
|
|
11
|
-
groupContainer:
|
|
8
|
+
formContent: Le,
|
|
9
|
+
formDetailsContainer: Re,
|
|
10
|
+
observation: Ae,
|
|
11
|
+
groupContainer: Ce,
|
|
12
12
|
rowContainer: Fe,
|
|
13
13
|
groupLabel: Me,
|
|
14
14
|
rowLabel: Ve,
|
|
15
15
|
rowValue: Oe,
|
|
16
|
-
groupMembers:
|
|
17
|
-
memberRow:
|
|
16
|
+
groupMembers: Te,
|
|
17
|
+
memberRow: Ie,
|
|
18
18
|
memberLabel: Se,
|
|
19
19
|
memberValue: we,
|
|
20
20
|
abnormalValue: De,
|
|
@@ -23,7 +23,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
23
23
|
nestedGroup: xe,
|
|
24
24
|
nestedGroupLabel: Be,
|
|
25
25
|
nestedGroupMembers: Ue
|
|
26
|
-
},
|
|
26
|
+
}, k = (e) => {
|
|
27
27
|
const r = fe(e);
|
|
28
28
|
return r === "Image" ? /* @__PURE__ */ s(
|
|
29
29
|
$e,
|
|
@@ -33,10 +33,10 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
33
33
|
id: `${e}-img`
|
|
34
34
|
}
|
|
35
35
|
) : r === "Video" ? /* @__PURE__ */ s(ve, { id: `${e}-video`, videoSrc: e }) : e;
|
|
36
|
-
},
|
|
36
|
+
}, P = (e) => {
|
|
37
37
|
const r = e.observationValue?.unit, n = e.observationValue?.referenceRange?.low?.value, a = e.observationValue?.referenceRange?.high?.value, d = n != null, c = a != null, m = d && c ? ` (${n} - ${a})` : d ? ` (>${n})` : c ? ` (<${a})` : "", t = e.observationValue?.isAbnormal === !0;
|
|
38
38
|
return { units: r, rangeString: m, isAbnormal: t };
|
|
39
|
-
},
|
|
39
|
+
}, j = ({
|
|
40
40
|
member: e,
|
|
41
41
|
depth: r = 0,
|
|
42
42
|
memberIndex: n = 0,
|
|
@@ -66,7 +66,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
66
66
|
className: o.nestedGroupMembers,
|
|
67
67
|
"data-testid": `${t}obs-nested-group-members-${m}-${n}`,
|
|
68
68
|
children: e.members?.map((N, y) => /* @__PURE__ */ s(
|
|
69
|
-
|
|
69
|
+
j,
|
|
70
70
|
{
|
|
71
71
|
member: N,
|
|
72
72
|
depth: r + 1,
|
|
@@ -80,7 +80,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
|
-
const { units: b, rangeString: v, isAbnormal: _ } =
|
|
83
|
+
const { units: b, rangeString: v, isAbnormal: _ } = P(e), f = e.observationValue?.value?.toString(), $ = f ? k(f) : null;
|
|
84
84
|
return /* @__PURE__ */ p(H, { children: [
|
|
85
85
|
/* @__PURE__ */ p(
|
|
86
86
|
"div",
|
|
@@ -92,7 +92,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
92
92
|
/* @__PURE__ */ p(
|
|
93
93
|
"p",
|
|
94
94
|
{
|
|
95
|
-
className:
|
|
95
|
+
className: A(
|
|
96
96
|
o.memberLabel,
|
|
97
97
|
_ ? o.abnormalValue : ""
|
|
98
98
|
),
|
|
@@ -106,7 +106,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
106
106
|
/* @__PURE__ */ p(
|
|
107
107
|
"div",
|
|
108
108
|
{
|
|
109
|
-
className:
|
|
109
|
+
className: A(
|
|
110
110
|
o.memberValue,
|
|
111
111
|
_ ? o.abnormalValue : ""
|
|
112
112
|
),
|
|
@@ -139,7 +139,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
139
139
|
formName: n = "",
|
|
140
140
|
comment: a
|
|
141
141
|
}) => {
|
|
142
|
-
const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } =
|
|
142
|
+
const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = P(e), b = n ? `${n}-` : "", v = e.observationValue?.value?.toString(), _ = v ? k(v) : null;
|
|
143
143
|
return /* @__PURE__ */ p(
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
@@ -155,7 +155,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
155
155
|
/* @__PURE__ */ p(
|
|
156
156
|
"p",
|
|
157
157
|
{
|
|
158
|
-
className:
|
|
158
|
+
className: A(
|
|
159
159
|
d ? o.groupLabel : o.rowLabel,
|
|
160
160
|
!d && t ? o.abnormalValue : ""
|
|
161
161
|
),
|
|
@@ -172,7 +172,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
172
172
|
className: o.groupMembers,
|
|
173
173
|
"data-testid": `${b}observation-group-members-${e.display}-${r}`,
|
|
174
174
|
children: e.members?.map((f, $) => /* @__PURE__ */ s(
|
|
175
|
-
|
|
175
|
+
j,
|
|
176
176
|
{
|
|
177
177
|
member: f,
|
|
178
178
|
depth: 0,
|
|
@@ -185,7 +185,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
185
185
|
) : /* @__PURE__ */ p(
|
|
186
186
|
"div",
|
|
187
187
|
{
|
|
188
|
-
className:
|
|
188
|
+
className: A(
|
|
189
189
|
o.rowValue,
|
|
190
190
|
t ? o.abnormalValue : ""
|
|
191
191
|
),
|
|
@@ -219,13 +219,13 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
219
219
|
)?.valueString : void 0, He = (e) => {
|
|
220
220
|
if (e)
|
|
221
221
|
return e.note?.[0]?.text;
|
|
222
|
-
},
|
|
223
|
-
const n =
|
|
222
|
+
}, ke = (e, r) => e.entry?.find((n) => n.resource?.id === r)?.resource, V = (e, r) => {
|
|
223
|
+
const n = ke(e, r);
|
|
224
224
|
return n ? {
|
|
225
225
|
formFieldPath: Ke(n),
|
|
226
226
|
comment: He(n)
|
|
227
227
|
} : {};
|
|
228
|
-
},
|
|
228
|
+
}, Pe = (e, r) => {
|
|
229
229
|
if (!e?.entry || !r)
|
|
230
230
|
return [];
|
|
231
231
|
const n = pe(e);
|
|
@@ -261,30 +261,30 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
261
261
|
isError: y,
|
|
262
262
|
error: z,
|
|
263
263
|
refetch: Y
|
|
264
|
-
} =
|
|
264
|
+
} = L({
|
|
265
265
|
queryKey: ["forms", d, e],
|
|
266
266
|
queryFn: () => te(d, void 0, v),
|
|
267
267
|
enabled: !!d && !_
|
|
268
268
|
}), O = h(() => !r || r.length === 0 ? $ : $.filter(
|
|
269
269
|
(i) => r.includes(i.encounterUuid)
|
|
270
|
-
), [$, r]), { data:
|
|
270
|
+
), [$, r]), { data: T = [] } = L({
|
|
271
271
|
queryKey: ["observationForms"],
|
|
272
272
|
queryFn: () => oe()
|
|
273
|
-
}),
|
|
274
|
-
(i) =>
|
|
275
|
-
[
|
|
276
|
-
),
|
|
273
|
+
}), I = R(
|
|
274
|
+
(i) => T.find((u) => u.name === i)?.uuid,
|
|
275
|
+
[T]
|
|
276
|
+
), C = h(() => {
|
|
277
277
|
if (t)
|
|
278
|
-
return
|
|
279
|
-
}, [t,
|
|
280
|
-
queryKey: ["formMetadata",
|
|
281
|
-
queryFn: () => ne(
|
|
282
|
-
enabled: !!
|
|
278
|
+
return I(t.formName);
|
|
279
|
+
}, [t, I]), { isLoading: Q, error: S } = L({
|
|
280
|
+
queryKey: ["formMetadata", C],
|
|
281
|
+
queryFn: () => ne(C),
|
|
282
|
+
enabled: !!C && c
|
|
283
283
|
}), {
|
|
284
284
|
data: F,
|
|
285
285
|
isLoading: J,
|
|
286
286
|
error: w
|
|
287
|
-
} =
|
|
287
|
+
} = L({
|
|
288
288
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
289
289
|
queryFn: () => se(t.encounterUuid),
|
|
290
290
|
enabled: !!t?.encounterUuid && c
|
|
@@ -295,7 +295,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
295
295
|
},
|
|
296
296
|
[d]
|
|
297
297
|
);
|
|
298
|
-
const D = h(() => !F || !t?.formName ? [] :
|
|
298
|
+
const D = h(() => !F || !t?.formName ? [] : Pe(
|
|
299
299
|
F,
|
|
300
300
|
t.formName
|
|
301
301
|
), [F, t?.formName]), G = h(
|
|
@@ -335,11 +335,11 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
|
|
|
335
335
|
)
|
|
336
336
|
})
|
|
337
337
|
).sort((u, l) => u.formName.localeCompare(l.formName));
|
|
338
|
-
}, [O, a]), x =
|
|
338
|
+
}, [O, a]), x = R((i) => {
|
|
339
339
|
b(i), m(!0);
|
|
340
|
-
}, []), W =
|
|
340
|
+
}, []), W = R(() => {
|
|
341
341
|
m(!1), b(null);
|
|
342
|
-
}, []), B =
|
|
342
|
+
}, []), B = R(
|
|
343
343
|
(i, u) => {
|
|
344
344
|
switch (u) {
|
|
345
345
|
case "recordedOn":
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import {
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BqSb_VXD.js";
|
|
2
|
+
import { k as d, l as f, m as e } from "./index-DA_fHx-R.js";
|
|
3
3
|
var p = (a) => {
|
|
4
|
-
const [r,
|
|
4
|
+
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
6
|
}), n = d(), s = f(() => {
|
|
7
|
-
const
|
|
8
|
-
return
|
|
7
|
+
const o = r.theme_preference || l;
|
|
8
|
+
return o !== "system" ? o : n();
|
|
9
9
|
});
|
|
10
10
|
return e(i.Provider, {
|
|
11
11
|
value: a,
|
|
12
12
|
get children() {
|
|
13
13
|
return e(m, {
|
|
14
14
|
localStore: r,
|
|
15
|
-
setLocalStore:
|
|
15
|
+
setLocalStore: t,
|
|
16
16
|
get children() {
|
|
17
17
|
return e(u.Provider, {
|
|
18
18
|
value: s,
|
|
19
19
|
get children() {
|
|
20
20
|
return e(v, {
|
|
21
21
|
localStore: r,
|
|
22
|
-
setLocalStore:
|
|
22
|
+
setLocalStore: t
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
});
|
|
@@ -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 {
|
|
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-BqSb_VXD.js";
|
|
2
|
+
import { k as v, l as C, m as e } from "./index-DA_fHx-R.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { h as B, p as V, u as I, q as x, W as K, e as
|
|
1
|
+
import { jsxs as $, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { h as B, p as V, u as I, q as x, W as K, e as z, d as G, r as Q, n as j, _ as w, z as H, j as M, x as S, t as W, F as P, D as X, N as Y, f as J } from "./index-DA_fHx-R.js";
|
|
3
3
|
import { useQueries as Z, useQuery as ee } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as te, useEffect as
|
|
5
|
-
const
|
|
4
|
+
import { useRef as te, useEffect as N, useMemo as h } from "react";
|
|
5
|
+
const D = (t, d, i, l, r) => {
|
|
6
6
|
const a = W(t, d), s = a.value, o = P(s);
|
|
7
7
|
let n = s;
|
|
8
8
|
o === "Image" && (n = /* @__PURE__ */ c(Y, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (n = /* @__PURE__ */ c(J, { id: `${s}-video`, videoSrc: s }));
|
|
@@ -28,7 +28,7 @@ const A = (t, d, i, l, r) => {
|
|
|
28
28
|
id: `grouped-obs-${t.display}-${l}`,
|
|
29
29
|
open: i,
|
|
30
30
|
children: t.members?.map(
|
|
31
|
-
(s, o) =>
|
|
31
|
+
(s, o) => D(s, o, r, a, d)
|
|
32
32
|
)
|
|
33
33
|
},
|
|
34
34
|
`grouped-obs-${t.id}`
|
|
@@ -38,7 +38,7 @@ const A = (t, d, i, l, r) => {
|
|
|
38
38
|
}) => {
|
|
39
39
|
const { t: i } = I(), l = (r, a, s) => {
|
|
40
40
|
const o = M(r.encounterDetails, i);
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ $(
|
|
42
42
|
S,
|
|
43
43
|
{
|
|
44
44
|
title: o,
|
|
@@ -46,7 +46,7 @@ const A = (t, d, i, l, r) => {
|
|
|
46
46
|
open: a,
|
|
47
47
|
children: [
|
|
48
48
|
r.observations.map(
|
|
49
|
-
(n, b) =>
|
|
49
|
+
(n, b) => D(n, b, s, d, i)
|
|
50
50
|
),
|
|
51
51
|
r.groupedObservations.map(
|
|
52
52
|
(n, b) => ae(
|
|
@@ -74,7 +74,7 @@ const A = (t, d, i, l, r) => {
|
|
|
74
74
|
)
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
|
-
}, se = "_observations_kfbhq_1", oe = "_title_kfbhq_12",
|
|
77
|
+
}, se = "_observations_kfbhq_1", oe = "_title_kfbhq_12", T = {
|
|
78
78
|
observations: se,
|
|
79
79
|
title: oe
|
|
80
80
|
}, ie = (t) => ["conceptUuid", t], ne = (t, d) => ["observations", t, ...d], be = ({ config: t }) => {
|
|
@@ -85,7 +85,7 @@ const A = (t, d, i, l, r) => {
|
|
|
85
85
|
enabled: !!e
|
|
86
86
|
}))
|
|
87
87
|
});
|
|
88
|
-
|
|
88
|
+
N(() => {
|
|
89
89
|
n.forEach((e, m) => {
|
|
90
90
|
if (e.isError && !r.current.has(m)) {
|
|
91
91
|
const C = i[m];
|
|
@@ -99,62 +99,62 @@ const A = (t, d, i, l, r) => {
|
|
|
99
99
|
}, [n, i]);
|
|
100
100
|
const b = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = h(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), v = h(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
101
101
|
data: u,
|
|
102
|
-
isLoading:
|
|
102
|
+
isLoading: F,
|
|
103
103
|
isError: R,
|
|
104
|
-
refetch:
|
|
104
|
+
refetch: f
|
|
105
105
|
} = ee({
|
|
106
106
|
queryKey: ne(a, p),
|
|
107
107
|
queryFn: () => K(a, p),
|
|
108
108
|
enabled: !!a && p.length > 0 && v
|
|
109
109
|
});
|
|
110
|
-
|
|
110
|
+
z(
|
|
111
111
|
(e) => {
|
|
112
112
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
113
113
|
(m) => p.includes(m)
|
|
114
|
-
) &&
|
|
114
|
+
) && f();
|
|
115
115
|
},
|
|
116
|
-
[a,
|
|
117
|
-
),
|
|
116
|
+
[a, f]
|
|
117
|
+
), N(() => {
|
|
118
118
|
R && s({
|
|
119
119
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
120
120
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
121
121
|
type: "error"
|
|
122
122
|
});
|
|
123
123
|
}, [R]);
|
|
124
|
-
const
|
|
124
|
+
const g = h(() => {
|
|
125
125
|
if (!u) return [];
|
|
126
|
-
const e =
|
|
127
|
-
return
|
|
128
|
-
}, [u]),
|
|
126
|
+
const e = G(u), m = Q(e);
|
|
127
|
+
return j(m);
|
|
128
|
+
}, [u]), q = [
|
|
129
129
|
{ key: "name", header: "name" },
|
|
130
130
|
{ key: "value", header: "value" },
|
|
131
131
|
{ key: "form", header: "form" }
|
|
132
|
-
],
|
|
133
|
-
return /* @__PURE__ */
|
|
132
|
+
], _ = F || !v, O = R && v, A = (!u || u.entry?.length === 0 || p.length === 0) && v, L = O ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, k = g.length > 0 && !_ && !O, E = d.titleTranslationKey, y = E ? o(E) : "";
|
|
133
|
+
return /* @__PURE__ */ $(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
136
|
id: "observations",
|
|
137
137
|
"data-testid": E ? `observations-${y}` : "observations",
|
|
138
138
|
"aria-label": "observations-aria-label",
|
|
139
|
-
className:
|
|
139
|
+
className: T.observations,
|
|
140
140
|
children: [
|
|
141
141
|
/* @__PURE__ */ c(
|
|
142
|
-
|
|
142
|
+
w,
|
|
143
143
|
{
|
|
144
144
|
id: "observations-title",
|
|
145
145
|
testId: E ? `observations-title-${y}` : "observations-title",
|
|
146
146
|
title: y,
|
|
147
|
-
className:
|
|
147
|
+
className: T.title,
|
|
148
148
|
children: /* @__PURE__ */ c("p", { children: y })
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
k ? /* @__PURE__ */ c(re, { groupedData:
|
|
151
|
+
k ? /* @__PURE__ */ c(re, { groupedData: g, title: y }) : /* @__PURE__ */ c(
|
|
152
152
|
H,
|
|
153
153
|
{
|
|
154
|
-
headers:
|
|
154
|
+
headers: q,
|
|
155
155
|
rows: [],
|
|
156
156
|
ariaLabel: o("OBSERVATIONS"),
|
|
157
|
-
loading:
|
|
157
|
+
loading: _,
|
|
158
158
|
errorStateMessage: L,
|
|
159
159
|
emptyStateMessage: U,
|
|
160
160
|
dataTestId: "observations-table"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as we, s as z, w as xt, y as B, l as q, m as y, P as Ro, A as ye, S as R, B as _, E as k, H as N, I as A, L as bs, O as ir, Q as $e, R as U, X as Hn, Z as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-DA_fHx-R.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -6,7 +6,7 @@ export interface ValidationConfig {
|
|
|
6
6
|
export interface PersonAttributeInputProps {
|
|
7
7
|
uuid: string;
|
|
8
8
|
name: string;
|
|
9
|
-
label: string;
|
|
9
|
+
label: string | React.ReactNode;
|
|
10
10
|
format: string;
|
|
11
11
|
value: string | number | boolean | undefined;
|
|
12
12
|
answers?: AttributeAnswer[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonAttributeInput.d.ts","sourceRoot":"","sources":["../../../src/components/common/PersonAttributeInput.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"PersonAttributeInput.d.ts","sourceRoot":"","sources":["../../../src/components/common/PersonAttributeInput.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC7C,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACtD;AAOD;;;GAGG;AACH,eAAO,MAAM,oBAAoB;+FAW9B,yBAAyB;;CAoJ3B,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { PersonAttributesData } from '../../models/patient';
|
|
|
3
3
|
export interface ConfigAttribute {
|
|
4
4
|
field: string;
|
|
5
5
|
translationKey: string;
|
|
6
|
+
required?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const getFieldsToShow: (attributeFields: PersonAttributeField[], configAttributes: ConfigAttribute[]) => PersonAttributeField[];
|
|
8
9
|
export declare const createFieldTranslationMap: (configAttributes: ConfigAttribute[]) => Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personAttributeHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/common/personAttributeHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"personAttributeHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/common/personAttributeHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,GAC1B,iBAAiB,oBAAoB,EAAE,EACvC,kBAAkB,eAAe,EAAE,KAClC,oBAAoB,EAkBtB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,kBAAkB,eAAe,EAAE,KAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAMvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,cAAc,oBAAoB,EAAE,EACpC,cAAc,oBAAoB,KACjC,oBAMF,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,WAAW,MAAM,EACjB,qBAAqB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,aAAa,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACnC,MAGF,CAAC"}
|
|
@@ -12,9 +12,9 @@ export interface FieldValidationConfig {
|
|
|
12
12
|
[fieldName: string]: ValidationConfig;
|
|
13
13
|
}
|
|
14
14
|
export declare const getValidationConfig: (fieldName: string, fieldValidationConfig?: FieldValidationConfig) => ValidationConfig | undefined;
|
|
15
|
-
export declare const validateField: (value: string | number | boolean | undefined, validationConfig: ValidationConfig, t: (key: string) => string) => {
|
|
15
|
+
export declare const validateField: (value: string | number | boolean | undefined, validationConfig: ValidationConfig, t: (key: string | string[], params?: Record<string, unknown>) => string) => {
|
|
16
16
|
isValid: boolean;
|
|
17
17
|
error: string;
|
|
18
18
|
};
|
|
19
|
-
export declare const validateAllFields: (fieldsToShow: PersonAttributeField[], formData: PersonAttributesData,
|
|
19
|
+
export declare const validateAllFields: (fieldsToShow: PersonAttributeField[], formData: PersonAttributesData, t: (key: string | string[], params?: Record<string, unknown>) => string, fieldValidationConfig?: FieldValidationConfig) => ValidationResult;
|
|
20
20
|
//# sourceMappingURL=personAttributeValidation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personAttributeValidation.d.ts","sourceRoot":"","sources":["../../../src/components/common/personAttributeValidation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"personAttributeValidation.d.ts","sourceRoot":"","sources":["../../../src/components/common/personAttributeValidation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACvC;AAED,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,EACjB,wBAAwB,qBAAqB,KAC5C,gBAAgB,GAAG,SAQrB,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,EAC5C,kBAAkB,gBAAgB,EAClC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,KACtE;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAYnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,cAAc,oBAAoB,EAAE,EACpC,UAAU,oBAAoB,EAC9B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,EACvE,wBAAwB,qBAAqB,KAC5C,gBAuCF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/contactInfo/ContactInfo.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAcpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,oBAAoB,CAAC;CACrC;AAED,UAAU,gBAAgB;IACxB,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,WAAW;2BAA0B,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"ContactInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/contactInfo/ContactInfo.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAcpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,oBAAoB,CAAC;CACrC;AAED,UAAU,gBAAgB;IACxB,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,WAAW;2BAA0B,gBAAgB;;CAkIjE,CAAC;AAIF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePersonAttributeFields.d.ts","sourceRoot":"","sources":["../../src/hooks/usePersonAttributeFields.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"usePersonAttributeFields.d.ts","sourceRoot":"","sources":["../../src/hooks/usePersonAttributeFields.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;CA+BpC,CAAC"}
|