@alfadocs/ui-kit 1.4.3 → 1.4.5
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-23b-dllO.js → anamnesis-i18n-BiZeub0o.js} +1011 -987
- package/dist/agent-catalog.json +1 -1
- package/dist/index.js +115 -113
- package/dist/patterns/anamnesis/anamnesis-compare-panel.d.ts +6 -2
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +6 -1
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +5 -0
- package/dist/patterns/anamnesis/anamnesis.d.ts +4 -1
- package/dist/patterns/anamnesis/index.d.ts +1 -0
- package/dist/patterns/anamnesis/index.js +15 -13
- package/package.json +1 -1
|
@@ -4,10 +4,10 @@ import { B as J } from "./badge-DCOqV9mI.js";
|
|
|
4
4
|
import { B as ne } from "./button-CPGiR_bH.js";
|
|
5
5
|
import { I as de } from "./icon-button-C_kbcd7I.js";
|
|
6
6
|
import { C as ve } 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";
|
|
@@ -18,7 +18,7 @@ import { T as ie } from "./text-input-CUvCb6ST.js";
|
|
|
18
18
|
import { T as sa } from "./timestamp-BV2lC-wV.js";
|
|
19
19
|
import { D as ti } from "./date-picker-Bp64zk2p.js";
|
|
20
20
|
import { A as He } from "./alert-CiJT540z.js";
|
|
21
|
-
import { D as
|
|
21
|
+
import { D as _ } from "./description-list-ClNLdRMy.js";
|
|
22
22
|
import { c as Zn } from "./index-D2ZczOXr.js";
|
|
23
23
|
import { S as ii } from "./sparkline-BmGcEyZO.js";
|
|
24
24
|
import { U as si } from "./user-B12p7bVF.js";
|
|
@@ -31,25 +31,25 @@ import { A as ci } from "./annotation-marker-CsUJGZjQ.js";
|
|
|
31
31
|
import { D as ee } from "./dialog-UbKJCi1X.js";
|
|
32
32
|
import { D as ce } from "./dropdown-menu-DU-Hrf33.js";
|
|
33
33
|
import { S as di } from "./share-2-B49jcW2I.js";
|
|
34
|
-
import { F as
|
|
35
|
-
import { P as
|
|
34
|
+
import { F as ui } from "./file-text-5yv6r2ls.js";
|
|
35
|
+
import { P as mi } from "./printer-rkK0T1gi.js";
|
|
36
36
|
import { F as pi } from "./file-spreadsheet-DmwyfV4O.js";
|
|
37
37
|
import { D as hi } from "./download-CfYKJO_j.js";
|
|
38
38
|
import { C as gi } from "./checkbox-BuZ1u__2.js";
|
|
39
39
|
import { T as fi } from "./time-picker-BPlJWm8w.js";
|
|
40
40
|
import { H as yi } from "./heart-pulse-BCppJyN2.js";
|
|
41
41
|
import { P as fe } from "./popover-Cc0a69sw.js";
|
|
42
|
-
import { P as
|
|
42
|
+
import { P as ma } from "./pencil-B1sKKyuT.js";
|
|
43
43
|
import { useTranslation as vi } from "react-i18next";
|
|
44
44
|
import { e as bi, b as xi } from "./bmi-BxD-tFzU.js";
|
|
45
45
|
import { P as aa } from "./plus-DzMQ_c6b.js";
|
|
46
46
|
import { T as ki } from "./trash-2-uumy3fy1.js";
|
|
47
47
|
import { A as wi, b as Ni, c as Ci, a as Ti } from "./accordion-C11v9ouP.js";
|
|
48
48
|
import { P as Si } from "./progress-CK8otcQ-.js";
|
|
49
|
-
import { c as
|
|
49
|
+
import { c as mn } from "./createLucideIcon-DhHxpK9K.js";
|
|
50
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 Ai } from "./grip-vertical-onSb1JXO.js";
|
|
54
54
|
import { L as Ei } from "./lock-ClAFG1gy.js";
|
|
55
55
|
import { N as Ln } from "./notebook-pen-CO7HoM-W.js";
|
|
@@ -65,7 +65,7 @@ const Di = [
|
|
|
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
|
-
], Ta =
|
|
68
|
+
], Ta = mn("archive-restore", Di);
|
|
69
69
|
/**
|
|
70
70
|
* @license lucide-react v1.22.0 - ISC
|
|
71
71
|
*
|
|
@@ -76,7 +76,7 @@ const Ii = [
|
|
|
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
|
-
], Sa =
|
|
79
|
+
], Sa = mn("archive", Ii);
|
|
80
80
|
/**
|
|
81
81
|
* @license lucide-react v1.22.0 - ISC
|
|
82
82
|
*
|
|
@@ -92,7 +92,7 @@ const Ri = [
|
|
|
92
92
|
}
|
|
93
93
|
],
|
|
94
94
|
["path", { d: "M6 12h16", key: "s4cdu5" }]
|
|
95
|
-
], Li =
|
|
95
|
+
], Li = mn("send-horizontal", Ri), Fi = [
|
|
96
96
|
{
|
|
97
97
|
key: "weight",
|
|
98
98
|
goal: !0,
|
|
@@ -478,31 +478,31 @@ function Pe(e, a) {
|
|
|
478
478
|
function Vi(e) {
|
|
479
479
|
return { ...e, fields: Ye(e.fields) };
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function hn(e) {
|
|
482
482
|
return Ye(la(e).intakeSections).filter(Ia).map((a) => ({
|
|
483
483
|
...a,
|
|
484
484
|
fields: Ye(a.fields.filter(Ia))
|
|
485
485
|
})).filter((a) => a.fields.length > 0);
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function je(e) {
|
|
488
488
|
return Ye(la(e).intakeSections).map(Vi);
|
|
489
489
|
}
|
|
490
490
|
function ot(e) {
|
|
491
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
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 Bi(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",
|
|
@@ -536,21 +536,21 @@ function Hi(e, a) {
|
|
|
536
536
|
function oa(e) {
|
|
537
537
|
return e != null && !Number.isNaN(new Date(e).getTime());
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function ji(e, a) {
|
|
540
540
|
if (!oa(e) || !oa(a)) return null;
|
|
541
541
|
const n = new Date(Fn(e)), i = new Date(Fn(a));
|
|
542
542
|
let s = i.getUTCFullYear() - n.getUTCFullYear();
|
|
543
543
|
const o = i.getUTCMonth() - n.getUTCMonth();
|
|
544
544
|
return (o < 0 || o === 0 && i.getUTCDate() < n.getUTCDate()) && (s -= 1), s < 0 ? null : s;
|
|
545
545
|
}
|
|
546
|
-
const
|
|
546
|
+
const Gi = /* @__PURE__ */ new Set([
|
|
547
547
|
"energy",
|
|
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
|
-
function
|
|
553
|
+
function ua(e) {
|
|
554
554
|
return e != null && Number.isFinite(e) ? e : null;
|
|
555
555
|
}
|
|
556
556
|
function $e(e, a) {
|
|
@@ -558,18 +558,18 @@ function $e(e, a) {
|
|
|
558
558
|
switch (lt(a)) {
|
|
559
559
|
case "computed":
|
|
560
560
|
return Hi(
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
ua(e.anthropometrics.weightKg),
|
|
562
|
+
ua(e.anthropometrics.heightCm)
|
|
563
563
|
);
|
|
564
564
|
case "anthropometric":
|
|
565
|
-
return
|
|
565
|
+
return ua(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
|
-
return i ?
|
|
568
|
+
return i ? ua(i.value) : null;
|
|
569
569
|
}
|
|
570
570
|
case "lab": {
|
|
571
571
|
const i = e.labs.find((s) => s.parameterKey === a.key);
|
|
572
|
-
return i ?
|
|
572
|
+
return i ? ua(i.value) : null;
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
}
|
|
@@ -591,7 +591,7 @@ function _n(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,
|
|
@@ -643,18 +643,18 @@ function ba(e, a, n) {
|
|
|
643
643
|
}
|
|
644
644
|
return { abs: i, direction: s, valence: o };
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function fn(e, a) {
|
|
647
647
|
const n = new Map(
|
|
648
648
|
e.targets.map((i) => [i.parameterKey, i.target])
|
|
649
649
|
);
|
|
650
650
|
return a.map((i) => {
|
|
651
651
|
const s = e.visits.map((r, l) => {
|
|
652
|
-
const c = $e(r, i),
|
|
652
|
+
const c = $e(r, i), u = l > 0 ? $e(e.visits[l - 1], i) : null;
|
|
653
653
|
return {
|
|
654
654
|
visitId: r.id,
|
|
655
655
|
value: c,
|
|
656
656
|
outOfRange: va(c, i.referenceRange),
|
|
657
|
-
delta: l > 0 ? ba(c,
|
|
657
|
+
delta: l > 0 ? ba(c, u, i) : null
|
|
658
658
|
};
|
|
659
659
|
}), o = s.map((r) => r.value);
|
|
660
660
|
return {
|
|
@@ -687,7 +687,7 @@ function Ji(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
|
+
(u) => Yi($e(u, r), l)
|
|
691
691
|
);
|
|
692
692
|
Aa(c) || n.push({
|
|
693
693
|
def: r,
|
|
@@ -706,15 +706,15 @@ function Ji(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((u) => u.id === r)
|
|
710
710
|
);
|
|
711
711
|
Aa(l, Xi) || s.push({ id: r, entries: l });
|
|
712
712
|
}
|
|
713
713
|
const o = [];
|
|
714
714
|
for (const r of Qi) {
|
|
715
715
|
const l = e.map((c) => {
|
|
716
|
-
var
|
|
717
|
-
return ((
|
|
716
|
+
var u;
|
|
717
|
+
return ((u = c[r]) == null ? void 0 : u.trim()) ?? "";
|
|
718
718
|
});
|
|
719
719
|
Aa(l) || o.push({ field: r, values: l });
|
|
720
720
|
}
|
|
@@ -781,7 +781,7 @@ function ss(e) {
|
|
|
781
781
|
const a = (n) => String(n).padStart(2, "0");
|
|
782
782
|
return `${e.getFullYear()}-${a(e.getMonth() + 1)}-${a(e.getDate())}`;
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function ut(e, a, n, i = !1) {
|
|
785
785
|
const s = n("anamnesis.compare.visitOption", {
|
|
786
786
|
index: a + 1,
|
|
787
787
|
visitType: n(`anamnesis.visitType.${e.visitType}`),
|
|
@@ -790,7 +790,7 @@ function mt(e, a, n, i = !1) {
|
|
|
790
790
|
return i ? n("anamnesis.window.optionHasNote", { label: s }) : s;
|
|
791
791
|
}
|
|
792
792
|
function os(e, a, n) {
|
|
793
|
-
const i =
|
|
793
|
+
const i = ji(e, a);
|
|
794
794
|
return i == null ? Ee : n("anamnesis.header.years", { age: i });
|
|
795
795
|
}
|
|
796
796
|
function Oa(e, a) {
|
|
@@ -815,18 +815,18 @@ function rs(e, a) {
|
|
|
815
815
|
const n = he(e, a);
|
|
816
816
|
return e.unit ? `${n} (${e.unit})` : n;
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function mt(e, a) {
|
|
819
819
|
const n = xa(e.helpText);
|
|
820
820
|
return n || a(`anamnesis.field.${e.key}.help`, { defaultValue: "" }) || void 0;
|
|
821
821
|
}
|
|
822
822
|
function ye(e, a) {
|
|
823
823
|
return xa(e.label) ?? a(`anamnesis.section.${e.key}`, { defaultValue: e.key });
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function yn(e, a, n) {
|
|
826
826
|
return xa(n == null ? void 0 : n.label) ?? a($i(e), { defaultValue: e });
|
|
827
827
|
}
|
|
828
828
|
function Se(e, a, n) {
|
|
829
|
-
const i =
|
|
829
|
+
const i = yn(e, a, n);
|
|
830
830
|
return i === e ? e : `${e} — ${i}`;
|
|
831
831
|
}
|
|
832
832
|
function ra(e) {
|
|
@@ -848,7 +848,7 @@ function ra(e) {
|
|
|
848
848
|
return e.description.trim() !== "";
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function vn(e, a, n) {
|
|
852
852
|
switch (e.kind) {
|
|
853
853
|
case "text":
|
|
854
854
|
return e.text.trim() || "—";
|
|
@@ -917,10 +917,10 @@ function ds(e, a, n) {
|
|
|
917
917
|
return !i || !ra(i) ? null : {
|
|
918
918
|
key: e.key,
|
|
919
919
|
label: he(e, n),
|
|
920
|
-
value:
|
|
920
|
+
value: vn(i, e, n)
|
|
921
921
|
};
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function us(e, a, n) {
|
|
924
924
|
var s;
|
|
925
925
|
const i = [];
|
|
926
926
|
for (const o of e) {
|
|
@@ -933,19 +933,19 @@ function ms(e, a, n) {
|
|
|
933
933
|
}
|
|
934
934
|
return i;
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function ms(e, a, n, i) {
|
|
937
937
|
const s = cs(e, n), o = new Map(s.map((c) => [c.key, c])), r = [];
|
|
938
938
|
for (const c of ls) {
|
|
939
|
-
const
|
|
939
|
+
const u = c.kind === "flags" ? us(s, a, i) : c.fieldKeys.map((h) => {
|
|
940
940
|
const g = o.get(h);
|
|
941
941
|
return g ? ds(g, a, i) : null;
|
|
942
942
|
}).filter((h) => h != null);
|
|
943
|
-
|
|
943
|
+
u.length > 0 && r.push({ id: c.id, kind: c.kind, items: u });
|
|
944
944
|
}
|
|
945
945
|
let l = 0;
|
|
946
946
|
for (const c of s) {
|
|
947
|
-
const
|
|
948
|
-
|
|
947
|
+
const u = a(c.key);
|
|
948
|
+
u && ra(u) && (l += 1);
|
|
949
949
|
}
|
|
950
950
|
return { groups: r, answered: l, total: s.length };
|
|
951
951
|
}
|
|
@@ -1034,15 +1034,15 @@ function fs({ group: e, t: a }) {
|
|
|
1034
1034
|
children: [
|
|
1035
1035
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: a(`anamnesis.digest.group.${e.id}`) }),
|
|
1036
1036
|
/* @__PURE__ */ t(
|
|
1037
|
-
|
|
1037
|
+
_,
|
|
1038
1038
|
{
|
|
1039
1039
|
layout: e.kind === "prose" ? "stacked" : "inline",
|
|
1040
1040
|
labelWidth: "fixed",
|
|
1041
1041
|
density: "compact",
|
|
1042
1042
|
divider: "between",
|
|
1043
|
-
children: e.items.map((n) => /* @__PURE__ */ d(
|
|
1044
|
-
/* @__PURE__ */ t(
|
|
1045
|
-
/* @__PURE__ */ t(
|
|
1043
|
+
children: e.items.map((n) => /* @__PURE__ */ d(_.Row, { children: [
|
|
1044
|
+
/* @__PURE__ */ t(_.Term, { children: n.label }),
|
|
1045
|
+
/* @__PURE__ */ t(_.Detail, { children: n.value })
|
|
1046
1046
|
] }, n.key))
|
|
1047
1047
|
}
|
|
1048
1048
|
)
|
|
@@ -1105,7 +1105,7 @@ function qa({ delta: e, def: a, t: n }) {
|
|
|
1105
1105
|
function ft({ t: e }) {
|
|
1106
1106
|
return /* @__PURE__ */ t(J, { variant: "info", size: "sm", leading: /* @__PURE__ */ t(si, { "aria-hidden": "true" }), children: e("anamnesis.origin.fromPatient") });
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1108
|
+
function bn({
|
|
1109
1109
|
flag: e,
|
|
1110
1110
|
t: a,
|
|
1111
1111
|
compact: n = !1
|
|
@@ -1171,12 +1171,12 @@ function bt({
|
|
|
1171
1171
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1172
1172
|
children: [
|
|
1173
1173
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: ye(o, i) }),
|
|
1174
|
-
/* @__PURE__ */ t(
|
|
1174
|
+
/* @__PURE__ */ t(_, { layout: "stacked", density: "compact", divider: "between", children: r.map((l) => {
|
|
1175
1175
|
const c = e.answers[l.key];
|
|
1176
|
-
return c ? /* @__PURE__ */ d(
|
|
1177
|
-
/* @__PURE__ */ t(
|
|
1178
|
-
/* @__PURE__ */ t(
|
|
1179
|
-
/* @__PURE__ */ t("span", { children:
|
|
1176
|
+
return c ? /* @__PURE__ */ d(_.Row, { children: [
|
|
1177
|
+
/* @__PURE__ */ t(_.Term, { children: he(l, i) }),
|
|
1178
|
+
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1179
|
+
/* @__PURE__ */ t("span", { children: vn(c.value, l, i) }),
|
|
1180
1180
|
c.origin === "patient" ? /* @__PURE__ */ t(ft, { t: i }) : null
|
|
1181
1181
|
] }) })
|
|
1182
1182
|
] }, l.key) : null;
|
|
@@ -1213,7 +1213,7 @@ function xs({
|
|
|
1213
1213
|
}
|
|
1214
1214
|
) : null,
|
|
1215
1215
|
/* @__PURE__ */ t(ys, { digest: i, t: r }),
|
|
1216
|
-
/* @__PURE__ */ d(
|
|
1216
|
+
/* @__PURE__ */ d(ln, { variant: "default", children: [
|
|
1217
1217
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: /* @__PURE__ */ d(
|
|
1218
1218
|
Jn,
|
|
1219
1219
|
{
|
|
@@ -1238,7 +1238,7 @@ function xs({
|
|
|
1238
1238
|
}
|
|
1239
1239
|
) }),
|
|
1240
1240
|
/* @__PURE__ */ t(
|
|
1241
|
-
|
|
1241
|
+
cn,
|
|
1242
1242
|
{
|
|
1243
1243
|
"aria-label": r("anamnesis.summary.fullQuestionnaire"),
|
|
1244
1244
|
children: /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-md)]", children: /* @__PURE__ */ t(
|
|
@@ -1271,14 +1271,14 @@ const ks = [
|
|
|
1271
1271
|
"fmd",
|
|
1272
1272
|
"annual"
|
|
1273
1273
|
];
|
|
1274
|
-
function
|
|
1274
|
+
function Ka(e) {
|
|
1275
1275
|
return (e ?? "").trim() !== "";
|
|
1276
1276
|
}
|
|
1277
1277
|
function ws(e) {
|
|
1278
1278
|
const a = e.oncological;
|
|
1279
1279
|
if (!a) return 0;
|
|
1280
1280
|
let n = 0;
|
|
1281
|
-
return
|
|
1281
|
+
return Ka(a.tumourType) && (n += 1), Ka(a.stage) && (n += 1), a.metastases && a.metastases.present !== "unknown" && (n += 1), Ka(a.treatmentStatus) && (n += 1), n;
|
|
1282
1282
|
}
|
|
1283
1283
|
function Ns(e, a) {
|
|
1284
1284
|
const n = new Map(e.labs.map((s) => [s.parameterKey, s.value])), i = [];
|
|
@@ -1328,9 +1328,9 @@ function Ss({
|
|
|
1328
1328
|
visit: e,
|
|
1329
1329
|
t: a
|
|
1330
1330
|
}) {
|
|
1331
|
-
return /* @__PURE__ */ t(
|
|
1332
|
-
/* @__PURE__ */ t(
|
|
1333
|
-
/* @__PURE__ */ t(
|
|
1331
|
+
return /* @__PURE__ */ t(_, { layout: "stacked", divider: "between", children: Va(e).map((n) => /* @__PURE__ */ d(_.Row, { children: [
|
|
1332
|
+
/* @__PURE__ */ t(_.Term, { children: a(`anamnesis.field.${n.field}.label`) }),
|
|
1333
|
+
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ t("span", { className: "ds:block ds:break-words ds:whitespace-pre-line", children: n.text }) })
|
|
1334
1334
|
] }, n.field)) });
|
|
1335
1335
|
}
|
|
1336
1336
|
const As = "ds:mt-[var(--spacing-md)] ds:max-h-[min(20rem,var(--radix-popover-content-available-height))] ds:overflow-y-auto 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)]";
|
|
@@ -1408,7 +1408,7 @@ function Es({
|
|
|
1408
1408
|
)
|
|
1409
1409
|
] });
|
|
1410
1410
|
}
|
|
1411
|
-
const
|
|
1411
|
+
const xn = "ds:min-w-[11rem]", ya = "ds:min-w-[8rem]", kn = "ds:w-[40%] ds:min-w-[14rem]", Ds = "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)]", Is = "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)]", Rs = "ds:sticky ds:end-0 ds:z-[1] ds:bg-[color:var(--card)] ds:shadow-[var(--shadow-chrome-start)]", Ge = "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:align-top";
|
|
1412
1412
|
function Nt({
|
|
1413
1413
|
column: e,
|
|
1414
1414
|
t: a,
|
|
@@ -1449,6 +1449,14 @@ function Nt({
|
|
|
1449
1449
|
}
|
|
1450
1450
|
) : null
|
|
1451
1451
|
] }),
|
|
1452
|
+
l.sourceLabel ? /* @__PURE__ */ t(
|
|
1453
|
+
"span",
|
|
1454
|
+
{
|
|
1455
|
+
"data-testid": `anamnesis-visit-source-${l.id}`,
|
|
1456
|
+
className: "type-meta ds:text-[color:var(--muted-foreground)]",
|
|
1457
|
+
children: l.sourceLabel
|
|
1458
|
+
}
|
|
1459
|
+
) : null,
|
|
1452
1460
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
1453
1461
|
/* @__PURE__ */ t(
|
|
1454
1462
|
J,
|
|
@@ -1474,7 +1482,7 @@ function Ct({
|
|
|
1474
1482
|
trailingLabel: r,
|
|
1475
1483
|
trailingTestId: l,
|
|
1476
1484
|
rows: c,
|
|
1477
|
-
framed:
|
|
1485
|
+
framed: u = !0,
|
|
1478
1486
|
testId: h
|
|
1479
1487
|
}) {
|
|
1480
1488
|
const g = o.length + 2 + (r ? 1 : 0);
|
|
@@ -1487,7 +1495,7 @@ function Ct({
|
|
|
1487
1495
|
"data-testid": h,
|
|
1488
1496
|
className: [
|
|
1489
1497
|
"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)]",
|
|
1490
|
-
|
|
1498
|
+
u ? "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:bg-[color:var(--card)]" : ""
|
|
1491
1499
|
].filter(Boolean).join(" "),
|
|
1492
1500
|
children: /* @__PURE__ */ d("table", { className: "ds:w-full ds:border-collapse", children: [
|
|
1493
1501
|
/* @__PURE__ */ t("caption", { id: e, className: "ds:sr-only", children: a }),
|
|
@@ -1496,7 +1504,7 @@ function Ct({
|
|
|
1496
1504
|
"th",
|
|
1497
1505
|
{
|
|
1498
1506
|
scope: "col",
|
|
1499
|
-
className: `${
|
|
1507
|
+
className: `${xn} ${Ds}`,
|
|
1500
1508
|
children: n
|
|
1501
1509
|
}
|
|
1502
1510
|
),
|
|
@@ -1507,7 +1515,7 @@ function Ct({
|
|
|
1507
1515
|
scope: "col",
|
|
1508
1516
|
"data-testid": s,
|
|
1509
1517
|
className: [
|
|
1510
|
-
|
|
1518
|
+
kn,
|
|
1511
1519
|
"type-label ds:bg-[color:var(--card)]",
|
|
1512
1520
|
wt
|
|
1513
1521
|
].join(" "),
|
|
@@ -1527,7 +1535,7 @@ function Ct({
|
|
|
1527
1535
|
] }) }),
|
|
1528
1536
|
/* @__PURE__ */ t("tbody", { children: c.map(
|
|
1529
1537
|
(p) => {
|
|
1530
|
-
var
|
|
1538
|
+
var k, y;
|
|
1531
1539
|
return p.banner != null ? /* @__PURE__ */ t("tr", { className: "ds:bg-[color:var(--muted)]", children: /* @__PURE__ */ t(
|
|
1532
1540
|
"th",
|
|
1533
1541
|
{
|
|
@@ -1537,7 +1545,7 @@ function Ct({
|
|
|
1537
1545
|
}
|
|
1538
1546
|
) }, p.key) : /* @__PURE__ */ d("tr", { children: [
|
|
1539
1547
|
p.header,
|
|
1540
|
-
(
|
|
1548
|
+
(k = p.cells) == null ? void 0 : k[0],
|
|
1541
1549
|
p.trend,
|
|
1542
1550
|
(y = p.cells) == null ? void 0 : y.slice(1),
|
|
1543
1551
|
p.trailing
|
|
@@ -1551,9 +1559,10 @@ function Ct({
|
|
|
1551
1559
|
const qn = 160, Ls = {
|
|
1552
1560
|
added: "success",
|
|
1553
1561
|
removed: "error",
|
|
1554
|
-
changed: "info"
|
|
1562
|
+
changed: "info",
|
|
1563
|
+
notMeasured: "neutral"
|
|
1555
1564
|
};
|
|
1556
|
-
function
|
|
1565
|
+
function wn(e) {
|
|
1557
1566
|
const a = e[0], n = e[e.length - 1];
|
|
1558
1567
|
return !a && n ? "added" : a && !n ? "removed" : "changed";
|
|
1559
1568
|
}
|
|
@@ -1569,7 +1578,7 @@ function Ps(e, a, n) {
|
|
|
1569
1578
|
function _s(e, { t: a, seriesByKey: n }) {
|
|
1570
1579
|
const i = De(a);
|
|
1571
1580
|
return e.numeric.map((s) => {
|
|
1572
|
-
const
|
|
1581
|
+
const r = s.values.map((l) => l != null).every(Boolean) ? "changed" : "notMeasured";
|
|
1573
1582
|
return {
|
|
1574
1583
|
id: `measurement:${s.def.key}`,
|
|
1575
1584
|
categoryId: "measurement",
|
|
@@ -1591,7 +1600,7 @@ function _s(e, { t: a, seriesByKey: n }) {
|
|
|
1591
1600
|
function $s(e, { t: a, pathologies: n }) {
|
|
1592
1601
|
const i = a("anamnesis.compare.present");
|
|
1593
1602
|
return e.pathologies.map((s) => {
|
|
1594
|
-
const o =
|
|
1603
|
+
const o = wn(s.present);
|
|
1595
1604
|
return {
|
|
1596
1605
|
id: `pathology:${s.code}`,
|
|
1597
1606
|
categoryId: "pathology",
|
|
@@ -1608,7 +1617,7 @@ function zs(e, { t: a }) {
|
|
|
1608
1617
|
var l;
|
|
1609
1618
|
const s = i.entries.filter(
|
|
1610
1619
|
(c) => c != null
|
|
1611
|
-
), o = new Set(s.map((c) => c.name)).size > 1, r =
|
|
1620
|
+
), o = new Set(s.map((c) => c.name)).size > 1, r = wn(i.entries.map((c) => c != null));
|
|
1612
1621
|
return {
|
|
1613
1622
|
id: `therapy:${i.id}`,
|
|
1614
1623
|
categoryId: "therapy",
|
|
@@ -1627,7 +1636,7 @@ function Ms(e, { t: a }) {
|
|
|
1627
1636
|
return e.texts.flatMap((n) => {
|
|
1628
1637
|
const i = n.values.map(Fs);
|
|
1629
1638
|
if (i.every((o) => o === i[0])) return [];
|
|
1630
|
-
const s =
|
|
1639
|
+
const s = wn(i.map((o) => o !== Ee));
|
|
1631
1640
|
return [
|
|
1632
1641
|
{
|
|
1633
1642
|
id: `note:${n.field}`,
|
|
@@ -1664,75 +1673,76 @@ function Bs({
|
|
|
1664
1673
|
pathologies: r,
|
|
1665
1674
|
annotations: l,
|
|
1666
1675
|
onSelectAnnotation: c,
|
|
1667
|
-
t:
|
|
1668
|
-
onClose: h
|
|
1676
|
+
t: u,
|
|
1677
|
+
onClose: h,
|
|
1678
|
+
framed: g = !0
|
|
1669
1679
|
}) {
|
|
1670
|
-
const
|
|
1671
|
-
() => e.map((
|
|
1672
|
-
value:
|
|
1673
|
-
label:
|
|
1680
|
+
const p = Qe(), [k, y] = $(""), f = O(
|
|
1681
|
+
() => e.map((T, F) => ({
|
|
1682
|
+
value: T.id,
|
|
1683
|
+
label: ut(T, F, u)
|
|
1674
1684
|
})),
|
|
1675
|
-
[e,
|
|
1676
|
-
),
|
|
1677
|
-
() => s ? qs(s, { t:
|
|
1678
|
-
[s,
|
|
1679
|
-
),
|
|
1680
|
-
var
|
|
1681
|
-
const
|
|
1685
|
+
[e, u]
|
|
1686
|
+
), C = O(
|
|
1687
|
+
() => s ? qs(s, { t: u, pathologies: r, seriesByKey: o }) : [],
|
|
1688
|
+
[s, u, r, o]
|
|
1689
|
+
), w = O(() => {
|
|
1690
|
+
var m, N;
|
|
1691
|
+
const T = (m = a[0]) == null ? void 0 : m.visit.dateIso, F = (N = a[a.length - 1]) == null ? void 0 : N.visit.dateIso, A = u("anamnesis.compare.selected", {
|
|
1682
1692
|
total: a.length,
|
|
1683
|
-
from:
|
|
1684
|
-
to:
|
|
1693
|
+
from: T ? le(T, u) : "",
|
|
1694
|
+
to: F ? le(F, u) : ""
|
|
1685
1695
|
});
|
|
1686
|
-
return a.length === 2 ? `${
|
|
1687
|
-
}, [a,
|
|
1688
|
-
() => a.map((
|
|
1696
|
+
return a.length === 2 ? `${A} · ${u("anamnesis.compare.minimum")}` : A;
|
|
1697
|
+
}, [a, u]), E = O(
|
|
1698
|
+
() => a.map((T) => /* @__PURE__ */ t(
|
|
1689
1699
|
Nt,
|
|
1690
1700
|
{
|
|
1691
|
-
column:
|
|
1692
|
-
t:
|
|
1701
|
+
column: T,
|
|
1702
|
+
t: u,
|
|
1693
1703
|
emphasised: !0,
|
|
1694
1704
|
withNote: !1
|
|
1695
1705
|
},
|
|
1696
|
-
|
|
1706
|
+
T.key
|
|
1697
1707
|
)),
|
|
1698
|
-
[a,
|
|
1699
|
-
),
|
|
1700
|
-
const
|
|
1701
|
-
let
|
|
1702
|
-
for (const
|
|
1703
|
-
|
|
1704
|
-
key: `group-${
|
|
1705
|
-
banner:
|
|
1706
|
-
})),
|
|
1707
|
-
key:
|
|
1708
|
+
[a, u]
|
|
1709
|
+
), D = O(() => {
|
|
1710
|
+
const T = [];
|
|
1711
|
+
let F = null;
|
|
1712
|
+
for (const A of C)
|
|
1713
|
+
A.categoryId !== F && (F = A.categoryId, T.push({
|
|
1714
|
+
key: `group-${A.categoryId}`,
|
|
1715
|
+
banner: u(`anamnesis.compare.category.${A.categoryId}`)
|
|
1716
|
+
})), T.push({
|
|
1717
|
+
key: A.id,
|
|
1708
1718
|
header: /* @__PURE__ */ t(
|
|
1709
1719
|
"th",
|
|
1710
1720
|
{
|
|
1711
1721
|
scope: "row",
|
|
1712
|
-
className: `${
|
|
1722
|
+
className: `${xn} ds:sticky ds:start-0 ds:z-[1] ds:bg-[color:var(--card)] ds:text-start ds:shadow-[var(--shadow-chrome-end)] ${Ge}`,
|
|
1713
1723
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1714
|
-
/* @__PURE__ */ t("span", { className: "type-label ds:break-words ds:text-[color:var(--foreground)]", children:
|
|
1715
|
-
|
|
1724
|
+
/* @__PURE__ */ t("span", { className: "type-label ds:break-words ds:text-[color:var(--foreground)]", children: A.item }),
|
|
1725
|
+
A.meta ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: A.meta }) : null
|
|
1716
1726
|
] })
|
|
1717
1727
|
}
|
|
1718
1728
|
),
|
|
1719
|
-
cells:
|
|
1720
|
-
var
|
|
1729
|
+
cells: A.values.map((m, N) => {
|
|
1730
|
+
var x;
|
|
1721
1731
|
return /* @__PURE__ */ t(
|
|
1722
1732
|
"td",
|
|
1723
1733
|
{
|
|
1724
|
-
className: `${ya} ${
|
|
1725
|
-
children: /* @__PURE__ */ t("span", { className: "type-body-sm ds:block ds:break-words ds:whitespace-normal ds:text-[color:var(--foreground)]", children:
|
|
1734
|
+
className: `${ya} ${Ge} ds:tabular-nums`,
|
|
1735
|
+
children: /* @__PURE__ */ t("span", { className: "type-body-sm ds:block ds:break-words ds:whitespace-normal ds:text-[color:var(--foreground)]", children: m })
|
|
1726
1736
|
},
|
|
1727
|
-
((
|
|
1737
|
+
((x = a[N]) == null ? void 0 : x.key) ?? N
|
|
1728
1738
|
);
|
|
1729
1739
|
}),
|
|
1730
|
-
trend: /* @__PURE__ */ t("td", { className: `${
|
|
1740
|
+
trend: /* @__PURE__ */ t("td", { className: `${kn} ${Ge}`, children: A.series && A.def ? /* @__PURE__ */ t(
|
|
1731
1741
|
yt,
|
|
1732
1742
|
{
|
|
1733
|
-
series:
|
|
1734
|
-
def:
|
|
1735
|
-
t:
|
|
1743
|
+
series: A.series,
|
|
1744
|
+
def: A.def,
|
|
1745
|
+
t: u,
|
|
1736
1746
|
annotations: l,
|
|
1737
1747
|
onSelectAnnotation: c
|
|
1738
1748
|
}
|
|
@@ -1740,17 +1750,17 @@ function Bs({
|
|
|
1740
1750
|
trailing: /* @__PURE__ */ t(
|
|
1741
1751
|
"td",
|
|
1742
1752
|
{
|
|
1743
|
-
className: `${ya} ${
|
|
1744
|
-
"data-change":
|
|
1745
|
-
children: /* @__PURE__ */ t(Vs, { row:
|
|
1753
|
+
className: `${ya} ${Ge} ${Rs}`,
|
|
1754
|
+
"data-change": A.change,
|
|
1755
|
+
children: /* @__PURE__ */ t(Vs, { row: A, t: u })
|
|
1746
1756
|
}
|
|
1747
1757
|
)
|
|
1748
1758
|
});
|
|
1749
|
-
return
|
|
1750
|
-
}, [
|
|
1759
|
+
return T;
|
|
1760
|
+
}, [C, a, l, c, u]);
|
|
1751
1761
|
return /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1752
1762
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]", children: [
|
|
1753
|
-
/* @__PURE__ */ t("h3", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children:
|
|
1763
|
+
/* @__PURE__ */ t("h3", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: u("anamnesis.compare.panelTitle") }),
|
|
1754
1764
|
h ? /* @__PURE__ */ t(
|
|
1755
1765
|
ne,
|
|
1756
1766
|
{
|
|
@@ -1758,7 +1768,7 @@ function Bs({
|
|
|
1758
1768
|
"data-testid": "anamnesis-compare-close",
|
|
1759
1769
|
startIcon: /* @__PURE__ */ t(li, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
1760
1770
|
onClick: h,
|
|
1761
|
-
children:
|
|
1771
|
+
children: u("anamnesis.compare.stop")
|
|
1762
1772
|
}
|
|
1763
1773
|
) : null
|
|
1764
1774
|
] }),
|
|
@@ -1771,20 +1781,20 @@ function Bs({
|
|
|
1771
1781
|
/* @__PURE__ */ t(
|
|
1772
1782
|
q,
|
|
1773
1783
|
{
|
|
1774
|
-
label:
|
|
1775
|
-
description:
|
|
1784
|
+
label: u("anamnesis.compare.visitsLabel"),
|
|
1785
|
+
description: w,
|
|
1776
1786
|
children: /* @__PURE__ */ t(
|
|
1777
|
-
|
|
1787
|
+
dn,
|
|
1778
1788
|
{
|
|
1779
|
-
options:
|
|
1789
|
+
options: f,
|
|
1780
1790
|
value: [...n],
|
|
1781
1791
|
allowSelectAll: !0,
|
|
1782
|
-
onChange: (
|
|
1783
|
-
if (
|
|
1784
|
-
|
|
1792
|
+
onChange: (T) => {
|
|
1793
|
+
if (T.length >= 2) {
|
|
1794
|
+
y(""), i(T);
|
|
1785
1795
|
return;
|
|
1786
1796
|
}
|
|
1787
|
-
|
|
1797
|
+
y(u("anamnesis.compare.minimum"));
|
|
1788
1798
|
}
|
|
1789
1799
|
}
|
|
1790
1800
|
)
|
|
@@ -1796,7 +1806,7 @@ function Bs({
|
|
|
1796
1806
|
role: "status",
|
|
1797
1807
|
"data-testid": "anamnesis-compare-floor",
|
|
1798
1808
|
className: "ds:sr-only",
|
|
1799
|
-
children:
|
|
1809
|
+
children: k
|
|
1800
1810
|
}
|
|
1801
1811
|
)
|
|
1802
1812
|
]
|
|
@@ -1809,36 +1819,37 @@ function Bs({
|
|
|
1809
1819
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1810
1820
|
"data-testid": "anamnesis-compare-summary",
|
|
1811
1821
|
children: s ? /* @__PURE__ */ d(_e, { children: [
|
|
1812
|
-
/* @__PURE__ */ t("h4", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children:
|
|
1813
|
-
from: le(s.visits[0].dateIso,
|
|
1822
|
+
/* @__PURE__ */ t("h4", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: u("anamnesis.compare.summaryTitle", {
|
|
1823
|
+
from: le(s.visits[0].dateIso, u),
|
|
1814
1824
|
to: le(
|
|
1815
1825
|
s.visits[s.visits.length - 1].dateIso,
|
|
1816
|
-
|
|
1826
|
+
u
|
|
1817
1827
|
)
|
|
1818
1828
|
}) }),
|
|
1819
|
-
|
|
1829
|
+
C.length === 0 ? /* @__PURE__ */ t(
|
|
1820
1830
|
Ue,
|
|
1821
1831
|
{
|
|
1822
1832
|
variant: "no-results",
|
|
1823
1833
|
size: "sm",
|
|
1824
|
-
title:
|
|
1825
|
-
description:
|
|
1834
|
+
title: u("anamnesis.compare.noChanges"),
|
|
1835
|
+
description: u("anamnesis.compare.noChangesDescription")
|
|
1826
1836
|
}
|
|
1827
1837
|
) : /* @__PURE__ */ t(
|
|
1828
1838
|
Ct,
|
|
1829
1839
|
{
|
|
1830
|
-
captionId:
|
|
1831
|
-
caption:
|
|
1832
|
-
identityLabel:
|
|
1833
|
-
trendLabel:
|
|
1834
|
-
trailingLabel:
|
|
1840
|
+
captionId: p,
|
|
1841
|
+
caption: u("anamnesis.compare.tableLabel"),
|
|
1842
|
+
identityLabel: u("anamnesis.compare.column.item"),
|
|
1843
|
+
trendLabel: u("anamnesis.grid.trend"),
|
|
1844
|
+
trailingLabel: u("anamnesis.compare.column.change"),
|
|
1835
1845
|
trailingTestId: "anamnesis-compare-change-column",
|
|
1836
|
-
visitHeaders:
|
|
1837
|
-
rows:
|
|
1838
|
-
testId: "anamnesis-compare-table"
|
|
1846
|
+
visitHeaders: E,
|
|
1847
|
+
rows: D,
|
|
1848
|
+
testId: "anamnesis-compare-table",
|
|
1849
|
+
framed: g
|
|
1839
1850
|
}
|
|
1840
1851
|
)
|
|
1841
|
-
] }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children:
|
|
1852
|
+
] }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: u("anamnesis.compare.sameVisit") })
|
|
1842
1853
|
}
|
|
1843
1854
|
)
|
|
1844
1855
|
] });
|
|
@@ -1855,13 +1866,13 @@ function Us(e, a) {
|
|
|
1855
1866
|
if (n < 1 || !oa(e.dateIso)) return null;
|
|
1856
1867
|
const i = !fa(e.dateIso) || a.some((l) => !fa(l.dateIso)), s = (l) => {
|
|
1857
1868
|
if (!i) return new Date(l).getTime();
|
|
1858
|
-
const [c,
|
|
1859
|
-
return c &&
|
|
1869
|
+
const [c, u, h] = l.slice(0, 10).split("-").map(Number);
|
|
1870
|
+
return c && u && h ? Date.UTC(c, u - 1, h) : Number.NaN;
|
|
1860
1871
|
}, o = a.map((l) => s(l.dateIso)), r = s(e.dateIso);
|
|
1861
1872
|
for (let l = 0; l < n; l += 1) {
|
|
1862
|
-
const c = o[l],
|
|
1863
|
-
if (!(r >= c && r <=
|
|
1864
|
-
const h =
|
|
1873
|
+
const c = o[l], u = o[l + 1];
|
|
1874
|
+
if (!(r >= c && r <= u)) continue;
|
|
1875
|
+
const h = u > c ? (r - c) / (u - c) : 0;
|
|
1865
1876
|
return (l + h) / n;
|
|
1866
1877
|
}
|
|
1867
1878
|
return null;
|
|
@@ -1872,7 +1883,7 @@ function Ks(e, a) {
|
|
|
1872
1883
|
return i == null ? [] : [{ event: n, position: i }];
|
|
1873
1884
|
}).sort((n, i) => n.position - i.position);
|
|
1874
1885
|
}
|
|
1875
|
-
function
|
|
1886
|
+
function sn(e, a) {
|
|
1876
1887
|
return a("anamnesis.event.chip", {
|
|
1877
1888
|
label: a(`anamnesis.event.label.${e.labelKey}`),
|
|
1878
1889
|
date: le(e.dateIso, a)
|
|
@@ -1889,12 +1900,12 @@ function Hs(e, a, n) {
|
|
|
1889
1900
|
return e.filter((i) => a.has(i.event.id)).map(({ event: i, position: s }) => ({
|
|
1890
1901
|
id: i.id,
|
|
1891
1902
|
position: s,
|
|
1892
|
-
label:
|
|
1903
|
+
label: sn(i, n),
|
|
1893
1904
|
shape: Tt[i.category],
|
|
1894
1905
|
tone: St
|
|
1895
1906
|
}));
|
|
1896
1907
|
}
|
|
1897
|
-
function
|
|
1908
|
+
function js({
|
|
1898
1909
|
marks: e,
|
|
1899
1910
|
activeIds: a,
|
|
1900
1911
|
onToggle: n,
|
|
@@ -1939,14 +1950,14 @@ function Gs({
|
|
|
1939
1950
|
}
|
|
1940
1951
|
),
|
|
1941
1952
|
onClick: () => n(l.id),
|
|
1942
|
-
children:
|
|
1953
|
+
children: sn(l, i)
|
|
1943
1954
|
}
|
|
1944
1955
|
),
|
|
1945
1956
|
/* @__PURE__ */ t("span", { id: `${o}-${l.id}`, className: "ds:sr-only", children: At(l, i) })
|
|
1946
1957
|
] }, l.id);
|
|
1947
1958
|
}),
|
|
1948
1959
|
/* @__PURE__ */ t("p", { className: "ds:sr-only", "aria-live": "polite", children: r.length === 0 ? i("anamnesis.event.noneShown") : i("anamnesis.event.shown", {
|
|
1949
|
-
list: r.map(({ event: l }) =>
|
|
1960
|
+
list: r.map(({ event: l }) => sn(l, i)).join(i("anamnesis.event.separator"))
|
|
1950
1961
|
}) })
|
|
1951
1962
|
]
|
|
1952
1963
|
}
|
|
@@ -1979,7 +1990,7 @@ function Et(e) {
|
|
|
1979
1990
|
e.map((a) => a.id)
|
|
1980
1991
|
).columns;
|
|
1981
1992
|
}
|
|
1982
|
-
function
|
|
1993
|
+
function Gs(e) {
|
|
1983
1994
|
return e.length >= 2;
|
|
1984
1995
|
}
|
|
1985
1996
|
const Ws = {
|
|
@@ -2012,28 +2023,28 @@ function Xs({
|
|
|
2012
2023
|
framed: r = !0,
|
|
2013
2024
|
defaultOpenNoteVisitId: l,
|
|
2014
2025
|
onOpenNote: c,
|
|
2015
|
-
visitColumns:
|
|
2026
|
+
visitColumns: u,
|
|
2016
2027
|
capturableKeys: h,
|
|
2017
2028
|
annotations: g,
|
|
2018
2029
|
onSelectAnnotation: p
|
|
2019
2030
|
}) {
|
|
2020
|
-
const
|
|
2021
|
-
let
|
|
2022
|
-
const
|
|
2023
|
-
if (f.forEach((
|
|
2024
|
-
|
|
2025
|
-
key: `group-${
|
|
2026
|
-
banner: n(`anamnesis.group.${
|
|
2031
|
+
const k = Qe(), y = De(n), f = fn(e, a), C = e.visits, w = C.length - 1, E = u ?? Et(C), D = [];
|
|
2032
|
+
let T = null;
|
|
2033
|
+
const F = (m) => (o == null ? void 0 : o.visitIds.has(m)) ?? !1;
|
|
2034
|
+
if (f.forEach((m) => {
|
|
2035
|
+
m.def.group !== T && (T = m.def.group, D.push({
|
|
2036
|
+
key: `group-${m.def.group}`,
|
|
2037
|
+
banner: n(`anamnesis.group.${m.def.group}`)
|
|
2027
2038
|
}));
|
|
2028
|
-
const N = Ys(
|
|
2029
|
-
const { visit: V, index:
|
|
2039
|
+
const N = Ys(m.def.referenceRange, n, y), x = E.map((P, S) => {
|
|
2040
|
+
const { visit: V, index: R } = P, j = m.cells[R] ?? Ws, G = R === w, z = h == null || h.has(m.def.key), U = i && G && z && !m.def.computed, W = !Qs(E, S), Z = o != null && o.changedCells.has(`${V.id}:${m.def.key}`), se = F(V.id);
|
|
2030
2041
|
return /* @__PURE__ */ t(
|
|
2031
2042
|
"td",
|
|
2032
2043
|
{
|
|
2033
2044
|
"data-changed": Z || void 0,
|
|
2034
2045
|
className: [
|
|
2035
2046
|
ya,
|
|
2036
|
-
|
|
2047
|
+
Ge,
|
|
2037
2048
|
"ds:tabular-nums",
|
|
2038
2049
|
se ? "ds:bg-[color:var(--muted)]/40" : "",
|
|
2039
2050
|
// Changed cells carry a fill tint AND a non-colour inline-start
|
|
@@ -2045,55 +2056,55 @@ function Xs({
|
|
|
2045
2056
|
ga,
|
|
2046
2057
|
{
|
|
2047
2058
|
size: "sm",
|
|
2048
|
-
value:
|
|
2049
|
-
mode: (
|
|
2059
|
+
value: j.value,
|
|
2060
|
+
mode: (m.def.precision ?? 0) > 0 ? "decimal" : "integer",
|
|
2050
2061
|
"aria-label": n("anamnesis.grid.editCell", {
|
|
2051
|
-
parameter: ze(
|
|
2062
|
+
parameter: ze(m.def, n)
|
|
2052
2063
|
}),
|
|
2053
|
-
onChange: (X) => s == null ? void 0 : s(V,
|
|
2064
|
+
onChange: (X) => s == null ? void 0 : s(V, m.def, X)
|
|
2054
2065
|
}
|
|
2055
|
-
) : /* @__PURE__ */ t("span", { className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]", children: Ae(
|
|
2066
|
+
) : /* @__PURE__ */ t("span", { className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]", children: Ae(j.value, m.def.precision, y) }),
|
|
2056
2067
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
2057
|
-
|
|
2058
|
-
W ? null : /* @__PURE__ */ t(qa, { delta:
|
|
2068
|
+
j.outOfRange ? /* @__PURE__ */ t(bn, { flag: j.outOfRange, t: n, compact: !0 }) : null,
|
|
2069
|
+
W ? null : /* @__PURE__ */ t(qa, { delta: j.delta, def: m.def, t: n }),
|
|
2059
2070
|
Z ? /* @__PURE__ */ t("span", { className: "ds:sr-only", children: n("anamnesis.compare.changedCell") }) : null
|
|
2060
2071
|
] })
|
|
2061
2072
|
] })
|
|
2062
2073
|
},
|
|
2063
|
-
|
|
2074
|
+
P.key
|
|
2064
2075
|
);
|
|
2065
2076
|
});
|
|
2066
|
-
|
|
2067
|
-
key:
|
|
2077
|
+
D.push({
|
|
2078
|
+
key: m.def.key,
|
|
2068
2079
|
// Sticky parameter column (inline-start). The shell splices the trend
|
|
2069
2080
|
// in after the first value cell — the order is not decided here.
|
|
2070
2081
|
header: /* @__PURE__ */ t(
|
|
2071
2082
|
"th",
|
|
2072
2083
|
{
|
|
2073
2084
|
scope: "row",
|
|
2074
|
-
className: `${
|
|
2085
|
+
className: `${xn} ds:sticky ds:start-0 ds:z-[1] ds:bg-[color:var(--card)] ds:text-start ds:shadow-[var(--shadow-chrome-end)] ${Ge}`,
|
|
2075
2086
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
2076
|
-
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: ze(
|
|
2087
|
+
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: ze(m.def, n) }),
|
|
2077
2088
|
/* @__PURE__ */ d("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: [
|
|
2078
|
-
|
|
2089
|
+
m.def.unit,
|
|
2079
2090
|
N ? /* @__PURE__ */ d(_e, { children: [
|
|
2080
2091
|
" · ",
|
|
2081
2092
|
N
|
|
2082
2093
|
] }) : null
|
|
2083
2094
|
] }),
|
|
2084
|
-
|
|
2085
|
-
value: Ae(
|
|
2086
|
-
unit:
|
|
2095
|
+
m.target != null ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.grid.target", {
|
|
2096
|
+
value: Ae(m.target, m.def.precision, y),
|
|
2097
|
+
unit: m.def.unit ?? ""
|
|
2087
2098
|
}) }) : null
|
|
2088
2099
|
] })
|
|
2089
2100
|
}
|
|
2090
2101
|
),
|
|
2091
|
-
cells:
|
|
2092
|
-
trend: /* @__PURE__ */ t("td", { className: `${
|
|
2102
|
+
cells: x,
|
|
2103
|
+
trend: /* @__PURE__ */ t("td", { className: `${kn} ${Ge}`, children: /* @__PURE__ */ t(
|
|
2093
2104
|
yt,
|
|
2094
2105
|
{
|
|
2095
|
-
series:
|
|
2096
|
-
def:
|
|
2106
|
+
series: m.series,
|
|
2107
|
+
def: m.def,
|
|
2097
2108
|
t: n,
|
|
2098
2109
|
annotations: g,
|
|
2099
2110
|
onSelectAnnotation: p
|
|
@@ -2117,28 +2128,28 @@ function Xs({
|
|
|
2117
2128
|
)
|
|
2118
2129
|
}
|
|
2119
2130
|
);
|
|
2120
|
-
const
|
|
2131
|
+
const A = E.map((m) => /* @__PURE__ */ t(
|
|
2121
2132
|
Nt,
|
|
2122
2133
|
{
|
|
2123
|
-
column:
|
|
2134
|
+
column: m,
|
|
2124
2135
|
t: n,
|
|
2125
|
-
emphasised:
|
|
2126
|
-
editable: i &&
|
|
2136
|
+
emphasised: F(m.visit.id),
|
|
2137
|
+
editable: i && m.index === w,
|
|
2127
2138
|
defaultOpenNoteVisitId: l,
|
|
2128
2139
|
onOpenNote: c
|
|
2129
2140
|
},
|
|
2130
|
-
|
|
2141
|
+
m.key
|
|
2131
2142
|
));
|
|
2132
2143
|
return /* @__PURE__ */ t(
|
|
2133
2144
|
Ct,
|
|
2134
2145
|
{
|
|
2135
|
-
captionId:
|
|
2146
|
+
captionId: k,
|
|
2136
2147
|
caption: n("anamnesis.grid.caption"),
|
|
2137
2148
|
identityLabel: n("anamnesis.grid.parameter"),
|
|
2138
2149
|
trendLabel: n("anamnesis.grid.trend"),
|
|
2139
2150
|
trendTestId: "anamnesis-grid-trend",
|
|
2140
|
-
visitHeaders:
|
|
2141
|
-
rows:
|
|
2151
|
+
visitHeaders: A,
|
|
2152
|
+
rows: D,
|
|
2142
2153
|
framed: r
|
|
2143
2154
|
}
|
|
2144
2155
|
);
|
|
@@ -2153,42 +2164,42 @@ function Nn({
|
|
|
2153
2164
|
defaultCompareOpen: r = !1,
|
|
2154
2165
|
defaultVisitIds: l,
|
|
2155
2166
|
defaultCompareVisitIds: c,
|
|
2156
|
-
defaultEventIds:
|
|
2167
|
+
defaultEventIds: u,
|
|
2157
2168
|
onVisitSelectionChange: h,
|
|
2158
2169
|
onOpenNote: g
|
|
2159
2170
|
}) {
|
|
2160
|
-
const { visits: p } = e,
|
|
2171
|
+
const { visits: p } = e, k = p.length >= 2, y = Qe(), f = Qe(), C = O(() => Pe(o), [o]), w = O(
|
|
2161
2172
|
() => new Set(Ne(o).map((M) => M.key)),
|
|
2162
2173
|
[o]
|
|
2163
|
-
),
|
|
2174
|
+
), E = O(() => _a(o), [o]), [D, T] = $(r), [F, A] = $(""), m = we(null), N = we(null), x = we(!1);
|
|
2164
2175
|
ia(() => {
|
|
2165
2176
|
var M;
|
|
2166
|
-
|
|
2167
|
-
}, [
|
|
2168
|
-
const
|
|
2177
|
+
x.current && D && ((M = m.current) == null || M.scrollIntoView({ block: "start" })), x.current = !0;
|
|
2178
|
+
}, [D]);
|
|
2179
|
+
const P = () => {
|
|
2169
2180
|
var M;
|
|
2170
|
-
|
|
2171
|
-
}, [
|
|
2181
|
+
T(!1), (M = N.current) == null || M.focus();
|
|
2182
|
+
}, [S, V] = $(
|
|
2172
2183
|
() => c ? [...c] : pa(p)
|
|
2173
|
-
),
|
|
2174
|
-
const M =
|
|
2184
|
+
), R = O(() => {
|
|
2185
|
+
const M = S.filter(
|
|
2175
2186
|
(H) => p.some((Q) => Q.id === H)
|
|
2176
2187
|
);
|
|
2177
2188
|
return M.length >= 2 ? M : pa(p);
|
|
2178
|
-
}, [
|
|
2179
|
-
() => Ra(p,
|
|
2180
|
-
[p,
|
|
2181
|
-
),
|
|
2182
|
-
|
|
2189
|
+
}, [S, p]), j = O(
|
|
2190
|
+
() => Ra(p, R).columns,
|
|
2191
|
+
[p, R]
|
|
2192
|
+
), G = O(() => D ? Ji(
|
|
2193
|
+
j.map((M) => M.visit),
|
|
2183
2194
|
C
|
|
2184
|
-
) : null, [
|
|
2195
|
+
) : null, [D, j, C]), z = O(() => {
|
|
2185
2196
|
const M = /* @__PURE__ */ new Map();
|
|
2186
|
-
for (const H of
|
|
2197
|
+
for (const H of fn(e, C))
|
|
2187
2198
|
M.set(H.def.key, H.series);
|
|
2188
2199
|
return M;
|
|
2189
2200
|
}, [e, C]), [U, W] = $(
|
|
2190
2201
|
() => l ? [...l] : pa(p)
|
|
2191
|
-
), Z =
|
|
2202
|
+
), Z = Gs(p), se = O(() => {
|
|
2192
2203
|
const M = U.filter((H) => p.some((Q) => Q.id === H));
|
|
2193
2204
|
return M.length > 0 ? M : pa(p);
|
|
2194
2205
|
}, [U, p]), X = O(
|
|
@@ -2196,9 +2207,9 @@ function Nn({
|
|
|
2196
2207
|
// A compared visit is always a column, so compare always marks its
|
|
2197
2208
|
// columns in the grid — comparing a visit the picker left out brings
|
|
2198
2209
|
// it back on screen rather than marking nothing.
|
|
2199
|
-
alsoShowIds:
|
|
2210
|
+
alsoShowIds: D ? R : []
|
|
2200
2211
|
}),
|
|
2201
|
-
[p, se,
|
|
2212
|
+
[p, se, D, R]
|
|
2202
2213
|
), Ie = O(
|
|
2203
2214
|
() => X.columns.map((M) => M.visit.id),
|
|
2204
2215
|
[X]
|
|
@@ -2209,7 +2220,7 @@ function Nn({
|
|
|
2209
2220
|
const I = O(
|
|
2210
2221
|
() => p.map((M, H) => ({
|
|
2211
2222
|
value: M.id,
|
|
2212
|
-
label:
|
|
2223
|
+
label: ut(M, H, a, kt(M))
|
|
2213
2224
|
})),
|
|
2214
2225
|
[p, a]
|
|
2215
2226
|
), B = O(() => {
|
|
@@ -2227,32 +2238,32 @@ function Nn({
|
|
|
2227
2238
|
}, [X, se, a]), ae = O(
|
|
2228
2239
|
() => Ks(e.events, p),
|
|
2229
2240
|
[e.events, p]
|
|
2230
|
-
), [
|
|
2231
|
-
() =>
|
|
2241
|
+
), [me, ue] = $(
|
|
2242
|
+
() => u ? [...u] : []
|
|
2232
2243
|
), Re = O(() => {
|
|
2233
2244
|
const M = new Set(ae.map((H) => H.event.id));
|
|
2234
|
-
return new Set(
|
|
2235
|
-
}, [
|
|
2245
|
+
return new Set(me.filter((H) => M.has(H)));
|
|
2246
|
+
}, [me, ae]), Le = O(
|
|
2236
2247
|
() => Hs(ae, Re, a),
|
|
2237
2248
|
[ae, Re, a]
|
|
2238
|
-
), Fe = (M) =>
|
|
2249
|
+
), Fe = (M) => ue(
|
|
2239
2250
|
(H) => H.includes(M) ? H.filter((Q) => Q !== M) : [...H, M]
|
|
2240
2251
|
), ka = O(
|
|
2241
2252
|
() => g ? (M) => g({ kind: "event", eventId: M }) : void 0,
|
|
2242
2253
|
[g]
|
|
2243
2254
|
), da = O(() => {
|
|
2244
|
-
if (!
|
|
2255
|
+
if (!G) return null;
|
|
2245
2256
|
const M = /* @__PURE__ */ new Set();
|
|
2246
|
-
for (const H of
|
|
2257
|
+
for (const H of G.numeric)
|
|
2247
2258
|
H.values.forEach((Q, be) => {
|
|
2248
2259
|
const Xe = be === 0 ? H.values[1] : H.values[be - 1];
|
|
2249
|
-
Q !== Xe && M.add(`${
|
|
2260
|
+
Q !== Xe && M.add(`${G.visits[be].id}:${H.def.key}`);
|
|
2250
2261
|
});
|
|
2251
2262
|
return {
|
|
2252
|
-
visitIds: new Set(
|
|
2263
|
+
visitIds: new Set(G.visits.map((H) => H.id)),
|
|
2253
2264
|
changedCells: M
|
|
2254
2265
|
};
|
|
2255
|
-
}, [
|
|
2266
|
+
}, [G]);
|
|
2256
2267
|
return p.length === 0 ? /* @__PURE__ */ t("div", { className: "ds:w-full", "data-testid": "anamnesis-evolution-empty", children: /* @__PURE__ */ t(
|
|
2257
2268
|
Ue,
|
|
2258
2269
|
{
|
|
@@ -2262,7 +2273,7 @@ function Nn({
|
|
|
2262
2273
|
description: a("anamnesis.empty.noVisits.description")
|
|
2263
2274
|
}
|
|
2264
2275
|
) }) : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2265
|
-
Z ||
|
|
2276
|
+
Z || k ? /* @__PURE__ */ d(
|
|
2266
2277
|
"div",
|
|
2267
2278
|
{
|
|
2268
2279
|
"data-testid": "anamnesis-evolution-toolbar",
|
|
@@ -2280,17 +2291,17 @@ function Nn({
|
|
|
2280
2291
|
label: a("anamnesis.window.label"),
|
|
2281
2292
|
description: B,
|
|
2282
2293
|
children: /* @__PURE__ */ t(
|
|
2283
|
-
|
|
2294
|
+
dn,
|
|
2284
2295
|
{
|
|
2285
2296
|
options: I,
|
|
2286
2297
|
value: se,
|
|
2287
2298
|
allowSelectAll: !0,
|
|
2288
2299
|
onChange: (M) => {
|
|
2289
2300
|
if (M.length > 0) {
|
|
2290
|
-
|
|
2301
|
+
A(""), W(M);
|
|
2291
2302
|
return;
|
|
2292
2303
|
}
|
|
2293
|
-
|
|
2304
|
+
A(a("anamnesis.window.minimum"));
|
|
2294
2305
|
}
|
|
2295
2306
|
}
|
|
2296
2307
|
)
|
|
@@ -2302,13 +2313,13 @@ function Nn({
|
|
|
2302
2313
|
role: "status",
|
|
2303
2314
|
"data-testid": "anamnesis-window-floor",
|
|
2304
2315
|
className: "ds:sr-only",
|
|
2305
|
-
children:
|
|
2316
|
+
children: F
|
|
2306
2317
|
}
|
|
2307
2318
|
)
|
|
2308
2319
|
]
|
|
2309
2320
|
}
|
|
2310
2321
|
) : null,
|
|
2311
|
-
|
|
2322
|
+
k ? (
|
|
2312
2323
|
// The picker beside it is a FormField — label, control, then
|
|
2313
2324
|
// description. A bare button in an `items-start` row top-aligns
|
|
2314
2325
|
// with that LABEL and reads as floating above the control it acts
|
|
@@ -2322,13 +2333,13 @@ function Nn({
|
|
|
2322
2333
|
{
|
|
2323
2334
|
ref: N,
|
|
2324
2335
|
id: f,
|
|
2325
|
-
intent:
|
|
2336
|
+
intent: D ? "primary" : "outline",
|
|
2326
2337
|
"data-testid": "anamnesis-compare-toggle",
|
|
2327
|
-
"aria-pressed":
|
|
2328
|
-
"aria-expanded":
|
|
2338
|
+
"aria-pressed": D,
|
|
2339
|
+
"aria-expanded": D,
|
|
2329
2340
|
"aria-controls": y,
|
|
2330
|
-
onClick: () =>
|
|
2331
|
-
children: a(
|
|
2341
|
+
onClick: () => T((M) => !M),
|
|
2342
|
+
children: a(D ? "anamnesis.compare.stop" : "anamnesis.compare.start")
|
|
2332
2343
|
}
|
|
2333
2344
|
)
|
|
2334
2345
|
] })
|
|
@@ -2337,7 +2348,7 @@ function Nn({
|
|
|
2337
2348
|
}
|
|
2338
2349
|
) : null,
|
|
2339
2350
|
/* @__PURE__ */ t(
|
|
2340
|
-
|
|
2351
|
+
js,
|
|
2341
2352
|
{
|
|
2342
2353
|
marks: ae,
|
|
2343
2354
|
activeIds: Re,
|
|
@@ -2362,10 +2373,10 @@ function Nn({
|
|
|
2362
2373
|
onOpenNote: g
|
|
2363
2374
|
}
|
|
2364
2375
|
),
|
|
2365
|
-
|
|
2366
|
-
|
|
2376
|
+
k ? /* @__PURE__ */ t(ln, { open: D, onOpenChange: T, children: /* @__PURE__ */ t(
|
|
2377
|
+
cn,
|
|
2367
2378
|
{
|
|
2368
|
-
ref:
|
|
2379
|
+
ref: m,
|
|
2369
2380
|
id: y,
|
|
2370
2381
|
"aria-labelledby": f,
|
|
2371
2382
|
"data-testid": "anamnesis-compare-panel",
|
|
@@ -2374,16 +2385,17 @@ function Nn({
|
|
|
2374
2385
|
Bs,
|
|
2375
2386
|
{
|
|
2376
2387
|
visits: p,
|
|
2377
|
-
columns:
|
|
2378
|
-
selectedIds:
|
|
2388
|
+
columns: j,
|
|
2389
|
+
selectedIds: R,
|
|
2379
2390
|
onSelectionChange: V,
|
|
2380
|
-
diff:
|
|
2391
|
+
diff: G,
|
|
2381
2392
|
seriesByKey: z,
|
|
2382
|
-
pathologies:
|
|
2393
|
+
pathologies: E,
|
|
2383
2394
|
annotations: Le,
|
|
2384
2395
|
onSelectAnnotation: ka,
|
|
2385
2396
|
t: a,
|
|
2386
|
-
onClose:
|
|
2397
|
+
onClose: P,
|
|
2398
|
+
framed: s
|
|
2387
2399
|
}
|
|
2388
2400
|
)
|
|
2389
2401
|
}
|
|
@@ -2576,7 +2588,7 @@ function eo(e, a) {
|
|
|
2576
2588
|
const n = Zs.get(e);
|
|
2577
2589
|
return n ? n.audiences.includes(a) : !1;
|
|
2578
2590
|
}
|
|
2579
|
-
const
|
|
2591
|
+
const Ba = "export.tabDocument";
|
|
2580
2592
|
function te(e, a) {
|
|
2581
2593
|
return eo(a, e.audience) ? !0 : (e.withheld.add(a), !1);
|
|
2582
2594
|
}
|
|
@@ -2665,7 +2677,7 @@ function Sn(e, a, n) {
|
|
|
2665
2677
|
meta: [],
|
|
2666
2678
|
tables: [],
|
|
2667
2679
|
footnotes: [n("anamnesis.export.withheld")],
|
|
2668
|
-
withheld: [
|
|
2680
|
+
withheld: [Ba],
|
|
2669
2681
|
locale: De(n)
|
|
2670
2682
|
};
|
|
2671
2683
|
}
|
|
@@ -2680,30 +2692,30 @@ function Pa(e, a, n, i = []) {
|
|
|
2680
2692
|
};
|
|
2681
2693
|
}
|
|
2682
2694
|
function to(e) {
|
|
2683
|
-
var
|
|
2695
|
+
var k;
|
|
2684
2696
|
const { record: a, audience: n, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = { audience: n, withheld: /* @__PURE__ */ new Set() };
|
|
2685
|
-
if (!te(r,
|
|
2697
|
+
if (!te(r, Ba))
|
|
2686
2698
|
return Sn("summary", n, i);
|
|
2687
|
-
const { meta: l, patientName: c } = Tn(a, r, i, o),
|
|
2699
|
+
const { meta: l, patientName: c } = Tn(a, r, i, o), u = [], h = [], g = a.intake;
|
|
2688
2700
|
if (te(r, "intake.answers") && g) {
|
|
2689
2701
|
const y = [];
|
|
2690
|
-
for (const f of
|
|
2702
|
+
for (const f of je(s)) {
|
|
2691
2703
|
const C = f.fields.filter((w) => ca(w, a.patient.sex)).filter((w) => g.answers[w.key]);
|
|
2692
2704
|
if (C.length !== 0) {
|
|
2693
2705
|
y.push(It(ye(f, i)));
|
|
2694
2706
|
for (const w of C) {
|
|
2695
|
-
const
|
|
2696
|
-
|
|
2707
|
+
const E = g.answers[w.key];
|
|
2708
|
+
E && y.push({
|
|
2697
2709
|
cells: [
|
|
2698
2710
|
he(w, i),
|
|
2699
|
-
re(
|
|
2700
|
-
i(`anamnesis.export.source.${
|
|
2711
|
+
re(vn(E.value, w, i)),
|
|
2712
|
+
i(`anamnesis.export.source.${E.origin}`)
|
|
2701
2713
|
]
|
|
2702
2714
|
});
|
|
2703
2715
|
}
|
|
2704
2716
|
}
|
|
2705
2717
|
}
|
|
2706
|
-
|
|
2718
|
+
u.push({
|
|
2707
2719
|
id: "questionnaire",
|
|
2708
2720
|
title: i("anamnesis.section.patientIntake"),
|
|
2709
2721
|
columns: [
|
|
@@ -2715,7 +2727,7 @@ function to(e) {
|
|
|
2715
2727
|
emptyText: i("anamnesis.summary.noAnswers")
|
|
2716
2728
|
});
|
|
2717
2729
|
} else g || h.push(i("anamnesis.compile.noIntake"));
|
|
2718
|
-
const p = Be(g == null ? void 0 : g.submittedAtIso) ?? Be((
|
|
2730
|
+
const p = Be(g == null ? void 0 : g.submittedAtIso) ?? Be((k = Ma(a)) == null ? void 0 : k.dateIso) ?? Be(o);
|
|
2719
2731
|
return Pa(
|
|
2720
2732
|
{
|
|
2721
2733
|
tab: "summary",
|
|
@@ -2730,14 +2742,14 @@ function to(e) {
|
|
|
2730
2742
|
title: Fa("summary", c, i),
|
|
2731
2743
|
patientName: c,
|
|
2732
2744
|
meta: l,
|
|
2733
|
-
tables:
|
|
2745
|
+
tables: u
|
|
2734
2746
|
},
|
|
2735
2747
|
r,
|
|
2736
2748
|
i,
|
|
2737
2749
|
h
|
|
2738
2750
|
);
|
|
2739
2751
|
}
|
|
2740
|
-
function
|
|
2752
|
+
function Ha(e, a, n, i, s, o, r) {
|
|
2741
2753
|
const l = [];
|
|
2742
2754
|
let c = !1;
|
|
2743
2755
|
for (const h of n) {
|
|
@@ -2751,15 +2763,15 @@ function Ga(e, a, n, i, s, o, r) {
|
|
|
2751
2763
|
r && (p.push(Rt(h, o)), p.push(Lt(va(g, h.referenceRange), o))), l.push({ cells: p, precision: h.precision });
|
|
2752
2764
|
}
|
|
2753
2765
|
if (!c) return null;
|
|
2754
|
-
const
|
|
2766
|
+
const u = [
|
|
2755
2767
|
{ key: "parameter", header: o("anamnesis.grid.parameter") },
|
|
2756
2768
|
{ key: "value", header: o("anamnesis.export.column.value"), numeric: !0 },
|
|
2757
2769
|
{ key: "unit", header: o("anamnesis.export.column.unit") }
|
|
2758
2770
|
];
|
|
2759
|
-
return r && (
|
|
2771
|
+
return r && (u.push({
|
|
2760
2772
|
key: "referenceRange",
|
|
2761
2773
|
header: o("anamnesis.export.column.referenceRange")
|
|
2762
|
-
}),
|
|
2774
|
+
}), u.push({ key: "flag", header: o("anamnesis.export.column.flag") })), { id: e, title: a, columns: u, rows: l, emptyText: o("anamnesis.export.none") };
|
|
2763
2775
|
}
|
|
2764
2776
|
function ja(e, a, n, i) {
|
|
2765
2777
|
return {
|
|
@@ -2775,10 +2787,10 @@ function ja(e, a, n, i) {
|
|
|
2775
2787
|
}
|
|
2776
2788
|
function io(e) {
|
|
2777
2789
|
const { record: a, audience: n, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = { audience: n, withheld: /* @__PURE__ */ new Set() };
|
|
2778
|
-
if (!te(r,
|
|
2790
|
+
if (!te(r, Ba))
|
|
2779
2791
|
return Sn("compile", n, i);
|
|
2780
|
-
const { meta: l, patientName: c } = Tn(a, r, i, o),
|
|
2781
|
-
if (!
|
|
2792
|
+
const { meta: l, patientName: c } = Tn(a, r, i, o), u = Ma(a), h = [], g = [];
|
|
2793
|
+
if (!u)
|
|
2782
2794
|
return g.push(i("anamnesis.export.none")), Pa(
|
|
2783
2795
|
{
|
|
2784
2796
|
tab: "compile",
|
|
@@ -2801,42 +2813,42 @@ function io(e) {
|
|
|
2801
2813
|
);
|
|
2802
2814
|
te(r, "visit.date") && l.push({
|
|
2803
2815
|
label: i("anamnesis.header.visitDate"),
|
|
2804
|
-
value: le(
|
|
2816
|
+
value: le(u.dateIso, i)
|
|
2805
2817
|
});
|
|
2806
2818
|
const p = [];
|
|
2807
2819
|
te(r, "visit.type") && p.push({
|
|
2808
2820
|
cells: [
|
|
2809
2821
|
i("anamnesis.field.visitType.label"),
|
|
2810
|
-
i(`anamnesis.visitType.${
|
|
2822
|
+
i(`anamnesis.visitType.${u.visitType}`)
|
|
2811
2823
|
]
|
|
2812
2824
|
}), te(r, "visit.date") && p.push({
|
|
2813
2825
|
cells: [
|
|
2814
2826
|
i("anamnesis.header.visitDate"),
|
|
2815
|
-
le(
|
|
2827
|
+
le(u.dateIso, i)
|
|
2816
2828
|
]
|
|
2817
|
-
}), te(r, "visit.practitioner") &&
|
|
2829
|
+
}), te(r, "visit.practitioner") && u.practitioner && p.push({
|
|
2818
2830
|
cells: [
|
|
2819
2831
|
i("anamnesis.field.practitioner.label"),
|
|
2820
|
-
re(
|
|
2832
|
+
re(u.practitioner)
|
|
2821
2833
|
]
|
|
2822
2834
|
}), p.length > 0 && h.push(
|
|
2823
2835
|
ja("visit", i("anamnesis.section.visitMeta"), p, i)
|
|
2824
2836
|
);
|
|
2825
|
-
const
|
|
2837
|
+
const k = Ha(
|
|
2826
2838
|
"anthropometrics",
|
|
2827
2839
|
i("anamnesis.section.anthropometrics"),
|
|
2828
2840
|
Ne(s, "anthropometric"),
|
|
2829
|
-
|
|
2841
|
+
u,
|
|
2830
2842
|
r,
|
|
2831
2843
|
i,
|
|
2832
2844
|
!1
|
|
2833
2845
|
);
|
|
2834
|
-
|
|
2835
|
-
const y =
|
|
2846
|
+
k && h.push(k);
|
|
2847
|
+
const y = Ha(
|
|
2836
2848
|
"dietary",
|
|
2837
2849
|
i("anamnesis.section.dietary"),
|
|
2838
2850
|
Ne(s, "dietary"),
|
|
2839
|
-
|
|
2851
|
+
u,
|
|
2840
2852
|
r,
|
|
2841
2853
|
i,
|
|
2842
2854
|
!1
|
|
@@ -2853,32 +2865,32 @@ function io(e) {
|
|
|
2853
2865
|
header: i("anamnesis.export.column.description")
|
|
2854
2866
|
}
|
|
2855
2867
|
],
|
|
2856
|
-
rows:
|
|
2857
|
-
cells: [
|
|
2868
|
+
rows: u.pathologyCodes.map((E) => ({
|
|
2869
|
+
cells: [E, yn(E, i, w[E])]
|
|
2858
2870
|
})),
|
|
2859
2871
|
emptyText: i("anamnesis.export.none")
|
|
2860
2872
|
});
|
|
2861
2873
|
}
|
|
2862
2874
|
if (te(r, "oncological.history")) {
|
|
2863
|
-
const w =
|
|
2875
|
+
const w = u.oncological, E = [];
|
|
2864
2876
|
if (w) {
|
|
2865
|
-
if (re(w.tumourType) &&
|
|
2877
|
+
if (re(w.tumourType) && E.push({
|
|
2866
2878
|
cells: [
|
|
2867
2879
|
i("anamnesis.field.tumourType.label"),
|
|
2868
2880
|
re(w.tumourType)
|
|
2869
2881
|
]
|
|
2870
|
-
}), re(w.stage) &&
|
|
2882
|
+
}), re(w.stage) && E.push({
|
|
2871
2883
|
cells: [i("anamnesis.field.stage.label"), re(w.stage)]
|
|
2872
2884
|
}), w.metastases) {
|
|
2873
|
-
const
|
|
2874
|
-
|
|
2885
|
+
const D = i(`anamnesis.common.${w.metastases.present}`), T = re(w.metastases.site);
|
|
2886
|
+
E.push({
|
|
2875
2887
|
cells: [
|
|
2876
2888
|
i("anamnesis.field.metastases.label"),
|
|
2877
|
-
|
|
2889
|
+
T ? `${D} — ${T}` : D
|
|
2878
2890
|
]
|
|
2879
2891
|
});
|
|
2880
2892
|
}
|
|
2881
|
-
re(w.treatmentStatus) &&
|
|
2893
|
+
re(w.treatmentStatus) && E.push({
|
|
2882
2894
|
cells: [
|
|
2883
2895
|
i("anamnesis.field.treatmentStatus.label"),
|
|
2884
2896
|
re(w.treatmentStatus)
|
|
@@ -2889,7 +2901,7 @@ function io(e) {
|
|
|
2889
2901
|
ja(
|
|
2890
2902
|
"oncological",
|
|
2891
2903
|
i("anamnesis.section.oncological"),
|
|
2892
|
-
|
|
2904
|
+
E,
|
|
2893
2905
|
i
|
|
2894
2906
|
)
|
|
2895
2907
|
);
|
|
@@ -2902,7 +2914,7 @@ function io(e) {
|
|
|
2902
2914
|
{ key: "dose", header: i("anamnesis.export.column.dose") },
|
|
2903
2915
|
{ key: "kind", header: i("anamnesis.export.column.kind") }
|
|
2904
2916
|
],
|
|
2905
|
-
rows:
|
|
2917
|
+
rows: u.therapy.map((w) => ({
|
|
2906
2918
|
cells: [
|
|
2907
2919
|
re(w.name),
|
|
2908
2920
|
re(w.dose),
|
|
@@ -2911,11 +2923,11 @@ function io(e) {
|
|
|
2911
2923
|
})),
|
|
2912
2924
|
emptyText: i("anamnesis.compile.noTherapy")
|
|
2913
2925
|
});
|
|
2914
|
-
const f =
|
|
2926
|
+
const f = Ha(
|
|
2915
2927
|
"labs",
|
|
2916
2928
|
i("anamnesis.section.labs"),
|
|
2917
2929
|
Ne(s, "lab"),
|
|
2918
|
-
|
|
2930
|
+
u,
|
|
2919
2931
|
r,
|
|
2920
2932
|
i,
|
|
2921
2933
|
!0
|
|
@@ -2929,7 +2941,7 @@ function io(e) {
|
|
|
2929
2941
|
{ key: "status", header: i("anamnesis.export.column.status") },
|
|
2930
2942
|
{ key: "notes", header: i("anamnesis.export.column.notes") }
|
|
2931
2943
|
],
|
|
2932
|
-
rows:
|
|
2944
|
+
rows: u.fmdCycles.map((w) => ({
|
|
2933
2945
|
cells: [
|
|
2934
2946
|
i("anamnesis.compile.cycleNumber", { number: w.cycleNumber }),
|
|
2935
2947
|
le(w.startDateIso, i),
|
|
@@ -2939,20 +2951,20 @@ function io(e) {
|
|
|
2939
2951
|
})),
|
|
2940
2952
|
emptyText: i("anamnesis.compile.noFmd")
|
|
2941
2953
|
}), te(r, "annual.programme")) {
|
|
2942
|
-
const w =
|
|
2954
|
+
const w = u.annualProgramme, E = [];
|
|
2943
2955
|
if (w) {
|
|
2944
|
-
const
|
|
2945
|
-
|
|
2956
|
+
const D = (T) => i(T ? "anamnesis.common.yes" : "anamnesis.common.no");
|
|
2957
|
+
E.push({
|
|
2946
2958
|
cells: [
|
|
2947
2959
|
i("anamnesis.field.annualProposed.label"),
|
|
2948
|
-
|
|
2960
|
+
D(w.proposed)
|
|
2949
2961
|
]
|
|
2950
|
-
}),
|
|
2962
|
+
}), E.push({
|
|
2951
2963
|
cells: [
|
|
2952
2964
|
i("anamnesis.field.annualAccepted.label"),
|
|
2953
|
-
|
|
2965
|
+
D(w.accepted)
|
|
2954
2966
|
]
|
|
2955
|
-
}), re(w.declineReason) &&
|
|
2967
|
+
}), re(w.declineReason) && E.push({
|
|
2956
2968
|
cells: [
|
|
2957
2969
|
i("anamnesis.field.annualDeclineReason.label"),
|
|
2958
2970
|
re(w.declineReason)
|
|
@@ -2960,19 +2972,19 @@ function io(e) {
|
|
|
2960
2972
|
});
|
|
2961
2973
|
}
|
|
2962
2974
|
h.push(
|
|
2963
|
-
ja("annual", i("anamnesis.section.annual"),
|
|
2975
|
+
ja("annual", i("anamnesis.section.annual"), E, i)
|
|
2964
2976
|
);
|
|
2965
2977
|
}
|
|
2966
2978
|
const C = [];
|
|
2967
|
-
return te(r, "notes.nutritionalProposal") && re(
|
|
2979
|
+
return te(r, "notes.nutritionalProposal") && re(u.nutritionalProposal) && C.push({
|
|
2968
2980
|
cells: [
|
|
2969
2981
|
i("anamnesis.field.nutritionalProposal.label"),
|
|
2970
|
-
re(
|
|
2982
|
+
re(u.nutritionalProposal)
|
|
2971
2983
|
]
|
|
2972
|
-
}), te(r, "notes.clinicalNotes") && re(
|
|
2984
|
+
}), te(r, "notes.clinicalNotes") && re(u.clinicalNotes) && C.push({
|
|
2973
2985
|
cells: [
|
|
2974
2986
|
i("anamnesis.field.clinicalNotes.label"),
|
|
2975
|
-
re(
|
|
2987
|
+
re(u.clinicalNotes)
|
|
2976
2988
|
]
|
|
2977
2989
|
}), C.length > 0 && h.push({
|
|
2978
2990
|
id: "notes",
|
|
@@ -2990,7 +3002,7 @@ function io(e) {
|
|
|
2990
3002
|
fileStem: La(
|
|
2991
3003
|
"compile",
|
|
2992
3004
|
a,
|
|
2993
|
-
Be(
|
|
3005
|
+
Be(u.dateIso) ?? Be(o),
|
|
2994
3006
|
!!c,
|
|
2995
3007
|
n
|
|
2996
3008
|
),
|
|
@@ -3024,9 +3036,9 @@ function oo(e, a) {
|
|
|
3024
3036
|
function ro(e) {
|
|
3025
3037
|
var C;
|
|
3026
3038
|
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() };
|
|
3027
|
-
if (!te(l,
|
|
3039
|
+
if (!te(l, Ba))
|
|
3028
3040
|
return Sn("evolution", n, i);
|
|
3029
|
-
const { meta: c, patientName:
|
|
3041
|
+
const { meta: c, patientName: u } = Tn(a, l, i, o), h = [], g = [], p = e.selectedVisitIds ? [...e.selectedVisitIds] : null, k = p && p.length > 0 ? p : pa(a.visits), y = r === "all" ? Et(a.visits) : Ra(a.visits, k).columns;
|
|
3030
3042
|
if (c.push({
|
|
3031
3043
|
label: i("anamnesis.export.visitsLabel"),
|
|
3032
3044
|
value: r === "all" ? i("anamnesis.export.visitsAll", { total: a.visits.length }) : i("anamnesis.export.visitsSelected", {
|
|
@@ -3034,7 +3046,7 @@ function ro(e) {
|
|
|
3034
3046
|
total: a.visits.length
|
|
3035
3047
|
})
|
|
3036
3048
|
}), te(l, "visit.date") && y.length > 0) {
|
|
3037
|
-
const w = Pe(s),
|
|
3049
|
+
const w = Pe(s), E = fn(a, w), D = le(y[0].visit.dateIso, i), T = le(y[y.length - 1].visit.dateIso, i), F = [
|
|
3038
3050
|
{ key: "parameter", header: i("anamnesis.grid.parameter") },
|
|
3039
3051
|
{ key: "unit", header: i("anamnesis.export.column.unit") },
|
|
3040
3052
|
{
|
|
@@ -3054,24 +3066,24 @@ function ro(e) {
|
|
|
3054
3066
|
{
|
|
3055
3067
|
key: "change",
|
|
3056
3068
|
header: i("anamnesis.export.column.change", {
|
|
3057
|
-
from:
|
|
3058
|
-
to:
|
|
3069
|
+
from: D,
|
|
3070
|
+
to: T
|
|
3059
3071
|
}),
|
|
3060
3072
|
numeric: !0
|
|
3061
3073
|
},
|
|
3062
3074
|
{ key: "outOfRange", header: i("anamnesis.export.column.outOfRange") }
|
|
3063
|
-
],
|
|
3064
|
-
let
|
|
3065
|
-
for (const N of
|
|
3066
|
-
te(l, Dt(N.def)) && (N.def.group !==
|
|
3075
|
+
], A = [];
|
|
3076
|
+
let m = null;
|
|
3077
|
+
for (const N of E)
|
|
3078
|
+
te(l, Dt(N.def)) && (N.def.group !== m && (m = N.def.group, A.push(It(i(`anamnesis.group.${N.def.group}`)))), A.push({
|
|
3067
3079
|
precision: N.def.precision,
|
|
3068
3080
|
cells: [
|
|
3069
3081
|
ze(N.def, i),
|
|
3070
3082
|
N.def.unit ?? null,
|
|
3071
3083
|
Rt(N.def, i),
|
|
3072
|
-
...y.map((
|
|
3073
|
-
var
|
|
3074
|
-
return ((
|
|
3084
|
+
...y.map((x) => {
|
|
3085
|
+
var P;
|
|
3086
|
+
return ((P = N.cells[x.index]) == null ? void 0 : P.value) ?? null;
|
|
3075
3087
|
}),
|
|
3076
3088
|
N.target,
|
|
3077
3089
|
oo(N, y),
|
|
@@ -3081,8 +3093,8 @@ function ro(e) {
|
|
|
3081
3093
|
h.push({
|
|
3082
3094
|
id: "matrix",
|
|
3083
3095
|
title: i("anamnesis.section.evolution"),
|
|
3084
|
-
columns:
|
|
3085
|
-
rows:
|
|
3096
|
+
columns: F,
|
|
3097
|
+
rows: A,
|
|
3086
3098
|
emptyText: i("anamnesis.export.none")
|
|
3087
3099
|
});
|
|
3088
3100
|
} else y.length === 0 && g.push(i("anamnesis.export.none"));
|
|
@@ -3095,11 +3107,11 @@ function ro(e) {
|
|
|
3095
3107
|
"evolution",
|
|
3096
3108
|
a,
|
|
3097
3109
|
f,
|
|
3098
|
-
!!
|
|
3110
|
+
!!u,
|
|
3099
3111
|
n
|
|
3100
3112
|
),
|
|
3101
|
-
title: Fa("evolution",
|
|
3102
|
-
patientName:
|
|
3113
|
+
title: Fa("evolution", u, i),
|
|
3114
|
+
patientName: u,
|
|
3103
3115
|
meta: c,
|
|
3104
3116
|
tables: h
|
|
3105
3117
|
},
|
|
@@ -3129,7 +3141,7 @@ function Vn(e, a) {
|
|
|
3129
3141
|
excluded: e.withheld.map((n) => co(n, a)).sort((n, i) => n.localeCompare(i, e.locale))
|
|
3130
3142
|
};
|
|
3131
3143
|
}
|
|
3132
|
-
const
|
|
3144
|
+
const uo = "text/csv;charset=utf-8", mo = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", Bn = `\r
|
|
3133
3145
|
`, po = /^[=+\-@\t\r]/;
|
|
3134
3146
|
function ho(e) {
|
|
3135
3147
|
var a;
|
|
@@ -3198,7 +3210,7 @@ function fo(e, a = An(e.locale)) {
|
|
|
3198
3210
|
}
|
|
3199
3211
|
function yo(e, a = An(e.locale)) {
|
|
3200
3212
|
const n = fo(e, a);
|
|
3201
|
-
return new Blob([a.bom ? `\uFEFF${n}` : n], { type:
|
|
3213
|
+
return new Blob([a.bom ? `\uFEFF${n}` : n], { type: uo });
|
|
3202
3214
|
}
|
|
3203
3215
|
async function vo() {
|
|
3204
3216
|
const e = await import("./exceljs.min-D2MHbJsF.js").then((n) => n.e), a = e;
|
|
@@ -3237,21 +3249,21 @@ async function No(e) {
|
|
|
3237
3249
|
}
|
|
3238
3250
|
s.getColumn(1).width = 28, s.getColumn(2).width = 48;
|
|
3239
3251
|
for (const l of e.tables) {
|
|
3240
|
-
const c = n.addWorksheet(Kn(l.title, i)),
|
|
3252
|
+
const c = n.addWorksheet(Kn(l.title, i)), u = c.addRow(
|
|
3241
3253
|
l.columns.map((h) => h.header)
|
|
3242
3254
|
);
|
|
3243
|
-
|
|
3255
|
+
u.font = { bold: !0 }, c.views = [{ state: "frozen", ySplit: 1 }], l.rows.length === 0 && l.emptyText && c.addRow([l.emptyText]);
|
|
3244
3256
|
for (const h of l.rows) {
|
|
3245
3257
|
if (h.kind === "section") {
|
|
3246
|
-
const
|
|
3247
|
-
|
|
3258
|
+
const k = c.addRow([h.cells[0] ?? null]);
|
|
3259
|
+
k.font = { bold: !0 };
|
|
3248
3260
|
continue;
|
|
3249
3261
|
}
|
|
3250
|
-
const g = l.columns.map((
|
|
3251
|
-
l.columns.forEach((
|
|
3262
|
+
const g = l.columns.map((k, y) => h.cells[y] ?? null), p = c.addRow(g);
|
|
3263
|
+
l.columns.forEach((k, y) => {
|
|
3252
3264
|
const f = p.getCell(y + 1);
|
|
3253
3265
|
if (typeof g[y] != "number") return;
|
|
3254
|
-
const C = bo(Pt(h,
|
|
3266
|
+
const C = bo(Pt(h, k));
|
|
3255
3267
|
C && (f.numFmt = C), f.alignment = { horizontal: "right" };
|
|
3256
3268
|
});
|
|
3257
3269
|
}
|
|
@@ -3263,7 +3275,7 @@ async function No(e) {
|
|
|
3263
3275
|
});
|
|
3264
3276
|
}
|
|
3265
3277
|
const r = await n.xlsx.writeBuffer();
|
|
3266
|
-
return new Blob([r], { type:
|
|
3278
|
+
return new Blob([r], { type: mo });
|
|
3267
3279
|
}
|
|
3268
3280
|
function En(e, a) {
|
|
3269
3281
|
return `${e.fileStem}.${a}`;
|
|
@@ -3394,7 +3406,7 @@ function qe(e) {
|
|
|
3394
3406
|
a.includes(n) && (a = a.split(n).join(i));
|
|
3395
3407
|
return a;
|
|
3396
3408
|
}
|
|
3397
|
-
const oe = 14, Eo = 6, Do = 15, Io = 9, Ro = 11, Hn = 8.5,
|
|
3409
|
+
const oe = 14, Eo = 6, Do = 15, Io = 9, Ro = 11, Hn = 8.5, jn = 8, Me = 5;
|
|
3398
3410
|
function Lo(e) {
|
|
3399
3411
|
return e.tables.some(
|
|
3400
3412
|
(a) => a.columns.length > Eo
|
|
@@ -3434,14 +3446,14 @@ async function $t(e, a = {}) {
|
|
|
3434
3446
|
orientation: Lo(e) ? "landscape" : "portrait",
|
|
3435
3447
|
unit: "mm",
|
|
3436
3448
|
format: "a4"
|
|
3437
|
-
}), l = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(),
|
|
3449
|
+
}), l = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), u = l - oe * 2, h = (f, C, w) => {
|
|
3438
3450
|
r.setFont("helvetica", f), r.setFontSize(C), r.setTextColor(w[0], w[1], w[2]);
|
|
3439
3451
|
};
|
|
3440
3452
|
let g = oe;
|
|
3441
3453
|
h("bold", Do, s.headerText);
|
|
3442
3454
|
for (const f of r.splitTextToSize(
|
|
3443
3455
|
qe(e.title),
|
|
3444
|
-
|
|
3456
|
+
u
|
|
3445
3457
|
))
|
|
3446
3458
|
r.text(f, oe, g), g += Me + 1;
|
|
3447
3459
|
g += 1, h("normal", Io, s.mutedText);
|
|
@@ -3452,11 +3464,11 @@ async function $t(e, a = {}) {
|
|
|
3452
3464
|
g += Me, h("normal", Hn, s.mutedText), r.text(qe(f.emptyText), oe, g), g += 1;
|
|
3453
3465
|
continue;
|
|
3454
3466
|
}
|
|
3455
|
-
const C = /* @__PURE__ */ new Set(), w = f.rows.map((
|
|
3456
|
-
_t(
|
|
3467
|
+
const C = /* @__PURE__ */ new Set(), w = f.rows.map((T, F) => T.kind === "section" ? (C.add(F), [
|
|
3468
|
+
_t(T.cells[0] ?? null, void 0, o),
|
|
3457
3469
|
...f.columns.slice(1).map(() => "")
|
|
3458
|
-
]) : Po(
|
|
3459
|
-
head: [f.columns.map((
|
|
3470
|
+
]) : Po(T, f, o)), E = {}, D = {
|
|
3471
|
+
head: [f.columns.map((T) => qe(T.header))],
|
|
3460
3472
|
body: w,
|
|
3461
3473
|
startY: g + 2,
|
|
3462
3474
|
margin: { left: oe, right: oe, bottom: oe + Me },
|
|
@@ -3477,32 +3489,32 @@ async function $t(e, a = {}) {
|
|
|
3477
3489
|
},
|
|
3478
3490
|
alternateRowStyles: { fillColor: s.zebraFill },
|
|
3479
3491
|
columnStyles: Object.fromEntries(
|
|
3480
|
-
f.columns.map((
|
|
3481
|
-
|
|
3482
|
-
|
|
3492
|
+
f.columns.map((T, F) => [
|
|
3493
|
+
F,
|
|
3494
|
+
T.numeric ? { halign: "right" } : {}
|
|
3483
3495
|
])
|
|
3484
3496
|
),
|
|
3485
|
-
didParseCell: (
|
|
3486
|
-
|
|
3497
|
+
didParseCell: (T) => {
|
|
3498
|
+
T.section === "body" && C.has(T.row.index) && (T.cell.styles.fillColor = s.sectionFill, T.cell.styles.textColor = s.headerText, T.cell.styles.fontStyle = "bold");
|
|
3487
3499
|
},
|
|
3488
|
-
didDrawPage: (
|
|
3489
|
-
|
|
3500
|
+
didDrawPage: (T) => {
|
|
3501
|
+
E.table = T.table;
|
|
3490
3502
|
}
|
|
3491
3503
|
};
|
|
3492
|
-
i(r,
|
|
3504
|
+
i(r, D), g = ((y = E.table) == null ? void 0 : y.finalY) ?? g + Me;
|
|
3493
3505
|
}
|
|
3494
3506
|
if (e.footnotes.length > 0) {
|
|
3495
|
-
g += Me + 1, g > c - oe * 2 && (r.addPage(), g = oe), h("normal",
|
|
3507
|
+
g += Me + 1, g > c - oe * 2 && (r.addPage(), g = oe), h("normal", jn, s.mutedText);
|
|
3496
3508
|
for (const f of e.footnotes)
|
|
3497
|
-
for (const C of r.splitTextToSize(qe(f),
|
|
3509
|
+
for (const C of r.splitTextToSize(qe(f), u))
|
|
3498
3510
|
r.text(C, oe, g), g += Me - 1;
|
|
3499
3511
|
}
|
|
3500
3512
|
const p = qe(
|
|
3501
3513
|
[e.patientName, e.audienceLabel].filter(Boolean).join(" · ")
|
|
3502
|
-
),
|
|
3503
|
-
for (let f = 1; f <=
|
|
3504
|
-
r.setPage(f), h("normal",
|
|
3505
|
-
`${f} / ${
|
|
3514
|
+
), k = r.getNumberOfPages();
|
|
3515
|
+
for (let f = 1; f <= k; f += 1)
|
|
3516
|
+
r.setPage(f), h("normal", jn, s.mutedText), p && r.text(p, oe, c - oe + 4), r.text(
|
|
3517
|
+
`${f} / ${k}`,
|
|
3506
3518
|
l - oe,
|
|
3507
3519
|
c - oe + 4,
|
|
3508
3520
|
{ align: "right" }
|
|
@@ -3521,7 +3533,7 @@ async function $o(e, a, n = {}) {
|
|
|
3521
3533
|
const i = await $t(e, { ...n, autoPrint: !0 }), s = URL.createObjectURL(i);
|
|
3522
3534
|
return a.setAttribute("src", s), s;
|
|
3523
3535
|
}
|
|
3524
|
-
const
|
|
3536
|
+
const on = ["clinician", "patient"];
|
|
3525
3537
|
function zo({
|
|
3526
3538
|
tab: e,
|
|
3527
3539
|
record: a,
|
|
@@ -3532,14 +3544,14 @@ function zo({
|
|
|
3532
3544
|
defaultShareOpen: r = !1,
|
|
3533
3545
|
defaultAudience: l = "clinician"
|
|
3534
3546
|
}) {
|
|
3535
|
-
const [c,
|
|
3547
|
+
const [c, u] = $(l), [h, g] = $(!1), [p, k] = $(o), [y, f] = $(r), [C, w] = $(l), [E, D] = $({ text: "", seq: 0 }), T = we(null), F = we(null), A = we(null), m = we(!1), N = Qe();
|
|
3536
3548
|
ia(
|
|
3537
3549
|
() => () => {
|
|
3538
|
-
|
|
3550
|
+
A.current && URL.revokeObjectURL(A.current);
|
|
3539
3551
|
},
|
|
3540
3552
|
[]
|
|
3541
3553
|
);
|
|
3542
|
-
const
|
|
3554
|
+
const x = na(
|
|
3543
3555
|
(B) => lo(e, {
|
|
3544
3556
|
record: a,
|
|
3545
3557
|
audience: B,
|
|
@@ -3549,46 +3561,46 @@ function zo({
|
|
|
3549
3561
|
scope: h ? "all" : "selected"
|
|
3550
3562
|
}),
|
|
3551
3563
|
[e, a, n, i, s, h]
|
|
3552
|
-
),
|
|
3553
|
-
() => p ? Vn(
|
|
3554
|
-
[p,
|
|
3555
|
-
),
|
|
3564
|
+
), P = n(`anamnesis.export.tab.${e}`), S = n("anamnesis.export.control.audienceBadge"), V = O(
|
|
3565
|
+
() => p ? Vn(x("patient"), n).excluded : [],
|
|
3566
|
+
[p, x, n]
|
|
3567
|
+
), R = {
|
|
3556
3568
|
clinician: V.length > 0 ? n("anamnesis.export.control.holds", {
|
|
3557
3569
|
list: V.join(n("anamnesis.export.listSeparator"))
|
|
3558
3570
|
}) : n("anamnesis.export.control.holdsNone"),
|
|
3559
3571
|
patient: V.length > 0 ? n("anamnesis.export.control.excludes", {
|
|
3560
3572
|
list: V.join(n("anamnesis.export.listSeparator"))
|
|
3561
3573
|
}) : n("anamnesis.export.control.excludesNone")
|
|
3562
|
-
},
|
|
3563
|
-
() => y ? Vn(
|
|
3564
|
-
[y,
|
|
3565
|
-
),
|
|
3566
|
-
if (
|
|
3567
|
-
|
|
3568
|
-
const
|
|
3569
|
-
Promise.resolve(ae(
|
|
3570
|
-
(
|
|
3571
|
-
|
|
3572
|
-
file: `${
|
|
3574
|
+
}, j = O(
|
|
3575
|
+
() => y ? Vn(x(C), n) : { included: [], excluded: [] },
|
|
3576
|
+
[y, x, C, n]
|
|
3577
|
+
), G = (B) => D((ae) => ({ text: B, seq: ae.seq + 1 })), z = (B, ae) => {
|
|
3578
|
+
if (m.current) return;
|
|
3579
|
+
m.current = !0;
|
|
3580
|
+
const me = x(c);
|
|
3581
|
+
Promise.resolve(ae(me)).then(
|
|
3582
|
+
(ue) => G(
|
|
3583
|
+
ue ? n("anamnesis.export.control.ready", {
|
|
3584
|
+
file: `${me.fileStem}.${B}`
|
|
3573
3585
|
}) : n("anamnesis.export.control.failed")
|
|
3574
3586
|
)
|
|
3575
|
-
).catch(() =>
|
|
3576
|
-
|
|
3587
|
+
).catch(() => G(n("anamnesis.export.control.failed"))).finally(() => {
|
|
3588
|
+
m.current = !1;
|
|
3577
3589
|
});
|
|
3578
|
-
}, U = () => So(
|
|
3579
|
-
|
|
3590
|
+
}, U = () => So(T.current), W = () => z("pdf", (B) => _o(B, { palette: U() })), Z = () => z("xlsx", To), se = () => z("csv", Co), X = () => {
|
|
3591
|
+
m.current || (m.current = !0, $o(x(c), F.current, { palette: U() }).then((B) => {
|
|
3580
3592
|
if (!B) {
|
|
3581
|
-
|
|
3593
|
+
G(n("anamnesis.export.control.failed"));
|
|
3582
3594
|
return;
|
|
3583
3595
|
}
|
|
3584
|
-
|
|
3585
|
-
}).catch(() =>
|
|
3586
|
-
|
|
3596
|
+
A.current && URL.revokeObjectURL(A.current), A.current = B, G(n("anamnesis.export.control.printing"));
|
|
3597
|
+
}).catch(() => G(n("anamnesis.export.control.failed"))).finally(() => {
|
|
3598
|
+
m.current = !1;
|
|
3587
3599
|
}));
|
|
3588
3600
|
}, Ie = () => {
|
|
3589
3601
|
w(c), f(!0);
|
|
3590
3602
|
}, I = () => {
|
|
3591
|
-
|
|
3603
|
+
u(C), f(!1), G(
|
|
3592
3604
|
n("anamnesis.export.share.confirmed", {
|
|
3593
3605
|
audience: n(`anamnesis.export.audience.${C}`)
|
|
3594
3606
|
})
|
|
@@ -3597,7 +3609,7 @@ function zo({
|
|
|
3597
3609
|
return /* @__PURE__ */ d(
|
|
3598
3610
|
"div",
|
|
3599
3611
|
{
|
|
3600
|
-
ref:
|
|
3612
|
+
ref: T,
|
|
3601
3613
|
"data-component": "anamnesis-export-menu",
|
|
3602
3614
|
"data-tab": e,
|
|
3603
3615
|
"data-audience": c,
|
|
@@ -3609,14 +3621,14 @@ function zo({
|
|
|
3609
3621
|
variant: "warning",
|
|
3610
3622
|
size: "sm",
|
|
3611
3623
|
"data-testid": "anamnesis-export-audience",
|
|
3612
|
-
children:
|
|
3624
|
+
children: S
|
|
3613
3625
|
}
|
|
3614
3626
|
) : null,
|
|
3615
3627
|
/* @__PURE__ */ d(
|
|
3616
3628
|
ce.Root,
|
|
3617
3629
|
{
|
|
3618
3630
|
open: p,
|
|
3619
|
-
onOpenChange:
|
|
3631
|
+
onOpenChange: k,
|
|
3620
3632
|
modal: !o,
|
|
3621
3633
|
children: [
|
|
3622
3634
|
/* @__PURE__ */ t(ce.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
@@ -3626,24 +3638,24 @@ function zo({
|
|
|
3626
3638
|
intent: "outline",
|
|
3627
3639
|
size: "sm",
|
|
3628
3640
|
endIcon: /* @__PURE__ */ t(un, { "aria-hidden": "true" }),
|
|
3629
|
-
"aria-label": c === "clinician" ? n("anamnesis.export.control.triggerLabel", { tab:
|
|
3630
|
-
tab:
|
|
3631
|
-
audience:
|
|
3641
|
+
"aria-label": c === "clinician" ? n("anamnesis.export.control.triggerLabel", { tab: P }) : n("anamnesis.export.control.triggerLabelAudience", {
|
|
3642
|
+
tab: P,
|
|
3643
|
+
audience: S
|
|
3632
3644
|
}),
|
|
3633
3645
|
"data-testid": "anamnesis-export-trigger",
|
|
3634
3646
|
children: n("anamnesis.export.control.trigger")
|
|
3635
3647
|
}
|
|
3636
3648
|
) }),
|
|
3637
3649
|
/* @__PURE__ */ d(ce.Content, { align: "end", children: [
|
|
3638
|
-
/* @__PURE__ */ t(ce.Label, { children: n("anamnesis.export.control.menuLabel", { tab:
|
|
3650
|
+
/* @__PURE__ */ t(ce.Label, { children: n("anamnesis.export.control.menuLabel", { tab: P }) }),
|
|
3639
3651
|
/* @__PURE__ */ t(ce.Separator, {}),
|
|
3640
3652
|
/* @__PURE__ */ t(ce.Label, { children: n("anamnesis.export.audienceLabel") }),
|
|
3641
3653
|
/* @__PURE__ */ t(
|
|
3642
3654
|
ce.RadioGroup,
|
|
3643
3655
|
{
|
|
3644
3656
|
value: c,
|
|
3645
|
-
onValueChange: (B) =>
|
|
3646
|
-
children:
|
|
3657
|
+
onValueChange: (B) => u(B),
|
|
3658
|
+
children: on.map((B) => /* @__PURE__ */ t(
|
|
3647
3659
|
ce.RadioItem,
|
|
3648
3660
|
{
|
|
3649
3661
|
value: B,
|
|
@@ -3655,13 +3667,13 @@ function zo({
|
|
|
3655
3667
|
))
|
|
3656
3668
|
}
|
|
3657
3669
|
),
|
|
3658
|
-
/* @__PURE__ */ t(ce.Label, { "data-testid": "anamnesis-export-disclosure", children:
|
|
3659
|
-
|
|
3670
|
+
/* @__PURE__ */ t(ce.Label, { "data-testid": "anamnesis-export-disclosure", children: R[c === "patient" ? "patient" : "clinician"] }),
|
|
3671
|
+
on.map((B) => /* @__PURE__ */ t(
|
|
3660
3672
|
"span",
|
|
3661
3673
|
{
|
|
3662
3674
|
id: `${N}-${B}`,
|
|
3663
3675
|
className: "ds:sr-only",
|
|
3664
|
-
children:
|
|
3676
|
+
children: R[B]
|
|
3665
3677
|
},
|
|
3666
3678
|
B
|
|
3667
3679
|
)),
|
|
@@ -3690,7 +3702,7 @@ function zo({
|
|
|
3690
3702
|
/* @__PURE__ */ t(
|
|
3691
3703
|
ce.Item,
|
|
3692
3704
|
{
|
|
3693
|
-
startIcon: /* @__PURE__ */ t(
|
|
3705
|
+
startIcon: /* @__PURE__ */ t(ui, { "aria-hidden": "true" }),
|
|
3694
3706
|
onSelect: W,
|
|
3695
3707
|
children: n("anamnesis.export.control.pdf")
|
|
3696
3708
|
}
|
|
@@ -3698,7 +3710,7 @@ function zo({
|
|
|
3698
3710
|
/* @__PURE__ */ t(
|
|
3699
3711
|
ce.Item,
|
|
3700
3712
|
{
|
|
3701
|
-
startIcon: /* @__PURE__ */ t(
|
|
3713
|
+
startIcon: /* @__PURE__ */ t(mi, { "aria-hidden": "true" }),
|
|
3702
3714
|
onSelect: X,
|
|
3703
3715
|
children: n("anamnesis.export.control.print")
|
|
3704
3716
|
}
|
|
@@ -3731,16 +3743,16 @@ function zo({
|
|
|
3731
3743
|
onOpenChange: f,
|
|
3732
3744
|
audience: C,
|
|
3733
3745
|
onAudienceChange: w,
|
|
3734
|
-
preview:
|
|
3746
|
+
preview: j,
|
|
3735
3747
|
onConfirm: I,
|
|
3736
|
-
tabName:
|
|
3748
|
+
tabName: P,
|
|
3737
3749
|
t: n
|
|
3738
3750
|
}
|
|
3739
3751
|
),
|
|
3740
3752
|
/* @__PURE__ */ t(
|
|
3741
3753
|
"iframe",
|
|
3742
3754
|
{
|
|
3743
|
-
ref:
|
|
3755
|
+
ref: F,
|
|
3744
3756
|
title: n("anamnesis.export.control.printFrame"),
|
|
3745
3757
|
"aria-hidden": "true",
|
|
3746
3758
|
tabIndex: -1,
|
|
@@ -3754,7 +3766,7 @@ function zo({
|
|
|
3754
3766
|
"aria-live": "polite",
|
|
3755
3767
|
"data-testid": "anamnesis-export-status",
|
|
3756
3768
|
className: "type-body-sm ds:text-[color:var(--muted-foreground)]",
|
|
3757
|
-
children:
|
|
3769
|
+
children: E.text ? `${E.text}${E.seq % 2 ? "" : ""}` : ""
|
|
3758
3770
|
}
|
|
3759
3771
|
)
|
|
3760
3772
|
]
|
|
@@ -3790,7 +3802,7 @@ function Mo({
|
|
|
3790
3802
|
label: l("anamnesis.export.share.audienceLabel"),
|
|
3791
3803
|
value: n,
|
|
3792
3804
|
onValueChange: (c) => i(c),
|
|
3793
|
-
children:
|
|
3805
|
+
children: on.map((c) => /* @__PURE__ */ t(
|
|
3794
3806
|
ke,
|
|
3795
3807
|
{
|
|
3796
3808
|
value: c,
|
|
@@ -3801,7 +3813,7 @@ function Mo({
|
|
|
3801
3813
|
}
|
|
3802
3814
|
),
|
|
3803
3815
|
/* @__PURE__ */ t(
|
|
3804
|
-
|
|
3816
|
+
Gn,
|
|
3805
3817
|
{
|
|
3806
3818
|
title: l("anamnesis.export.share.includes"),
|
|
3807
3819
|
items: s.included,
|
|
@@ -3810,7 +3822,7 @@ function Mo({
|
|
|
3810
3822
|
}
|
|
3811
3823
|
),
|
|
3812
3824
|
/* @__PURE__ */ t(
|
|
3813
|
-
|
|
3825
|
+
Gn,
|
|
3814
3826
|
{
|
|
3815
3827
|
title: l("anamnesis.export.share.excludes"),
|
|
3816
3828
|
items: s.excluded,
|
|
@@ -3835,7 +3847,7 @@ function Mo({
|
|
|
3835
3847
|
] })
|
|
3836
3848
|
] }) });
|
|
3837
3849
|
}
|
|
3838
|
-
function
|
|
3850
|
+
function Gn({
|
|
3839
3851
|
title: e,
|
|
3840
3852
|
items: a,
|
|
3841
3853
|
emptyText: n,
|
|
@@ -3886,7 +3898,7 @@ function Mt({
|
|
|
3886
3898
|
readOnly: o = !1,
|
|
3887
3899
|
t: r
|
|
3888
3900
|
}) {
|
|
3889
|
-
const l = rs(e, r), c =
|
|
3901
|
+
const l = rs(e, r), c = mt(e, r), u = i && s === "patient", h = zt(e, a);
|
|
3890
3902
|
let g = null;
|
|
3891
3903
|
switch (e.type) {
|
|
3892
3904
|
case "text": {
|
|
@@ -3896,7 +3908,7 @@ function Mt({
|
|
|
3896
3908
|
{
|
|
3897
3909
|
disabled: o,
|
|
3898
3910
|
value: p,
|
|
3899
|
-
onChange: (
|
|
3911
|
+
onChange: (k) => n({ kind: "text", text: k.target.value })
|
|
3900
3912
|
}
|
|
3901
3913
|
) });
|
|
3902
3914
|
break;
|
|
@@ -3910,7 +3922,7 @@ function Mt({
|
|
|
3910
3922
|
value: p,
|
|
3911
3923
|
autoResize: !0,
|
|
3912
3924
|
minRows: 2,
|
|
3913
|
-
onChange: (
|
|
3925
|
+
onChange: (k) => n({ kind: "text", text: k.target.value })
|
|
3914
3926
|
}
|
|
3915
3927
|
) });
|
|
3916
3928
|
break;
|
|
@@ -3924,13 +3936,13 @@ function Mt({
|
|
|
3924
3936
|
value: p,
|
|
3925
3937
|
min: 0,
|
|
3926
3938
|
mode: e.decimal || Vo.has(e.key) ? "decimal" : "integer",
|
|
3927
|
-
onChange: (
|
|
3939
|
+
onChange: (k) => n({ kind: "number", value: k })
|
|
3928
3940
|
}
|
|
3929
3941
|
) });
|
|
3930
3942
|
break;
|
|
3931
3943
|
}
|
|
3932
3944
|
case "frequency": {
|
|
3933
|
-
const p = (a == null ? void 0 : a.kind) === "frequency" ? a.perWeek : null,
|
|
3945
|
+
const p = (a == null ? void 0 : a.kind) === "frequency" ? a.perWeek : null, k = (a == null ? void 0 : a.kind) === "frequency" ? a.detail ?? "" : "";
|
|
3934
3946
|
g = /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3935
3947
|
/* @__PURE__ */ t(q, { label: l, description: c, children: /* @__PURE__ */ t(
|
|
3936
3948
|
ga,
|
|
@@ -3943,7 +3955,7 @@ function Mt({
|
|
|
3943
3955
|
onChange: (y) => n({
|
|
3944
3956
|
kind: "frequency",
|
|
3945
3957
|
perWeek: y,
|
|
3946
|
-
detail:
|
|
3958
|
+
detail: k || void 0
|
|
3947
3959
|
})
|
|
3948
3960
|
}
|
|
3949
3961
|
) }),
|
|
@@ -3951,7 +3963,7 @@ function Mt({
|
|
|
3951
3963
|
ie,
|
|
3952
3964
|
{
|
|
3953
3965
|
disabled: o,
|
|
3954
|
-
value:
|
|
3966
|
+
value: k,
|
|
3955
3967
|
onChange: (y) => n({
|
|
3956
3968
|
kind: "frequency",
|
|
3957
3969
|
perWeek: p,
|
|
@@ -3963,7 +3975,7 @@ function Mt({
|
|
|
3963
3975
|
break;
|
|
3964
3976
|
}
|
|
3965
3977
|
case "yesNoDetail": {
|
|
3966
|
-
const p = (a == null ? void 0 : a.kind) === "yesNo" ? a.present : "unknown",
|
|
3978
|
+
const p = (a == null ? void 0 : a.kind) === "yesNo" ? a.present : "unknown", k = (a == null ? void 0 : a.kind) === "yesNo" ? a.detail ?? "" : "";
|
|
3967
3979
|
g = /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3968
3980
|
/* @__PURE__ */ d(
|
|
3969
3981
|
ha,
|
|
@@ -3976,7 +3988,7 @@ function Mt({
|
|
|
3976
3988
|
onValueChange: (y) => n({
|
|
3977
3989
|
kind: "yesNo",
|
|
3978
3990
|
present: y,
|
|
3979
|
-
detail:
|
|
3991
|
+
detail: k || void 0
|
|
3980
3992
|
}),
|
|
3981
3993
|
children: [
|
|
3982
3994
|
/* @__PURE__ */ t(
|
|
@@ -4010,7 +4022,7 @@ function Mt({
|
|
|
4010
4022
|
ie,
|
|
4011
4023
|
{
|
|
4012
4024
|
disabled: o,
|
|
4013
|
-
value:
|
|
4025
|
+
value: k,
|
|
4014
4026
|
onChange: (y) => n({
|
|
4015
4027
|
kind: "yesNo",
|
|
4016
4028
|
present: p,
|
|
@@ -4022,7 +4034,7 @@ function Mt({
|
|
|
4022
4034
|
break;
|
|
4023
4035
|
}
|
|
4024
4036
|
case "choice": {
|
|
4025
|
-
const p = (a == null ? void 0 : a.kind) === "choice" ? a.selected ?? "" : "",
|
|
4037
|
+
const p = (a == null ? void 0 : a.kind) === "choice" ? a.selected ?? "" : "", k = (a == null ? void 0 : a.kind) === "choice" ? a.detail ?? "" : "", y = (e.options ?? []).map((f) => ({
|
|
4026
4038
|
value: f,
|
|
4027
4039
|
// A practice-added option has no kit translation; show it verbatim
|
|
4028
4040
|
// rather than the unresolved key.
|
|
@@ -4041,7 +4053,7 @@ function Mt({
|
|
|
4041
4053
|
onValueChange: (f) => n({
|
|
4042
4054
|
kind: "choice",
|
|
4043
4055
|
selected: f || null,
|
|
4044
|
-
detail:
|
|
4056
|
+
detail: k || void 0
|
|
4045
4057
|
})
|
|
4046
4058
|
}
|
|
4047
4059
|
) }),
|
|
@@ -4049,7 +4061,7 @@ function Mt({
|
|
|
4049
4061
|
ie,
|
|
4050
4062
|
{
|
|
4051
4063
|
disabled: o,
|
|
4052
|
-
value:
|
|
4064
|
+
value: k,
|
|
4053
4065
|
onChange: (f) => n({
|
|
4054
4066
|
kind: "choice",
|
|
4055
4067
|
selected: p,
|
|
@@ -4061,7 +4073,7 @@ function Mt({
|
|
|
4061
4073
|
break;
|
|
4062
4074
|
}
|
|
4063
4075
|
case "multiChoice": {
|
|
4064
|
-
const p = (a == null ? void 0 : a.kind) === "multiChoice" ? a.selected : [],
|
|
4076
|
+
const p = (a == null ? void 0 : a.kind) === "multiChoice" ? a.selected : [], k = (y) => n({
|
|
4065
4077
|
kind: "multiChoice",
|
|
4066
4078
|
selected: p.includes(y) ? p.filter((f) => f !== y) : [...p, y]
|
|
4067
4079
|
});
|
|
@@ -4076,7 +4088,7 @@ function Mt({
|
|
|
4076
4088
|
defaultValue: y
|
|
4077
4089
|
}),
|
|
4078
4090
|
checked: p.includes(y),
|
|
4079
|
-
onCheckedChange: () =>
|
|
4091
|
+
onCheckedChange: () => k(y)
|
|
4080
4092
|
},
|
|
4081
4093
|
y
|
|
4082
4094
|
)) })
|
|
@@ -4084,7 +4096,7 @@ function Mt({
|
|
|
4084
4096
|
break;
|
|
4085
4097
|
}
|
|
4086
4098
|
case "meal": {
|
|
4087
|
-
const p = (a == null ? void 0 : a.kind) === "meal" ? a.time : "",
|
|
4099
|
+
const p = (a == null ? void 0 : a.kind) === "meal" ? a.time : "", k = (a == null ? void 0 : a.kind) === "meal" ? a.description : "";
|
|
4088
4100
|
g = /* @__PURE__ */ d("fieldset", { className: "ds:m-0 ds:border-0 ds:p-0", children: [
|
|
4089
4101
|
/* @__PURE__ */ t("legend", { className: "type-label ds:mb-[var(--spacing-2xs)] ds:text-[color:var(--foreground)]", children: l }),
|
|
4090
4102
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:sm:flex-row ds:sm:items-start", children: [
|
|
@@ -4096,7 +4108,7 @@ function Mt({
|
|
|
4096
4108
|
onChange: (y) => n({
|
|
4097
4109
|
kind: "meal",
|
|
4098
4110
|
time: qo(y),
|
|
4099
|
-
description:
|
|
4111
|
+
description: k
|
|
4100
4112
|
})
|
|
4101
4113
|
}
|
|
4102
4114
|
) }),
|
|
@@ -4104,7 +4116,7 @@ function Mt({
|
|
|
4104
4116
|
ie,
|
|
4105
4117
|
{
|
|
4106
4118
|
disabled: o,
|
|
4107
|
-
value:
|
|
4119
|
+
value: k,
|
|
4108
4120
|
onChange: (y) => n({
|
|
4109
4121
|
kind: "meal",
|
|
4110
4122
|
time: p,
|
|
@@ -4127,7 +4139,7 @@ function Mt({
|
|
|
4127
4139
|
h ? "ds:border-s-2 ds:border-[color:var(--accent)] ds:ps-[var(--spacing-sm)] ds:bg-[color:color-mix(in_srgb,var(--accent)_6%,transparent)]" : ""
|
|
4128
4140
|
].filter(Boolean).join(" "),
|
|
4129
4141
|
children: [
|
|
4130
|
-
|
|
4142
|
+
u || h ? /* @__PURE__ */ d("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]", children: [
|
|
4131
4143
|
h ? /* @__PURE__ */ t("span", { "data-testid": `anamnesis-field-${e.key}-highlight`, children: /* @__PURE__ */ t(
|
|
4132
4144
|
J,
|
|
4133
4145
|
{
|
|
@@ -4137,7 +4149,7 @@ function Mt({
|
|
|
4137
4149
|
children: r("anamnesis.field.highlighted")
|
|
4138
4150
|
}
|
|
4139
4151
|
) }) : null,
|
|
4140
|
-
|
|
4152
|
+
u ? /* @__PURE__ */ t(ft, { t: r }) : null
|
|
4141
4153
|
] }) : null,
|
|
4142
4154
|
g
|
|
4143
4155
|
]
|
|
@@ -4199,15 +4211,15 @@ function Ho(e, a, n) {
|
|
|
4199
4211
|
const o = Math.abs(s);
|
|
4200
4212
|
return o <= Wn(i, i.onTarget, a) ? "onTarget" : o <= Wn(i, i.approaching, a) ? "approaching" : "offTarget";
|
|
4201
4213
|
}
|
|
4202
|
-
const
|
|
4214
|
+
const jo = {
|
|
4203
4215
|
weight: { min: 20, max: 400, step: 0.1 },
|
|
4204
4216
|
bmi: { min: 10, max: 60, step: 0.1 },
|
|
4205
4217
|
waist: { min: 30, max: 250, step: 1 },
|
|
4206
4218
|
energy: { min: 500, max: 6e3, step: 50 },
|
|
4207
4219
|
protein: { min: 10, max: 400, step: 5 }
|
|
4208
4220
|
};
|
|
4209
|
-
function
|
|
4210
|
-
const a =
|
|
4221
|
+
function Go(e) {
|
|
4222
|
+
const a = jo[e.key];
|
|
4211
4223
|
return a || { min: 0, max: 1e4, step: 10 ** -(e.precision ?? 0) };
|
|
4212
4224
|
}
|
|
4213
4225
|
function Wo(e, a) {
|
|
@@ -4227,8 +4239,8 @@ function qt({
|
|
|
4227
4239
|
t: s,
|
|
4228
4240
|
onCommit: o
|
|
4229
4241
|
}) {
|
|
4230
|
-
const [r, l] = $(!1), [c,
|
|
4231
|
-
w &&
|
|
4242
|
+
const [r, l] = $(!1), [c, u] = $(n), h = Go(e), g = Wo(c, h), p = !Qo(c, n), k = Te(e, s), y = Yo(h, e), f = (w) => {
|
|
4243
|
+
w && u(n), l(w);
|
|
4232
4244
|
}, C = (w) => {
|
|
4233
4245
|
o(w), l(!1);
|
|
4234
4246
|
};
|
|
@@ -4236,7 +4248,7 @@ function qt({
|
|
|
4236
4248
|
/* @__PURE__ */ t(fe.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
4237
4249
|
de,
|
|
4238
4250
|
{
|
|
4239
|
-
icon: /* @__PURE__ */ t(
|
|
4251
|
+
icon: /* @__PURE__ */ t(ma, { "aria-hidden": "true" }),
|
|
4240
4252
|
intent: "ghost",
|
|
4241
4253
|
size: "sm",
|
|
4242
4254
|
"aria-label": s("anamnesis.targets.edit", { parameter: a }),
|
|
@@ -4251,7 +4263,7 @@ function qt({
|
|
|
4251
4263
|
"data-testid": `anamnesis-target-form-${e.key}`,
|
|
4252
4264
|
children: [
|
|
4253
4265
|
/* @__PURE__ */ t(fe.Close, {}),
|
|
4254
|
-
/* @__PURE__ */ t(fe.Heading, { children: s("anamnesis.targets.editTitle", { parameter:
|
|
4266
|
+
/* @__PURE__ */ t(fe.Heading, { children: s("anamnesis.targets.editTitle", { parameter: k }) }),
|
|
4255
4267
|
/* @__PURE__ */ t(fe.Description, { children: i }),
|
|
4256
4268
|
/* @__PURE__ */ d("div", { className: "ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
4257
4269
|
/* @__PURE__ */ t(
|
|
@@ -4268,7 +4280,7 @@ function qt({
|
|
|
4268
4280
|
min: h.min,
|
|
4269
4281
|
max: h.max,
|
|
4270
4282
|
step: h.step,
|
|
4271
|
-
onChange:
|
|
4283
|
+
onChange: u,
|
|
4272
4284
|
"data-testid": `anamnesis-target-input-${e.key}`
|
|
4273
4285
|
}
|
|
4274
4286
|
)
|
|
@@ -4347,24 +4359,24 @@ function Jo({
|
|
|
4347
4359
|
}
|
|
4348
4360
|
);
|
|
4349
4361
|
}
|
|
4350
|
-
function
|
|
4362
|
+
function Ga(e, a, n) {
|
|
4351
4363
|
const i = Ae(e, a.precision, n);
|
|
4352
4364
|
return a.unit ? `${i} ${a.unit}` : i;
|
|
4353
4365
|
}
|
|
4354
4366
|
function Zo({ def: e, visits: a, target: n, t: i, onTargetChange: s }) {
|
|
4355
4367
|
var p;
|
|
4356
|
-
const { t: o } = vi(), r = De(i), l = ((p = Wi(a, e)) == null ? void 0 : p.value) ?? null, c = Ho(l, n, e.key),
|
|
4368
|
+
const { t: o } = vi(), r = De(i), l = ((p = Wi(a, e)) == null ? void 0 : p.value) ?? null, c = Ho(l, n, e.key), u = i("anamnesis.targets.tileLabel", {
|
|
4357
4369
|
name: ze(e, i)
|
|
4358
4370
|
}), h = e.computed && l != null, g = l == null ? i("anamnesis.targets.nowUnset") : h ? i("anamnesis.targets.nowBanded", {
|
|
4359
|
-
value:
|
|
4371
|
+
value: Ga(l, e, r),
|
|
4360
4372
|
band: o(`bmiCalculator.category.${xi(l)}`)
|
|
4361
|
-
}) : i("anamnesis.targets.now", { value:
|
|
4373
|
+
}) : i("anamnesis.targets.now", { value: Ga(l, e, r) });
|
|
4362
4374
|
return /* @__PURE__ */ t(
|
|
4363
4375
|
Jo,
|
|
4364
4376
|
{
|
|
4365
4377
|
variant: "elevated",
|
|
4366
|
-
label:
|
|
4367
|
-
target: n == null ? i("anamnesis.targets.unset") :
|
|
4378
|
+
label: u,
|
|
4379
|
+
target: n == null ? i("anamnesis.targets.unset") : Ga(n, e, r),
|
|
4368
4380
|
now: g,
|
|
4369
4381
|
status: c,
|
|
4370
4382
|
statusLabel: c ? i(`anamnesis.targets.status.${c}`) : void 0,
|
|
@@ -4372,11 +4384,11 @@ function Zo({ def: e, visits: a, target: n, t: i, onTargetChange: s }) {
|
|
|
4372
4384
|
qt,
|
|
4373
4385
|
{
|
|
4374
4386
|
def: e,
|
|
4375
|
-
label:
|
|
4387
|
+
label: u,
|
|
4376
4388
|
committed: n,
|
|
4377
4389
|
nowLabel: g,
|
|
4378
4390
|
t: i,
|
|
4379
|
-
onCommit: (
|
|
4391
|
+
onCommit: (k) => s(e, k)
|
|
4380
4392
|
}
|
|
4381
4393
|
)
|
|
4382
4394
|
}
|
|
@@ -4427,7 +4439,7 @@ function Vt({
|
|
|
4427
4439
|
)
|
|
4428
4440
|
);
|
|
4429
4441
|
}
|
|
4430
|
-
function
|
|
4442
|
+
function Wa({
|
|
4431
4443
|
stripKeys: e,
|
|
4432
4444
|
defs: a,
|
|
4433
4445
|
visit: n,
|
|
@@ -4438,8 +4450,8 @@ function Qa({
|
|
|
4438
4450
|
onTargetChange: l
|
|
4439
4451
|
}) {
|
|
4440
4452
|
const c = De(o);
|
|
4441
|
-
return /* @__PURE__ */ t("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: a.filter((
|
|
4442
|
-
const h = $e(n,
|
|
4453
|
+
return /* @__PURE__ */ t("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: a.filter((u) => !u.computed).map((u) => {
|
|
4454
|
+
const h = $e(n, u), g = i ? $e(i, u) : null, p = i ? ba(h, g, u) : null, k = va(h, u.referenceRange), y = s.get(u.key) ?? null, f = Te(u, o), C = l != null && qi(u.key) && !e.has(u.key);
|
|
4443
4455
|
return /* @__PURE__ */ d(
|
|
4444
4456
|
"div",
|
|
4445
4457
|
{
|
|
@@ -4449,36 +4461,36 @@ function Qa({
|
|
|
4449
4461
|
ga,
|
|
4450
4462
|
{
|
|
4451
4463
|
value: h,
|
|
4452
|
-
mode: (
|
|
4453
|
-
onChange: (w) => r(
|
|
4464
|
+
mode: (u.precision ?? 0) > 0 ? "decimal" : "integer",
|
|
4465
|
+
onChange: (w) => r(u, w)
|
|
4454
4466
|
}
|
|
4455
4467
|
) }),
|
|
4456
4468
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4457
|
-
|
|
4458
|
-
/* @__PURE__ */ t(qa, { delta: p, def:
|
|
4469
|
+
k ? /* @__PURE__ */ t(bn, { flag: k, t: o }) : null,
|
|
4470
|
+
/* @__PURE__ */ t(qa, { delta: p, def: u, t: o }),
|
|
4459
4471
|
C || y != null ? /* @__PURE__ */ d("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
4460
4472
|
/* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: y == null ? o("anamnesis.targets.unset") : o("anamnesis.grid.target", {
|
|
4461
|
-
value: Ae(y,
|
|
4462
|
-
unit:
|
|
4473
|
+
value: Ae(y, u.precision, c),
|
|
4474
|
+
unit: u.unit ?? ""
|
|
4463
4475
|
}) }),
|
|
4464
4476
|
C ? /* @__PURE__ */ t(
|
|
4465
4477
|
qt,
|
|
4466
4478
|
{
|
|
4467
|
-
def:
|
|
4479
|
+
def: u,
|
|
4468
4480
|
label: f,
|
|
4469
4481
|
committed: y,
|
|
4470
4482
|
nowLabel: o("anamnesis.targets.now", {
|
|
4471
|
-
value: `${Ae(h,
|
|
4483
|
+
value: `${Ae(h, u.precision, c)} ${u.unit ?? ""}`.trim()
|
|
4472
4484
|
}),
|
|
4473
4485
|
t: o,
|
|
4474
|
-
onCommit: (w) => l == null ? void 0 : l(
|
|
4486
|
+
onCommit: (w) => l == null ? void 0 : l(u, w)
|
|
4475
4487
|
}
|
|
4476
4488
|
) : null
|
|
4477
4489
|
] }) : null
|
|
4478
4490
|
] })
|
|
4479
4491
|
]
|
|
4480
4492
|
},
|
|
4481
|
-
|
|
4493
|
+
u.key
|
|
4482
4494
|
);
|
|
4483
4495
|
}) });
|
|
4484
4496
|
}
|
|
@@ -4494,7 +4506,7 @@ function ge({
|
|
|
4494
4506
|
children: c
|
|
4495
4507
|
}) {
|
|
4496
4508
|
return /* @__PURE__ */ d(
|
|
4497
|
-
|
|
4509
|
+
ln,
|
|
4498
4510
|
{
|
|
4499
4511
|
variant: "default",
|
|
4500
4512
|
defaultOpen: r === void 0 ? n : void 0,
|
|
@@ -4530,7 +4542,7 @@ function ge({
|
|
|
4530
4542
|
}
|
|
4531
4543
|
) }),
|
|
4532
4544
|
/* @__PURE__ */ t(
|
|
4533
|
-
|
|
4545
|
+
cn,
|
|
4534
4546
|
{
|
|
4535
4547
|
"aria-label": a(e),
|
|
4536
4548
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
@@ -4551,66 +4563,66 @@ function ar({
|
|
|
4551
4563
|
statusSlot: r,
|
|
4552
4564
|
onOpenNote: l,
|
|
4553
4565
|
onMissingAnswerJump: c,
|
|
4554
|
-
onRecordChange:
|
|
4566
|
+
onRecordChange: u,
|
|
4555
4567
|
practitioners: h,
|
|
4556
4568
|
newVisitDateIso: g,
|
|
4557
4569
|
defaultView: p = "summary",
|
|
4558
|
-
defaultExportMenuOpen:
|
|
4570
|
+
defaultExportMenuOpen: k = !1,
|
|
4559
4571
|
defaultShareOpen: y = !1,
|
|
4560
4572
|
defaultExportAudience: f = "clinician"
|
|
4561
4573
|
}) {
|
|
4562
4574
|
var Rn;
|
|
4563
4575
|
const [C, w] = $(
|
|
4564
4576
|
() => structuredClone(e)
|
|
4565
|
-
),
|
|
4577
|
+
), E = we(!1);
|
|
4566
4578
|
ia(() => {
|
|
4567
|
-
if (!
|
|
4568
|
-
|
|
4579
|
+
if (!E.current) {
|
|
4580
|
+
E.current = !0;
|
|
4569
4581
|
return;
|
|
4570
4582
|
}
|
|
4571
|
-
|
|
4583
|
+
u == null || u(C);
|
|
4572
4584
|
}, [C]);
|
|
4573
|
-
const
|
|
4585
|
+
const D = we(0), { patient: T, visits: F } = C, A = F[F.length - 1], m = F.length > 1 ? F[F.length - 2] : void 0, N = O(
|
|
4574
4586
|
() => new Map(C.targets.map((v) => [v.parameterKey, v.target])),
|
|
4575
4587
|
[C.targets]
|
|
4576
|
-
),
|
|
4588
|
+
), x = O(
|
|
4577
4589
|
() => Ne(i, "anthropometric"),
|
|
4578
4590
|
[i]
|
|
4579
|
-
),
|
|
4591
|
+
), P = O(
|
|
4580
4592
|
() => Ne(i, "dietary"),
|
|
4581
4593
|
[i]
|
|
4582
|
-
),
|
|
4594
|
+
), S = O(() => Ne(i, "lab"), [i]), V = O(() => Ot(i), [i]), R = O(
|
|
4583
4595
|
() => new Set(V.map((v) => v.key)),
|
|
4584
4596
|
[V]
|
|
4585
|
-
),
|
|
4586
|
-
() => On(
|
|
4587
|
-
[
|
|
4588
|
-
), [
|
|
4589
|
-
const v = On(
|
|
4590
|
-
for (const
|
|
4597
|
+
), j = O(
|
|
4598
|
+
() => On(A, S),
|
|
4599
|
+
[A, S]
|
|
4600
|
+
), [G, z] = $(() => {
|
|
4601
|
+
const v = On(A, S), b = {};
|
|
4602
|
+
for (const L of xt) b[L] = v[L].open;
|
|
4591
4603
|
return b;
|
|
4592
4604
|
}), U = na(
|
|
4593
|
-
(v) => (b) => z((
|
|
4605
|
+
(v) => (b) => z((L) => ({ ...L, [v]: b })),
|
|
4594
4606
|
[]
|
|
4595
4607
|
), W = O(
|
|
4596
|
-
() =>
|
|
4608
|
+
() => je(i),
|
|
4597
4609
|
[i]
|
|
4598
|
-
), Z = O(() =>
|
|
4599
|
-
|
|
4600
|
-
(b) => b.length === v.length && b.every((
|
|
4610
|
+
), Z = O(() => hn(i), [i]), se = O(() => _a(i), [i]), [X, Ie] = $(p), [I, B] = $(!0), [ae, me] = $([]), ue = na((v) => {
|
|
4611
|
+
me(
|
|
4612
|
+
(b) => b.length === v.length && b.every((L, K) => L === v[K]) ? b : [...v]
|
|
4601
4613
|
);
|
|
4602
4614
|
}, []), { containerRef: Re, requestJump: Le } = ht(), Fe = na(
|
|
4603
4615
|
(v) => {
|
|
4604
|
-
var b,
|
|
4605
|
-
return (
|
|
4616
|
+
var b, L;
|
|
4617
|
+
return (L = (b = C.intake) == null ? void 0 : b.answers[v]) == null ? void 0 : L.value;
|
|
4606
4618
|
},
|
|
4607
4619
|
[C.intake]
|
|
4608
4620
|
), ka = O(
|
|
4609
|
-
() =>
|
|
4610
|
-
[W, Fe,
|
|
4621
|
+
() => ms(W, Fe, T.sex, a),
|
|
4622
|
+
[W, Fe, T.sex, a]
|
|
4611
4623
|
), da = O(
|
|
4612
|
-
() => pt(Z, Fe,
|
|
4613
|
-
[Z, Fe,
|
|
4624
|
+
() => pt(Z, Fe, T.sex, a),
|
|
4625
|
+
[Z, Fe, T.sex, a]
|
|
4614
4626
|
), [M] = $(() => new Set(da.map((v) => v.key))), H = (v) => {
|
|
4615
4627
|
if (c) {
|
|
4616
4628
|
c(v);
|
|
@@ -4618,7 +4630,7 @@ function ar({
|
|
|
4618
4630
|
}
|
|
4619
4631
|
Ie("compile"), B(!0), Le(v.key);
|
|
4620
4632
|
};
|
|
4621
|
-
if (!
|
|
4633
|
+
if (!A)
|
|
4622
4634
|
return /* @__PURE__ */ t(Qn, { embedded: n, children: /* @__PURE__ */ t(ve, { variant: "elevated", children: /* @__PURE__ */ t(ve.Body, { children: /* @__PURE__ */ t(
|
|
4623
4635
|
Ue,
|
|
4624
4636
|
{
|
|
@@ -4631,39 +4643,39 @@ function ar({
|
|
|
4631
4643
|
const Q = (v) => {
|
|
4632
4644
|
w((b) => {
|
|
4633
4645
|
if (b.visits.length === 0) return b;
|
|
4634
|
-
const
|
|
4635
|
-
return
|
|
4646
|
+
const L = b.visits.slice();
|
|
4647
|
+
return L[L.length - 1] = v(L[L.length - 1]), { ...b, visits: L };
|
|
4636
4648
|
});
|
|
4637
|
-
}, be = (v, b) => Q((
|
|
4649
|
+
}, be = (v, b) => Q((L) => _n(L, v, b)), Xe = (v, b, L) => w((K) => ({
|
|
4638
4650
|
...K,
|
|
4639
4651
|
visits: K.visits.map(
|
|
4640
|
-
(Je) => Je.id === v.id ? _n(Je, b,
|
|
4652
|
+
(Je) => Je.id === v.id ? _n(Je, b, L) : Je
|
|
4641
4653
|
)
|
|
4642
|
-
})),
|
|
4643
|
-
w((
|
|
4644
|
-
},
|
|
4645
|
-
...
|
|
4646
|
-
therapy:
|
|
4647
|
-
})),
|
|
4654
|
+
})), Ua = (v, b) => {
|
|
4655
|
+
w((L) => ct(L, v.key, b)), s == null || s(v.key, b);
|
|
4656
|
+
}, jt = (v) => Q((b) => ({ ...b, pathologyCodes: v })), In = (v, b) => Q((L) => ({
|
|
4657
|
+
...L,
|
|
4658
|
+
therapy: L.therapy.map((K) => K.id === v ? { ...K, ...b } : K)
|
|
4659
|
+
})), Gt = (v) => Q((b) => ({
|
|
4648
4660
|
...b,
|
|
4649
|
-
therapy: b.therapy.filter((
|
|
4661
|
+
therapy: b.therapy.filter((L) => L.id !== v)
|
|
4650
4662
|
})), Wt = () => {
|
|
4651
|
-
|
|
4652
|
-
const v = `new-${
|
|
4663
|
+
D.current += 1;
|
|
4664
|
+
const v = `new-${D.current}`;
|
|
4653
4665
|
Q((b) => ({
|
|
4654
4666
|
...b,
|
|
4655
4667
|
therapy: [...b.therapy, { id: v, name: "", dose: "", kind: "medication" }]
|
|
4656
4668
|
}));
|
|
4657
4669
|
}, Qt = () => {
|
|
4658
|
-
|
|
4659
|
-
const v = `new-visit-${
|
|
4670
|
+
D.current += 1;
|
|
4671
|
+
const v = `new-visit-${D.current}`;
|
|
4660
4672
|
w((b) => {
|
|
4661
|
-
const
|
|
4662
|
-
if (!
|
|
4673
|
+
const L = b.visits[b.visits.length - 1];
|
|
4674
|
+
if (!L) return b;
|
|
4663
4675
|
const K = {
|
|
4664
4676
|
id: v,
|
|
4665
4677
|
visitType: "followUp",
|
|
4666
|
-
dateIso: g ??
|
|
4678
|
+
dateIso: g ?? L.dateIso,
|
|
4667
4679
|
anthropometrics: {
|
|
4668
4680
|
weightKg: null,
|
|
4669
4681
|
heightCm: null,
|
|
@@ -4680,14 +4692,14 @@ function ar({
|
|
|
4680
4692
|
return { ...b, visits: [...b.visits, K] };
|
|
4681
4693
|
});
|
|
4682
4694
|
}, Yt = (v, b) => {
|
|
4683
|
-
w((
|
|
4695
|
+
w((L) => {
|
|
4684
4696
|
var K;
|
|
4685
4697
|
return {
|
|
4686
|
-
...
|
|
4698
|
+
...L,
|
|
4687
4699
|
intake: {
|
|
4688
|
-
...
|
|
4700
|
+
...L.intake,
|
|
4689
4701
|
answers: {
|
|
4690
|
-
...(K =
|
|
4702
|
+
...(K = L.intake) == null ? void 0 : K.answers,
|
|
4691
4703
|
[v]: { value: b, origin: "clinician" }
|
|
4692
4704
|
}
|
|
4693
4705
|
}
|
|
@@ -4695,28 +4707,28 @@ function ar({
|
|
|
4695
4707
|
});
|
|
4696
4708
|
}, Xt = Bi(i).map(
|
|
4697
4709
|
(v) => {
|
|
4698
|
-
const b = se[v],
|
|
4710
|
+
const b = se[v], L = b == null ? void 0 : b.parentCode;
|
|
4699
4711
|
return {
|
|
4700
4712
|
value: v,
|
|
4701
4713
|
label: Se(v, a, b),
|
|
4702
|
-
group:
|
|
4714
|
+
group: L ? yn(L, a, se[L]) : a("anamnesis.pathology.groupGeneral")
|
|
4703
4715
|
};
|
|
4704
4716
|
}
|
|
4705
|
-
), wa =
|
|
4717
|
+
), wa = A.oncological ?? {}, Na = A.annualProgramme ?? {
|
|
4706
4718
|
proposed: !1,
|
|
4707
4719
|
accepted: !1
|
|
4708
4720
|
}, Jt = /* @__PURE__ */ d(_e, { children: [
|
|
4709
4721
|
!n || r ? /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-end ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
4710
4722
|
n ? /* @__PURE__ */ t("span", {}) : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
4711
4723
|
/* @__PURE__ */ d("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: [
|
|
4712
|
-
|
|
4724
|
+
T.firstName,
|
|
4713
4725
|
" ",
|
|
4714
|
-
|
|
4726
|
+
T.lastName
|
|
4715
4727
|
] }),
|
|
4716
4728
|
/* @__PURE__ */ d("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: [
|
|
4717
4729
|
Oa(C, a),
|
|
4718
4730
|
" · ",
|
|
4719
|
-
a("anamnesis.compile.visitCount", { visits:
|
|
4731
|
+
a("anamnesis.compile.visitCount", { visits: F.length })
|
|
4720
4732
|
] })
|
|
4721
4733
|
] }),
|
|
4722
4734
|
r ? /* @__PURE__ */ t(
|
|
@@ -4731,11 +4743,11 @@ function ar({
|
|
|
4731
4743
|
o ? null : /* @__PURE__ */ t(
|
|
4732
4744
|
Vt,
|
|
4733
4745
|
{
|
|
4734
|
-
visits:
|
|
4746
|
+
visits: F,
|
|
4735
4747
|
defs: V,
|
|
4736
4748
|
targets: N,
|
|
4737
4749
|
t: a,
|
|
4738
|
-
onTargetChange:
|
|
4750
|
+
onTargetChange: Ua
|
|
4739
4751
|
}
|
|
4740
4752
|
),
|
|
4741
4753
|
/* @__PURE__ */ t(ve, { variant: "elevated", children: /* @__PURE__ */ t(ve.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: /* @__PURE__ */ d(
|
|
@@ -4758,7 +4770,7 @@ function ar({
|
|
|
4758
4770
|
t: a,
|
|
4759
4771
|
config: i,
|
|
4760
4772
|
shownVisitIds: ae,
|
|
4761
|
-
defaultOpen:
|
|
4773
|
+
defaultOpen: k,
|
|
4762
4774
|
defaultShareOpen: y,
|
|
4763
4775
|
defaultAudience: f
|
|
4764
4776
|
}
|
|
@@ -4769,7 +4781,7 @@ function ar({
|
|
|
4769
4781
|
{
|
|
4770
4782
|
intake: C.intake,
|
|
4771
4783
|
sections: W,
|
|
4772
|
-
sex:
|
|
4784
|
+
sex: T.sex,
|
|
4773
4785
|
digest: ka,
|
|
4774
4786
|
missing: da,
|
|
4775
4787
|
onJump: H,
|
|
@@ -4792,7 +4804,7 @@ function ar({
|
|
|
4792
4804
|
label: a("anamnesis.visitType.followUp")
|
|
4793
4805
|
}
|
|
4794
4806
|
],
|
|
4795
|
-
value:
|
|
4807
|
+
value: A.visitType,
|
|
4796
4808
|
onValueChange: (v) => Q((b) => ({
|
|
4797
4809
|
...b,
|
|
4798
4810
|
visitType: v || "followUp"
|
|
@@ -4803,7 +4815,7 @@ function ar({
|
|
|
4803
4815
|
Ve,
|
|
4804
4816
|
{
|
|
4805
4817
|
options: h,
|
|
4806
|
-
value:
|
|
4818
|
+
value: A.practitioner ?? "",
|
|
4807
4819
|
onValueChange: (v) => Q((b) => ({
|
|
4808
4820
|
...b,
|
|
4809
4821
|
practitioner: v || void 0
|
|
@@ -4812,7 +4824,7 @@ function ar({
|
|
|
4812
4824
|
) : /* @__PURE__ */ t(
|
|
4813
4825
|
ie,
|
|
4814
4826
|
{
|
|
4815
|
-
value:
|
|
4827
|
+
value: A.practitioner ?? "",
|
|
4816
4828
|
onChange: (v) => Q((b) => ({
|
|
4817
4829
|
...b,
|
|
4818
4830
|
practitioner: v.target.value
|
|
@@ -4822,7 +4834,7 @@ function ar({
|
|
|
4822
4834
|
/* @__PURE__ */ t(q, { label: a("anamnesis.header.visitDate"), children: /* @__PURE__ */ t(
|
|
4823
4835
|
ti,
|
|
4824
4836
|
{
|
|
4825
|
-
value: ts(
|
|
4837
|
+
value: ts(A.dateIso),
|
|
4826
4838
|
onChange: (v) => v && Q((b) => ({
|
|
4827
4839
|
...b,
|
|
4828
4840
|
dateIso: ss(v) + is(b.dateIso)
|
|
@@ -4859,27 +4871,27 @@ function ar({
|
|
|
4859
4871
|
ref: Re,
|
|
4860
4872
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]",
|
|
4861
4873
|
children: Z.map((v) => {
|
|
4862
|
-
const b = v.fields.filter((
|
|
4874
|
+
const b = v.fields.filter((L) => ca(L, T.sex)).filter((L) => M.has(L.key));
|
|
4863
4875
|
return b.length === 0 ? null : /* @__PURE__ */ d(
|
|
4864
4876
|
"div",
|
|
4865
4877
|
{
|
|
4866
4878
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
4867
4879
|
children: [
|
|
4868
4880
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: ye(v, a) }),
|
|
4869
|
-
b.map((
|
|
4881
|
+
b.map((L) => {
|
|
4870
4882
|
var Je;
|
|
4871
|
-
const K = (Je = C.intake) == null ? void 0 : Je.answers[
|
|
4883
|
+
const K = (Je = C.intake) == null ? void 0 : Je.answers[L.key];
|
|
4872
4884
|
return /* @__PURE__ */ t(
|
|
4873
4885
|
Mt,
|
|
4874
4886
|
{
|
|
4875
|
-
def:
|
|
4887
|
+
def: L,
|
|
4876
4888
|
answer: K == null ? void 0 : K.value,
|
|
4877
4889
|
origin: K == null ? void 0 : K.origin,
|
|
4878
4890
|
showOrigin: !0,
|
|
4879
|
-
onChange: (Zt) => Yt(
|
|
4891
|
+
onChange: (Zt) => Yt(L.key, Zt),
|
|
4880
4892
|
t: a
|
|
4881
4893
|
},
|
|
4882
|
-
|
|
4894
|
+
L.key
|
|
4883
4895
|
);
|
|
4884
4896
|
})
|
|
4885
4897
|
]
|
|
@@ -4895,30 +4907,30 @@ function ar({
|
|
|
4895
4907
|
/* @__PURE__ */ d(ge, { titleKey: "anamnesis.section.anthropometrics", t: a, children: [
|
|
4896
4908
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.bmiInStrip") }),
|
|
4897
4909
|
/* @__PURE__ */ t(
|
|
4898
|
-
|
|
4910
|
+
Wa,
|
|
4899
4911
|
{
|
|
4900
|
-
stripKeys:
|
|
4901
|
-
defs:
|
|
4902
|
-
visit:
|
|
4903
|
-
previous:
|
|
4912
|
+
stripKeys: R,
|
|
4913
|
+
defs: x,
|
|
4914
|
+
visit: A,
|
|
4915
|
+
previous: m,
|
|
4904
4916
|
targets: N,
|
|
4905
4917
|
t: a,
|
|
4906
4918
|
onChange: be,
|
|
4907
|
-
onTargetChange:
|
|
4919
|
+
onTargetChange: Ua
|
|
4908
4920
|
}
|
|
4909
4921
|
)
|
|
4910
4922
|
] }),
|
|
4911
|
-
|
|
4912
|
-
|
|
4923
|
+
P.length > 0 ? /* @__PURE__ */ t(ge, { titleKey: "anamnesis.section.dietary", t: a, children: /* @__PURE__ */ t(
|
|
4924
|
+
Wa,
|
|
4913
4925
|
{
|
|
4914
|
-
stripKeys:
|
|
4915
|
-
defs:
|
|
4916
|
-
visit:
|
|
4917
|
-
previous:
|
|
4926
|
+
stripKeys: R,
|
|
4927
|
+
defs: P,
|
|
4928
|
+
visit: A,
|
|
4929
|
+
previous: m,
|
|
4918
4930
|
targets: N,
|
|
4919
4931
|
t: a,
|
|
4920
4932
|
onChange: be,
|
|
4921
|
-
onTargetChange:
|
|
4933
|
+
onTargetChange: Ua
|
|
4922
4934
|
}
|
|
4923
4935
|
) }) : null,
|
|
4924
4936
|
/* @__PURE__ */ t(ge, { titleKey: "anamnesis.section.pathologies", t: a, children: /* @__PURE__ */ t(
|
|
@@ -4927,15 +4939,15 @@ function ar({
|
|
|
4927
4939
|
label: a("anamnesis.compile.pathologiesLabel"),
|
|
4928
4940
|
description: a("anamnesis.compile.pathologiesHelp"),
|
|
4929
4941
|
children: /* @__PURE__ */ t(
|
|
4930
|
-
|
|
4942
|
+
dn,
|
|
4931
4943
|
{
|
|
4932
4944
|
options: Xt,
|
|
4933
|
-
value:
|
|
4945
|
+
value: A.pathologyCodes,
|
|
4934
4946
|
allowClear: !0,
|
|
4935
4947
|
placeholder: a(
|
|
4936
4948
|
"anamnesis.compile.pathologiesPlaceholder"
|
|
4937
4949
|
),
|
|
4938
|
-
onChange:
|
|
4950
|
+
onChange: jt
|
|
4939
4951
|
}
|
|
4940
4952
|
)
|
|
4941
4953
|
}
|
|
@@ -4945,9 +4957,9 @@ function ar({
|
|
|
4945
4957
|
{
|
|
4946
4958
|
titleKey: "anamnesis.section.oncological",
|
|
4947
4959
|
t: a,
|
|
4948
|
-
open:
|
|
4960
|
+
open: G.oncological,
|
|
4949
4961
|
onOpenChange: U("oncological"),
|
|
4950
|
-
fill:
|
|
4962
|
+
fill: j.oncological.fill,
|
|
4951
4963
|
children: /* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
4952
4964
|
/* @__PURE__ */ t(q, { label: a("anamnesis.field.tumourType.label"), children: /* @__PURE__ */ t(
|
|
4953
4965
|
ie,
|
|
@@ -4982,14 +4994,14 @@ function ar({
|
|
|
4982
4994
|
variant: "horizontal",
|
|
4983
4995
|
value: ((Rn = wa.metastases) == null ? void 0 : Rn.present) ?? "unknown",
|
|
4984
4996
|
onValueChange: (v) => Q((b) => {
|
|
4985
|
-
var
|
|
4997
|
+
var L, K;
|
|
4986
4998
|
return {
|
|
4987
4999
|
...b,
|
|
4988
5000
|
oncological: {
|
|
4989
5001
|
...b.oncological,
|
|
4990
5002
|
metastases: {
|
|
4991
5003
|
present: v,
|
|
4992
|
-
site: (K = (
|
|
5004
|
+
site: (K = (L = b.oncological) == null ? void 0 : L.metastases) == null ? void 0 : K.site
|
|
4993
5005
|
}
|
|
4994
5006
|
}
|
|
4995
5007
|
};
|
|
@@ -5030,7 +5042,7 @@ function ar({
|
|
|
5030
5042
|
}
|
|
5031
5043
|
),
|
|
5032
5044
|
/* @__PURE__ */ t(ge, { titleKey: "anamnesis.section.therapy", t: a, children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
5033
|
-
|
|
5045
|
+
A.therapy.length === 0 ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.noTherapy") }) : A.therapy.map((v) => /* @__PURE__ */ d(
|
|
5034
5046
|
"div",
|
|
5035
5047
|
{
|
|
5036
5048
|
className: "ds:flex ds:flex-wrap ds:items-end ds:gap-[var(--spacing-sm)]",
|
|
@@ -5075,7 +5087,7 @@ function ar({
|
|
|
5075
5087
|
"aria-label": a("anamnesis.compile.removeTherapy", {
|
|
5076
5088
|
name: v.name
|
|
5077
5089
|
}),
|
|
5078
|
-
onClick: () =>
|
|
5090
|
+
onClick: () => Gt(v.id)
|
|
5079
5091
|
}
|
|
5080
5092
|
)
|
|
5081
5093
|
]
|
|
@@ -5098,17 +5110,17 @@ function ar({
|
|
|
5098
5110
|
{
|
|
5099
5111
|
titleKey: "anamnesis.section.labs",
|
|
5100
5112
|
t: a,
|
|
5101
|
-
open:
|
|
5113
|
+
open: G.labs,
|
|
5102
5114
|
onOpenChange: U("labs"),
|
|
5103
|
-
fill:
|
|
5104
|
-
flagged:
|
|
5115
|
+
fill: j.labs.fill,
|
|
5116
|
+
flagged: j.labs.flagged,
|
|
5105
5117
|
children: /* @__PURE__ */ t(
|
|
5106
|
-
|
|
5118
|
+
Wa,
|
|
5107
5119
|
{
|
|
5108
|
-
stripKeys:
|
|
5109
|
-
defs:
|
|
5110
|
-
visit:
|
|
5111
|
-
previous:
|
|
5120
|
+
stripKeys: R,
|
|
5121
|
+
defs: S,
|
|
5122
|
+
visit: A,
|
|
5123
|
+
previous: m,
|
|
5112
5124
|
targets: N,
|
|
5113
5125
|
t: a,
|
|
5114
5126
|
onChange: be
|
|
@@ -5121,10 +5133,10 @@ function ar({
|
|
|
5121
5133
|
{
|
|
5122
5134
|
titleKey: "anamnesis.section.fmd",
|
|
5123
5135
|
t: a,
|
|
5124
|
-
open:
|
|
5136
|
+
open: G.fmd,
|
|
5125
5137
|
onOpenChange: U("fmd"),
|
|
5126
|
-
fill:
|
|
5127
|
-
children:
|
|
5138
|
+
fill: j.fmd.fill,
|
|
5139
|
+
children: A.fmdCycles.length === 0 ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.noFmd") }) : /* @__PURE__ */ t("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: A.fmdCycles.map((v) => /* @__PURE__ */ d(
|
|
5128
5140
|
"li",
|
|
5129
5141
|
{
|
|
5130
5142
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
@@ -5164,7 +5176,7 @@ function ar({
|
|
|
5164
5176
|
children: /* @__PURE__ */ t(
|
|
5165
5177
|
ta,
|
|
5166
5178
|
{
|
|
5167
|
-
value:
|
|
5179
|
+
value: A.nutritionalProposal ?? "",
|
|
5168
5180
|
autoResize: !0,
|
|
5169
5181
|
minRows: 2,
|
|
5170
5182
|
onChange: (v) => Q((b) => ({
|
|
@@ -5178,7 +5190,7 @@ function ar({
|
|
|
5178
5190
|
/* @__PURE__ */ t(q, { label: a("anamnesis.field.clinicalNotes.label"), children: /* @__PURE__ */ t(
|
|
5179
5191
|
ta,
|
|
5180
5192
|
{
|
|
5181
|
-
value:
|
|
5193
|
+
value: A.clinicalNotes ?? "",
|
|
5182
5194
|
autoResize: !0,
|
|
5183
5195
|
minRows: 2,
|
|
5184
5196
|
onChange: (v) => Q((b) => ({
|
|
@@ -5193,9 +5205,9 @@ function ar({
|
|
|
5193
5205
|
{
|
|
5194
5206
|
titleKey: "anamnesis.section.annual",
|
|
5195
5207
|
t: a,
|
|
5196
|
-
open:
|
|
5208
|
+
open: G.annual,
|
|
5197
5209
|
onOpenChange: U("annual"),
|
|
5198
|
-
fill:
|
|
5210
|
+
fill: j.annual.fill,
|
|
5199
5211
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
5200
5212
|
/* @__PURE__ */ d(
|
|
5201
5213
|
ha,
|
|
@@ -5204,12 +5216,12 @@ function ar({
|
|
|
5204
5216
|
variant: "horizontal",
|
|
5205
5217
|
value: Na.proposed ? "yes" : "no",
|
|
5206
5218
|
onValueChange: (v) => Q((b) => {
|
|
5207
|
-
var
|
|
5219
|
+
var L, K;
|
|
5208
5220
|
return {
|
|
5209
5221
|
...b,
|
|
5210
5222
|
annualProgramme: {
|
|
5211
5223
|
proposed: v === "yes",
|
|
5212
|
-
accepted: ((
|
|
5224
|
+
accepted: ((L = b.annualProgramme) == null ? void 0 : L.accepted) ?? !1,
|
|
5213
5225
|
declineReason: (K = b.annualProgramme) == null ? void 0 : K.declineReason
|
|
5214
5226
|
}
|
|
5215
5227
|
};
|
|
@@ -5227,11 +5239,11 @@ function ar({
|
|
|
5227
5239
|
variant: "horizontal",
|
|
5228
5240
|
value: Na.accepted ? "yes" : "no",
|
|
5229
5241
|
onValueChange: (v) => Q((b) => {
|
|
5230
|
-
var
|
|
5242
|
+
var L, K;
|
|
5231
5243
|
return {
|
|
5232
5244
|
...b,
|
|
5233
5245
|
annualProgramme: {
|
|
5234
|
-
proposed: ((
|
|
5246
|
+
proposed: ((L = b.annualProgramme) == null ? void 0 : L.proposed) ?? !1,
|
|
5235
5247
|
accepted: v === "yes",
|
|
5236
5248
|
declineReason: (K = b.annualProgramme) == null ? void 0 : K.declineReason
|
|
5237
5249
|
}
|
|
@@ -5254,11 +5266,11 @@ function ar({
|
|
|
5254
5266
|
autoResize: !0,
|
|
5255
5267
|
minRows: 2,
|
|
5256
5268
|
onChange: (v) => Q((b) => {
|
|
5257
|
-
var
|
|
5269
|
+
var L, K;
|
|
5258
5270
|
return {
|
|
5259
5271
|
...b,
|
|
5260
5272
|
annualProgramme: {
|
|
5261
|
-
proposed: ((
|
|
5273
|
+
proposed: ((L = b.annualProgramme) == null ? void 0 : L.proposed) ?? !1,
|
|
5262
5274
|
accepted: ((K = b.annualProgramme) == null ? void 0 : K.accepted) ?? !1,
|
|
5263
5275
|
declineReason: v.target.value
|
|
5264
5276
|
}
|
|
@@ -5281,7 +5293,7 @@ function ar({
|
|
|
5281
5293
|
config: i,
|
|
5282
5294
|
framed: !1,
|
|
5283
5295
|
onCellChange: Xe,
|
|
5284
|
-
onVisitSelectionChange:
|
|
5296
|
+
onVisitSelectionChange: ue,
|
|
5285
5297
|
onOpenNote: l
|
|
5286
5298
|
}
|
|
5287
5299
|
) }) }) })
|
|
@@ -5297,7 +5309,7 @@ function Qn({
|
|
|
5297
5309
|
}) {
|
|
5298
5310
|
return e ? /* @__PURE__ */ t("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-lg)]", children: a }) : /* @__PURE__ */ t("div", { className: "ds:min-h-[100dvh] ds:w-full ds:bg-[color:var(--app-shell-background)] ds:py-[var(--spacing-lg)]", children: /* @__PURE__ */ t("div", { className: "ds:mx-auto ds:flex ds:w-full ds:max-w-[76rem] ds:flex-col ds:gap-[var(--spacing-lg)] ds:px-[var(--spacing-md)]", children: a }) });
|
|
5299
5311
|
}
|
|
5300
|
-
function
|
|
5312
|
+
function Qa(e) {
|
|
5301
5313
|
var i;
|
|
5302
5314
|
const a = {}, n = ((i = e.intake) == null ? void 0 : i.answers) ?? {};
|
|
5303
5315
|
for (const [s, o] of Object.entries(n))
|
|
@@ -5314,7 +5326,7 @@ function Bt({
|
|
|
5314
5326
|
jumpToField: r,
|
|
5315
5327
|
readOnly: l = !1
|
|
5316
5328
|
}) {
|
|
5317
|
-
const { patient: c } = e,
|
|
5329
|
+
const { patient: c } = e, u = Ma(e), [h, g] = $(() => Qa(e)), [p, k] = $(
|
|
5318
5330
|
() => {
|
|
5319
5331
|
var z;
|
|
5320
5332
|
return ((z = e.intake) == null ? void 0 : z.submittedAtIso) != null;
|
|
@@ -5322,7 +5334,7 @@ function Bt({
|
|
|
5322
5334
|
), y = (z, U) => {
|
|
5323
5335
|
g((W) => ({ ...W, [z]: U }));
|
|
5324
5336
|
}, f = O(
|
|
5325
|
-
() =>
|
|
5337
|
+
() => hn(i).map((z) => ({
|
|
5326
5338
|
...z,
|
|
5327
5339
|
fields: z.fields.filter((U) => ca(U, c.sex))
|
|
5328
5340
|
})).filter((z) => z.fields.length > 0),
|
|
@@ -5336,15 +5348,15 @@ function Bt({
|
|
|
5336
5348
|
(X) => zt(X, z[X.key])
|
|
5337
5349
|
) && U.add(se.key);
|
|
5338
5350
|
return [...U];
|
|
5339
|
-
}, [w,
|
|
5340
|
-
() => C(
|
|
5341
|
-
),
|
|
5342
|
-
if (e.intake !==
|
|
5343
|
-
|
|
5344
|
-
const z =
|
|
5345
|
-
g(z),
|
|
5351
|
+
}, [w, E] = $(
|
|
5352
|
+
() => C(Qa(e))
|
|
5353
|
+
), D = (z) => E((U) => U.includes(z) ? U : [...U, z]), [T, F] = $(e.intake);
|
|
5354
|
+
if (e.intake !== T) {
|
|
5355
|
+
F(e.intake);
|
|
5356
|
+
const z = Qa(e);
|
|
5357
|
+
g(z), E(C(z));
|
|
5346
5358
|
}
|
|
5347
|
-
const { containerRef:
|
|
5359
|
+
const { containerRef: A, requestJump: m } = ht(), N = O(
|
|
5348
5360
|
() => pt(
|
|
5349
5361
|
f,
|
|
5350
5362
|
(z) => h[z],
|
|
@@ -5352,46 +5364,46 @@ function Bt({
|
|
|
5352
5364
|
a
|
|
5353
5365
|
),
|
|
5354
5366
|
[f, h, c.sex, a]
|
|
5355
|
-
),
|
|
5356
|
-
|
|
5367
|
+
), x = (z) => {
|
|
5368
|
+
D(z.sectionKey), m(z.key);
|
|
5357
5369
|
};
|
|
5358
5370
|
ia(() => {
|
|
5359
5371
|
if (!r) return;
|
|
5360
5372
|
const z = f.find(
|
|
5361
5373
|
(U) => U.fields.some((W) => W.key === r)
|
|
5362
5374
|
);
|
|
5363
|
-
z && (
|
|
5375
|
+
z && (D(z.key), m(r));
|
|
5364
5376
|
}, [r]);
|
|
5365
|
-
const { answeredCount:
|
|
5377
|
+
const { answeredCount: P, totalCount: S } = O(() => {
|
|
5366
5378
|
let z = 0, U = 0;
|
|
5367
5379
|
for (const W of f)
|
|
5368
5380
|
for (const Z of W.fields)
|
|
5369
5381
|
U += 1, ra(h[Z.key]) && (z += 1);
|
|
5370
5382
|
return { answeredCount: z, totalCount: U };
|
|
5371
|
-
}, [f, h]), V =
|
|
5372
|
-
answered:
|
|
5373
|
-
total:
|
|
5374
|
-
}),
|
|
5383
|
+
}, [f, h]), V = S === 0 ? 0 : Math.round(P / S * 100), R = a("anamnesis.intake.answered", {
|
|
5384
|
+
answered: P,
|
|
5385
|
+
total: S
|
|
5386
|
+
}), j = N.length > 0 && (P > 0 || p), G = /* @__PURE__ */ d(_e, { children: [
|
|
5375
5387
|
n ? null : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
5376
5388
|
/* @__PURE__ */ t("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: a("anamnesis.intake.title") }),
|
|
5377
5389
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.intake.subtitle") })
|
|
5378
5390
|
] }),
|
|
5379
|
-
n ? null : /* @__PURE__ */ d(
|
|
5380
|
-
/* @__PURE__ */ d(
|
|
5381
|
-
/* @__PURE__ */ t(
|
|
5382
|
-
/* @__PURE__ */ d(
|
|
5391
|
+
n ? null : /* @__PURE__ */ d(_, { layout: "inline", labelWidth: "fixed", divider: "between", children: [
|
|
5392
|
+
/* @__PURE__ */ d(_.Row, { children: [
|
|
5393
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.name") }),
|
|
5394
|
+
/* @__PURE__ */ d(_.Detail, { children: [
|
|
5383
5395
|
c.firstName,
|
|
5384
5396
|
" ",
|
|
5385
5397
|
c.lastName
|
|
5386
5398
|
] })
|
|
5387
5399
|
] }),
|
|
5388
|
-
|
|
5389
|
-
/* @__PURE__ */ t(
|
|
5390
|
-
/* @__PURE__ */ t(
|
|
5400
|
+
u ? /* @__PURE__ */ d(_.Row, { children: [
|
|
5401
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.age") }),
|
|
5402
|
+
/* @__PURE__ */ t(_.Detail, { children: Oa(e, a) })
|
|
5391
5403
|
] }) : null,
|
|
5392
|
-
/* @__PURE__ */ d(
|
|
5393
|
-
/* @__PURE__ */ t(
|
|
5394
|
-
/* @__PURE__ */ t(
|
|
5404
|
+
/* @__PURE__ */ d(_.Row, { children: [
|
|
5405
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.dob") }),
|
|
5406
|
+
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ t(
|
|
5395
5407
|
sa,
|
|
5396
5408
|
{
|
|
5397
5409
|
value: c.dateOfBirthIso,
|
|
@@ -5401,40 +5413,40 @@ function Bt({
|
|
|
5401
5413
|
}
|
|
5402
5414
|
) })
|
|
5403
5415
|
] }),
|
|
5404
|
-
|
|
5405
|
-
/* @__PURE__ */ t(
|
|
5406
|
-
/* @__PURE__ */ t(
|
|
5416
|
+
u ? /* @__PURE__ */ d(_.Row, { children: [
|
|
5417
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.visitDate") }),
|
|
5418
|
+
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ t(
|
|
5407
5419
|
sa,
|
|
5408
5420
|
{
|
|
5409
|
-
value:
|
|
5421
|
+
value: u.dateIso,
|
|
5410
5422
|
format: "absolute",
|
|
5411
5423
|
shape: "bare",
|
|
5412
|
-
absoluteFormat: za(
|
|
5424
|
+
absoluteFormat: za(u.dateIso)
|
|
5413
5425
|
}
|
|
5414
5426
|
) })
|
|
5415
5427
|
] }) : null
|
|
5416
5428
|
] }),
|
|
5417
5429
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
5418
|
-
/* @__PURE__ */ t(Si, { value: V, ariaLabel:
|
|
5430
|
+
/* @__PURE__ */ t(Si, { value: V, ariaLabel: R }),
|
|
5419
5431
|
/* @__PURE__ */ t(
|
|
5420
5432
|
"p",
|
|
5421
5433
|
{
|
|
5422
5434
|
className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]",
|
|
5423
5435
|
"aria-live": "polite",
|
|
5424
|
-
children:
|
|
5436
|
+
children: R
|
|
5425
5437
|
}
|
|
5426
5438
|
)
|
|
5427
5439
|
] }),
|
|
5428
|
-
|
|
5440
|
+
j ? /* @__PURE__ */ t(
|
|
5429
5441
|
gt,
|
|
5430
5442
|
{
|
|
5431
5443
|
missing: N,
|
|
5432
5444
|
t: a,
|
|
5433
|
-
onJump:
|
|
5445
|
+
onJump: x,
|
|
5434
5446
|
announce: "off"
|
|
5435
5447
|
}
|
|
5436
5448
|
) : null,
|
|
5437
|
-
/* @__PURE__ */ t(ve, { variant: "elevated", children: /* @__PURE__ */ t(ve.Body, { ref:
|
|
5449
|
+
/* @__PURE__ */ t(ve, { variant: "elevated", children: /* @__PURE__ */ t(ve.Body, { ref: A, children: /* @__PURE__ */ d(
|
|
5438
5450
|
"section",
|
|
5439
5451
|
{
|
|
5440
5452
|
"aria-label": a("anamnesis.intake.sectionsLabel"),
|
|
@@ -5455,7 +5467,7 @@ function Bt({
|
|
|
5455
5467
|
type: "multiple",
|
|
5456
5468
|
variant: "default",
|
|
5457
5469
|
value: w,
|
|
5458
|
-
onValueChange:
|
|
5470
|
+
onValueChange: E,
|
|
5459
5471
|
children: f.map((z) => {
|
|
5460
5472
|
const U = z.fields.filter(
|
|
5461
5473
|
(W) => ra(h[W.key])
|
|
@@ -5502,14 +5514,14 @@ function Bt({
|
|
|
5502
5514
|
startIcon: /* @__PURE__ */ t(Li, { "aria-hidden": "true" }),
|
|
5503
5515
|
"data-testid": "anamnesis-intake-submit",
|
|
5504
5516
|
onClick: () => {
|
|
5505
|
-
|
|
5517
|
+
k(!0), o == null || o(h);
|
|
5506
5518
|
},
|
|
5507
5519
|
children: a("anamnesis.intake.submit")
|
|
5508
5520
|
}
|
|
5509
5521
|
) })
|
|
5510
5522
|
] })
|
|
5511
5523
|
] });
|
|
5512
|
-
return n ? /* @__PURE__ */ t("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-lg)]", children:
|
|
5524
|
+
return n ? /* @__PURE__ */ t("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-lg)]", children: G }) : /* @__PURE__ */ t("div", { className: "ds:min-h-[100dvh] ds:w-full ds:bg-[color:var(--app-shell-background)] ds:py-[var(--spacing-xl)]", children: /* @__PURE__ */ t("div", { className: "ds:mx-auto ds:flex ds:w-full ds:max-w-[48rem] ds:flex-col ds:gap-[var(--spacing-lg)] ds:px-[var(--spacing-md)]", children: G }) });
|
|
5513
5525
|
}
|
|
5514
5526
|
function xe({
|
|
5515
5527
|
titleKey: e,
|
|
@@ -5521,7 +5533,7 @@ function xe({
|
|
|
5521
5533
|
n
|
|
5522
5534
|
] });
|
|
5523
5535
|
}
|
|
5524
|
-
function
|
|
5536
|
+
function Ya({
|
|
5525
5537
|
defs: e,
|
|
5526
5538
|
visit: a,
|
|
5527
5539
|
previous: n,
|
|
@@ -5529,17 +5541,17 @@ function Xa({
|
|
|
5529
5541
|
t: s
|
|
5530
5542
|
}) {
|
|
5531
5543
|
const o = De(s);
|
|
5532
|
-
return /* @__PURE__ */ t(
|
|
5533
|
-
const l = $e(a, r), c = n ? $e(n, r) : null,
|
|
5534
|
-
return /* @__PURE__ */ d(
|
|
5535
|
-
/* @__PURE__ */ d(
|
|
5544
|
+
return /* @__PURE__ */ t(_, { layout: "inline", labelWidth: "fixed", divider: "between", children: e.map((r) => {
|
|
5545
|
+
const l = $e(a, r), c = n ? $e(n, r) : null, u = n ? ba(l, c, r) : null, h = va(l, r.referenceRange), g = i.get(r.key) ?? null;
|
|
5546
|
+
return /* @__PURE__ */ d(_.Row, { children: [
|
|
5547
|
+
/* @__PURE__ */ d(_.Term, { children: [
|
|
5536
5548
|
ze(r, s),
|
|
5537
5549
|
r.unit ? ` (${r.unit})` : ""
|
|
5538
5550
|
] }),
|
|
5539
|
-
/* @__PURE__ */ t(
|
|
5551
|
+
/* @__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: [
|
|
5540
5552
|
/* @__PURE__ */ t("span", { className: "ds:text-[color:var(--foreground)]", children: Ae(l, r.precision, o) }),
|
|
5541
|
-
h ? /* @__PURE__ */ t(
|
|
5542
|
-
/* @__PURE__ */ t(qa, { delta:
|
|
5553
|
+
h ? /* @__PURE__ */ t(bn, { flag: h, t: s }) : null,
|
|
5554
|
+
/* @__PURE__ */ t(qa, { delta: u, def: r, t: s }),
|
|
5543
5555
|
g != null ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.grid.target", {
|
|
5544
5556
|
value: Ae(g, r.precision, o),
|
|
5545
5557
|
unit: r.unit ?? ""
|
|
@@ -5555,9 +5567,9 @@ function nr({
|
|
|
5555
5567
|
config: i,
|
|
5556
5568
|
onOpenNote: s
|
|
5557
5569
|
}) {
|
|
5558
|
-
const { patient: o, visits: r } = e, l = r[r.length - 1], c = r.length > 1 ? r[r.length - 2] : void 0,
|
|
5559
|
-
e.targets.map((
|
|
5560
|
-
), h = Pe(i, "anthropometric"), g = Pe(i, "dietary"), p = Pe(i, "lab"),
|
|
5570
|
+
const { patient: o, visits: r } = e, l = r[r.length - 1], c = r.length > 1 ? r[r.length - 2] : void 0, u = new Map(
|
|
5571
|
+
e.targets.map((E) => [E.parameterKey, E.target])
|
|
5572
|
+
), h = Pe(i, "anthropometric"), g = Pe(i, "dietary"), p = Pe(i, "lab"), k = je(i), y = _a(i);
|
|
5561
5573
|
if (!l)
|
|
5562
5574
|
return /* @__PURE__ */ t(Yn, { embedded: n, children: /* @__PURE__ */ t(ve, { variant: "elevated", children: /* @__PURE__ */ t(ve.Body, { children: /* @__PURE__ */ t(
|
|
5563
5575
|
Ue,
|
|
@@ -5579,27 +5591,27 @@ function nr({
|
|
|
5579
5591
|
] }),
|
|
5580
5592
|
/* @__PURE__ */ t(ve, { variant: "elevated", children: /* @__PURE__ */ d(ve.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
|
|
5581
5593
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.readOnly.summary", t: a, children: /* @__PURE__ */ d(
|
|
5582
|
-
|
|
5594
|
+
_,
|
|
5583
5595
|
{
|
|
5584
5596
|
layout: "inline",
|
|
5585
5597
|
labelWidth: "fixed",
|
|
5586
5598
|
divider: "between",
|
|
5587
5599
|
children: [
|
|
5588
|
-
/* @__PURE__ */ d(
|
|
5589
|
-
/* @__PURE__ */ t(
|
|
5590
|
-
/* @__PURE__ */ d(
|
|
5600
|
+
/* @__PURE__ */ d(_.Row, { children: [
|
|
5601
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.name") }),
|
|
5602
|
+
/* @__PURE__ */ d(_.Detail, { children: [
|
|
5591
5603
|
o.firstName,
|
|
5592
5604
|
" ",
|
|
5593
5605
|
o.lastName
|
|
5594
5606
|
] })
|
|
5595
5607
|
] }),
|
|
5596
|
-
/* @__PURE__ */ d(
|
|
5597
|
-
/* @__PURE__ */ t(
|
|
5598
|
-
/* @__PURE__ */ t(
|
|
5608
|
+
/* @__PURE__ */ d(_.Row, { children: [
|
|
5609
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.age") }),
|
|
5610
|
+
/* @__PURE__ */ t(_.Detail, { children: Oa(e, a) })
|
|
5599
5611
|
] }),
|
|
5600
|
-
/* @__PURE__ */ d(
|
|
5601
|
-
/* @__PURE__ */ t(
|
|
5602
|
-
/* @__PURE__ */ t(
|
|
5612
|
+
/* @__PURE__ */ d(_.Row, { children: [
|
|
5613
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.header.visitDate") }),
|
|
5614
|
+
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ t(
|
|
5603
5615
|
sa,
|
|
5604
5616
|
{
|
|
5605
5617
|
value: l.dateIso,
|
|
@@ -5609,82 +5621,82 @@ function nr({
|
|
|
5609
5621
|
}
|
|
5610
5622
|
) })
|
|
5611
5623
|
] }),
|
|
5612
|
-
l.practitioner ? /* @__PURE__ */ d(
|
|
5613
|
-
/* @__PURE__ */ t(
|
|
5614
|
-
/* @__PURE__ */ t(
|
|
5624
|
+
l.practitioner ? /* @__PURE__ */ d(_.Row, { children: [
|
|
5625
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.field.practitioner.label") }),
|
|
5626
|
+
/* @__PURE__ */ t(_.Detail, { children: l.practitioner })
|
|
5615
5627
|
] }) : null
|
|
5616
5628
|
]
|
|
5617
5629
|
}
|
|
5618
5630
|
) }),
|
|
5619
5631
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.anthropometrics", t: a, children: /* @__PURE__ */ t(
|
|
5620
|
-
|
|
5632
|
+
Ya,
|
|
5621
5633
|
{
|
|
5622
5634
|
defs: h,
|
|
5623
5635
|
visit: l,
|
|
5624
5636
|
previous: c,
|
|
5625
|
-
targets:
|
|
5637
|
+
targets: u,
|
|
5626
5638
|
t: a
|
|
5627
5639
|
}
|
|
5628
5640
|
) }),
|
|
5629
5641
|
g.length > 0 ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.dietary", t: a, children: /* @__PURE__ */ t(
|
|
5630
|
-
|
|
5642
|
+
Ya,
|
|
5631
5643
|
{
|
|
5632
5644
|
defs: g,
|
|
5633
5645
|
visit: l,
|
|
5634
5646
|
previous: c,
|
|
5635
|
-
targets:
|
|
5647
|
+
targets: u,
|
|
5636
5648
|
t: a
|
|
5637
5649
|
}
|
|
5638
5650
|
) }) : null,
|
|
5639
|
-
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.pathologies", t: a, children: l.pathologyCodes.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: l.pathologyCodes.map((
|
|
5651
|
+
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.pathologies", t: a, children: l.pathologyCodes.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: l.pathologyCodes.map((E) => /* @__PURE__ */ t(J, { variant: "neutral", size: "md", children: Se(E, a, y[E]) }, E)) }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.readOnly.none") }) }),
|
|
5640
5652
|
f ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.oncological", t: a, children: /* @__PURE__ */ d(
|
|
5641
|
-
|
|
5653
|
+
_,
|
|
5642
5654
|
{
|
|
5643
5655
|
layout: "inline",
|
|
5644
5656
|
labelWidth: "fixed",
|
|
5645
5657
|
divider: "between",
|
|
5646
5658
|
children: [
|
|
5647
|
-
f.tumourType ? /* @__PURE__ */ d(
|
|
5648
|
-
/* @__PURE__ */ t(
|
|
5649
|
-
/* @__PURE__ */ t(
|
|
5659
|
+
f.tumourType ? /* @__PURE__ */ d(_.Row, { children: [
|
|
5660
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.field.tumourType.label") }),
|
|
5661
|
+
/* @__PURE__ */ t(_.Detail, { children: f.tumourType })
|
|
5650
5662
|
] }) : null,
|
|
5651
|
-
f.stage ? /* @__PURE__ */ d(
|
|
5652
|
-
/* @__PURE__ */ t(
|
|
5653
|
-
/* @__PURE__ */ t(
|
|
5663
|
+
f.stage ? /* @__PURE__ */ d(_.Row, { children: [
|
|
5664
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.field.stage.label") }),
|
|
5665
|
+
/* @__PURE__ */ t(_.Detail, { children: f.stage })
|
|
5654
5666
|
] }) : null,
|
|
5655
|
-
f.treatmentStatus ? /* @__PURE__ */ d(
|
|
5656
|
-
/* @__PURE__ */ t(
|
|
5657
|
-
/* @__PURE__ */ t(
|
|
5667
|
+
f.treatmentStatus ? /* @__PURE__ */ d(_.Row, { children: [
|
|
5668
|
+
/* @__PURE__ */ t(_.Term, { children: a("anamnesis.field.treatmentStatus.label") }),
|
|
5669
|
+
/* @__PURE__ */ t(_.Detail, { children: f.treatmentStatus })
|
|
5658
5670
|
] }) : null
|
|
5659
5671
|
]
|
|
5660
5672
|
}
|
|
5661
5673
|
) }) : null,
|
|
5662
|
-
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.therapy", t: a, children: l.therapy.length > 0 ? /* @__PURE__ */ t("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: l.therapy.map((
|
|
5674
|
+
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.therapy", t: a, children: l.therapy.length > 0 ? /* @__PURE__ */ t("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: l.therapy.map((E) => /* @__PURE__ */ d(
|
|
5663
5675
|
"li",
|
|
5664
5676
|
{
|
|
5665
5677
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
5666
5678
|
children: [
|
|
5667
|
-
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children:
|
|
5668
|
-
|
|
5679
|
+
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: E.name }),
|
|
5680
|
+
E.dose ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: E.dose }) : null,
|
|
5669
5681
|
/* @__PURE__ */ t(
|
|
5670
5682
|
J,
|
|
5671
5683
|
{
|
|
5672
|
-
variant:
|
|
5684
|
+
variant: E.kind === "medication" ? "info" : "neutral",
|
|
5673
5685
|
size: "sm",
|
|
5674
|
-
children: a(`anamnesis.medKind.${
|
|
5686
|
+
children: a(`anamnesis.medKind.${E.kind}`)
|
|
5675
5687
|
}
|
|
5676
5688
|
)
|
|
5677
5689
|
]
|
|
5678
5690
|
},
|
|
5679
|
-
|
|
5691
|
+
E.id
|
|
5680
5692
|
)) }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.readOnly.none") }) }),
|
|
5681
5693
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.labs", t: a, children: /* @__PURE__ */ t(
|
|
5682
|
-
|
|
5694
|
+
Ya,
|
|
5683
5695
|
{
|
|
5684
5696
|
defs: p,
|
|
5685
5697
|
visit: l,
|
|
5686
5698
|
previous: c,
|
|
5687
|
-
targets:
|
|
5699
|
+
targets: u,
|
|
5688
5700
|
t: a
|
|
5689
5701
|
}
|
|
5690
5702
|
) }),
|
|
@@ -5732,7 +5744,7 @@ function nr({
|
|
|
5732
5744
|
bt,
|
|
5733
5745
|
{
|
|
5734
5746
|
intake: e.intake,
|
|
5735
|
-
sections:
|
|
5747
|
+
sections: k,
|
|
5736
5748
|
sex: o.sex,
|
|
5737
5749
|
t: a
|
|
5738
5750
|
}
|
|
@@ -5768,85 +5780,89 @@ function Ut({
|
|
|
5768
5780
|
onTargetChange: r,
|
|
5769
5781
|
hideTargetStrip: l = !1,
|
|
5770
5782
|
leadingTabs: c = tr,
|
|
5771
|
-
readOnly:
|
|
5783
|
+
readOnly: u = !1,
|
|
5772
5784
|
questionnaireSlot: h,
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5785
|
+
questionnaireHeaderSlot: g,
|
|
5786
|
+
tab: p,
|
|
5787
|
+
onTabChange: k,
|
|
5788
|
+
defaultTab: y
|
|
5776
5789
|
}) {
|
|
5777
|
-
const [
|
|
5790
|
+
const [f, C] = $(
|
|
5778
5791
|
() => {
|
|
5779
|
-
var
|
|
5780
|
-
return
|
|
5792
|
+
var S;
|
|
5793
|
+
return y ?? ((S = c[0]) == null ? void 0 : S.value) ?? "questionnaire";
|
|
5781
5794
|
}
|
|
5782
|
-
),
|
|
5783
|
-
|
|
5784
|
-
}, [
|
|
5785
|
-
e !==
|
|
5786
|
-
const
|
|
5787
|
-
() => new Map(
|
|
5788
|
-
[
|
|
5789
|
-
),
|
|
5795
|
+
), w = p ?? f, E = (S) => {
|
|
5796
|
+
p === void 0 && C(S), k == null || k(S);
|
|
5797
|
+
}, [D, T] = $(e), [F, A] = $(e);
|
|
5798
|
+
e !== F && (A(e), T(e));
|
|
5799
|
+
const m = O(
|
|
5800
|
+
() => new Map(D.targets.map((S) => [S.parameterKey, S.target])),
|
|
5801
|
+
[D.targets]
|
|
5802
|
+
), N = O(() => Ot(n), [n]), x = O(
|
|
5790
5803
|
() => Pe(n),
|
|
5791
5804
|
[n]
|
|
5792
|
-
),
|
|
5793
|
-
|
|
5805
|
+
), P = (S, V) => {
|
|
5806
|
+
T((R) => ct(R, S.key, V)), r == null || r(S.key, V);
|
|
5794
5807
|
};
|
|
5795
5808
|
return (
|
|
5796
5809
|
// The goals strip and the tabs are two objects, not one run-on block: an
|
|
5797
5810
|
// explicit column gap keeps the strip from sitting flush on the card
|
|
5798
5811
|
// below it, which read as a rendering fault rather than as a heading.
|
|
5799
5812
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
|
|
5800
|
-
l ||
|
|
5813
|
+
l || D.visits.length === 0 ? null : /* @__PURE__ */ t(
|
|
5801
5814
|
Vt,
|
|
5802
5815
|
{
|
|
5803
|
-
visits:
|
|
5804
|
-
defs:
|
|
5805
|
-
targets:
|
|
5816
|
+
visits: D.visits,
|
|
5817
|
+
defs: N,
|
|
5818
|
+
targets: m,
|
|
5806
5819
|
t: a,
|
|
5807
|
-
onTargetChange:
|
|
5820
|
+
onTargetChange: P
|
|
5808
5821
|
}
|
|
5809
5822
|
),
|
|
5810
|
-
/* @__PURE__ */ d(Y, { value:
|
|
5823
|
+
/* @__PURE__ */ d(Y, { value: w, onValueChange: E, children: [
|
|
5811
5824
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
5812
5825
|
/* @__PURE__ */ d(Y.List, { "aria-label": a("anamnesis.compile.viewsLabel"), children: [
|
|
5813
|
-
c.map((
|
|
5826
|
+
c.map((S) => /* @__PURE__ */ t(Y.Trigger, { value: S.value, children: S.label }, S.value)),
|
|
5814
5827
|
/* @__PURE__ */ t(Y.Trigger, { value: "questionnaire", children: a("anamnesis.compile.tabCompile") }),
|
|
5815
5828
|
/* @__PURE__ */ t(Y.Trigger, { value: "trend", children: a("anamnesis.compile.tabEvolution") })
|
|
5816
5829
|
] }),
|
|
5817
5830
|
o ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: o }) : null
|
|
5818
5831
|
] }),
|
|
5819
|
-
c.map((
|
|
5832
|
+
c.map((S) => /* @__PURE__ */ t(
|
|
5820
5833
|
Y.Content,
|
|
5821
5834
|
{
|
|
5822
|
-
value:
|
|
5835
|
+
value: S.value,
|
|
5823
5836
|
forceMount: !0,
|
|
5824
5837
|
className: "ds:data-[state=inactive]:hidden",
|
|
5825
|
-
children:
|
|
5838
|
+
children: S.content
|
|
5826
5839
|
},
|
|
5827
|
-
|
|
5840
|
+
S.value
|
|
5828
5841
|
)),
|
|
5829
|
-
/* @__PURE__ */
|
|
5842
|
+
/* @__PURE__ */ d(
|
|
5830
5843
|
Y.Content,
|
|
5831
5844
|
{
|
|
5832
5845
|
value: "questionnaire",
|
|
5833
5846
|
forceMount: !0,
|
|
5834
5847
|
className: "ds:data-[state=inactive]:hidden",
|
|
5835
|
-
children:
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5848
|
+
children: [
|
|
5849
|
+
g ? /* @__PURE__ */ t("div", { className: "ds:mb-[var(--spacing-md)] ds:flex ds:flex-wrap ds:items-end ds:justify-between ds:gap-[var(--spacing-sm)]", children: g }) : null,
|
|
5850
|
+
h ?? /* @__PURE__ */ t(
|
|
5851
|
+
Bt,
|
|
5852
|
+
{
|
|
5853
|
+
record: D,
|
|
5854
|
+
t: a,
|
|
5855
|
+
embedded: !0,
|
|
5856
|
+
config: n,
|
|
5857
|
+
onSubmit: i,
|
|
5858
|
+
jumpToField: s,
|
|
5859
|
+
readOnly: u
|
|
5860
|
+
}
|
|
5861
|
+
)
|
|
5862
|
+
]
|
|
5847
5863
|
}
|
|
5848
5864
|
),
|
|
5849
|
-
/* @__PURE__ */ t(Y.Content, { value: "trend", children:
|
|
5865
|
+
/* @__PURE__ */ t(Y.Content, { value: "trend", children: x.length === 0 ? /* @__PURE__ */ t(
|
|
5850
5866
|
Ue,
|
|
5851
5867
|
{
|
|
5852
5868
|
variant: "no-results",
|
|
@@ -5859,7 +5875,7 @@ function Ut({
|
|
|
5859
5875
|
/* @__PURE__ */ t(
|
|
5860
5876
|
Nn,
|
|
5861
5877
|
{
|
|
5862
|
-
record:
|
|
5878
|
+
record: D,
|
|
5863
5879
|
t: a,
|
|
5864
5880
|
config: n,
|
|
5865
5881
|
framed: !1
|
|
@@ -5881,25 +5897,26 @@ function wl({
|
|
|
5881
5897
|
onTargetChange: r,
|
|
5882
5898
|
hideTargetStrip: l,
|
|
5883
5899
|
statusSlot: c,
|
|
5884
|
-
onOpenNote:
|
|
5900
|
+
onOpenNote: u,
|
|
5885
5901
|
onIntakeSubmit: h,
|
|
5886
5902
|
intakeJumpToField: g,
|
|
5887
5903
|
readOnly: p,
|
|
5888
|
-
onMissingAnswerJump:
|
|
5904
|
+
onMissingAnswerJump: k,
|
|
5889
5905
|
onRecordChange: y,
|
|
5890
5906
|
leadingTabs: f,
|
|
5891
5907
|
questionnaireTab: C,
|
|
5892
5908
|
onQuestionnaireTabChange: w,
|
|
5893
|
-
questionnaireSlot:
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5909
|
+
questionnaireSlot: E,
|
|
5910
|
+
questionnaireHeaderSlot: D,
|
|
5911
|
+
defaultQuestionnaireTab: T,
|
|
5912
|
+
practitioners: F,
|
|
5913
|
+
newVisitDateIso: A,
|
|
5914
|
+
defaultView: m,
|
|
5915
|
+
defaultExportMenuOpen: N,
|
|
5916
|
+
defaultShareOpen: x,
|
|
5917
|
+
defaultExportAudience: P
|
|
5901
5918
|
}) {
|
|
5902
|
-
const
|
|
5919
|
+
const S = e === "intake" ? /* @__PURE__ */ t(
|
|
5903
5920
|
Bt,
|
|
5904
5921
|
{
|
|
5905
5922
|
record: a,
|
|
@@ -5924,9 +5941,10 @@ function wl({
|
|
|
5924
5941
|
leadingTabs: f,
|
|
5925
5942
|
tab: C,
|
|
5926
5943
|
onTabChange: w,
|
|
5927
|
-
defaultTab:
|
|
5944
|
+
defaultTab: T,
|
|
5928
5945
|
readOnly: p,
|
|
5929
|
-
questionnaireSlot:
|
|
5946
|
+
questionnaireSlot: E,
|
|
5947
|
+
questionnaireHeaderSlot: D
|
|
5930
5948
|
}
|
|
5931
5949
|
) : e === "compile" ? /* @__PURE__ */ t(
|
|
5932
5950
|
ar,
|
|
@@ -5938,15 +5956,15 @@ function wl({
|
|
|
5938
5956
|
onTargetChange: r,
|
|
5939
5957
|
hideTargetStrip: l,
|
|
5940
5958
|
statusSlot: c,
|
|
5941
|
-
onOpenNote:
|
|
5942
|
-
onMissingAnswerJump:
|
|
5959
|
+
onOpenNote: u,
|
|
5960
|
+
onMissingAnswerJump: k,
|
|
5943
5961
|
onRecordChange: y,
|
|
5944
|
-
practitioners:
|
|
5945
|
-
newVisitDateIso:
|
|
5946
|
-
defaultView:
|
|
5947
|
-
defaultExportMenuOpen:
|
|
5948
|
-
defaultShareOpen:
|
|
5949
|
-
defaultExportAudience:
|
|
5962
|
+
practitioners: F,
|
|
5963
|
+
newVisitDateIso: A,
|
|
5964
|
+
defaultView: m,
|
|
5965
|
+
defaultExportMenuOpen: N,
|
|
5966
|
+
defaultShareOpen: x,
|
|
5967
|
+
defaultExportAudience: P
|
|
5950
5968
|
}
|
|
5951
5969
|
) : /* @__PURE__ */ t(
|
|
5952
5970
|
nr,
|
|
@@ -5955,7 +5973,7 @@ function wl({
|
|
|
5955
5973
|
t: n,
|
|
5956
5974
|
embedded: s,
|
|
5957
5975
|
config: o,
|
|
5958
|
-
onOpenNote:
|
|
5976
|
+
onOpenNote: u
|
|
5959
5977
|
}
|
|
5960
5978
|
);
|
|
5961
5979
|
return s ? /* @__PURE__ */ t(
|
|
@@ -5964,7 +5982,7 @@ function wl({
|
|
|
5964
5982
|
"data-component": i,
|
|
5965
5983
|
"data-mode": e,
|
|
5966
5984
|
className: "ds:w-full",
|
|
5967
|
-
children:
|
|
5985
|
+
children: S
|
|
5968
5986
|
}
|
|
5969
5987
|
) : /* @__PURE__ */ t(
|
|
5970
5988
|
"main",
|
|
@@ -5975,7 +5993,7 @@ function wl({
|
|
|
5975
5993
|
mode: n(`anamnesis.mode.${e}`)
|
|
5976
5994
|
}),
|
|
5977
5995
|
className: "ds:w-full",
|
|
5978
|
-
children:
|
|
5996
|
+
children: S
|
|
5979
5997
|
}
|
|
5980
5998
|
);
|
|
5981
5999
|
}
|
|
@@ -5992,24 +6010,24 @@ const ir = Zn("", {
|
|
|
5992
6010
|
},
|
|
5993
6011
|
defaultVariants: { dragging: !1, dropTarget: !1 }
|
|
5994
6012
|
}), Kt = ni(null);
|
|
5995
|
-
function
|
|
6013
|
+
function Xa({
|
|
5996
6014
|
count: e,
|
|
5997
6015
|
onReorder: a,
|
|
5998
6016
|
t: n,
|
|
5999
6017
|
children: i
|
|
6000
6018
|
}) {
|
|
6001
|
-
const [s, o] = $(null), [r, l] = $(""), c = we(!1),
|
|
6019
|
+
const [s, o] = $(null), [r, l] = $(""), c = we(!1), u = na((g) => {
|
|
6002
6020
|
c.current = !c.current, l(c.current ? g : `${g}`);
|
|
6003
6021
|
}, []), h = O(
|
|
6004
|
-
() => ({ onReorder: a, count: e, dragSource: s, setDragSource: o, announce:
|
|
6005
|
-
[a, e, s,
|
|
6022
|
+
() => ({ onReorder: a, count: e, dragSource: s, setDragSource: o, announce: u, t: n }),
|
|
6023
|
+
[a, e, s, u, n]
|
|
6006
6024
|
);
|
|
6007
6025
|
return /* @__PURE__ */ d(Kt.Provider, { value: h, children: [
|
|
6008
6026
|
i,
|
|
6009
6027
|
/* @__PURE__ */ t("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: r })
|
|
6010
6028
|
] });
|
|
6011
6029
|
}
|
|
6012
|
-
function
|
|
6030
|
+
function Ja({
|
|
6013
6031
|
index: e,
|
|
6014
6032
|
label: a,
|
|
6015
6033
|
children: n
|
|
@@ -6019,8 +6037,8 @@ function Za({
|
|
|
6019
6037
|
throw new Error(
|
|
6020
6038
|
"AnamnesisReorderRow must render inside an AnamnesisReorderGroup"
|
|
6021
6039
|
);
|
|
6022
|
-
const { t: r } = i, l = (p,
|
|
6023
|
-
const y = Math.max(0, Math.min(i.count - 1,
|
|
6040
|
+
const { t: r } = i, l = (p, k) => {
|
|
6041
|
+
const y = Math.max(0, Math.min(i.count - 1, k));
|
|
6024
6042
|
y !== p && (i.onReorder(p, y), i.announce(
|
|
6025
6043
|
r("anamnesis.configEditor.reorderAnnounce", {
|
|
6026
6044
|
name: a,
|
|
@@ -6030,7 +6048,7 @@ function Za({
|
|
|
6030
6048
|
));
|
|
6031
6049
|
}, c = (p) => {
|
|
6032
6050
|
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)));
|
|
6033
|
-
},
|
|
6051
|
+
}, u = i.dragSource === e, h = {
|
|
6034
6052
|
draggable: !0,
|
|
6035
6053
|
onDragStart: (p) => {
|
|
6036
6054
|
i.setDragSource(e), p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(e));
|
|
@@ -6044,12 +6062,12 @@ function Za({
|
|
|
6044
6062
|
onDragLeave: () => o(!1),
|
|
6045
6063
|
onDrop: (p) => {
|
|
6046
6064
|
p.preventDefault();
|
|
6047
|
-
const
|
|
6048
|
-
o(!1), i.setDragSource(null), !(
|
|
6065
|
+
const k = i.dragSource;
|
|
6066
|
+
o(!1), i.setDragSource(null), !(k === null || k === e) && l(k, e);
|
|
6049
6067
|
},
|
|
6050
6068
|
className: ir({
|
|
6051
|
-
dragging:
|
|
6052
|
-
dropTarget: s && !
|
|
6069
|
+
dragging: u,
|
|
6070
|
+
dropTarget: s && !u
|
|
6053
6071
|
})
|
|
6054
6072
|
}, g = /* @__PURE__ */ t(
|
|
6055
6073
|
de,
|
|
@@ -6079,7 +6097,7 @@ function Nl() {
|
|
|
6079
6097
|
}))
|
|
6080
6098
|
};
|
|
6081
6099
|
}
|
|
6082
|
-
function
|
|
6100
|
+
function Za(e, a) {
|
|
6083
6101
|
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(
|
|
6084
6102
|
(r, l) => l === 0 ? r.toLowerCase() : r[0].toUpperCase() + r.slice(1).toLowerCase()
|
|
6085
6103
|
).join("");
|
|
@@ -6088,7 +6106,7 @@ function en(e, a) {
|
|
|
6088
6106
|
s = `${i}${o}`, o += 1;
|
|
6089
6107
|
return s;
|
|
6090
6108
|
}
|
|
6091
|
-
function
|
|
6109
|
+
function en(e, a, n) {
|
|
6092
6110
|
if (a === n || a < 0 || a >= e.length || n < 0 || n >= e.length) return null;
|
|
6093
6111
|
const i = [...e], [s] = i.splice(a, 1);
|
|
6094
6112
|
return i.splice(n, 0, s), i;
|
|
@@ -6113,72 +6131,72 @@ function Ht(e, a) {
|
|
|
6113
6131
|
const n = e.type === "number" ? e.decimal ? "numberDecimal" : "numberInteger" : e.type === "choice" && e.detail ? "choiceWithText" : e.type;
|
|
6114
6132
|
return a(`anamnesis.configEditor.type.${n}`);
|
|
6115
6133
|
}
|
|
6116
|
-
const rr = ["down", "up", "toRange"],
|
|
6134
|
+
const rr = ["down", "up", "toRange"], rn = ["anthropometric", "dietary", "lab"];
|
|
6117
6135
|
function Cl({
|
|
6118
6136
|
config: e,
|
|
6119
6137
|
onConfigChange: a,
|
|
6120
6138
|
t: n,
|
|
6121
6139
|
dataComponent: i = "anamnesis-config-editor"
|
|
6122
6140
|
}) {
|
|
6123
|
-
const [s, o] = $(null), [r, l] = $(null), c = (
|
|
6141
|
+
const [s, o] = $(null), [r, l] = $(null), c = (m) => a({ ...e, parameters: e.parameters.map(m) }), u = (m) => a({
|
|
6124
6142
|
...e,
|
|
6125
|
-
intakeSections: e.intakeSections.map(
|
|
6126
|
-
}), h = (
|
|
6127
|
-
(
|
|
6128
|
-
...
|
|
6129
|
-
fields:
|
|
6130
|
-
(
|
|
6143
|
+
intakeSections: e.intakeSections.map(m)
|
|
6144
|
+
}), h = (m, N, x) => u(
|
|
6145
|
+
(P) => P.key === m ? {
|
|
6146
|
+
...P,
|
|
6147
|
+
fields: P.fields.map(
|
|
6148
|
+
(S) => S.key === N ? x(S) : S
|
|
6131
6149
|
)
|
|
6132
|
-
} :
|
|
6133
|
-
), g = (
|
|
6134
|
-
const
|
|
6135
|
-
if (!
|
|
6136
|
-
const V = new Map(
|
|
6150
|
+
} : P
|
|
6151
|
+
), g = (m) => a({ ...e, pathologies: e.pathologies.map(m) }), p = (m, N, x) => {
|
|
6152
|
+
const P = Pe(e, m), S = en(P, N, x);
|
|
6153
|
+
if (!S) return;
|
|
6154
|
+
const V = new Map(S.map((R, j) => [R.key, j]));
|
|
6137
6155
|
c(
|
|
6138
|
-
(
|
|
6156
|
+
(R) => V.has(R.key) ? { ...R, order: V.get(R.key) } : R
|
|
6139
6157
|
);
|
|
6140
|
-
},
|
|
6141
|
-
const
|
|
6142
|
-
if (!
|
|
6143
|
-
const
|
|
6144
|
-
|
|
6158
|
+
}, k = (m, N) => {
|
|
6159
|
+
const x = en(je(e), m, N);
|
|
6160
|
+
if (!x) return;
|
|
6161
|
+
const P = new Map(
|
|
6162
|
+
x.map((S, V) => [S.key, V])
|
|
6145
6163
|
);
|
|
6146
|
-
|
|
6147
|
-
(
|
|
6164
|
+
u(
|
|
6165
|
+
(S) => P.has(S.key) ? { ...S, order: P.get(S.key) } : S
|
|
6148
6166
|
);
|
|
6149
|
-
}, y = (
|
|
6150
|
-
const
|
|
6151
|
-
if (!
|
|
6152
|
-
const
|
|
6153
|
-
|
|
6167
|
+
}, y = (m, N, x) => {
|
|
6168
|
+
const P = en(m.fields, N, x);
|
|
6169
|
+
if (!P) return;
|
|
6170
|
+
const S = new Map(
|
|
6171
|
+
P.map((V, R) => [V.key, R])
|
|
6154
6172
|
);
|
|
6155
|
-
|
|
6156
|
-
(V) => V.key ===
|
|
6173
|
+
u(
|
|
6174
|
+
(V) => V.key === m.key ? {
|
|
6157
6175
|
...V,
|
|
6158
6176
|
fields: V.fields.map(
|
|
6159
|
-
(
|
|
6177
|
+
(R) => S.has(R.key) ? { ...R, order: S.get(R.key) } : R
|
|
6160
6178
|
)
|
|
6161
6179
|
} : V
|
|
6162
6180
|
);
|
|
6163
|
-
}, f = (
|
|
6164
|
-
|
|
6165
|
-
(
|
|
6166
|
-
) :
|
|
6167
|
-
(
|
|
6168
|
-
) :
|
|
6169
|
-
...
|
|
6181
|
+
}, f = (m, N) => {
|
|
6182
|
+
m.kind === "parameter" ? c(
|
|
6183
|
+
(x) => x.key === m.entry.key ? { ...x, enabled: N } : x
|
|
6184
|
+
) : m.kind === "section" ? u(
|
|
6185
|
+
(x) => x.key === m.entry.key ? { ...x, enabled: N } : x
|
|
6186
|
+
) : m.kind === "field" ? h(m.sectionKey, m.entry.key, (x) => ({
|
|
6187
|
+
...x,
|
|
6170
6188
|
enabled: N
|
|
6171
6189
|
})) : g(
|
|
6172
|
-
(
|
|
6190
|
+
(x) => x.code === m.entry.code ? { ...x, enabled: N } : x
|
|
6173
6191
|
);
|
|
6174
|
-
}, C = Ne(e).length, w = Pe(e).length,
|
|
6175
|
-
(
|
|
6192
|
+
}, C = Ne(e).length, w = Pe(e).length, E = hn(e).reduce(
|
|
6193
|
+
(m, N) => m + N.fields.length,
|
|
6176
6194
|
0
|
|
6177
|
-
),
|
|
6178
|
-
(
|
|
6195
|
+
), D = je(e).reduce(
|
|
6196
|
+
(m, N) => m + N.fields.length,
|
|
6179
6197
|
0
|
|
6180
|
-
),
|
|
6181
|
-
(
|
|
6198
|
+
), T = ot(e).length, F = tn(e).length, A = Ne(e).filter(
|
|
6199
|
+
(m) => m.goal === !0
|
|
6182
6200
|
).length;
|
|
6183
6201
|
return /* @__PURE__ */ d(
|
|
6184
6202
|
"div",
|
|
@@ -6200,44 +6218,44 @@ function Cl({
|
|
|
6200
6218
|
] }),
|
|
6201
6219
|
/* @__PURE__ */ t(Y.Content, { value: "questionnaire", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
|
|
6202
6220
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${n("anamnesis.configEditor.panelLive", {
|
|
6203
|
-
count:
|
|
6221
|
+
count: E
|
|
6204
6222
|
})} · ${n("anamnesis.configEditor.panelNotCaptured", {
|
|
6205
6223
|
// Not "archived": this also counts live questions inside
|
|
6206
6224
|
// an archived section, which capture drops as a whole.
|
|
6207
|
-
count:
|
|
6225
|
+
count: D - E
|
|
6208
6226
|
})}` }),
|
|
6209
6227
|
/* @__PURE__ */ t(
|
|
6210
|
-
|
|
6228
|
+
Xa,
|
|
6211
6229
|
{
|
|
6212
|
-
count:
|
|
6213
|
-
onReorder:
|
|
6230
|
+
count: je(e).length,
|
|
6231
|
+
onReorder: k,
|
|
6214
6232
|
t: n,
|
|
6215
|
-
children:
|
|
6216
|
-
(
|
|
6217
|
-
const
|
|
6218
|
-
(
|
|
6233
|
+
children: je(e).map(
|
|
6234
|
+
(m, N) => {
|
|
6235
|
+
const x = m.enabled === !1, P = m.fields.filter(
|
|
6236
|
+
(S) => S.enabled !== !1
|
|
6219
6237
|
).length;
|
|
6220
6238
|
return /* @__PURE__ */ t(
|
|
6221
|
-
|
|
6239
|
+
Ja,
|
|
6222
6240
|
{
|
|
6223
6241
|
index: N,
|
|
6224
|
-
label: ye(
|
|
6242
|
+
label: ye(m, n),
|
|
6225
6243
|
children: ({
|
|
6226
|
-
rowProps:
|
|
6244
|
+
rowProps: S,
|
|
6227
6245
|
handle: V
|
|
6228
6246
|
}) => /* @__PURE__ */ d("section", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
6229
6247
|
/* @__PURE__ */ d(
|
|
6230
6248
|
"div",
|
|
6231
6249
|
{
|
|
6232
|
-
...
|
|
6250
|
+
...S,
|
|
6233
6251
|
className: [
|
|
6234
6252
|
"ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]",
|
|
6235
|
-
|
|
6253
|
+
S.className
|
|
6236
6254
|
].filter(Boolean).join(" "),
|
|
6237
6255
|
children: [
|
|
6238
6256
|
/* @__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: [
|
|
6239
|
-
ye(
|
|
6240
|
-
|
|
6257
|
+
ye(m, n),
|
|
6258
|
+
x ? /* @__PURE__ */ t(J, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
|
|
6241
6259
|
] }),
|
|
6242
6260
|
/* @__PURE__ */ d(
|
|
6243
6261
|
Ca,
|
|
@@ -6245,7 +6263,7 @@ function Cl({
|
|
|
6245
6263
|
"aria-label": n(
|
|
6246
6264
|
"anamnesis.configEditor.rowActions",
|
|
6247
6265
|
{
|
|
6248
|
-
name: ye(
|
|
6266
|
+
name: ye(m, n)
|
|
6249
6267
|
}
|
|
6250
6268
|
),
|
|
6251
6269
|
children: [
|
|
@@ -6255,20 +6273,20 @@ function Cl({
|
|
|
6255
6273
|
{
|
|
6256
6274
|
size: "sm",
|
|
6257
6275
|
intent: "ghost",
|
|
6258
|
-
icon: /* @__PURE__ */ t(
|
|
6276
|
+
icon: /* @__PURE__ */ t(ma, { "aria-hidden": "true" }),
|
|
6259
6277
|
"aria-label": n(
|
|
6260
6278
|
"anamnesis.configEditor.edit",
|
|
6261
6279
|
{
|
|
6262
|
-
name: ye(
|
|
6280
|
+
name: ye(m, n)
|
|
6263
6281
|
}
|
|
6264
6282
|
),
|
|
6265
6283
|
onClick: () => o({
|
|
6266
6284
|
kind: "section",
|
|
6267
|
-
entry:
|
|
6285
|
+
entry: m
|
|
6268
6286
|
})
|
|
6269
6287
|
}
|
|
6270
6288
|
),
|
|
6271
|
-
|
|
6289
|
+
x ? /* @__PURE__ */ t(
|
|
6272
6290
|
de,
|
|
6273
6291
|
{
|
|
6274
6292
|
size: "sm",
|
|
@@ -6276,10 +6294,10 @@ function Cl({
|
|
|
6276
6294
|
icon: /* @__PURE__ */ t(Ta, { "aria-hidden": "true" }),
|
|
6277
6295
|
"aria-label": n(
|
|
6278
6296
|
"anamnesis.configEditor.restore",
|
|
6279
|
-
{ name: ye(
|
|
6297
|
+
{ name: ye(m, n) }
|
|
6280
6298
|
),
|
|
6281
6299
|
onClick: () => f(
|
|
6282
|
-
{ kind: "section", entry:
|
|
6300
|
+
{ kind: "section", entry: m },
|
|
6283
6301
|
void 0
|
|
6284
6302
|
)
|
|
6285
6303
|
}
|
|
@@ -6291,10 +6309,10 @@ function Cl({
|
|
|
6291
6309
|
icon: /* @__PURE__ */ t(Sa, { "aria-hidden": "true" }),
|
|
6292
6310
|
"aria-label": n(
|
|
6293
6311
|
"anamnesis.configEditor.archive",
|
|
6294
|
-
{ name: ye(
|
|
6312
|
+
{ name: ye(m, n) }
|
|
6295
6313
|
),
|
|
6296
6314
|
onClick: () => f(
|
|
6297
|
-
{ kind: "section", entry:
|
|
6315
|
+
{ kind: "section", entry: m },
|
|
6298
6316
|
!1
|
|
6299
6317
|
)
|
|
6300
6318
|
}
|
|
@@ -6305,27 +6323,27 @@ function Cl({
|
|
|
6305
6323
|
]
|
|
6306
6324
|
}
|
|
6307
6325
|
),
|
|
6308
|
-
|
|
6326
|
+
P === 0 && !x ? /* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n(
|
|
6309
6327
|
"anamnesis.configEditor.sectionEmptyCapture"
|
|
6310
6328
|
) }) : null,
|
|
6311
|
-
|
|
6312
|
-
|
|
6329
|
+
m.fields.length > 0 ? /* @__PURE__ */ t(
|
|
6330
|
+
Xa,
|
|
6313
6331
|
{
|
|
6314
|
-
count:
|
|
6315
|
-
onReorder: (
|
|
6332
|
+
count: m.fields.length,
|
|
6333
|
+
onReorder: (R, j) => y(m, R, j),
|
|
6316
6334
|
t: n,
|
|
6317
|
-
children: /* @__PURE__ */ t(Ze, { divider: "divided", children:
|
|
6318
|
-
|
|
6335
|
+
children: /* @__PURE__ */ t(Ze, { divider: "divided", children: m.fields.map((R, j) => /* @__PURE__ */ t(
|
|
6336
|
+
Ja,
|
|
6319
6337
|
{
|
|
6320
|
-
index:
|
|
6321
|
-
label: he(
|
|
6322
|
-
children: ({ rowProps:
|
|
6338
|
+
index: j,
|
|
6339
|
+
label: he(R, n),
|
|
6340
|
+
children: ({ rowProps: G, handle: z }) => /* @__PURE__ */ t(
|
|
6323
6341
|
Ze.Item,
|
|
6324
6342
|
{
|
|
6325
|
-
...
|
|
6343
|
+
...G,
|
|
6326
6344
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6327
|
-
he(
|
|
6328
|
-
|
|
6345
|
+
he(R, n),
|
|
6346
|
+
R.required === !0 ? /* @__PURE__ */ t(
|
|
6329
6347
|
J,
|
|
6330
6348
|
{
|
|
6331
6349
|
size: "sm",
|
|
@@ -6335,7 +6353,7 @@ function Cl({
|
|
|
6335
6353
|
)
|
|
6336
6354
|
}
|
|
6337
6355
|
) : null,
|
|
6338
|
-
|
|
6356
|
+
R.enabled === !1 ? /* @__PURE__ */ t(
|
|
6339
6357
|
J,
|
|
6340
6358
|
{
|
|
6341
6359
|
size: "sm",
|
|
@@ -6347,8 +6365,8 @@ function Cl({
|
|
|
6347
6365
|
) : null
|
|
6348
6366
|
] }),
|
|
6349
6367
|
description: [
|
|
6350
|
-
Ht(
|
|
6351
|
-
|
|
6368
|
+
Ht(R, n),
|
|
6369
|
+
mt(R, n)
|
|
6352
6370
|
].filter(Boolean).join(" · "),
|
|
6353
6371
|
trailing: /* @__PURE__ */ d(
|
|
6354
6372
|
Ca,
|
|
@@ -6357,7 +6375,7 @@ function Cl({
|
|
|
6357
6375
|
"anamnesis.configEditor.rowActions",
|
|
6358
6376
|
{
|
|
6359
6377
|
name: he(
|
|
6360
|
-
|
|
6378
|
+
R,
|
|
6361
6379
|
n
|
|
6362
6380
|
)
|
|
6363
6381
|
}
|
|
@@ -6369,24 +6387,24 @@ function Cl({
|
|
|
6369
6387
|
{
|
|
6370
6388
|
size: "sm",
|
|
6371
6389
|
intent: "ghost",
|
|
6372
|
-
icon: /* @__PURE__ */ t(
|
|
6390
|
+
icon: /* @__PURE__ */ t(ma, { "aria-hidden": "true" }),
|
|
6373
6391
|
"aria-label": n(
|
|
6374
6392
|
"anamnesis.configEditor.edit",
|
|
6375
6393
|
{
|
|
6376
6394
|
name: he(
|
|
6377
|
-
|
|
6395
|
+
R,
|
|
6378
6396
|
n
|
|
6379
6397
|
)
|
|
6380
6398
|
}
|
|
6381
6399
|
),
|
|
6382
6400
|
onClick: () => o({
|
|
6383
6401
|
kind: "field",
|
|
6384
|
-
sectionKey:
|
|
6385
|
-
entry:
|
|
6402
|
+
sectionKey: m.key,
|
|
6403
|
+
entry: R
|
|
6386
6404
|
})
|
|
6387
6405
|
}
|
|
6388
6406
|
),
|
|
6389
|
-
|
|
6407
|
+
R.enabled === !1 ? /* @__PURE__ */ t(
|
|
6390
6408
|
de,
|
|
6391
6409
|
{
|
|
6392
6410
|
size: "sm",
|
|
@@ -6396,7 +6414,7 @@ function Cl({
|
|
|
6396
6414
|
"anamnesis.configEditor.restore",
|
|
6397
6415
|
{
|
|
6398
6416
|
name: he(
|
|
6399
|
-
|
|
6417
|
+
R,
|
|
6400
6418
|
n
|
|
6401
6419
|
)
|
|
6402
6420
|
}
|
|
@@ -6404,8 +6422,8 @@ function Cl({
|
|
|
6404
6422
|
onClick: () => f(
|
|
6405
6423
|
{
|
|
6406
6424
|
kind: "field",
|
|
6407
|
-
sectionKey:
|
|
6408
|
-
entry:
|
|
6425
|
+
sectionKey: m.key,
|
|
6426
|
+
entry: R
|
|
6409
6427
|
},
|
|
6410
6428
|
void 0
|
|
6411
6429
|
)
|
|
@@ -6420,7 +6438,7 @@ function Cl({
|
|
|
6420
6438
|
"anamnesis.configEditor.archive",
|
|
6421
6439
|
{
|
|
6422
6440
|
name: he(
|
|
6423
|
-
|
|
6441
|
+
R,
|
|
6424
6442
|
n
|
|
6425
6443
|
)
|
|
6426
6444
|
}
|
|
@@ -6428,8 +6446,8 @@ function Cl({
|
|
|
6428
6446
|
onClick: () => f(
|
|
6429
6447
|
{
|
|
6430
6448
|
kind: "field",
|
|
6431
|
-
sectionKey:
|
|
6432
|
-
entry:
|
|
6449
|
+
sectionKey: m.key,
|
|
6450
|
+
entry: R
|
|
6433
6451
|
},
|
|
6434
6452
|
!1
|
|
6435
6453
|
)
|
|
@@ -6441,7 +6459,7 @@ function Cl({
|
|
|
6441
6459
|
}
|
|
6442
6460
|
)
|
|
6443
6461
|
},
|
|
6444
|
-
|
|
6462
|
+
R.key
|
|
6445
6463
|
)) })
|
|
6446
6464
|
}
|
|
6447
6465
|
) : null,
|
|
@@ -6453,14 +6471,14 @@ function Cl({
|
|
|
6453
6471
|
startIcon: /* @__PURE__ */ t(aa, { "aria-hidden": "true" }),
|
|
6454
6472
|
onClick: () => l({
|
|
6455
6473
|
kind: "field",
|
|
6456
|
-
sectionKey:
|
|
6474
|
+
sectionKey: m.key
|
|
6457
6475
|
}),
|
|
6458
6476
|
children: n("anamnesis.configEditor.addQuestion")
|
|
6459
6477
|
}
|
|
6460
6478
|
) })
|
|
6461
6479
|
] })
|
|
6462
6480
|
},
|
|
6463
|
-
|
|
6481
|
+
m.key
|
|
6464
6482
|
);
|
|
6465
6483
|
}
|
|
6466
6484
|
)
|
|
@@ -6483,43 +6501,43 @@ function Cl({
|
|
|
6483
6501
|
})} · ${n("anamnesis.configEditor.panelArchived", {
|
|
6484
6502
|
count: w - C
|
|
6485
6503
|
})}` }),
|
|
6486
|
-
|
|
6504
|
+
rn.map((m) => {
|
|
6487
6505
|
const N = Pe(
|
|
6488
6506
|
e,
|
|
6489
|
-
|
|
6507
|
+
m
|
|
6490
6508
|
);
|
|
6491
6509
|
return N.length === 0 ? null : /* @__PURE__ */ d(
|
|
6492
6510
|
"section",
|
|
6493
6511
|
{
|
|
6494
6512
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
6495
6513
|
children: [
|
|
6496
|
-
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${
|
|
6514
|
+
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${m}`) }),
|
|
6497
6515
|
/* @__PURE__ */ t(
|
|
6498
|
-
|
|
6516
|
+
Xa,
|
|
6499
6517
|
{
|
|
6500
6518
|
count: N.length,
|
|
6501
|
-
onReorder: (
|
|
6519
|
+
onReorder: (x, P) => p(m, x, P),
|
|
6502
6520
|
t: n,
|
|
6503
|
-
children: /* @__PURE__ */ t(Ze, { divider: "divided", children: N.map((
|
|
6504
|
-
const
|
|
6505
|
-
lr(
|
|
6521
|
+
children: /* @__PURE__ */ t(Ze, { divider: "divided", children: N.map((x, P) => {
|
|
6522
|
+
const S = [
|
|
6523
|
+
lr(x, n),
|
|
6506
6524
|
n(
|
|
6507
|
-
`anamnesis.configEditor.direction.${
|
|
6525
|
+
`anamnesis.configEditor.direction.${x.betterDirection}`
|
|
6508
6526
|
),
|
|
6509
|
-
|
|
6527
|
+
x.locked ? n("anamnesis.configEditor.lockedHint") : null
|
|
6510
6528
|
].filter(Boolean).join(" · ");
|
|
6511
6529
|
return /* @__PURE__ */ t(
|
|
6512
|
-
|
|
6530
|
+
Ja,
|
|
6513
6531
|
{
|
|
6514
|
-
index:
|
|
6515
|
-
label: Te(
|
|
6516
|
-
children: ({ rowProps: V, handle:
|
|
6532
|
+
index: P,
|
|
6533
|
+
label: Te(x, n),
|
|
6534
|
+
children: ({ rowProps: V, handle: R }) => /* @__PURE__ */ t(
|
|
6517
6535
|
Ze.Item,
|
|
6518
6536
|
{
|
|
6519
6537
|
...V,
|
|
6520
6538
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6521
|
-
Te(
|
|
6522
|
-
|
|
6539
|
+
Te(x, n),
|
|
6540
|
+
x.locked ? /* @__PURE__ */ t(
|
|
6523
6541
|
J,
|
|
6524
6542
|
{
|
|
6525
6543
|
size: "sm",
|
|
@@ -6528,11 +6546,11 @@ function Cl({
|
|
|
6528
6546
|
children: n("anamnesis.configEditor.locked")
|
|
6529
6547
|
}
|
|
6530
6548
|
) : null,
|
|
6531
|
-
|
|
6549
|
+
x.enabled === !1 ? /* @__PURE__ */ t(J, { size: "sm", variant: "neutral", children: n(
|
|
6532
6550
|
"anamnesis.configEditor.archived"
|
|
6533
6551
|
) }) : null
|
|
6534
6552
|
] }),
|
|
6535
|
-
description:
|
|
6553
|
+
description: S,
|
|
6536
6554
|
trailing: /* @__PURE__ */ d(
|
|
6537
6555
|
Ca,
|
|
6538
6556
|
{
|
|
@@ -6540,35 +6558,35 @@ function Cl({
|
|
|
6540
6558
|
"anamnesis.configEditor.rowActions",
|
|
6541
6559
|
{
|
|
6542
6560
|
name: Te(
|
|
6543
|
-
|
|
6561
|
+
x,
|
|
6544
6562
|
n
|
|
6545
6563
|
)
|
|
6546
6564
|
}
|
|
6547
6565
|
),
|
|
6548
6566
|
children: [
|
|
6549
|
-
|
|
6567
|
+
R,
|
|
6550
6568
|
/* @__PURE__ */ t(
|
|
6551
6569
|
de,
|
|
6552
6570
|
{
|
|
6553
6571
|
size: "sm",
|
|
6554
6572
|
intent: "ghost",
|
|
6555
|
-
icon: /* @__PURE__ */ t(
|
|
6573
|
+
icon: /* @__PURE__ */ t(ma, { "aria-hidden": "true" }),
|
|
6556
6574
|
"aria-label": n(
|
|
6557
6575
|
"anamnesis.configEditor.edit",
|
|
6558
6576
|
{
|
|
6559
6577
|
name: Te(
|
|
6560
|
-
|
|
6578
|
+
x,
|
|
6561
6579
|
n
|
|
6562
6580
|
)
|
|
6563
6581
|
}
|
|
6564
6582
|
),
|
|
6565
6583
|
onClick: () => o({
|
|
6566
6584
|
kind: "parameter",
|
|
6567
|
-
entry:
|
|
6585
|
+
entry: x
|
|
6568
6586
|
})
|
|
6569
6587
|
}
|
|
6570
6588
|
),
|
|
6571
|
-
|
|
6589
|
+
x.locked ? null : x.enabled === !1 ? /* @__PURE__ */ t(
|
|
6572
6590
|
de,
|
|
6573
6591
|
{
|
|
6574
6592
|
size: "sm",
|
|
@@ -6578,7 +6596,7 @@ function Cl({
|
|
|
6578
6596
|
"anamnesis.configEditor.restore",
|
|
6579
6597
|
{
|
|
6580
6598
|
name: Te(
|
|
6581
|
-
|
|
6599
|
+
x,
|
|
6582
6600
|
n
|
|
6583
6601
|
)
|
|
6584
6602
|
}
|
|
@@ -6586,7 +6604,7 @@ function Cl({
|
|
|
6586
6604
|
onClick: () => f(
|
|
6587
6605
|
{
|
|
6588
6606
|
kind: "parameter",
|
|
6589
|
-
entry:
|
|
6607
|
+
entry: x
|
|
6590
6608
|
},
|
|
6591
6609
|
void 0
|
|
6592
6610
|
)
|
|
@@ -6601,7 +6619,7 @@ function Cl({
|
|
|
6601
6619
|
"anamnesis.configEditor.archive",
|
|
6602
6620
|
{
|
|
6603
6621
|
name: Te(
|
|
6604
|
-
|
|
6622
|
+
x,
|
|
6605
6623
|
n
|
|
6606
6624
|
)
|
|
6607
6625
|
}
|
|
@@ -6609,7 +6627,7 @@ function Cl({
|
|
|
6609
6627
|
onClick: () => f(
|
|
6610
6628
|
{
|
|
6611
6629
|
kind: "parameter",
|
|
6612
|
-
entry:
|
|
6630
|
+
entry: x
|
|
6613
6631
|
},
|
|
6614
6632
|
!1
|
|
6615
6633
|
)
|
|
@@ -6621,14 +6639,14 @@ function Cl({
|
|
|
6621
6639
|
}
|
|
6622
6640
|
)
|
|
6623
6641
|
},
|
|
6624
|
-
|
|
6642
|
+
x.key
|
|
6625
6643
|
);
|
|
6626
6644
|
}) })
|
|
6627
6645
|
}
|
|
6628
6646
|
)
|
|
6629
6647
|
]
|
|
6630
6648
|
},
|
|
6631
|
-
|
|
6649
|
+
m
|
|
6632
6650
|
);
|
|
6633
6651
|
}),
|
|
6634
6652
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
@@ -6644,16 +6662,16 @@ function Cl({
|
|
|
6644
6662
|
] }) }),
|
|
6645
6663
|
/* @__PURE__ */ t(Y.Content, { value: "pathologies", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:pt-[var(--spacing-md)]", children: [
|
|
6646
6664
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${n("anamnesis.configEditor.panelLive", {
|
|
6647
|
-
count:
|
|
6665
|
+
count: T
|
|
6648
6666
|
})} · ${n("anamnesis.configEditor.panelArchived", {
|
|
6649
|
-
count:
|
|
6667
|
+
count: F - T
|
|
6650
6668
|
})}` }),
|
|
6651
|
-
/* @__PURE__ */ t(Ze, { divider: "divided", children:
|
|
6669
|
+
/* @__PURE__ */ t(Ze, { divider: "divided", children: tn(e).map((m) => {
|
|
6652
6670
|
const N = e.pathologies.some(
|
|
6653
|
-
(
|
|
6654
|
-
),
|
|
6655
|
-
|
|
6656
|
-
code:
|
|
6671
|
+
(P) => P.parentCode === m.code && P.enabled !== !1
|
|
6672
|
+
), x = [
|
|
6673
|
+
m.parentCode ? n("anamnesis.configEditor.subCodeOf", {
|
|
6674
|
+
code: m.parentCode
|
|
6657
6675
|
}) : null,
|
|
6658
6676
|
N ? n("anamnesis.configEditor.familyHeading") : null
|
|
6659
6677
|
].filter(Boolean).join(" · ");
|
|
@@ -6661,15 +6679,15 @@ function Cl({
|
|
|
6661
6679
|
Ze.Item,
|
|
6662
6680
|
{
|
|
6663
6681
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6664
|
-
Se(
|
|
6665
|
-
|
|
6682
|
+
Se(m.code, n, m),
|
|
6683
|
+
m.enabled === !1 ? /* @__PURE__ */ t(J, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
|
|
6666
6684
|
] }),
|
|
6667
|
-
description:
|
|
6685
|
+
description: x || void 0,
|
|
6668
6686
|
trailing: /* @__PURE__ */ d(
|
|
6669
6687
|
Ca,
|
|
6670
6688
|
{
|
|
6671
6689
|
"aria-label": n("anamnesis.configEditor.rowActions", {
|
|
6672
|
-
name: Se(
|
|
6690
|
+
name: Se(m.code, n, m)
|
|
6673
6691
|
}),
|
|
6674
6692
|
children: [
|
|
6675
6693
|
/* @__PURE__ */ t(
|
|
@@ -6677,18 +6695,18 @@ function Cl({
|
|
|
6677
6695
|
{
|
|
6678
6696
|
size: "sm",
|
|
6679
6697
|
intent: "ghost",
|
|
6680
|
-
icon: /* @__PURE__ */ t(
|
|
6698
|
+
icon: /* @__PURE__ */ t(ma, { "aria-hidden": "true" }),
|
|
6681
6699
|
"aria-label": n("anamnesis.configEditor.edit", {
|
|
6682
6700
|
name: Se(
|
|
6683
|
-
|
|
6701
|
+
m.code,
|
|
6684
6702
|
n,
|
|
6685
|
-
|
|
6703
|
+
m
|
|
6686
6704
|
)
|
|
6687
6705
|
}),
|
|
6688
|
-
onClick: () => o({ kind: "pathology", entry:
|
|
6706
|
+
onClick: () => o({ kind: "pathology", entry: m })
|
|
6689
6707
|
}
|
|
6690
6708
|
),
|
|
6691
|
-
|
|
6709
|
+
m.enabled === !1 ? /* @__PURE__ */ t(
|
|
6692
6710
|
de,
|
|
6693
6711
|
{
|
|
6694
6712
|
size: "sm",
|
|
@@ -6698,14 +6716,14 @@ function Cl({
|
|
|
6698
6716
|
"anamnesis.configEditor.restore",
|
|
6699
6717
|
{
|
|
6700
6718
|
name: Se(
|
|
6701
|
-
|
|
6719
|
+
m.code,
|
|
6702
6720
|
n,
|
|
6703
|
-
|
|
6721
|
+
m
|
|
6704
6722
|
)
|
|
6705
6723
|
}
|
|
6706
6724
|
),
|
|
6707
6725
|
onClick: () => f(
|
|
6708
|
-
{ kind: "pathology", entry:
|
|
6726
|
+
{ kind: "pathology", entry: m },
|
|
6709
6727
|
void 0
|
|
6710
6728
|
)
|
|
6711
6729
|
}
|
|
@@ -6719,14 +6737,14 @@ function Cl({
|
|
|
6719
6737
|
"anamnesis.configEditor.archive",
|
|
6720
6738
|
{
|
|
6721
6739
|
name: Se(
|
|
6722
|
-
|
|
6740
|
+
m.code,
|
|
6723
6741
|
n,
|
|
6724
|
-
|
|
6742
|
+
m
|
|
6725
6743
|
)
|
|
6726
6744
|
}
|
|
6727
6745
|
),
|
|
6728
6746
|
onClick: () => f(
|
|
6729
|
-
{ kind: "pathology", entry:
|
|
6747
|
+
{ kind: "pathology", entry: m },
|
|
6730
6748
|
!1
|
|
6731
6749
|
)
|
|
6732
6750
|
}
|
|
@@ -6735,7 +6753,7 @@ function Cl({
|
|
|
6735
6753
|
}
|
|
6736
6754
|
)
|
|
6737
6755
|
},
|
|
6738
|
-
|
|
6756
|
+
m.code
|
|
6739
6757
|
);
|
|
6740
6758
|
}) }),
|
|
6741
6759
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
@@ -6751,31 +6769,31 @@ function Cl({
|
|
|
6751
6769
|
] }) }),
|
|
6752
6770
|
/* @__PURE__ */ t(Y.Content, { value: "targets", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
|
|
6753
6771
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.configEditor.panelTracked", {
|
|
6754
|
-
count:
|
|
6772
|
+
count: A
|
|
6755
6773
|
}) }),
|
|
6756
6774
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.configEditor.targetsIntro") }),
|
|
6757
|
-
|
|
6758
|
-
const N = Ne(e,
|
|
6775
|
+
rn.map((m) => {
|
|
6776
|
+
const N = Ne(e, m);
|
|
6759
6777
|
return N.length === 0 ? null : /* @__PURE__ */ d(
|
|
6760
6778
|
"section",
|
|
6761
6779
|
{
|
|
6762
6780
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
6763
6781
|
children: [
|
|
6764
|
-
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${
|
|
6765
|
-
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: N.map((
|
|
6766
|
-
|
|
6782
|
+
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${m}`) }),
|
|
6783
|
+
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: N.map((x) => /* @__PURE__ */ t(
|
|
6784
|
+
pn,
|
|
6767
6785
|
{
|
|
6768
|
-
label: Te(
|
|
6769
|
-
checked:
|
|
6770
|
-
onCheckedChange: (
|
|
6771
|
-
(
|
|
6786
|
+
label: Te(x, n),
|
|
6787
|
+
checked: x.goal === !0,
|
|
6788
|
+
onCheckedChange: (P) => c(
|
|
6789
|
+
(S) => S.key === x.key ? { ...S, goal: P === !0 } : S
|
|
6772
6790
|
)
|
|
6773
6791
|
},
|
|
6774
|
-
|
|
6792
|
+
x.key
|
|
6775
6793
|
)) })
|
|
6776
6794
|
]
|
|
6777
6795
|
},
|
|
6778
|
-
|
|
6796
|
+
m
|
|
6779
6797
|
);
|
|
6780
6798
|
})
|
|
6781
6799
|
] }) })
|
|
@@ -6823,7 +6841,7 @@ function cr({
|
|
|
6823
6841
|
o || a();
|
|
6824
6842
|
},
|
|
6825
6843
|
children: e ? /* @__PURE__ */ t(
|
|
6826
|
-
|
|
6844
|
+
ur,
|
|
6827
6845
|
{
|
|
6828
6846
|
editing: e,
|
|
6829
6847
|
onClose: a,
|
|
@@ -6839,49 +6857,49 @@ function cr({
|
|
|
6839
6857
|
function dr(e) {
|
|
6840
6858
|
return e.kind === "pathology" ? `pathology:${e.entry.code}` : e.kind === "field" ? `field:${e.sectionKey}:${e.entry.key}` : `${e.kind}:${e.entry.key}`;
|
|
6841
6859
|
}
|
|
6842
|
-
function
|
|
6860
|
+
function ur({
|
|
6843
6861
|
editing: e,
|
|
6844
6862
|
onClose: a,
|
|
6845
6863
|
config: n,
|
|
6846
6864
|
onConfigChange: i,
|
|
6847
6865
|
t: s
|
|
6848
6866
|
}) {
|
|
6849
|
-
const o = e.entry, r =
|
|
6867
|
+
const o = e.entry, r = mr(e, s), [l, c] = $(o.label ?? ""), [u, h] = $(
|
|
6850
6868
|
e.kind === "field" ? o.helpText ?? "" : ""
|
|
6851
6869
|
), [g, p] = $(
|
|
6852
6870
|
e.kind === "field" && e.entry.required === !0
|
|
6853
|
-
),
|
|
6854
|
-
f ? (
|
|
6855
|
-
),
|
|
6856
|
-
const
|
|
6857
|
-
const N = { ...
|
|
6858
|
-
return
|
|
6871
|
+
), k = e.kind === "field" ? e.entry : null, y = k !== null && (k.type === "choice" || k.type === "multiChoice"), f = y && !or.has(k.key), [C, w] = $(
|
|
6872
|
+
f ? (k.options ?? []).join(", ") : ""
|
|
6873
|
+
), E = C.split(",").map((F) => F.trim()).filter(Boolean), D = !f || E.length > 0, T = () => {
|
|
6874
|
+
const F = l.trim(), A = (m) => {
|
|
6875
|
+
const N = { ...m };
|
|
6876
|
+
return F ? N.label = F : delete N.label, N;
|
|
6859
6877
|
};
|
|
6860
6878
|
if (e.kind === "parameter")
|
|
6861
6879
|
i({
|
|
6862
6880
|
...n,
|
|
6863
6881
|
parameters: n.parameters.map(
|
|
6864
|
-
(
|
|
6882
|
+
(m) => m.key === e.entry.key ? A(m) : m
|
|
6865
6883
|
)
|
|
6866
6884
|
});
|
|
6867
6885
|
else if (e.kind === "section")
|
|
6868
6886
|
i({
|
|
6869
6887
|
...n,
|
|
6870
6888
|
intakeSections: n.intakeSections.map(
|
|
6871
|
-
(
|
|
6889
|
+
(m) => m.key === e.entry.key ? A(m) : m
|
|
6872
6890
|
)
|
|
6873
6891
|
});
|
|
6874
6892
|
else if (e.kind === "field") {
|
|
6875
|
-
const
|
|
6893
|
+
const m = u.trim();
|
|
6876
6894
|
i({
|
|
6877
6895
|
...n,
|
|
6878
6896
|
intakeSections: n.intakeSections.map(
|
|
6879
6897
|
(N) => N.key === e.sectionKey ? {
|
|
6880
6898
|
...N,
|
|
6881
|
-
fields: N.fields.map((
|
|
6882
|
-
if (
|
|
6883
|
-
const
|
|
6884
|
-
return
|
|
6899
|
+
fields: N.fields.map((x) => {
|
|
6900
|
+
if (x.key !== e.entry.key) return x;
|
|
6901
|
+
const P = A(x);
|
|
6902
|
+
return m ? P.helpText = m : delete P.helpText, f && (P.options = E), g ? P.required = !0 : delete P.required, P;
|
|
6885
6903
|
})
|
|
6886
6904
|
} : N
|
|
6887
6905
|
)
|
|
@@ -6890,7 +6908,7 @@ function mr({
|
|
|
6890
6908
|
i({
|
|
6891
6909
|
...n,
|
|
6892
6910
|
pathologies: n.pathologies.map(
|
|
6893
|
-
(
|
|
6911
|
+
(m) => m.code === o.code ? A(m) : m
|
|
6894
6912
|
)
|
|
6895
6913
|
});
|
|
6896
6914
|
a();
|
|
@@ -6918,7 +6936,7 @@ function mr({
|
|
|
6918
6936
|
ie,
|
|
6919
6937
|
{
|
|
6920
6938
|
value: l,
|
|
6921
|
-
onChange: (
|
|
6939
|
+
onChange: (F) => c(F.target.value),
|
|
6922
6940
|
placeholder: r
|
|
6923
6941
|
}
|
|
6924
6942
|
)
|
|
@@ -6927,17 +6945,17 @@ function mr({
|
|
|
6927
6945
|
e.kind === "field" ? /* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.helpField"), optional: !0, children: /* @__PURE__ */ t(
|
|
6928
6946
|
ta,
|
|
6929
6947
|
{
|
|
6930
|
-
value:
|
|
6931
|
-
onChange: (
|
|
6948
|
+
value: u,
|
|
6949
|
+
onChange: (F) => h(F.target.value),
|
|
6932
6950
|
minRows: 2
|
|
6933
6951
|
}
|
|
6934
6952
|
) }) : null,
|
|
6935
6953
|
e.kind === "field" ? /* @__PURE__ */ t(
|
|
6936
|
-
|
|
6954
|
+
pn,
|
|
6937
6955
|
{
|
|
6938
6956
|
label: s("anamnesis.configEditor.requiredField"),
|
|
6939
6957
|
checked: g,
|
|
6940
|
-
onCheckedChange: (
|
|
6958
|
+
onCheckedChange: (F) => p(F === !0)
|
|
6941
6959
|
}
|
|
6942
6960
|
) : null,
|
|
6943
6961
|
f ? /* @__PURE__ */ t(
|
|
@@ -6950,31 +6968,31 @@ function mr({
|
|
|
6950
6968
|
ie,
|
|
6951
6969
|
{
|
|
6952
6970
|
value: C,
|
|
6953
|
-
onChange: (
|
|
6971
|
+
onChange: (F) => w(F.target.value)
|
|
6954
6972
|
}
|
|
6955
6973
|
)
|
|
6956
6974
|
}
|
|
6957
6975
|
) : y ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.configEditor.optionsCurrent", {
|
|
6958
|
-
list: (
|
|
6959
|
-
(
|
|
6960
|
-
defaultValue:
|
|
6976
|
+
list: (k.options ?? []).map(
|
|
6977
|
+
(F) => s(`anamnesis.field.${k.key}.option.${F}`, {
|
|
6978
|
+
defaultValue: F
|
|
6961
6979
|
})
|
|
6962
6980
|
).join(", ")
|
|
6963
6981
|
}) }) : null
|
|
6964
6982
|
] }),
|
|
6965
6983
|
/* @__PURE__ */ d(ee.Footer, { children: [
|
|
6966
6984
|
/* @__PURE__ */ t(ne, { intent: "ghost", onClick: a, children: s("anamnesis.configEditor.cancel") }),
|
|
6967
|
-
/* @__PURE__ */ t(ne, { intent: "primary", onClick:
|
|
6985
|
+
/* @__PURE__ */ t(ne, { intent: "primary", onClick: T, disabled: !D, children: s("anamnesis.configEditor.save") })
|
|
6968
6986
|
] })
|
|
6969
6987
|
] });
|
|
6970
6988
|
}
|
|
6971
|
-
function
|
|
6989
|
+
function mr(e, a) {
|
|
6972
6990
|
return e.kind === "parameter" ? Te({ ...e.entry, label: void 0 }, a) : e.kind === "section" ? ye({ ...e.entry, label: void 0 }, a) : e.kind === "field" ? he({ ...e.entry, label: void 0 }, a) : Se(e.entry.code, a, {
|
|
6973
6991
|
...e.entry,
|
|
6974
6992
|
label: void 0
|
|
6975
6993
|
});
|
|
6976
6994
|
}
|
|
6977
|
-
function
|
|
6995
|
+
function an(e) {
|
|
6978
6996
|
return e === "choice" || e === "choiceWithText" || e === "multiChoice";
|
|
6979
6997
|
}
|
|
6980
6998
|
function pr({
|
|
@@ -7012,7 +7030,7 @@ function hr({
|
|
|
7012
7030
|
onConfigChange: i,
|
|
7013
7031
|
t: s
|
|
7014
7032
|
}) {
|
|
7015
|
-
const [o, r] = $(""), [l, c] = $(""), [
|
|
7033
|
+
const [o, r] = $(""), [l, c] = $(""), [u, h] = $(""), [g, p] = $(""), [k, y] = $(""), [f, C] = $(""), [w, E] = $("0"), [D, T] = $(""), [F, A] = $(""), [m, N] = $(""), [x, P] = $(""), [S, V] = $(!1), [R, j] = $(""), G = rn.map((I) => ({
|
|
7016
7034
|
value: I,
|
|
7017
7035
|
label: s(`anamnesis.group.${I}`)
|
|
7018
7036
|
})), z = rr.map((I) => ({
|
|
@@ -7024,12 +7042,12 @@ function hr({
|
|
|
7024
7042
|
})), W = n.pathologies.filter((I) => !I.parentCode && I.enabled !== !1).map((I) => ({
|
|
7025
7043
|
value: I.code,
|
|
7026
7044
|
label: Se(I.code, s, I)
|
|
7027
|
-
})), Z =
|
|
7045
|
+
})), Z = F.split(",").map((I) => I.trim()).filter(Boolean), se = e.kind === "parameter" ? o.trim() !== "" && l !== "" && u !== "" : e.kind === "field" ? o.trim() !== "" && D !== "" && (!an(D) || Z.length > 0) : e.kind === "section" ? o.trim() !== "" : o.trim() !== "" && x.trim() !== "" && // A duplicate code would collide with the existing entry
|
|
7028
7046
|
// everywhere codes are matched (lookup, archive, edit) —
|
|
7029
7047
|
// uniqueness is the add gate, matching keyFromLabel's guarantee
|
|
7030
7048
|
// on the other vocabularies.
|
|
7031
7049
|
!n.pathologies.some(
|
|
7032
|
-
(I) => I.code.toLowerCase() ===
|
|
7050
|
+
(I) => I.code.toLowerCase() === x.trim().toLowerCase()
|
|
7033
7051
|
), X = () => {
|
|
7034
7052
|
const I = o.trim();
|
|
7035
7053
|
if (e.kind === "parameter") {
|
|
@@ -7037,17 +7055,17 @@ function hr({
|
|
|
7037
7055
|
if (Le.trim() === "") return;
|
|
7038
7056
|
const Fe = Number(Le);
|
|
7039
7057
|
return Number.isFinite(Fe) ? Fe : void 0;
|
|
7040
|
-
},
|
|
7041
|
-
key:
|
|
7058
|
+
}, me = ae(k), ue = ae(f), Re = {
|
|
7059
|
+
key: Za(I, B),
|
|
7042
7060
|
label: I,
|
|
7043
7061
|
group: l,
|
|
7044
|
-
betterDirection:
|
|
7062
|
+
betterDirection: u,
|
|
7045
7063
|
precision: Number(w),
|
|
7046
7064
|
...g.trim() ? { unit: g.trim() } : {},
|
|
7047
|
-
...
|
|
7065
|
+
...me != null || ue != null ? {
|
|
7048
7066
|
referenceRange: {
|
|
7049
|
-
...
|
|
7050
|
-
...
|
|
7067
|
+
...me != null ? { min: me } : {},
|
|
7068
|
+
...ue != null ? { max: ue } : {}
|
|
7051
7069
|
}
|
|
7052
7070
|
} : {}
|
|
7053
7071
|
};
|
|
@@ -7055,29 +7073,29 @@ function hr({
|
|
|
7055
7073
|
} else if (e.kind === "field") {
|
|
7056
7074
|
const B = new Set(
|
|
7057
7075
|
n.intakeSections.flatMap(
|
|
7058
|
-
(
|
|
7076
|
+
(ue) => ue.fields.map((Re) => Re.key)
|
|
7059
7077
|
)
|
|
7060
|
-
), ae =
|
|
7061
|
-
key:
|
|
7078
|
+
), ae = D === "numberInteger" || D === "numberDecimal" ? "number" : D === "choiceWithText" ? "choice" : D, me = {
|
|
7079
|
+
key: Za(I, B),
|
|
7062
7080
|
label: I,
|
|
7063
7081
|
type: ae,
|
|
7064
|
-
...
|
|
7065
|
-
...
|
|
7066
|
-
...
|
|
7067
|
-
...
|
|
7068
|
-
...
|
|
7082
|
+
...D === "numberDecimal" ? { decimal: !0 } : {},
|
|
7083
|
+
...D === "choiceWithText" ? { detail: !0 } : {},
|
|
7084
|
+
...an(D) ? { options: Z } : {},
|
|
7085
|
+
...m.trim() ? { helpText: m.trim() } : {},
|
|
7086
|
+
...S ? { required: !0 } : {}
|
|
7069
7087
|
};
|
|
7070
7088
|
i({
|
|
7071
7089
|
...n,
|
|
7072
7090
|
intakeSections: n.intakeSections.map(
|
|
7073
|
-
(
|
|
7091
|
+
(ue) => ue.key === e.sectionKey ? { ...ue, fields: [...ue.fields, me] } : ue
|
|
7074
7092
|
)
|
|
7075
7093
|
});
|
|
7076
7094
|
} else if (e.kind === "section") {
|
|
7077
7095
|
const B = new Set(
|
|
7078
|
-
n.intakeSections.map((
|
|
7096
|
+
n.intakeSections.map((me) => me.key)
|
|
7079
7097
|
), ae = {
|
|
7080
|
-
key:
|
|
7098
|
+
key: Za(I, B),
|
|
7081
7099
|
label: I,
|
|
7082
7100
|
fields: []
|
|
7083
7101
|
};
|
|
@@ -7087,9 +7105,9 @@ function hr({
|
|
|
7087
7105
|
});
|
|
7088
7106
|
} else {
|
|
7089
7107
|
const B = {
|
|
7090
|
-
code:
|
|
7108
|
+
code: x.trim(),
|
|
7091
7109
|
label: I,
|
|
7092
|
-
...
|
|
7110
|
+
...R ? { parentCode: R } : {}
|
|
7093
7111
|
};
|
|
7094
7112
|
i({
|
|
7095
7113
|
...n,
|
|
@@ -7109,8 +7127,8 @@ function hr({
|
|
|
7109
7127
|
e.kind === "pathology" ? /* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.codeField"), required: !0, children: /* @__PURE__ */ t(
|
|
7110
7128
|
ie,
|
|
7111
7129
|
{
|
|
7112
|
-
value:
|
|
7113
|
-
onChange: (I) =>
|
|
7130
|
+
value: x,
|
|
7131
|
+
onChange: (I) => P(I.target.value)
|
|
7114
7132
|
}
|
|
7115
7133
|
) }) : null,
|
|
7116
7134
|
/* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.labelField"), required: !0, children: /* @__PURE__ */ t(
|
|
@@ -7124,7 +7142,7 @@ function hr({
|
|
|
7124
7142
|
/* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.groupField"), required: !0, children: /* @__PURE__ */ t(
|
|
7125
7143
|
Ve,
|
|
7126
7144
|
{
|
|
7127
|
-
options:
|
|
7145
|
+
options: G,
|
|
7128
7146
|
value: l,
|
|
7129
7147
|
onValueChange: (I) => c(I),
|
|
7130
7148
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
@@ -7140,7 +7158,7 @@ function hr({
|
|
|
7140
7158
|
Ve,
|
|
7141
7159
|
{
|
|
7142
7160
|
options: z,
|
|
7143
|
-
value:
|
|
7161
|
+
value: u,
|
|
7144
7162
|
onValueChange: (I) => h(I),
|
|
7145
7163
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
7146
7164
|
"aria-label": s("anamnesis.configEditor.directionField")
|
|
@@ -7170,7 +7188,7 @@ function hr({
|
|
|
7170
7188
|
{ value: "2", label: "2" }
|
|
7171
7189
|
],
|
|
7172
7190
|
value: w,
|
|
7173
|
-
onValueChange: (I) =>
|
|
7191
|
+
onValueChange: (I) => E(I || "0"),
|
|
7174
7192
|
"aria-label": s("anamnesis.configEditor.precisionField")
|
|
7175
7193
|
}
|
|
7176
7194
|
)
|
|
@@ -7187,7 +7205,7 @@ function hr({
|
|
|
7187
7205
|
ie,
|
|
7188
7206
|
{
|
|
7189
7207
|
inputMode: "decimal",
|
|
7190
|
-
value:
|
|
7208
|
+
value: k,
|
|
7191
7209
|
onChange: (I) => y(I.target.value)
|
|
7192
7210
|
}
|
|
7193
7211
|
)
|
|
@@ -7215,13 +7233,13 @@ function hr({
|
|
|
7215
7233
|
Ve,
|
|
7216
7234
|
{
|
|
7217
7235
|
options: U,
|
|
7218
|
-
value:
|
|
7219
|
-
onValueChange: (I) =>
|
|
7236
|
+
value: D,
|
|
7237
|
+
onValueChange: (I) => T(I),
|
|
7220
7238
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
7221
7239
|
"aria-label": s("anamnesis.configEditor.typeField")
|
|
7222
7240
|
}
|
|
7223
7241
|
) }),
|
|
7224
|
-
|
|
7242
|
+
an(D) ? /* @__PURE__ */ t(
|
|
7225
7243
|
q,
|
|
7226
7244
|
{
|
|
7227
7245
|
label: s("anamnesis.configEditor.optionsField"),
|
|
@@ -7230,8 +7248,8 @@ function hr({
|
|
|
7230
7248
|
children: /* @__PURE__ */ t(
|
|
7231
7249
|
ie,
|
|
7232
7250
|
{
|
|
7233
|
-
value:
|
|
7234
|
-
onChange: (I) =>
|
|
7251
|
+
value: F,
|
|
7252
|
+
onChange: (I) => A(I.target.value)
|
|
7235
7253
|
}
|
|
7236
7254
|
)
|
|
7237
7255
|
}
|
|
@@ -7239,16 +7257,16 @@ function hr({
|
|
|
7239
7257
|
/* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.helpField"), optional: !0, children: /* @__PURE__ */ t(
|
|
7240
7258
|
ta,
|
|
7241
7259
|
{
|
|
7242
|
-
value:
|
|
7260
|
+
value: m,
|
|
7243
7261
|
onChange: (I) => N(I.target.value),
|
|
7244
7262
|
minRows: 2
|
|
7245
7263
|
}
|
|
7246
7264
|
) }),
|
|
7247
7265
|
/* @__PURE__ */ t(
|
|
7248
|
-
|
|
7266
|
+
pn,
|
|
7249
7267
|
{
|
|
7250
7268
|
label: s("anamnesis.configEditor.requiredField"),
|
|
7251
|
-
checked:
|
|
7269
|
+
checked: S,
|
|
7252
7270
|
onCheckedChange: (I) => V(I === !0)
|
|
7253
7271
|
}
|
|
7254
7272
|
)
|
|
@@ -7263,8 +7281,8 @@ function hr({
|
|
|
7263
7281
|
Ve,
|
|
7264
7282
|
{
|
|
7265
7283
|
options: W,
|
|
7266
|
-
value:
|
|
7267
|
-
onValueChange: (I) =>
|
|
7284
|
+
value: R,
|
|
7285
|
+
onValueChange: (I) => j(I),
|
|
7268
7286
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
7269
7287
|
clearable: !0,
|
|
7270
7288
|
"aria-label": s("anamnesis.configEditor.parentField")
|
|
@@ -7329,7 +7347,7 @@ function Tl(e, a) {
|
|
|
7329
7347
|
(s, o) => o.dateIso.localeCompare(s.dateIso)
|
|
7330
7348
|
);
|
|
7331
7349
|
}
|
|
7332
|
-
const
|
|
7350
|
+
const nn = "patterns", fr = {
|
|
7333
7351
|
anamnesis: {
|
|
7334
7352
|
mainLabel: "Anamnesis record — {{mode}}",
|
|
7335
7353
|
mode: { intake: "Intake", compile: "Compile", readOnly: "Read-only" },
|
|
@@ -7573,6 +7591,7 @@ const tn = "patterns", fr = {
|
|
|
7573
7591
|
added: "Added",
|
|
7574
7592
|
removed: "Removed",
|
|
7575
7593
|
changed: "Changed",
|
|
7594
|
+
notMeasured: "Not measured",
|
|
7576
7595
|
changedCell: "Changed",
|
|
7577
7596
|
category: {
|
|
7578
7597
|
measurement: "Measurements",
|
|
@@ -8206,6 +8225,7 @@ const tn = "patterns", fr = {
|
|
|
8206
8225
|
added: "Aggiunto",
|
|
8207
8226
|
removed: "Rimosso",
|
|
8208
8227
|
changed: "Modificato",
|
|
8228
|
+
notMeasured: "Non misurato",
|
|
8209
8229
|
changedCell: "Modificato",
|
|
8210
8230
|
category: {
|
|
8211
8231
|
measurement: "Misurazioni",
|
|
@@ -8642,6 +8662,7 @@ const tn = "patterns", fr = {
|
|
|
8642
8662
|
added: "أُضيف",
|
|
8643
8663
|
removed: "أُزيل",
|
|
8644
8664
|
changed: "تغيّر",
|
|
8665
|
+
notMeasured: "لم يُقَس",
|
|
8645
8666
|
changedCell: "تغيّر",
|
|
8646
8667
|
category: {
|
|
8647
8668
|
measurement: "القياسات",
|
|
@@ -8918,6 +8939,7 @@ const tn = "patterns", fr = {
|
|
|
8918
8939
|
added: "追加",
|
|
8919
8940
|
removed: "削除",
|
|
8920
8941
|
changed: "変更",
|
|
8942
|
+
notMeasured: "未測定",
|
|
8921
8943
|
changedCell: "変更",
|
|
8922
8944
|
category: {
|
|
8923
8945
|
measurement: "測定値",
|
|
@@ -9147,31 +9169,33 @@ const tn = "patterns", fr = {
|
|
|
9147
9169
|
};
|
|
9148
9170
|
function Sl(e) {
|
|
9149
9171
|
for (const [a, n] of Object.entries(xr))
|
|
9150
|
-
e.hasResourceBundle(a,
|
|
9172
|
+
e.hasResourceBundle(a, nn) ? e.addResourceBundle(a, nn, n, !0, !1) : e.addResourceBundle(a, nn, n);
|
|
9151
9173
|
}
|
|
9152
9174
|
export {
|
|
9153
9175
|
wl as A,
|
|
9154
9176
|
zi as L,
|
|
9155
|
-
|
|
9177
|
+
nn as P,
|
|
9156
9178
|
We as S,
|
|
9157
9179
|
Oi as T,
|
|
9158
9180
|
Cl as a,
|
|
9159
9181
|
Pe as b,
|
|
9160
|
-
|
|
9161
|
-
|
|
9182
|
+
tn as c,
|
|
9183
|
+
je as d,
|
|
9162
9184
|
Xn as e,
|
|
9163
9185
|
Tl as f,
|
|
9164
9186
|
Bi as g,
|
|
9165
9187
|
Ne as h,
|
|
9166
9188
|
ot as i,
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9189
|
+
hn as j,
|
|
9190
|
+
vn as k,
|
|
9191
|
+
he as l,
|
|
9192
|
+
zt as m,
|
|
9193
|
+
Mi as n,
|
|
9194
|
+
qi as o,
|
|
9195
|
+
Za as p,
|
|
9196
|
+
la as q,
|
|
9174
9197
|
Sl as r,
|
|
9175
|
-
Nl as s
|
|
9198
|
+
Nl as s,
|
|
9199
|
+
Ot as t
|
|
9176
9200
|
};
|
|
9177
|
-
//# sourceMappingURL=anamnesis-i18n-
|
|
9201
|
+
//# sourceMappingURL=anamnesis-i18n-BiZeub0o.js.map
|