@alfadocs/ui-kit-debug 1.4.8 → 1.4.9
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-summary-card-FNSkuUMB.js +346 -0
- package/dist/_chunks/anamnesis-summary-card-FNSkuUMB.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-Co3BA0ro.js → anamnesis-summary-rows-6tOCXdoz.js} +587 -592
- package/dist/_chunks/anamnesis-summary-rows-6tOCXdoz.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/anamnesis-summary-card/anamnesis-summary-card.d.ts +6 -0
- package/dist/components/anamnesis-summary-card/anamnesis-summary-card.d.ts.map +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +1 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +1 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +1 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +1 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +1 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +1 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +1 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +1 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +1 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +1 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +1 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +1 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +1 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +1 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/locales/ar.json +1 -0
- package/dist/locales/de.json +1 -0
- package/dist/locales/el.json +1 -0
- package/dist/locales/en.json +1 -0
- package/dist/locales/es.json +1 -0
- package/dist/locales/fr.json +1 -0
- package/dist/locales/hi.json +1 -0
- package/dist/locales/it.json +1 -0
- package/dist/locales/ja.json +1 -0
- package/dist/locales/nl.json +1 -0
- package/dist/locales/pl.json +1 -0
- package/dist/locales/pt.json +1 -0
- package/dist/locales/ro.json +1 -0
- package/dist/locales/ru.json +1 -0
- package/dist/locales/sq.json +1 -0
- package/dist/locales/sv.json +1 -0
- package/dist/locales/tr.json +1 -0
- package/dist/locales/zh.json +1 -0
- package/dist/patterns/anamnesis/anamnesis-intake.d.ts.map +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/anamnesis-summary-card-BvaSnAbI.js +0 -302
- package/dist/_chunks/anamnesis-summary-card-BvaSnAbI.js.map +0 -1
- package/dist/_chunks/anamnesis-summary-rows-Co3BA0ro.js.map +0 -1
package/dist/_chunks/{anamnesis-summary-rows-Co3BA0ro.js → anamnesis-summary-rows-6tOCXdoz.js}
RENAMED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsxs as d, jsx as t, Fragment as Ae } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as we, useState as z, useEffect as on, useCallback as tn, useId as Qe, useMemo as q, Fragment as ti, useContext as ii, createContext as si } from "react";
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
5
|
-
import { I as
|
|
6
|
-
import { C as
|
|
7
|
-
import { C as
|
|
3
|
+
import { B as X } from "./badge-DCOqV9mI.js";
|
|
4
|
+
import { B as ne } from "./button-BvNtqHAS.js";
|
|
5
|
+
import { I as ce } from "./icon-button-9c9Gp41m.js";
|
|
6
|
+
import { C as ue } from "./card-DPmk26CL.js";
|
|
7
|
+
import { C as ca, b as Za, a as da } from "./collapsible-CTjxzGuF.js";
|
|
8
8
|
import { E as Ue } from "./empty-state-Df0tM6Kn.js";
|
|
9
9
|
import { F as V } from "./form-field-M5UpX65Z.js";
|
|
10
|
-
import { M as
|
|
10
|
+
import { M as ua } from "./multi-select-CC52Qws6.js";
|
|
11
11
|
import { N as yn } from "./number-input-DOe5VYei.js";
|
|
12
12
|
import { R as ke } from "./radio-TWf9Q-mp.js";
|
|
13
13
|
import { R as vn } from "./radio-group-CI-6SmSw.js";
|
|
14
14
|
import { S as Ve } from "./select-BW5ecXlX.js";
|
|
15
|
-
import { T as
|
|
15
|
+
import { T as Q } from "./tabs-CBb2AidH.js";
|
|
16
16
|
import { T as sn } from "./text-area-Bt3p7Pt0.js";
|
|
17
17
|
import { T as ie } from "./text-input-CUvCb6ST.js";
|
|
18
18
|
import { T as rn } from "./timestamp-BV2lC-wV.js";
|
|
19
19
|
import { D as oi } from "./date-picker-Bp64zk2p.js";
|
|
20
20
|
import { A as He } from "./alert-CiJT540z.js";
|
|
21
21
|
import { D as _ } from "./description-list-Ck7fKdt5.js";
|
|
22
|
-
import { c as
|
|
22
|
+
import { c as et } from "./index-D2ZczOXr.js";
|
|
23
23
|
import { S as ri } from "./sparkline-BmGcEyZO.js";
|
|
24
24
|
import { U as li } from "./user-B12p7bVF.js";
|
|
25
|
-
import { A as
|
|
25
|
+
import { A as nt, a as at } from "./arrow-up-BYvcvTkB.js";
|
|
26
26
|
import { M as ci } from "./minus-BQDHq1c1.js";
|
|
27
|
-
import { C as
|
|
27
|
+
import { C as ma } from "./chevron-down-DWE7GSq9.js";
|
|
28
28
|
import { S as di } from "./separator-CYU_bGFn.js";
|
|
29
29
|
import { X as ui } from "./x-B5YnXwCz.js";
|
|
30
30
|
import { A as mi } from "./annotation-marker-CsUJGZjQ.js";
|
|
31
|
-
import { D as
|
|
32
|
-
import { D as
|
|
31
|
+
import { D as Z } from "./dialog-UbKJCi1X.js";
|
|
32
|
+
import { D as le } from "./dropdown-menu-DU-Hrf33.js";
|
|
33
33
|
import { S as pi } from "./share-2-B49jcW2I.js";
|
|
34
34
|
import { F as hi } from "./file-text-5yv6r2ls.js";
|
|
35
35
|
import { P as gi } from "./printer-rkK0T1gi.js";
|
|
@@ -46,13 +46,13 @@ import { P as an } from "./plus-DzMQ_c6b.js";
|
|
|
46
46
|
import { T as Ci } from "./trash-2-uumy3fy1.js";
|
|
47
47
|
import { A as Ti, b as Si, c as Ai, a as Ei } from "./accordion-C11v9ouP.js";
|
|
48
48
|
import { P as Di } from "./progress-CK8otcQ-.js";
|
|
49
|
-
import { c as
|
|
49
|
+
import { c as pa } from "./createLucideIcon-DhHxpK9K.js";
|
|
50
50
|
import { I as Sn } from "./icon-button-group-DrvuWPGJ.js";
|
|
51
51
|
import { L as en } from "./list-DgE1xWBM.js";
|
|
52
|
-
import { S as
|
|
52
|
+
import { S as ha } from "./switch-OILsBLWo.js";
|
|
53
53
|
import { G as Ii } from "./grip-vertical-onSb1JXO.js";
|
|
54
54
|
import { L as Ri } from "./lock-ClAFG1gy.js";
|
|
55
|
-
import { N as
|
|
55
|
+
import { N as La } from "./notebook-pen-CO7HoM-W.js";
|
|
56
56
|
/**
|
|
57
57
|
* @license lucide-react v1.22.0 - ISC
|
|
58
58
|
*
|
|
@@ -65,7 +65,7 @@ const Li = [
|
|
|
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
|
-
], An =
|
|
68
|
+
], An = pa("archive-restore", Li);
|
|
69
69
|
/**
|
|
70
70
|
* @license lucide-react v1.22.0 - ISC
|
|
71
71
|
*
|
|
@@ -76,7 +76,7 @@ const Fi = [
|
|
|
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
|
-
], En =
|
|
79
|
+
], En = pa("archive", Fi);
|
|
80
80
|
/**
|
|
81
81
|
* @license lucide-react v1.22.0 - ISC
|
|
82
82
|
*
|
|
@@ -92,7 +92,7 @@ const Pi = [
|
|
|
92
92
|
}
|
|
93
93
|
],
|
|
94
94
|
["path", { d: "M6 12h16", key: "s4cdu5" }]
|
|
95
|
-
], _i =
|
|
95
|
+
], _i = pa("send-horizontal", Pi), $i = [
|
|
96
96
|
{
|
|
97
97
|
key: "weight",
|
|
98
98
|
goal: !0,
|
|
@@ -268,12 +268,12 @@ const Pi = [
|
|
|
268
268
|
betterDirection: "up",
|
|
269
269
|
precision: 0
|
|
270
270
|
}
|
|
271
|
-
],
|
|
271
|
+
], tt = [
|
|
272
272
|
...$i,
|
|
273
273
|
...Mi,
|
|
274
274
|
...zi
|
|
275
275
|
];
|
|
276
|
-
Object.fromEntries(
|
|
276
|
+
Object.fromEntries(tt.map((e) => [e.key, e]));
|
|
277
277
|
const Rn = [
|
|
278
278
|
{ code: "E66" },
|
|
279
279
|
{ code: "E66.0", parentCode: "E66" },
|
|
@@ -293,7 +293,7 @@ const Oi = (e) => `anamnesis.pathology.${e.replace(/\./g, "_")}`;
|
|
|
293
293
|
Rn.filter(
|
|
294
294
|
(e) => !Rn.some((n) => n.parentCode === e.code)
|
|
295
295
|
).map((e) => e.code);
|
|
296
|
-
const
|
|
296
|
+
const it = [
|
|
297
297
|
{
|
|
298
298
|
key: "reason",
|
|
299
299
|
fields: [{ key: "reasonForVisit", required: !0, type: "textarea" }]
|
|
@@ -421,7 +421,7 @@ const st = [
|
|
|
421
421
|
]
|
|
422
422
|
}
|
|
423
423
|
];
|
|
424
|
-
|
|
424
|
+
it.flatMap(
|
|
425
425
|
(e) => e.fields.map((n) => n.key)
|
|
426
426
|
);
|
|
427
427
|
const qi = /* @__PURE__ */ new Set([
|
|
@@ -443,8 +443,8 @@ function Ui(e) {
|
|
|
443
443
|
return Bi.has(e);
|
|
444
444
|
}
|
|
445
445
|
const We = {
|
|
446
|
-
parameters:
|
|
447
|
-
intakeSections:
|
|
446
|
+
parameters: tt,
|
|
447
|
+
intakeSections: it,
|
|
448
448
|
pathologies: Rn
|
|
449
449
|
};
|
|
450
450
|
function dn(e) {
|
|
@@ -462,11 +462,11 @@ function Ye(e) {
|
|
|
462
462
|
function Ln(e) {
|
|
463
463
|
return e.enabled !== !1;
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function st(e) {
|
|
466
466
|
const n = Vi(e.key);
|
|
467
467
|
return e.locked === n ? e : { ...e, locked: n };
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function ot(e) {
|
|
470
470
|
const n = [];
|
|
471
471
|
for (const a of e)
|
|
472
472
|
n.includes(a.group) || n.push(a.group);
|
|
@@ -475,17 +475,17 @@ function rt(e) {
|
|
|
475
475
|
);
|
|
476
476
|
}
|
|
477
477
|
function Ne(e, n) {
|
|
478
|
-
const i = dn(e).parameters.map(
|
|
479
|
-
return
|
|
478
|
+
const i = dn(e).parameters.map(st).filter((o) => Ln(o) || o.locked), s = n ? i.filter((o) => o.group === n) : i;
|
|
479
|
+
return ot(s);
|
|
480
480
|
}
|
|
481
481
|
function _e(e, n) {
|
|
482
|
-
const a = dn(e).parameters.map(
|
|
483
|
-
return
|
|
482
|
+
const a = dn(e).parameters.map(st), i = n ? a.filter((s) => s.group === n) : a;
|
|
483
|
+
return ot(i);
|
|
484
484
|
}
|
|
485
485
|
function Ki(e) {
|
|
486
486
|
return { ...e, fields: Ye(e.fields) };
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function ga(e) {
|
|
489
489
|
return Ye(dn(e).intakeSections).filter(Ln).map((n) => ({
|
|
490
490
|
...n,
|
|
491
491
|
fields: Ye(n.fields.filter(Ln))
|
|
@@ -494,22 +494,22 @@ function fa(e) {
|
|
|
494
494
|
function Ge(e) {
|
|
495
495
|
return Ye(dn(e).intakeSections).map(Ki);
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function rt(e) {
|
|
498
498
|
return Ye(dn(e).pathologies.filter(Ln));
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function sa(e) {
|
|
501
501
|
return Ye(dn(e).pathologies);
|
|
502
502
|
}
|
|
503
503
|
function zn(e) {
|
|
504
504
|
return Object.fromEntries(
|
|
505
|
-
|
|
505
|
+
sa(e).map((n) => [n.code, n])
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
508
|
function Hi(e) {
|
|
509
|
-
const n =
|
|
509
|
+
const n = rt(e);
|
|
510
510
|
return n.filter((a) => !n.some((i) => i.parentCode === a.code)).map((a) => a.code);
|
|
511
511
|
}
|
|
512
|
-
const
|
|
512
|
+
const fa = {
|
|
513
513
|
weight: "weightKg",
|
|
514
514
|
height: "heightCm",
|
|
515
515
|
waist: "waistCm",
|
|
@@ -521,7 +521,7 @@ const va = {
|
|
|
521
521
|
month: "short",
|
|
522
522
|
day: "numeric",
|
|
523
523
|
timeZone: "UTC"
|
|
524
|
-
},
|
|
524
|
+
}, lt = {
|
|
525
525
|
year: "numeric",
|
|
526
526
|
month: "short",
|
|
527
527
|
day: "numeric",
|
|
@@ -531,11 +531,11 @@ const va = {
|
|
|
531
531
|
function ln(e) {
|
|
532
532
|
return e != null && Gi.test(e);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function Fa(e) {
|
|
535
535
|
return ji.test(e) ? e.slice(0, 10) : e;
|
|
536
536
|
}
|
|
537
537
|
function On(e) {
|
|
538
|
-
return ln(e) ?
|
|
538
|
+
return ln(e) ? lt : Mn;
|
|
539
539
|
}
|
|
540
540
|
function Wi(e, n) {
|
|
541
541
|
return wi(e ?? null, n ?? null);
|
|
@@ -545,7 +545,7 @@ function cn(e) {
|
|
|
545
545
|
}
|
|
546
546
|
function Qi(e, n) {
|
|
547
547
|
if (!cn(e) || !cn(n)) return null;
|
|
548
|
-
const a = new Date(
|
|
548
|
+
const a = new Date(Fa(e)), i = new Date(Fa(n));
|
|
549
549
|
let s = i.getUTCFullYear() - a.getUTCFullYear();
|
|
550
550
|
const o = i.getUTCMonth() - a.getUTCMonth();
|
|
551
551
|
return (o < 0 || o === 0 && i.getUTCDate() < a.getUTCDate()) && (s -= 1), s < 0 ? null : s;
|
|
@@ -554,22 +554,22 @@ const Yi = /* @__PURE__ */ new Set([
|
|
|
554
554
|
"energy",
|
|
555
555
|
"protein"
|
|
556
556
|
]);
|
|
557
|
-
function
|
|
558
|
-
return e.key === "bmi" ? "computed" : e.key in
|
|
557
|
+
function ct(e) {
|
|
558
|
+
return e.key === "bmi" ? "computed" : e.key in fa ? "anthropometric" : Yi.has(e.key) ? "dietary" : "lab";
|
|
559
559
|
}
|
|
560
560
|
function pn(e) {
|
|
561
561
|
return e != null && Number.isFinite(e) ? e : null;
|
|
562
562
|
}
|
|
563
563
|
function $e(e, n) {
|
|
564
564
|
var a;
|
|
565
|
-
switch (
|
|
565
|
+
switch (ct(n)) {
|
|
566
566
|
case "computed":
|
|
567
567
|
return Wi(
|
|
568
568
|
pn(e.anthropometrics.weightKg),
|
|
569
569
|
pn(e.anthropometrics.heightCm)
|
|
570
570
|
);
|
|
571
571
|
case "anthropometric":
|
|
572
|
-
return pn(e.anthropometrics[
|
|
572
|
+
return pn(e.anthropometrics[fa[n.key]]);
|
|
573
573
|
case "dietary": {
|
|
574
574
|
const i = (a = e.dietaryIntake) == null ? void 0 : a.find((s) => s.parameterKey === n.key);
|
|
575
575
|
return i ? pn(i.value) : null;
|
|
@@ -587,29 +587,29 @@ function Xi(e, n) {
|
|
|
587
587
|
}
|
|
588
588
|
return null;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function Pa(e, n, a) {
|
|
591
591
|
return e.some((i) => i.parameterKey === n) ? e.map(
|
|
592
592
|
(i) => i.parameterKey === n ? { ...i, value: a } : i
|
|
593
593
|
) : [...e, { parameterKey: n, value: a }];
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
const i =
|
|
595
|
+
function _a(e, n, a) {
|
|
596
|
+
const i = ct(n);
|
|
597
597
|
return i === "computed" || n.computed ? e : i === "anthropometric" ? {
|
|
598
598
|
...e,
|
|
599
599
|
anthropometrics: {
|
|
600
600
|
...e.anthropometrics,
|
|
601
|
-
[
|
|
601
|
+
[fa[n.key]]: a
|
|
602
602
|
}
|
|
603
603
|
} : i === "dietary" ? {
|
|
604
604
|
...e,
|
|
605
|
-
dietaryIntake:
|
|
605
|
+
dietaryIntake: Pa(
|
|
606
606
|
e.dietaryIntake ?? [],
|
|
607
607
|
n.key,
|
|
608
608
|
a
|
|
609
609
|
)
|
|
610
|
-
} : { ...e, labs:
|
|
610
|
+
} : { ...e, labs: Pa(e.labs, n.key, a) };
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function dt(e, n, a) {
|
|
613
613
|
const i = a != null && Number.isFinite(a) ? a : null;
|
|
614
614
|
if (i == null) {
|
|
615
615
|
const r = e.targets.filter(
|
|
@@ -627,7 +627,7 @@ function ut(e, n, a) {
|
|
|
627
627
|
function xn(e, n) {
|
|
628
628
|
return e == null || !Number.isFinite(e) || !n ? null : n.min != null && e < n.min ? "low" : n.max != null && e > n.max ? "high" : null;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function $a(e, n) {
|
|
631
631
|
return n ? n.min != null && e < n.min ? n.min - e : n.max != null && e > n.max ? e - n.max : 0 : 0;
|
|
632
632
|
}
|
|
633
633
|
function kn(e, n, a) {
|
|
@@ -643,14 +643,14 @@ function kn(e, n, a) {
|
|
|
643
643
|
o = i > 0 ? "good" : "bad";
|
|
644
644
|
break;
|
|
645
645
|
case "toRange": {
|
|
646
|
-
const r =
|
|
646
|
+
const r = $a(n, a.referenceRange), l = $a(e, a.referenceRange);
|
|
647
647
|
l < r ? o = "good" : l > r ? o = "bad" : o = "neutral";
|
|
648
648
|
break;
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
return { abs: i, direction: s, valence: o };
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function va(e, n) {
|
|
654
654
|
const a = new Map(
|
|
655
655
|
e.targets.map((i) => [i.parameterKey, i.target])
|
|
656
656
|
);
|
|
@@ -676,12 +676,12 @@ const Ji = [
|
|
|
676
676
|
"nutritionalProposal",
|
|
677
677
|
"clinicalNotes"
|
|
678
678
|
];
|
|
679
|
-
function
|
|
679
|
+
function ut(e, n) {
|
|
680
680
|
const a = 10 ** n;
|
|
681
681
|
return Math.round(e * a) / a;
|
|
682
682
|
}
|
|
683
683
|
function Zi(e, n) {
|
|
684
|
-
return e == null ? null :
|
|
684
|
+
return e == null ? null : ut(e, n);
|
|
685
685
|
}
|
|
686
686
|
function Dn(e, n = (a, i) => a === i) {
|
|
687
687
|
return e.every((a) => n(a, e[0]));
|
|
@@ -703,12 +703,12 @@ function ns(e, n) {
|
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
const i = [];
|
|
706
|
-
for (const r of
|
|
706
|
+
for (const r of za(e, (l) => l.pathologyCodes)) {
|
|
707
707
|
const l = e.map((c) => c.pathologyCodes.includes(r));
|
|
708
708
|
Dn(l) || i.push({ code: r, present: l });
|
|
709
709
|
}
|
|
710
710
|
const s = [];
|
|
711
|
-
for (const r of
|
|
711
|
+
for (const r of za(
|
|
712
712
|
e,
|
|
713
713
|
(l) => l.therapy.map((c) => c.id)
|
|
714
714
|
)) {
|
|
@@ -727,7 +727,7 @@ function ns(e, n) {
|
|
|
727
727
|
}
|
|
728
728
|
return { visits: [...e], numeric: a, pathologies: i, medications: s, texts: o };
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function za(e, n) {
|
|
731
731
|
const a = [];
|
|
732
732
|
for (const i of e)
|
|
733
733
|
for (const s of n(i)) a.includes(s) || a.push(s);
|
|
@@ -736,15 +736,15 @@ function Oa(e, n) {
|
|
|
736
736
|
function qn(e) {
|
|
737
737
|
return e.visits[e.visits.length - 1];
|
|
738
738
|
}
|
|
739
|
-
const De = "—",
|
|
739
|
+
const De = "—", Ma = /* @__PURE__ */ new Map();
|
|
740
740
|
function as(e, n) {
|
|
741
741
|
const a = `${e ?? ""}|${n}`;
|
|
742
|
-
let i =
|
|
742
|
+
let i = Ma.get(a);
|
|
743
743
|
return i || (i = new Intl.NumberFormat(e, {
|
|
744
744
|
minimumFractionDigits: n,
|
|
745
745
|
maximumFractionDigits: n,
|
|
746
746
|
useGrouping: !1
|
|
747
|
-
}),
|
|
747
|
+
}), Ma.set(a, i)), i;
|
|
748
748
|
}
|
|
749
749
|
function Ee(e, n = 1, a) {
|
|
750
750
|
return e == null || !Number.isFinite(e) ? De : as(a, n).format(e);
|
|
@@ -755,13 +755,13 @@ function ts(e, n) {
|
|
|
755
755
|
) : De;
|
|
756
756
|
}
|
|
757
757
|
function is(e, n) {
|
|
758
|
-
return cn(e) ? new Intl.DateTimeFormat(n,
|
|
758
|
+
return cn(e) ? new Intl.DateTimeFormat(n, lt).format(
|
|
759
759
|
new Date(e)
|
|
760
760
|
) : De;
|
|
761
761
|
}
|
|
762
762
|
function ss(e, n = 1, a) {
|
|
763
763
|
if (!Number.isFinite(e)) return De;
|
|
764
|
-
const i =
|
|
764
|
+
const i = ut(e, n);
|
|
765
765
|
return i === 0 ? "0" : `${i > 0 ? "+" : "−"}${Ee(Math.abs(i), n, a)}`;
|
|
766
766
|
}
|
|
767
767
|
function un(e, n) {
|
|
@@ -772,11 +772,11 @@ function Ie(e) {
|
|
|
772
772
|
const n = e.lng;
|
|
773
773
|
return typeof n == "string" ? n : void 0;
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function re(e, n) {
|
|
776
776
|
const a = Ie(n);
|
|
777
777
|
return ln(e) ? is(e, a) : ts(e, a);
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function mt(e) {
|
|
780
780
|
const [n, a, i] = e.slice(0, 10).split("-").map(Number);
|
|
781
781
|
if (!(!n || !a || !i))
|
|
782
782
|
return new Date(n, a - 1, i);
|
|
@@ -788,11 +788,11 @@ function rs(e) {
|
|
|
788
788
|
const n = (a) => String(a).padStart(2, "0");
|
|
789
789
|
return `${e.getFullYear()}-${n(e.getMonth() + 1)}-${n(e.getDate())}`;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function pt(e, n, a, i = !1) {
|
|
792
792
|
const s = a("anamnesis.compare.visitOption", {
|
|
793
793
|
index: n + 1,
|
|
794
794
|
visitType: a(`anamnesis.visitType.${e.visitType}`),
|
|
795
|
-
date:
|
|
795
|
+
date: re(e.dateIso, a)
|
|
796
796
|
});
|
|
797
797
|
return i ? a("anamnesis.window.optionHasNote", { label: s }) : s;
|
|
798
798
|
}
|
|
@@ -822,18 +822,18 @@ function cs(e, n) {
|
|
|
822
822
|
const a = ge(e, n);
|
|
823
823
|
return e.unit ? `${a} (${e.unit})` : a;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function ht(e, n) {
|
|
826
826
|
const a = wn(e.helpText);
|
|
827
827
|
return a || n(`anamnesis.field.${e.key}.help`, { defaultValue: "" }) || void 0;
|
|
828
828
|
}
|
|
829
829
|
function fe(e, n) {
|
|
830
830
|
return wn(e.label) ?? n(`anamnesis.section.${e.key}`, { defaultValue: e.key });
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function ya(e, n, a) {
|
|
833
833
|
return wn(a == null ? void 0 : a.label) ?? n(Oi(e), { defaultValue: e });
|
|
834
834
|
}
|
|
835
835
|
function Se(e, n, a) {
|
|
836
|
-
const i =
|
|
836
|
+
const i = ya(e, n, a);
|
|
837
837
|
return i === e ? e : `${e} — ${i}`;
|
|
838
838
|
}
|
|
839
839
|
function Xe(e) {
|
|
@@ -956,7 +956,7 @@ function hs(e, n, a, i) {
|
|
|
956
956
|
}
|
|
957
957
|
return { groups: r, answered: l, total: s.length };
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function gt(e, n, a, i) {
|
|
960
960
|
const s = [];
|
|
961
961
|
for (const o of e)
|
|
962
962
|
for (const r of o.fields) {
|
|
@@ -978,7 +978,7 @@ function fs(e, n) {
|
|
|
978
978
|
return i ? (i.focus(), !0) : !1;
|
|
979
979
|
}
|
|
980
980
|
const vs = 4;
|
|
981
|
-
function
|
|
981
|
+
function ft() {
|
|
982
982
|
const e = we(null), [n, a] = z(null);
|
|
983
983
|
on(() => {
|
|
984
984
|
if (n == null) return;
|
|
@@ -999,7 +999,7 @@ function vt() {
|
|
|
999
999
|
const i = tn((s) => a(s), []);
|
|
1000
1000
|
return { containerRef: e, requestJump: i };
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function vt({
|
|
1003
1003
|
missing: e,
|
|
1004
1004
|
t: n,
|
|
1005
1005
|
onJump: a,
|
|
@@ -1019,7 +1019,7 @@ function yt({
|
|
|
1019
1019
|
/* @__PURE__ */ t(He.Title, { as: "p", children: n("anamnesis.digest.missing.title", { count: e.length }) }),
|
|
1020
1020
|
/* @__PURE__ */ t(He.Description, { children: n("anamnesis.digest.missing.list", { list: l }) }),
|
|
1021
1021
|
/* @__PURE__ */ t(He.Action, { children: /* @__PURE__ */ t(
|
|
1022
|
-
|
|
1022
|
+
ne,
|
|
1023
1023
|
{
|
|
1024
1024
|
intent: "tonal",
|
|
1025
1025
|
size: "sm",
|
|
@@ -1075,7 +1075,7 @@ function bs({ digest: e, t: n }) {
|
|
|
1075
1075
|
}
|
|
1076
1076
|
);
|
|
1077
1077
|
}
|
|
1078
|
-
const xs =
|
|
1078
|
+
const xs = et(
|
|
1079
1079
|
"type-meta ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:tabular-nums",
|
|
1080
1080
|
{
|
|
1081
1081
|
variants: {
|
|
@@ -1092,7 +1092,7 @@ const xs = nt(
|
|
|
1092
1092
|
);
|
|
1093
1093
|
function Un({ delta: e, def: n, t: a }) {
|
|
1094
1094
|
if (!e) return null;
|
|
1095
|
-
const i = e.direction === "up" ?
|
|
1095
|
+
const i = e.direction === "up" ? nt : e.direction === "down" ? at : ci, s = `${ss(e.abs, n.precision ?? 1, Ie(a))}${n.unit ? ` ${n.unit}` : ""}`, o = e.valence === "good" ? a("anamnesis.delta.improved") : e.valence === "bad" ? a("anamnesis.delta.worsened") : a("anamnesis.delta.unchanged");
|
|
1096
1096
|
return /* @__PURE__ */ d(
|
|
1097
1097
|
"span",
|
|
1098
1098
|
{
|
|
@@ -1109,10 +1109,10 @@ function Un({ delta: e, def: n, t: a }) {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
);
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1113
|
-
return /* @__PURE__ */ t(
|
|
1112
|
+
function yt({ t: e }) {
|
|
1113
|
+
return /* @__PURE__ */ t(X, { variant: "info", size: "sm", leading: /* @__PURE__ */ t(li, { "aria-hidden": "true" }), children: e("anamnesis.origin.fromPatient") });
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function ba({
|
|
1116
1116
|
flag: e,
|
|
1117
1117
|
t: n,
|
|
1118
1118
|
compact: a = !1
|
|
@@ -1120,12 +1120,12 @@ function xa({
|
|
|
1120
1120
|
if (!e) return null;
|
|
1121
1121
|
const i = n(e === "high" ? "anamnesis.range.aboveRange" : "anamnesis.range.belowRange");
|
|
1122
1122
|
return /* @__PURE__ */ t(
|
|
1123
|
-
|
|
1123
|
+
X,
|
|
1124
1124
|
{
|
|
1125
1125
|
variant: "warning",
|
|
1126
1126
|
size: "sm",
|
|
1127
1127
|
withDot: !0,
|
|
1128
|
-
leading: /* @__PURE__ */ t(e === "high" ?
|
|
1128
|
+
leading: /* @__PURE__ */ t(e === "high" ? nt : at, { "aria-hidden": "true" }),
|
|
1129
1129
|
"aria-label": i,
|
|
1130
1130
|
children: a ? null : i
|
|
1131
1131
|
}
|
|
@@ -1136,7 +1136,7 @@ const ks = {
|
|
|
1136
1136
|
bad: "var(--error)",
|
|
1137
1137
|
neutral: "var(--muted-foreground)"
|
|
1138
1138
|
};
|
|
1139
|
-
function
|
|
1139
|
+
function bt({
|
|
1140
1140
|
series: e,
|
|
1141
1141
|
def: n,
|
|
1142
1142
|
t: a,
|
|
@@ -1161,8 +1161,8 @@ function xt({
|
|
|
1161
1161
|
}
|
|
1162
1162
|
);
|
|
1163
1163
|
}
|
|
1164
|
-
const
|
|
1165
|
-
function
|
|
1164
|
+
const xt = " 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)]";
|
|
1165
|
+
function kt({
|
|
1166
1166
|
intake: e,
|
|
1167
1167
|
sections: n,
|
|
1168
1168
|
sex: a,
|
|
@@ -1184,7 +1184,7 @@ function wt({
|
|
|
1184
1184
|
/* @__PURE__ */ t(_.Term, { children: ge(l, i) }),
|
|
1185
1185
|
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1186
1186
|
/* @__PURE__ */ t("span", { children: Bn(c.value, l, i) }),
|
|
1187
|
-
c.origin === "patient" ? /* @__PURE__ */ t(
|
|
1187
|
+
c.origin === "patient" ? /* @__PURE__ */ t(yt, { t: i }) : null
|
|
1188
1188
|
] }) })
|
|
1189
1189
|
] }, l.key) : null;
|
|
1190
1190
|
}) })
|
|
@@ -1211,7 +1211,7 @@ function ws({
|
|
|
1211
1211
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: r("anamnesis.section.patientIntake") }),
|
|
1212
1212
|
e ? /* @__PURE__ */ d(Ae, { children: [
|
|
1213
1213
|
s.length > 0 ? /* @__PURE__ */ t(
|
|
1214
|
-
|
|
1214
|
+
vt,
|
|
1215
1215
|
{
|
|
1216
1216
|
missing: s,
|
|
1217
1217
|
t: r,
|
|
@@ -1220,22 +1220,22 @@ function ws({
|
|
|
1220
1220
|
}
|
|
1221
1221
|
) : null,
|
|
1222
1222
|
/* @__PURE__ */ t(bs, { digest: i, t: r }),
|
|
1223
|
-
/* @__PURE__ */ d(
|
|
1223
|
+
/* @__PURE__ */ d(ca, { variant: "default", children: [
|
|
1224
1224
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: /* @__PURE__ */ d(
|
|
1225
|
-
|
|
1225
|
+
Za,
|
|
1226
1226
|
{
|
|
1227
1227
|
"data-testid": "anamnesis-summary-full",
|
|
1228
|
-
className: "type-label ds:flex ds:w-full ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:text-start" +
|
|
1228
|
+
className: "type-label ds:flex ds:w-full ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:text-start" + xt,
|
|
1229
1229
|
children: [
|
|
1230
1230
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1231
1231
|
r("anamnesis.summary.fullQuestionnaire"),
|
|
1232
|
-
/* @__PURE__ */ t(
|
|
1232
|
+
/* @__PURE__ */ t(X, { variant: "neutral", size: "sm", children: r("anamnesis.intake.sectionProgress", {
|
|
1233
1233
|
answered: i.answered,
|
|
1234
1234
|
total: i.total
|
|
1235
1235
|
}) })
|
|
1236
1236
|
] }),
|
|
1237
1237
|
/* @__PURE__ */ t(
|
|
1238
|
-
|
|
1238
|
+
ma,
|
|
1239
1239
|
{
|
|
1240
1240
|
"aria-hidden": "true",
|
|
1241
1241
|
className: "ds:size-5 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:[[data-state=open]_&]:rotate-180"
|
|
@@ -1245,11 +1245,11 @@ function ws({
|
|
|
1245
1245
|
}
|
|
1246
1246
|
) }),
|
|
1247
1247
|
/* @__PURE__ */ t(
|
|
1248
|
-
|
|
1248
|
+
da,
|
|
1249
1249
|
{
|
|
1250
1250
|
"aria-label": r("anamnesis.summary.fullQuestionnaire"),
|
|
1251
1251
|
children: /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-md)]", children: /* @__PURE__ */ t(
|
|
1252
|
-
|
|
1252
|
+
kt,
|
|
1253
1253
|
{
|
|
1254
1254
|
intake: e,
|
|
1255
1255
|
sections: n,
|
|
@@ -1272,7 +1272,7 @@ const Ns = [
|
|
|
1272
1272
|
"pathologies",
|
|
1273
1273
|
"therapy",
|
|
1274
1274
|
"proposal"
|
|
1275
|
-
],
|
|
1275
|
+
], wt = [
|
|
1276
1276
|
"oncological",
|
|
1277
1277
|
"labs",
|
|
1278
1278
|
"fmd",
|
|
@@ -1299,7 +1299,7 @@ function Ss(e) {
|
|
|
1299
1299
|
const n = e.annualProgramme;
|
|
1300
1300
|
return n && (n.proposed || n.accepted) ? 1 : 0;
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function Oa(e, n = []) {
|
|
1303
1303
|
const a = e ? Ts(e, n) : [], i = (e == null ? void 0 : e.visitType) === "first", s = {
|
|
1304
1304
|
oncological: e ? Cs(e) : 0,
|
|
1305
1305
|
labs: a.length,
|
|
@@ -1313,7 +1313,7 @@ function Va(e, n = []) {
|
|
|
1313
1313
|
}, r = {};
|
|
1314
1314
|
for (const l of Ns)
|
|
1315
1315
|
r[l] = { open: !0, fill: null, flagged: 0 };
|
|
1316
|
-
for (const l of
|
|
1316
|
+
for (const l of wt)
|
|
1317
1317
|
r[l] = { open: i, fill: s[l], flagged: o[l] };
|
|
1318
1318
|
return r;
|
|
1319
1319
|
}
|
|
@@ -1328,7 +1328,7 @@ function Kn(e) {
|
|
|
1328
1328
|
return a ? [{ field: n, text: a }] : [];
|
|
1329
1329
|
});
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1331
|
+
function Nt(e) {
|
|
1332
1332
|
return Kn(e).length > 0;
|
|
1333
1333
|
}
|
|
1334
1334
|
function Es({
|
|
@@ -1348,14 +1348,14 @@ function Is({
|
|
|
1348
1348
|
onOpenNote: i
|
|
1349
1349
|
}) {
|
|
1350
1350
|
if (Kn(e).length === 0) return null;
|
|
1351
|
-
const o = n(`anamnesis.visitType.${e.visitType}`), r =
|
|
1351
|
+
const o = n(`anamnesis.visitType.${e.visitType}`), r = re(e.dateIso, n), l = n(
|
|
1352
1352
|
i ? "anamnesis.visitNote.openInPanel" : "anamnesis.visitNote.trigger",
|
|
1353
1353
|
{ visitType: o, date: r }
|
|
1354
1354
|
);
|
|
1355
1355
|
return i ? /* @__PURE__ */ t(
|
|
1356
|
-
|
|
1356
|
+
ce,
|
|
1357
1357
|
{
|
|
1358
|
-
icon: /* @__PURE__ */ t(
|
|
1358
|
+
icon: /* @__PURE__ */ t(La, { "aria-hidden": "true" }),
|
|
1359
1359
|
intent: "ghost",
|
|
1360
1360
|
size: "sm",
|
|
1361
1361
|
"aria-label": l,
|
|
@@ -1364,9 +1364,9 @@ function Is({
|
|
|
1364
1364
|
}
|
|
1365
1365
|
) : /* @__PURE__ */ d(ye, { defaultOpen: a, children: [
|
|
1366
1366
|
/* @__PURE__ */ t(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1367
|
-
|
|
1367
|
+
ce,
|
|
1368
1368
|
{
|
|
1369
|
-
icon: /* @__PURE__ */ t(
|
|
1369
|
+
icon: /* @__PURE__ */ t(La, { "aria-hidden": "true" }),
|
|
1370
1370
|
intent: "ghost",
|
|
1371
1371
|
size: "sm",
|
|
1372
1372
|
"aria-label": l,
|
|
@@ -1415,8 +1415,8 @@ function Is({
|
|
|
1415
1415
|
)
|
|
1416
1416
|
] });
|
|
1417
1417
|
}
|
|
1418
|
-
const
|
|
1419
|
-
function
|
|
1418
|
+
const xa = "ds:min-w-[11rem]", bn = "ds:min-w-[8rem]", ka = "ds:w-[40%] ds:min-w-[14rem]", Rs = "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)]", Ct = "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)]", Ls = "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)]", Fs = "ds:sticky ds:end-0 ds:z-[1] ds:bg-[color:var(--card)] ds:shadow-[var(--shadow-chrome-start)]", je = "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:align-top";
|
|
1419
|
+
function Tt({
|
|
1420
1420
|
column: e,
|
|
1421
1421
|
t: n,
|
|
1422
1422
|
emphasised: a = !1,
|
|
@@ -1432,7 +1432,7 @@ function St({
|
|
|
1432
1432
|
scope: "col",
|
|
1433
1433
|
className: [
|
|
1434
1434
|
bn,
|
|
1435
|
-
|
|
1435
|
+
Ct,
|
|
1436
1436
|
a ? "ds:bg-[color:var(--muted)]" : "ds:bg-[color:var(--card)]"
|
|
1437
1437
|
].join(" "),
|
|
1438
1438
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
@@ -1466,20 +1466,20 @@ function St({
|
|
|
1466
1466
|
) : null,
|
|
1467
1467
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
1468
1468
|
/* @__PURE__ */ t(
|
|
1469
|
-
|
|
1469
|
+
X,
|
|
1470
1470
|
{
|
|
1471
1471
|
variant: l.visitType === "first" ? "brand" : "neutral",
|
|
1472
1472
|
size: "sm",
|
|
1473
1473
|
children: n(`anamnesis.visitType.${l.visitType}`)
|
|
1474
1474
|
}
|
|
1475
1475
|
),
|
|
1476
|
-
i ? /* @__PURE__ */ t(
|
|
1476
|
+
i ? /* @__PURE__ */ t(X, { variant: "accentSoft", size: "sm", children: n("anamnesis.grid.editable") }) : null
|
|
1477
1477
|
] })
|
|
1478
1478
|
] })
|
|
1479
1479
|
}
|
|
1480
1480
|
);
|
|
1481
1481
|
}
|
|
1482
|
-
function
|
|
1482
|
+
function St({
|
|
1483
1483
|
captionId: e,
|
|
1484
1484
|
caption: n,
|
|
1485
1485
|
identityLabel: a,
|
|
@@ -1511,7 +1511,7 @@ function At({
|
|
|
1511
1511
|
"th",
|
|
1512
1512
|
{
|
|
1513
1513
|
scope: "col",
|
|
1514
|
-
className: `${
|
|
1514
|
+
className: `${xa} ${Rs}`,
|
|
1515
1515
|
children: a
|
|
1516
1516
|
}
|
|
1517
1517
|
),
|
|
@@ -1522,9 +1522,9 @@ function At({
|
|
|
1522
1522
|
scope: "col",
|
|
1523
1523
|
"data-testid": s,
|
|
1524
1524
|
className: [
|
|
1525
|
-
|
|
1525
|
+
ka,
|
|
1526
1526
|
"type-label ds:bg-[color:var(--card)]",
|
|
1527
|
-
|
|
1527
|
+
Ct
|
|
1528
1528
|
].join(" "),
|
|
1529
1529
|
children: i
|
|
1530
1530
|
}
|
|
@@ -1563,19 +1563,19 @@ function At({
|
|
|
1563
1563
|
}
|
|
1564
1564
|
);
|
|
1565
1565
|
}
|
|
1566
|
-
const
|
|
1566
|
+
const qa = 160, Ps = {
|
|
1567
1567
|
added: "success",
|
|
1568
1568
|
removed: "error",
|
|
1569
1569
|
changed: "info",
|
|
1570
1570
|
notMeasured: "neutral"
|
|
1571
1571
|
};
|
|
1572
|
-
function
|
|
1572
|
+
function wa(e) {
|
|
1573
1573
|
const n = e[0], a = e[e.length - 1];
|
|
1574
1574
|
return !n && a ? "added" : n && !a ? "removed" : "changed";
|
|
1575
1575
|
}
|
|
1576
1576
|
function _s(e) {
|
|
1577
1577
|
const n = e.trim();
|
|
1578
|
-
return n ? n.length >
|
|
1578
|
+
return n ? n.length > qa ? `${n.slice(0, qa).trimEnd()}…` : n : De;
|
|
1579
1579
|
}
|
|
1580
1580
|
function $s(e, n, a) {
|
|
1581
1581
|
var s;
|
|
@@ -1607,7 +1607,7 @@ function zs(e, { t: n, seriesByKey: a }) {
|
|
|
1607
1607
|
function Ms(e, { t: n, pathologies: a }) {
|
|
1608
1608
|
const i = n("anamnesis.compare.present");
|
|
1609
1609
|
return e.pathologies.map((s) => {
|
|
1610
|
-
const o =
|
|
1610
|
+
const o = wa(s.present);
|
|
1611
1611
|
return {
|
|
1612
1612
|
id: `pathology:${s.code}`,
|
|
1613
1613
|
categoryId: "pathology",
|
|
@@ -1624,7 +1624,7 @@ function Os(e, { t: n }) {
|
|
|
1624
1624
|
var l;
|
|
1625
1625
|
const s = i.entries.filter(
|
|
1626
1626
|
(c) => c != null
|
|
1627
|
-
), o = new Set(s.map((c) => c.name)).size > 1, r =
|
|
1627
|
+
), o = new Set(s.map((c) => c.name)).size > 1, r = wa(i.entries.map((c) => c != null));
|
|
1628
1628
|
return {
|
|
1629
1629
|
id: `therapy:${i.id}`,
|
|
1630
1630
|
categoryId: "therapy",
|
|
@@ -1643,7 +1643,7 @@ function qs(e, { t: n }) {
|
|
|
1643
1643
|
return e.texts.flatMap((a) => {
|
|
1644
1644
|
const i = a.values.map(_s);
|
|
1645
1645
|
if (i.every((o) => o === i[0])) return [];
|
|
1646
|
-
const s =
|
|
1646
|
+
const s = wa(i.map((o) => o !== De));
|
|
1647
1647
|
return [
|
|
1648
1648
|
{
|
|
1649
1649
|
id: `note:${a.field}`,
|
|
@@ -1668,7 +1668,7 @@ function Bs(e, n) {
|
|
|
1668
1668
|
return Vs.flatMap((a) => a.rows(e, n));
|
|
1669
1669
|
}
|
|
1670
1670
|
function Us({ row: e, t: n }) {
|
|
1671
|
-
return e.def && e.delta ? /* @__PURE__ */ t(Un, { delta: e.delta, def: e.def, t: n }) : /* @__PURE__ */ t(
|
|
1671
|
+
return e.def && e.delta ? /* @__PURE__ */ t(Un, { delta: e.delta, def: e.def, t: n }) : /* @__PURE__ */ t(X, { variant: Ps[e.change], size: "sm", children: e.changeLabel });
|
|
1672
1672
|
}
|
|
1673
1673
|
function Ks({
|
|
1674
1674
|
visits: e,
|
|
@@ -1687,7 +1687,7 @@ function Ks({
|
|
|
1687
1687
|
const p = Qe(), [k, v] = z(""), f = q(
|
|
1688
1688
|
() => e.map((T, L) => ({
|
|
1689
1689
|
value: T.id,
|
|
1690
|
-
label:
|
|
1690
|
+
label: pt(T, L, u)
|
|
1691
1691
|
})),
|
|
1692
1692
|
[e, u]
|
|
1693
1693
|
), C = q(
|
|
@@ -1697,13 +1697,13 @@ function Ks({
|
|
|
1697
1697
|
var m, N;
|
|
1698
1698
|
const T = (m = n[0]) == null ? void 0 : m.visit.dateIso, L = (N = n[n.length - 1]) == null ? void 0 : N.visit.dateIso, S = u("anamnesis.compare.selected", {
|
|
1699
1699
|
total: n.length,
|
|
1700
|
-
from: T ?
|
|
1701
|
-
to: L ?
|
|
1700
|
+
from: T ? re(T, u) : "",
|
|
1701
|
+
to: L ? re(L, u) : ""
|
|
1702
1702
|
});
|
|
1703
1703
|
return n.length === 2 ? `${S} · ${u("anamnesis.compare.minimum")}` : S;
|
|
1704
1704
|
}, [n, u]), A = q(
|
|
1705
1705
|
() => n.map((T) => /* @__PURE__ */ t(
|
|
1706
|
-
|
|
1706
|
+
Tt,
|
|
1707
1707
|
{
|
|
1708
1708
|
column: T,
|
|
1709
1709
|
t: u,
|
|
@@ -1726,7 +1726,7 @@ function Ks({
|
|
|
1726
1726
|
"th",
|
|
1727
1727
|
{
|
|
1728
1728
|
scope: "row",
|
|
1729
|
-
className: `${
|
|
1729
|
+
className: `${xa} ds:sticky ds:start-0 ds:z-[1] ds:bg-[color:var(--card)] ds:text-start ds:shadow-[var(--shadow-chrome-end)] ${je}`,
|
|
1730
1730
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1731
1731
|
/* @__PURE__ */ t("span", { className: "type-label ds:break-words ds:text-[color:var(--foreground)]", children: S.item }),
|
|
1732
1732
|
S.meta ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: S.meta }) : null
|
|
@@ -1744,8 +1744,8 @@ function Ks({
|
|
|
1744
1744
|
((x = n[N]) == null ? void 0 : x.key) ?? N
|
|
1745
1745
|
);
|
|
1746
1746
|
}),
|
|
1747
|
-
trend: /* @__PURE__ */ t("td", { className: `${
|
|
1748
|
-
|
|
1747
|
+
trend: /* @__PURE__ */ t("td", { className: `${ka} ${je}`, children: S.series && S.def ? /* @__PURE__ */ t(
|
|
1748
|
+
bt,
|
|
1749
1749
|
{
|
|
1750
1750
|
series: S.series,
|
|
1751
1751
|
def: S.def,
|
|
@@ -1769,7 +1769,7 @@ function Ks({
|
|
|
1769
1769
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]", children: [
|
|
1770
1770
|
/* @__PURE__ */ t("h3", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: u("anamnesis.compare.panelTitle") }),
|
|
1771
1771
|
h ? /* @__PURE__ */ t(
|
|
1772
|
-
|
|
1772
|
+
ne,
|
|
1773
1773
|
{
|
|
1774
1774
|
intent: "outline",
|
|
1775
1775
|
"data-testid": "anamnesis-compare-close",
|
|
@@ -1791,7 +1791,7 @@ function Ks({
|
|
|
1791
1791
|
label: u("anamnesis.compare.visitsLabel"),
|
|
1792
1792
|
description: w,
|
|
1793
1793
|
children: /* @__PURE__ */ t(
|
|
1794
|
-
|
|
1794
|
+
ua,
|
|
1795
1795
|
{
|
|
1796
1796
|
options: f,
|
|
1797
1797
|
value: [...a],
|
|
@@ -1827,8 +1827,8 @@ function Ks({
|
|
|
1827
1827
|
"data-testid": "anamnesis-compare-summary",
|
|
1828
1828
|
children: s ? /* @__PURE__ */ d(Ae, { children: [
|
|
1829
1829
|
/* @__PURE__ */ t("h4", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: u("anamnesis.compare.summaryTitle", {
|
|
1830
|
-
from:
|
|
1831
|
-
to:
|
|
1830
|
+
from: re(s.visits[0].dateIso, u),
|
|
1831
|
+
to: re(
|
|
1832
1832
|
s.visits[s.visits.length - 1].dateIso,
|
|
1833
1833
|
u
|
|
1834
1834
|
)
|
|
@@ -1842,7 +1842,7 @@ function Ks({
|
|
|
1842
1842
|
description: u("anamnesis.compare.noChangesDescription")
|
|
1843
1843
|
}
|
|
1844
1844
|
) : /* @__PURE__ */ t(
|
|
1845
|
-
|
|
1845
|
+
St,
|
|
1846
1846
|
{
|
|
1847
1847
|
captionId: p,
|
|
1848
1848
|
caption: u("anamnesis.compare.tableLabel"),
|
|
@@ -1861,13 +1861,13 @@ function Ks({
|
|
|
1861
1861
|
)
|
|
1862
1862
|
] });
|
|
1863
1863
|
}
|
|
1864
|
-
const
|
|
1864
|
+
const At = {
|
|
1865
1865
|
therapy: "cross",
|
|
1866
1866
|
diet: "circle",
|
|
1867
1867
|
fmd: "diamond",
|
|
1868
1868
|
surgery: "triangle",
|
|
1869
1869
|
lifestyle: "square"
|
|
1870
|
-
},
|
|
1870
|
+
}, Et = "neutral";
|
|
1871
1871
|
function Hs(e, n) {
|
|
1872
1872
|
const a = n.length - 1;
|
|
1873
1873
|
if (a < 1 || !cn(e.dateIso)) return null;
|
|
@@ -1890,13 +1890,13 @@ function Gs(e, n) {
|
|
|
1890
1890
|
return i == null ? [] : [{ event: a, position: i }];
|
|
1891
1891
|
}).sort((a, i) => a.position - i.position);
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function oa(e, n) {
|
|
1894
1894
|
return n("anamnesis.event.chip", {
|
|
1895
1895
|
label: n(`anamnesis.event.label.${e.labelKey}`),
|
|
1896
|
-
date:
|
|
1896
|
+
date: re(e.dateIso, n)
|
|
1897
1897
|
});
|
|
1898
1898
|
}
|
|
1899
|
-
function
|
|
1899
|
+
function Dt(e, n) {
|
|
1900
1900
|
const a = n(`anamnesis.event.category.${e.category}`);
|
|
1901
1901
|
return e.sourceKey ? n("anamnesis.event.external", {
|
|
1902
1902
|
category: a,
|
|
@@ -1907,9 +1907,9 @@ function js(e, n, a) {
|
|
|
1907
1907
|
return e.filter((i) => n.has(i.event.id)).map(({ event: i, position: s }) => ({
|
|
1908
1908
|
id: i.id,
|
|
1909
1909
|
position: s,
|
|
1910
|
-
label:
|
|
1911
|
-
shape:
|
|
1912
|
-
tone:
|
|
1910
|
+
label: oa(i, a),
|
|
1911
|
+
shape: At[i.category],
|
|
1912
|
+
tone: Et
|
|
1913
1913
|
}));
|
|
1914
1914
|
}
|
|
1915
1915
|
function Ws({
|
|
@@ -1941,7 +1941,7 @@ function Ws({
|
|
|
1941
1941
|
const c = n.has(l.id);
|
|
1942
1942
|
return /* @__PURE__ */ d(ti, { children: [
|
|
1943
1943
|
/* @__PURE__ */ t(
|
|
1944
|
-
|
|
1944
|
+
ne,
|
|
1945
1945
|
{
|
|
1946
1946
|
size: "sm",
|
|
1947
1947
|
intent: c ? "primary" : "outline",
|
|
@@ -1951,20 +1951,20 @@ function Ws({
|
|
|
1951
1951
|
startIcon: /* @__PURE__ */ t(
|
|
1952
1952
|
mi,
|
|
1953
1953
|
{
|
|
1954
|
-
shape:
|
|
1955
|
-
tone:
|
|
1954
|
+
shape: At[l.category],
|
|
1955
|
+
tone: Et,
|
|
1956
1956
|
size: "sm"
|
|
1957
1957
|
}
|
|
1958
1958
|
),
|
|
1959
1959
|
onClick: () => a(l.id),
|
|
1960
|
-
children:
|
|
1960
|
+
children: oa(l, i)
|
|
1961
1961
|
}
|
|
1962
1962
|
),
|
|
1963
|
-
/* @__PURE__ */ t("span", { id: `${o}-${l.id}`, className: "ds:sr-only", children:
|
|
1963
|
+
/* @__PURE__ */ t("span", { id: `${o}-${l.id}`, className: "ds:sr-only", children: Dt(l, i) })
|
|
1964
1964
|
] }, l.id);
|
|
1965
1965
|
}),
|
|
1966
1966
|
/* @__PURE__ */ t("p", { className: "ds:sr-only", "aria-live": "polite", children: r.length === 0 ? i("anamnesis.event.noneShown") : i("anamnesis.event.shown", {
|
|
1967
|
-
list: r.map(({ event: l }) =>
|
|
1967
|
+
list: r.map(({ event: l }) => oa(l, i)).join(i("anamnesis.event.separator"))
|
|
1968
1968
|
}) })
|
|
1969
1969
|
]
|
|
1970
1970
|
}
|
|
@@ -1991,7 +1991,7 @@ function Fn(e, n, a = {}) {
|
|
|
1991
1991
|
lastIso: ((r = s[s.length - 1]) == null ? void 0 : r.visit.dateIso) ?? null
|
|
1992
1992
|
};
|
|
1993
1993
|
}
|
|
1994
|
-
function
|
|
1994
|
+
function It(e) {
|
|
1995
1995
|
return Fn(
|
|
1996
1996
|
e,
|
|
1997
1997
|
e.map((n) => n.id)
|
|
@@ -2035,7 +2035,7 @@ function Zs({
|
|
|
2035
2035
|
annotations: g,
|
|
2036
2036
|
onSelectAnnotation: p
|
|
2037
2037
|
}) {
|
|
2038
|
-
const k = Qe(), v = Ie(a), f =
|
|
2038
|
+
const k = Qe(), v = Ie(a), f = va(e, n), C = e.visits, w = C.length - 1, A = u ?? It(C), R = [];
|
|
2039
2039
|
let T = null;
|
|
2040
2040
|
const L = (m) => (o == null ? void 0 : o.visitIds.has(m)) ?? !1;
|
|
2041
2041
|
if (f.forEach((m) => {
|
|
@@ -2044,19 +2044,19 @@ function Zs({
|
|
|
2044
2044
|
banner: a(`anamnesis.group.${m.def.group}`)
|
|
2045
2045
|
}));
|
|
2046
2046
|
const N = Js(m.def.referenceRange, a, v), x = A.map((P, $) => {
|
|
2047
|
-
const { visit: F, index: E } = P, H = m.cells[E] ?? Ys, j = E === w, M = h == null || h.has(m.def.key), U = i && j && M && !m.def.computed,
|
|
2047
|
+
const { visit: F, index: E } = P, H = m.cells[E] ?? Ys, j = E === w, M = h == null || h.has(m.def.key), U = i && j && M && !m.def.computed, Y = !Xs(A, $), ae = o != null && o.changedCells.has(`${F.id}:${m.def.key}`), me = L(F.id);
|
|
2048
2048
|
return /* @__PURE__ */ t(
|
|
2049
2049
|
"td",
|
|
2050
2050
|
{
|
|
2051
|
-
"data-changed":
|
|
2051
|
+
"data-changed": ae || void 0,
|
|
2052
2052
|
className: [
|
|
2053
2053
|
bn,
|
|
2054
2054
|
je,
|
|
2055
2055
|
"ds:tabular-nums",
|
|
2056
|
-
|
|
2056
|
+
me ? "ds:bg-[color:var(--muted)]/40" : "",
|
|
2057
2057
|
// Changed cells carry a fill tint AND a non-colour inline-start
|
|
2058
2058
|
// border bar so the change reads without relying on hue.
|
|
2059
|
-
|
|
2059
|
+
ae ? "ds:bg-[color:var(--info)]/10 ds:border-s-2 ds:border-[color:var(--info)]" : ""
|
|
2060
2060
|
].filter(Boolean).join(" "),
|
|
2061
2061
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
2062
2062
|
U ? /* @__PURE__ */ t(
|
|
@@ -2068,13 +2068,13 @@ function Zs({
|
|
|
2068
2068
|
"aria-label": a("anamnesis.grid.editCell", {
|
|
2069
2069
|
parameter: ze(m.def, a)
|
|
2070
2070
|
}),
|
|
2071
|
-
onChange: (
|
|
2071
|
+
onChange: (J) => s == null ? void 0 : s(F, m.def, J)
|
|
2072
2072
|
}
|
|
2073
2073
|
) : /* @__PURE__ */ t("span", { className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]", children: Ee(H.value, m.def.precision, v) }),
|
|
2074
2074
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
2075
|
-
H.outOfRange ? /* @__PURE__ */ t(
|
|
2076
|
-
|
|
2077
|
-
|
|
2075
|
+
H.outOfRange ? /* @__PURE__ */ t(ba, { flag: H.outOfRange, t: a, compact: !0 }) : null,
|
|
2076
|
+
Y ? null : /* @__PURE__ */ t(Un, { delta: H.delta, def: m.def, t: a }),
|
|
2077
|
+
ae ? /* @__PURE__ */ t("span", { className: "ds:sr-only", children: a("anamnesis.compare.changedCell") }) : null
|
|
2078
2078
|
] })
|
|
2079
2079
|
] })
|
|
2080
2080
|
},
|
|
@@ -2089,7 +2089,7 @@ function Zs({
|
|
|
2089
2089
|
"th",
|
|
2090
2090
|
{
|
|
2091
2091
|
scope: "row",
|
|
2092
|
-
className: `${
|
|
2092
|
+
className: `${xa} ds:sticky ds:start-0 ds:z-[1] ds:bg-[color:var(--card)] ds:text-start ds:shadow-[var(--shadow-chrome-end)] ${je}`,
|
|
2093
2093
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
2094
2094
|
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: ze(m.def, a) }),
|
|
2095
2095
|
/* @__PURE__ */ d("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: [
|
|
@@ -2107,8 +2107,8 @@ function Zs({
|
|
|
2107
2107
|
}
|
|
2108
2108
|
),
|
|
2109
2109
|
cells: x,
|
|
2110
|
-
trend: /* @__PURE__ */ t("td", { className: `${
|
|
2111
|
-
|
|
2110
|
+
trend: /* @__PURE__ */ t("td", { className: `${ka} ${je}`, children: /* @__PURE__ */ t(
|
|
2111
|
+
bt,
|
|
2112
2112
|
{
|
|
2113
2113
|
series: m.series,
|
|
2114
2114
|
def: m.def,
|
|
@@ -2136,7 +2136,7 @@ function Zs({
|
|
|
2136
2136
|
}
|
|
2137
2137
|
);
|
|
2138
2138
|
const S = A.map((m) => /* @__PURE__ */ t(
|
|
2139
|
-
|
|
2139
|
+
Tt,
|
|
2140
2140
|
{
|
|
2141
2141
|
column: m,
|
|
2142
2142
|
t: a,
|
|
@@ -2148,7 +2148,7 @@ function Zs({
|
|
|
2148
2148
|
m.key
|
|
2149
2149
|
));
|
|
2150
2150
|
return /* @__PURE__ */ t(
|
|
2151
|
-
|
|
2151
|
+
St,
|
|
2152
2152
|
{
|
|
2153
2153
|
captionId: k,
|
|
2154
2154
|
caption: a("anamnesis.grid.caption"),
|
|
@@ -2161,7 +2161,7 @@ function Zs({
|
|
|
2161
2161
|
}
|
|
2162
2162
|
);
|
|
2163
2163
|
}
|
|
2164
|
-
function
|
|
2164
|
+
function Na({
|
|
2165
2165
|
record: e,
|
|
2166
2166
|
t: n,
|
|
2167
2167
|
editable: a = !1,
|
|
@@ -2190,7 +2190,7 @@ function Ca({
|
|
|
2190
2190
|
() => c ? [...c] : fn(p)
|
|
2191
2191
|
), E = q(() => {
|
|
2192
2192
|
const O = $.filter(
|
|
2193
|
-
(G) => p.some((
|
|
2193
|
+
(G) => p.some((W) => W.id === G)
|
|
2194
2194
|
);
|
|
2195
2195
|
return O.length >= 2 ? O : fn(p);
|
|
2196
2196
|
}, [$, p]), H = q(
|
|
@@ -2201,25 +2201,25 @@ function Ca({
|
|
|
2201
2201
|
C
|
|
2202
2202
|
) : null, [R, H, C]), M = q(() => {
|
|
2203
2203
|
const O = /* @__PURE__ */ new Map();
|
|
2204
|
-
for (const G of
|
|
2204
|
+
for (const G of va(e, C))
|
|
2205
2205
|
O.set(G.def.key, G.series);
|
|
2206
2206
|
return O;
|
|
2207
|
-
}, [e, C]), [U,
|
|
2207
|
+
}, [e, C]), [U, Y] = z(
|
|
2208
2208
|
() => l ? [...l] : fn(p)
|
|
2209
|
-
),
|
|
2210
|
-
const O = U.filter((G) => p.some((
|
|
2209
|
+
), ae = Qs(p), me = q(() => {
|
|
2210
|
+
const O = U.filter((G) => p.some((W) => W.id === G));
|
|
2211
2211
|
return O.length > 0 ? O : fn(p);
|
|
2212
|
-
}, [U, p]),
|
|
2213
|
-
() => Fn(p,
|
|
2212
|
+
}, [U, p]), J = q(
|
|
2213
|
+
() => Fn(p, me, {
|
|
2214
2214
|
// A compared visit is always a column, so compare always marks its
|
|
2215
2215
|
// columns in the grid — comparing a visit the picker left out brings
|
|
2216
2216
|
// it back on screen rather than marking nothing.
|
|
2217
2217
|
alsoShowIds: R ? E : []
|
|
2218
2218
|
}),
|
|
2219
|
-
[p,
|
|
2219
|
+
[p, me, R, E]
|
|
2220
2220
|
), Re = q(
|
|
2221
|
-
() =>
|
|
2222
|
-
[
|
|
2221
|
+
() => J.columns.map((O) => O.visit.id),
|
|
2222
|
+
[J]
|
|
2223
2223
|
);
|
|
2224
2224
|
on(() => {
|
|
2225
2225
|
h == null || h(Re);
|
|
@@ -2227,34 +2227,34 @@ function Ca({
|
|
|
2227
2227
|
const D = q(
|
|
2228
2228
|
() => p.map((O, G) => ({
|
|
2229
2229
|
value: O.id,
|
|
2230
|
-
label:
|
|
2230
|
+
label: pt(O, G, n, Nt(O))
|
|
2231
2231
|
})),
|
|
2232
2232
|
[p, n]
|
|
2233
2233
|
), B = q(() => {
|
|
2234
|
-
const O =
|
|
2235
|
-
shown:
|
|
2236
|
-
total:
|
|
2234
|
+
const O = J.firstIso ? re(J.firstIso, n) : "", G = J.lastIso ? re(J.lastIso, n) : "", be = [J.hiddenCount > 0 ? n("anamnesis.window.showing", {
|
|
2235
|
+
shown: J.shownCount,
|
|
2236
|
+
total: J.totalCount,
|
|
2237
2237
|
from: O,
|
|
2238
2238
|
to: G
|
|
2239
2239
|
}) : n("anamnesis.window.showingAll", {
|
|
2240
|
-
total:
|
|
2240
|
+
total: J.totalCount,
|
|
2241
2241
|
from: O,
|
|
2242
2242
|
to: G
|
|
2243
|
-
})], Je =
|
|
2244
|
-
return Je > 0 && be.push(n("anamnesis.window.addedByCompare", { added: Je })),
|
|
2245
|
-
}, [
|
|
2243
|
+
})], Je = J.shownCount - me.length;
|
|
2244
|
+
return Je > 0 && be.push(n("anamnesis.window.addedByCompare", { added: Je })), me.length === 1 && be.push(n("anamnesis.window.minimum")), be.join(" · ");
|
|
2245
|
+
}, [J, me, n]), ee = q(
|
|
2246
2246
|
() => Gs(e.events, p),
|
|
2247
2247
|
[e.events, p]
|
|
2248
|
-
), [pe,
|
|
2248
|
+
), [pe, de] = z(
|
|
2249
2249
|
() => u ? [...u] : []
|
|
2250
2250
|
), Le = q(() => {
|
|
2251
|
-
const O = new Set(
|
|
2251
|
+
const O = new Set(ee.map((G) => G.event.id));
|
|
2252
2252
|
return new Set(pe.filter((G) => O.has(G)));
|
|
2253
|
-
}, [pe,
|
|
2254
|
-
() => js(
|
|
2255
|
-
[
|
|
2256
|
-
), Pe = (O) =>
|
|
2257
|
-
(G) => G.includes(O) ? G.filter((
|
|
2253
|
+
}, [pe, ee]), Fe = q(
|
|
2254
|
+
() => js(ee, Le, n),
|
|
2255
|
+
[ee, Le, n]
|
|
2256
|
+
), Pe = (O) => de(
|
|
2257
|
+
(G) => G.includes(O) ? G.filter((W) => W !== O) : [...G, O]
|
|
2258
2258
|
), Nn = q(
|
|
2259
2259
|
() => g ? (O) => g({ kind: "event", eventId: O }) : void 0,
|
|
2260
2260
|
[g]
|
|
@@ -2262,9 +2262,9 @@ function Ca({
|
|
|
2262
2262
|
if (!j) return null;
|
|
2263
2263
|
const O = /* @__PURE__ */ new Set();
|
|
2264
2264
|
for (const G of j.numeric)
|
|
2265
|
-
G.values.forEach((
|
|
2265
|
+
G.values.forEach((W, be) => {
|
|
2266
2266
|
const Je = be === 0 ? G.values[1] : G.values[be - 1];
|
|
2267
|
-
|
|
2267
|
+
W !== Je && O.add(`${j.visits[be].id}:${G.def.key}`);
|
|
2268
2268
|
});
|
|
2269
2269
|
return {
|
|
2270
2270
|
visitIds: new Set(j.visits.map((G) => G.id)),
|
|
@@ -2280,13 +2280,13 @@ function Ca({
|
|
|
2280
2280
|
description: n("anamnesis.empty.noVisits.description")
|
|
2281
2281
|
}
|
|
2282
2282
|
) }) : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2283
|
-
|
|
2283
|
+
ae || k ? /* @__PURE__ */ d(
|
|
2284
2284
|
"div",
|
|
2285
2285
|
{
|
|
2286
2286
|
"data-testid": "anamnesis-evolution-toolbar",
|
|
2287
2287
|
className: "ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-md)]",
|
|
2288
2288
|
children: [
|
|
2289
|
-
|
|
2289
|
+
ae ? /* @__PURE__ */ d(
|
|
2290
2290
|
"div",
|
|
2291
2291
|
{
|
|
2292
2292
|
"data-testid": "anamnesis-window-picker",
|
|
@@ -2298,14 +2298,14 @@ function Ca({
|
|
|
2298
2298
|
label: n("anamnesis.window.label"),
|
|
2299
2299
|
description: B,
|
|
2300
2300
|
children: /* @__PURE__ */ t(
|
|
2301
|
-
|
|
2301
|
+
ua,
|
|
2302
2302
|
{
|
|
2303
2303
|
options: D,
|
|
2304
|
-
value:
|
|
2304
|
+
value: me,
|
|
2305
2305
|
allowSelectAll: !0,
|
|
2306
2306
|
onChange: (O) => {
|
|
2307
2307
|
if (O.length > 0) {
|
|
2308
|
-
S(""),
|
|
2308
|
+
S(""), Y(O);
|
|
2309
2309
|
return;
|
|
2310
2310
|
}
|
|
2311
2311
|
S(n("anamnesis.window.minimum"));
|
|
@@ -2336,7 +2336,7 @@ function Ca({
|
|
|
2336
2336
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
2337
2337
|
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: "type-label ds:invisible", children: " " }),
|
|
2338
2338
|
/* @__PURE__ */ t(
|
|
2339
|
-
|
|
2339
|
+
ne,
|
|
2340
2340
|
{
|
|
2341
2341
|
ref: N,
|
|
2342
2342
|
id: f,
|
|
@@ -2357,7 +2357,7 @@ function Ca({
|
|
|
2357
2357
|
/* @__PURE__ */ t(
|
|
2358
2358
|
Ws,
|
|
2359
2359
|
{
|
|
2360
|
-
marks:
|
|
2360
|
+
marks: ee,
|
|
2361
2361
|
activeIds: Le,
|
|
2362
2362
|
onToggle: Pe,
|
|
2363
2363
|
t: n
|
|
@@ -2373,15 +2373,15 @@ function Ca({
|
|
|
2373
2373
|
onCellChange: i,
|
|
2374
2374
|
compare: mn,
|
|
2375
2375
|
framed: s,
|
|
2376
|
-
visitColumns:
|
|
2376
|
+
visitColumns: J.columns,
|
|
2377
2377
|
capturableKeys: w,
|
|
2378
2378
|
annotations: Fe,
|
|
2379
2379
|
onSelectAnnotation: Nn,
|
|
2380
2380
|
onOpenNote: g
|
|
2381
2381
|
}
|
|
2382
2382
|
),
|
|
2383
|
-
k ? /* @__PURE__ */ t(
|
|
2384
|
-
|
|
2383
|
+
k ? /* @__PURE__ */ t(ca, { open: R, onOpenChange: T, children: /* @__PURE__ */ t(
|
|
2384
|
+
da,
|
|
2385
2385
|
{
|
|
2386
2386
|
ref: m,
|
|
2387
2387
|
id: v,
|
|
@@ -2599,7 +2599,7 @@ const Hn = "export.tabDocument";
|
|
|
2599
2599
|
function te(e, n) {
|
|
2600
2600
|
return ao(n, e.audience) ? !0 : (e.withheld.add(n), !1);
|
|
2601
2601
|
}
|
|
2602
|
-
function
|
|
2602
|
+
function Rt(e) {
|
|
2603
2603
|
if (e.key === "bmi") return "derived.bmi";
|
|
2604
2604
|
switch (e.group) {
|
|
2605
2605
|
case "anthropometric":
|
|
@@ -2610,18 +2610,18 @@ function Lt(e) {
|
|
|
2610
2610
|
return "lab.values";
|
|
2611
2611
|
}
|
|
2612
2612
|
}
|
|
2613
|
-
function
|
|
2613
|
+
function Lt(e) {
|
|
2614
2614
|
return { kind: "section", cells: [e] };
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2616
|
+
function oe(e) {
|
|
2617
2617
|
const n = e == null ? void 0 : e.trim();
|
|
2618
2618
|
return n || null;
|
|
2619
2619
|
}
|
|
2620
|
-
function
|
|
2620
|
+
function Ft(e, n) {
|
|
2621
2621
|
const a = e.referenceRange;
|
|
2622
2622
|
return a ? a.min != null && a.max != null ? `${a.min}–${a.max}` : a.max != null ? n("anamnesis.range.atMost", { value: a.max }) : a.min != null ? n("anamnesis.range.atLeast", { value: a.min }) : null : null;
|
|
2623
2623
|
}
|
|
2624
|
-
function
|
|
2624
|
+
function Pt(e, n) {
|
|
2625
2625
|
return e === "high" ? n("anamnesis.range.aboveRange") : e === "low" ? n("anamnesis.range.belowRange") : null;
|
|
2626
2626
|
}
|
|
2627
2627
|
function to(e) {
|
|
@@ -2642,45 +2642,45 @@ function Pn(e, n, a, i, s) {
|
|
|
2642
2642
|
a ?? ""
|
|
2643
2643
|
].filter(Boolean).join("-");
|
|
2644
2644
|
}
|
|
2645
|
-
function
|
|
2645
|
+
function Ca(e, n) {
|
|
2646
2646
|
return n(`anamnesis.export.audience.${e}`);
|
|
2647
2647
|
}
|
|
2648
2648
|
function io(e, n) {
|
|
2649
2649
|
return n(`anamnesis.export.tab.${e}`);
|
|
2650
2650
|
}
|
|
2651
|
-
function
|
|
2651
|
+
function _t(e, n) {
|
|
2652
2652
|
return n(`anamnesis.export.docTab.${e}`, {
|
|
2653
2653
|
defaultValue: io(e, n)
|
|
2654
2654
|
});
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2656
|
+
function Ta(e, n, a, i) {
|
|
2657
2657
|
const s = [], r = te(n, "patient.identity") ? `${e.patient.firstName} ${e.patient.lastName}`.trim() : null;
|
|
2658
2658
|
return r && (s.push({ label: a("anamnesis.header.name"), value: r }), s.push({
|
|
2659
2659
|
label: a("anamnesis.header.dob"),
|
|
2660
|
-
value:
|
|
2660
|
+
value: re(e.patient.dateOfBirthIso, a)
|
|
2661
2661
|
}), s.push({
|
|
2662
2662
|
label: a("anamnesis.header.age"),
|
|
2663
2663
|
value: Vn(e, a)
|
|
2664
2664
|
})), s.push({
|
|
2665
2665
|
label: a("anamnesis.export.generated"),
|
|
2666
|
-
value:
|
|
2666
|
+
value: re(i.slice(0, 10), a)
|
|
2667
2667
|
}), s.push({
|
|
2668
2668
|
label: a("anamnesis.export.audienceLabel"),
|
|
2669
|
-
value:
|
|
2669
|
+
value: Ca(n.audience, a)
|
|
2670
2670
|
}), { meta: s, patientName: r };
|
|
2671
2671
|
}
|
|
2672
2672
|
function _n(e, n, a) {
|
|
2673
|
-
const i =
|
|
2673
|
+
const i = _t(e, a);
|
|
2674
2674
|
return n ? a("anamnesis.export.docTitle", { tab: i, patient: n }) : i;
|
|
2675
2675
|
}
|
|
2676
|
-
function
|
|
2676
|
+
function Sa(e, n, a) {
|
|
2677
2677
|
return {
|
|
2678
2678
|
tab: e,
|
|
2679
2679
|
audience: n,
|
|
2680
2680
|
fileStem: `anamnesis-${e}-${n}`,
|
|
2681
|
-
title:
|
|
2681
|
+
title: _t(e, a),
|
|
2682
2682
|
patientName: null,
|
|
2683
|
-
audienceLabel:
|
|
2683
|
+
audienceLabel: Ca(n, a),
|
|
2684
2684
|
meta: [],
|
|
2685
2685
|
tables: [],
|
|
2686
2686
|
footnotes: [a("anamnesis.export.withheld")],
|
|
@@ -2692,7 +2692,7 @@ function $n(e, n, a, i = []) {
|
|
|
2692
2692
|
const s = [...n.withheld].sort(), o = [...i];
|
|
2693
2693
|
return s.length > 0 && o.push(a("anamnesis.export.withheld")), {
|
|
2694
2694
|
...e,
|
|
2695
|
-
audienceLabel:
|
|
2695
|
+
audienceLabel: Ca(n.audience, a),
|
|
2696
2696
|
footnotes: o,
|
|
2697
2697
|
withheld: s,
|
|
2698
2698
|
locale: Ie(a)
|
|
@@ -2702,20 +2702,20 @@ function so(e) {
|
|
|
2702
2702
|
var k;
|
|
2703
2703
|
const { record: n, audience: a, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = { audience: a, withheld: /* @__PURE__ */ new Set() };
|
|
2704
2704
|
if (!te(r, Hn))
|
|
2705
|
-
return
|
|
2706
|
-
const { meta: l, patientName: c } =
|
|
2705
|
+
return Sa("summary", a, i);
|
|
2706
|
+
const { meta: l, patientName: c } = Ta(n, r, i, o), u = [], h = [], g = n.intake;
|
|
2707
2707
|
if (te(r, "intake.answers") && g) {
|
|
2708
2708
|
const v = [];
|
|
2709
2709
|
for (const f of Ge(s)) {
|
|
2710
2710
|
const C = f.fields.filter((w) => un(w, n.patient.sex)).filter((w) => g.answers[w.key]);
|
|
2711
2711
|
if (C.length !== 0) {
|
|
2712
|
-
v.push(
|
|
2712
|
+
v.push(Lt(fe(f, i)));
|
|
2713
2713
|
for (const w of C) {
|
|
2714
2714
|
const A = g.answers[w.key];
|
|
2715
2715
|
A && v.push({
|
|
2716
2716
|
cells: [
|
|
2717
2717
|
ge(w, i),
|
|
2718
|
-
|
|
2718
|
+
oe(Bn(A.value, w, i)),
|
|
2719
2719
|
i(`anamnesis.export.source.${A.origin}`)
|
|
2720
2720
|
]
|
|
2721
2721
|
});
|
|
@@ -2760,14 +2760,14 @@ function Wn(e, n, a, i, s, o, r) {
|
|
|
2760
2760
|
const l = [];
|
|
2761
2761
|
let c = !1;
|
|
2762
2762
|
for (const h of a) {
|
|
2763
|
-
if (!te(s,
|
|
2763
|
+
if (!te(s, Rt(h))) continue;
|
|
2764
2764
|
c = !0;
|
|
2765
2765
|
const g = $e(i, h), p = [
|
|
2766
2766
|
ze(h, o),
|
|
2767
2767
|
g,
|
|
2768
2768
|
h.unit ?? null
|
|
2769
2769
|
];
|
|
2770
|
-
r && (p.push(
|
|
2770
|
+
r && (p.push(Ft(h, o)), p.push(Pt(xn(g, h.referenceRange), o))), l.push({ cells: p, precision: h.precision });
|
|
2771
2771
|
}
|
|
2772
2772
|
if (!c) return null;
|
|
2773
2773
|
const u = [
|
|
@@ -2795,8 +2795,8 @@ function Qn(e, n, a, i) {
|
|
|
2795
2795
|
function oo(e) {
|
|
2796
2796
|
const { record: n, audience: a, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = { audience: a, withheld: /* @__PURE__ */ new Set() };
|
|
2797
2797
|
if (!te(r, Hn))
|
|
2798
|
-
return
|
|
2799
|
-
const { meta: l, patientName: c } =
|
|
2798
|
+
return Sa("compile", a, i);
|
|
2799
|
+
const { meta: l, patientName: c } = Ta(n, r, i, o), u = qn(n), h = [], g = [];
|
|
2800
2800
|
if (!u)
|
|
2801
2801
|
return g.push(i("anamnesis.export.none")), $n(
|
|
2802
2802
|
{
|
|
@@ -2820,7 +2820,7 @@ function oo(e) {
|
|
|
2820
2820
|
);
|
|
2821
2821
|
te(r, "visit.date") && l.push({
|
|
2822
2822
|
label: i("anamnesis.header.visitDate"),
|
|
2823
|
-
value:
|
|
2823
|
+
value: re(u.dateIso, i)
|
|
2824
2824
|
});
|
|
2825
2825
|
const p = [];
|
|
2826
2826
|
te(r, "visit.type") && p.push({
|
|
@@ -2831,12 +2831,12 @@ function oo(e) {
|
|
|
2831
2831
|
}), te(r, "visit.date") && p.push({
|
|
2832
2832
|
cells: [
|
|
2833
2833
|
i("anamnesis.header.visitDate"),
|
|
2834
|
-
|
|
2834
|
+
re(u.dateIso, i)
|
|
2835
2835
|
]
|
|
2836
2836
|
}), te(r, "visit.practitioner") && u.practitioner && p.push({
|
|
2837
2837
|
cells: [
|
|
2838
2838
|
i("anamnesis.field.practitioner.label"),
|
|
2839
|
-
|
|
2839
|
+
oe(u.practitioner)
|
|
2840
2840
|
]
|
|
2841
2841
|
}), p.length > 0 && h.push(
|
|
2842
2842
|
Qn("visit", i("anamnesis.section.visitMeta"), p, i)
|
|
@@ -2873,7 +2873,7 @@ function oo(e) {
|
|
|
2873
2873
|
}
|
|
2874
2874
|
],
|
|
2875
2875
|
rows: u.pathologyCodes.map((A) => ({
|
|
2876
|
-
cells: [A,
|
|
2876
|
+
cells: [A, ya(A, i, w[A])]
|
|
2877
2877
|
})),
|
|
2878
2878
|
emptyText: i("anamnesis.export.none")
|
|
2879
2879
|
});
|
|
@@ -2881,15 +2881,15 @@ function oo(e) {
|
|
|
2881
2881
|
if (te(r, "oncological.history")) {
|
|
2882
2882
|
const w = u.oncological, A = [];
|
|
2883
2883
|
if (w) {
|
|
2884
|
-
if (
|
|
2884
|
+
if (oe(w.tumourType) && A.push({
|
|
2885
2885
|
cells: [
|
|
2886
2886
|
i("anamnesis.field.tumourType.label"),
|
|
2887
|
-
|
|
2887
|
+
oe(w.tumourType)
|
|
2888
2888
|
]
|
|
2889
|
-
}),
|
|
2890
|
-
cells: [i("anamnesis.field.stage.label"),
|
|
2889
|
+
}), oe(w.stage) && A.push({
|
|
2890
|
+
cells: [i("anamnesis.field.stage.label"), oe(w.stage)]
|
|
2891
2891
|
}), w.metastases) {
|
|
2892
|
-
const R = i(`anamnesis.common.${w.metastases.present}`), T =
|
|
2892
|
+
const R = i(`anamnesis.common.${w.metastases.present}`), T = oe(w.metastases.site);
|
|
2893
2893
|
A.push({
|
|
2894
2894
|
cells: [
|
|
2895
2895
|
i("anamnesis.field.metastases.label"),
|
|
@@ -2897,10 +2897,10 @@ function oo(e) {
|
|
|
2897
2897
|
]
|
|
2898
2898
|
});
|
|
2899
2899
|
}
|
|
2900
|
-
|
|
2900
|
+
oe(w.treatmentStatus) && A.push({
|
|
2901
2901
|
cells: [
|
|
2902
2902
|
i("anamnesis.field.treatmentStatus.label"),
|
|
2903
|
-
|
|
2903
|
+
oe(w.treatmentStatus)
|
|
2904
2904
|
]
|
|
2905
2905
|
});
|
|
2906
2906
|
}
|
|
@@ -2923,8 +2923,8 @@ function oo(e) {
|
|
|
2923
2923
|
],
|
|
2924
2924
|
rows: u.therapy.map((w) => ({
|
|
2925
2925
|
cells: [
|
|
2926
|
-
|
|
2927
|
-
|
|
2926
|
+
oe(w.name),
|
|
2927
|
+
oe(w.dose),
|
|
2928
2928
|
i(`anamnesis.medKind.${w.kind}`)
|
|
2929
2929
|
]
|
|
2930
2930
|
})),
|
|
@@ -2951,9 +2951,9 @@ function oo(e) {
|
|
|
2951
2951
|
rows: u.fmdCycles.map((w) => ({
|
|
2952
2952
|
cells: [
|
|
2953
2953
|
i("anamnesis.compile.cycleNumber", { number: w.cycleNumber }),
|
|
2954
|
-
|
|
2954
|
+
re(w.startDateIso, i),
|
|
2955
2955
|
w.completed ? i("anamnesis.compile.cycleCompleted") : i("anamnesis.compile.cycleInProgress"),
|
|
2956
|
-
|
|
2956
|
+
oe(w.notes)
|
|
2957
2957
|
]
|
|
2958
2958
|
})),
|
|
2959
2959
|
emptyText: i("anamnesis.compile.noFmd")
|
|
@@ -2971,10 +2971,10 @@ function oo(e) {
|
|
|
2971
2971
|
i("anamnesis.field.annualAccepted.label"),
|
|
2972
2972
|
R(w.accepted)
|
|
2973
2973
|
]
|
|
2974
|
-
}),
|
|
2974
|
+
}), oe(w.declineReason) && A.push({
|
|
2975
2975
|
cells: [
|
|
2976
2976
|
i("anamnesis.field.annualDeclineReason.label"),
|
|
2977
|
-
|
|
2977
|
+
oe(w.declineReason)
|
|
2978
2978
|
]
|
|
2979
2979
|
});
|
|
2980
2980
|
}
|
|
@@ -2983,15 +2983,15 @@ function oo(e) {
|
|
|
2983
2983
|
);
|
|
2984
2984
|
}
|
|
2985
2985
|
const C = [];
|
|
2986
|
-
return te(r, "notes.nutritionalProposal") &&
|
|
2986
|
+
return te(r, "notes.nutritionalProposal") && oe(u.nutritionalProposal) && C.push({
|
|
2987
2987
|
cells: [
|
|
2988
2988
|
i("anamnesis.field.nutritionalProposal.label"),
|
|
2989
|
-
|
|
2989
|
+
oe(u.nutritionalProposal)
|
|
2990
2990
|
]
|
|
2991
|
-
}), te(r, "notes.clinicalNotes") &&
|
|
2991
|
+
}), te(r, "notes.clinicalNotes") && oe(u.clinicalNotes) && C.push({
|
|
2992
2992
|
cells: [
|
|
2993
2993
|
i("anamnesis.field.clinicalNotes.label"),
|
|
2994
|
-
|
|
2994
|
+
oe(u.clinicalNotes)
|
|
2995
2995
|
]
|
|
2996
2996
|
}), C.length > 0 && h.push({
|
|
2997
2997
|
id: "notes",
|
|
@@ -3028,8 +3028,8 @@ function ro(e, n, a) {
|
|
|
3028
3028
|
var r;
|
|
3029
3029
|
const o = ((r = e.cells[s.index]) == null ? void 0 : r.outOfRange) ?? null;
|
|
3030
3030
|
return o ? a("anamnesis.export.flagged", {
|
|
3031
|
-
date:
|
|
3032
|
-
flag:
|
|
3031
|
+
date: re(s.visit.dateIso, a),
|
|
3032
|
+
flag: Pt(o, a)
|
|
3033
3033
|
}) : null;
|
|
3034
3034
|
}).filter((s) => s != null);
|
|
3035
3035
|
return i.length === 0 ? null : i.join(a("anamnesis.export.listSeparator"));
|
|
@@ -3044,8 +3044,8 @@ function co(e) {
|
|
|
3044
3044
|
var C;
|
|
3045
3045
|
const { record: n, audience: a, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = e.scope ?? "selected", l = { audience: a, withheld: /* @__PURE__ */ new Set() };
|
|
3046
3046
|
if (!te(l, Hn))
|
|
3047
|
-
return
|
|
3048
|
-
const { meta: c, patientName: u } =
|
|
3047
|
+
return Sa("evolution", a, i);
|
|
3048
|
+
const { meta: c, patientName: u } = Ta(n, l, i, o), h = [], g = [], p = e.selectedVisitIds ? [...e.selectedVisitIds] : null, k = p && p.length > 0 ? p : fn(n.visits), v = r === "all" ? It(n.visits) : Fn(n.visits, k).columns;
|
|
3049
3049
|
if (c.push({
|
|
3050
3050
|
label: i("anamnesis.export.visitsLabel"),
|
|
3051
3051
|
value: r === "all" ? i("anamnesis.export.visitsAll", { total: n.visits.length }) : i("anamnesis.export.visitsSelected", {
|
|
@@ -3053,7 +3053,7 @@ function co(e) {
|
|
|
3053
3053
|
total: n.visits.length
|
|
3054
3054
|
})
|
|
3055
3055
|
}), te(l, "visit.date") && v.length > 0) {
|
|
3056
|
-
const w = _e(s), A =
|
|
3056
|
+
const w = _e(s), A = va(n, w), R = re(v[0].visit.dateIso, i), T = re(v[v.length - 1].visit.dateIso, i), L = [
|
|
3057
3057
|
{ key: "parameter", header: i("anamnesis.grid.parameter") },
|
|
3058
3058
|
{ key: "unit", header: i("anamnesis.export.column.unit") },
|
|
3059
3059
|
{
|
|
@@ -3062,7 +3062,7 @@ function co(e) {
|
|
|
3062
3062
|
},
|
|
3063
3063
|
...v.map((N) => ({
|
|
3064
3064
|
key: `visit-${N.visit.id}`,
|
|
3065
|
-
header:
|
|
3065
|
+
header: re(N.visit.dateIso, i),
|
|
3066
3066
|
numeric: !0
|
|
3067
3067
|
})),
|
|
3068
3068
|
{
|
|
@@ -3082,12 +3082,12 @@ function co(e) {
|
|
|
3082
3082
|
], S = [];
|
|
3083
3083
|
let m = null;
|
|
3084
3084
|
for (const N of A)
|
|
3085
|
-
te(l,
|
|
3085
|
+
te(l, Rt(N.def)) && (N.def.group !== m && (m = N.def.group, S.push(Lt(i(`anamnesis.group.${N.def.group}`)))), S.push({
|
|
3086
3086
|
precision: N.def.precision,
|
|
3087
3087
|
cells: [
|
|
3088
3088
|
ze(N.def, i),
|
|
3089
3089
|
N.def.unit ?? null,
|
|
3090
|
-
|
|
3090
|
+
Ft(N.def, i),
|
|
3091
3091
|
...v.map((x) => {
|
|
3092
3092
|
var P;
|
|
3093
3093
|
return ((P = N.cells[x.index]) == null ? void 0 : P.value) ?? null;
|
|
@@ -3142,13 +3142,13 @@ function mo(e, n) {
|
|
|
3142
3142
|
defaultValue: e
|
|
3143
3143
|
});
|
|
3144
3144
|
}
|
|
3145
|
-
function
|
|
3145
|
+
function Va(e, n) {
|
|
3146
3146
|
return {
|
|
3147
3147
|
included: e.tables.map((a) => a.title),
|
|
3148
3148
|
excluded: e.withheld.map((a) => mo(a, n)).sort((a, i) => a.localeCompare(i, e.locale))
|
|
3149
3149
|
};
|
|
3150
3150
|
}
|
|
3151
|
-
const po = "text/csv;charset=utf-8", ho = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
3151
|
+
const po = "text/csv;charset=utf-8", ho = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", Ba = `\r
|
|
3152
3152
|
`, go = /^[=+\-@\t\r]/;
|
|
3153
3153
|
function fo(e) {
|
|
3154
3154
|
var n;
|
|
@@ -3161,8 +3161,8 @@ function fo(e) {
|
|
|
3161
3161
|
return ".";
|
|
3162
3162
|
}
|
|
3163
3163
|
}
|
|
3164
|
-
function
|
|
3165
|
-
return fo(e) === "," ? { delimiter: ";", decimal: ",", eol:
|
|
3164
|
+
function Aa(e) {
|
|
3165
|
+
return fo(e) === "," ? { delimiter: ";", decimal: ",", eol: Ba, bom: !0 } : { delimiter: ",", decimal: ".", eol: Ba, bom: !0 };
|
|
3166
3166
|
}
|
|
3167
3167
|
function vo(e, n, a) {
|
|
3168
3168
|
if (!Number.isFinite(e)) return "";
|
|
@@ -3174,13 +3174,13 @@ function Oe(e, n) {
|
|
|
3174
3174
|
return a.includes(n.delimiter) || a.includes('"') || a.includes(`
|
|
3175
3175
|
`) || a.includes("\r") || a !== a.trim() ? `"${a.replace(/"/g, '""')}"` : a;
|
|
3176
3176
|
}
|
|
3177
|
-
function
|
|
3177
|
+
function Ua(e, n, a) {
|
|
3178
3178
|
return e == null ? "" : typeof e == "number" ? vo(e, a, n) : Oe(e, n);
|
|
3179
3179
|
}
|
|
3180
|
-
function
|
|
3180
|
+
function $t(e, n) {
|
|
3181
3181
|
return e.precision ?? (n == null ? void 0 : n.precision);
|
|
3182
3182
|
}
|
|
3183
|
-
function yo(e, n =
|
|
3183
|
+
function yo(e, n = Aa(e.locale)) {
|
|
3184
3184
|
const a = [], i = (s) => a.push(s.join(n.delimiter));
|
|
3185
3185
|
i([Oe(e.title, n)]);
|
|
3186
3186
|
for (const s of e.meta)
|
|
@@ -3195,15 +3195,15 @@ function yo(e, n = Ea(e.locale)) {
|
|
|
3195
3195
|
}
|
|
3196
3196
|
for (const o of s.rows) {
|
|
3197
3197
|
if (o.kind === "section") {
|
|
3198
|
-
i([
|
|
3198
|
+
i([Ua(o.cells[0] ?? null, n)]);
|
|
3199
3199
|
continue;
|
|
3200
3200
|
}
|
|
3201
3201
|
i(
|
|
3202
3202
|
s.columns.map(
|
|
3203
|
-
(r, l) =>
|
|
3203
|
+
(r, l) => Ua(
|
|
3204
3204
|
o.cells[l] ?? null,
|
|
3205
3205
|
n,
|
|
3206
|
-
|
|
3206
|
+
$t(o, r)
|
|
3207
3207
|
)
|
|
3208
3208
|
)
|
|
3209
3209
|
);
|
|
@@ -3215,7 +3215,7 @@ function yo(e, n = Ea(e.locale)) {
|
|
|
3215
3215
|
}
|
|
3216
3216
|
return a.join(n.eol) + n.eol;
|
|
3217
3217
|
}
|
|
3218
|
-
function bo(e, n =
|
|
3218
|
+
function bo(e, n = Aa(e.locale)) {
|
|
3219
3219
|
const a = yo(e, n);
|
|
3220
3220
|
return new Blob([n.bom ? `\uFEFF${a}` : a], { type: po });
|
|
3221
3221
|
}
|
|
@@ -3223,7 +3223,7 @@ async function xo() {
|
|
|
3223
3223
|
const e = await import("./exceljs.min-D2MHbJsF.js").then((a) => a.e), n = e;
|
|
3224
3224
|
return typeof n.Workbook == "function" ? e : n.default ?? e;
|
|
3225
3225
|
}
|
|
3226
|
-
function
|
|
3226
|
+
function Ka(e, n) {
|
|
3227
3227
|
const a = e.replace(/[\\/?*[\]:]/g, " ").trim().slice(0, 31);
|
|
3228
3228
|
let i = a || "Sheet", s = 2;
|
|
3229
3229
|
for (; n.has(i.toLowerCase()); ) {
|
|
@@ -3247,7 +3247,7 @@ function Co(e, n) {
|
|
|
3247
3247
|
async function To(e) {
|
|
3248
3248
|
const n = await xo(), a = new n.Workbook();
|
|
3249
3249
|
a.created = /* @__PURE__ */ new Date();
|
|
3250
|
-
const i = /* @__PURE__ */ new Set(), s = a.addWorksheet(
|
|
3250
|
+
const i = /* @__PURE__ */ new Set(), s = a.addWorksheet(Ka(e.title, i)), o = s.addRow([e.title]);
|
|
3251
3251
|
o.font = { bold: !0 };
|
|
3252
3252
|
for (const l of e.meta) s.addRow([l.label, l.value]);
|
|
3253
3253
|
if (e.footnotes.length > 0) {
|
|
@@ -3256,7 +3256,7 @@ async function To(e) {
|
|
|
3256
3256
|
}
|
|
3257
3257
|
s.getColumn(1).width = 28, s.getColumn(2).width = 48;
|
|
3258
3258
|
for (const l of e.tables) {
|
|
3259
|
-
const c = a.addWorksheet(
|
|
3259
|
+
const c = a.addWorksheet(Ka(l.title, i)), u = c.addRow(
|
|
3260
3260
|
l.columns.map((h) => h.header)
|
|
3261
3261
|
);
|
|
3262
3262
|
u.font = { bold: !0 }, c.views = [{ state: "frozen", ySplit: 1 }], l.rows.length === 0 && l.emptyText && c.addRow([l.emptyText]);
|
|
@@ -3270,7 +3270,7 @@ async function To(e) {
|
|
|
3270
3270
|
l.columns.forEach((k, v) => {
|
|
3271
3271
|
const f = p.getCell(v + 1);
|
|
3272
3272
|
if (typeof g[v] != "number") return;
|
|
3273
|
-
const C = ko(
|
|
3273
|
+
const C = ko($t(h, k));
|
|
3274
3274
|
C && (f.numFmt = C), f.alignment = { horizontal: "right" };
|
|
3275
3275
|
});
|
|
3276
3276
|
}
|
|
@@ -3284,20 +3284,20 @@ async function To(e) {
|
|
|
3284
3284
|
const r = await a.xlsx.writeBuffer();
|
|
3285
3285
|
return new Blob([r], { type: ho });
|
|
3286
3286
|
}
|
|
3287
|
-
function
|
|
3287
|
+
function Ea(e, n) {
|
|
3288
3288
|
return `${e.fileStem}.${n}`;
|
|
3289
3289
|
}
|
|
3290
|
-
function
|
|
3290
|
+
function Da(e, n) {
|
|
3291
3291
|
if (typeof window > "u" || typeof document > "u" || typeof URL > "u" || typeof URL.createObjectURL != "function")
|
|
3292
3292
|
return !1;
|
|
3293
3293
|
const a = URL.createObjectURL(e), i = document.createElement("a");
|
|
3294
3294
|
return i.href = a, i.download = n, document.body.appendChild(i), i.click(), i.remove(), window.setTimeout(() => URL.revokeObjectURL(a), 0), !0;
|
|
3295
3295
|
}
|
|
3296
|
-
function So(e, n =
|
|
3297
|
-
return
|
|
3296
|
+
function So(e, n = Aa(e.locale)) {
|
|
3297
|
+
return Da(bo(e, n), Ea(e, "csv"));
|
|
3298
3298
|
}
|
|
3299
3299
|
async function Ao(e) {
|
|
3300
|
-
return
|
|
3300
|
+
return Da(await To(e), Ea(e, "xlsx"));
|
|
3301
3301
|
}
|
|
3302
3302
|
const Ke = {
|
|
3303
3303
|
headerFill: [237, 237, 240],
|
|
@@ -3413,7 +3413,7 @@ function qe(e) {
|
|
|
3413
3413
|
n.includes(a) && (n = n.split(a).join(i));
|
|
3414
3414
|
return n;
|
|
3415
3415
|
}
|
|
3416
|
-
const
|
|
3416
|
+
const se = 14, Io = 6, Ro = 15, Lo = 9, Fo = 11, Ha = 8.5, Ga = 8, Me = 5;
|
|
3417
3417
|
function Po(e) {
|
|
3418
3418
|
return e.tables.some(
|
|
3419
3419
|
(n) => n.columns.length > Io
|
|
@@ -3430,21 +3430,21 @@ function _o(e, n, a) {
|
|
|
3430
3430
|
return n == null ? String(e) : e.toFixed(n);
|
|
3431
3431
|
}
|
|
3432
3432
|
}
|
|
3433
|
-
function
|
|
3433
|
+
function zt(e, n, a) {
|
|
3434
3434
|
return e == null ? "" : qe(
|
|
3435
3435
|
typeof e == "number" ? _o(e, n, a) : e
|
|
3436
3436
|
);
|
|
3437
3437
|
}
|
|
3438
3438
|
function $o(e, n, a) {
|
|
3439
3439
|
return n.columns.map(
|
|
3440
|
-
(i, s) =>
|
|
3440
|
+
(i, s) => zt(
|
|
3441
3441
|
e.cells[s] ?? null,
|
|
3442
3442
|
e.precision ?? i.precision,
|
|
3443
3443
|
a
|
|
3444
3444
|
)
|
|
3445
3445
|
);
|
|
3446
3446
|
}
|
|
3447
|
-
async function
|
|
3447
|
+
async function Mt(e, n = {}) {
|
|
3448
3448
|
var v;
|
|
3449
3449
|
const [{ jsPDF: a }, { default: i }] = await Promise.all([
|
|
3450
3450
|
import("./jspdf.es.min-DaapWjR1.js").then((f) => f.j),
|
|
@@ -3453,36 +3453,36 @@ async function Ot(e, n = {}) {
|
|
|
3453
3453
|
orientation: Po(e) ? "landscape" : "portrait",
|
|
3454
3454
|
unit: "mm",
|
|
3455
3455
|
format: "a4"
|
|
3456
|
-
}), l = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), u = l -
|
|
3456
|
+
}), l = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), u = l - se * 2, h = (f, C, w) => {
|
|
3457
3457
|
r.setFont("helvetica", f), r.setFontSize(C), r.setTextColor(w[0], w[1], w[2]);
|
|
3458
3458
|
};
|
|
3459
|
-
let g =
|
|
3459
|
+
let g = se;
|
|
3460
3460
|
h("bold", Ro, s.headerText);
|
|
3461
3461
|
for (const f of r.splitTextToSize(
|
|
3462
3462
|
qe(e.title),
|
|
3463
3463
|
u
|
|
3464
3464
|
))
|
|
3465
|
-
r.text(f,
|
|
3465
|
+
r.text(f, se, g), g += Me + 1;
|
|
3466
3466
|
g += 1, h("normal", Lo, s.mutedText);
|
|
3467
3467
|
for (const f of e.meta)
|
|
3468
|
-
r.text(qe(`${f.label}: ${f.value}`),
|
|
3468
|
+
r.text(qe(`${f.label}: ${f.value}`), se, g), g += Me - 0.6;
|
|
3469
3469
|
for (const f of e.tables) {
|
|
3470
|
-
if (g += Me, g > c -
|
|
3471
|
-
g += Me, h("normal",
|
|
3470
|
+
if (g += Me, g > c - se * 2 && (r.addPage(), g = se), h("bold", Fo, s.headerText), r.text(qe(f.title), se, g), g += 2, f.rows.length === 0 && f.emptyText) {
|
|
3471
|
+
g += Me, h("normal", Ha, s.mutedText), r.text(qe(f.emptyText), se, g), g += 1;
|
|
3472
3472
|
continue;
|
|
3473
3473
|
}
|
|
3474
3474
|
const C = /* @__PURE__ */ new Set(), w = f.rows.map((T, L) => T.kind === "section" ? (C.add(L), [
|
|
3475
|
-
|
|
3475
|
+
zt(T.cells[0] ?? null, void 0, o),
|
|
3476
3476
|
...f.columns.slice(1).map(() => "")
|
|
3477
3477
|
]) : $o(T, f, o)), A = {}, R = {
|
|
3478
3478
|
head: [f.columns.map((T) => qe(T.header))],
|
|
3479
3479
|
body: w,
|
|
3480
3480
|
startY: g + 2,
|
|
3481
|
-
margin: { left:
|
|
3481
|
+
margin: { left: se, right: se, bottom: se + Me },
|
|
3482
3482
|
theme: "grid",
|
|
3483
3483
|
styles: {
|
|
3484
3484
|
font: "helvetica",
|
|
3485
|
-
fontSize:
|
|
3485
|
+
fontSize: Ha,
|
|
3486
3486
|
cellPadding: 1.6,
|
|
3487
3487
|
textColor: s.bodyText,
|
|
3488
3488
|
lineColor: s.headerFill,
|
|
@@ -3511,36 +3511,36 @@ async function Ot(e, n = {}) {
|
|
|
3511
3511
|
i(r, R), g = ((v = A.table) == null ? void 0 : v.finalY) ?? g + Me;
|
|
3512
3512
|
}
|
|
3513
3513
|
if (e.footnotes.length > 0) {
|
|
3514
|
-
g += Me + 1, g > c -
|
|
3514
|
+
g += Me + 1, g > c - se * 2 && (r.addPage(), g = se), h("normal", Ga, s.mutedText);
|
|
3515
3515
|
for (const f of e.footnotes)
|
|
3516
3516
|
for (const C of r.splitTextToSize(qe(f), u))
|
|
3517
|
-
r.text(C,
|
|
3517
|
+
r.text(C, se, g), g += Me - 1;
|
|
3518
3518
|
}
|
|
3519
3519
|
const p = qe(
|
|
3520
3520
|
[e.patientName, e.audienceLabel].filter(Boolean).join(" · ")
|
|
3521
3521
|
), k = r.getNumberOfPages();
|
|
3522
3522
|
for (let f = 1; f <= k; f += 1)
|
|
3523
|
-
r.setPage(f), h("normal",
|
|
3523
|
+
r.setPage(f), h("normal", Ga, s.mutedText), p && r.text(p, se, c - se + 4), r.text(
|
|
3524
3524
|
`${f} / ${k}`,
|
|
3525
|
-
l -
|
|
3526
|
-
c -
|
|
3525
|
+
l - se,
|
|
3526
|
+
c - se + 4,
|
|
3527
3527
|
{ align: "right" }
|
|
3528
3528
|
);
|
|
3529
3529
|
return n.autoPrint && r.autoPrint(), r.output("blob");
|
|
3530
3530
|
}
|
|
3531
3531
|
async function zo(e, n = {}) {
|
|
3532
|
-
return
|
|
3533
|
-
await
|
|
3534
|
-
|
|
3532
|
+
return Da(
|
|
3533
|
+
await Mt(e, n),
|
|
3534
|
+
Ea(e, "pdf")
|
|
3535
3535
|
);
|
|
3536
3536
|
}
|
|
3537
3537
|
async function Mo(e, n, a = {}) {
|
|
3538
3538
|
if (!n || typeof URL > "u" || typeof URL.createObjectURL != "function")
|
|
3539
3539
|
return null;
|
|
3540
|
-
const i = await
|
|
3540
|
+
const i = await Mt(e, { ...a, autoPrint: !0 }), s = URL.createObjectURL(i);
|
|
3541
3541
|
return n.setAttribute("src", s), s;
|
|
3542
3542
|
}
|
|
3543
|
-
const
|
|
3543
|
+
const ra = ["clinician", "patient"];
|
|
3544
3544
|
function Oo({
|
|
3545
3545
|
tab: e,
|
|
3546
3546
|
record: n,
|
|
@@ -3569,7 +3569,7 @@ function Oo({
|
|
|
3569
3569
|
}),
|
|
3570
3570
|
[e, n, a, i, s, h]
|
|
3571
3571
|
), P = a(`anamnesis.export.tab.${e}`), $ = a("anamnesis.export.control.audienceBadge"), F = q(
|
|
3572
|
-
() => p ?
|
|
3572
|
+
() => p ? Va(x("patient"), a).excluded : [],
|
|
3573
3573
|
[p, x, a]
|
|
3574
3574
|
), E = {
|
|
3575
3575
|
clinician: F.length > 0 ? a("anamnesis.export.control.holds", {
|
|
@@ -3579,22 +3579,22 @@ function Oo({
|
|
|
3579
3579
|
list: F.join(a("anamnesis.export.listSeparator"))
|
|
3580
3580
|
}) : a("anamnesis.export.control.excludesNone")
|
|
3581
3581
|
}, H = q(
|
|
3582
|
-
() => v ?
|
|
3582
|
+
() => v ? Va(x(C), a) : { included: [], excluded: [] },
|
|
3583
3583
|
[v, x, C, a]
|
|
3584
|
-
), j = (B) => R((
|
|
3584
|
+
), j = (B) => R((ee) => ({ text: B, seq: ee.seq + 1 })), M = (B, ee) => {
|
|
3585
3585
|
if (m.current) return;
|
|
3586
3586
|
m.current = !0;
|
|
3587
3587
|
const pe = x(c);
|
|
3588
|
-
Promise.resolve(
|
|
3589
|
-
(
|
|
3590
|
-
|
|
3588
|
+
Promise.resolve(ee(pe)).then(
|
|
3589
|
+
(de) => j(
|
|
3590
|
+
de ? a("anamnesis.export.control.ready", {
|
|
3591
3591
|
file: `${pe.fileStem}.${B}`
|
|
3592
3592
|
}) : a("anamnesis.export.control.failed")
|
|
3593
3593
|
)
|
|
3594
3594
|
).catch(() => j(a("anamnesis.export.control.failed"))).finally(() => {
|
|
3595
3595
|
m.current = !1;
|
|
3596
3596
|
});
|
|
3597
|
-
}, U = () => Eo(T.current),
|
|
3597
|
+
}, U = () => Eo(T.current), Y = () => M("pdf", (B) => zo(B, { palette: U() })), ae = () => M("xlsx", Ao), me = () => M("csv", So), J = () => {
|
|
3598
3598
|
m.current || (m.current = !0, Mo(x(c), L.current, { palette: U() }).then((B) => {
|
|
3599
3599
|
if (!B) {
|
|
3600
3600
|
j(a("anamnesis.export.control.failed"));
|
|
@@ -3623,7 +3623,7 @@ function Oo({
|
|
|
3623
3623
|
className: "ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]",
|
|
3624
3624
|
children: [
|
|
3625
3625
|
c !== "clinician" ? /* @__PURE__ */ t(
|
|
3626
|
-
|
|
3626
|
+
X,
|
|
3627
3627
|
{
|
|
3628
3628
|
variant: "warning",
|
|
3629
3629
|
size: "sm",
|
|
@@ -3632,19 +3632,19 @@ function Oo({
|
|
|
3632
3632
|
}
|
|
3633
3633
|
) : null,
|
|
3634
3634
|
/* @__PURE__ */ d(
|
|
3635
|
-
|
|
3635
|
+
le.Root,
|
|
3636
3636
|
{
|
|
3637
3637
|
open: p,
|
|
3638
3638
|
onOpenChange: k,
|
|
3639
3639
|
modal: !o,
|
|
3640
3640
|
children: [
|
|
3641
|
-
/* @__PURE__ */ t(
|
|
3642
|
-
|
|
3641
|
+
/* @__PURE__ */ t(le.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
3642
|
+
ne,
|
|
3643
3643
|
{
|
|
3644
3644
|
type: "button",
|
|
3645
3645
|
intent: "outline",
|
|
3646
3646
|
size: "sm",
|
|
3647
|
-
endIcon: /* @__PURE__ */ t(
|
|
3647
|
+
endIcon: /* @__PURE__ */ t(ma, { "aria-hidden": "true" }),
|
|
3648
3648
|
"aria-label": c === "clinician" ? a("anamnesis.export.control.triggerLabel", { tab: P }) : a("anamnesis.export.control.triggerLabelAudience", {
|
|
3649
3649
|
tab: P,
|
|
3650
3650
|
audience: $
|
|
@@ -3653,29 +3653,29 @@ function Oo({
|
|
|
3653
3653
|
children: a("anamnesis.export.control.trigger")
|
|
3654
3654
|
}
|
|
3655
3655
|
) }),
|
|
3656
|
-
/* @__PURE__ */ d(
|
|
3657
|
-
/* @__PURE__ */ t(
|
|
3658
|
-
/* @__PURE__ */ t(
|
|
3659
|
-
/* @__PURE__ */ t(
|
|
3656
|
+
/* @__PURE__ */ d(le.Content, { align: "end", children: [
|
|
3657
|
+
/* @__PURE__ */ t(le.Label, { children: a("anamnesis.export.control.menuLabel", { tab: P }) }),
|
|
3658
|
+
/* @__PURE__ */ t(le.Separator, {}),
|
|
3659
|
+
/* @__PURE__ */ t(le.Label, { children: a("anamnesis.export.audienceLabel") }),
|
|
3660
3660
|
/* @__PURE__ */ t(
|
|
3661
|
-
|
|
3661
|
+
le.RadioGroup,
|
|
3662
3662
|
{
|
|
3663
3663
|
value: c,
|
|
3664
3664
|
onValueChange: (B) => u(B),
|
|
3665
|
-
children:
|
|
3666
|
-
|
|
3665
|
+
children: ra.map((B) => /* @__PURE__ */ t(
|
|
3666
|
+
le.RadioItem,
|
|
3667
3667
|
{
|
|
3668
3668
|
value: B,
|
|
3669
3669
|
"aria-describedby": `${N}-${B}`,
|
|
3670
|
-
onSelect: (
|
|
3670
|
+
onSelect: (ee) => ee.preventDefault(),
|
|
3671
3671
|
children: a(`anamnesis.export.audience.${B}`)
|
|
3672
3672
|
},
|
|
3673
3673
|
B
|
|
3674
3674
|
))
|
|
3675
3675
|
}
|
|
3676
3676
|
),
|
|
3677
|
-
/* @__PURE__ */ t(
|
|
3678
|
-
|
|
3677
|
+
/* @__PURE__ */ t(le.Label, { "data-testid": "anamnesis-export-disclosure", children: E[c === "patient" ? "patient" : "clinician"] }),
|
|
3678
|
+
ra.map((B) => /* @__PURE__ */ t(
|
|
3679
3679
|
"span",
|
|
3680
3680
|
{
|
|
3681
3681
|
id: `${N}-${B}`,
|
|
@@ -3689,7 +3689,7 @@ function Oo({
|
|
|
3689
3689
|
whose OFF state has to be visible — an unticked checkbox row
|
|
3690
3690
|
renders as an empty slot. */
|
|
3691
3691
|
/* @__PURE__ */ t(
|
|
3692
|
-
|
|
3692
|
+
le.SwitchItem,
|
|
3693
3693
|
{
|
|
3694
3694
|
checked: h,
|
|
3695
3695
|
onCheckedChange: g,
|
|
@@ -3697,9 +3697,9 @@ function Oo({
|
|
|
3697
3697
|
}
|
|
3698
3698
|
)
|
|
3699
3699
|
) : null,
|
|
3700
|
-
/* @__PURE__ */ t(
|
|
3700
|
+
/* @__PURE__ */ t(le.Separator, {}),
|
|
3701
3701
|
/* @__PURE__ */ t(
|
|
3702
|
-
|
|
3702
|
+
le.Item,
|
|
3703
3703
|
{
|
|
3704
3704
|
startIcon: /* @__PURE__ */ t(pi, { "aria-hidden": "true" }),
|
|
3705
3705
|
onSelect: Re,
|
|
@@ -3707,35 +3707,35 @@ function Oo({
|
|
|
3707
3707
|
}
|
|
3708
3708
|
),
|
|
3709
3709
|
/* @__PURE__ */ t(
|
|
3710
|
-
|
|
3710
|
+
le.Item,
|
|
3711
3711
|
{
|
|
3712
3712
|
startIcon: /* @__PURE__ */ t(hi, { "aria-hidden": "true" }),
|
|
3713
|
-
onSelect:
|
|
3713
|
+
onSelect: Y,
|
|
3714
3714
|
children: a("anamnesis.export.control.pdf")
|
|
3715
3715
|
}
|
|
3716
3716
|
),
|
|
3717
3717
|
/* @__PURE__ */ t(
|
|
3718
|
-
|
|
3718
|
+
le.Item,
|
|
3719
3719
|
{
|
|
3720
3720
|
startIcon: /* @__PURE__ */ t(gi, { "aria-hidden": "true" }),
|
|
3721
|
-
onSelect:
|
|
3721
|
+
onSelect: J,
|
|
3722
3722
|
children: a("anamnesis.export.control.print")
|
|
3723
3723
|
}
|
|
3724
3724
|
),
|
|
3725
|
-
/* @__PURE__ */ t(
|
|
3725
|
+
/* @__PURE__ */ t(le.Separator, {}),
|
|
3726
3726
|
/* @__PURE__ */ t(
|
|
3727
|
-
|
|
3727
|
+
le.Item,
|
|
3728
3728
|
{
|
|
3729
3729
|
startIcon: /* @__PURE__ */ t(fi, { "aria-hidden": "true" }),
|
|
3730
|
-
onSelect:
|
|
3730
|
+
onSelect: ae,
|
|
3731
3731
|
children: a("anamnesis.export.control.xlsx")
|
|
3732
3732
|
}
|
|
3733
3733
|
),
|
|
3734
3734
|
/* @__PURE__ */ t(
|
|
3735
|
-
|
|
3735
|
+
le.Item,
|
|
3736
3736
|
{
|
|
3737
3737
|
startIcon: /* @__PURE__ */ t(vi, { "aria-hidden": "true" }),
|
|
3738
|
-
onSelect:
|
|
3738
|
+
onSelect: me,
|
|
3739
3739
|
children: a("anamnesis.export.control.csv")
|
|
3740
3740
|
}
|
|
3741
3741
|
)
|
|
@@ -3790,15 +3790,15 @@ function qo({
|
|
|
3790
3790
|
tabName: r,
|
|
3791
3791
|
t: l
|
|
3792
3792
|
}) {
|
|
3793
|
-
return /* @__PURE__ */ t(
|
|
3794
|
-
/* @__PURE__ */ d(
|
|
3793
|
+
return /* @__PURE__ */ t(Z.Root, { open: e, onOpenChange: n, children: /* @__PURE__ */ d(Z.Content, { size: "md", "data-testid": "anamnesis-share-dialog", children: [
|
|
3794
|
+
/* @__PURE__ */ d(Z.Header, { children: [
|
|
3795
3795
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
3796
|
-
/* @__PURE__ */ t(
|
|
3797
|
-
/* @__PURE__ */ t(
|
|
3796
|
+
/* @__PURE__ */ t(Z.Title, { children: l("anamnesis.export.share.title", { tab: r }) }),
|
|
3797
|
+
/* @__PURE__ */ t(X, { variant: "warning", size: "sm", children: l("anamnesis.export.share.mockBadge") })
|
|
3798
3798
|
] }),
|
|
3799
|
-
/* @__PURE__ */ t(
|
|
3799
|
+
/* @__PURE__ */ t(Z.Description, { children: l("anamnesis.export.share.subtitle") })
|
|
3800
3800
|
] }),
|
|
3801
|
-
/* @__PURE__ */ d(
|
|
3801
|
+
/* @__PURE__ */ d(Z.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3802
3802
|
/* @__PURE__ */ d(He, { variant: "warning", "data-testid": "anamnesis-share-notice", children: [
|
|
3803
3803
|
/* @__PURE__ */ t(He.Title, { children: l("anamnesis.export.share.noticeTitle") }),
|
|
3804
3804
|
/* @__PURE__ */ t(He.Description, { children: l("anamnesis.export.share.notice") })
|
|
@@ -3809,7 +3809,7 @@ function qo({
|
|
|
3809
3809
|
label: l("anamnesis.export.share.audienceLabel"),
|
|
3810
3810
|
value: a,
|
|
3811
3811
|
onValueChange: (c) => i(c),
|
|
3812
|
-
children:
|
|
3812
|
+
children: ra.map((c) => /* @__PURE__ */ t(
|
|
3813
3813
|
ke,
|
|
3814
3814
|
{
|
|
3815
3815
|
value: c,
|
|
@@ -3820,7 +3820,7 @@ function qo({
|
|
|
3820
3820
|
}
|
|
3821
3821
|
),
|
|
3822
3822
|
/* @__PURE__ */ t(
|
|
3823
|
-
|
|
3823
|
+
ja,
|
|
3824
3824
|
{
|
|
3825
3825
|
title: l("anamnesis.export.share.includes"),
|
|
3826
3826
|
items: s.included,
|
|
@@ -3829,7 +3829,7 @@ function qo({
|
|
|
3829
3829
|
}
|
|
3830
3830
|
),
|
|
3831
3831
|
/* @__PURE__ */ t(
|
|
3832
|
-
|
|
3832
|
+
ja,
|
|
3833
3833
|
{
|
|
3834
3834
|
title: l("anamnesis.export.share.excludes"),
|
|
3835
3835
|
items: s.excluded,
|
|
@@ -3838,10 +3838,10 @@ function qo({
|
|
|
3838
3838
|
}
|
|
3839
3839
|
)
|
|
3840
3840
|
] }),
|
|
3841
|
-
/* @__PURE__ */ d(
|
|
3842
|
-
/* @__PURE__ */ t(
|
|
3841
|
+
/* @__PURE__ */ d(Z.Footer, { divider: !0, children: [
|
|
3842
|
+
/* @__PURE__ */ t(Z.Close, { asChild: !0, children: /* @__PURE__ */ t(ne, { type: "button", intent: "ghost", size: "sm", children: l("anamnesis.export.share.cancel") }) }),
|
|
3843
3843
|
/* @__PURE__ */ t(
|
|
3844
|
-
|
|
3844
|
+
ne,
|
|
3845
3845
|
{
|
|
3846
3846
|
type: "button",
|
|
3847
3847
|
intent: "primary",
|
|
@@ -3854,7 +3854,7 @@ function qo({
|
|
|
3854
3854
|
] })
|
|
3855
3855
|
] }) });
|
|
3856
3856
|
}
|
|
3857
|
-
function
|
|
3857
|
+
function ja({
|
|
3858
3858
|
title: e,
|
|
3859
3859
|
items: n,
|
|
3860
3860
|
emptyText: a,
|
|
@@ -3872,7 +3872,7 @@ function Qa({
|
|
|
3872
3872
|
}
|
|
3873
3873
|
);
|
|
3874
3874
|
}
|
|
3875
|
-
function
|
|
3875
|
+
function Ot(e, n) {
|
|
3876
3876
|
if (!e.highlight || !n) return !1;
|
|
3877
3877
|
switch (e.highlight) {
|
|
3878
3878
|
case "always":
|
|
@@ -3905,7 +3905,7 @@ function qt({
|
|
|
3905
3905
|
readOnly: o = !1,
|
|
3906
3906
|
t: r
|
|
3907
3907
|
}) {
|
|
3908
|
-
const l = cs(e, r), c =
|
|
3908
|
+
const l = cs(e, r), c = ht(e, r), u = i && s === "patient", h = Ot(e, n);
|
|
3909
3909
|
let g = null;
|
|
3910
3910
|
switch (e.type) {
|
|
3911
3911
|
case "text": {
|
|
@@ -4148,7 +4148,7 @@ function qt({
|
|
|
4148
4148
|
children: [
|
|
4149
4149
|
u || h ? /* @__PURE__ */ d("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]", children: [
|
|
4150
4150
|
h ? /* @__PURE__ */ t("span", { "data-testid": `anamnesis-field-${e.key}-highlight`, children: /* @__PURE__ */ t(
|
|
4151
|
-
|
|
4151
|
+
X,
|
|
4152
4152
|
{
|
|
4153
4153
|
variant: "accentSoft",
|
|
4154
4154
|
size: "sm",
|
|
@@ -4156,7 +4156,7 @@ function qt({
|
|
|
4156
4156
|
children: r("anamnesis.field.highlighted")
|
|
4157
4157
|
}
|
|
4158
4158
|
) }) : null,
|
|
4159
|
-
u ? /* @__PURE__ */ t(
|
|
4159
|
+
u ? /* @__PURE__ */ t(yt, { t: r }) : null
|
|
4160
4160
|
] }) : null,
|
|
4161
4161
|
g
|
|
4162
4162
|
]
|
|
@@ -4208,7 +4208,7 @@ const Ko = {
|
|
|
4208
4208
|
function Go(e) {
|
|
4209
4209
|
return Ko[e] ?? Ho;
|
|
4210
4210
|
}
|
|
4211
|
-
function
|
|
4211
|
+
function Wa(e, n, a) {
|
|
4212
4212
|
return e.kind === "absolute" ? n : Math.abs(a) * n;
|
|
4213
4213
|
}
|
|
4214
4214
|
function jo(e, n, a) {
|
|
@@ -4216,7 +4216,7 @@ function jo(e, n, a) {
|
|
|
4216
4216
|
const i = Go(a), s = e - n;
|
|
4217
4217
|
if (i.sided === "atLeast" && s >= 0 || i.sided === "atMost" && s <= 0) return "onTarget";
|
|
4218
4218
|
const o = Math.abs(s);
|
|
4219
|
-
return o <=
|
|
4219
|
+
return o <= Wa(i, i.onTarget, n) ? "onTarget" : o <= Wa(i, i.approaching, n) ? "approaching" : "offTarget";
|
|
4220
4220
|
}
|
|
4221
4221
|
const Wo = {
|
|
4222
4222
|
weight: { min: 20, max: 400, step: 0.1 },
|
|
@@ -4253,7 +4253,7 @@ function Bt({
|
|
|
4253
4253
|
};
|
|
4254
4254
|
return /* @__PURE__ */ d(ye, { open: r, onOpenChange: f, children: [
|
|
4255
4255
|
/* @__PURE__ */ t(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
4256
|
-
|
|
4256
|
+
ce,
|
|
4257
4257
|
{
|
|
4258
4258
|
icon: /* @__PURE__ */ t(gn, { "aria-hidden": "true" }),
|
|
4259
4259
|
intent: "ghost",
|
|
@@ -4296,7 +4296,7 @@ function Bt({
|
|
|
4296
4296
|
p && g ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.targets.unsaved") }) : null,
|
|
4297
4297
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-sm)]", children: [
|
|
4298
4298
|
/* @__PURE__ */ t(
|
|
4299
|
-
|
|
4299
|
+
ne,
|
|
4300
4300
|
{
|
|
4301
4301
|
intent: "ghost",
|
|
4302
4302
|
size: "sm",
|
|
@@ -4307,7 +4307,7 @@ function Bt({
|
|
|
4307
4307
|
}
|
|
4308
4308
|
),
|
|
4309
4309
|
/* @__PURE__ */ t(
|
|
4310
|
-
|
|
4310
|
+
ne,
|
|
4311
4311
|
{
|
|
4312
4312
|
intent: "primary",
|
|
4313
4313
|
size: "sm",
|
|
@@ -4358,7 +4358,7 @@ function er({
|
|
|
4358
4358
|
// `mt-auto` pins it to the tile's foot, so a row of tiles stretched to
|
|
4359
4359
|
// the tallest one lines its chips up instead of leaving a hole.
|
|
4360
4360
|
/* @__PURE__ */ d("div", { className: "ds:mt-auto ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4361
|
-
s ? /* @__PURE__ */ t(
|
|
4361
|
+
s ? /* @__PURE__ */ t(X, { variant: Zo[s], size: "sm", withDot: !0, children: o }) : null,
|
|
4362
4362
|
r
|
|
4363
4363
|
] })
|
|
4364
4364
|
) : null
|
|
@@ -4473,7 +4473,7 @@ function Xn({
|
|
|
4473
4473
|
}
|
|
4474
4474
|
) }),
|
|
4475
4475
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4476
|
-
k ? /* @__PURE__ */ t(
|
|
4476
|
+
k ? /* @__PURE__ */ t(ba, { flag: k, t: o }) : null,
|
|
4477
4477
|
/* @__PURE__ */ t(Un, { delta: p, def: u, t: o }),
|
|
4478
4478
|
C || v != null ? /* @__PURE__ */ d("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
4479
4479
|
/* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: v == null ? o("anamnesis.targets.unset") : o("anamnesis.grid.target", {
|
|
@@ -4513,7 +4513,7 @@ function ve({
|
|
|
4513
4513
|
children: c
|
|
4514
4514
|
}) {
|
|
4515
4515
|
return /* @__PURE__ */ d(
|
|
4516
|
-
|
|
4516
|
+
ca,
|
|
4517
4517
|
{
|
|
4518
4518
|
variant: "default",
|
|
4519
4519
|
defaultOpen: r === void 0 ? a : void 0,
|
|
@@ -4522,24 +4522,24 @@ function ve({
|
|
|
4522
4522
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
4523
4523
|
children: [
|
|
4524
4524
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: /* @__PURE__ */ d(
|
|
4525
|
-
|
|
4525
|
+
Za,
|
|
4526
4526
|
{
|
|
4527
|
-
className: "ds:flex ds:w-full ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:text-start" +
|
|
4527
|
+
className: "ds:flex ds:w-full ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:text-start" + xt,
|
|
4528
4528
|
children: [
|
|
4529
4529
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4530
4530
|
n(e),
|
|
4531
4531
|
i == null ? null : /* @__PURE__ */ t(
|
|
4532
|
-
|
|
4532
|
+
X,
|
|
4533
4533
|
{
|
|
4534
4534
|
variant: s === "outstanding" && i > 0 ? "warning" : "neutral",
|
|
4535
4535
|
size: "sm",
|
|
4536
4536
|
children: s === "outstanding" ? i > 0 ? n("anamnesis.compile.blockOutstanding", { count: i }) : n("anamnesis.compile.blockSettled") : i > 0 ? n("anamnesis.compile.blockFilled", { count: i }) : n("anamnesis.compile.blockEmpty")
|
|
4537
4537
|
}
|
|
4538
4538
|
),
|
|
4539
|
-
o > 0 ? /* @__PURE__ */ t(
|
|
4539
|
+
o > 0 ? /* @__PURE__ */ t(X, { variant: "warning", size: "sm", children: n("anamnesis.compile.blockFlagged", { count: o }) }) : null
|
|
4540
4540
|
] }),
|
|
4541
4541
|
/* @__PURE__ */ t(
|
|
4542
|
-
|
|
4542
|
+
ma,
|
|
4543
4543
|
{
|
|
4544
4544
|
"aria-hidden": "true",
|
|
4545
4545
|
className: "ds:size-5 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:[[data-state=open]_&]:rotate-180"
|
|
@@ -4549,7 +4549,7 @@ function ve({
|
|
|
4549
4549
|
}
|
|
4550
4550
|
) }),
|
|
4551
4551
|
/* @__PURE__ */ t(
|
|
4552
|
-
|
|
4552
|
+
da,
|
|
4553
4553
|
{
|
|
4554
4554
|
"aria-label": n(e),
|
|
4555
4555
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
@@ -4578,7 +4578,7 @@ function tr({
|
|
|
4578
4578
|
defaultShareOpen: v = !1,
|
|
4579
4579
|
defaultExportAudience: f = "clinician"
|
|
4580
4580
|
}) {
|
|
4581
|
-
var
|
|
4581
|
+
var Ra;
|
|
4582
4582
|
const [C, w] = z(
|
|
4583
4583
|
() => structuredClone(e)
|
|
4584
4584
|
), A = we(!1);
|
|
@@ -4602,34 +4602,34 @@ function tr({
|
|
|
4602
4602
|
() => new Set(F.map((y) => y.key)),
|
|
4603
4603
|
[F]
|
|
4604
4604
|
), H = q(
|
|
4605
|
-
() =>
|
|
4605
|
+
() => Oa(S, $),
|
|
4606
4606
|
[S, $]
|
|
4607
4607
|
), [j, M] = z(() => {
|
|
4608
|
-
const y =
|
|
4609
|
-
for (const I of
|
|
4608
|
+
const y = Oa(S, $), b = {};
|
|
4609
|
+
for (const I of wt) b[I] = y[I].open;
|
|
4610
4610
|
return b;
|
|
4611
4611
|
}), U = tn(
|
|
4612
4612
|
(y) => (b) => M((I) => ({ ...I, [y]: b })),
|
|
4613
4613
|
[]
|
|
4614
|
-
),
|
|
4614
|
+
), Y = q(
|
|
4615
4615
|
() => Ge(i),
|
|
4616
4616
|
[i]
|
|
4617
|
-
),
|
|
4617
|
+
), ae = q(() => ga(i), [i]), me = q(() => zn(i), [i]), [J, Re] = z(p), [D, B] = z(!0), [ee, pe] = z([]), de = tn((y) => {
|
|
4618
4618
|
pe(
|
|
4619
4619
|
(b) => b.length === y.length && b.every((I, K) => I === y[K]) ? b : [...y]
|
|
4620
4620
|
);
|
|
4621
|
-
}, []), { containerRef: Le, requestJump: Fe } =
|
|
4621
|
+
}, []), { containerRef: Le, requestJump: Fe } = ft(), Pe = tn(
|
|
4622
4622
|
(y) => {
|
|
4623
4623
|
var b, I;
|
|
4624
4624
|
return (I = (b = C.intake) == null ? void 0 : b.answers[y]) == null ? void 0 : I.value;
|
|
4625
4625
|
},
|
|
4626
4626
|
[C.intake]
|
|
4627
4627
|
), Nn = q(
|
|
4628
|
-
() => hs(
|
|
4629
|
-
[
|
|
4628
|
+
() => hs(Y, Pe, T.sex, n),
|
|
4629
|
+
[Y, Pe, T.sex, n]
|
|
4630
4630
|
), mn = q(
|
|
4631
|
-
() =>
|
|
4632
|
-
[
|
|
4631
|
+
() => gt(ae, Pe, T.sex, n),
|
|
4632
|
+
[ae, Pe, T.sex, n]
|
|
4633
4633
|
), [O] = z(() => new Set(mn.map((y) => y.key))), G = (y) => {
|
|
4634
4634
|
if (c) {
|
|
4635
4635
|
c(y);
|
|
@@ -4638,7 +4638,7 @@ function tr({
|
|
|
4638
4638
|
Re("compile"), B(!0), Fe(y.key);
|
|
4639
4639
|
};
|
|
4640
4640
|
if (!S)
|
|
4641
|
-
return /* @__PURE__ */ t(
|
|
4641
|
+
return /* @__PURE__ */ t(Qa, { embedded: a, children: /* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { children: /* @__PURE__ */ t(
|
|
4642
4642
|
Ue,
|
|
4643
4643
|
{
|
|
4644
4644
|
variant: "first-use",
|
|
@@ -4647,29 +4647,29 @@ function tr({
|
|
|
4647
4647
|
description: n("anamnesis.empty.noRecord.description")
|
|
4648
4648
|
}
|
|
4649
4649
|
) }) }) });
|
|
4650
|
-
const
|
|
4650
|
+
const W = (y) => {
|
|
4651
4651
|
w((b) => {
|
|
4652
4652
|
if (b.visits.length === 0) return b;
|
|
4653
4653
|
const I = b.visits.slice();
|
|
4654
4654
|
return I[I.length - 1] = y(I[I.length - 1]), { ...b, visits: I };
|
|
4655
4655
|
});
|
|
4656
|
-
}, be = (y, b) =>
|
|
4656
|
+
}, be = (y, b) => W((I) => _a(I, y, b)), Je = (y, b, I) => w((K) => ({
|
|
4657
4657
|
...K,
|
|
4658
4658
|
visits: K.visits.map(
|
|
4659
|
-
(Ze) => Ze.id === y.id ?
|
|
4659
|
+
(Ze) => Ze.id === y.id ? _a(Ze, b, I) : Ze
|
|
4660
4660
|
)
|
|
4661
4661
|
})), Gn = (y, b) => {
|
|
4662
|
-
w((I) =>
|
|
4663
|
-
}, Qt = (y) =>
|
|
4662
|
+
w((I) => dt(I, y.key, b)), s == null || s(y.key, b);
|
|
4663
|
+
}, Qt = (y) => W((b) => ({ ...b, pathologyCodes: y })), Ia = (y, b) => W((I) => ({
|
|
4664
4664
|
...I,
|
|
4665
4665
|
therapy: I.therapy.map((K) => K.id === y ? { ...K, ...b } : K)
|
|
4666
|
-
})), Yt = (y) =>
|
|
4666
|
+
})), Yt = (y) => W((b) => ({
|
|
4667
4667
|
...b,
|
|
4668
4668
|
therapy: b.therapy.filter((I) => I.id !== y)
|
|
4669
4669
|
})), Xt = () => {
|
|
4670
4670
|
R.current += 1;
|
|
4671
4671
|
const y = `new-${R.current}`;
|
|
4672
|
-
|
|
4672
|
+
W((b) => ({
|
|
4673
4673
|
...b,
|
|
4674
4674
|
therapy: [...b.therapy, { id: y, name: "", dose: "", kind: "medication" }]
|
|
4675
4675
|
}));
|
|
@@ -4714,11 +4714,11 @@ function tr({
|
|
|
4714
4714
|
});
|
|
4715
4715
|
}, ei = Hi(i).map(
|
|
4716
4716
|
(y) => {
|
|
4717
|
-
const b =
|
|
4717
|
+
const b = me[y], I = b == null ? void 0 : b.parentCode;
|
|
4718
4718
|
return {
|
|
4719
4719
|
value: y,
|
|
4720
4720
|
label: Se(y, n, b),
|
|
4721
|
-
group: I ?
|
|
4721
|
+
group: I ? ya(I, n, me[I]) : n("anamnesis.pathology.groupGeneral")
|
|
4722
4722
|
};
|
|
4723
4723
|
}
|
|
4724
4724
|
), Cn = S.oncological ?? {}, Tn = S.annualProgramme ?? {
|
|
@@ -4757,37 +4757,37 @@ function tr({
|
|
|
4757
4757
|
onTargetChange: Gn
|
|
4758
4758
|
}
|
|
4759
4759
|
),
|
|
4760
|
-
/* @__PURE__ */ t(
|
|
4761
|
-
|
|
4760
|
+
/* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: /* @__PURE__ */ d(
|
|
4761
|
+
Q,
|
|
4762
4762
|
{
|
|
4763
|
-
value:
|
|
4763
|
+
value: J,
|
|
4764
4764
|
onValueChange: (y) => Re(y),
|
|
4765
4765
|
children: [
|
|
4766
4766
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
4767
|
-
/* @__PURE__ */ d(
|
|
4768
|
-
/* @__PURE__ */ t(
|
|
4769
|
-
/* @__PURE__ */ t(
|
|
4770
|
-
/* @__PURE__ */ t(
|
|
4767
|
+
/* @__PURE__ */ d(Q.List, { "aria-label": n("anamnesis.compile.viewsLabel"), children: [
|
|
4768
|
+
/* @__PURE__ */ t(Q.Trigger, { value: "summary", children: n("anamnesis.compile.tabSummary") }),
|
|
4769
|
+
/* @__PURE__ */ t(Q.Trigger, { value: "compile", children: n("anamnesis.compile.tabCompile") }),
|
|
4770
|
+
/* @__PURE__ */ t(Q.Trigger, { value: "evolution", children: n("anamnesis.compile.tabEvolution") })
|
|
4771
4771
|
] }),
|
|
4772
4772
|
/* @__PURE__ */ t(
|
|
4773
4773
|
Oo,
|
|
4774
4774
|
{
|
|
4775
|
-
tab:
|
|
4775
|
+
tab: J,
|
|
4776
4776
|
record: C,
|
|
4777
4777
|
t: n,
|
|
4778
4778
|
config: i,
|
|
4779
|
-
shownVisitIds:
|
|
4779
|
+
shownVisitIds: ee,
|
|
4780
4780
|
defaultOpen: k,
|
|
4781
4781
|
defaultShareOpen: v,
|
|
4782
4782
|
defaultAudience: f
|
|
4783
4783
|
}
|
|
4784
4784
|
)
|
|
4785
4785
|
] }),
|
|
4786
|
-
/* @__PURE__ */ t(
|
|
4786
|
+
/* @__PURE__ */ t(Q.Content, { value: "summary", children: /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-md)]", children: /* @__PURE__ */ t(
|
|
4787
4787
|
ws,
|
|
4788
4788
|
{
|
|
4789
4789
|
intake: C.intake,
|
|
4790
|
-
sections:
|
|
4790
|
+
sections: Y,
|
|
4791
4791
|
sex: T.sex,
|
|
4792
4792
|
digest: Nn,
|
|
4793
4793
|
missing: mn,
|
|
@@ -4795,7 +4795,7 @@ function tr({
|
|
|
4795
4795
|
t: n
|
|
4796
4796
|
}
|
|
4797
4797
|
) }) }),
|
|
4798
|
-
/* @__PURE__ */ t(
|
|
4798
|
+
/* @__PURE__ */ t(Q.Content, { value: "compile", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
|
|
4799
4799
|
/* @__PURE__ */ d(ve, { titleKey: "anamnesis.section.visitMeta", t: n, children: [
|
|
4800
4800
|
/* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
4801
4801
|
/* @__PURE__ */ t(V, { label: n("anamnesis.field.visitType.label"), children: /* @__PURE__ */ t(
|
|
@@ -4812,7 +4812,7 @@ function tr({
|
|
|
4812
4812
|
}
|
|
4813
4813
|
],
|
|
4814
4814
|
value: S.visitType,
|
|
4815
|
-
onValueChange: (y) =>
|
|
4815
|
+
onValueChange: (y) => W((b) => ({
|
|
4816
4816
|
...b,
|
|
4817
4817
|
visitType: y || "followUp"
|
|
4818
4818
|
}))
|
|
@@ -4823,7 +4823,7 @@ function tr({
|
|
|
4823
4823
|
{
|
|
4824
4824
|
options: h,
|
|
4825
4825
|
value: S.practitioner ?? "",
|
|
4826
|
-
onValueChange: (y) =>
|
|
4826
|
+
onValueChange: (y) => W((b) => ({
|
|
4827
4827
|
...b,
|
|
4828
4828
|
practitioner: y || void 0
|
|
4829
4829
|
}))
|
|
@@ -4832,7 +4832,7 @@ function tr({
|
|
|
4832
4832
|
ie,
|
|
4833
4833
|
{
|
|
4834
4834
|
value: S.practitioner ?? "",
|
|
4835
|
-
onChange: (y) =>
|
|
4835
|
+
onChange: (y) => W((b) => ({
|
|
4836
4836
|
...b,
|
|
4837
4837
|
practitioner: y.target.value
|
|
4838
4838
|
}))
|
|
@@ -4841,8 +4841,8 @@ function tr({
|
|
|
4841
4841
|
/* @__PURE__ */ t(V, { label: n("anamnesis.header.visitDate"), children: /* @__PURE__ */ t(
|
|
4842
4842
|
oi,
|
|
4843
4843
|
{
|
|
4844
|
-
value:
|
|
4845
|
-
onChange: (y) => y &&
|
|
4844
|
+
value: mt(S.dateIso),
|
|
4845
|
+
onChange: (y) => y && W((b) => ({
|
|
4846
4846
|
...b,
|
|
4847
4847
|
dateIso: rs(y) + os(b.dateIso)
|
|
4848
4848
|
}))
|
|
@@ -4850,7 +4850,7 @@ function tr({
|
|
|
4850
4850
|
) })
|
|
4851
4851
|
] }),
|
|
4852
4852
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
4853
|
-
|
|
4853
|
+
ne,
|
|
4854
4854
|
{
|
|
4855
4855
|
intent: "outline",
|
|
4856
4856
|
size: "sm",
|
|
@@ -4877,7 +4877,7 @@ function tr({
|
|
|
4877
4877
|
{
|
|
4878
4878
|
ref: Le,
|
|
4879
4879
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]",
|
|
4880
|
-
children:
|
|
4880
|
+
children: ae.map((y) => {
|
|
4881
4881
|
const b = y.fields.filter((I) => un(I, T.sex)).filter((I) => O.has(I.key));
|
|
4882
4882
|
return b.length === 0 ? null : /* @__PURE__ */ d(
|
|
4883
4883
|
"div",
|
|
@@ -4946,7 +4946,7 @@ function tr({
|
|
|
4946
4946
|
label: n("anamnesis.compile.pathologiesLabel"),
|
|
4947
4947
|
description: n("anamnesis.compile.pathologiesHelp"),
|
|
4948
4948
|
children: /* @__PURE__ */ t(
|
|
4949
|
-
|
|
4949
|
+
ua,
|
|
4950
4950
|
{
|
|
4951
4951
|
options: ei,
|
|
4952
4952
|
value: S.pathologyCodes,
|
|
@@ -4972,7 +4972,7 @@ function tr({
|
|
|
4972
4972
|
ie,
|
|
4973
4973
|
{
|
|
4974
4974
|
value: Cn.tumourType ?? "",
|
|
4975
|
-
onChange: (y) =>
|
|
4975
|
+
onChange: (y) => W((b) => ({
|
|
4976
4976
|
...b,
|
|
4977
4977
|
oncological: {
|
|
4978
4978
|
...b.oncological,
|
|
@@ -4985,7 +4985,7 @@ function tr({
|
|
|
4985
4985
|
ie,
|
|
4986
4986
|
{
|
|
4987
4987
|
value: Cn.stage ?? "",
|
|
4988
|
-
onChange: (y) =>
|
|
4988
|
+
onChange: (y) => W((b) => ({
|
|
4989
4989
|
...b,
|
|
4990
4990
|
oncological: {
|
|
4991
4991
|
...b.oncological,
|
|
@@ -4999,8 +4999,8 @@ function tr({
|
|
|
4999
4999
|
{
|
|
5000
5000
|
label: n("anamnesis.field.metastases.label"),
|
|
5001
5001
|
variant: "horizontal",
|
|
5002
|
-
value: ((
|
|
5003
|
-
onValueChange: (y) =>
|
|
5002
|
+
value: ((Ra = Cn.metastases) == null ? void 0 : Ra.present) ?? "unknown",
|
|
5003
|
+
onValueChange: (y) => W((b) => {
|
|
5004
5004
|
var I, K;
|
|
5005
5005
|
return {
|
|
5006
5006
|
...b,
|
|
@@ -5034,7 +5034,7 @@ function tr({
|
|
|
5034
5034
|
ie,
|
|
5035
5035
|
{
|
|
5036
5036
|
value: Cn.treatmentStatus ?? "",
|
|
5037
|
-
onChange: (y) =>
|
|
5037
|
+
onChange: (y) => W((b) => ({
|
|
5038
5038
|
...b,
|
|
5039
5039
|
oncological: {
|
|
5040
5040
|
...b.oncological,
|
|
@@ -5062,7 +5062,7 @@ function tr({
|
|
|
5062
5062
|
ie,
|
|
5063
5063
|
{
|
|
5064
5064
|
value: y.name,
|
|
5065
|
-
onChange: (b) =>
|
|
5065
|
+
onChange: (b) => Ia(y.id, {
|
|
5066
5066
|
name: b.target.value
|
|
5067
5067
|
})
|
|
5068
5068
|
}
|
|
@@ -5073,13 +5073,13 @@ function tr({
|
|
|
5073
5073
|
ie,
|
|
5074
5074
|
{
|
|
5075
5075
|
value: y.dose ?? "",
|
|
5076
|
-
onChange: (b) =>
|
|
5076
|
+
onChange: (b) => Ia(y.id, {
|
|
5077
5077
|
dose: b.target.value
|
|
5078
5078
|
})
|
|
5079
5079
|
}
|
|
5080
5080
|
) }),
|
|
5081
5081
|
/* @__PURE__ */ t(
|
|
5082
|
-
|
|
5082
|
+
X,
|
|
5083
5083
|
{
|
|
5084
5084
|
variant: y.kind === "medication" ? "info" : "neutral",
|
|
5085
5085
|
size: "md",
|
|
@@ -5087,7 +5087,7 @@ function tr({
|
|
|
5087
5087
|
}
|
|
5088
5088
|
),
|
|
5089
5089
|
/* @__PURE__ */ t(
|
|
5090
|
-
|
|
5090
|
+
ce,
|
|
5091
5091
|
{
|
|
5092
5092
|
icon: /* @__PURE__ */ t(Ci, { "aria-hidden": "true" }),
|
|
5093
5093
|
intent: "ghost",
|
|
@@ -5102,7 +5102,7 @@ function tr({
|
|
|
5102
5102
|
y.id
|
|
5103
5103
|
)),
|
|
5104
5104
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
5105
|
-
|
|
5105
|
+
ne,
|
|
5106
5106
|
{
|
|
5107
5107
|
intent: "outline",
|
|
5108
5108
|
size: "sm",
|
|
@@ -5161,7 +5161,7 @@ function tr({
|
|
|
5161
5161
|
}
|
|
5162
5162
|
) }),
|
|
5163
5163
|
/* @__PURE__ */ t(
|
|
5164
|
-
|
|
5164
|
+
X,
|
|
5165
5165
|
{
|
|
5166
5166
|
variant: y.completed ? "success" : "warning",
|
|
5167
5167
|
size: "sm",
|
|
@@ -5186,7 +5186,7 @@ function tr({
|
|
|
5186
5186
|
value: S.nutritionalProposal ?? "",
|
|
5187
5187
|
autoResize: !0,
|
|
5188
5188
|
minRows: 2,
|
|
5189
|
-
onChange: (y) =>
|
|
5189
|
+
onChange: (y) => W((b) => ({
|
|
5190
5190
|
...b,
|
|
5191
5191
|
nutritionalProposal: y.target.value
|
|
5192
5192
|
}))
|
|
@@ -5200,7 +5200,7 @@ function tr({
|
|
|
5200
5200
|
value: S.clinicalNotes ?? "",
|
|
5201
5201
|
autoResize: !0,
|
|
5202
5202
|
minRows: 2,
|
|
5203
|
-
onChange: (y) =>
|
|
5203
|
+
onChange: (y) => W((b) => ({
|
|
5204
5204
|
...b,
|
|
5205
5205
|
clinicalNotes: y.target.value
|
|
5206
5206
|
}))
|
|
@@ -5222,7 +5222,7 @@ function tr({
|
|
|
5222
5222
|
label: n("anamnesis.field.annualProposed.label"),
|
|
5223
5223
|
variant: "horizontal",
|
|
5224
5224
|
value: Tn.proposed ? "yes" : "no",
|
|
5225
|
-
onValueChange: (y) =>
|
|
5225
|
+
onValueChange: (y) => W((b) => {
|
|
5226
5226
|
var I, K;
|
|
5227
5227
|
return {
|
|
5228
5228
|
...b,
|
|
@@ -5245,7 +5245,7 @@ function tr({
|
|
|
5245
5245
|
label: n("anamnesis.field.annualAccepted.label"),
|
|
5246
5246
|
variant: "horizontal",
|
|
5247
5247
|
value: Tn.accepted ? "yes" : "no",
|
|
5248
|
-
onValueChange: (y) =>
|
|
5248
|
+
onValueChange: (y) => W((b) => {
|
|
5249
5249
|
var I, K;
|
|
5250
5250
|
return {
|
|
5251
5251
|
...b,
|
|
@@ -5272,7 +5272,7 @@ function tr({
|
|
|
5272
5272
|
value: Tn.declineReason ?? "",
|
|
5273
5273
|
autoResize: !0,
|
|
5274
5274
|
minRows: 2,
|
|
5275
|
-
onChange: (y) =>
|
|
5275
|
+
onChange: (y) => W((b) => {
|
|
5276
5276
|
var I, K;
|
|
5277
5277
|
return {
|
|
5278
5278
|
...b,
|
|
@@ -5291,8 +5291,8 @@ function tr({
|
|
|
5291
5291
|
}
|
|
5292
5292
|
)
|
|
5293
5293
|
] }) }),
|
|
5294
|
-
/* @__PURE__ */ t(
|
|
5295
|
-
|
|
5294
|
+
/* @__PURE__ */ t(Q.Content, { value: "evolution", children: /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-md)]", children: /* @__PURE__ */ t(ve, { titleKey: "anamnesis.section.evolution", t: n, children: /* @__PURE__ */ t(
|
|
5295
|
+
Na,
|
|
5296
5296
|
{
|
|
5297
5297
|
record: C,
|
|
5298
5298
|
t: n,
|
|
@@ -5300,7 +5300,7 @@ function tr({
|
|
|
5300
5300
|
config: i,
|
|
5301
5301
|
framed: !1,
|
|
5302
5302
|
onCellChange: Je,
|
|
5303
|
-
onVisitSelectionChange:
|
|
5303
|
+
onVisitSelectionChange: de,
|
|
5304
5304
|
onOpenNote: l
|
|
5305
5305
|
}
|
|
5306
5306
|
) }) }) })
|
|
@@ -5308,15 +5308,15 @@ function tr({
|
|
|
5308
5308
|
}
|
|
5309
5309
|
) }) })
|
|
5310
5310
|
] });
|
|
5311
|
-
return /* @__PURE__ */ t(
|
|
5311
|
+
return /* @__PURE__ */ t(Qa, { embedded: a, children: ni });
|
|
5312
5312
|
}
|
|
5313
|
-
function
|
|
5313
|
+
function Qa({
|
|
5314
5314
|
embedded: e,
|
|
5315
5315
|
children: n
|
|
5316
5316
|
}) {
|
|
5317
5317
|
return e ? /* @__PURE__ */ t("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-lg)]", children: n }) : /* @__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: n }) });
|
|
5318
5318
|
}
|
|
5319
|
-
function
|
|
5319
|
+
function Ya(e) {
|
|
5320
5320
|
var i;
|
|
5321
5321
|
const n = {}, a = ((i = e.intake) == null ? void 0 : i.answers) ?? {};
|
|
5322
5322
|
for (const [s, o] of Object.entries(a))
|
|
@@ -5333,38 +5333,33 @@ function Kt({
|
|
|
5333
5333
|
jumpToField: r,
|
|
5334
5334
|
readOnly: l = !1
|
|
5335
5335
|
}) {
|
|
5336
|
-
const { patient: c } = e, u = qn(e), [h, g] = z(() =>
|
|
5336
|
+
const { patient: c } = e, u = qn(e), [h, g] = z(() => Ya(e)), [p, k] = z(
|
|
5337
5337
|
() => {
|
|
5338
5338
|
var M;
|
|
5339
5339
|
return ((M = e.intake) == null ? void 0 : M.submittedAtIso) != null;
|
|
5340
5340
|
}
|
|
5341
5341
|
), v = (M, U) => {
|
|
5342
|
-
g((
|
|
5342
|
+
g((Y) => ({ ...Y, [M]: U }));
|
|
5343
5343
|
}, f = q(
|
|
5344
|
-
() =>
|
|
5344
|
+
() => ga(i).map((M) => ({
|
|
5345
5345
|
...M,
|
|
5346
5346
|
fields: M.fields.filter((U) => un(U, c.sex))
|
|
5347
5347
|
})).filter((M) => M.fields.length > 0),
|
|
5348
5348
|
[i, c.sex]
|
|
5349
|
-
), C = (
|
|
5350
|
-
var
|
|
5351
|
-
const
|
|
5352
|
-
|
|
5353
|
-
for (const se of f)
|
|
5354
|
-
se.fields.some(
|
|
5355
|
-
(X) => Ra(X, M[X.key])
|
|
5356
|
-
) && U.add(se.key);
|
|
5357
|
-
return [...U];
|
|
5349
|
+
), C = () => {
|
|
5350
|
+
var U;
|
|
5351
|
+
const M = s ?? ((U = f[0]) == null ? void 0 : U.key);
|
|
5352
|
+
return M ? [M] : [];
|
|
5358
5353
|
}, [w, A] = z(
|
|
5359
|
-
() => C(
|
|
5354
|
+
() => C()
|
|
5360
5355
|
), R = (M) => A((U) => U.includes(M) ? U : [...U, M]), [T, L] = z(e.intake);
|
|
5361
5356
|
if (e.intake !== T) {
|
|
5362
5357
|
L(e.intake);
|
|
5363
|
-
const M =
|
|
5364
|
-
g(M), A(C(
|
|
5358
|
+
const M = Ya(e);
|
|
5359
|
+
g(M), A(C());
|
|
5365
5360
|
}
|
|
5366
|
-
const { containerRef: S, requestJump: m } =
|
|
5367
|
-
() =>
|
|
5361
|
+
const { containerRef: S, requestJump: m } = ft(), N = q(
|
|
5362
|
+
() => gt(
|
|
5368
5363
|
f,
|
|
5369
5364
|
(M) => h[M],
|
|
5370
5365
|
c.sex,
|
|
@@ -5377,15 +5372,15 @@ function Kt({
|
|
|
5377
5372
|
on(() => {
|
|
5378
5373
|
if (!r) return;
|
|
5379
5374
|
const M = f.find(
|
|
5380
|
-
(U) => U.fields.some((
|
|
5375
|
+
(U) => U.fields.some((Y) => Y.key === r)
|
|
5381
5376
|
);
|
|
5382
5377
|
M && (R(M.key), m(r));
|
|
5383
5378
|
}, [r]);
|
|
5384
5379
|
const { answeredCount: P, totalCount: $ } = q(() => {
|
|
5385
5380
|
let M = 0, U = 0;
|
|
5386
|
-
for (const
|
|
5387
|
-
for (const
|
|
5388
|
-
U += 1, Xe(h[
|
|
5381
|
+
for (const Y of f)
|
|
5382
|
+
for (const ae of Y.fields)
|
|
5383
|
+
U += 1, Xe(h[ae.key]) && (M += 1);
|
|
5389
5384
|
return { answeredCount: M, totalCount: U };
|
|
5390
5385
|
}, [f, h]), F = $ === 0 ? 0 : Math.round(P / $ * 100), E = n("anamnesis.intake.answered", {
|
|
5391
5386
|
answered: P,
|
|
@@ -5445,7 +5440,7 @@ function Kt({
|
|
|
5445
5440
|
)
|
|
5446
5441
|
] }),
|
|
5447
5442
|
H ? /* @__PURE__ */ t(
|
|
5448
|
-
|
|
5443
|
+
vt,
|
|
5449
5444
|
{
|
|
5450
5445
|
missing: N,
|
|
5451
5446
|
t: n,
|
|
@@ -5453,7 +5448,7 @@ function Kt({
|
|
|
5453
5448
|
announce: "off"
|
|
5454
5449
|
}
|
|
5455
5450
|
) : null,
|
|
5456
|
-
/* @__PURE__ */ t(
|
|
5451
|
+
/* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { ref: S, children: /* @__PURE__ */ d(
|
|
5457
5452
|
"section",
|
|
5458
5453
|
{
|
|
5459
5454
|
"aria-label": n("anamnesis.intake.sectionsLabel"),
|
|
@@ -5477,7 +5472,7 @@ function Kt({
|
|
|
5477
5472
|
onValueChange: A,
|
|
5478
5473
|
children: f.map((M) => {
|
|
5479
5474
|
const U = M.fields.filter(
|
|
5480
|
-
(
|
|
5475
|
+
(Y) => Xe(h[Y.key])
|
|
5481
5476
|
).length;
|
|
5482
5477
|
return /* @__PURE__ */ d(Si, { value: M.key, children: [
|
|
5483
5478
|
/* @__PURE__ */ t(Ai, { children: /* @__PURE__ */ d("span", { className: "ds:flex ds:w-full ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
@@ -5487,16 +5482,16 @@ function Kt({
|
|
|
5487
5482
|
total: M.fields.length
|
|
5488
5483
|
}) })
|
|
5489
5484
|
] }) }),
|
|
5490
|
-
/* @__PURE__ */ t(Ei, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: M.fields.map((
|
|
5485
|
+
/* @__PURE__ */ t(Ei, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: M.fields.map((Y) => /* @__PURE__ */ t(
|
|
5491
5486
|
qt,
|
|
5492
5487
|
{
|
|
5493
5488
|
readOnly: l,
|
|
5494
|
-
def:
|
|
5495
|
-
answer: h[
|
|
5496
|
-
onChange: (
|
|
5489
|
+
def: Y,
|
|
5490
|
+
answer: h[Y.key],
|
|
5491
|
+
onChange: (ae) => v(Y.key, ae),
|
|
5497
5492
|
t: n
|
|
5498
5493
|
},
|
|
5499
|
-
|
|
5494
|
+
Y.key
|
|
5500
5495
|
)) }) })
|
|
5501
5496
|
] }, M.key);
|
|
5502
5497
|
})
|
|
@@ -5515,7 +5510,7 @@ function Kt({
|
|
|
5515
5510
|
}
|
|
5516
5511
|
),
|
|
5517
5512
|
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
|
|
5518
|
-
|
|
5513
|
+
ne,
|
|
5519
5514
|
{
|
|
5520
5515
|
intent: "primary",
|
|
5521
5516
|
startIcon: /* @__PURE__ */ t(_i, { "aria-hidden": "true" }),
|
|
@@ -5540,7 +5535,7 @@ function xe({
|
|
|
5540
5535
|
a
|
|
5541
5536
|
] });
|
|
5542
5537
|
}
|
|
5543
|
-
function
|
|
5538
|
+
function Jn({
|
|
5544
5539
|
defs: e,
|
|
5545
5540
|
visit: n,
|
|
5546
5541
|
previous: a,
|
|
@@ -5557,7 +5552,7 @@ function Zn({
|
|
|
5557
5552
|
] }),
|
|
5558
5553
|
/* @__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: [
|
|
5559
5554
|
/* @__PURE__ */ t("span", { className: "ds:text-[color:var(--foreground)]", children: Ee(l, r.precision, o) }),
|
|
5560
|
-
h ? /* @__PURE__ */ t(
|
|
5555
|
+
h ? /* @__PURE__ */ t(ba, { flag: h, t: s }) : null,
|
|
5561
5556
|
/* @__PURE__ */ t(Un, { delta: u, def: r, t: s }),
|
|
5562
5557
|
g != null ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.grid.target", {
|
|
5563
5558
|
value: Ee(g, r.precision, o),
|
|
@@ -5578,7 +5573,7 @@ function ir({
|
|
|
5578
5573
|
e.targets.map((A) => [A.parameterKey, A.target])
|
|
5579
5574
|
), h = _e(i, "anthropometric"), g = _e(i, "dietary"), p = _e(i, "lab"), k = Ge(i), v = zn(i);
|
|
5580
5575
|
if (!l)
|
|
5581
|
-
return /* @__PURE__ */ t(
|
|
5576
|
+
return /* @__PURE__ */ t(Xa, { embedded: a, children: /* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { children: /* @__PURE__ */ t(
|
|
5582
5577
|
Ue,
|
|
5583
5578
|
{
|
|
5584
5579
|
variant: "first-use",
|
|
@@ -5596,7 +5591,7 @@ function ir({
|
|
|
5596
5591
|
] }),
|
|
5597
5592
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.readOnly.subtitle") })
|
|
5598
5593
|
] }),
|
|
5599
|
-
/* @__PURE__ */ t(
|
|
5594
|
+
/* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ d(ue.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
|
|
5600
5595
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.readOnly.summary", t: n, children: /* @__PURE__ */ d(
|
|
5601
5596
|
_,
|
|
5602
5597
|
{
|
|
@@ -5636,7 +5631,7 @@ function ir({
|
|
|
5636
5631
|
}
|
|
5637
5632
|
) }),
|
|
5638
5633
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.anthropometrics", t: n, children: /* @__PURE__ */ t(
|
|
5639
|
-
|
|
5634
|
+
Jn,
|
|
5640
5635
|
{
|
|
5641
5636
|
defs: h,
|
|
5642
5637
|
visit: l,
|
|
@@ -5646,7 +5641,7 @@ function ir({
|
|
|
5646
5641
|
}
|
|
5647
5642
|
) }),
|
|
5648
5643
|
g.length > 0 ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.dietary", t: n, children: /* @__PURE__ */ t(
|
|
5649
|
-
|
|
5644
|
+
Jn,
|
|
5650
5645
|
{
|
|
5651
5646
|
defs: g,
|
|
5652
5647
|
visit: l,
|
|
@@ -5655,7 +5650,7 @@ function ir({
|
|
|
5655
5650
|
t: n
|
|
5656
5651
|
}
|
|
5657
5652
|
) }) : null,
|
|
5658
|
-
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.pathologies", t: n, children: l.pathologyCodes.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: l.pathologyCodes.map((A) => /* @__PURE__ */ t(
|
|
5653
|
+
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.pathologies", t: n, children: l.pathologyCodes.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: l.pathologyCodes.map((A) => /* @__PURE__ */ t(X, { variant: "neutral", size: "md", children: Se(A, n, v[A]) }, A)) }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.readOnly.none") }) }),
|
|
5659
5654
|
f ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.oncological", t: n, children: /* @__PURE__ */ d(
|
|
5660
5655
|
_,
|
|
5661
5656
|
{
|
|
@@ -5686,7 +5681,7 @@ function ir({
|
|
|
5686
5681
|
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: A.name }),
|
|
5687
5682
|
A.dose ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: A.dose }) : null,
|
|
5688
5683
|
/* @__PURE__ */ t(
|
|
5689
|
-
|
|
5684
|
+
X,
|
|
5690
5685
|
{
|
|
5691
5686
|
variant: A.kind === "medication" ? "info" : "neutral",
|
|
5692
5687
|
size: "sm",
|
|
@@ -5698,7 +5693,7 @@ function ir({
|
|
|
5698
5693
|
A.id
|
|
5699
5694
|
)) }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.readOnly.none") }) }),
|
|
5700
5695
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.labs", t: n, children: /* @__PURE__ */ t(
|
|
5701
|
-
|
|
5696
|
+
Jn,
|
|
5702
5697
|
{
|
|
5703
5698
|
defs: p,
|
|
5704
5699
|
visit: l,
|
|
@@ -5719,7 +5714,7 @@ function ir({
|
|
|
5719
5714
|
] }) : null,
|
|
5720
5715
|
C ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.annual", t: n, children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: [
|
|
5721
5716
|
/* @__PURE__ */ d(
|
|
5722
|
-
|
|
5717
|
+
X,
|
|
5723
5718
|
{
|
|
5724
5719
|
variant: C.proposed ? "success" : "neutral",
|
|
5725
5720
|
size: "md",
|
|
@@ -5733,7 +5728,7 @@ function ir({
|
|
|
5733
5728
|
}
|
|
5734
5729
|
),
|
|
5735
5730
|
/* @__PURE__ */ d(
|
|
5736
|
-
|
|
5731
|
+
X,
|
|
5737
5732
|
{
|
|
5738
5733
|
variant: C.accepted ? "success" : "neutral",
|
|
5739
5734
|
size: "md",
|
|
@@ -5748,7 +5743,7 @@ function ir({
|
|
|
5748
5743
|
)
|
|
5749
5744
|
] }) }) : null,
|
|
5750
5745
|
e.intake && Object.keys(e.intake.answers).length > 0 ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.patientIntake", t: n, children: /* @__PURE__ */ t(
|
|
5751
|
-
|
|
5746
|
+
kt,
|
|
5752
5747
|
{
|
|
5753
5748
|
intake: e.intake,
|
|
5754
5749
|
sections: k,
|
|
@@ -5757,7 +5752,7 @@ function ir({
|
|
|
5757
5752
|
}
|
|
5758
5753
|
) }) : null,
|
|
5759
5754
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.evolution", t: n, children: /* @__PURE__ */ t(
|
|
5760
|
-
|
|
5755
|
+
Na,
|
|
5761
5756
|
{
|
|
5762
5757
|
record: e,
|
|
5763
5758
|
t: n,
|
|
@@ -5768,9 +5763,9 @@ function ir({
|
|
|
5768
5763
|
) })
|
|
5769
5764
|
] }) })
|
|
5770
5765
|
] });
|
|
5771
|
-
return /* @__PURE__ */ t(
|
|
5766
|
+
return /* @__PURE__ */ t(Xa, { embedded: a, children: w });
|
|
5772
5767
|
}
|
|
5773
|
-
function
|
|
5768
|
+
function Xa({
|
|
5774
5769
|
embedded: e,
|
|
5775
5770
|
children: n
|
|
5776
5771
|
}) {
|
|
@@ -5785,7 +5780,7 @@ function hn({
|
|
|
5785
5780
|
primaryAction: s,
|
|
5786
5781
|
secondaryAction: o
|
|
5787
5782
|
}) {
|
|
5788
|
-
return /* @__PURE__ */ t(
|
|
5783
|
+
return /* @__PURE__ */ t(ue, { variant: "elevated", "data-testid": n, children: /* @__PURE__ */ t(ue.Body, { children: /* @__PURE__ */ t(
|
|
5789
5784
|
Ue,
|
|
5790
5785
|
{
|
|
5791
5786
|
variant: e,
|
|
@@ -5831,7 +5826,7 @@ function Ht({
|
|
|
5831
5826
|
() => _e(a),
|
|
5832
5827
|
[a]
|
|
5833
5828
|
), $ = (F, E) => {
|
|
5834
|
-
L((H) =>
|
|
5829
|
+
L((H) => dt(H, F.key, E)), r == null || r(F.key, E);
|
|
5835
5830
|
};
|
|
5836
5831
|
return (
|
|
5837
5832
|
// The goals strip and the tabs are two objects, not one run-on block: an
|
|
@@ -5848,17 +5843,17 @@ function Ht({
|
|
|
5848
5843
|
onTargetChange: $
|
|
5849
5844
|
}
|
|
5850
5845
|
),
|
|
5851
|
-
/* @__PURE__ */ d(
|
|
5846
|
+
/* @__PURE__ */ d(Q, { value: A, onValueChange: R, children: [
|
|
5852
5847
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
5853
|
-
/* @__PURE__ */ d(
|
|
5854
|
-
c.map((F) => /* @__PURE__ */ t(
|
|
5855
|
-
/* @__PURE__ */ t(
|
|
5856
|
-
/* @__PURE__ */ t(
|
|
5848
|
+
/* @__PURE__ */ d(Q.List, { "aria-label": n("anamnesis.compile.viewsLabel"), children: [
|
|
5849
|
+
c.map((F) => /* @__PURE__ */ t(Q.Trigger, { value: F.value, children: F.label }, F.value)),
|
|
5850
|
+
/* @__PURE__ */ t(Q.Trigger, { value: "questionnaire", children: n("anamnesis.compile.tabCompile") }),
|
|
5851
|
+
/* @__PURE__ */ t(Q.Trigger, { value: "trend", children: n("anamnesis.compile.tabEvolution") })
|
|
5857
5852
|
] }),
|
|
5858
5853
|
o ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: o }) : null
|
|
5859
5854
|
] }),
|
|
5860
5855
|
c.map((F) => /* @__PURE__ */ t(
|
|
5861
|
-
|
|
5856
|
+
Q.Content,
|
|
5862
5857
|
{
|
|
5863
5858
|
value: F.value,
|
|
5864
5859
|
forceMount: !0,
|
|
@@ -5868,7 +5863,7 @@ function Ht({
|
|
|
5868
5863
|
F.value
|
|
5869
5864
|
)),
|
|
5870
5865
|
/* @__PURE__ */ t(
|
|
5871
|
-
|
|
5866
|
+
Q.Content,
|
|
5872
5867
|
{
|
|
5873
5868
|
value: "questionnaire",
|
|
5874
5869
|
forceMount: !0,
|
|
@@ -5891,7 +5886,7 @@ function Ht({
|
|
|
5891
5886
|
}
|
|
5892
5887
|
),
|
|
5893
5888
|
/* @__PURE__ */ t(
|
|
5894
|
-
|
|
5889
|
+
Q.Content,
|
|
5895
5890
|
{
|
|
5896
5891
|
value: "trend",
|
|
5897
5892
|
forceMount: p ? !0 : void 0,
|
|
@@ -5920,8 +5915,8 @@ function Ht({
|
|
|
5920
5915
|
typed into the grid — one place to answer a question. The
|
|
5921
5916
|
same elevated card as the questionnaire's sections, so the
|
|
5922
5917
|
grid is not the one surface sitting bare on the page. */
|
|
5923
|
-
/* @__PURE__ */ t(
|
|
5924
|
-
|
|
5918
|
+
/* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { children: /* @__PURE__ */ t(
|
|
5919
|
+
Na,
|
|
5925
5920
|
{
|
|
5926
5921
|
record: T,
|
|
5927
5922
|
t: n,
|
|
@@ -6049,7 +6044,7 @@ function El({
|
|
|
6049
6044
|
}
|
|
6050
6045
|
);
|
|
6051
6046
|
}
|
|
6052
|
-
const or =
|
|
6047
|
+
const or = et("", {
|
|
6053
6048
|
variants: {
|
|
6054
6049
|
dragging: {
|
|
6055
6050
|
true: "ds:opacity-60",
|
|
@@ -6062,7 +6057,7 @@ const or = nt("", {
|
|
|
6062
6057
|
},
|
|
6063
6058
|
defaultVariants: { dragging: !1, dropTarget: !1 }
|
|
6064
6059
|
}), Gt = si(null);
|
|
6065
|
-
function
|
|
6060
|
+
function Zn({
|
|
6066
6061
|
count: e,
|
|
6067
6062
|
onReorder: n,
|
|
6068
6063
|
t: a,
|
|
@@ -6079,7 +6074,7 @@ function ea({
|
|
|
6079
6074
|
/* @__PURE__ */ t("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: r })
|
|
6080
6075
|
] });
|
|
6081
6076
|
}
|
|
6082
|
-
function
|
|
6077
|
+
function ea({
|
|
6083
6078
|
index: e,
|
|
6084
6079
|
label: n,
|
|
6085
6080
|
children: a
|
|
@@ -6122,7 +6117,7 @@ function na({
|
|
|
6122
6117
|
dropTarget: s && !u
|
|
6123
6118
|
})
|
|
6124
6119
|
}, g = /* @__PURE__ */ t(
|
|
6125
|
-
|
|
6120
|
+
ce,
|
|
6126
6121
|
{
|
|
6127
6122
|
size: "sm",
|
|
6128
6123
|
intent: "ghost",
|
|
@@ -6149,7 +6144,7 @@ function Dl() {
|
|
|
6149
6144
|
}))
|
|
6150
6145
|
};
|
|
6151
6146
|
}
|
|
6152
|
-
function
|
|
6147
|
+
function na(e, n) {
|
|
6153
6148
|
const a = e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-zA-Z0-9]+/g, " ").trim().split(/\s+/).filter(Boolean), i = a.length === 0 ? "entry" : a.map(
|
|
6154
6149
|
(r, l) => l === 0 ? r.toLowerCase() : r[0].toUpperCase() + r.slice(1).toLowerCase()
|
|
6155
6150
|
).join("");
|
|
@@ -6158,7 +6153,7 @@ function aa(e, n) {
|
|
|
6158
6153
|
s = `${i}${o}`, o += 1;
|
|
6159
6154
|
return s;
|
|
6160
6155
|
}
|
|
6161
|
-
function
|
|
6156
|
+
function aa(e, n, a) {
|
|
6162
6157
|
if (n === a || n < 0 || n >= e.length || a < 0 || a >= e.length) return null;
|
|
6163
6158
|
const i = [...e], [s] = i.splice(n, 1);
|
|
6164
6159
|
return i.splice(a, 0, s), i;
|
|
@@ -6183,7 +6178,7 @@ function jt(e, n) {
|
|
|
6183
6178
|
const a = e.type === "number" ? e.decimal ? "numberDecimal" : "numberInteger" : e.type === "choice" && e.detail ? "choiceWithText" : e.type;
|
|
6184
6179
|
return n(`anamnesis.configEditor.type.${a}`);
|
|
6185
6180
|
}
|
|
6186
|
-
const cr = ["down", "up", "toRange"],
|
|
6181
|
+
const cr = ["down", "up", "toRange"], la = ["anthropometric", "dietary", "lab"];
|
|
6187
6182
|
function Il({
|
|
6188
6183
|
config: e,
|
|
6189
6184
|
onConfigChange: n,
|
|
@@ -6201,14 +6196,14 @@ function Il({
|
|
|
6201
6196
|
)
|
|
6202
6197
|
} : P
|
|
6203
6198
|
), g = (m) => n({ ...e, pathologies: e.pathologies.map(m) }), p = (m, N, x) => {
|
|
6204
|
-
const P = _e(e, m), $ =
|
|
6199
|
+
const P = _e(e, m), $ = aa(P, N, x);
|
|
6205
6200
|
if (!$) return;
|
|
6206
6201
|
const F = new Map($.map((E, H) => [E.key, H]));
|
|
6207
6202
|
c(
|
|
6208
6203
|
(E) => F.has(E.key) ? { ...E, order: F.get(E.key) } : E
|
|
6209
6204
|
);
|
|
6210
6205
|
}, k = (m, N) => {
|
|
6211
|
-
const x =
|
|
6206
|
+
const x = aa(Ge(e), m, N);
|
|
6212
6207
|
if (!x) return;
|
|
6213
6208
|
const P = new Map(
|
|
6214
6209
|
x.map(($, F) => [$.key, F])
|
|
@@ -6217,7 +6212,7 @@ function Il({
|
|
|
6217
6212
|
($) => P.has($.key) ? { ...$, order: P.get($.key) } : $
|
|
6218
6213
|
);
|
|
6219
6214
|
}, v = (m, N, x) => {
|
|
6220
|
-
const P =
|
|
6215
|
+
const P = aa(m.fields, N, x);
|
|
6221
6216
|
if (!P) return;
|
|
6222
6217
|
const $ = new Map(
|
|
6223
6218
|
P.map((F, E) => [F.key, E])
|
|
@@ -6241,13 +6236,13 @@ function Il({
|
|
|
6241
6236
|
})) : g(
|
|
6242
6237
|
(x) => x.code === m.entry.code ? { ...x, enabled: N } : x
|
|
6243
6238
|
);
|
|
6244
|
-
}, C = Ne(e).length, w = _e(e).length, A =
|
|
6239
|
+
}, C = Ne(e).length, w = _e(e).length, A = ga(e).reduce(
|
|
6245
6240
|
(m, N) => m + N.fields.length,
|
|
6246
6241
|
0
|
|
6247
6242
|
), R = Ge(e).reduce(
|
|
6248
6243
|
(m, N) => m + N.fields.length,
|
|
6249
6244
|
0
|
|
6250
|
-
), T =
|
|
6245
|
+
), T = rt(e).length, L = sa(e).length, S = Ne(e).filter(
|
|
6251
6246
|
(m) => m.goal === !0
|
|
6252
6247
|
).length;
|
|
6253
6248
|
return /* @__PURE__ */ d(
|
|
@@ -6261,14 +6256,14 @@ function Il({
|
|
|
6261
6256
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: a("anamnesis.configEditor.title") }),
|
|
6262
6257
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.configEditor.intro") })
|
|
6263
6258
|
] }),
|
|
6264
|
-
/* @__PURE__ */ t(
|
|
6265
|
-
/* @__PURE__ */ d(
|
|
6266
|
-
/* @__PURE__ */ t(
|
|
6267
|
-
/* @__PURE__ */ t(
|
|
6268
|
-
/* @__PURE__ */ t(
|
|
6269
|
-
/* @__PURE__ */ t(
|
|
6259
|
+
/* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: /* @__PURE__ */ d(Q, { defaultValue: "questionnaire", children: [
|
|
6260
|
+
/* @__PURE__ */ d(Q.List, { "aria-label": a("anamnesis.configEditor.tabsLabel"), children: [
|
|
6261
|
+
/* @__PURE__ */ t(Q.Trigger, { value: "questionnaire", children: a("anamnesis.configEditor.tabQuestionnaire") }),
|
|
6262
|
+
/* @__PURE__ */ t(Q.Trigger, { value: "parameters", children: a("anamnesis.configEditor.tabParameters") }),
|
|
6263
|
+
/* @__PURE__ */ t(Q.Trigger, { value: "pathologies", children: a("anamnesis.configEditor.tabPathologies") }),
|
|
6264
|
+
/* @__PURE__ */ t(Q.Trigger, { value: "targets", children: a("anamnesis.configEditor.tabTargets") })
|
|
6270
6265
|
] }),
|
|
6271
|
-
/* @__PURE__ */ t(
|
|
6266
|
+
/* @__PURE__ */ t(Q.Content, { value: "questionnaire", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
|
|
6272
6267
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${a("anamnesis.configEditor.panelLive", {
|
|
6273
6268
|
count: A
|
|
6274
6269
|
})} · ${a("anamnesis.configEditor.panelNotCaptured", {
|
|
@@ -6277,7 +6272,7 @@ function Il({
|
|
|
6277
6272
|
count: R - A
|
|
6278
6273
|
})}` }),
|
|
6279
6274
|
/* @__PURE__ */ t(
|
|
6280
|
-
|
|
6275
|
+
Zn,
|
|
6281
6276
|
{
|
|
6282
6277
|
count: Ge(e).length,
|
|
6283
6278
|
onReorder: k,
|
|
@@ -6288,7 +6283,7 @@ function Il({
|
|
|
6288
6283
|
($) => $.enabled !== !1
|
|
6289
6284
|
).length;
|
|
6290
6285
|
return /* @__PURE__ */ t(
|
|
6291
|
-
|
|
6286
|
+
ea,
|
|
6292
6287
|
{
|
|
6293
6288
|
index: N,
|
|
6294
6289
|
label: fe(m, a),
|
|
@@ -6307,7 +6302,7 @@ function Il({
|
|
|
6307
6302
|
children: [
|
|
6308
6303
|
/* @__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: [
|
|
6309
6304
|
fe(m, a),
|
|
6310
|
-
x ? /* @__PURE__ */ t(
|
|
6305
|
+
x ? /* @__PURE__ */ t(X, { size: "sm", variant: "neutral", children: a("anamnesis.configEditor.archived") }) : null
|
|
6311
6306
|
] }),
|
|
6312
6307
|
/* @__PURE__ */ d(
|
|
6313
6308
|
Sn,
|
|
@@ -6321,7 +6316,7 @@ function Il({
|
|
|
6321
6316
|
children: [
|
|
6322
6317
|
F,
|
|
6323
6318
|
/* @__PURE__ */ t(
|
|
6324
|
-
|
|
6319
|
+
ce,
|
|
6325
6320
|
{
|
|
6326
6321
|
size: "sm",
|
|
6327
6322
|
intent: "ghost",
|
|
@@ -6339,7 +6334,7 @@ function Il({
|
|
|
6339
6334
|
}
|
|
6340
6335
|
),
|
|
6341
6336
|
x ? /* @__PURE__ */ t(
|
|
6342
|
-
|
|
6337
|
+
ce,
|
|
6343
6338
|
{
|
|
6344
6339
|
size: "sm",
|
|
6345
6340
|
intent: "ghost",
|
|
@@ -6354,7 +6349,7 @@ function Il({
|
|
|
6354
6349
|
)
|
|
6355
6350
|
}
|
|
6356
6351
|
) : /* @__PURE__ */ t(
|
|
6357
|
-
|
|
6352
|
+
ce,
|
|
6358
6353
|
{
|
|
6359
6354
|
size: "sm",
|
|
6360
6355
|
intent: "ghost",
|
|
@@ -6379,13 +6374,13 @@ function Il({
|
|
|
6379
6374
|
"anamnesis.configEditor.sectionEmptyCapture"
|
|
6380
6375
|
) }) : null,
|
|
6381
6376
|
m.fields.length > 0 ? /* @__PURE__ */ t(
|
|
6382
|
-
|
|
6377
|
+
Zn,
|
|
6383
6378
|
{
|
|
6384
6379
|
count: m.fields.length,
|
|
6385
6380
|
onReorder: (E, H) => v(m, E, H),
|
|
6386
6381
|
t: a,
|
|
6387
6382
|
children: /* @__PURE__ */ t(en, { divider: "divided", children: m.fields.map((E, H) => /* @__PURE__ */ t(
|
|
6388
|
-
|
|
6383
|
+
ea,
|
|
6389
6384
|
{
|
|
6390
6385
|
index: H,
|
|
6391
6386
|
label: ge(E, a),
|
|
@@ -6396,7 +6391,7 @@ function Il({
|
|
|
6396
6391
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6397
6392
|
ge(E, a),
|
|
6398
6393
|
E.required === !0 ? /* @__PURE__ */ t(
|
|
6399
|
-
|
|
6394
|
+
X,
|
|
6400
6395
|
{
|
|
6401
6396
|
size: "sm",
|
|
6402
6397
|
variant: "info",
|
|
@@ -6406,7 +6401,7 @@ function Il({
|
|
|
6406
6401
|
}
|
|
6407
6402
|
) : null,
|
|
6408
6403
|
E.enabled === !1 ? /* @__PURE__ */ t(
|
|
6409
|
-
|
|
6404
|
+
X,
|
|
6410
6405
|
{
|
|
6411
6406
|
size: "sm",
|
|
6412
6407
|
variant: "neutral",
|
|
@@ -6418,7 +6413,7 @@ function Il({
|
|
|
6418
6413
|
] }),
|
|
6419
6414
|
description: [
|
|
6420
6415
|
jt(E, a),
|
|
6421
|
-
|
|
6416
|
+
ht(E, a)
|
|
6422
6417
|
].filter(Boolean).join(" · "),
|
|
6423
6418
|
trailing: /* @__PURE__ */ d(
|
|
6424
6419
|
Sn,
|
|
@@ -6435,7 +6430,7 @@ function Il({
|
|
|
6435
6430
|
children: [
|
|
6436
6431
|
M,
|
|
6437
6432
|
/* @__PURE__ */ t(
|
|
6438
|
-
|
|
6433
|
+
ce,
|
|
6439
6434
|
{
|
|
6440
6435
|
size: "sm",
|
|
6441
6436
|
intent: "ghost",
|
|
@@ -6457,7 +6452,7 @@ function Il({
|
|
|
6457
6452
|
}
|
|
6458
6453
|
),
|
|
6459
6454
|
E.enabled === !1 ? /* @__PURE__ */ t(
|
|
6460
|
-
|
|
6455
|
+
ce,
|
|
6461
6456
|
{
|
|
6462
6457
|
size: "sm",
|
|
6463
6458
|
intent: "ghost",
|
|
@@ -6481,7 +6476,7 @@ function Il({
|
|
|
6481
6476
|
)
|
|
6482
6477
|
}
|
|
6483
6478
|
) : /* @__PURE__ */ t(
|
|
6484
|
-
|
|
6479
|
+
ce,
|
|
6485
6480
|
{
|
|
6486
6481
|
size: "sm",
|
|
6487
6482
|
intent: "ghost",
|
|
@@ -6516,7 +6511,7 @@ function Il({
|
|
|
6516
6511
|
}
|
|
6517
6512
|
) : null,
|
|
6518
6513
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
6519
|
-
|
|
6514
|
+
ne,
|
|
6520
6515
|
{
|
|
6521
6516
|
intent: "ghost",
|
|
6522
6517
|
size: "sm",
|
|
@@ -6537,7 +6532,7 @@ function Il({
|
|
|
6537
6532
|
}
|
|
6538
6533
|
),
|
|
6539
6534
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
6540
|
-
|
|
6535
|
+
ne,
|
|
6541
6536
|
{
|
|
6542
6537
|
intent: "outline",
|
|
6543
6538
|
size: "sm",
|
|
@@ -6547,13 +6542,13 @@ function Il({
|
|
|
6547
6542
|
}
|
|
6548
6543
|
) })
|
|
6549
6544
|
] }) }),
|
|
6550
|
-
/* @__PURE__ */ t(
|
|
6545
|
+
/* @__PURE__ */ t(Q.Content, { value: "parameters", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
|
|
6551
6546
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${a("anamnesis.configEditor.panelLive", {
|
|
6552
6547
|
count: C
|
|
6553
6548
|
})} · ${a("anamnesis.configEditor.panelArchived", {
|
|
6554
6549
|
count: w - C
|
|
6555
6550
|
})}` }),
|
|
6556
|
-
|
|
6551
|
+
la.map((m) => {
|
|
6557
6552
|
const N = _e(
|
|
6558
6553
|
e,
|
|
6559
6554
|
m
|
|
@@ -6565,7 +6560,7 @@ function Il({
|
|
|
6565
6560
|
children: [
|
|
6566
6561
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: a(`anamnesis.group.${m}`) }),
|
|
6567
6562
|
/* @__PURE__ */ t(
|
|
6568
|
-
|
|
6563
|
+
Zn,
|
|
6569
6564
|
{
|
|
6570
6565
|
count: N.length,
|
|
6571
6566
|
onReorder: (x, P) => p(m, x, P),
|
|
@@ -6579,7 +6574,7 @@ function Il({
|
|
|
6579
6574
|
x.locked ? a("anamnesis.configEditor.lockedHint") : null
|
|
6580
6575
|
].filter(Boolean).join(" · ");
|
|
6581
6576
|
return /* @__PURE__ */ t(
|
|
6582
|
-
|
|
6577
|
+
ea,
|
|
6583
6578
|
{
|
|
6584
6579
|
index: P,
|
|
6585
6580
|
label: Te(x, a),
|
|
@@ -6590,7 +6585,7 @@ function Il({
|
|
|
6590
6585
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6591
6586
|
Te(x, a),
|
|
6592
6587
|
x.locked ? /* @__PURE__ */ t(
|
|
6593
|
-
|
|
6588
|
+
X,
|
|
6594
6589
|
{
|
|
6595
6590
|
size: "sm",
|
|
6596
6591
|
variant: "neutral",
|
|
@@ -6598,7 +6593,7 @@ function Il({
|
|
|
6598
6593
|
children: a("anamnesis.configEditor.locked")
|
|
6599
6594
|
}
|
|
6600
6595
|
) : null,
|
|
6601
|
-
x.enabled === !1 ? /* @__PURE__ */ t(
|
|
6596
|
+
x.enabled === !1 ? /* @__PURE__ */ t(X, { size: "sm", variant: "neutral", children: a(
|
|
6602
6597
|
"anamnesis.configEditor.archived"
|
|
6603
6598
|
) }) : null
|
|
6604
6599
|
] }),
|
|
@@ -6618,7 +6613,7 @@ function Il({
|
|
|
6618
6613
|
children: [
|
|
6619
6614
|
E,
|
|
6620
6615
|
/* @__PURE__ */ t(
|
|
6621
|
-
|
|
6616
|
+
ce,
|
|
6622
6617
|
{
|
|
6623
6618
|
size: "sm",
|
|
6624
6619
|
intent: "ghost",
|
|
@@ -6639,7 +6634,7 @@ function Il({
|
|
|
6639
6634
|
}
|
|
6640
6635
|
),
|
|
6641
6636
|
x.locked ? null : x.enabled === !1 ? /* @__PURE__ */ t(
|
|
6642
|
-
|
|
6637
|
+
ce,
|
|
6643
6638
|
{
|
|
6644
6639
|
size: "sm",
|
|
6645
6640
|
intent: "ghost",
|
|
@@ -6662,7 +6657,7 @@ function Il({
|
|
|
6662
6657
|
)
|
|
6663
6658
|
}
|
|
6664
6659
|
) : /* @__PURE__ */ t(
|
|
6665
|
-
|
|
6660
|
+
ce,
|
|
6666
6661
|
{
|
|
6667
6662
|
size: "sm",
|
|
6668
6663
|
intent: "ghost",
|
|
@@ -6702,7 +6697,7 @@ function Il({
|
|
|
6702
6697
|
);
|
|
6703
6698
|
}),
|
|
6704
6699
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
6705
|
-
|
|
6700
|
+
ne,
|
|
6706
6701
|
{
|
|
6707
6702
|
intent: "outline",
|
|
6708
6703
|
size: "sm",
|
|
@@ -6712,13 +6707,13 @@ function Il({
|
|
|
6712
6707
|
}
|
|
6713
6708
|
) })
|
|
6714
6709
|
] }) }),
|
|
6715
|
-
/* @__PURE__ */ t(
|
|
6710
|
+
/* @__PURE__ */ t(Q.Content, { value: "pathologies", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:pt-[var(--spacing-md)]", children: [
|
|
6716
6711
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${a("anamnesis.configEditor.panelLive", {
|
|
6717
6712
|
count: T
|
|
6718
6713
|
})} · ${a("anamnesis.configEditor.panelArchived", {
|
|
6719
6714
|
count: L - T
|
|
6720
6715
|
})}` }),
|
|
6721
|
-
/* @__PURE__ */ t(en, { divider: "divided", children:
|
|
6716
|
+
/* @__PURE__ */ t(en, { divider: "divided", children: sa(e).map((m) => {
|
|
6722
6717
|
const N = e.pathologies.some(
|
|
6723
6718
|
(P) => P.parentCode === m.code && P.enabled !== !1
|
|
6724
6719
|
), x = [
|
|
@@ -6732,7 +6727,7 @@ function Il({
|
|
|
6732
6727
|
{
|
|
6733
6728
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6734
6729
|
Se(m.code, a, m),
|
|
6735
|
-
m.enabled === !1 ? /* @__PURE__ */ t(
|
|
6730
|
+
m.enabled === !1 ? /* @__PURE__ */ t(X, { size: "sm", variant: "neutral", children: a("anamnesis.configEditor.archived") }) : null
|
|
6736
6731
|
] }),
|
|
6737
6732
|
description: x || void 0,
|
|
6738
6733
|
trailing: /* @__PURE__ */ d(
|
|
@@ -6743,7 +6738,7 @@ function Il({
|
|
|
6743
6738
|
}),
|
|
6744
6739
|
children: [
|
|
6745
6740
|
/* @__PURE__ */ t(
|
|
6746
|
-
|
|
6741
|
+
ce,
|
|
6747
6742
|
{
|
|
6748
6743
|
size: "sm",
|
|
6749
6744
|
intent: "ghost",
|
|
@@ -6759,7 +6754,7 @@ function Il({
|
|
|
6759
6754
|
}
|
|
6760
6755
|
),
|
|
6761
6756
|
m.enabled === !1 ? /* @__PURE__ */ t(
|
|
6762
|
-
|
|
6757
|
+
ce,
|
|
6763
6758
|
{
|
|
6764
6759
|
size: "sm",
|
|
6765
6760
|
intent: "ghost",
|
|
@@ -6780,7 +6775,7 @@ function Il({
|
|
|
6780
6775
|
)
|
|
6781
6776
|
}
|
|
6782
6777
|
) : /* @__PURE__ */ t(
|
|
6783
|
-
|
|
6778
|
+
ce,
|
|
6784
6779
|
{
|
|
6785
6780
|
size: "sm",
|
|
6786
6781
|
intent: "ghost",
|
|
@@ -6809,7 +6804,7 @@ function Il({
|
|
|
6809
6804
|
);
|
|
6810
6805
|
}) }),
|
|
6811
6806
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
6812
|
-
|
|
6807
|
+
ne,
|
|
6813
6808
|
{
|
|
6814
6809
|
intent: "outline",
|
|
6815
6810
|
size: "sm",
|
|
@@ -6819,12 +6814,12 @@ function Il({
|
|
|
6819
6814
|
}
|
|
6820
6815
|
) })
|
|
6821
6816
|
] }) }),
|
|
6822
|
-
/* @__PURE__ */ t(
|
|
6817
|
+
/* @__PURE__ */ t(Q.Content, { value: "targets", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
|
|
6823
6818
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.configEditor.panelTracked", {
|
|
6824
6819
|
count: S
|
|
6825
6820
|
}) }),
|
|
6826
6821
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.configEditor.targetsIntro") }),
|
|
6827
|
-
|
|
6822
|
+
la.map((m) => {
|
|
6828
6823
|
const N = Ne(e, m);
|
|
6829
6824
|
return N.length === 0 ? null : /* @__PURE__ */ d(
|
|
6830
6825
|
"section",
|
|
@@ -6833,7 +6828,7 @@ function Il({
|
|
|
6833
6828
|
children: [
|
|
6834
6829
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: a(`anamnesis.group.${m}`) }),
|
|
6835
6830
|
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: N.map((x) => /* @__PURE__ */ t(
|
|
6836
|
-
|
|
6831
|
+
ha,
|
|
6837
6832
|
{
|
|
6838
6833
|
label: Te(x, a),
|
|
6839
6834
|
checked: x.goal === !0,
|
|
@@ -6886,7 +6881,7 @@ function ur({
|
|
|
6886
6881
|
t: s
|
|
6887
6882
|
}) {
|
|
6888
6883
|
return /* @__PURE__ */ t(
|
|
6889
|
-
|
|
6884
|
+
Z,
|
|
6890
6885
|
{
|
|
6891
6886
|
open: e !== null,
|
|
6892
6887
|
onOpenChange: (o) => {
|
|
@@ -6965,10 +6960,10 @@ function pr({
|
|
|
6965
6960
|
});
|
|
6966
6961
|
n();
|
|
6967
6962
|
};
|
|
6968
|
-
return /* @__PURE__ */ d(
|
|
6969
|
-
/* @__PURE__ */ d(
|
|
6970
|
-
/* @__PURE__ */ t(
|
|
6971
|
-
/* @__PURE__ */ t(
|
|
6963
|
+
return /* @__PURE__ */ d(Z.Content, { size: "sm", children: [
|
|
6964
|
+
/* @__PURE__ */ d(Z.Header, { children: [
|
|
6965
|
+
/* @__PURE__ */ t(Z.Title, { children: s("anamnesis.configEditor.editTitle", { name: r }) }),
|
|
6966
|
+
/* @__PURE__ */ t(Z.Description, { children: e.kind === "pathology" ? s("anamnesis.configEditor.codeLine", {
|
|
6972
6967
|
code: o.code
|
|
6973
6968
|
}) : e.kind === "field" ? `${s("anamnesis.configEditor.keyLine", {
|
|
6974
6969
|
key: e.entry.key
|
|
@@ -6978,7 +6973,7 @@ function pr({
|
|
|
6978
6973
|
key: o.key
|
|
6979
6974
|
}) })
|
|
6980
6975
|
] }),
|
|
6981
|
-
/* @__PURE__ */ d(
|
|
6976
|
+
/* @__PURE__ */ d(Z.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
6982
6977
|
/* @__PURE__ */ t(
|
|
6983
6978
|
V,
|
|
6984
6979
|
{
|
|
@@ -7003,7 +6998,7 @@ function pr({
|
|
|
7003
6998
|
}
|
|
7004
6999
|
) }) : null,
|
|
7005
7000
|
e.kind === "field" ? /* @__PURE__ */ t(
|
|
7006
|
-
|
|
7001
|
+
ha,
|
|
7007
7002
|
{
|
|
7008
7003
|
label: s("anamnesis.configEditor.requiredField"),
|
|
7009
7004
|
checked: g,
|
|
@@ -7032,9 +7027,9 @@ function pr({
|
|
|
7032
7027
|
).join(", ")
|
|
7033
7028
|
}) }) : null
|
|
7034
7029
|
] }),
|
|
7035
|
-
/* @__PURE__ */ d(
|
|
7036
|
-
/* @__PURE__ */ t(
|
|
7037
|
-
/* @__PURE__ */ t(
|
|
7030
|
+
/* @__PURE__ */ d(Z.Footer, { children: [
|
|
7031
|
+
/* @__PURE__ */ t(ne, { intent: "ghost", onClick: n, children: s("anamnesis.configEditor.cancel") }),
|
|
7032
|
+
/* @__PURE__ */ t(ne, { intent: "primary", onClick: T, disabled: !R, children: s("anamnesis.configEditor.save") })
|
|
7038
7033
|
] })
|
|
7039
7034
|
] });
|
|
7040
7035
|
}
|
|
@@ -7044,7 +7039,7 @@ function hr(e, n) {
|
|
|
7044
7039
|
label: void 0
|
|
7045
7040
|
});
|
|
7046
7041
|
}
|
|
7047
|
-
function
|
|
7042
|
+
function ta(e) {
|
|
7048
7043
|
return e === "choice" || e === "choiceWithText" || e === "multiChoice";
|
|
7049
7044
|
}
|
|
7050
7045
|
function gr({
|
|
@@ -7055,7 +7050,7 @@ function gr({
|
|
|
7055
7050
|
t: s
|
|
7056
7051
|
}) {
|
|
7057
7052
|
return /* @__PURE__ */ t(
|
|
7058
|
-
|
|
7053
|
+
Z,
|
|
7059
7054
|
{
|
|
7060
7055
|
open: e !== null,
|
|
7061
7056
|
onOpenChange: (o) => {
|
|
@@ -7082,7 +7077,7 @@ function fr({
|
|
|
7082
7077
|
onConfigChange: i,
|
|
7083
7078
|
t: s
|
|
7084
7079
|
}) {
|
|
7085
|
-
const [o, r] = z(""), [l, c] = z(""), [u, h] = z(""), [g, p] = z(""), [k, v] = z(""), [f, C] = z(""), [w, A] = z("0"), [R, T] = z(""), [L, S] = z(""), [m, N] = z(""), [x, P] = z(""), [$, F] = z(!1), [E, H] = z(""), j =
|
|
7080
|
+
const [o, r] = z(""), [l, c] = z(""), [u, h] = z(""), [g, p] = z(""), [k, v] = z(""), [f, C] = z(""), [w, A] = z("0"), [R, T] = z(""), [L, S] = z(""), [m, N] = z(""), [x, P] = z(""), [$, F] = z(!1), [E, H] = z(""), j = la.map((D) => ({
|
|
7086
7081
|
value: D,
|
|
7087
7082
|
label: s(`anamnesis.group.${D}`)
|
|
7088
7083
|
})), M = cr.map((D) => ({
|
|
@@ -7091,33 +7086,33 @@ function fr({
|
|
|
7091
7086
|
})), U = rr.map((D) => ({
|
|
7092
7087
|
value: D,
|
|
7093
7088
|
label: s(`anamnesis.configEditor.type.${D}`)
|
|
7094
|
-
})),
|
|
7089
|
+
})), Y = a.pathologies.filter((D) => !D.parentCode && D.enabled !== !1).map((D) => ({
|
|
7095
7090
|
value: D.code,
|
|
7096
7091
|
label: Se(D.code, s, D)
|
|
7097
|
-
})),
|
|
7092
|
+
})), ae = L.split(",").map((D) => D.trim()).filter(Boolean), me = e.kind === "parameter" ? o.trim() !== "" && l !== "" && u !== "" : e.kind === "field" ? o.trim() !== "" && R !== "" && (!ta(R) || ae.length > 0) : e.kind === "section" ? o.trim() !== "" : o.trim() !== "" && x.trim() !== "" && // A duplicate code would collide with the existing entry
|
|
7098
7093
|
// everywhere codes are matched (lookup, archive, edit) —
|
|
7099
7094
|
// uniqueness is the add gate, matching keyFromLabel's guarantee
|
|
7100
7095
|
// on the other vocabularies.
|
|
7101
7096
|
!a.pathologies.some(
|
|
7102
7097
|
(D) => D.code.toLowerCase() === x.trim().toLowerCase()
|
|
7103
|
-
),
|
|
7098
|
+
), J = () => {
|
|
7104
7099
|
const D = o.trim();
|
|
7105
7100
|
if (e.kind === "parameter") {
|
|
7106
|
-
const B = new Set(a.parameters.map((Fe) => Fe.key)),
|
|
7101
|
+
const B = new Set(a.parameters.map((Fe) => Fe.key)), ee = (Fe) => {
|
|
7107
7102
|
if (Fe.trim() === "") return;
|
|
7108
7103
|
const Pe = Number(Fe);
|
|
7109
7104
|
return Number.isFinite(Pe) ? Pe : void 0;
|
|
7110
|
-
}, pe =
|
|
7111
|
-
key:
|
|
7105
|
+
}, pe = ee(k), de = ee(f), Le = {
|
|
7106
|
+
key: na(D, B),
|
|
7112
7107
|
label: D,
|
|
7113
7108
|
group: l,
|
|
7114
7109
|
betterDirection: u,
|
|
7115
7110
|
precision: Number(w),
|
|
7116
7111
|
...g.trim() ? { unit: g.trim() } : {},
|
|
7117
|
-
...pe != null ||
|
|
7112
|
+
...pe != null || de != null ? {
|
|
7118
7113
|
referenceRange: {
|
|
7119
7114
|
...pe != null ? { min: pe } : {},
|
|
7120
|
-
...
|
|
7115
|
+
...de != null ? { max: de } : {}
|
|
7121
7116
|
}
|
|
7122
7117
|
} : {}
|
|
7123
7118
|
};
|
|
@@ -7125,35 +7120,35 @@ function fr({
|
|
|
7125
7120
|
} else if (e.kind === "field") {
|
|
7126
7121
|
const B = new Set(
|
|
7127
7122
|
a.intakeSections.flatMap(
|
|
7128
|
-
(
|
|
7123
|
+
(de) => de.fields.map((Le) => Le.key)
|
|
7129
7124
|
)
|
|
7130
|
-
),
|
|
7131
|
-
key:
|
|
7125
|
+
), ee = R === "numberInteger" || R === "numberDecimal" ? "number" : R === "choiceWithText" ? "choice" : R, pe = {
|
|
7126
|
+
key: na(D, B),
|
|
7132
7127
|
label: D,
|
|
7133
|
-
type:
|
|
7128
|
+
type: ee,
|
|
7134
7129
|
...R === "numberDecimal" ? { decimal: !0 } : {},
|
|
7135
7130
|
...R === "choiceWithText" ? { detail: !0 } : {},
|
|
7136
|
-
...
|
|
7131
|
+
...ta(R) ? { options: ae } : {},
|
|
7137
7132
|
...m.trim() ? { helpText: m.trim() } : {},
|
|
7138
7133
|
...$ ? { required: !0 } : {}
|
|
7139
7134
|
};
|
|
7140
7135
|
i({
|
|
7141
7136
|
...a,
|
|
7142
7137
|
intakeSections: a.intakeSections.map(
|
|
7143
|
-
(
|
|
7138
|
+
(de) => de.key === e.sectionKey ? { ...de, fields: [...de.fields, pe] } : de
|
|
7144
7139
|
)
|
|
7145
7140
|
});
|
|
7146
7141
|
} else if (e.kind === "section") {
|
|
7147
7142
|
const B = new Set(
|
|
7148
7143
|
a.intakeSections.map((pe) => pe.key)
|
|
7149
|
-
),
|
|
7150
|
-
key:
|
|
7144
|
+
), ee = {
|
|
7145
|
+
key: na(D, B),
|
|
7151
7146
|
label: D,
|
|
7152
7147
|
fields: []
|
|
7153
7148
|
};
|
|
7154
7149
|
i({
|
|
7155
7150
|
...a,
|
|
7156
|
-
intakeSections: [...a.intakeSections,
|
|
7151
|
+
intakeSections: [...a.intakeSections, ee]
|
|
7157
7152
|
});
|
|
7158
7153
|
} else {
|
|
7159
7154
|
const B = {
|
|
@@ -7170,12 +7165,12 @@ function fr({
|
|
|
7170
7165
|
}, Re = e.kind === "parameter" ? s("anamnesis.configEditor.addParameterTitle") : e.kind === "field" ? s("anamnesis.configEditor.addQuestionTitle", {
|
|
7171
7166
|
section: vr(a, e.sectionKey, s)
|
|
7172
7167
|
}) : e.kind === "section" ? s("anamnesis.configEditor.addSectionTitle") : s("anamnesis.configEditor.addCodeTitle");
|
|
7173
|
-
return /* @__PURE__ */ d(
|
|
7174
|
-
/* @__PURE__ */ d(
|
|
7175
|
-
/* @__PURE__ */ t(
|
|
7176
|
-
/* @__PURE__ */ t(
|
|
7168
|
+
return /* @__PURE__ */ d(Z.Content, { size: "sm", children: [
|
|
7169
|
+
/* @__PURE__ */ d(Z.Header, { children: [
|
|
7170
|
+
/* @__PURE__ */ t(Z.Title, { children: Re }),
|
|
7171
|
+
/* @__PURE__ */ t(Z.Description, { children: s("anamnesis.configEditor.addNote") })
|
|
7177
7172
|
] }),
|
|
7178
|
-
/* @__PURE__ */ d(
|
|
7173
|
+
/* @__PURE__ */ d(Z.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
7179
7174
|
e.kind === "pathology" ? /* @__PURE__ */ t(V, { label: s("anamnesis.configEditor.codeField"), required: !0, children: /* @__PURE__ */ t(
|
|
7180
7175
|
ie,
|
|
7181
7176
|
{
|
|
@@ -7291,7 +7286,7 @@ function fr({
|
|
|
7291
7286
|
"aria-label": s("anamnesis.configEditor.typeField")
|
|
7292
7287
|
}
|
|
7293
7288
|
) }),
|
|
7294
|
-
|
|
7289
|
+
ta(R) ? /* @__PURE__ */ t(
|
|
7295
7290
|
V,
|
|
7296
7291
|
{
|
|
7297
7292
|
label: s("anamnesis.configEditor.optionsField"),
|
|
@@ -7315,7 +7310,7 @@ function fr({
|
|
|
7315
7310
|
}
|
|
7316
7311
|
) }),
|
|
7317
7312
|
/* @__PURE__ */ t(
|
|
7318
|
-
|
|
7313
|
+
ha,
|
|
7319
7314
|
{
|
|
7320
7315
|
label: s("anamnesis.configEditor.requiredField"),
|
|
7321
7316
|
checked: $,
|
|
@@ -7332,7 +7327,7 @@ function fr({
|
|
|
7332
7327
|
children: /* @__PURE__ */ t(
|
|
7333
7328
|
Ve,
|
|
7334
7329
|
{
|
|
7335
|
-
options:
|
|
7330
|
+
options: Y,
|
|
7336
7331
|
value: E,
|
|
7337
7332
|
onValueChange: (D) => H(D),
|
|
7338
7333
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
@@ -7344,9 +7339,9 @@ function fr({
|
|
|
7344
7339
|
) : null,
|
|
7345
7340
|
e.kind === "section" ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.configEditor.sectionNeedsQuestion") }) : null
|
|
7346
7341
|
] }),
|
|
7347
|
-
/* @__PURE__ */ d(
|
|
7348
|
-
/* @__PURE__ */ t(
|
|
7349
|
-
/* @__PURE__ */ t(
|
|
7342
|
+
/* @__PURE__ */ d(Z.Footer, { children: [
|
|
7343
|
+
/* @__PURE__ */ t(ne, { intent: "ghost", onClick: n, children: s("anamnesis.configEditor.cancel") }),
|
|
7344
|
+
/* @__PURE__ */ t(ne, { intent: "primary", onClick: J, disabled: !me, children: s("anamnesis.configEditor.add") })
|
|
7350
7345
|
] })
|
|
7351
7346
|
] });
|
|
7352
7347
|
}
|
|
@@ -7356,12 +7351,12 @@ function vr(e, n, a) {
|
|
|
7356
7351
|
);
|
|
7357
7352
|
return i ? fe(i, a) : n;
|
|
7358
7353
|
}
|
|
7359
|
-
function
|
|
7354
|
+
function Ja(e) {
|
|
7360
7355
|
return e.kind === "visit" ? `anamnesis-visit-${e.visitId}` : `anamnesis-event-${e.eventId}`;
|
|
7361
7356
|
}
|
|
7362
7357
|
function Rl(e, n) {
|
|
7363
|
-
const a = e.visits.filter(
|
|
7364
|
-
id:
|
|
7358
|
+
const a = e.visits.filter(Nt).map((s) => ({
|
|
7359
|
+
id: Ja({ kind: "visit", visitId: s.id }),
|
|
7365
7360
|
dateIso: s.dateIso,
|
|
7366
7361
|
author: s.practitioner ? { name: s.practitioner } : void 0,
|
|
7367
7362
|
clinical: !0,
|
|
@@ -7380,7 +7375,7 @@ function Rl(e, n) {
|
|
|
7380
7375
|
|
|
7381
7376
|
`)
|
|
7382
7377
|
})), i = (e.events ?? []).map((s) => ({
|
|
7383
|
-
id:
|
|
7378
|
+
id: Ja({ kind: "event", eventId: s.id }),
|
|
7384
7379
|
dateIso: s.dateIso,
|
|
7385
7380
|
// No author and not clinical — see the header. The card renders the date
|
|
7386
7381
|
// itself, so the body carries the label without repeating it.
|
|
@@ -7390,7 +7385,7 @@ function Rl(e, n) {
|
|
|
7390
7385
|
// a gym membership as one.
|
|
7391
7386
|
"aria-label": n("anamnesis.rail.eventLabel"),
|
|
7392
7387
|
contentFormat: "markdown",
|
|
7393
|
-
content: `**${n(`anamnesis.event.label.${s.labelKey}`)}** — ${
|
|
7388
|
+
content: `**${n(`anamnesis.event.label.${s.labelKey}`)}** — ${Dt(
|
|
7394
7389
|
s,
|
|
7395
7390
|
n
|
|
7396
7391
|
)}`
|
|
@@ -7399,7 +7394,7 @@ function Rl(e, n) {
|
|
|
7399
7394
|
(s, o) => o.dateIso.localeCompare(s.dateIso)
|
|
7400
7395
|
);
|
|
7401
7396
|
}
|
|
7402
|
-
const
|
|
7397
|
+
const ia = "patterns", yr = {
|
|
7403
7398
|
anamnesis: {
|
|
7404
7399
|
mainLabel: "Anamnesis record — {{mode}}",
|
|
7405
7400
|
mode: { intake: "Intake", compile: "Compile", readOnly: "Read-only" },
|
|
@@ -9245,12 +9240,12 @@ const sa = "patterns", yr = {
|
|
|
9245
9240
|
};
|
|
9246
9241
|
function Ll(e) {
|
|
9247
9242
|
for (const [n, a] of Object.entries(wr))
|
|
9248
|
-
e.hasResourceBundle(n,
|
|
9243
|
+
e.hasResourceBundle(n, ia) ? e.addResourceBundle(n, ia, a, !0, !1) : e.addResourceBundle(n, ia, a);
|
|
9249
9244
|
}
|
|
9250
9245
|
function Nr(e) {
|
|
9251
9246
|
var a;
|
|
9252
9247
|
if (!e) return;
|
|
9253
|
-
const n = ln(e) ? new Date(e).getTime() : (a =
|
|
9248
|
+
const n = ln(e) ? new Date(e).getTime() : (a = mt(e)) == null ? void 0 : a.getTime();
|
|
9254
9249
|
return n == null || Number.isNaN(n) ? void 0 : n;
|
|
9255
9250
|
}
|
|
9256
9251
|
function Wt(e) {
|
|
@@ -9276,7 +9271,7 @@ function Sr(e, n, a) {
|
|
|
9276
9271
|
id: e.key,
|
|
9277
9272
|
label: ge(e, a),
|
|
9278
9273
|
value: Bn(n.answer, e, a),
|
|
9279
|
-
highlighted:
|
|
9274
|
+
highlighted: Ot(e, n.answer)
|
|
9280
9275
|
};
|
|
9281
9276
|
e.unit && (i.unit = e.unit);
|
|
9282
9277
|
const s = Wt(n.source);
|
|
@@ -9307,29 +9302,29 @@ function Fl(e, n, a, i) {
|
|
|
9307
9302
|
export {
|
|
9308
9303
|
El as A,
|
|
9309
9304
|
qi as L,
|
|
9310
|
-
|
|
9305
|
+
ia as P,
|
|
9311
9306
|
We as S,
|
|
9312
9307
|
Bi as T,
|
|
9313
9308
|
Il as a,
|
|
9314
9309
|
_e as b,
|
|
9315
|
-
|
|
9310
|
+
sa as c,
|
|
9316
9311
|
Ge as d,
|
|
9317
|
-
|
|
9312
|
+
Ja as e,
|
|
9318
9313
|
Rl as f,
|
|
9319
9314
|
Hi as g,
|
|
9320
9315
|
Ne as h,
|
|
9321
|
-
|
|
9322
|
-
|
|
9316
|
+
rt as i,
|
|
9317
|
+
ga as j,
|
|
9323
9318
|
Bn as k,
|
|
9324
9319
|
ge as l,
|
|
9325
|
-
|
|
9320
|
+
Ot as m,
|
|
9326
9321
|
Vi as n,
|
|
9327
9322
|
Ui as o,
|
|
9328
|
-
|
|
9323
|
+
na as p,
|
|
9329
9324
|
dn as q,
|
|
9330
9325
|
Ll as r,
|
|
9331
9326
|
Dl as s,
|
|
9332
9327
|
Vt as t,
|
|
9333
9328
|
Fl as u
|
|
9334
9329
|
};
|
|
9335
|
-
//# sourceMappingURL=anamnesis-summary-rows-
|
|
9330
|
+
//# sourceMappingURL=anamnesis-summary-rows-6tOCXdoz.js.map
|