@alfadocs/ui-kit-debug 1.4.0 → 1.4.1
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/_chunks/{anamnesis-i18n-BA631X4t.js → anamnesis-i18n-DZcrt8dP.js} +557 -550
- package/dist/_chunks/anamnesis-i18n-DZcrt8dP.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/index.js +1 -1
- package/dist/patterns/anamnesis/anamnesis-events.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis-format.d.ts.map +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/anamnesis-i18n-BA631X4t.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as d, jsx as t, Fragment as
|
|
1
|
+
import { jsxs as d, jsx as t, Fragment as _e } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as we, useState as $, useEffect as ia, useCallback as na, useId as Qe, useMemo as O, Fragment as Zt, useContext as ei, createContext as ai } from "react";
|
|
3
3
|
import { B as Q } from "./badge-DCOqV9mI.js";
|
|
4
4
|
import { B as Z } from "./button-CPGiR_bH.js";
|
|
5
5
|
import { I as re } from "./icon-button-C_kbcd7I.js";
|
|
6
6
|
import { C as ye } from "./card-DPmk26CL.js";
|
|
7
|
-
import { C as
|
|
7
|
+
import { C as ln, b as Jn, a as cn } from "./collapsible-CTjxzGuF.js";
|
|
8
8
|
import { E as Ue } from "./empty-state-CrLsi0XI.js";
|
|
9
9
|
import { F as q } from "./form-field-M5UpX65Z.js";
|
|
10
|
-
import { M as
|
|
10
|
+
import { M as dn } from "./multi-select-CC52Qws6.js";
|
|
11
11
|
import { N as ga } from "./number-input-DOe5VYei.js";
|
|
12
12
|
import { R as ke } from "./radio-TWf9Q-mp.js";
|
|
13
13
|
import { R as ha } from "./radio-group-CI-6SmSw.js";
|
|
@@ -24,7 +24,7 @@ import { S as ti } from "./sparkline-BmGcEyZO.js";
|
|
|
24
24
|
import { U as ii } from "./user-B12p7bVF.js";
|
|
25
25
|
import { A as et, a as at } from "./arrow-up-BYvcvTkB.js";
|
|
26
26
|
import { M as si } from "./minus-BQDHq1c1.js";
|
|
27
|
-
import { C as
|
|
27
|
+
import { C as mn } from "./chevron-down-DWE7GSq9.js";
|
|
28
28
|
import { S as oi } from "./separator-CYU_bGFn.js";
|
|
29
29
|
import { X as ri } from "./x-B5YnXwCz.js";
|
|
30
30
|
import { A as li } from "./annotation-marker-CsUJGZjQ.js";
|
|
@@ -46,10 +46,10 @@ import { P as aa } from "./plus-DzMQ_c6b.js";
|
|
|
46
46
|
import { T as xi } from "./trash-2-uumy3fy1.js";
|
|
47
47
|
import { A as ki, b as wi, c as Ni, a as Ci } from "./accordion-C11v9ouP.js";
|
|
48
48
|
import { P as Ti } from "./progress-CK8otcQ-.js";
|
|
49
|
-
import { c as
|
|
50
|
-
import { I as
|
|
49
|
+
import { c as un } from "./createLucideIcon-DhHxpK9K.js";
|
|
50
|
+
import { I as Ca } from "./icon-button-group-BLHPN6jg.js";
|
|
51
51
|
import { L as Ze } from "./list-DgE1xWBM.js";
|
|
52
|
-
import { S as
|
|
52
|
+
import { S as pn } from "./switch-OILsBLWo.js";
|
|
53
53
|
import { G as Si } from "./grip-vertical-onSb1JXO.js";
|
|
54
54
|
import { L as Ai } from "./lock-ClAFG1gy.js";
|
|
55
55
|
import { N as Rn } from "./notebook-pen-CO7HoM-W.js";
|
|
@@ -65,7 +65,7 @@ const Ei = [
|
|
|
65
65
|
["path", { d: "M20 8v11a2 2 0 0 1-2 2h-2", key: "1gkqxj" }],
|
|
66
66
|
["path", { d: "m9 15 3-3 3 3", key: "1pd0qc" }],
|
|
67
67
|
["path", { d: "M12 12v9", key: "192myk" }]
|
|
68
|
-
],
|
|
68
|
+
], Ta = un("archive-restore", Ei);
|
|
69
69
|
/**
|
|
70
70
|
* @license lucide-react v1.22.0 - ISC
|
|
71
71
|
*
|
|
@@ -76,7 +76,7 @@ const Di = [
|
|
|
76
76
|
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
77
77
|
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
78
78
|
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
79
|
-
],
|
|
79
|
+
], Sa = un("archive", Di);
|
|
80
80
|
/**
|
|
81
81
|
* @license lucide-react v1.22.0 - ISC
|
|
82
82
|
*
|
|
@@ -92,7 +92,7 @@ const Ii = [
|
|
|
92
92
|
}
|
|
93
93
|
],
|
|
94
94
|
["path", { d: "M6 12h16", key: "s4cdu5" }]
|
|
95
|
-
], Ri =
|
|
95
|
+
], Ri = un("send-horizontal", Ii), Li = [
|
|
96
96
|
{
|
|
97
97
|
key: "weight",
|
|
98
98
|
goal: !0,
|
|
@@ -274,7 +274,7 @@ const Ii = [
|
|
|
274
274
|
...Fi
|
|
275
275
|
];
|
|
276
276
|
Object.fromEntries(nt.map((e) => [e.key, e]));
|
|
277
|
-
const
|
|
277
|
+
const Da = [
|
|
278
278
|
{ code: "E66" },
|
|
279
279
|
{ code: "E66.0", parentCode: "E66" },
|
|
280
280
|
{ code: "E66.9", parentCode: "E66" },
|
|
@@ -288,10 +288,10 @@ const Ea = [
|
|
|
288
288
|
{ code: "D50" },
|
|
289
289
|
{ code: "E55" }
|
|
290
290
|
];
|
|
291
|
-
Object.fromEntries(
|
|
291
|
+
Object.fromEntries(Da.map((e) => [e.code, e]));
|
|
292
292
|
const _i = (e) => `anamnesis.pathology.${e.replace(/\./g, "_")}`;
|
|
293
|
-
|
|
294
|
-
(e) => !
|
|
293
|
+
Da.filter(
|
|
294
|
+
(e) => !Da.some((a) => a.parentCode === e.code)
|
|
295
295
|
).map((e) => e.code);
|
|
296
296
|
const tt = [
|
|
297
297
|
{
|
|
@@ -438,7 +438,7 @@ function Oi(e) {
|
|
|
438
438
|
const We = {
|
|
439
439
|
parameters: nt,
|
|
440
440
|
intakeSections: tt,
|
|
441
|
-
pathologies:
|
|
441
|
+
pathologies: Da
|
|
442
442
|
};
|
|
443
443
|
function la(e) {
|
|
444
444
|
return {
|
|
@@ -452,7 +452,7 @@ function Ye(e) {
|
|
|
452
452
|
(a, n) => (a.item.order ?? a.index) - (n.item.order ?? n.index) || a.index - n.index
|
|
453
453
|
).map((a) => a.item);
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Ia(e) {
|
|
456
456
|
return e.enabled !== !1;
|
|
457
457
|
}
|
|
458
458
|
function it(e) {
|
|
@@ -468,48 +468,48 @@ function st(e) {
|
|
|
468
468
|
);
|
|
469
469
|
}
|
|
470
470
|
function Ne(e, a) {
|
|
471
|
-
const i = la(e).parameters.map(it).filter((o) =>
|
|
471
|
+
const i = la(e).parameters.map(it).filter((o) => Ia(o) || o.locked), s = a ? i.filter((o) => o.group === a) : i;
|
|
472
472
|
return st(s);
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function Pe(e, a) {
|
|
475
475
|
const n = la(e).parameters.map(it), i = a ? n.filter((s) => s.group === a) : n;
|
|
476
476
|
return st(i);
|
|
477
477
|
}
|
|
478
478
|
function qi(e) {
|
|
479
479
|
return { ...e, fields: Ye(e.fields) };
|
|
480
480
|
}
|
|
481
|
-
function
|
|
482
|
-
return Ye(la(e).intakeSections).filter(
|
|
481
|
+
function hn(e) {
|
|
482
|
+
return Ye(la(e).intakeSections).filter(Ia).map((a) => ({
|
|
483
483
|
...a,
|
|
484
|
-
fields: Ye(a.fields.filter(
|
|
484
|
+
fields: Ye(a.fields.filter(Ia))
|
|
485
485
|
})).filter((a) => a.fields.length > 0);
|
|
486
486
|
}
|
|
487
487
|
function Ge(e) {
|
|
488
488
|
return Ye(la(e).intakeSections).map(qi);
|
|
489
489
|
}
|
|
490
490
|
function ot(e) {
|
|
491
|
-
return Ye(la(e).pathologies.filter(
|
|
491
|
+
return Ye(la(e).pathologies.filter(Ia));
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function tn(e) {
|
|
494
494
|
return Ye(la(e).pathologies);
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function _a(e) {
|
|
497
497
|
return Object.fromEntries(
|
|
498
|
-
|
|
498
|
+
tn(e).map((a) => [a.code, a])
|
|
499
499
|
);
|
|
500
500
|
}
|
|
501
501
|
function Vi(e) {
|
|
502
502
|
const a = ot(e);
|
|
503
503
|
return a.filter((n) => !a.some((i) => i.parentCode === n.code)).map((n) => n.code);
|
|
504
504
|
}
|
|
505
|
-
const
|
|
505
|
+
const gn = {
|
|
506
506
|
weight: "weightKg",
|
|
507
507
|
height: "heightCm",
|
|
508
508
|
waist: "waistCm",
|
|
509
509
|
hips: "hipsCm",
|
|
510
510
|
arm: "armCm",
|
|
511
511
|
phaseAngle: "phaseAngleDeg"
|
|
512
|
-
},
|
|
512
|
+
}, $a = {
|
|
513
513
|
year: "numeric",
|
|
514
514
|
month: "short",
|
|
515
515
|
day: "numeric",
|
|
@@ -521,14 +521,14 @@ const hn = {
|
|
|
521
521
|
hour: "2-digit",
|
|
522
522
|
minute: "2-digit"
|
|
523
523
|
}, Bi = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/, Ui = /^\d{4}-\d{2}-\d{2}/;
|
|
524
|
-
function
|
|
524
|
+
function fa(e) {
|
|
525
525
|
return e != null && Bi.test(e);
|
|
526
526
|
}
|
|
527
527
|
function Ln(e) {
|
|
528
528
|
return Ui.test(e) ? e.slice(0, 10) : e;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
return
|
|
530
|
+
function za(e) {
|
|
531
|
+
return fa(e) ? rt : $a;
|
|
532
532
|
}
|
|
533
533
|
function Ki(e, a) {
|
|
534
534
|
return vi(e ?? null, a ?? null);
|
|
@@ -548,12 +548,12 @@ const Gi = /* @__PURE__ */ new Set([
|
|
|
548
548
|
"protein"
|
|
549
549
|
]);
|
|
550
550
|
function lt(e) {
|
|
551
|
-
return e.key === "bmi" ? "computed" : e.key in
|
|
551
|
+
return e.key === "bmi" ? "computed" : e.key in gn ? "anthropometric" : Gi.has(e.key) ? "dietary" : "lab";
|
|
552
552
|
}
|
|
553
553
|
function ma(e) {
|
|
554
554
|
return e != null && Number.isFinite(e) ? e : null;
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function $e(e, a) {
|
|
557
557
|
var n;
|
|
558
558
|
switch (lt(a)) {
|
|
559
559
|
case "computed":
|
|
@@ -562,7 +562,7 @@ function _e(e, a) {
|
|
|
562
562
|
ma(e.anthropometrics.heightCm)
|
|
563
563
|
);
|
|
564
564
|
case "anthropometric":
|
|
565
|
-
return ma(e.anthropometrics[
|
|
565
|
+
return ma(e.anthropometrics[gn[a.key]]);
|
|
566
566
|
case "dietary": {
|
|
567
567
|
const i = (n = e.dietaryIntake) == null ? void 0 : n.find((s) => s.parameterKey === a.key);
|
|
568
568
|
return i ? ma(i.value) : null;
|
|
@@ -575,7 +575,7 @@ function _e(e, a) {
|
|
|
575
575
|
}
|
|
576
576
|
function ji(e, a) {
|
|
577
577
|
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
578
|
-
const i = e[n], s =
|
|
578
|
+
const i = e[n], s = $e(i, a);
|
|
579
579
|
if (s != null) return { value: s, visit: i };
|
|
580
580
|
}
|
|
581
581
|
return null;
|
|
@@ -591,7 +591,7 @@ function Pn(e, a, n) {
|
|
|
591
591
|
...e,
|
|
592
592
|
anthropometrics: {
|
|
593
593
|
...e.anthropometrics,
|
|
594
|
-
[
|
|
594
|
+
[gn[a.key]]: n
|
|
595
595
|
}
|
|
596
596
|
} : i === "dietary" ? {
|
|
597
597
|
...e,
|
|
@@ -617,13 +617,13 @@ function ct(e, a, n) {
|
|
|
617
617
|
) : [...e.targets, { parameterKey: a, target: i }];
|
|
618
618
|
return { ...e, targets: o };
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function va(e, a) {
|
|
621
621
|
return e == null || !Number.isFinite(e) || !a ? null : a.min != null && e < a.min ? "low" : a.max != null && e > a.max ? "high" : null;
|
|
622
622
|
}
|
|
623
623
|
function _n(e, a) {
|
|
624
624
|
return a ? a.min != null && e < a.min ? a.min - e : a.max != null && e > a.max ? e - a.max : 0 : 0;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function ba(e, a, n) {
|
|
627
627
|
if (e == null || a == null || !Number.isFinite(e) || !Number.isFinite(a)) return null;
|
|
628
628
|
const i = e - a, s = i > 0 ? "up" : i < 0 ? "down" : "flat";
|
|
629
629
|
let o = "neutral";
|
|
@@ -649,12 +649,12 @@ function fn(e, a) {
|
|
|
649
649
|
);
|
|
650
650
|
return a.map((i) => {
|
|
651
651
|
const s = e.visits.map((r, l) => {
|
|
652
|
-
const c =
|
|
652
|
+
const c = $e(r, i), m = l > 0 ? $e(e.visits[l - 1], i) : null;
|
|
653
653
|
return {
|
|
654
654
|
visitId: r.id,
|
|
655
655
|
value: c,
|
|
656
|
-
outOfRange:
|
|
657
|
-
delta: l > 0 ?
|
|
656
|
+
outOfRange: va(c, i.referenceRange),
|
|
657
|
+
delta: l > 0 ? ba(c, m, i) : null
|
|
658
658
|
};
|
|
659
659
|
}), o = s.map((r) => r.value);
|
|
660
660
|
return {
|
|
@@ -676,7 +676,7 @@ function dt(e, a) {
|
|
|
676
676
|
function Qi(e, a) {
|
|
677
677
|
return e == null ? null : dt(e, a);
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function Aa(e, a = (n, i) => n === i) {
|
|
680
680
|
return e.every((n) => a(n, e[0]));
|
|
681
681
|
}
|
|
682
682
|
function Yi(e, a) {
|
|
@@ -687,18 +687,18 @@ function Xi(e, a) {
|
|
|
687
687
|
const n = [];
|
|
688
688
|
for (const r of a) {
|
|
689
689
|
const l = r.precision ?? 1, c = e.map(
|
|
690
|
-
(
|
|
690
|
+
(m) => Qi($e(m, r), l)
|
|
691
691
|
);
|
|
692
|
-
|
|
692
|
+
Aa(c) || n.push({
|
|
693
693
|
def: r,
|
|
694
694
|
values: c,
|
|
695
|
-
delta:
|
|
695
|
+
delta: ba(c[c.length - 1], c[0], r)
|
|
696
696
|
});
|
|
697
697
|
}
|
|
698
698
|
const i = [];
|
|
699
699
|
for (const r of $n(e, (l) => l.pathologyCodes)) {
|
|
700
700
|
const l = e.map((c) => c.pathologyCodes.includes(r));
|
|
701
|
-
|
|
701
|
+
Aa(l) || i.push({ code: r, present: l });
|
|
702
702
|
}
|
|
703
703
|
const s = [];
|
|
704
704
|
for (const r of $n(
|
|
@@ -706,17 +706,17 @@ function Xi(e, a) {
|
|
|
706
706
|
(l) => l.therapy.map((c) => c.id)
|
|
707
707
|
)) {
|
|
708
708
|
const l = e.map(
|
|
709
|
-
(c) => c.therapy.find((
|
|
709
|
+
(c) => c.therapy.find((m) => m.id === r)
|
|
710
710
|
);
|
|
711
|
-
|
|
711
|
+
Aa(l, Yi) || s.push({ id: r, entries: l });
|
|
712
712
|
}
|
|
713
713
|
const o = [];
|
|
714
714
|
for (const r of Wi) {
|
|
715
715
|
const l = e.map((c) => {
|
|
716
|
-
var
|
|
717
|
-
return ((
|
|
716
|
+
var m;
|
|
717
|
+
return ((m = c[r]) == null ? void 0 : m.trim()) ?? "";
|
|
718
718
|
});
|
|
719
|
-
|
|
719
|
+
Aa(l) || o.push({ field: r, values: l });
|
|
720
720
|
}
|
|
721
721
|
return { visits: [...e], numeric: n, pathologies: i, medications: s, texts: o };
|
|
722
722
|
}
|
|
@@ -726,7 +726,7 @@ function $n(e, a) {
|
|
|
726
726
|
for (const s of a(i)) n.includes(s) || n.push(s);
|
|
727
727
|
return n;
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function Ma(e) {
|
|
730
730
|
return e.visits[e.visits.length - 1];
|
|
731
731
|
}
|
|
732
732
|
const Ee = "—", zn = /* @__PURE__ */ new Map();
|
|
@@ -743,7 +743,7 @@ function Ae(e, a = 1, n) {
|
|
|
743
743
|
return e == null || !Number.isFinite(e) ? Ee : Ji(n, a).format(e);
|
|
744
744
|
}
|
|
745
745
|
function Zi(e, a) {
|
|
746
|
-
return oa(e) ? new Intl.DateTimeFormat(a,
|
|
746
|
+
return oa(e) ? new Intl.DateTimeFormat(a, $a).format(
|
|
747
747
|
new Date(e)
|
|
748
748
|
) : Ee;
|
|
749
749
|
}
|
|
@@ -761,13 +761,13 @@ function ca(e, a) {
|
|
|
761
761
|
const n = e.relevance ?? "any";
|
|
762
762
|
return n === "any" || n === a;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function De(e) {
|
|
765
765
|
const a = e.lng;
|
|
766
766
|
return typeof a == "string" ? a : void 0;
|
|
767
767
|
}
|
|
768
768
|
function se(e, a) {
|
|
769
|
-
const n =
|
|
770
|
-
return
|
|
769
|
+
const n = De(a);
|
|
770
|
+
return fa(e) ? es(e, n) : Zi(e, n);
|
|
771
771
|
}
|
|
772
772
|
function ns(e) {
|
|
773
773
|
const [a, n, i] = e.slice(0, 10).split("-").map(Number);
|
|
@@ -775,7 +775,7 @@ function ns(e) {
|
|
|
775
775
|
return new Date(a, n - 1, i);
|
|
776
776
|
}
|
|
777
777
|
function ts(e) {
|
|
778
|
-
return
|
|
778
|
+
return fa(e) ? e.slice(10, 16) : "";
|
|
779
779
|
}
|
|
780
780
|
function is(e) {
|
|
781
781
|
const a = (n) => String(n).padStart(2, "0");
|
|
@@ -793,37 +793,37 @@ function ss(e, a, n) {
|
|
|
793
793
|
const i = Hi(e, a);
|
|
794
794
|
return i == null ? Ee : n("anamnesis.header.years", { age: i });
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
const n =
|
|
796
|
+
function Oa(e, a) {
|
|
797
|
+
const n = Ma(e);
|
|
798
798
|
return n ? ss(e.patient.dateOfBirthIso, n.dateIso, a) : Ee;
|
|
799
799
|
}
|
|
800
|
-
function
|
|
800
|
+
function xa(e) {
|
|
801
801
|
const a = e == null ? void 0 : e.trim();
|
|
802
802
|
return a || null;
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
return
|
|
804
|
+
function ze(e, a) {
|
|
805
|
+
return xa(e.label) ?? a(`anamnesis.param.${e.key}`, { defaultValue: e.key });
|
|
806
806
|
}
|
|
807
807
|
function Te(e, a) {
|
|
808
|
-
const n =
|
|
808
|
+
const n = ze(e, a);
|
|
809
809
|
return e.unit ? `${n} (${e.unit})` : n;
|
|
810
810
|
}
|
|
811
811
|
function pe(e, a) {
|
|
812
|
-
return
|
|
812
|
+
return xa(e.label) ?? a(`anamnesis.field.${e.key}.label`, { defaultValue: e.key });
|
|
813
813
|
}
|
|
814
814
|
function os(e, a) {
|
|
815
815
|
const n = pe(e, a);
|
|
816
816
|
return e.unit ? `${n} (${e.unit})` : n;
|
|
817
817
|
}
|
|
818
818
|
function ut(e, a) {
|
|
819
|
-
const n =
|
|
819
|
+
const n = xa(e.helpText);
|
|
820
820
|
return n || a(`anamnesis.field.${e.key}.help`, { defaultValue: "" }) || void 0;
|
|
821
821
|
}
|
|
822
822
|
function fe(e, a) {
|
|
823
|
-
return
|
|
823
|
+
return xa(e.label) ?? a(`anamnesis.section.${e.key}`, { defaultValue: e.key });
|
|
824
824
|
}
|
|
825
825
|
function yn(e, a, n) {
|
|
826
|
-
return
|
|
826
|
+
return xa(n == null ? void 0 : n.label) ?? a(_i(e), { defaultValue: e });
|
|
827
827
|
}
|
|
828
828
|
function Se(e, a, n) {
|
|
829
829
|
const i = yn(e, a, n);
|
|
@@ -853,7 +853,10 @@ function vn(e, a, n) {
|
|
|
853
853
|
case "text":
|
|
854
854
|
return e.text.trim() || "—";
|
|
855
855
|
case "number":
|
|
856
|
-
return e.value != null ?
|
|
856
|
+
return e.value != null ? new Intl.NumberFormat(De(n), {
|
|
857
|
+
maximumFractionDigits: 10,
|
|
858
|
+
useGrouping: !1
|
|
859
|
+
}).format(e.value) : "—";
|
|
857
860
|
case "yesNo": {
|
|
858
861
|
const i = e.present === "unknown" ? n("anamnesis.common.notSure") : n(`anamnesis.common.${e.present}`);
|
|
859
862
|
return e.detail ? `${i} — ${e.detail}` : i;
|
|
@@ -933,16 +936,16 @@ function ds(e, a, n) {
|
|
|
933
936
|
function ms(e, a, n, i) {
|
|
934
937
|
const s = ls(e, n), o = new Map(s.map((c) => [c.key, c])), r = [];
|
|
935
938
|
for (const c of rs) {
|
|
936
|
-
const
|
|
939
|
+
const m = c.kind === "flags" ? ds(s, a, i) : c.fieldKeys.map((h) => {
|
|
937
940
|
const g = o.get(h);
|
|
938
941
|
return g ? cs(g, a, i) : null;
|
|
939
942
|
}).filter((h) => h != null);
|
|
940
|
-
|
|
943
|
+
m.length > 0 && r.push({ id: c.id, kind: c.kind, items: m });
|
|
941
944
|
}
|
|
942
945
|
let l = 0;
|
|
943
946
|
for (const c of s) {
|
|
944
|
-
const
|
|
945
|
-
|
|
947
|
+
const m = a(c.key);
|
|
948
|
+
m && ra(m) && (l += 1);
|
|
946
949
|
}
|
|
947
950
|
return { groups: r, answered: l, total: s.length };
|
|
948
951
|
}
|
|
@@ -1080,9 +1083,9 @@ const ys = Zn(
|
|
|
1080
1083
|
defaultVariants: { valence: "neutral" }
|
|
1081
1084
|
}
|
|
1082
1085
|
);
|
|
1083
|
-
function
|
|
1086
|
+
function qa({ delta: e, def: a, t: n }) {
|
|
1084
1087
|
if (!e) return null;
|
|
1085
|
-
const i = e.direction === "up" ? et : e.direction === "down" ? at : si, s = `${as(e.abs, a.precision ?? 1,
|
|
1088
|
+
const i = e.direction === "up" ? et : e.direction === "down" ? at : si, s = `${as(e.abs, a.precision ?? 1, De(n))}${a.unit ? ` ${a.unit}` : ""}`, o = e.valence === "good" ? n("anamnesis.delta.improved") : e.valence === "bad" ? n("anamnesis.delta.worsened") : n("anamnesis.delta.unchanged");
|
|
1086
1089
|
return /* @__PURE__ */ d(
|
|
1087
1090
|
"span",
|
|
1088
1091
|
{
|
|
@@ -1135,7 +1138,7 @@ function yt({
|
|
|
1135
1138
|
}) {
|
|
1136
1139
|
const o = e.filter((c) => c != null);
|
|
1137
1140
|
if (o.length < 2) return null;
|
|
1138
|
-
const r =
|
|
1141
|
+
const r = ba(o[o.length - 1], o[0], a), l = (r == null ? void 0 : r.valence) ?? "neutral";
|
|
1139
1142
|
return /* @__PURE__ */ t(
|
|
1140
1143
|
ti,
|
|
1141
1144
|
{
|
|
@@ -1146,7 +1149,7 @@ function yt({
|
|
|
1146
1149
|
annotations: i,
|
|
1147
1150
|
onAnnotationSelect: s,
|
|
1148
1151
|
label: n("anamnesis.grid.trendLabel", {
|
|
1149
|
-
parameter:
|
|
1152
|
+
parameter: ze(a, n)
|
|
1150
1153
|
})
|
|
1151
1154
|
}
|
|
1152
1155
|
);
|
|
@@ -1199,7 +1202,7 @@ function bs({
|
|
|
1199
1202
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
1200
1203
|
children: [
|
|
1201
1204
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: r("anamnesis.section.patientIntake") }),
|
|
1202
|
-
e ? /* @__PURE__ */ d(
|
|
1205
|
+
e ? /* @__PURE__ */ d(_e, { children: [
|
|
1203
1206
|
s.length > 0 ? /* @__PURE__ */ t(
|
|
1204
1207
|
gt,
|
|
1205
1208
|
{
|
|
@@ -1210,7 +1213,7 @@ function bs({
|
|
|
1210
1213
|
}
|
|
1211
1214
|
) : null,
|
|
1212
1215
|
/* @__PURE__ */ t(fs, { digest: i, t: r }),
|
|
1213
|
-
/* @__PURE__ */ d(
|
|
1216
|
+
/* @__PURE__ */ d(ln, { variant: "default", children: [
|
|
1214
1217
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: /* @__PURE__ */ d(
|
|
1215
1218
|
Jn,
|
|
1216
1219
|
{
|
|
@@ -1225,7 +1228,7 @@ function bs({
|
|
|
1225
1228
|
}) })
|
|
1226
1229
|
] }),
|
|
1227
1230
|
/* @__PURE__ */ t(
|
|
1228
|
-
|
|
1231
|
+
mn,
|
|
1229
1232
|
{
|
|
1230
1233
|
"aria-hidden": "true",
|
|
1231
1234
|
className: "ds:size-5 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:[[data-state=open]_&]:rotate-180"
|
|
@@ -1235,7 +1238,7 @@ function bs({
|
|
|
1235
1238
|
}
|
|
1236
1239
|
) }),
|
|
1237
1240
|
/* @__PURE__ */ t(
|
|
1238
|
-
|
|
1241
|
+
cn,
|
|
1239
1242
|
{
|
|
1240
1243
|
"aria-label": r("anamnesis.summary.fullQuestionnaire"),
|
|
1241
1244
|
children: /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-md)]", children: /* @__PURE__ */ t(
|
|
@@ -1268,14 +1271,14 @@ const xs = [
|
|
|
1268
1271
|
"fmd",
|
|
1269
1272
|
"annual"
|
|
1270
1273
|
];
|
|
1271
|
-
function
|
|
1274
|
+
function Ha(e) {
|
|
1272
1275
|
return (e ?? "").trim() !== "";
|
|
1273
1276
|
}
|
|
1274
1277
|
function ks(e) {
|
|
1275
1278
|
const a = e.oncological;
|
|
1276
1279
|
if (!a) return 0;
|
|
1277
1280
|
let n = 0;
|
|
1278
|
-
return
|
|
1281
|
+
return Ha(a.tumourType) && (n += 1), Ha(a.stage) && (n += 1), a.metastases && a.metastases.present !== "unknown" && (n += 1), Ha(a.treatmentStatus) && (n += 1), n;
|
|
1279
1282
|
}
|
|
1280
1283
|
function ws(e, a) {
|
|
1281
1284
|
const n = new Map(e.labs.map((s) => [s.parameterKey, s.value])), i = [];
|
|
@@ -1297,7 +1300,7 @@ function Mn(e, a = []) {
|
|
|
1297
1300
|
annual: e ? Ns(e) : 0
|
|
1298
1301
|
}, o = {
|
|
1299
1302
|
oncological: 0,
|
|
1300
|
-
labs: n.filter(({ def: l, value: c }) =>
|
|
1303
|
+
labs: n.filter(({ def: l, value: c }) => va(c, l.referenceRange)).length,
|
|
1301
1304
|
fmd: 0,
|
|
1302
1305
|
annual: 0
|
|
1303
1306
|
}, r = {};
|
|
@@ -1311,7 +1314,7 @@ const Cs = [
|
|
|
1311
1314
|
"clinicalNotes",
|
|
1312
1315
|
"nutritionalProposal"
|
|
1313
1316
|
];
|
|
1314
|
-
function
|
|
1317
|
+
function Va(e) {
|
|
1315
1318
|
return Cs.flatMap((a) => {
|
|
1316
1319
|
var i;
|
|
1317
1320
|
const n = (i = e[a]) == null ? void 0 : i.trim();
|
|
@@ -1319,13 +1322,13 @@ function qa(e) {
|
|
|
1319
1322
|
});
|
|
1320
1323
|
}
|
|
1321
1324
|
function kt(e) {
|
|
1322
|
-
return
|
|
1325
|
+
return Va(e).length > 0;
|
|
1323
1326
|
}
|
|
1324
1327
|
function Ts({
|
|
1325
1328
|
visit: e,
|
|
1326
1329
|
t: a
|
|
1327
1330
|
}) {
|
|
1328
|
-
return /* @__PURE__ */ t(_, { layout: "stacked", divider: "between", children:
|
|
1331
|
+
return /* @__PURE__ */ t(_, { layout: "stacked", divider: "between", children: Va(e).map((n) => /* @__PURE__ */ d(_.Row, { children: [
|
|
1329
1332
|
/* @__PURE__ */ t(_.Term, { children: a(`anamnesis.field.${n.field}.label`) }),
|
|
1330
1333
|
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ t("span", { className: "ds:block ds:break-words ds:whitespace-pre-line", children: n.text }) })
|
|
1331
1334
|
] }, n.field)) });
|
|
@@ -1337,7 +1340,7 @@ function As({
|
|
|
1337
1340
|
defaultOpen: n = !1,
|
|
1338
1341
|
onOpenNote: i
|
|
1339
1342
|
}) {
|
|
1340
|
-
if (
|
|
1343
|
+
if (Va(e).length === 0) return null;
|
|
1341
1344
|
const o = a(`anamnesis.visitType.${e.visitType}`), r = se(e.dateIso, a), l = a(
|
|
1342
1345
|
i ? "anamnesis.visitNote.openInPanel" : "anamnesis.visitNote.trigger",
|
|
1343
1346
|
{ visitType: o, date: r }
|
|
@@ -1382,10 +1385,10 @@ function As({
|
|
|
1382
1385
|
value: e.dateIso,
|
|
1383
1386
|
format: "absolute",
|
|
1384
1387
|
shape: "bare",
|
|
1385
|
-
absoluteFormat:
|
|
1388
|
+
absoluteFormat: za(e.dateIso)
|
|
1386
1389
|
}
|
|
1387
1390
|
),
|
|
1388
|
-
e.practitioner ? /* @__PURE__ */ d(
|
|
1391
|
+
e.practitioner ? /* @__PURE__ */ d(_e, { children: [
|
|
1389
1392
|
" · ",
|
|
1390
1393
|
/* @__PURE__ */ t("span", { className: "ds:break-words", children: e.practitioner })
|
|
1391
1394
|
] }) : null
|
|
@@ -1405,7 +1408,7 @@ function As({
|
|
|
1405
1408
|
)
|
|
1406
1409
|
] });
|
|
1407
1410
|
}
|
|
1408
|
-
const xn = "ds:min-w-[11rem]",
|
|
1411
|
+
const xn = "ds:min-w-[11rem]", ya = "ds:min-w-[8rem]", kn = "ds:w-[40%] ds:min-w-[14rem]", Es = "type-label ds:sticky ds:start-0 ds:top-0 ds:z-[3] ds:bg-[color:var(--card)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)] ds:text-start ds:shadow-[var(--shadow-chrome-end)]", wt = "ds:sticky ds:top-0 ds:z-[2] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)] ds:text-start ds:shadow-[var(--shadow-chrome-down)]", Ds = "type-label ds:sticky ds:end-0 ds:top-0 ds:z-[3] ds:bg-[color:var(--card)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)] ds:text-start ds:shadow-[var(--shadow-chrome-start)]", Is = "ds:sticky ds:end-0 ds:z-[1] ds:bg-[color:var(--card)] ds:shadow-[var(--shadow-chrome-start)]", je = "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:align-top";
|
|
1409
1412
|
function Nt({
|
|
1410
1413
|
column: e,
|
|
1411
1414
|
t: a,
|
|
@@ -1421,7 +1424,7 @@ function Nt({
|
|
|
1421
1424
|
{
|
|
1422
1425
|
scope: "col",
|
|
1423
1426
|
className: [
|
|
1424
|
-
|
|
1427
|
+
ya,
|
|
1425
1428
|
wt,
|
|
1426
1429
|
n ? "ds:bg-[color:var(--muted)]" : "ds:bg-[color:var(--card)]"
|
|
1427
1430
|
].join(" "),
|
|
@@ -1433,7 +1436,7 @@ function Nt({
|
|
|
1433
1436
|
value: l.dateIso,
|
|
1434
1437
|
format: "absolute",
|
|
1435
1438
|
shape: "bare",
|
|
1436
|
-
absoluteFormat:
|
|
1439
|
+
absoluteFormat: za(l.dateIso)
|
|
1437
1440
|
}
|
|
1438
1441
|
) }),
|
|
1439
1442
|
o ? /* @__PURE__ */ t(
|
|
@@ -1471,7 +1474,7 @@ function Ct({
|
|
|
1471
1474
|
trailingLabel: r,
|
|
1472
1475
|
trailingTestId: l,
|
|
1473
1476
|
rows: c,
|
|
1474
|
-
framed:
|
|
1477
|
+
framed: m = !0,
|
|
1475
1478
|
testId: h
|
|
1476
1479
|
}) {
|
|
1477
1480
|
const g = o.length + 2 + (r ? 1 : 0);
|
|
@@ -1484,7 +1487,7 @@ function Ct({
|
|
|
1484
1487
|
"data-testid": h,
|
|
1485
1488
|
className: [
|
|
1486
1489
|
"ds:w-full ds:overflow-x-auto ds:outline-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1487
|
-
|
|
1490
|
+
m ? "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:bg-[color:var(--card)]" : ""
|
|
1488
1491
|
].filter(Boolean).join(" "),
|
|
1489
1492
|
children: /* @__PURE__ */ d("table", { className: "ds:w-full ds:border-collapse", children: [
|
|
1490
1493
|
/* @__PURE__ */ t("caption", { id: e, className: "ds:sr-only", children: a }),
|
|
@@ -1517,7 +1520,7 @@ function Ct({
|
|
|
1517
1520
|
{
|
|
1518
1521
|
scope: "col",
|
|
1519
1522
|
"data-testid": l,
|
|
1520
|
-
className: `${
|
|
1523
|
+
className: `${ya} ${Ds}`,
|
|
1521
1524
|
children: r
|
|
1522
1525
|
}
|
|
1523
1526
|
) : null
|
|
@@ -1550,7 +1553,7 @@ const On = 160, Rs = {
|
|
|
1550
1553
|
removed: "error",
|
|
1551
1554
|
changed: "info"
|
|
1552
1555
|
};
|
|
1553
|
-
function
|
|
1556
|
+
function Ba(e) {
|
|
1554
1557
|
const a = e[0], n = e[e.length - 1];
|
|
1555
1558
|
return !a && n ? "added" : a && !n ? "removed" : "changed";
|
|
1556
1559
|
}
|
|
@@ -1564,13 +1567,13 @@ function Fs(e, a, n) {
|
|
|
1564
1567
|
return a ? i ? `${e.name} · ${i}` : e.name : i || n;
|
|
1565
1568
|
}
|
|
1566
1569
|
function Ps(e, { t: a, seriesByKey: n }) {
|
|
1567
|
-
const i =
|
|
1570
|
+
const i = De(a);
|
|
1568
1571
|
return e.numeric.map((s) => {
|
|
1569
|
-
const o = s.values.map((l) => l != null), r =
|
|
1572
|
+
const o = s.values.map((l) => l != null), r = Ba(o);
|
|
1570
1573
|
return {
|
|
1571
1574
|
id: `measurement:${s.def.key}`,
|
|
1572
1575
|
categoryId: "measurement",
|
|
1573
|
-
item:
|
|
1576
|
+
item: ze(s.def, a),
|
|
1574
1577
|
meta: s.def.unit ?? void 0,
|
|
1575
1578
|
change: r,
|
|
1576
1579
|
changeLabel: a(`anamnesis.compare.${r}`),
|
|
@@ -1588,7 +1591,7 @@ function Ps(e, { t: a, seriesByKey: n }) {
|
|
|
1588
1591
|
function _s(e, { t: a, pathologies: n }) {
|
|
1589
1592
|
const i = a("anamnesis.compare.present");
|
|
1590
1593
|
return e.pathologies.map((s) => {
|
|
1591
|
-
const o =
|
|
1594
|
+
const o = Ba(s.present);
|
|
1592
1595
|
return {
|
|
1593
1596
|
id: `pathology:${s.code}`,
|
|
1594
1597
|
categoryId: "pathology",
|
|
@@ -1605,7 +1608,7 @@ function $s(e, { t: a }) {
|
|
|
1605
1608
|
var l;
|
|
1606
1609
|
const s = i.entries.filter(
|
|
1607
1610
|
(c) => c != null
|
|
1608
|
-
), o = new Set(s.map((c) => c.name)).size > 1, r =
|
|
1611
|
+
), o = new Set(s.map((c) => c.name)).size > 1, r = Ba(i.entries.map((c) => c != null));
|
|
1609
1612
|
return {
|
|
1610
1613
|
id: `therapy:${i.id}`,
|
|
1611
1614
|
categoryId: "therapy",
|
|
@@ -1624,7 +1627,7 @@ function zs(e, { t: a }) {
|
|
|
1624
1627
|
return e.texts.flatMap((n) => {
|
|
1625
1628
|
const i = n.values.map(Ls);
|
|
1626
1629
|
if (i.every((o) => o === i[0])) return [];
|
|
1627
|
-
const s =
|
|
1630
|
+
const s = Ba(i.map((o) => o !== Ee));
|
|
1628
1631
|
return [
|
|
1629
1632
|
{
|
|
1630
1633
|
id: `note:${n.field}`,
|
|
@@ -1649,7 +1652,7 @@ function Os(e, a) {
|
|
|
1649
1652
|
return Ms.flatMap((n) => n.rows(e, a));
|
|
1650
1653
|
}
|
|
1651
1654
|
function qs({ row: e, t: a }) {
|
|
1652
|
-
return e.def && e.delta ? /* @__PURE__ */ t(
|
|
1655
|
+
return e.def && e.delta ? /* @__PURE__ */ t(qa, { delta: e.delta, def: e.def, t: a }) : /* @__PURE__ */ t(Q, { variant: Rs[e.change], size: "sm", children: e.changeLabel });
|
|
1653
1656
|
}
|
|
1654
1657
|
function Vs({
|
|
1655
1658
|
visits: e,
|
|
@@ -1661,45 +1664,45 @@ function Vs({
|
|
|
1661
1664
|
pathologies: r,
|
|
1662
1665
|
annotations: l,
|
|
1663
1666
|
onSelectAnnotation: c,
|
|
1664
|
-
t:
|
|
1667
|
+
t: m,
|
|
1665
1668
|
onClose: h
|
|
1666
1669
|
}) {
|
|
1667
1670
|
const g = Qe(), [p, N] = $(""), y = O(
|
|
1668
1671
|
() => e.map((T, E) => ({
|
|
1669
1672
|
value: T.id,
|
|
1670
|
-
label: mt(T, E,
|
|
1673
|
+
label: mt(T, E, m)
|
|
1671
1674
|
})),
|
|
1672
|
-
[e,
|
|
1675
|
+
[e, m]
|
|
1673
1676
|
), f = O(
|
|
1674
|
-
() => s ? Os(s, { t:
|
|
1675
|
-
[s,
|
|
1677
|
+
() => s ? Os(s, { t: m, pathologies: r, seriesByKey: o }) : [],
|
|
1678
|
+
[s, m, r, o]
|
|
1676
1679
|
), C = O(() => {
|
|
1677
|
-
var R,
|
|
1678
|
-
const T = (R = a[0]) == null ? void 0 : R.visit.dateIso, E = (
|
|
1680
|
+
var R, u;
|
|
1681
|
+
const T = (R = a[0]) == null ? void 0 : R.visit.dateIso, E = (u = a[a.length - 1]) == null ? void 0 : u.visit.dateIso, S = m("anamnesis.compare.selected", {
|
|
1679
1682
|
total: a.length,
|
|
1680
|
-
from: T ? se(T,
|
|
1681
|
-
to: E ? se(E,
|
|
1683
|
+
from: T ? se(T, m) : "",
|
|
1684
|
+
to: E ? se(E, m) : ""
|
|
1682
1685
|
});
|
|
1683
|
-
return a.length === 2 ? `${S} · ${
|
|
1684
|
-
}, [a,
|
|
1686
|
+
return a.length === 2 ? `${S} · ${m("anamnesis.compare.minimum")}` : S;
|
|
1687
|
+
}, [a, m]), x = O(
|
|
1685
1688
|
() => a.map((T) => /* @__PURE__ */ t(
|
|
1686
1689
|
Nt,
|
|
1687
1690
|
{
|
|
1688
1691
|
column: T,
|
|
1689
|
-
t:
|
|
1692
|
+
t: m,
|
|
1690
1693
|
emphasised: !0,
|
|
1691
1694
|
withNote: !1
|
|
1692
1695
|
},
|
|
1693
1696
|
T.key
|
|
1694
1697
|
)),
|
|
1695
|
-
[a,
|
|
1698
|
+
[a, m]
|
|
1696
1699
|
), A = O(() => {
|
|
1697
1700
|
const T = [];
|
|
1698
1701
|
let E = null;
|
|
1699
1702
|
for (const S of f)
|
|
1700
1703
|
S.categoryId !== E && (E = S.categoryId, T.push({
|
|
1701
1704
|
key: `group-${S.categoryId}`,
|
|
1702
|
-
banner:
|
|
1705
|
+
banner: m(`anamnesis.compare.category.${S.categoryId}`)
|
|
1703
1706
|
})), T.push({
|
|
1704
1707
|
key: S.id,
|
|
1705
1708
|
header: /* @__PURE__ */ t(
|
|
@@ -1713,15 +1716,15 @@ function Vs({
|
|
|
1713
1716
|
] })
|
|
1714
1717
|
}
|
|
1715
1718
|
),
|
|
1716
|
-
cells: S.values.map((R,
|
|
1719
|
+
cells: S.values.map((R, u) => {
|
|
1717
1720
|
var v;
|
|
1718
1721
|
return /* @__PURE__ */ t(
|
|
1719
1722
|
"td",
|
|
1720
1723
|
{
|
|
1721
|
-
className: `${
|
|
1724
|
+
className: `${ya} ${je} ds:tabular-nums`,
|
|
1722
1725
|
children: /* @__PURE__ */ t("span", { className: "type-body-sm ds:block ds:break-words ds:whitespace-normal ds:text-[color:var(--foreground)]", children: R })
|
|
1723
1726
|
},
|
|
1724
|
-
((v = a[
|
|
1727
|
+
((v = a[u]) == null ? void 0 : v.key) ?? u
|
|
1725
1728
|
);
|
|
1726
1729
|
}),
|
|
1727
1730
|
trend: /* @__PURE__ */ t("td", { className: `${kn} ${je}`, children: S.series && S.def ? /* @__PURE__ */ t(
|
|
@@ -1729,7 +1732,7 @@ function Vs({
|
|
|
1729
1732
|
{
|
|
1730
1733
|
series: S.series,
|
|
1731
1734
|
def: S.def,
|
|
1732
|
-
t:
|
|
1735
|
+
t: m,
|
|
1733
1736
|
annotations: l,
|
|
1734
1737
|
onSelectAnnotation: c
|
|
1735
1738
|
}
|
|
@@ -1737,17 +1740,17 @@ function Vs({
|
|
|
1737
1740
|
trailing: /* @__PURE__ */ t(
|
|
1738
1741
|
"td",
|
|
1739
1742
|
{
|
|
1740
|
-
className: `${
|
|
1743
|
+
className: `${ya} ${je} ${Is}`,
|
|
1741
1744
|
"data-change": S.change,
|
|
1742
|
-
children: /* @__PURE__ */ t(qs, { row: S, t:
|
|
1745
|
+
children: /* @__PURE__ */ t(qs, { row: S, t: m })
|
|
1743
1746
|
}
|
|
1744
1747
|
)
|
|
1745
1748
|
});
|
|
1746
1749
|
return T;
|
|
1747
|
-
}, [f, a, l, c,
|
|
1750
|
+
}, [f, a, l, c, m]);
|
|
1748
1751
|
return /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1749
1752
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]", children: [
|
|
1750
|
-
/* @__PURE__ */ t("h3", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children:
|
|
1753
|
+
/* @__PURE__ */ t("h3", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: m("anamnesis.compare.panelTitle") }),
|
|
1751
1754
|
h ? /* @__PURE__ */ t(
|
|
1752
1755
|
Z,
|
|
1753
1756
|
{
|
|
@@ -1755,7 +1758,7 @@ function Vs({
|
|
|
1755
1758
|
"data-testid": "anamnesis-compare-close",
|
|
1756
1759
|
startIcon: /* @__PURE__ */ t(ri, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
1757
1760
|
onClick: h,
|
|
1758
|
-
children:
|
|
1761
|
+
children: m("anamnesis.compare.stop")
|
|
1759
1762
|
}
|
|
1760
1763
|
) : null
|
|
1761
1764
|
] }),
|
|
@@ -1768,10 +1771,10 @@ function Vs({
|
|
|
1768
1771
|
/* @__PURE__ */ t(
|
|
1769
1772
|
q,
|
|
1770
1773
|
{
|
|
1771
|
-
label:
|
|
1774
|
+
label: m("anamnesis.compare.visitsLabel"),
|
|
1772
1775
|
description: C,
|
|
1773
1776
|
children: /* @__PURE__ */ t(
|
|
1774
|
-
|
|
1777
|
+
dn,
|
|
1775
1778
|
{
|
|
1776
1779
|
options: y,
|
|
1777
1780
|
value: [...n],
|
|
@@ -1781,7 +1784,7 @@ function Vs({
|
|
|
1781
1784
|
N(""), i(T);
|
|
1782
1785
|
return;
|
|
1783
1786
|
}
|
|
1784
|
-
N(
|
|
1787
|
+
N(m("anamnesis.compare.minimum"));
|
|
1785
1788
|
}
|
|
1786
1789
|
}
|
|
1787
1790
|
)
|
|
@@ -1805,12 +1808,12 @@ function Vs({
|
|
|
1805
1808
|
{
|
|
1806
1809
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1807
1810
|
"data-testid": "anamnesis-compare-summary",
|
|
1808
|
-
children: s ? /* @__PURE__ */ d(
|
|
1809
|
-
/* @__PURE__ */ t("h4", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children:
|
|
1810
|
-
from: se(s.visits[0].dateIso,
|
|
1811
|
+
children: s ? /* @__PURE__ */ d(_e, { children: [
|
|
1812
|
+
/* @__PURE__ */ t("h4", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: m("anamnesis.compare.summaryTitle", {
|
|
1813
|
+
from: se(s.visits[0].dateIso, m),
|
|
1811
1814
|
to: se(
|
|
1812
1815
|
s.visits[s.visits.length - 1].dateIso,
|
|
1813
|
-
|
|
1816
|
+
m
|
|
1814
1817
|
)
|
|
1815
1818
|
}) }),
|
|
1816
1819
|
f.length === 0 ? /* @__PURE__ */ t(
|
|
@@ -1818,24 +1821,24 @@ function Vs({
|
|
|
1818
1821
|
{
|
|
1819
1822
|
variant: "no-results",
|
|
1820
1823
|
size: "sm",
|
|
1821
|
-
title:
|
|
1822
|
-
description:
|
|
1824
|
+
title: m("anamnesis.compare.noChanges"),
|
|
1825
|
+
description: m("anamnesis.compare.noChangesDescription")
|
|
1823
1826
|
}
|
|
1824
1827
|
) : /* @__PURE__ */ t(
|
|
1825
1828
|
Ct,
|
|
1826
1829
|
{
|
|
1827
1830
|
captionId: g,
|
|
1828
|
-
caption:
|
|
1829
|
-
identityLabel:
|
|
1830
|
-
trendLabel:
|
|
1831
|
-
trailingLabel:
|
|
1831
|
+
caption: m("anamnesis.compare.tableLabel"),
|
|
1832
|
+
identityLabel: m("anamnesis.compare.column.item"),
|
|
1833
|
+
trendLabel: m("anamnesis.grid.trend"),
|
|
1834
|
+
trailingLabel: m("anamnesis.compare.column.change"),
|
|
1832
1835
|
trailingTestId: "anamnesis-compare-change-column",
|
|
1833
1836
|
visitHeaders: x,
|
|
1834
1837
|
rows: A,
|
|
1835
1838
|
testId: "anamnesis-compare-table"
|
|
1836
1839
|
}
|
|
1837
1840
|
)
|
|
1838
|
-
] }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children:
|
|
1841
|
+
] }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: m("anamnesis.compare.sameVisit") })
|
|
1839
1842
|
}
|
|
1840
1843
|
)
|
|
1841
1844
|
] });
|
|
@@ -1850,12 +1853,16 @@ const Tt = {
|
|
|
1850
1853
|
function Bs(e, a) {
|
|
1851
1854
|
const n = a.length - 1;
|
|
1852
1855
|
if (n < 1 || !oa(e.dateIso)) return null;
|
|
1853
|
-
const i = a.
|
|
1854
|
-
|
|
1855
|
-
const
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1856
|
+
const i = !fa(e.dateIso) || a.some((l) => !fa(l.dateIso)), s = (l) => {
|
|
1857
|
+
if (!i) return new Date(l).getTime();
|
|
1858
|
+
const [c, m, h] = l.slice(0, 10).split("-").map(Number);
|
|
1859
|
+
return c && m && h ? Date.UTC(c, m - 1, h) : Number.NaN;
|
|
1860
|
+
}, o = a.map((l) => s(l.dateIso)), r = s(e.dateIso);
|
|
1861
|
+
for (let l = 0; l < n; l += 1) {
|
|
1862
|
+
const c = o[l], m = o[l + 1];
|
|
1863
|
+
if (!(r >= c && r <= m)) continue;
|
|
1864
|
+
const h = m > c ? (r - c) / (m - c) : 0;
|
|
1865
|
+
return (l + h) / n;
|
|
1859
1866
|
}
|
|
1860
1867
|
return null;
|
|
1861
1868
|
}
|
|
@@ -1865,7 +1872,7 @@ function Us(e, a) {
|
|
|
1865
1872
|
return i == null ? [] : [{ event: n, position: i }];
|
|
1866
1873
|
}).sort((n, i) => n.position - i.position);
|
|
1867
1874
|
}
|
|
1868
|
-
function
|
|
1875
|
+
function sn(e, a) {
|
|
1869
1876
|
return a("anamnesis.event.chip", {
|
|
1870
1877
|
label: a(`anamnesis.event.label.${e.labelKey}`),
|
|
1871
1878
|
date: se(e.dateIso, a)
|
|
@@ -1882,7 +1889,7 @@ function Ks(e, a, n) {
|
|
|
1882
1889
|
return e.filter((i) => a.has(i.event.id)).map(({ event: i, position: s }) => ({
|
|
1883
1890
|
id: i.id,
|
|
1884
1891
|
position: s,
|
|
1885
|
-
label:
|
|
1892
|
+
label: sn(i, n),
|
|
1886
1893
|
shape: Tt[i.category],
|
|
1887
1894
|
tone: St
|
|
1888
1895
|
}));
|
|
@@ -1932,14 +1939,14 @@ function Hs({
|
|
|
1932
1939
|
}
|
|
1933
1940
|
),
|
|
1934
1941
|
onClick: () => n(l.id),
|
|
1935
|
-
children:
|
|
1942
|
+
children: sn(l, i)
|
|
1936
1943
|
}
|
|
1937
1944
|
),
|
|
1938
1945
|
/* @__PURE__ */ t("span", { id: `${o}-${l.id}`, className: "ds:sr-only", children: At(l, i) })
|
|
1939
1946
|
] }, l.id);
|
|
1940
1947
|
}),
|
|
1941
1948
|
/* @__PURE__ */ t("p", { className: "ds:sr-only", "aria-live": "polite", children: r.length === 0 ? i("anamnesis.event.noneShown") : i("anamnesis.event.shown", {
|
|
1942
|
-
list: r.map(({ event: l }) =>
|
|
1949
|
+
list: r.map(({ event: l }) => sn(l, i)).join(i("anamnesis.event.separator"))
|
|
1943
1950
|
}) })
|
|
1944
1951
|
]
|
|
1945
1952
|
}
|
|
@@ -1950,7 +1957,7 @@ function pa(e) {
|
|
|
1950
1957
|
const a = e[0].id, n = e[e.length - 1].id;
|
|
1951
1958
|
return a === n ? [a] : [a, n];
|
|
1952
1959
|
}
|
|
1953
|
-
function
|
|
1960
|
+
function Ra(e, a, n = {}) {
|
|
1954
1961
|
var o, r;
|
|
1955
1962
|
const i = new Set(a);
|
|
1956
1963
|
for (const l of n.alsoShowIds ?? []) i.add(l);
|
|
@@ -1967,7 +1974,7 @@ function Ia(e, a, n = {}) {
|
|
|
1967
1974
|
};
|
|
1968
1975
|
}
|
|
1969
1976
|
function Et(e) {
|
|
1970
|
-
return
|
|
1977
|
+
return Ra(
|
|
1971
1978
|
e,
|
|
1972
1979
|
e.map((a) => a.id)
|
|
1973
1980
|
).columns;
|
|
@@ -1984,15 +1991,15 @@ function Ws(e, a) {
|
|
|
1984
1991
|
const n = e[a], i = e[a - 1];
|
|
1985
1992
|
return i ? i.index === n.index - 1 : n.index === 0;
|
|
1986
1993
|
}
|
|
1987
|
-
function
|
|
1994
|
+
function Ea(e, a) {
|
|
1988
1995
|
const n = (String(e).split(".")[1] ?? "").length;
|
|
1989
1996
|
return Ae(e, Math.min(n, 3), a);
|
|
1990
1997
|
}
|
|
1991
1998
|
function Qs(e, a, n) {
|
|
1992
|
-
return e ? e.min != null && e.max != null ? `${
|
|
1993
|
-
value:
|
|
1999
|
+
return e ? e.min != null && e.max != null ? `${Ea(e.min, n)}–${Ea(e.max, n)}` : e.max != null ? a("anamnesis.range.atMost", {
|
|
2000
|
+
value: Ea(e.max, n)
|
|
1994
2001
|
}) : e.min != null ? a("anamnesis.range.atLeast", {
|
|
1995
|
-
value:
|
|
2002
|
+
value: Ea(e.min, n)
|
|
1996
2003
|
}) : null : null;
|
|
1997
2004
|
}
|
|
1998
2005
|
function Ys({
|
|
@@ -2005,27 +2012,27 @@ function Ys({
|
|
|
2005
2012
|
framed: r = !0,
|
|
2006
2013
|
defaultOpenNoteVisitId: l,
|
|
2007
2014
|
onOpenNote: c,
|
|
2008
|
-
visitColumns:
|
|
2015
|
+
visitColumns: m,
|
|
2009
2016
|
capturableKeys: h,
|
|
2010
2017
|
annotations: g,
|
|
2011
2018
|
onSelectAnnotation: p
|
|
2012
2019
|
}) {
|
|
2013
|
-
const N = Qe(), y =
|
|
2020
|
+
const N = Qe(), y = De(n), f = fn(e, a), C = e.visits, x = C.length - 1, A = m ?? Et(C), T = [];
|
|
2014
2021
|
let E = null;
|
|
2015
|
-
const S = (
|
|
2016
|
-
if (f.forEach((
|
|
2017
|
-
|
|
2018
|
-
key: `group-${
|
|
2019
|
-
banner: n(`anamnesis.group.${
|
|
2022
|
+
const S = (u) => (o == null ? void 0 : o.visitIds.has(u)) ?? !1;
|
|
2023
|
+
if (f.forEach((u) => {
|
|
2024
|
+
u.def.group !== E && (E = u.def.group, T.push({
|
|
2025
|
+
key: `group-${u.def.group}`,
|
|
2026
|
+
banner: n(`anamnesis.group.${u.def.group}`)
|
|
2020
2027
|
}));
|
|
2021
|
-
const v = Qs(
|
|
2022
|
-
const { visit: B, index: L } = P, F =
|
|
2028
|
+
const v = Qs(u.def.referenceRange, n, y), w = A.map((P, z) => {
|
|
2029
|
+
const { visit: B, index: L } = P, F = u.cells[L] ?? js, V = L === x, j = h == null || h.has(u.def.key), ne = i && V && j && !u.def.computed, ve = !Ws(A, z), ce = o != null && o.changedCells.has(`${B.id}:${u.def.key}`), de = S(B.id);
|
|
2023
2030
|
return /* @__PURE__ */ t(
|
|
2024
2031
|
"td",
|
|
2025
2032
|
{
|
|
2026
2033
|
"data-changed": ce || void 0,
|
|
2027
2034
|
className: [
|
|
2028
|
-
|
|
2035
|
+
ya,
|
|
2029
2036
|
je,
|
|
2030
2037
|
"ds:tabular-nums",
|
|
2031
2038
|
de ? "ds:bg-[color:var(--muted)]/40" : "",
|
|
@@ -2039,16 +2046,16 @@ function Ys({
|
|
|
2039
2046
|
{
|
|
2040
2047
|
size: "sm",
|
|
2041
2048
|
value: F.value,
|
|
2042
|
-
mode: (
|
|
2049
|
+
mode: (u.def.precision ?? 0) > 0 ? "decimal" : "integer",
|
|
2043
2050
|
"aria-label": n("anamnesis.grid.editCell", {
|
|
2044
|
-
parameter:
|
|
2051
|
+
parameter: ze(u.def, n)
|
|
2045
2052
|
}),
|
|
2046
|
-
onChange: (Y) => s == null ? void 0 : s(B,
|
|
2053
|
+
onChange: (Y) => s == null ? void 0 : s(B, u.def, Y)
|
|
2047
2054
|
}
|
|
2048
|
-
) : /* @__PURE__ */ t("span", { className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]", children: Ae(F.value,
|
|
2055
|
+
) : /* @__PURE__ */ t("span", { className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]", children: Ae(F.value, u.def.precision, y) }),
|
|
2049
2056
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
2050
2057
|
F.outOfRange ? /* @__PURE__ */ t(bn, { flag: F.outOfRange, t: n, compact: !0 }) : null,
|
|
2051
|
-
ve ? null : /* @__PURE__ */ t(
|
|
2058
|
+
ve ? null : /* @__PURE__ */ t(qa, { delta: F.delta, def: u.def, t: n }),
|
|
2052
2059
|
ce ? /* @__PURE__ */ t("span", { className: "ds:sr-only", children: n("anamnesis.compare.changedCell") }) : null
|
|
2053
2060
|
] })
|
|
2054
2061
|
] })
|
|
@@ -2057,7 +2064,7 @@ function Ys({
|
|
|
2057
2064
|
);
|
|
2058
2065
|
});
|
|
2059
2066
|
T.push({
|
|
2060
|
-
key:
|
|
2067
|
+
key: u.def.key,
|
|
2061
2068
|
// Sticky parameter column (inline-start). The shell splices the trend
|
|
2062
2069
|
// in after the first value cell — the order is not decided here.
|
|
2063
2070
|
header: /* @__PURE__ */ t(
|
|
@@ -2066,17 +2073,17 @@ function Ys({
|
|
|
2066
2073
|
scope: "row",
|
|
2067
2074
|
className: `${xn} ds:sticky ds:start-0 ds:z-[1] ds:bg-[color:var(--card)] ds:text-start ds:shadow-[var(--shadow-chrome-end)] ${je}`,
|
|
2068
2075
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
2069
|
-
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children:
|
|
2076
|
+
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: ze(u.def, n) }),
|
|
2070
2077
|
/* @__PURE__ */ d("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: [
|
|
2071
|
-
|
|
2072
|
-
v ? /* @__PURE__ */ d(
|
|
2078
|
+
u.def.unit,
|
|
2079
|
+
v ? /* @__PURE__ */ d(_e, { children: [
|
|
2073
2080
|
" · ",
|
|
2074
2081
|
v
|
|
2075
2082
|
] }) : null
|
|
2076
2083
|
] }),
|
|
2077
|
-
|
|
2078
|
-
value: Ae(
|
|
2079
|
-
unit:
|
|
2084
|
+
u.target != null ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.grid.target", {
|
|
2085
|
+
value: Ae(u.target, u.def.precision, y),
|
|
2086
|
+
unit: u.def.unit ?? ""
|
|
2080
2087
|
}) }) : null
|
|
2081
2088
|
] })
|
|
2082
2089
|
}
|
|
@@ -2085,8 +2092,8 @@ function Ys({
|
|
|
2085
2092
|
trend: /* @__PURE__ */ t("td", { className: `${kn} ${je}`, children: /* @__PURE__ */ t(
|
|
2086
2093
|
yt,
|
|
2087
2094
|
{
|
|
2088
|
-
series:
|
|
2089
|
-
def:
|
|
2095
|
+
series: u.series,
|
|
2096
|
+
def: u.def,
|
|
2090
2097
|
t: n,
|
|
2091
2098
|
annotations: g,
|
|
2092
2099
|
onSelectAnnotation: p
|
|
@@ -2110,17 +2117,17 @@ function Ys({
|
|
|
2110
2117
|
)
|
|
2111
2118
|
}
|
|
2112
2119
|
);
|
|
2113
|
-
const R = A.map((
|
|
2120
|
+
const R = A.map((u) => /* @__PURE__ */ t(
|
|
2114
2121
|
Nt,
|
|
2115
2122
|
{
|
|
2116
|
-
column:
|
|
2123
|
+
column: u,
|
|
2117
2124
|
t: n,
|
|
2118
|
-
emphasised: S(
|
|
2119
|
-
editable: i &&
|
|
2125
|
+
emphasised: S(u.visit.id),
|
|
2126
|
+
editable: i && u.index === x,
|
|
2120
2127
|
defaultOpenNoteVisitId: l,
|
|
2121
2128
|
onOpenNote: c
|
|
2122
2129
|
},
|
|
2123
|
-
|
|
2130
|
+
u.key
|
|
2124
2131
|
));
|
|
2125
2132
|
return /* @__PURE__ */ t(
|
|
2126
2133
|
Ct,
|
|
@@ -2146,17 +2153,17 @@ function wn({
|
|
|
2146
2153
|
defaultCompareOpen: r = !1,
|
|
2147
2154
|
defaultVisitIds: l,
|
|
2148
2155
|
defaultCompareVisitIds: c,
|
|
2149
|
-
defaultEventIds:
|
|
2156
|
+
defaultEventIds: m,
|
|
2150
2157
|
onVisitSelectionChange: h,
|
|
2151
2158
|
onOpenNote: g
|
|
2152
2159
|
}) {
|
|
2153
|
-
const { visits: p } = e, N = p.length >= 2, y = Qe(), f = Qe(), C = O(() =>
|
|
2160
|
+
const { visits: p } = e, N = p.length >= 2, y = Qe(), f = Qe(), C = O(() => Pe(o), [o]), x = O(
|
|
2154
2161
|
() => new Set(Ne(o).map((M) => M.key)),
|
|
2155
2162
|
[o]
|
|
2156
|
-
), A = O(() =>
|
|
2163
|
+
), A = O(() => _a(o), [o]), [T, E] = $(r), [S, R] = $(""), u = we(null), v = we(null), w = we(!1);
|
|
2157
2164
|
ia(() => {
|
|
2158
2165
|
var M;
|
|
2159
|
-
w.current && T && ((M =
|
|
2166
|
+
w.current && T && ((M = u.current) == null || M.scrollIntoView({ block: "start" })), w.current = !0;
|
|
2160
2167
|
}, [T]);
|
|
2161
2168
|
const P = () => {
|
|
2162
2169
|
var M;
|
|
@@ -2169,7 +2176,7 @@ function wn({
|
|
|
2169
2176
|
);
|
|
2170
2177
|
return M.length >= 2 ? M : pa(p);
|
|
2171
2178
|
}, [z, p]), F = O(
|
|
2172
|
-
() =>
|
|
2179
|
+
() => Ra(p, L).columns,
|
|
2173
2180
|
[p, L]
|
|
2174
2181
|
), V = O(() => T ? Xi(
|
|
2175
2182
|
F.map((M) => M.visit),
|
|
@@ -2185,20 +2192,20 @@ function wn({
|
|
|
2185
2192
|
const M = ne.filter((H) => p.some((G) => G.id === H));
|
|
2186
2193
|
return M.length > 0 ? M : pa(p);
|
|
2187
2194
|
}, [ne, p]), Y = O(
|
|
2188
|
-
() =>
|
|
2195
|
+
() => Ra(p, de, {
|
|
2189
2196
|
// A compared visit is always a column, so compare always marks its
|
|
2190
2197
|
// columns in the grid — comparing a visit the picker left out brings
|
|
2191
2198
|
// it back on screen rather than marking nothing.
|
|
2192
2199
|
alsoShowIds: T ? L : []
|
|
2193
2200
|
}),
|
|
2194
2201
|
[p, de, T, L]
|
|
2195
|
-
),
|
|
2202
|
+
), Ie = O(
|
|
2196
2203
|
() => Y.columns.map((M) => M.visit.id),
|
|
2197
2204
|
[Y]
|
|
2198
2205
|
);
|
|
2199
2206
|
ia(() => {
|
|
2200
|
-
h == null || h(
|
|
2201
|
-
}, [
|
|
2207
|
+
h == null || h(Ie);
|
|
2208
|
+
}, [Ie, h]);
|
|
2202
2209
|
const D = O(
|
|
2203
2210
|
() => p.map((M, H) => ({
|
|
2204
2211
|
value: M.id,
|
|
@@ -2221,16 +2228,16 @@ function wn({
|
|
|
2221
2228
|
() => Us(e.events, p),
|
|
2222
2229
|
[e.events, p]
|
|
2223
2230
|
), [me, le] = $(
|
|
2224
|
-
() =>
|
|
2225
|
-
),
|
|
2231
|
+
() => m ? [...m] : []
|
|
2232
|
+
), Re = O(() => {
|
|
2226
2233
|
const M = new Set(J.map((H) => H.event.id));
|
|
2227
2234
|
return new Set(me.filter((H) => M.has(H)));
|
|
2228
|
-
}, [me, J]),
|
|
2229
|
-
() => Ks(J,
|
|
2230
|
-
[J,
|
|
2231
|
-
),
|
|
2235
|
+
}, [me, J]), Le = O(
|
|
2236
|
+
() => Ks(J, Re, a),
|
|
2237
|
+
[J, Re, a]
|
|
2238
|
+
), Fe = (M) => le(
|
|
2232
2239
|
(H) => H.includes(M) ? H.filter((G) => G !== M) : [...H, M]
|
|
2233
|
-
),
|
|
2240
|
+
), ka = O(
|
|
2234
2241
|
() => g ? (M) => g({ kind: "event", eventId: M }) : void 0,
|
|
2235
2242
|
[g]
|
|
2236
2243
|
), da = O(() => {
|
|
@@ -2273,7 +2280,7 @@ function wn({
|
|
|
2273
2280
|
label: a("anamnesis.window.label"),
|
|
2274
2281
|
description: U,
|
|
2275
2282
|
children: /* @__PURE__ */ t(
|
|
2276
|
-
|
|
2283
|
+
dn,
|
|
2277
2284
|
{
|
|
2278
2285
|
options: D,
|
|
2279
2286
|
value: de,
|
|
@@ -2333,8 +2340,8 @@ function wn({
|
|
|
2333
2340
|
Hs,
|
|
2334
2341
|
{
|
|
2335
2342
|
marks: J,
|
|
2336
|
-
activeIds:
|
|
2337
|
-
onToggle:
|
|
2343
|
+
activeIds: Re,
|
|
2344
|
+
onToggle: Fe,
|
|
2338
2345
|
t: a
|
|
2339
2346
|
}
|
|
2340
2347
|
),
|
|
@@ -2350,15 +2357,15 @@ function wn({
|
|
|
2350
2357
|
framed: s,
|
|
2351
2358
|
visitColumns: Y.columns,
|
|
2352
2359
|
capturableKeys: x,
|
|
2353
|
-
annotations:
|
|
2354
|
-
onSelectAnnotation:
|
|
2360
|
+
annotations: Le,
|
|
2361
|
+
onSelectAnnotation: ka,
|
|
2355
2362
|
onOpenNote: g
|
|
2356
2363
|
}
|
|
2357
2364
|
),
|
|
2358
|
-
N ? /* @__PURE__ */ t(
|
|
2359
|
-
|
|
2365
|
+
N ? /* @__PURE__ */ t(ln, { open: T, onOpenChange: E, children: /* @__PURE__ */ t(
|
|
2366
|
+
cn,
|
|
2360
2367
|
{
|
|
2361
|
-
ref:
|
|
2368
|
+
ref: u,
|
|
2362
2369
|
id: y,
|
|
2363
2370
|
"aria-labelledby": f,
|
|
2364
2371
|
"data-testid": "anamnesis-compare-panel",
|
|
@@ -2373,8 +2380,8 @@ function wn({
|
|
|
2373
2380
|
diff: V,
|
|
2374
2381
|
seriesByKey: j,
|
|
2375
2382
|
pathologies: A,
|
|
2376
|
-
annotations:
|
|
2377
|
-
onSelectAnnotation:
|
|
2383
|
+
annotations: Le,
|
|
2384
|
+
onSelectAnnotation: ka,
|
|
2378
2385
|
t: a,
|
|
2379
2386
|
onClose: P
|
|
2380
2387
|
}
|
|
@@ -2569,7 +2576,7 @@ function Zs(e, a) {
|
|
|
2569
2576
|
const n = Js.get(e);
|
|
2570
2577
|
return n ? n.audiences.includes(a) : !1;
|
|
2571
2578
|
}
|
|
2572
|
-
const
|
|
2579
|
+
const Ua = "export.tabDocument";
|
|
2573
2580
|
function ee(e, a) {
|
|
2574
2581
|
return Zs(a, e.audience) ? !0 : (e.withheld.add(a), !1);
|
|
2575
2582
|
}
|
|
@@ -2606,7 +2613,7 @@ function Be(e) {
|
|
|
2606
2613
|
const a = e.slice(0, 10);
|
|
2607
2614
|
return oa(a) ? a : null;
|
|
2608
2615
|
}
|
|
2609
|
-
function
|
|
2616
|
+
function La(e, a, n, i, s) {
|
|
2610
2617
|
const o = i ? eo(`${a.patient.lastName} ${a.patient.firstName}`) : "";
|
|
2611
2618
|
return [
|
|
2612
2619
|
"anamnesis",
|
|
@@ -2634,7 +2641,7 @@ function Cn(e, a, n, i) {
|
|
|
2634
2641
|
value: se(e.patient.dateOfBirthIso, n)
|
|
2635
2642
|
}), s.push({
|
|
2636
2643
|
label: n("anamnesis.header.age"),
|
|
2637
|
-
value:
|
|
2644
|
+
value: Oa(e, n)
|
|
2638
2645
|
})), s.push({
|
|
2639
2646
|
label: n("anamnesis.export.generated"),
|
|
2640
2647
|
value: se(i.slice(0, 10), n)
|
|
@@ -2643,7 +2650,7 @@ function Cn(e, a, n, i) {
|
|
|
2643
2650
|
value: Nn(a.audience, n)
|
|
2644
2651
|
}), { meta: s, patientName: r };
|
|
2645
2652
|
}
|
|
2646
|
-
function
|
|
2653
|
+
function Fa(e, a, n) {
|
|
2647
2654
|
const i = Ft(e, n);
|
|
2648
2655
|
return a ? n("anamnesis.export.docTitle", { tab: i, patient: a }) : i;
|
|
2649
2656
|
}
|
|
@@ -2658,26 +2665,26 @@ function Tn(e, a, n) {
|
|
|
2658
2665
|
meta: [],
|
|
2659
2666
|
tables: [],
|
|
2660
2667
|
footnotes: [n("anamnesis.export.withheld")],
|
|
2661
|
-
withheld: [
|
|
2662
|
-
locale:
|
|
2668
|
+
withheld: [Ua],
|
|
2669
|
+
locale: De(n)
|
|
2663
2670
|
};
|
|
2664
2671
|
}
|
|
2665
|
-
function
|
|
2672
|
+
function Pa(e, a, n, i = []) {
|
|
2666
2673
|
const s = [...a.withheld].sort(), o = [...i];
|
|
2667
2674
|
return s.length > 0 && o.push(n("anamnesis.export.withheld")), {
|
|
2668
2675
|
...e,
|
|
2669
2676
|
audienceLabel: Nn(a.audience, n),
|
|
2670
2677
|
footnotes: o,
|
|
2671
2678
|
withheld: s,
|
|
2672
|
-
locale:
|
|
2679
|
+
locale: De(n)
|
|
2673
2680
|
};
|
|
2674
2681
|
}
|
|
2675
2682
|
function no(e) {
|
|
2676
2683
|
var N;
|
|
2677
2684
|
const { record: a, audience: n, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = { audience: n, withheld: /* @__PURE__ */ new Set() };
|
|
2678
|
-
if (!ee(r,
|
|
2685
|
+
if (!ee(r, Ua))
|
|
2679
2686
|
return Tn("summary", n, i);
|
|
2680
|
-
const { meta: l, patientName: c } = Cn(a, r, i, o),
|
|
2687
|
+
const { meta: l, patientName: c } = Cn(a, r, i, o), m = [], h = [], g = a.intake;
|
|
2681
2688
|
if (ee(r, "intake.answers") && g) {
|
|
2682
2689
|
const y = [];
|
|
2683
2690
|
for (const f of Ge(s)) {
|
|
@@ -2696,7 +2703,7 @@ function no(e) {
|
|
|
2696
2703
|
}
|
|
2697
2704
|
}
|
|
2698
2705
|
}
|
|
2699
|
-
|
|
2706
|
+
m.push({
|
|
2700
2707
|
id: "questionnaire",
|
|
2701
2708
|
title: i("anamnesis.section.patientIntake"),
|
|
2702
2709
|
columns: [
|
|
@@ -2708,53 +2715,53 @@ function no(e) {
|
|
|
2708
2715
|
emptyText: i("anamnesis.summary.noAnswers")
|
|
2709
2716
|
});
|
|
2710
2717
|
} else g || h.push(i("anamnesis.compile.noIntake"));
|
|
2711
|
-
const p = Be(g == null ? void 0 : g.submittedAtIso) ?? Be((N =
|
|
2712
|
-
return
|
|
2718
|
+
const p = Be(g == null ? void 0 : g.submittedAtIso) ?? Be((N = Ma(a)) == null ? void 0 : N.dateIso) ?? Be(o);
|
|
2719
|
+
return Pa(
|
|
2713
2720
|
{
|
|
2714
2721
|
tab: "summary",
|
|
2715
2722
|
audience: n,
|
|
2716
|
-
fileStem:
|
|
2723
|
+
fileStem: La(
|
|
2717
2724
|
"summary",
|
|
2718
2725
|
a,
|
|
2719
2726
|
p,
|
|
2720
2727
|
!!c,
|
|
2721
2728
|
n
|
|
2722
2729
|
),
|
|
2723
|
-
title:
|
|
2730
|
+
title: Fa("summary", c, i),
|
|
2724
2731
|
patientName: c,
|
|
2725
2732
|
meta: l,
|
|
2726
|
-
tables:
|
|
2733
|
+
tables: m
|
|
2727
2734
|
},
|
|
2728
2735
|
r,
|
|
2729
2736
|
i,
|
|
2730
2737
|
h
|
|
2731
2738
|
);
|
|
2732
2739
|
}
|
|
2733
|
-
function
|
|
2740
|
+
function Ga(e, a, n, i, s, o, r) {
|
|
2734
2741
|
const l = [];
|
|
2735
2742
|
let c = !1;
|
|
2736
2743
|
for (const h of n) {
|
|
2737
2744
|
if (!ee(s, Dt(h))) continue;
|
|
2738
2745
|
c = !0;
|
|
2739
|
-
const g =
|
|
2740
|
-
|
|
2746
|
+
const g = $e(i, h), p = [
|
|
2747
|
+
ze(h, o),
|
|
2741
2748
|
g,
|
|
2742
2749
|
h.unit ?? null
|
|
2743
2750
|
];
|
|
2744
|
-
r && (p.push(Rt(h, o)), p.push(Lt(
|
|
2751
|
+
r && (p.push(Rt(h, o)), p.push(Lt(va(g, h.referenceRange), o))), l.push({ cells: p, precision: h.precision });
|
|
2745
2752
|
}
|
|
2746
2753
|
if (!c) return null;
|
|
2747
|
-
const
|
|
2754
|
+
const m = [
|
|
2748
2755
|
{ key: "parameter", header: o("anamnesis.grid.parameter") },
|
|
2749
2756
|
{ key: "value", header: o("anamnesis.export.column.value"), numeric: !0 },
|
|
2750
2757
|
{ key: "unit", header: o("anamnesis.export.column.unit") }
|
|
2751
2758
|
];
|
|
2752
|
-
return r && (
|
|
2759
|
+
return r && (m.push({
|
|
2753
2760
|
key: "referenceRange",
|
|
2754
2761
|
header: o("anamnesis.export.column.referenceRange")
|
|
2755
|
-
}),
|
|
2762
|
+
}), m.push({ key: "flag", header: o("anamnesis.export.column.flag") })), { id: e, title: a, columns: m, rows: l, emptyText: o("anamnesis.export.none") };
|
|
2756
2763
|
}
|
|
2757
|
-
function
|
|
2764
|
+
function ja(e, a, n, i) {
|
|
2758
2765
|
return {
|
|
2759
2766
|
id: e,
|
|
2760
2767
|
title: a,
|
|
@@ -2768,22 +2775,22 @@ function Ga(e, a, n, i) {
|
|
|
2768
2775
|
}
|
|
2769
2776
|
function to(e) {
|
|
2770
2777
|
const { record: a, audience: n, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = { audience: n, withheld: /* @__PURE__ */ new Set() };
|
|
2771
|
-
if (!ee(r,
|
|
2778
|
+
if (!ee(r, Ua))
|
|
2772
2779
|
return Tn("compile", n, i);
|
|
2773
|
-
const { meta: l, patientName: c } = Cn(a, r, i, o),
|
|
2774
|
-
if (!
|
|
2775
|
-
return g.push(i("anamnesis.export.none")),
|
|
2780
|
+
const { meta: l, patientName: c } = Cn(a, r, i, o), m = Ma(a), h = [], g = [];
|
|
2781
|
+
if (!m)
|
|
2782
|
+
return g.push(i("anamnesis.export.none")), Pa(
|
|
2776
2783
|
{
|
|
2777
2784
|
tab: "compile",
|
|
2778
2785
|
audience: n,
|
|
2779
|
-
fileStem:
|
|
2786
|
+
fileStem: La(
|
|
2780
2787
|
"compile",
|
|
2781
2788
|
a,
|
|
2782
2789
|
Be(o),
|
|
2783
2790
|
!!c,
|
|
2784
2791
|
n
|
|
2785
2792
|
),
|
|
2786
|
-
title:
|
|
2793
|
+
title: Fa("compile", c, i),
|
|
2787
2794
|
patientName: c,
|
|
2788
2795
|
meta: l,
|
|
2789
2796
|
tables: h
|
|
@@ -2794,48 +2801,48 @@ function to(e) {
|
|
|
2794
2801
|
);
|
|
2795
2802
|
ee(r, "visit.date") && l.push({
|
|
2796
2803
|
label: i("anamnesis.header.visitDate"),
|
|
2797
|
-
value: se(
|
|
2804
|
+
value: se(m.dateIso, i)
|
|
2798
2805
|
});
|
|
2799
2806
|
const p = [];
|
|
2800
2807
|
ee(r, "visit.type") && p.push({
|
|
2801
2808
|
cells: [
|
|
2802
2809
|
i("anamnesis.field.visitType.label"),
|
|
2803
|
-
i(`anamnesis.visitType.${
|
|
2810
|
+
i(`anamnesis.visitType.${m.visitType}`)
|
|
2804
2811
|
]
|
|
2805
2812
|
}), ee(r, "visit.date") && p.push({
|
|
2806
2813
|
cells: [
|
|
2807
2814
|
i("anamnesis.header.visitDate"),
|
|
2808
|
-
se(
|
|
2815
|
+
se(m.dateIso, i)
|
|
2809
2816
|
]
|
|
2810
|
-
}), ee(r, "visit.practitioner") &&
|
|
2817
|
+
}), ee(r, "visit.practitioner") && m.practitioner && p.push({
|
|
2811
2818
|
cells: [
|
|
2812
2819
|
i("anamnesis.field.practitioner.label"),
|
|
2813
|
-
ie(
|
|
2820
|
+
ie(m.practitioner)
|
|
2814
2821
|
]
|
|
2815
2822
|
}), p.length > 0 && h.push(
|
|
2816
|
-
|
|
2823
|
+
ja("visit", i("anamnesis.section.visitMeta"), p, i)
|
|
2817
2824
|
);
|
|
2818
|
-
const N =
|
|
2825
|
+
const N = Ga(
|
|
2819
2826
|
"anthropometrics",
|
|
2820
2827
|
i("anamnesis.section.anthropometrics"),
|
|
2821
2828
|
Ne(s, "anthropometric"),
|
|
2822
|
-
|
|
2829
|
+
m,
|
|
2823
2830
|
r,
|
|
2824
2831
|
i,
|
|
2825
2832
|
!1
|
|
2826
2833
|
);
|
|
2827
2834
|
N && h.push(N);
|
|
2828
|
-
const y =
|
|
2835
|
+
const y = Ga(
|
|
2829
2836
|
"dietary",
|
|
2830
2837
|
i("anamnesis.section.dietary"),
|
|
2831
2838
|
Ne(s, "dietary"),
|
|
2832
|
-
|
|
2839
|
+
m,
|
|
2833
2840
|
r,
|
|
2834
2841
|
i,
|
|
2835
2842
|
!1
|
|
2836
2843
|
);
|
|
2837
2844
|
if (y && h.push(y), ee(r, "pathology.codes")) {
|
|
2838
|
-
const x =
|
|
2845
|
+
const x = _a(s);
|
|
2839
2846
|
h.push({
|
|
2840
2847
|
id: "pathologies",
|
|
2841
2848
|
title: i("anamnesis.section.pathologies"),
|
|
@@ -2846,14 +2853,14 @@ function to(e) {
|
|
|
2846
2853
|
header: i("anamnesis.export.column.description")
|
|
2847
2854
|
}
|
|
2848
2855
|
],
|
|
2849
|
-
rows:
|
|
2856
|
+
rows: m.pathologyCodes.map((A) => ({
|
|
2850
2857
|
cells: [A, yn(A, i, x[A])]
|
|
2851
2858
|
})),
|
|
2852
2859
|
emptyText: i("anamnesis.export.none")
|
|
2853
2860
|
});
|
|
2854
2861
|
}
|
|
2855
2862
|
if (ee(r, "oncological.history")) {
|
|
2856
|
-
const x =
|
|
2863
|
+
const x = m.oncological, A = [];
|
|
2857
2864
|
if (x) {
|
|
2858
2865
|
if (ie(x.tumourType) && A.push({
|
|
2859
2866
|
cells: [
|
|
@@ -2879,7 +2886,7 @@ function to(e) {
|
|
|
2879
2886
|
});
|
|
2880
2887
|
}
|
|
2881
2888
|
h.push(
|
|
2882
|
-
|
|
2889
|
+
ja(
|
|
2883
2890
|
"oncological",
|
|
2884
2891
|
i("anamnesis.section.oncological"),
|
|
2885
2892
|
A,
|
|
@@ -2895,7 +2902,7 @@ function to(e) {
|
|
|
2895
2902
|
{ key: "dose", header: i("anamnesis.export.column.dose") },
|
|
2896
2903
|
{ key: "kind", header: i("anamnesis.export.column.kind") }
|
|
2897
2904
|
],
|
|
2898
|
-
rows:
|
|
2905
|
+
rows: m.therapy.map((x) => ({
|
|
2899
2906
|
cells: [
|
|
2900
2907
|
ie(x.name),
|
|
2901
2908
|
ie(x.dose),
|
|
@@ -2904,11 +2911,11 @@ function to(e) {
|
|
|
2904
2911
|
})),
|
|
2905
2912
|
emptyText: i("anamnesis.compile.noTherapy")
|
|
2906
2913
|
});
|
|
2907
|
-
const f =
|
|
2914
|
+
const f = Ga(
|
|
2908
2915
|
"labs",
|
|
2909
2916
|
i("anamnesis.section.labs"),
|
|
2910
2917
|
Ne(s, "lab"),
|
|
2911
|
-
|
|
2918
|
+
m,
|
|
2912
2919
|
r,
|
|
2913
2920
|
i,
|
|
2914
2921
|
!0
|
|
@@ -2922,7 +2929,7 @@ function to(e) {
|
|
|
2922
2929
|
{ key: "status", header: i("anamnesis.export.column.status") },
|
|
2923
2930
|
{ key: "notes", header: i("anamnesis.export.column.notes") }
|
|
2924
2931
|
],
|
|
2925
|
-
rows:
|
|
2932
|
+
rows: m.fmdCycles.map((x) => ({
|
|
2926
2933
|
cells: [
|
|
2927
2934
|
i("anamnesis.compile.cycleNumber", { number: x.cycleNumber }),
|
|
2928
2935
|
se(x.startDateIso, i),
|
|
@@ -2932,7 +2939,7 @@ function to(e) {
|
|
|
2932
2939
|
})),
|
|
2933
2940
|
emptyText: i("anamnesis.compile.noFmd")
|
|
2934
2941
|
}), ee(r, "annual.programme")) {
|
|
2935
|
-
const x =
|
|
2942
|
+
const x = m.annualProgramme, A = [];
|
|
2936
2943
|
if (x) {
|
|
2937
2944
|
const T = (E) => i(E ? "anamnesis.common.yes" : "anamnesis.common.no");
|
|
2938
2945
|
A.push({
|
|
@@ -2953,19 +2960,19 @@ function to(e) {
|
|
|
2953
2960
|
});
|
|
2954
2961
|
}
|
|
2955
2962
|
h.push(
|
|
2956
|
-
|
|
2963
|
+
ja("annual", i("anamnesis.section.annual"), A, i)
|
|
2957
2964
|
);
|
|
2958
2965
|
}
|
|
2959
2966
|
const C = [];
|
|
2960
|
-
return ee(r, "notes.nutritionalProposal") && ie(
|
|
2967
|
+
return ee(r, "notes.nutritionalProposal") && ie(m.nutritionalProposal) && C.push({
|
|
2961
2968
|
cells: [
|
|
2962
2969
|
i("anamnesis.field.nutritionalProposal.label"),
|
|
2963
|
-
ie(
|
|
2970
|
+
ie(m.nutritionalProposal)
|
|
2964
2971
|
]
|
|
2965
|
-
}), ee(r, "notes.clinicalNotes") && ie(
|
|
2972
|
+
}), ee(r, "notes.clinicalNotes") && ie(m.clinicalNotes) && C.push({
|
|
2966
2973
|
cells: [
|
|
2967
2974
|
i("anamnesis.field.clinicalNotes.label"),
|
|
2968
|
-
ie(
|
|
2975
|
+
ie(m.clinicalNotes)
|
|
2969
2976
|
]
|
|
2970
2977
|
}), C.length > 0 && h.push({
|
|
2971
2978
|
id: "notes",
|
|
@@ -2976,18 +2983,18 @@ function to(e) {
|
|
|
2976
2983
|
],
|
|
2977
2984
|
rows: C,
|
|
2978
2985
|
emptyText: i("anamnesis.export.none")
|
|
2979
|
-
}),
|
|
2986
|
+
}), Pa(
|
|
2980
2987
|
{
|
|
2981
2988
|
tab: "compile",
|
|
2982
2989
|
audience: n,
|
|
2983
|
-
fileStem:
|
|
2990
|
+
fileStem: La(
|
|
2984
2991
|
"compile",
|
|
2985
2992
|
a,
|
|
2986
|
-
Be(
|
|
2993
|
+
Be(m.dateIso) ?? Be(o),
|
|
2987
2994
|
!!c,
|
|
2988
2995
|
n
|
|
2989
2996
|
),
|
|
2990
|
-
title:
|
|
2997
|
+
title: Fa("compile", c, i),
|
|
2991
2998
|
patientName: c,
|
|
2992
2999
|
meta: l,
|
|
2993
3000
|
tables: h
|
|
@@ -3017,9 +3024,9 @@ function so(e, a) {
|
|
|
3017
3024
|
function oo(e) {
|
|
3018
3025
|
var C;
|
|
3019
3026
|
const { record: a, audience: n, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = e.scope ?? "selected", l = { audience: n, withheld: /* @__PURE__ */ new Set() };
|
|
3020
|
-
if (!ee(l,
|
|
3027
|
+
if (!ee(l, Ua))
|
|
3021
3028
|
return Tn("evolution", n, i);
|
|
3022
|
-
const { meta: c, patientName:
|
|
3029
|
+
const { meta: c, patientName: m } = Cn(a, l, i, o), h = [], g = [], p = e.selectedVisitIds ? [...e.selectedVisitIds] : null, N = p && p.length > 0 ? p : pa(a.visits), y = r === "all" ? Et(a.visits) : Ra(a.visits, N).columns;
|
|
3023
3030
|
if (c.push({
|
|
3024
3031
|
label: i("anamnesis.export.visitsLabel"),
|
|
3025
3032
|
value: r === "all" ? i("anamnesis.export.visitsAll", { total: a.visits.length }) : i("anamnesis.export.visitsSelected", {
|
|
@@ -3027,7 +3034,7 @@ function oo(e) {
|
|
|
3027
3034
|
total: a.visits.length
|
|
3028
3035
|
})
|
|
3029
3036
|
}), ee(l, "visit.date") && y.length > 0) {
|
|
3030
|
-
const x =
|
|
3037
|
+
const x = Pe(s), A = fn(a, x), T = se(y[0].visit.dateIso, i), E = se(y[y.length - 1].visit.dateIso, i), S = [
|
|
3031
3038
|
{ key: "parameter", header: i("anamnesis.grid.parameter") },
|
|
3032
3039
|
{ key: "unit", header: i("anamnesis.export.column.unit") },
|
|
3033
3040
|
{
|
|
@@ -3054,12 +3061,12 @@ function oo(e) {
|
|
|
3054
3061
|
},
|
|
3055
3062
|
{ key: "outOfRange", header: i("anamnesis.export.column.outOfRange") }
|
|
3056
3063
|
], R = [];
|
|
3057
|
-
let
|
|
3064
|
+
let u = null;
|
|
3058
3065
|
for (const v of A)
|
|
3059
|
-
ee(l, Dt(v.def)) && (v.def.group !==
|
|
3066
|
+
ee(l, Dt(v.def)) && (v.def.group !== u && (u = v.def.group, R.push(It(i(`anamnesis.group.${v.def.group}`)))), R.push({
|
|
3060
3067
|
precision: v.def.precision,
|
|
3061
3068
|
cells: [
|
|
3062
|
-
|
|
3069
|
+
ze(v.def, i),
|
|
3063
3070
|
v.def.unit ?? null,
|
|
3064
3071
|
Rt(v.def, i),
|
|
3065
3072
|
...y.map((w) => {
|
|
@@ -3080,19 +3087,19 @@ function oo(e) {
|
|
|
3080
3087
|
});
|
|
3081
3088
|
} else y.length === 0 && g.push(i("anamnesis.export.none"));
|
|
3082
3089
|
const f = Be((C = y[y.length - 1]) == null ? void 0 : C.visit.dateIso) ?? Be(o);
|
|
3083
|
-
return
|
|
3090
|
+
return Pa(
|
|
3084
3091
|
{
|
|
3085
3092
|
tab: "evolution",
|
|
3086
3093
|
audience: n,
|
|
3087
|
-
fileStem:
|
|
3094
|
+
fileStem: La(
|
|
3088
3095
|
"evolution",
|
|
3089
3096
|
a,
|
|
3090
3097
|
f,
|
|
3091
|
-
!!
|
|
3098
|
+
!!m,
|
|
3092
3099
|
n
|
|
3093
3100
|
),
|
|
3094
|
-
title:
|
|
3095
|
-
patientName:
|
|
3101
|
+
title: Fa("evolution", m, i),
|
|
3102
|
+
patientName: m,
|
|
3096
3103
|
meta: c,
|
|
3097
3104
|
tables: h
|
|
3098
3105
|
},
|
|
@@ -3230,10 +3237,10 @@ async function wo(e) {
|
|
|
3230
3237
|
}
|
|
3231
3238
|
s.getColumn(1).width = 28, s.getColumn(2).width = 48;
|
|
3232
3239
|
for (const l of e.tables) {
|
|
3233
|
-
const c = n.addWorksheet(Un(l.title, i)),
|
|
3240
|
+
const c = n.addWorksheet(Un(l.title, i)), m = c.addRow(
|
|
3234
3241
|
l.columns.map((h) => h.header)
|
|
3235
3242
|
);
|
|
3236
|
-
|
|
3243
|
+
m.font = { bold: !0 }, c.views = [{ state: "frozen", ySplit: 1 }], l.rows.length === 0 && l.emptyText && c.addRow([l.emptyText]);
|
|
3237
3244
|
for (const h of l.rows) {
|
|
3238
3245
|
if (h.kind === "section") {
|
|
3239
3246
|
const N = c.addRow([h.cells[0] ?? null]);
|
|
@@ -3427,14 +3434,14 @@ async function $t(e, a = {}) {
|
|
|
3427
3434
|
orientation: Ro(e) ? "landscape" : "portrait",
|
|
3428
3435
|
unit: "mm",
|
|
3429
3436
|
format: "a4"
|
|
3430
|
-
}), l = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(),
|
|
3437
|
+
}), l = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), m = l - te * 2, h = (f, C, x) => {
|
|
3431
3438
|
r.setFont("helvetica", f), r.setFontSize(C), r.setTextColor(x[0], x[1], x[2]);
|
|
3432
3439
|
};
|
|
3433
3440
|
let g = te;
|
|
3434
3441
|
h("bold", Eo, s.headerText);
|
|
3435
3442
|
for (const f of r.splitTextToSize(
|
|
3436
3443
|
qe(e.title),
|
|
3437
|
-
|
|
3444
|
+
m
|
|
3438
3445
|
))
|
|
3439
3446
|
r.text(f, te, g), g += Me + 1;
|
|
3440
3447
|
g += 1, h("normal", Do, s.mutedText);
|
|
@@ -3487,7 +3494,7 @@ async function $t(e, a = {}) {
|
|
|
3487
3494
|
if (e.footnotes.length > 0) {
|
|
3488
3495
|
g += Me + 1, g > c - te * 2 && (r.addPage(), g = te), h("normal", Hn, s.mutedText);
|
|
3489
3496
|
for (const f of e.footnotes)
|
|
3490
|
-
for (const C of r.splitTextToSize(qe(f),
|
|
3497
|
+
for (const C of r.splitTextToSize(qe(f), m))
|
|
3491
3498
|
r.text(C, te, g), g += Me - 1;
|
|
3492
3499
|
}
|
|
3493
3500
|
const p = qe(
|
|
@@ -3514,7 +3521,7 @@ async function _o(e, a, n = {}) {
|
|
|
3514
3521
|
const i = await $t(e, { ...n, autoPrint: !0 }), s = URL.createObjectURL(i);
|
|
3515
3522
|
return a.setAttribute("src", s), s;
|
|
3516
3523
|
}
|
|
3517
|
-
const
|
|
3524
|
+
const on = ["clinician", "patient"];
|
|
3518
3525
|
function $o({
|
|
3519
3526
|
tab: e,
|
|
3520
3527
|
record: a,
|
|
@@ -3525,7 +3532,7 @@ function $o({
|
|
|
3525
3532
|
defaultShareOpen: r = !1,
|
|
3526
3533
|
defaultAudience: l = "clinician"
|
|
3527
3534
|
}) {
|
|
3528
|
-
const [c,
|
|
3535
|
+
const [c, m] = $(l), [h, g] = $(!1), [p, N] = $(o), [y, f] = $(r), [C, x] = $(l), [A, T] = $({ text: "", seq: 0 }), E = we(null), S = we(null), R = we(null), u = we(!1), v = Qe();
|
|
3529
3536
|
ia(
|
|
3530
3537
|
() => () => {
|
|
3531
3538
|
R.current && URL.revokeObjectURL(R.current);
|
|
@@ -3556,8 +3563,8 @@ function $o({
|
|
|
3556
3563
|
() => y ? qn(w(C), n) : { included: [], excluded: [] },
|
|
3557
3564
|
[y, w, C, n]
|
|
3558
3565
|
), V = (U) => T((J) => ({ text: U, seq: J.seq + 1 })), j = (U, J) => {
|
|
3559
|
-
if (
|
|
3560
|
-
|
|
3566
|
+
if (u.current) return;
|
|
3567
|
+
u.current = !0;
|
|
3561
3568
|
const me = w(c);
|
|
3562
3569
|
Promise.resolve(J(me)).then(
|
|
3563
3570
|
(le) => V(
|
|
@@ -3566,22 +3573,22 @@ function $o({
|
|
|
3566
3573
|
}) : n("anamnesis.export.control.failed")
|
|
3567
3574
|
)
|
|
3568
3575
|
).catch(() => V(n("anamnesis.export.control.failed"))).finally(() => {
|
|
3569
|
-
|
|
3576
|
+
u.current = !1;
|
|
3570
3577
|
});
|
|
3571
3578
|
}, ne = () => To(E.current), ve = () => j("pdf", (U) => Po(U, { palette: ne() })), ce = () => j("xlsx", Co), de = () => j("csv", No), Y = () => {
|
|
3572
|
-
|
|
3579
|
+
u.current || (u.current = !0, _o(w(c), S.current, { palette: ne() }).then((U) => {
|
|
3573
3580
|
if (!U) {
|
|
3574
3581
|
V(n("anamnesis.export.control.failed"));
|
|
3575
3582
|
return;
|
|
3576
3583
|
}
|
|
3577
3584
|
R.current && URL.revokeObjectURL(R.current), R.current = U, V(n("anamnesis.export.control.printing"));
|
|
3578
3585
|
}).catch(() => V(n("anamnesis.export.control.failed"))).finally(() => {
|
|
3579
|
-
|
|
3586
|
+
u.current = !1;
|
|
3580
3587
|
}));
|
|
3581
|
-
},
|
|
3588
|
+
}, Ie = () => {
|
|
3582
3589
|
x(c), f(!0);
|
|
3583
3590
|
}, D = () => {
|
|
3584
|
-
|
|
3591
|
+
m(C), f(!1), V(
|
|
3585
3592
|
n("anamnesis.export.share.confirmed", {
|
|
3586
3593
|
audience: n(`anamnesis.export.audience.${C}`)
|
|
3587
3594
|
})
|
|
@@ -3618,7 +3625,7 @@ function $o({
|
|
|
3618
3625
|
type: "button",
|
|
3619
3626
|
intent: "outline",
|
|
3620
3627
|
size: "sm",
|
|
3621
|
-
endIcon: /* @__PURE__ */ t(
|
|
3628
|
+
endIcon: /* @__PURE__ */ t(mn, { "aria-hidden": "true" }),
|
|
3622
3629
|
"aria-label": c === "clinician" ? n("anamnesis.export.control.triggerLabel", { tab: P }) : n("anamnesis.export.control.triggerLabelAudience", {
|
|
3623
3630
|
tab: P,
|
|
3624
3631
|
audience: z
|
|
@@ -3635,8 +3642,8 @@ function $o({
|
|
|
3635
3642
|
oe.RadioGroup,
|
|
3636
3643
|
{
|
|
3637
3644
|
value: c,
|
|
3638
|
-
onValueChange: (U) =>
|
|
3639
|
-
children:
|
|
3645
|
+
onValueChange: (U) => m(U),
|
|
3646
|
+
children: on.map((U) => /* @__PURE__ */ t(
|
|
3640
3647
|
oe.RadioItem,
|
|
3641
3648
|
{
|
|
3642
3649
|
value: U,
|
|
@@ -3649,7 +3656,7 @@ function $o({
|
|
|
3649
3656
|
}
|
|
3650
3657
|
),
|
|
3651
3658
|
/* @__PURE__ */ t(oe.Label, { "data-testid": "anamnesis-export-disclosure", children: L[c === "patient" ? "patient" : "clinician"] }),
|
|
3652
|
-
|
|
3659
|
+
on.map((U) => /* @__PURE__ */ t(
|
|
3653
3660
|
"span",
|
|
3654
3661
|
{
|
|
3655
3662
|
id: `${v}-${U}`,
|
|
@@ -3676,7 +3683,7 @@ function $o({
|
|
|
3676
3683
|
oe.Item,
|
|
3677
3684
|
{
|
|
3678
3685
|
startIcon: /* @__PURE__ */ t(ci, { "aria-hidden": "true" }),
|
|
3679
|
-
onSelect:
|
|
3686
|
+
onSelect: Ie,
|
|
3680
3687
|
children: n("anamnesis.export.control.share")
|
|
3681
3688
|
}
|
|
3682
3689
|
),
|
|
@@ -3783,7 +3790,7 @@ function zo({
|
|
|
3783
3790
|
label: l("anamnesis.export.share.audienceLabel"),
|
|
3784
3791
|
value: n,
|
|
3785
3792
|
onValueChange: (c) => i(c),
|
|
3786
|
-
children:
|
|
3793
|
+
children: on.map((c) => /* @__PURE__ */ t(
|
|
3787
3794
|
ke,
|
|
3788
3795
|
{
|
|
3789
3796
|
value: c,
|
|
@@ -3879,7 +3886,7 @@ function zt({
|
|
|
3879
3886
|
readOnly: o = !1,
|
|
3880
3887
|
t: r
|
|
3881
3888
|
}) {
|
|
3882
|
-
const l = os(e, r), c = ut(e, r),
|
|
3889
|
+
const l = os(e, r), c = ut(e, r), m = i && s === "patient", h = Mo(e, a);
|
|
3883
3890
|
let g = null;
|
|
3884
3891
|
switch (e.type) {
|
|
3885
3892
|
case "text": {
|
|
@@ -4117,7 +4124,7 @@ function zt({
|
|
|
4117
4124
|
"data-highlighted": h ? "true" : void 0,
|
|
4118
4125
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
4119
4126
|
children: [
|
|
4120
|
-
|
|
4127
|
+
m || h ? /* @__PURE__ */ d("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]", children: [
|
|
4121
4128
|
h ? /* @__PURE__ */ d(
|
|
4122
4129
|
"span",
|
|
4123
4130
|
{
|
|
@@ -4129,7 +4136,7 @@ function zt({
|
|
|
4129
4136
|
]
|
|
4130
4137
|
}
|
|
4131
4138
|
) : null,
|
|
4132
|
-
|
|
4139
|
+
m ? /* @__PURE__ */ t(ft, { t: r }) : null
|
|
4133
4140
|
] }) : null,
|
|
4134
4141
|
g
|
|
4135
4142
|
]
|
|
@@ -4219,8 +4226,8 @@ function Ot({
|
|
|
4219
4226
|
t: s,
|
|
4220
4227
|
onCommit: o
|
|
4221
4228
|
}) {
|
|
4222
|
-
const [r, l] = $(!1), [c,
|
|
4223
|
-
x &&
|
|
4229
|
+
const [r, l] = $(!1), [c, m] = $(n), h = jo(e), g = Wo(c, h), p = !Qo(c, n), N = Te(e, s), y = Yo(h, e), f = (x) => {
|
|
4230
|
+
x && m(n), l(x);
|
|
4224
4231
|
}, C = (x) => {
|
|
4225
4232
|
o(x), l(!1);
|
|
4226
4233
|
};
|
|
@@ -4260,7 +4267,7 @@ function Ot({
|
|
|
4260
4267
|
min: h.min,
|
|
4261
4268
|
max: h.max,
|
|
4262
4269
|
step: h.step,
|
|
4263
|
-
onChange:
|
|
4270
|
+
onChange: m,
|
|
4264
4271
|
"data-testid": `anamnesis-target-input-${e.key}`
|
|
4265
4272
|
}
|
|
4266
4273
|
)
|
|
@@ -4339,24 +4346,24 @@ function Jo({
|
|
|
4339
4346
|
}
|
|
4340
4347
|
);
|
|
4341
4348
|
}
|
|
4342
|
-
function
|
|
4349
|
+
function Wa(e, a, n) {
|
|
4343
4350
|
const i = Ae(e, a.precision, n);
|
|
4344
4351
|
return a.unit ? `${i} ${a.unit}` : i;
|
|
4345
4352
|
}
|
|
4346
4353
|
function Zo({ def: e, visits: a, target: n, t: i, onTargetChange: s }) {
|
|
4347
4354
|
var p;
|
|
4348
|
-
const { t: o } = yi(), r =
|
|
4349
|
-
name:
|
|
4355
|
+
const { t: o } = yi(), r = De(i), l = ((p = ji(a, e)) == null ? void 0 : p.value) ?? null, c = Ho(l, n, e.key), m = i("anamnesis.targets.tileLabel", {
|
|
4356
|
+
name: ze(e, i)
|
|
4350
4357
|
}), h = e.computed && l != null, g = l == null ? i("anamnesis.targets.nowUnset") : h ? i("anamnesis.targets.nowBanded", {
|
|
4351
|
-
value:
|
|
4358
|
+
value: Wa(l, e, r),
|
|
4352
4359
|
band: o(`bmiCalculator.category.${bi(l)}`)
|
|
4353
|
-
}) : i("anamnesis.targets.now", { value:
|
|
4360
|
+
}) : i("anamnesis.targets.now", { value: Wa(l, e, r) });
|
|
4354
4361
|
return /* @__PURE__ */ t(
|
|
4355
4362
|
Jo,
|
|
4356
4363
|
{
|
|
4357
4364
|
variant: "elevated",
|
|
4358
|
-
label:
|
|
4359
|
-
target: n == null ? i("anamnesis.targets.unset") :
|
|
4365
|
+
label: m,
|
|
4366
|
+
target: n == null ? i("anamnesis.targets.unset") : Wa(n, e, r),
|
|
4360
4367
|
now: g,
|
|
4361
4368
|
status: c,
|
|
4362
4369
|
statusLabel: c ? i(`anamnesis.targets.status.${c}`) : void 0,
|
|
@@ -4364,7 +4371,7 @@ function Zo({ def: e, visits: a, target: n, t: i, onTargetChange: s }) {
|
|
|
4364
4371
|
Ot,
|
|
4365
4372
|
{
|
|
4366
4373
|
def: e,
|
|
4367
|
-
label:
|
|
4374
|
+
label: m,
|
|
4368
4375
|
committed: n,
|
|
4369
4376
|
nowLabel: g,
|
|
4370
4377
|
t: i,
|
|
@@ -4419,7 +4426,7 @@ function qt({
|
|
|
4419
4426
|
)
|
|
4420
4427
|
);
|
|
4421
4428
|
}
|
|
4422
|
-
function
|
|
4429
|
+
function Qa({
|
|
4423
4430
|
stripKeys: e,
|
|
4424
4431
|
defs: a,
|
|
4425
4432
|
visit: n,
|
|
@@ -4429,9 +4436,9 @@ function Wa({
|
|
|
4429
4436
|
onChange: r,
|
|
4430
4437
|
onTargetChange: l
|
|
4431
4438
|
}) {
|
|
4432
|
-
const c =
|
|
4433
|
-
return /* @__PURE__ */ t("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: a.filter((
|
|
4434
|
-
const h =
|
|
4439
|
+
const c = De(o);
|
|
4440
|
+
return /* @__PURE__ */ t("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: a.filter((m) => !m.computed).map((m) => {
|
|
4441
|
+
const h = $e(n, m), g = i ? $e(i, m) : null, p = i ? ba(h, g, m) : null, N = va(h, m.referenceRange), y = s.get(m.key) ?? null, f = Te(m, o), C = l != null && Oi(m.key) && !e.has(m.key);
|
|
4435
4442
|
return /* @__PURE__ */ d(
|
|
4436
4443
|
"div",
|
|
4437
4444
|
{
|
|
@@ -4441,36 +4448,36 @@ function Wa({
|
|
|
4441
4448
|
ga,
|
|
4442
4449
|
{
|
|
4443
4450
|
value: h,
|
|
4444
|
-
mode: (
|
|
4445
|
-
onChange: (x) => r(
|
|
4451
|
+
mode: (m.precision ?? 0) > 0 ? "decimal" : "integer",
|
|
4452
|
+
onChange: (x) => r(m, x)
|
|
4446
4453
|
}
|
|
4447
4454
|
) }),
|
|
4448
4455
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4449
4456
|
N ? /* @__PURE__ */ t(bn, { flag: N, t: o }) : null,
|
|
4450
|
-
/* @__PURE__ */ t(
|
|
4457
|
+
/* @__PURE__ */ t(qa, { delta: p, def: m, t: o }),
|
|
4451
4458
|
C || y != null ? /* @__PURE__ */ d("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
4452
4459
|
/* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: y == null ? o("anamnesis.targets.unset") : o("anamnesis.grid.target", {
|
|
4453
|
-
value: Ae(y,
|
|
4454
|
-
unit:
|
|
4460
|
+
value: Ae(y, m.precision, c),
|
|
4461
|
+
unit: m.unit ?? ""
|
|
4455
4462
|
}) }),
|
|
4456
4463
|
C ? /* @__PURE__ */ t(
|
|
4457
4464
|
Ot,
|
|
4458
4465
|
{
|
|
4459
|
-
def:
|
|
4466
|
+
def: m,
|
|
4460
4467
|
label: f,
|
|
4461
4468
|
committed: y,
|
|
4462
4469
|
nowLabel: o("anamnesis.targets.now", {
|
|
4463
|
-
value: `${Ae(h,
|
|
4470
|
+
value: `${Ae(h, m.precision, c)} ${m.unit ?? ""}`.trim()
|
|
4464
4471
|
}),
|
|
4465
4472
|
t: o,
|
|
4466
|
-
onCommit: (x) => l == null ? void 0 : l(
|
|
4473
|
+
onCommit: (x) => l == null ? void 0 : l(m, x)
|
|
4467
4474
|
}
|
|
4468
4475
|
) : null
|
|
4469
4476
|
] }) : null
|
|
4470
4477
|
] })
|
|
4471
4478
|
]
|
|
4472
4479
|
},
|
|
4473
|
-
|
|
4480
|
+
m.key
|
|
4474
4481
|
);
|
|
4475
4482
|
}) });
|
|
4476
4483
|
}
|
|
@@ -4486,7 +4493,7 @@ function he({
|
|
|
4486
4493
|
children: c
|
|
4487
4494
|
}) {
|
|
4488
4495
|
return /* @__PURE__ */ d(
|
|
4489
|
-
|
|
4496
|
+
ln,
|
|
4490
4497
|
{
|
|
4491
4498
|
variant: "default",
|
|
4492
4499
|
defaultOpen: r === void 0 ? n : void 0,
|
|
@@ -4512,7 +4519,7 @@ function he({
|
|
|
4512
4519
|
o > 0 ? /* @__PURE__ */ t(Q, { variant: "warning", size: "sm", children: a("anamnesis.compile.blockFlagged", { count: o }) }) : null
|
|
4513
4520
|
] }),
|
|
4514
4521
|
/* @__PURE__ */ t(
|
|
4515
|
-
|
|
4522
|
+
mn,
|
|
4516
4523
|
{
|
|
4517
4524
|
"aria-hidden": "true",
|
|
4518
4525
|
className: "ds:size-5 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:[[data-state=open]_&]:rotate-180"
|
|
@@ -4522,7 +4529,7 @@ function he({
|
|
|
4522
4529
|
}
|
|
4523
4530
|
) }),
|
|
4524
4531
|
/* @__PURE__ */ t(
|
|
4525
|
-
|
|
4532
|
+
cn,
|
|
4526
4533
|
{
|
|
4527
4534
|
"aria-label": a(e),
|
|
4528
4535
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
@@ -4543,7 +4550,7 @@ function ar({
|
|
|
4543
4550
|
statusSlot: r,
|
|
4544
4551
|
onOpenNote: l,
|
|
4545
4552
|
onMissingAnswerJump: c,
|
|
4546
|
-
onRecordChange:
|
|
4553
|
+
onRecordChange: m,
|
|
4547
4554
|
practitioners: h,
|
|
4548
4555
|
newVisitDateIso: g,
|
|
4549
4556
|
defaultView: p = "summary",
|
|
@@ -4560,9 +4567,9 @@ function ar({
|
|
|
4560
4567
|
A.current = !0;
|
|
4561
4568
|
return;
|
|
4562
4569
|
}
|
|
4563
|
-
|
|
4570
|
+
m == null || m(C);
|
|
4564
4571
|
}, [C]);
|
|
4565
|
-
const T = we(0), { patient: E, visits: S } = C, R = S[S.length - 1],
|
|
4572
|
+
const T = we(0), { patient: E, visits: S } = C, R = S[S.length - 1], u = S.length > 1 ? S[S.length - 2] : void 0, v = O(
|
|
4566
4573
|
() => new Map(C.targets.map((b) => [b.parameterKey, b.target])),
|
|
4567
4574
|
[C.targets]
|
|
4568
4575
|
), w = O(
|
|
@@ -4587,28 +4594,28 @@ function ar({
|
|
|
4587
4594
|
), ve = O(
|
|
4588
4595
|
() => Ge(i),
|
|
4589
4596
|
[i]
|
|
4590
|
-
), ce = O(() =>
|
|
4597
|
+
), ce = O(() => hn(i), [i]), de = O(() => _a(i), [i]), [Y, Ie] = $(p), [D, U] = $(!0), [J, me] = $([]), le = na((b) => {
|
|
4591
4598
|
me(
|
|
4592
4599
|
(k) => k.length === b.length && k.every((I, K) => I === b[K]) ? k : [...b]
|
|
4593
4600
|
);
|
|
4594
|
-
}, []), { containerRef:
|
|
4601
|
+
}, []), { containerRef: Re, requestJump: Le } = ht(), Fe = na(
|
|
4595
4602
|
(b) => {
|
|
4596
4603
|
var k, I;
|
|
4597
4604
|
return (I = (k = C.intake) == null ? void 0 : k.answers[b]) == null ? void 0 : I.value;
|
|
4598
4605
|
},
|
|
4599
4606
|
[C.intake]
|
|
4600
|
-
),
|
|
4601
|
-
() => ms(ve,
|
|
4602
|
-
[ve,
|
|
4607
|
+
), ka = O(
|
|
4608
|
+
() => ms(ve, Fe, E.sex, a),
|
|
4609
|
+
[ve, Fe, E.sex, a]
|
|
4603
4610
|
), da = O(
|
|
4604
|
-
() => pt(ce,
|
|
4605
|
-
[ce,
|
|
4611
|
+
() => pt(ce, Fe, E.sex, a),
|
|
4612
|
+
[ce, Fe, E.sex, a]
|
|
4606
4613
|
), [M] = $(() => new Set(da.map((b) => b.key))), H = (b) => {
|
|
4607
4614
|
if (c) {
|
|
4608
4615
|
c(b);
|
|
4609
4616
|
return;
|
|
4610
4617
|
}
|
|
4611
|
-
|
|
4618
|
+
Ie("compile"), U(!0), Le(b.key);
|
|
4612
4619
|
};
|
|
4613
4620
|
if (!R)
|
|
4614
4621
|
return /* @__PURE__ */ t(Wn, { embedded: n, children: /* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { children: /* @__PURE__ */ t(
|
|
@@ -4631,7 +4638,7 @@ function ar({
|
|
|
4631
4638
|
visits: K.visits.map(
|
|
4632
4639
|
(Je) => Je.id === b.id ? Pn(Je, k, I) : Je
|
|
4633
4640
|
)
|
|
4634
|
-
})),
|
|
4641
|
+
})), Ka = (b, k) => {
|
|
4635
4642
|
x((I) => ct(I, b.key, k)), s == null || s(b.key, k);
|
|
4636
4643
|
}, Ht = (b) => G((k) => ({ ...k, pathologyCodes: b })), Dn = (b, k) => G((I) => ({
|
|
4637
4644
|
...I,
|
|
@@ -4694,10 +4701,10 @@ function ar({
|
|
|
4694
4701
|
group: I ? yn(I, a, de[I]) : a("anamnesis.pathology.groupGeneral")
|
|
4695
4702
|
};
|
|
4696
4703
|
}
|
|
4697
|
-
),
|
|
4704
|
+
), wa = R.oncological ?? {}, Na = R.annualProgramme ?? {
|
|
4698
4705
|
proposed: !1,
|
|
4699
4706
|
accepted: !1
|
|
4700
|
-
}, Xt = /* @__PURE__ */ d(
|
|
4707
|
+
}, Xt = /* @__PURE__ */ d(_e, { children: [
|
|
4701
4708
|
!n || r ? /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-end ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
4702
4709
|
n ? /* @__PURE__ */ t("span", {}) : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
4703
4710
|
/* @__PURE__ */ d("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: [
|
|
@@ -4706,7 +4713,7 @@ function ar({
|
|
|
4706
4713
|
E.lastName
|
|
4707
4714
|
] }),
|
|
4708
4715
|
/* @__PURE__ */ d("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: [
|
|
4709
|
-
|
|
4716
|
+
Oa(C, a),
|
|
4710
4717
|
" · ",
|
|
4711
4718
|
a("anamnesis.compile.visitCount", { visits: S.length })
|
|
4712
4719
|
] })
|
|
@@ -4727,14 +4734,14 @@ function ar({
|
|
|
4727
4734
|
defs: B,
|
|
4728
4735
|
targets: v,
|
|
4729
4736
|
t: a,
|
|
4730
|
-
onTargetChange:
|
|
4737
|
+
onTargetChange: Ka
|
|
4731
4738
|
}
|
|
4732
4739
|
),
|
|
4733
4740
|
/* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: /* @__PURE__ */ d(
|
|
4734
4741
|
W,
|
|
4735
4742
|
{
|
|
4736
4743
|
value: Y,
|
|
4737
|
-
onValueChange: (b) =>
|
|
4744
|
+
onValueChange: (b) => Ie(b),
|
|
4738
4745
|
children: [
|
|
4739
4746
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
4740
4747
|
/* @__PURE__ */ d(W.List, { "aria-label": a("anamnesis.compile.viewsLabel"), children: [
|
|
@@ -4762,7 +4769,7 @@ function ar({
|
|
|
4762
4769
|
intake: C.intake,
|
|
4763
4770
|
sections: ve,
|
|
4764
4771
|
sex: E.sex,
|
|
4765
|
-
digest:
|
|
4772
|
+
digest: ka,
|
|
4766
4773
|
missing: da,
|
|
4767
4774
|
onJump: H,
|
|
4768
4775
|
t: a
|
|
@@ -4848,7 +4855,7 @@ function ar({
|
|
|
4848
4855
|
/* @__PURE__ */ t(
|
|
4849
4856
|
"div",
|
|
4850
4857
|
{
|
|
4851
|
-
ref:
|
|
4858
|
+
ref: Re,
|
|
4852
4859
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]",
|
|
4853
4860
|
children: ce.map((b) => {
|
|
4854
4861
|
const k = b.fields.filter((I) => ca(I, E.sex)).filter((I) => M.has(I.key));
|
|
@@ -4887,30 +4894,30 @@ function ar({
|
|
|
4887
4894
|
/* @__PURE__ */ d(he, { titleKey: "anamnesis.section.anthropometrics", t: a, children: [
|
|
4888
4895
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.bmiInStrip") }),
|
|
4889
4896
|
/* @__PURE__ */ t(
|
|
4890
|
-
|
|
4897
|
+
Qa,
|
|
4891
4898
|
{
|
|
4892
4899
|
stripKeys: L,
|
|
4893
4900
|
defs: w,
|
|
4894
4901
|
visit: R,
|
|
4895
|
-
previous:
|
|
4902
|
+
previous: u,
|
|
4896
4903
|
targets: v,
|
|
4897
4904
|
t: a,
|
|
4898
4905
|
onChange: be,
|
|
4899
|
-
onTargetChange:
|
|
4906
|
+
onTargetChange: Ka
|
|
4900
4907
|
}
|
|
4901
4908
|
)
|
|
4902
4909
|
] }),
|
|
4903
4910
|
P.length > 0 ? /* @__PURE__ */ t(he, { titleKey: "anamnesis.section.dietary", t: a, children: /* @__PURE__ */ t(
|
|
4904
|
-
|
|
4911
|
+
Qa,
|
|
4905
4912
|
{
|
|
4906
4913
|
stripKeys: L,
|
|
4907
4914
|
defs: P,
|
|
4908
4915
|
visit: R,
|
|
4909
|
-
previous:
|
|
4916
|
+
previous: u,
|
|
4910
4917
|
targets: v,
|
|
4911
4918
|
t: a,
|
|
4912
4919
|
onChange: be,
|
|
4913
|
-
onTargetChange:
|
|
4920
|
+
onTargetChange: Ka
|
|
4914
4921
|
}
|
|
4915
4922
|
) }) : null,
|
|
4916
4923
|
/* @__PURE__ */ t(he, { titleKey: "anamnesis.section.pathologies", t: a, children: /* @__PURE__ */ t(
|
|
@@ -4919,7 +4926,7 @@ function ar({
|
|
|
4919
4926
|
label: a("anamnesis.compile.pathologiesLabel"),
|
|
4920
4927
|
description: a("anamnesis.compile.pathologiesHelp"),
|
|
4921
4928
|
children: /* @__PURE__ */ t(
|
|
4922
|
-
|
|
4929
|
+
dn,
|
|
4923
4930
|
{
|
|
4924
4931
|
options: Yt,
|
|
4925
4932
|
value: R.pathologyCodes,
|
|
@@ -4944,7 +4951,7 @@ function ar({
|
|
|
4944
4951
|
/* @__PURE__ */ t(q, { label: a("anamnesis.field.tumourType.label"), children: /* @__PURE__ */ t(
|
|
4945
4952
|
ae,
|
|
4946
4953
|
{
|
|
4947
|
-
value:
|
|
4954
|
+
value: wa.tumourType ?? "",
|
|
4948
4955
|
onChange: (b) => G((k) => ({
|
|
4949
4956
|
...k,
|
|
4950
4957
|
oncological: {
|
|
@@ -4957,7 +4964,7 @@ function ar({
|
|
|
4957
4964
|
/* @__PURE__ */ t(q, { label: a("anamnesis.field.stage.label"), children: /* @__PURE__ */ t(
|
|
4958
4965
|
ae,
|
|
4959
4966
|
{
|
|
4960
|
-
value:
|
|
4967
|
+
value: wa.stage ?? "",
|
|
4961
4968
|
onChange: (b) => G((k) => ({
|
|
4962
4969
|
...k,
|
|
4963
4970
|
oncological: {
|
|
@@ -4972,7 +4979,7 @@ function ar({
|
|
|
4972
4979
|
{
|
|
4973
4980
|
label: a("anamnesis.field.metastases.label"),
|
|
4974
4981
|
variant: "horizontal",
|
|
4975
|
-
value: ((In =
|
|
4982
|
+
value: ((In = wa.metastases) == null ? void 0 : In.present) ?? "unknown",
|
|
4976
4983
|
onValueChange: (b) => G((k) => {
|
|
4977
4984
|
var I, K;
|
|
4978
4985
|
return {
|
|
@@ -5006,7 +5013,7 @@ function ar({
|
|
|
5006
5013
|
children: /* @__PURE__ */ t(
|
|
5007
5014
|
ae,
|
|
5008
5015
|
{
|
|
5009
|
-
value:
|
|
5016
|
+
value: wa.treatmentStatus ?? "",
|
|
5010
5017
|
onChange: (b) => G((k) => ({
|
|
5011
5018
|
...k,
|
|
5012
5019
|
oncological: {
|
|
@@ -5095,12 +5102,12 @@ function ar({
|
|
|
5095
5102
|
fill: F.labs.fill,
|
|
5096
5103
|
flagged: F.labs.flagged,
|
|
5097
5104
|
children: /* @__PURE__ */ t(
|
|
5098
|
-
|
|
5105
|
+
Qa,
|
|
5099
5106
|
{
|
|
5100
5107
|
stripKeys: L,
|
|
5101
5108
|
defs: z,
|
|
5102
5109
|
visit: R,
|
|
5103
|
-
previous:
|
|
5110
|
+
previous: u,
|
|
5104
5111
|
targets: v,
|
|
5105
5112
|
t: a,
|
|
5106
5113
|
onChange: be
|
|
@@ -5130,7 +5137,7 @@ function ar({
|
|
|
5130
5137
|
value: b.startDateIso,
|
|
5131
5138
|
format: "absolute",
|
|
5132
5139
|
shape: "bare",
|
|
5133
|
-
absoluteFormat:
|
|
5140
|
+
absoluteFormat: $a
|
|
5134
5141
|
}
|
|
5135
5142
|
) }),
|
|
5136
5143
|
/* @__PURE__ */ t(
|
|
@@ -5194,7 +5201,7 @@ function ar({
|
|
|
5194
5201
|
{
|
|
5195
5202
|
label: a("anamnesis.field.annualProposed.label"),
|
|
5196
5203
|
variant: "horizontal",
|
|
5197
|
-
value:
|
|
5204
|
+
value: Na.proposed ? "yes" : "no",
|
|
5198
5205
|
onValueChange: (b) => G((k) => {
|
|
5199
5206
|
var I, K;
|
|
5200
5207
|
return {
|
|
@@ -5217,7 +5224,7 @@ function ar({
|
|
|
5217
5224
|
{
|
|
5218
5225
|
label: a("anamnesis.field.annualAccepted.label"),
|
|
5219
5226
|
variant: "horizontal",
|
|
5220
|
-
value:
|
|
5227
|
+
value: Na.accepted ? "yes" : "no",
|
|
5221
5228
|
onValueChange: (b) => G((k) => {
|
|
5222
5229
|
var I, K;
|
|
5223
5230
|
return {
|
|
@@ -5235,14 +5242,14 @@ function ar({
|
|
|
5235
5242
|
]
|
|
5236
5243
|
}
|
|
5237
5244
|
),
|
|
5238
|
-
|
|
5245
|
+
Na.accepted ? null : /* @__PURE__ */ t(
|
|
5239
5246
|
q,
|
|
5240
5247
|
{
|
|
5241
5248
|
label: a("anamnesis.field.annualDeclineReason.label"),
|
|
5242
5249
|
children: /* @__PURE__ */ t(
|
|
5243
5250
|
ta,
|
|
5244
5251
|
{
|
|
5245
|
-
value:
|
|
5252
|
+
value: Na.declineReason ?? "",
|
|
5246
5253
|
autoResize: !0,
|
|
5247
5254
|
minRows: 2,
|
|
5248
5255
|
onChange: (b) => G((k) => {
|
|
@@ -5306,7 +5313,7 @@ function Vt({
|
|
|
5306
5313
|
jumpToField: r,
|
|
5307
5314
|
readOnly: l = !1
|
|
5308
5315
|
}) {
|
|
5309
|
-
const { patient: c } = e,
|
|
5316
|
+
const { patient: c } = e, m = Ma(e), [h, g] = $(() => Qn(e)), [p, N] = $(e);
|
|
5310
5317
|
e !== p && (N(e), g(Qn(e)));
|
|
5311
5318
|
const [y, f] = $(
|
|
5312
5319
|
() => {
|
|
@@ -5316,7 +5323,7 @@ function Vt({
|
|
|
5316
5323
|
), C = (F, V) => {
|
|
5317
5324
|
g((j) => ({ ...j, [F]: V }));
|
|
5318
5325
|
}, x = O(
|
|
5319
|
-
() =>
|
|
5326
|
+
() => hn(i).map((F) => ({
|
|
5320
5327
|
...F,
|
|
5321
5328
|
fields: F.fields.filter((V) => ca(V, c.sex))
|
|
5322
5329
|
})).filter((F) => F.fields.length > 0),
|
|
@@ -5334,7 +5341,7 @@ function Vt({
|
|
|
5334
5341
|
a
|
|
5335
5342
|
),
|
|
5336
5343
|
[x, h, c.sex, a]
|
|
5337
|
-
),
|
|
5344
|
+
), u = (F) => {
|
|
5338
5345
|
T(F.sectionKey), S(F.key);
|
|
5339
5346
|
};
|
|
5340
5347
|
ia(() => {
|
|
@@ -5353,7 +5360,7 @@ function Vt({
|
|
|
5353
5360
|
}, [x, h]), P = w === 0 ? 0 : Math.round(v / w * 100), z = a("anamnesis.intake.answered", {
|
|
5354
5361
|
answered: v,
|
|
5355
5362
|
total: w
|
|
5356
|
-
}), B = R.length > 0 && (v > 0 || y), L = /* @__PURE__ */ d(
|
|
5363
|
+
}), B = R.length > 0 && (v > 0 || y), L = /* @__PURE__ */ d(_e, { children: [
|
|
5357
5364
|
n ? null : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
5358
5365
|
/* @__PURE__ */ t("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: a("anamnesis.intake.title") }),
|
|
5359
5366
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.intake.subtitle") })
|
|
@@ -5367,9 +5374,9 @@ function Vt({
|
|
|
5367
5374
|
c.lastName
|
|
5368
5375
|
] })
|
|
5369
5376
|
] }),
|
|
5370
|
-
|
|
5377
|
+
m ? /* @__PURE__ */ d(_.Row, { children: [
|
|
5371
5378
|
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.age") }),
|
|
5372
|
-
/* @__PURE__ */ t(_.Detail, { children:
|
|
5379
|
+
/* @__PURE__ */ t(_.Detail, { children: Oa(e, a) })
|
|
5373
5380
|
] }) : null,
|
|
5374
5381
|
/* @__PURE__ */ d(_.Row, { children: [
|
|
5375
5382
|
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.dob") }),
|
|
@@ -5379,19 +5386,19 @@ function Vt({
|
|
|
5379
5386
|
value: c.dateOfBirthIso,
|
|
5380
5387
|
format: "absolute",
|
|
5381
5388
|
shape: "bare",
|
|
5382
|
-
absoluteFormat:
|
|
5389
|
+
absoluteFormat: $a
|
|
5383
5390
|
}
|
|
5384
5391
|
) })
|
|
5385
5392
|
] }),
|
|
5386
|
-
|
|
5393
|
+
m ? /* @__PURE__ */ d(_.Row, { children: [
|
|
5387
5394
|
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.visitDate") }),
|
|
5388
5395
|
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ t(
|
|
5389
5396
|
sa,
|
|
5390
5397
|
{
|
|
5391
|
-
value:
|
|
5398
|
+
value: m.dateIso,
|
|
5392
5399
|
format: "absolute",
|
|
5393
5400
|
shape: "bare",
|
|
5394
|
-
absoluteFormat:
|
|
5401
|
+
absoluteFormat: za(m.dateIso)
|
|
5395
5402
|
}
|
|
5396
5403
|
) })
|
|
5397
5404
|
] }) : null
|
|
@@ -5412,7 +5419,7 @@ function Vt({
|
|
|
5412
5419
|
{
|
|
5413
5420
|
missing: R,
|
|
5414
5421
|
t: a,
|
|
5415
|
-
onJump:
|
|
5422
|
+
onJump: u,
|
|
5416
5423
|
announce: "off"
|
|
5417
5424
|
}
|
|
5418
5425
|
) : null,
|
|
@@ -5504,25 +5511,25 @@ function xe({
|
|
|
5504
5511
|
n
|
|
5505
5512
|
] });
|
|
5506
5513
|
}
|
|
5507
|
-
function
|
|
5514
|
+
function Ya({
|
|
5508
5515
|
defs: e,
|
|
5509
5516
|
visit: a,
|
|
5510
5517
|
previous: n,
|
|
5511
5518
|
targets: i,
|
|
5512
5519
|
t: s
|
|
5513
5520
|
}) {
|
|
5514
|
-
const o =
|
|
5521
|
+
const o = De(s);
|
|
5515
5522
|
return /* @__PURE__ */ t(_, { layout: "inline", labelWidth: "fixed", divider: "between", children: e.map((r) => {
|
|
5516
|
-
const l =
|
|
5523
|
+
const l = $e(a, r), c = n ? $e(n, r) : null, m = n ? ba(l, c, r) : null, h = va(l, r.referenceRange), g = i.get(r.key) ?? null;
|
|
5517
5524
|
return /* @__PURE__ */ d(_.Row, { children: [
|
|
5518
5525
|
/* @__PURE__ */ d(_.Term, { children: [
|
|
5519
|
-
|
|
5526
|
+
ze(r, s),
|
|
5520
5527
|
r.unit ? ` (${r.unit})` : ""
|
|
5521
5528
|
] }),
|
|
5522
5529
|
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:tabular-nums", children: [
|
|
5523
5530
|
/* @__PURE__ */ t("span", { className: "ds:text-[color:var(--foreground)]", children: Ae(l, r.precision, o) }),
|
|
5524
5531
|
h ? /* @__PURE__ */ t(bn, { flag: h, t: s }) : null,
|
|
5525
|
-
/* @__PURE__ */ t(
|
|
5532
|
+
/* @__PURE__ */ t(qa, { delta: m, def: r, t: s }),
|
|
5526
5533
|
g != null ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.grid.target", {
|
|
5527
5534
|
value: Ae(g, r.precision, o),
|
|
5528
5535
|
unit: r.unit ?? ""
|
|
@@ -5538,9 +5545,9 @@ function nr({
|
|
|
5538
5545
|
config: i,
|
|
5539
5546
|
onOpenNote: s
|
|
5540
5547
|
}) {
|
|
5541
|
-
const { patient: o, visits: r } = e, l = r[r.length - 1], c = r.length > 1 ? r[r.length - 2] : void 0,
|
|
5548
|
+
const { patient: o, visits: r } = e, l = r[r.length - 1], c = r.length > 1 ? r[r.length - 2] : void 0, m = new Map(
|
|
5542
5549
|
e.targets.map((A) => [A.parameterKey, A.target])
|
|
5543
|
-
), h =
|
|
5550
|
+
), h = Pe(i, "anthropometric"), g = Pe(i, "dietary"), p = Pe(i, "lab"), N = Ge(i), y = _a(i);
|
|
5544
5551
|
if (!l)
|
|
5545
5552
|
return /* @__PURE__ */ t(Yn, { embedded: n, children: /* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { children: /* @__PURE__ */ t(
|
|
5546
5553
|
Ue,
|
|
@@ -5551,7 +5558,7 @@ function nr({
|
|
|
5551
5558
|
description: a("anamnesis.empty.noRecord.description")
|
|
5552
5559
|
}
|
|
5553
5560
|
) }) }) });
|
|
5554
|
-
const f = l.oncological, C = l.annualProgramme, x = /* @__PURE__ */ d(
|
|
5561
|
+
const f = l.oncological, C = l.annualProgramme, x = /* @__PURE__ */ d(_e, { children: [
|
|
5555
5562
|
n ? null : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
5556
5563
|
/* @__PURE__ */ d("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: [
|
|
5557
5564
|
o.firstName,
|
|
@@ -5578,7 +5585,7 @@ function nr({
|
|
|
5578
5585
|
] }),
|
|
5579
5586
|
/* @__PURE__ */ d(_.Row, { children: [
|
|
5580
5587
|
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.age") }),
|
|
5581
|
-
/* @__PURE__ */ t(_.Detail, { children:
|
|
5588
|
+
/* @__PURE__ */ t(_.Detail, { children: Oa(e, a) })
|
|
5582
5589
|
] }),
|
|
5583
5590
|
/* @__PURE__ */ d(_.Row, { children: [
|
|
5584
5591
|
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.visitDate") }),
|
|
@@ -5588,7 +5595,7 @@ function nr({
|
|
|
5588
5595
|
value: l.dateIso,
|
|
5589
5596
|
format: "absolute",
|
|
5590
5597
|
shape: "bare",
|
|
5591
|
-
absoluteFormat:
|
|
5598
|
+
absoluteFormat: za(l.dateIso)
|
|
5592
5599
|
}
|
|
5593
5600
|
) })
|
|
5594
5601
|
] }),
|
|
@@ -5600,22 +5607,22 @@ function nr({
|
|
|
5600
5607
|
}
|
|
5601
5608
|
) }),
|
|
5602
5609
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.anthropometrics", t: a, children: /* @__PURE__ */ t(
|
|
5603
|
-
|
|
5610
|
+
Ya,
|
|
5604
5611
|
{
|
|
5605
5612
|
defs: h,
|
|
5606
5613
|
visit: l,
|
|
5607
5614
|
previous: c,
|
|
5608
|
-
targets:
|
|
5615
|
+
targets: m,
|
|
5609
5616
|
t: a
|
|
5610
5617
|
}
|
|
5611
5618
|
) }),
|
|
5612
5619
|
g.length > 0 ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.dietary", t: a, children: /* @__PURE__ */ t(
|
|
5613
|
-
|
|
5620
|
+
Ya,
|
|
5614
5621
|
{
|
|
5615
5622
|
defs: g,
|
|
5616
5623
|
visit: l,
|
|
5617
5624
|
previous: c,
|
|
5618
|
-
targets:
|
|
5625
|
+
targets: m,
|
|
5619
5626
|
t: a
|
|
5620
5627
|
}
|
|
5621
5628
|
) }) : null,
|
|
@@ -5662,12 +5669,12 @@ function nr({
|
|
|
5662
5669
|
A.id
|
|
5663
5670
|
)) }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.readOnly.none") }) }),
|
|
5664
5671
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.labs", t: a, children: /* @__PURE__ */ t(
|
|
5665
|
-
|
|
5672
|
+
Ya,
|
|
5666
5673
|
{
|
|
5667
5674
|
defs: p,
|
|
5668
5675
|
visit: l,
|
|
5669
5676
|
previous: c,
|
|
5670
|
-
targets:
|
|
5677
|
+
targets: m,
|
|
5671
5678
|
t: a
|
|
5672
5679
|
}
|
|
5673
5680
|
) }),
|
|
@@ -5751,7 +5758,7 @@ function Bt({
|
|
|
5751
5758
|
onTargetChange: r,
|
|
5752
5759
|
hideTargetStrip: l = !1,
|
|
5753
5760
|
leadingTabs: c = tr,
|
|
5754
|
-
tab:
|
|
5761
|
+
tab: m,
|
|
5755
5762
|
onTabChange: h,
|
|
5756
5763
|
defaultTab: g
|
|
5757
5764
|
}) {
|
|
@@ -5760,17 +5767,17 @@ function Bt({
|
|
|
5760
5767
|
var v;
|
|
5761
5768
|
return g ?? ((v = c[0]) == null ? void 0 : v.value) ?? "questionnaire";
|
|
5762
5769
|
}
|
|
5763
|
-
), y =
|
|
5764
|
-
|
|
5770
|
+
), y = m ?? p, f = (v) => {
|
|
5771
|
+
m === void 0 && N(v), h == null || h(v);
|
|
5765
5772
|
}, [C, x] = $(e), [A, T] = $(e);
|
|
5766
5773
|
e !== A && (T(e), x(e));
|
|
5767
5774
|
const E = O(
|
|
5768
5775
|
() => new Map(C.targets.map((v) => [v.parameterKey, v.target])),
|
|
5769
5776
|
[C.targets]
|
|
5770
5777
|
), S = O(() => Mt(n), [n]), R = O(
|
|
5771
|
-
() =>
|
|
5778
|
+
() => Pe(n),
|
|
5772
5779
|
[n]
|
|
5773
|
-
),
|
|
5780
|
+
), u = (v, w) => {
|
|
5774
5781
|
x((P) => ct(P, v.key, w)), r == null || r(v.key, w);
|
|
5775
5782
|
};
|
|
5776
5783
|
return (
|
|
@@ -5785,7 +5792,7 @@ function Bt({
|
|
|
5785
5792
|
defs: S,
|
|
5786
5793
|
targets: E,
|
|
5787
5794
|
t: a,
|
|
5788
|
-
onTargetChange:
|
|
5795
|
+
onTargetChange: u
|
|
5789
5796
|
}
|
|
5790
5797
|
),
|
|
5791
5798
|
/* @__PURE__ */ d(W, { value: y, onValueChange: f, children: [
|
|
@@ -5861,7 +5868,7 @@ function wl({
|
|
|
5861
5868
|
onTargetChange: r,
|
|
5862
5869
|
hideTargetStrip: l,
|
|
5863
5870
|
statusSlot: c,
|
|
5864
|
-
onOpenNote:
|
|
5871
|
+
onOpenNote: m,
|
|
5865
5872
|
onIntakeSubmit: h,
|
|
5866
5873
|
intakeJumpToField: g,
|
|
5867
5874
|
readOnly: p,
|
|
@@ -5875,7 +5882,7 @@ function wl({
|
|
|
5875
5882
|
newVisitDateIso: E,
|
|
5876
5883
|
defaultView: S,
|
|
5877
5884
|
defaultExportMenuOpen: R,
|
|
5878
|
-
defaultShareOpen:
|
|
5885
|
+
defaultShareOpen: u,
|
|
5879
5886
|
defaultExportAudience: v
|
|
5880
5887
|
}) {
|
|
5881
5888
|
const w = e === "intake" ? /* @__PURE__ */ t(
|
|
@@ -5915,14 +5922,14 @@ function wl({
|
|
|
5915
5922
|
onTargetChange: r,
|
|
5916
5923
|
hideTargetStrip: l,
|
|
5917
5924
|
statusSlot: c,
|
|
5918
|
-
onOpenNote:
|
|
5925
|
+
onOpenNote: m,
|
|
5919
5926
|
onMissingAnswerJump: N,
|
|
5920
5927
|
onRecordChange: y,
|
|
5921
5928
|
practitioners: T,
|
|
5922
5929
|
newVisitDateIso: E,
|
|
5923
5930
|
defaultView: S,
|
|
5924
5931
|
defaultExportMenuOpen: R,
|
|
5925
|
-
defaultShareOpen:
|
|
5932
|
+
defaultShareOpen: u,
|
|
5926
5933
|
defaultExportAudience: v
|
|
5927
5934
|
}
|
|
5928
5935
|
) : /* @__PURE__ */ t(
|
|
@@ -5932,7 +5939,7 @@ function wl({
|
|
|
5932
5939
|
t: n,
|
|
5933
5940
|
embedded: s,
|
|
5934
5941
|
config: o,
|
|
5935
|
-
onOpenNote:
|
|
5942
|
+
onOpenNote: m
|
|
5936
5943
|
}
|
|
5937
5944
|
);
|
|
5938
5945
|
return s ? /* @__PURE__ */ t(
|
|
@@ -5969,24 +5976,24 @@ const ir = Zn("", {
|
|
|
5969
5976
|
},
|
|
5970
5977
|
defaultVariants: { dragging: !1, dropTarget: !1 }
|
|
5971
5978
|
}), Ut = ai(null);
|
|
5972
|
-
function
|
|
5979
|
+
function Xa({
|
|
5973
5980
|
count: e,
|
|
5974
5981
|
onReorder: a,
|
|
5975
5982
|
t: n,
|
|
5976
5983
|
children: i
|
|
5977
5984
|
}) {
|
|
5978
|
-
const [s, o] = $(null), [r, l] = $(""), c = we(!1),
|
|
5985
|
+
const [s, o] = $(null), [r, l] = $(""), c = we(!1), m = na((g) => {
|
|
5979
5986
|
c.current = !c.current, l(c.current ? g : `${g}`);
|
|
5980
5987
|
}, []), h = O(
|
|
5981
|
-
() => ({ onReorder: a, count: e, dragSource: s, setDragSource: o, announce:
|
|
5982
|
-
[a, e, s,
|
|
5988
|
+
() => ({ onReorder: a, count: e, dragSource: s, setDragSource: o, announce: m, t: n }),
|
|
5989
|
+
[a, e, s, m, n]
|
|
5983
5990
|
);
|
|
5984
5991
|
return /* @__PURE__ */ d(Ut.Provider, { value: h, children: [
|
|
5985
5992
|
i,
|
|
5986
5993
|
/* @__PURE__ */ t("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: r })
|
|
5987
5994
|
] });
|
|
5988
5995
|
}
|
|
5989
|
-
function
|
|
5996
|
+
function Ja({
|
|
5990
5997
|
index: e,
|
|
5991
5998
|
label: a,
|
|
5992
5999
|
children: n
|
|
@@ -6007,7 +6014,7 @@ function Xa({
|
|
|
6007
6014
|
));
|
|
6008
6015
|
}, c = (p) => {
|
|
6009
6016
|
p.altKey && (p.key === "ArrowUp" ? (p.preventDefault(), l(e, e - 1)) : p.key === "ArrowDown" ? (p.preventDefault(), l(e, e + 1)) : p.key === "Home" ? (p.preventDefault(), l(e, 0)) : p.key === "End" && (p.preventDefault(), l(e, i.count - 1)));
|
|
6010
|
-
},
|
|
6017
|
+
}, m = i.dragSource === e, h = {
|
|
6011
6018
|
draggable: !0,
|
|
6012
6019
|
onDragStart: (p) => {
|
|
6013
6020
|
i.setDragSource(e), p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(e));
|
|
@@ -6025,8 +6032,8 @@ function Xa({
|
|
|
6025
6032
|
o(!1), i.setDragSource(null), !(N === null || N === e) && l(N, e);
|
|
6026
6033
|
},
|
|
6027
6034
|
className: ir({
|
|
6028
|
-
dragging:
|
|
6029
|
-
dropTarget: s && !
|
|
6035
|
+
dragging: m,
|
|
6036
|
+
dropTarget: s && !m
|
|
6030
6037
|
})
|
|
6031
6038
|
}, g = /* @__PURE__ */ t(
|
|
6032
6039
|
re,
|
|
@@ -6056,7 +6063,7 @@ function Nl() {
|
|
|
6056
6063
|
}))
|
|
6057
6064
|
};
|
|
6058
6065
|
}
|
|
6059
|
-
function
|
|
6066
|
+
function Za(e, a) {
|
|
6060
6067
|
const n = e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-zA-Z0-9]+/g, " ").trim().split(/\s+/).filter(Boolean), i = n.length === 0 ? "entry" : n.map(
|
|
6061
6068
|
(r, l) => l === 0 ? r.toLowerCase() : r[0].toUpperCase() + r.slice(1).toLowerCase()
|
|
6062
6069
|
).join("");
|
|
@@ -6065,7 +6072,7 @@ function Ja(e, a) {
|
|
|
6065
6072
|
s = `${i}${o}`, o += 1;
|
|
6066
6073
|
return s;
|
|
6067
6074
|
}
|
|
6068
|
-
function
|
|
6075
|
+
function en(e, a, n) {
|
|
6069
6076
|
if (a === n || a < 0 || a >= e.length || n < 0 || n >= e.length) return null;
|
|
6070
6077
|
const i = [...e], [s] = i.splice(a, 1);
|
|
6071
6078
|
return i.splice(n, 0, s), i;
|
|
@@ -6090,72 +6097,72 @@ function Kt(e, a) {
|
|
|
6090
6097
|
const n = e.type === "number" ? e.decimal ? "numberDecimal" : "numberInteger" : e.type === "choice" && e.detail ? "choiceWithText" : e.type;
|
|
6091
6098
|
return a(`anamnesis.configEditor.type.${n}`);
|
|
6092
6099
|
}
|
|
6093
|
-
const rr = ["down", "up", "toRange"],
|
|
6100
|
+
const rr = ["down", "up", "toRange"], rn = ["anthropometric", "dietary", "lab"];
|
|
6094
6101
|
function Cl({
|
|
6095
6102
|
config: e,
|
|
6096
6103
|
onConfigChange: a,
|
|
6097
6104
|
t: n,
|
|
6098
6105
|
dataComponent: i = "anamnesis-config-editor"
|
|
6099
6106
|
}) {
|
|
6100
|
-
const [s, o] = $(null), [r, l] = $(null), c = (
|
|
6107
|
+
const [s, o] = $(null), [r, l] = $(null), c = (u) => a({ ...e, parameters: e.parameters.map(u) }), m = (u) => a({
|
|
6101
6108
|
...e,
|
|
6102
|
-
intakeSections: e.intakeSections.map(
|
|
6103
|
-
}), h = (
|
|
6104
|
-
(P) => P.key ===
|
|
6109
|
+
intakeSections: e.intakeSections.map(u)
|
|
6110
|
+
}), h = (u, v, w) => m(
|
|
6111
|
+
(P) => P.key === u ? {
|
|
6105
6112
|
...P,
|
|
6106
6113
|
fields: P.fields.map(
|
|
6107
6114
|
(z) => z.key === v ? w(z) : z
|
|
6108
6115
|
)
|
|
6109
6116
|
} : P
|
|
6110
|
-
), g = (
|
|
6111
|
-
const P =
|
|
6117
|
+
), g = (u) => a({ ...e, pathologies: e.pathologies.map(u) }), p = (u, v, w) => {
|
|
6118
|
+
const P = Pe(e, u), z = en(P, v, w);
|
|
6112
6119
|
if (!z) return;
|
|
6113
6120
|
const B = new Map(z.map((L, F) => [L.key, F]));
|
|
6114
6121
|
c(
|
|
6115
6122
|
(L) => B.has(L.key) ? { ...L, order: B.get(L.key) } : L
|
|
6116
6123
|
);
|
|
6117
|
-
}, N = (
|
|
6118
|
-
const w =
|
|
6124
|
+
}, N = (u, v) => {
|
|
6125
|
+
const w = en(Ge(e), u, v);
|
|
6119
6126
|
if (!w) return;
|
|
6120
6127
|
const P = new Map(
|
|
6121
6128
|
w.map((z, B) => [z.key, B])
|
|
6122
6129
|
);
|
|
6123
|
-
|
|
6130
|
+
m(
|
|
6124
6131
|
(z) => P.has(z.key) ? { ...z, order: P.get(z.key) } : z
|
|
6125
6132
|
);
|
|
6126
|
-
}, y = (
|
|
6127
|
-
const P =
|
|
6133
|
+
}, y = (u, v, w) => {
|
|
6134
|
+
const P = en(u.fields, v, w);
|
|
6128
6135
|
if (!P) return;
|
|
6129
6136
|
const z = new Map(
|
|
6130
6137
|
P.map((B, L) => [B.key, L])
|
|
6131
6138
|
);
|
|
6132
|
-
|
|
6133
|
-
(B) => B.key ===
|
|
6139
|
+
m(
|
|
6140
|
+
(B) => B.key === u.key ? {
|
|
6134
6141
|
...B,
|
|
6135
6142
|
fields: B.fields.map(
|
|
6136
6143
|
(L) => z.has(L.key) ? { ...L, order: z.get(L.key) } : L
|
|
6137
6144
|
)
|
|
6138
6145
|
} : B
|
|
6139
6146
|
);
|
|
6140
|
-
}, f = (
|
|
6141
|
-
|
|
6142
|
-
(w) => w.key ===
|
|
6143
|
-
) :
|
|
6144
|
-
(w) => w.key ===
|
|
6145
|
-
) :
|
|
6147
|
+
}, f = (u, v) => {
|
|
6148
|
+
u.kind === "parameter" ? c(
|
|
6149
|
+
(w) => w.key === u.entry.key ? { ...w, enabled: v } : w
|
|
6150
|
+
) : u.kind === "section" ? m(
|
|
6151
|
+
(w) => w.key === u.entry.key ? { ...w, enabled: v } : w
|
|
6152
|
+
) : u.kind === "field" ? h(u.sectionKey, u.entry.key, (w) => ({
|
|
6146
6153
|
...w,
|
|
6147
6154
|
enabled: v
|
|
6148
6155
|
})) : g(
|
|
6149
|
-
(w) => w.code ===
|
|
6156
|
+
(w) => w.code === u.entry.code ? { ...w, enabled: v } : w
|
|
6150
6157
|
);
|
|
6151
|
-
}, C = Ne(e).length, x =
|
|
6152
|
-
(
|
|
6158
|
+
}, C = Ne(e).length, x = Pe(e).length, A = hn(e).reduce(
|
|
6159
|
+
(u, v) => u + v.fields.length,
|
|
6153
6160
|
0
|
|
6154
6161
|
), T = Ge(e).reduce(
|
|
6155
|
-
(
|
|
6162
|
+
(u, v) => u + v.fields.length,
|
|
6156
6163
|
0
|
|
6157
|
-
), E = ot(e).length, S =
|
|
6158
|
-
(
|
|
6164
|
+
), E = ot(e).length, S = tn(e).length, R = Ne(e).filter(
|
|
6165
|
+
(u) => u.goal === !0
|
|
6159
6166
|
).length;
|
|
6160
6167
|
return /* @__PURE__ */ d(
|
|
6161
6168
|
"div",
|
|
@@ -6184,21 +6191,21 @@ function Cl({
|
|
|
6184
6191
|
count: T - A
|
|
6185
6192
|
})}` }),
|
|
6186
6193
|
/* @__PURE__ */ t(
|
|
6187
|
-
|
|
6194
|
+
Xa,
|
|
6188
6195
|
{
|
|
6189
6196
|
count: Ge(e).length,
|
|
6190
6197
|
onReorder: N,
|
|
6191
6198
|
t: n,
|
|
6192
6199
|
children: Ge(e).map(
|
|
6193
|
-
(
|
|
6194
|
-
const w =
|
|
6200
|
+
(u, v) => {
|
|
6201
|
+
const w = u.enabled === !1, P = u.fields.filter(
|
|
6195
6202
|
(z) => z.enabled !== !1
|
|
6196
6203
|
).length;
|
|
6197
6204
|
return /* @__PURE__ */ t(
|
|
6198
|
-
|
|
6205
|
+
Ja,
|
|
6199
6206
|
{
|
|
6200
6207
|
index: v,
|
|
6201
|
-
label: fe(
|
|
6208
|
+
label: fe(u, n),
|
|
6202
6209
|
children: ({
|
|
6203
6210
|
rowProps: z,
|
|
6204
6211
|
handle: B
|
|
@@ -6213,16 +6220,16 @@ function Cl({
|
|
|
6213
6220
|
].filter(Boolean).join(" "),
|
|
6214
6221
|
children: [
|
|
6215
6222
|
/* @__PURE__ */ d("h3", { className: "type-title-item ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--foreground)]", children: [
|
|
6216
|
-
fe(
|
|
6223
|
+
fe(u, n),
|
|
6217
6224
|
w ? /* @__PURE__ */ t(Q, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
|
|
6218
6225
|
] }),
|
|
6219
6226
|
/* @__PURE__ */ d(
|
|
6220
|
-
|
|
6227
|
+
Ca,
|
|
6221
6228
|
{
|
|
6222
6229
|
"aria-label": n(
|
|
6223
6230
|
"anamnesis.configEditor.rowActions",
|
|
6224
6231
|
{
|
|
6225
|
-
name: fe(
|
|
6232
|
+
name: fe(u, n)
|
|
6226
6233
|
}
|
|
6227
6234
|
),
|
|
6228
6235
|
children: [
|
|
@@ -6236,12 +6243,12 @@ function Cl({
|
|
|
6236
6243
|
"aria-label": n(
|
|
6237
6244
|
"anamnesis.configEditor.edit",
|
|
6238
6245
|
{
|
|
6239
|
-
name: fe(
|
|
6246
|
+
name: fe(u, n)
|
|
6240
6247
|
}
|
|
6241
6248
|
),
|
|
6242
6249
|
onClick: () => o({
|
|
6243
6250
|
kind: "section",
|
|
6244
|
-
entry:
|
|
6251
|
+
entry: u
|
|
6245
6252
|
})
|
|
6246
6253
|
}
|
|
6247
6254
|
),
|
|
@@ -6250,13 +6257,13 @@ function Cl({
|
|
|
6250
6257
|
{
|
|
6251
6258
|
size: "sm",
|
|
6252
6259
|
intent: "ghost",
|
|
6253
|
-
icon: /* @__PURE__ */ t(
|
|
6260
|
+
icon: /* @__PURE__ */ t(Ta, { "aria-hidden": "true" }),
|
|
6254
6261
|
"aria-label": n(
|
|
6255
6262
|
"anamnesis.configEditor.restore",
|
|
6256
|
-
{ name: fe(
|
|
6263
|
+
{ name: fe(u, n) }
|
|
6257
6264
|
),
|
|
6258
6265
|
onClick: () => f(
|
|
6259
|
-
{ kind: "section", entry:
|
|
6266
|
+
{ kind: "section", entry: u },
|
|
6260
6267
|
void 0
|
|
6261
6268
|
)
|
|
6262
6269
|
}
|
|
@@ -6265,13 +6272,13 @@ function Cl({
|
|
|
6265
6272
|
{
|
|
6266
6273
|
size: "sm",
|
|
6267
6274
|
intent: "ghost",
|
|
6268
|
-
icon: /* @__PURE__ */ t(
|
|
6275
|
+
icon: /* @__PURE__ */ t(Sa, { "aria-hidden": "true" }),
|
|
6269
6276
|
"aria-label": n(
|
|
6270
6277
|
"anamnesis.configEditor.archive",
|
|
6271
|
-
{ name: fe(
|
|
6278
|
+
{ name: fe(u, n) }
|
|
6272
6279
|
),
|
|
6273
6280
|
onClick: () => f(
|
|
6274
|
-
{ kind: "section", entry:
|
|
6281
|
+
{ kind: "section", entry: u },
|
|
6275
6282
|
!1
|
|
6276
6283
|
)
|
|
6277
6284
|
}
|
|
@@ -6285,14 +6292,14 @@ function Cl({
|
|
|
6285
6292
|
P === 0 && !w ? /* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n(
|
|
6286
6293
|
"anamnesis.configEditor.sectionEmptyCapture"
|
|
6287
6294
|
) }) : null,
|
|
6288
|
-
|
|
6289
|
-
|
|
6295
|
+
u.fields.length > 0 ? /* @__PURE__ */ t(
|
|
6296
|
+
Xa,
|
|
6290
6297
|
{
|
|
6291
|
-
count:
|
|
6292
|
-
onReorder: (L, F) => y(
|
|
6298
|
+
count: u.fields.length,
|
|
6299
|
+
onReorder: (L, F) => y(u, L, F),
|
|
6293
6300
|
t: n,
|
|
6294
|
-
children: /* @__PURE__ */ t(Ze, { divider: "divided", children:
|
|
6295
|
-
|
|
6301
|
+
children: /* @__PURE__ */ t(Ze, { divider: "divided", children: u.fields.map((L, F) => /* @__PURE__ */ t(
|
|
6302
|
+
Ja,
|
|
6296
6303
|
{
|
|
6297
6304
|
index: F,
|
|
6298
6305
|
label: pe(L, n),
|
|
@@ -6328,7 +6335,7 @@ function Cl({
|
|
|
6328
6335
|
ut(L, n)
|
|
6329
6336
|
].filter(Boolean).join(" · "),
|
|
6330
6337
|
trailing: /* @__PURE__ */ d(
|
|
6331
|
-
|
|
6338
|
+
Ca,
|
|
6332
6339
|
{
|
|
6333
6340
|
"aria-label": n(
|
|
6334
6341
|
"anamnesis.configEditor.rowActions",
|
|
@@ -6358,7 +6365,7 @@ function Cl({
|
|
|
6358
6365
|
),
|
|
6359
6366
|
onClick: () => o({
|
|
6360
6367
|
kind: "field",
|
|
6361
|
-
sectionKey:
|
|
6368
|
+
sectionKey: u.key,
|
|
6362
6369
|
entry: L
|
|
6363
6370
|
})
|
|
6364
6371
|
}
|
|
@@ -6368,7 +6375,7 @@ function Cl({
|
|
|
6368
6375
|
{
|
|
6369
6376
|
size: "sm",
|
|
6370
6377
|
intent: "ghost",
|
|
6371
|
-
icon: /* @__PURE__ */ t(
|
|
6378
|
+
icon: /* @__PURE__ */ t(Ta, { "aria-hidden": "true" }),
|
|
6372
6379
|
"aria-label": n(
|
|
6373
6380
|
"anamnesis.configEditor.restore",
|
|
6374
6381
|
{
|
|
@@ -6381,7 +6388,7 @@ function Cl({
|
|
|
6381
6388
|
onClick: () => f(
|
|
6382
6389
|
{
|
|
6383
6390
|
kind: "field",
|
|
6384
|
-
sectionKey:
|
|
6391
|
+
sectionKey: u.key,
|
|
6385
6392
|
entry: L
|
|
6386
6393
|
},
|
|
6387
6394
|
void 0
|
|
@@ -6392,7 +6399,7 @@ function Cl({
|
|
|
6392
6399
|
{
|
|
6393
6400
|
size: "sm",
|
|
6394
6401
|
intent: "ghost",
|
|
6395
|
-
icon: /* @__PURE__ */ t(
|
|
6402
|
+
icon: /* @__PURE__ */ t(Sa, { "aria-hidden": "true" }),
|
|
6396
6403
|
"aria-label": n(
|
|
6397
6404
|
"anamnesis.configEditor.archive",
|
|
6398
6405
|
{
|
|
@@ -6405,7 +6412,7 @@ function Cl({
|
|
|
6405
6412
|
onClick: () => f(
|
|
6406
6413
|
{
|
|
6407
6414
|
kind: "field",
|
|
6408
|
-
sectionKey:
|
|
6415
|
+
sectionKey: u.key,
|
|
6409
6416
|
entry: L
|
|
6410
6417
|
},
|
|
6411
6418
|
!1
|
|
@@ -6430,14 +6437,14 @@ function Cl({
|
|
|
6430
6437
|
startIcon: /* @__PURE__ */ t(aa, { "aria-hidden": "true" }),
|
|
6431
6438
|
onClick: () => l({
|
|
6432
6439
|
kind: "field",
|
|
6433
|
-
sectionKey:
|
|
6440
|
+
sectionKey: u.key
|
|
6434
6441
|
}),
|
|
6435
6442
|
children: n("anamnesis.configEditor.addQuestion")
|
|
6436
6443
|
}
|
|
6437
6444
|
) })
|
|
6438
6445
|
] })
|
|
6439
6446
|
},
|
|
6440
|
-
|
|
6447
|
+
u.key
|
|
6441
6448
|
);
|
|
6442
6449
|
}
|
|
6443
6450
|
)
|
|
@@ -6460,22 +6467,22 @@ function Cl({
|
|
|
6460
6467
|
})} · ${n("anamnesis.configEditor.panelArchived", {
|
|
6461
6468
|
count: x - C
|
|
6462
6469
|
})}` }),
|
|
6463
|
-
|
|
6464
|
-
const v =
|
|
6470
|
+
rn.map((u) => {
|
|
6471
|
+
const v = Pe(
|
|
6465
6472
|
e,
|
|
6466
|
-
|
|
6473
|
+
u
|
|
6467
6474
|
);
|
|
6468
6475
|
return v.length === 0 ? null : /* @__PURE__ */ d(
|
|
6469
6476
|
"section",
|
|
6470
6477
|
{
|
|
6471
6478
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
6472
6479
|
children: [
|
|
6473
|
-
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${
|
|
6480
|
+
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${u}`) }),
|
|
6474
6481
|
/* @__PURE__ */ t(
|
|
6475
|
-
|
|
6482
|
+
Xa,
|
|
6476
6483
|
{
|
|
6477
6484
|
count: v.length,
|
|
6478
|
-
onReorder: (w, P) => p(
|
|
6485
|
+
onReorder: (w, P) => p(u, w, P),
|
|
6479
6486
|
t: n,
|
|
6480
6487
|
children: /* @__PURE__ */ t(Ze, { divider: "divided", children: v.map((w, P) => {
|
|
6481
6488
|
const z = [
|
|
@@ -6486,7 +6493,7 @@ function Cl({
|
|
|
6486
6493
|
w.locked ? n("anamnesis.configEditor.lockedHint") : null
|
|
6487
6494
|
].filter(Boolean).join(" · ");
|
|
6488
6495
|
return /* @__PURE__ */ t(
|
|
6489
|
-
|
|
6496
|
+
Ja,
|
|
6490
6497
|
{
|
|
6491
6498
|
index: P,
|
|
6492
6499
|
label: Te(w, n),
|
|
@@ -6511,7 +6518,7 @@ function Cl({
|
|
|
6511
6518
|
] }),
|
|
6512
6519
|
description: z,
|
|
6513
6520
|
trailing: /* @__PURE__ */ d(
|
|
6514
|
-
|
|
6521
|
+
Ca,
|
|
6515
6522
|
{
|
|
6516
6523
|
"aria-label": n(
|
|
6517
6524
|
"anamnesis.configEditor.rowActions",
|
|
@@ -6550,7 +6557,7 @@ function Cl({
|
|
|
6550
6557
|
{
|
|
6551
6558
|
size: "sm",
|
|
6552
6559
|
intent: "ghost",
|
|
6553
|
-
icon: /* @__PURE__ */ t(
|
|
6560
|
+
icon: /* @__PURE__ */ t(Ta, { "aria-hidden": "true" }),
|
|
6554
6561
|
"aria-label": n(
|
|
6555
6562
|
"anamnesis.configEditor.restore",
|
|
6556
6563
|
{
|
|
@@ -6573,7 +6580,7 @@ function Cl({
|
|
|
6573
6580
|
{
|
|
6574
6581
|
size: "sm",
|
|
6575
6582
|
intent: "ghost",
|
|
6576
|
-
icon: /* @__PURE__ */ t(
|
|
6583
|
+
icon: /* @__PURE__ */ t(Sa, { "aria-hidden": "true" }),
|
|
6577
6584
|
"aria-label": n(
|
|
6578
6585
|
"anamnesis.configEditor.archive",
|
|
6579
6586
|
{
|
|
@@ -6605,7 +6612,7 @@ function Cl({
|
|
|
6605
6612
|
)
|
|
6606
6613
|
]
|
|
6607
6614
|
},
|
|
6608
|
-
|
|
6615
|
+
u
|
|
6609
6616
|
);
|
|
6610
6617
|
}),
|
|
6611
6618
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
@@ -6625,12 +6632,12 @@ function Cl({
|
|
|
6625
6632
|
})} · ${n("anamnesis.configEditor.panelArchived", {
|
|
6626
6633
|
count: S - E
|
|
6627
6634
|
})}` }),
|
|
6628
|
-
/* @__PURE__ */ t(Ze, { divider: "divided", children:
|
|
6635
|
+
/* @__PURE__ */ t(Ze, { divider: "divided", children: tn(e).map((u) => {
|
|
6629
6636
|
const v = e.pathologies.some(
|
|
6630
|
-
(P) => P.parentCode ===
|
|
6637
|
+
(P) => P.parentCode === u.code && P.enabled !== !1
|
|
6631
6638
|
), w = [
|
|
6632
|
-
|
|
6633
|
-
code:
|
|
6639
|
+
u.parentCode ? n("anamnesis.configEditor.subCodeOf", {
|
|
6640
|
+
code: u.parentCode
|
|
6634
6641
|
}) : null,
|
|
6635
6642
|
v ? n("anamnesis.configEditor.familyHeading") : null
|
|
6636
6643
|
].filter(Boolean).join(" · ");
|
|
@@ -6638,15 +6645,15 @@ function Cl({
|
|
|
6638
6645
|
Ze.Item,
|
|
6639
6646
|
{
|
|
6640
6647
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6641
|
-
Se(
|
|
6642
|
-
|
|
6648
|
+
Se(u.code, n, u),
|
|
6649
|
+
u.enabled === !1 ? /* @__PURE__ */ t(Q, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
|
|
6643
6650
|
] }),
|
|
6644
6651
|
description: w || void 0,
|
|
6645
6652
|
trailing: /* @__PURE__ */ d(
|
|
6646
|
-
|
|
6653
|
+
Ca,
|
|
6647
6654
|
{
|
|
6648
6655
|
"aria-label": n("anamnesis.configEditor.rowActions", {
|
|
6649
|
-
name: Se(
|
|
6656
|
+
name: Se(u.code, n, u)
|
|
6650
6657
|
}),
|
|
6651
6658
|
children: [
|
|
6652
6659
|
/* @__PURE__ */ t(
|
|
@@ -6657,32 +6664,32 @@ function Cl({
|
|
|
6657
6664
|
icon: /* @__PURE__ */ t(ua, { "aria-hidden": "true" }),
|
|
6658
6665
|
"aria-label": n("anamnesis.configEditor.edit", {
|
|
6659
6666
|
name: Se(
|
|
6660
|
-
|
|
6667
|
+
u.code,
|
|
6661
6668
|
n,
|
|
6662
|
-
|
|
6669
|
+
u
|
|
6663
6670
|
)
|
|
6664
6671
|
}),
|
|
6665
|
-
onClick: () => o({ kind: "pathology", entry:
|
|
6672
|
+
onClick: () => o({ kind: "pathology", entry: u })
|
|
6666
6673
|
}
|
|
6667
6674
|
),
|
|
6668
|
-
|
|
6675
|
+
u.enabled === !1 ? /* @__PURE__ */ t(
|
|
6669
6676
|
re,
|
|
6670
6677
|
{
|
|
6671
6678
|
size: "sm",
|
|
6672
6679
|
intent: "ghost",
|
|
6673
|
-
icon: /* @__PURE__ */ t(
|
|
6680
|
+
icon: /* @__PURE__ */ t(Ta, { "aria-hidden": "true" }),
|
|
6674
6681
|
"aria-label": n(
|
|
6675
6682
|
"anamnesis.configEditor.restore",
|
|
6676
6683
|
{
|
|
6677
6684
|
name: Se(
|
|
6678
|
-
|
|
6685
|
+
u.code,
|
|
6679
6686
|
n,
|
|
6680
|
-
|
|
6687
|
+
u
|
|
6681
6688
|
)
|
|
6682
6689
|
}
|
|
6683
6690
|
),
|
|
6684
6691
|
onClick: () => f(
|
|
6685
|
-
{ kind: "pathology", entry:
|
|
6692
|
+
{ kind: "pathology", entry: u },
|
|
6686
6693
|
void 0
|
|
6687
6694
|
)
|
|
6688
6695
|
}
|
|
@@ -6691,19 +6698,19 @@ function Cl({
|
|
|
6691
6698
|
{
|
|
6692
6699
|
size: "sm",
|
|
6693
6700
|
intent: "ghost",
|
|
6694
|
-
icon: /* @__PURE__ */ t(
|
|
6701
|
+
icon: /* @__PURE__ */ t(Sa, { "aria-hidden": "true" }),
|
|
6695
6702
|
"aria-label": n(
|
|
6696
6703
|
"anamnesis.configEditor.archive",
|
|
6697
6704
|
{
|
|
6698
6705
|
name: Se(
|
|
6699
|
-
|
|
6706
|
+
u.code,
|
|
6700
6707
|
n,
|
|
6701
|
-
|
|
6708
|
+
u
|
|
6702
6709
|
)
|
|
6703
6710
|
}
|
|
6704
6711
|
),
|
|
6705
6712
|
onClick: () => f(
|
|
6706
|
-
{ kind: "pathology", entry:
|
|
6713
|
+
{ kind: "pathology", entry: u },
|
|
6707
6714
|
!1
|
|
6708
6715
|
)
|
|
6709
6716
|
}
|
|
@@ -6712,7 +6719,7 @@ function Cl({
|
|
|
6712
6719
|
}
|
|
6713
6720
|
)
|
|
6714
6721
|
},
|
|
6715
|
-
|
|
6722
|
+
u.code
|
|
6716
6723
|
);
|
|
6717
6724
|
}) }),
|
|
6718
6725
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
@@ -6731,16 +6738,16 @@ function Cl({
|
|
|
6731
6738
|
count: R
|
|
6732
6739
|
}) }),
|
|
6733
6740
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.configEditor.targetsIntro") }),
|
|
6734
|
-
|
|
6735
|
-
const v = Ne(e,
|
|
6741
|
+
rn.map((u) => {
|
|
6742
|
+
const v = Ne(e, u);
|
|
6736
6743
|
return v.length === 0 ? null : /* @__PURE__ */ d(
|
|
6737
6744
|
"section",
|
|
6738
6745
|
{
|
|
6739
6746
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
6740
6747
|
children: [
|
|
6741
|
-
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${
|
|
6748
|
+
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${u}`) }),
|
|
6742
6749
|
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: v.map((w) => /* @__PURE__ */ t(
|
|
6743
|
-
|
|
6750
|
+
pn,
|
|
6744
6751
|
{
|
|
6745
6752
|
label: Te(w, n),
|
|
6746
6753
|
checked: w.goal === !0,
|
|
@@ -6752,7 +6759,7 @@ function Cl({
|
|
|
6752
6759
|
)) })
|
|
6753
6760
|
]
|
|
6754
6761
|
},
|
|
6755
|
-
|
|
6762
|
+
u
|
|
6756
6763
|
);
|
|
6757
6764
|
})
|
|
6758
6765
|
] }) })
|
|
@@ -6823,33 +6830,33 @@ function mr({
|
|
|
6823
6830
|
onConfigChange: i,
|
|
6824
6831
|
t: s
|
|
6825
6832
|
}) {
|
|
6826
|
-
const o = e.entry, r = ur(e, s), [l, c] = $(o.label ?? ""), [
|
|
6833
|
+
const o = e.entry, r = ur(e, s), [l, c] = $(o.label ?? ""), [m, h] = $(
|
|
6827
6834
|
e.kind === "field" ? o.helpText ?? "" : ""
|
|
6828
6835
|
), [g, p] = $(
|
|
6829
6836
|
e.kind === "field" && e.entry.required === !0
|
|
6830
6837
|
), N = e.kind === "field" ? e.entry : null, y = N !== null && (N.type === "choice" || N.type === "multiChoice"), f = y && !or.has(N.key), [C, x] = $(
|
|
6831
6838
|
f ? (N.options ?? []).join(", ") : ""
|
|
6832
6839
|
), A = C.split(",").map((S) => S.trim()).filter(Boolean), T = !f || A.length > 0, E = () => {
|
|
6833
|
-
const S = l.trim(), R = (
|
|
6834
|
-
const v = { ...
|
|
6840
|
+
const S = l.trim(), R = (u) => {
|
|
6841
|
+
const v = { ...u };
|
|
6835
6842
|
return S ? v.label = S : delete v.label, v;
|
|
6836
6843
|
};
|
|
6837
6844
|
if (e.kind === "parameter")
|
|
6838
6845
|
i({
|
|
6839
6846
|
...n,
|
|
6840
6847
|
parameters: n.parameters.map(
|
|
6841
|
-
(
|
|
6848
|
+
(u) => u.key === e.entry.key ? R(u) : u
|
|
6842
6849
|
)
|
|
6843
6850
|
});
|
|
6844
6851
|
else if (e.kind === "section")
|
|
6845
6852
|
i({
|
|
6846
6853
|
...n,
|
|
6847
6854
|
intakeSections: n.intakeSections.map(
|
|
6848
|
-
(
|
|
6855
|
+
(u) => u.key === e.entry.key ? R(u) : u
|
|
6849
6856
|
)
|
|
6850
6857
|
});
|
|
6851
6858
|
else if (e.kind === "field") {
|
|
6852
|
-
const
|
|
6859
|
+
const u = m.trim();
|
|
6853
6860
|
i({
|
|
6854
6861
|
...n,
|
|
6855
6862
|
intakeSections: n.intakeSections.map(
|
|
@@ -6858,7 +6865,7 @@ function mr({
|
|
|
6858
6865
|
fields: v.fields.map((w) => {
|
|
6859
6866
|
if (w.key !== e.entry.key) return w;
|
|
6860
6867
|
const P = R(w);
|
|
6861
|
-
return
|
|
6868
|
+
return u ? P.helpText = u : delete P.helpText, f && (P.options = A), g ? P.required = !0 : delete P.required, P;
|
|
6862
6869
|
})
|
|
6863
6870
|
} : v
|
|
6864
6871
|
)
|
|
@@ -6867,7 +6874,7 @@ function mr({
|
|
|
6867
6874
|
i({
|
|
6868
6875
|
...n,
|
|
6869
6876
|
pathologies: n.pathologies.map(
|
|
6870
|
-
(
|
|
6877
|
+
(u) => u.code === o.code ? R(u) : u
|
|
6871
6878
|
)
|
|
6872
6879
|
});
|
|
6873
6880
|
a();
|
|
@@ -6904,13 +6911,13 @@ function mr({
|
|
|
6904
6911
|
e.kind === "field" ? /* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.helpField"), optional: !0, children: /* @__PURE__ */ t(
|
|
6905
6912
|
ta,
|
|
6906
6913
|
{
|
|
6907
|
-
value:
|
|
6914
|
+
value: m,
|
|
6908
6915
|
onChange: (S) => h(S.target.value),
|
|
6909
6916
|
minRows: 2
|
|
6910
6917
|
}
|
|
6911
6918
|
) }) : null,
|
|
6912
6919
|
e.kind === "field" ? /* @__PURE__ */ t(
|
|
6913
|
-
|
|
6920
|
+
pn,
|
|
6914
6921
|
{
|
|
6915
6922
|
label: s("anamnesis.configEditor.requiredField"),
|
|
6916
6923
|
checked: g,
|
|
@@ -6951,7 +6958,7 @@ function ur(e, a) {
|
|
|
6951
6958
|
label: void 0
|
|
6952
6959
|
});
|
|
6953
6960
|
}
|
|
6954
|
-
function
|
|
6961
|
+
function an(e) {
|
|
6955
6962
|
return e === "choice" || e === "choiceWithText" || e === "multiChoice";
|
|
6956
6963
|
}
|
|
6957
6964
|
function pr({
|
|
@@ -6989,7 +6996,7 @@ function hr({
|
|
|
6989
6996
|
onConfigChange: i,
|
|
6990
6997
|
t: s
|
|
6991
6998
|
}) {
|
|
6992
|
-
const [o, r] = $(""), [l, c] = $(""), [
|
|
6999
|
+
const [o, r] = $(""), [l, c] = $(""), [m, h] = $(""), [g, p] = $(""), [N, y] = $(""), [f, C] = $(""), [x, A] = $("0"), [T, E] = $(""), [S, R] = $(""), [u, v] = $(""), [w, P] = $(""), [z, B] = $(!1), [L, F] = $(""), V = rn.map((D) => ({
|
|
6993
7000
|
value: D,
|
|
6994
7001
|
label: s(`anamnesis.group.${D}`)
|
|
6995
7002
|
})), j = rr.map((D) => ({
|
|
@@ -7001,7 +7008,7 @@ function hr({
|
|
|
7001
7008
|
})), ve = n.pathologies.filter((D) => !D.parentCode && D.enabled !== !1).map((D) => ({
|
|
7002
7009
|
value: D.code,
|
|
7003
7010
|
label: Se(D.code, s, D)
|
|
7004
|
-
})), ce = S.split(",").map((D) => D.trim()).filter(Boolean), de = e.kind === "parameter" ? o.trim() !== "" && l !== "" &&
|
|
7011
|
+
})), ce = S.split(",").map((D) => D.trim()).filter(Boolean), de = e.kind === "parameter" ? o.trim() !== "" && l !== "" && m !== "" : e.kind === "field" ? o.trim() !== "" && T !== "" && (!an(T) || ce.length > 0) : e.kind === "section" ? o.trim() !== "" : o.trim() !== "" && w.trim() !== "" && // A duplicate code would collide with the existing entry
|
|
7005
7012
|
// everywhere codes are matched (lookup, archive, edit) —
|
|
7006
7013
|
// uniqueness is the add gate, matching keyFromLabel's guarantee
|
|
7007
7014
|
// on the other vocabularies.
|
|
@@ -7010,15 +7017,15 @@ function hr({
|
|
|
7010
7017
|
), Y = () => {
|
|
7011
7018
|
const D = o.trim();
|
|
7012
7019
|
if (e.kind === "parameter") {
|
|
7013
|
-
const U = new Set(n.parameters.map((
|
|
7014
|
-
if (
|
|
7015
|
-
const
|
|
7016
|
-
return Number.isFinite(
|
|
7017
|
-
}, me = J(N), le = J(f),
|
|
7018
|
-
key:
|
|
7020
|
+
const U = new Set(n.parameters.map((Le) => Le.key)), J = (Le) => {
|
|
7021
|
+
if (Le.trim() === "") return;
|
|
7022
|
+
const Fe = Number(Le);
|
|
7023
|
+
return Number.isFinite(Fe) ? Fe : void 0;
|
|
7024
|
+
}, me = J(N), le = J(f), Re = {
|
|
7025
|
+
key: Za(D, U),
|
|
7019
7026
|
label: D,
|
|
7020
7027
|
group: l,
|
|
7021
|
-
betterDirection:
|
|
7028
|
+
betterDirection: m,
|
|
7022
7029
|
precision: Number(x),
|
|
7023
7030
|
...g.trim() ? { unit: g.trim() } : {},
|
|
7024
7031
|
...me != null || le != null ? {
|
|
@@ -7028,20 +7035,20 @@ function hr({
|
|
|
7028
7035
|
}
|
|
7029
7036
|
} : {}
|
|
7030
7037
|
};
|
|
7031
|
-
i({ ...n, parameters: [...n.parameters,
|
|
7038
|
+
i({ ...n, parameters: [...n.parameters, Re] });
|
|
7032
7039
|
} else if (e.kind === "field") {
|
|
7033
7040
|
const U = new Set(
|
|
7034
7041
|
n.intakeSections.flatMap(
|
|
7035
|
-
(le) => le.fields.map((
|
|
7042
|
+
(le) => le.fields.map((Re) => Re.key)
|
|
7036
7043
|
)
|
|
7037
7044
|
), J = T === "numberInteger" || T === "numberDecimal" ? "number" : T === "choiceWithText" ? "choice" : T, me = {
|
|
7038
|
-
key:
|
|
7045
|
+
key: Za(D, U),
|
|
7039
7046
|
label: D,
|
|
7040
7047
|
type: J,
|
|
7041
7048
|
...T === "numberDecimal" ? { decimal: !0 } : {},
|
|
7042
7049
|
...T === "choiceWithText" ? { detail: !0 } : {},
|
|
7043
|
-
...
|
|
7044
|
-
...
|
|
7050
|
+
...an(T) ? { options: ce } : {},
|
|
7051
|
+
...u.trim() ? { helpText: u.trim() } : {},
|
|
7045
7052
|
...z ? { required: !0 } : {}
|
|
7046
7053
|
};
|
|
7047
7054
|
i({
|
|
@@ -7054,7 +7061,7 @@ function hr({
|
|
|
7054
7061
|
const U = new Set(
|
|
7055
7062
|
n.intakeSections.map((me) => me.key)
|
|
7056
7063
|
), J = {
|
|
7057
|
-
key:
|
|
7064
|
+
key: Za(D, U),
|
|
7058
7065
|
label: D,
|
|
7059
7066
|
fields: []
|
|
7060
7067
|
};
|
|
@@ -7074,12 +7081,12 @@ function hr({
|
|
|
7074
7081
|
});
|
|
7075
7082
|
}
|
|
7076
7083
|
a();
|
|
7077
|
-
},
|
|
7084
|
+
}, Ie = e.kind === "parameter" ? s("anamnesis.configEditor.addParameterTitle") : e.kind === "field" ? s("anamnesis.configEditor.addQuestionTitle", {
|
|
7078
7085
|
section: gr(n, e.sectionKey, s)
|
|
7079
7086
|
}) : e.kind === "section" ? s("anamnesis.configEditor.addSectionTitle") : s("anamnesis.configEditor.addCodeTitle");
|
|
7080
7087
|
return /* @__PURE__ */ d(X.Content, { size: "sm", children: [
|
|
7081
7088
|
/* @__PURE__ */ d(X.Header, { children: [
|
|
7082
|
-
/* @__PURE__ */ t(X.Title, { children:
|
|
7089
|
+
/* @__PURE__ */ t(X.Title, { children: Ie }),
|
|
7083
7090
|
/* @__PURE__ */ t(X.Description, { children: s("anamnesis.configEditor.addNote") })
|
|
7084
7091
|
] }),
|
|
7085
7092
|
/* @__PURE__ */ d(X.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
@@ -7097,7 +7104,7 @@ function hr({
|
|
|
7097
7104
|
onChange: (D) => r(D.target.value)
|
|
7098
7105
|
}
|
|
7099
7106
|
) }),
|
|
7100
|
-
e.kind === "parameter" ? /* @__PURE__ */ d(
|
|
7107
|
+
e.kind === "parameter" ? /* @__PURE__ */ d(_e, { children: [
|
|
7101
7108
|
/* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.groupField"), required: !0, children: /* @__PURE__ */ t(
|
|
7102
7109
|
Ve,
|
|
7103
7110
|
{
|
|
@@ -7117,7 +7124,7 @@ function hr({
|
|
|
7117
7124
|
Ve,
|
|
7118
7125
|
{
|
|
7119
7126
|
options: j,
|
|
7120
|
-
value:
|
|
7127
|
+
value: m,
|
|
7121
7128
|
onValueChange: (D) => h(D),
|
|
7122
7129
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
7123
7130
|
"aria-label": s("anamnesis.configEditor.directionField")
|
|
@@ -7187,7 +7194,7 @@ function hr({
|
|
|
7187
7194
|
)
|
|
7188
7195
|
] })
|
|
7189
7196
|
] }) : null,
|
|
7190
|
-
e.kind === "field" ? /* @__PURE__ */ d(
|
|
7197
|
+
e.kind === "field" ? /* @__PURE__ */ d(_e, { children: [
|
|
7191
7198
|
/* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.typeField"), required: !0, children: /* @__PURE__ */ t(
|
|
7192
7199
|
Ve,
|
|
7193
7200
|
{
|
|
@@ -7198,7 +7205,7 @@ function hr({
|
|
|
7198
7205
|
"aria-label": s("anamnesis.configEditor.typeField")
|
|
7199
7206
|
}
|
|
7200
7207
|
) }),
|
|
7201
|
-
|
|
7208
|
+
an(T) ? /* @__PURE__ */ t(
|
|
7202
7209
|
q,
|
|
7203
7210
|
{
|
|
7204
7211
|
label: s("anamnesis.configEditor.optionsField"),
|
|
@@ -7216,13 +7223,13 @@ function hr({
|
|
|
7216
7223
|
/* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.helpField"), optional: !0, children: /* @__PURE__ */ t(
|
|
7217
7224
|
ta,
|
|
7218
7225
|
{
|
|
7219
|
-
value:
|
|
7226
|
+
value: u,
|
|
7220
7227
|
onChange: (D) => v(D.target.value),
|
|
7221
7228
|
minRows: 2
|
|
7222
7229
|
}
|
|
7223
7230
|
) }),
|
|
7224
7231
|
/* @__PURE__ */ t(
|
|
7225
|
-
|
|
7232
|
+
pn,
|
|
7226
7233
|
{
|
|
7227
7234
|
label: s("anamnesis.configEditor.requiredField"),
|
|
7228
7235
|
checked: z,
|
|
@@ -7280,7 +7287,7 @@ function Tl(e, a) {
|
|
|
7280
7287
|
// one of them saying nothing the text below it does not.
|
|
7281
7288
|
content: [
|
|
7282
7289
|
`**${a(`anamnesis.visitType.${s.visitType}`)}**`,
|
|
7283
|
-
...
|
|
7290
|
+
...Va(s).map(
|
|
7284
7291
|
(o) => `**${a(`anamnesis.field.${o.field}.label`)}** — ${o.text}`
|
|
7285
7292
|
)
|
|
7286
7293
|
].join(`
|
|
@@ -7306,7 +7313,7 @@ function Tl(e, a) {
|
|
|
7306
7313
|
(s, o) => o.dateIso.localeCompare(s.dateIso)
|
|
7307
7314
|
);
|
|
7308
7315
|
}
|
|
7309
|
-
const
|
|
7316
|
+
const nn = "patterns", fr = {
|
|
7310
7317
|
anamnesis: {
|
|
7311
7318
|
mainLabel: "Anamnesis record — {{mode}}",
|
|
7312
7319
|
mode: { intake: "Intake", compile: "Compile", readOnly: "Read-only" },
|
|
@@ -9124,31 +9131,31 @@ const an = "patterns", fr = {
|
|
|
9124
9131
|
};
|
|
9125
9132
|
function Sl(e) {
|
|
9126
9133
|
for (const [a, n] of Object.entries(xr))
|
|
9127
|
-
e.hasResourceBundle(a,
|
|
9134
|
+
e.hasResourceBundle(a, nn) ? e.addResourceBundle(a, nn, n, !0, !1) : e.addResourceBundle(a, nn, n);
|
|
9128
9135
|
}
|
|
9129
9136
|
export {
|
|
9130
9137
|
wl as A,
|
|
9131
9138
|
$i as L,
|
|
9132
|
-
|
|
9139
|
+
nn as P,
|
|
9133
9140
|
We as S,
|
|
9134
9141
|
Mi as T,
|
|
9135
9142
|
Cl as a,
|
|
9136
|
-
|
|
9137
|
-
|
|
9143
|
+
Pe as b,
|
|
9144
|
+
tn as c,
|
|
9138
9145
|
Ge as d,
|
|
9139
9146
|
Xn as e,
|
|
9140
9147
|
Tl as f,
|
|
9141
9148
|
Vi as g,
|
|
9142
9149
|
Ne as h,
|
|
9143
9150
|
ot as i,
|
|
9144
|
-
|
|
9151
|
+
hn as j,
|
|
9145
9152
|
Mo as k,
|
|
9146
9153
|
zi as l,
|
|
9147
9154
|
Oi as m,
|
|
9148
|
-
|
|
9155
|
+
Za as n,
|
|
9149
9156
|
la as o,
|
|
9150
9157
|
Mt as p,
|
|
9151
9158
|
Sl as r,
|
|
9152
9159
|
Nl as s
|
|
9153
9160
|
};
|
|
9154
|
-
//# sourceMappingURL=anamnesis-i18n-
|
|
9161
|
+
//# sourceMappingURL=anamnesis-i18n-DZcrt8dP.js.map
|