@alfadocs/ui-kit-debug 1.4.7 → 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-D7v_JyGo.js → anamnesis-summary-rows-6tOCXdoz.js} +638 -634
- 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-catalogue.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis-intake.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis-questionnaire.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-D7v_JyGo.js.map +0 -1
package/dist/_chunks/{anamnesis-summary-rows-D7v_JyGo.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" }]
|
|
@@ -318,7 +318,14 @@ const st = [
|
|
|
318
318
|
key: "symptoms",
|
|
319
319
|
fields: [
|
|
320
320
|
{ key: "bloating", type: "yesNoDetail", detail: !0 },
|
|
321
|
-
|
|
321
|
+
// Flagged on "yes": the seed's one highlight rule, so every story
|
|
322
|
+
// shows a highlighted answer the way a practice's rules would.
|
|
323
|
+
{
|
|
324
|
+
key: "refluxGastritis",
|
|
325
|
+
type: "yesNoDetail",
|
|
326
|
+
detail: !0,
|
|
327
|
+
highlight: "whenYes"
|
|
328
|
+
},
|
|
322
329
|
{ key: "tiredness", type: "yesNoDetail", detail: !0 },
|
|
323
330
|
{
|
|
324
331
|
key: "sleepQuality",
|
|
@@ -414,7 +421,7 @@ const st = [
|
|
|
414
421
|
]
|
|
415
422
|
}
|
|
416
423
|
];
|
|
417
|
-
|
|
424
|
+
it.flatMap(
|
|
418
425
|
(e) => e.fields.map((n) => n.key)
|
|
419
426
|
);
|
|
420
427
|
const qi = /* @__PURE__ */ new Set([
|
|
@@ -436,8 +443,8 @@ function Ui(e) {
|
|
|
436
443
|
return Bi.has(e);
|
|
437
444
|
}
|
|
438
445
|
const We = {
|
|
439
|
-
parameters:
|
|
440
|
-
intakeSections:
|
|
446
|
+
parameters: tt,
|
|
447
|
+
intakeSections: it,
|
|
441
448
|
pathologies: Rn
|
|
442
449
|
};
|
|
443
450
|
function dn(e) {
|
|
@@ -455,11 +462,11 @@ function Ye(e) {
|
|
|
455
462
|
function Ln(e) {
|
|
456
463
|
return e.enabled !== !1;
|
|
457
464
|
}
|
|
458
|
-
function
|
|
465
|
+
function st(e) {
|
|
459
466
|
const n = Vi(e.key);
|
|
460
467
|
return e.locked === n ? e : { ...e, locked: n };
|
|
461
468
|
}
|
|
462
|
-
function
|
|
469
|
+
function ot(e) {
|
|
463
470
|
const n = [];
|
|
464
471
|
for (const a of e)
|
|
465
472
|
n.includes(a.group) || n.push(a.group);
|
|
@@ -468,17 +475,17 @@ function rt(e) {
|
|
|
468
475
|
);
|
|
469
476
|
}
|
|
470
477
|
function Ne(e, n) {
|
|
471
|
-
const i = dn(e).parameters.map(
|
|
472
|
-
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);
|
|
473
480
|
}
|
|
474
481
|
function _e(e, n) {
|
|
475
|
-
const a = dn(e).parameters.map(
|
|
476
|
-
return
|
|
482
|
+
const a = dn(e).parameters.map(st), i = n ? a.filter((s) => s.group === n) : a;
|
|
483
|
+
return ot(i);
|
|
477
484
|
}
|
|
478
485
|
function Ki(e) {
|
|
479
486
|
return { ...e, fields: Ye(e.fields) };
|
|
480
487
|
}
|
|
481
|
-
function
|
|
488
|
+
function ga(e) {
|
|
482
489
|
return Ye(dn(e).intakeSections).filter(Ln).map((n) => ({
|
|
483
490
|
...n,
|
|
484
491
|
fields: Ye(n.fields.filter(Ln))
|
|
@@ -487,22 +494,22 @@ function fa(e) {
|
|
|
487
494
|
function Ge(e) {
|
|
488
495
|
return Ye(dn(e).intakeSections).map(Ki);
|
|
489
496
|
}
|
|
490
|
-
function
|
|
497
|
+
function rt(e) {
|
|
491
498
|
return Ye(dn(e).pathologies.filter(Ln));
|
|
492
499
|
}
|
|
493
|
-
function
|
|
500
|
+
function sa(e) {
|
|
494
501
|
return Ye(dn(e).pathologies);
|
|
495
502
|
}
|
|
496
503
|
function zn(e) {
|
|
497
504
|
return Object.fromEntries(
|
|
498
|
-
|
|
505
|
+
sa(e).map((n) => [n.code, n])
|
|
499
506
|
);
|
|
500
507
|
}
|
|
501
508
|
function Hi(e) {
|
|
502
|
-
const n =
|
|
509
|
+
const n = rt(e);
|
|
503
510
|
return n.filter((a) => !n.some((i) => i.parentCode === a.code)).map((a) => a.code);
|
|
504
511
|
}
|
|
505
|
-
const
|
|
512
|
+
const fa = {
|
|
506
513
|
weight: "weightKg",
|
|
507
514
|
height: "heightCm",
|
|
508
515
|
waist: "waistCm",
|
|
@@ -514,7 +521,7 @@ const va = {
|
|
|
514
521
|
month: "short",
|
|
515
522
|
day: "numeric",
|
|
516
523
|
timeZone: "UTC"
|
|
517
|
-
},
|
|
524
|
+
}, lt = {
|
|
518
525
|
year: "numeric",
|
|
519
526
|
month: "short",
|
|
520
527
|
day: "numeric",
|
|
@@ -524,11 +531,11 @@ const va = {
|
|
|
524
531
|
function ln(e) {
|
|
525
532
|
return e != null && Gi.test(e);
|
|
526
533
|
}
|
|
527
|
-
function
|
|
534
|
+
function Fa(e) {
|
|
528
535
|
return ji.test(e) ? e.slice(0, 10) : e;
|
|
529
536
|
}
|
|
530
537
|
function On(e) {
|
|
531
|
-
return ln(e) ?
|
|
538
|
+
return ln(e) ? lt : Mn;
|
|
532
539
|
}
|
|
533
540
|
function Wi(e, n) {
|
|
534
541
|
return wi(e ?? null, n ?? null);
|
|
@@ -538,7 +545,7 @@ function cn(e) {
|
|
|
538
545
|
}
|
|
539
546
|
function Qi(e, n) {
|
|
540
547
|
if (!cn(e) || !cn(n)) return null;
|
|
541
|
-
const a = new Date(
|
|
548
|
+
const a = new Date(Fa(e)), i = new Date(Fa(n));
|
|
542
549
|
let s = i.getUTCFullYear() - a.getUTCFullYear();
|
|
543
550
|
const o = i.getUTCMonth() - a.getUTCMonth();
|
|
544
551
|
return (o < 0 || o === 0 && i.getUTCDate() < a.getUTCDate()) && (s -= 1), s < 0 ? null : s;
|
|
@@ -547,22 +554,22 @@ const Yi = /* @__PURE__ */ new Set([
|
|
|
547
554
|
"energy",
|
|
548
555
|
"protein"
|
|
549
556
|
]);
|
|
550
|
-
function
|
|
551
|
-
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";
|
|
552
559
|
}
|
|
553
560
|
function pn(e) {
|
|
554
561
|
return e != null && Number.isFinite(e) ? e : null;
|
|
555
562
|
}
|
|
556
563
|
function $e(e, n) {
|
|
557
564
|
var a;
|
|
558
|
-
switch (
|
|
565
|
+
switch (ct(n)) {
|
|
559
566
|
case "computed":
|
|
560
567
|
return Wi(
|
|
561
568
|
pn(e.anthropometrics.weightKg),
|
|
562
569
|
pn(e.anthropometrics.heightCm)
|
|
563
570
|
);
|
|
564
571
|
case "anthropometric":
|
|
565
|
-
return pn(e.anthropometrics[
|
|
572
|
+
return pn(e.anthropometrics[fa[n.key]]);
|
|
566
573
|
case "dietary": {
|
|
567
574
|
const i = (a = e.dietaryIntake) == null ? void 0 : a.find((s) => s.parameterKey === n.key);
|
|
568
575
|
return i ? pn(i.value) : null;
|
|
@@ -580,29 +587,29 @@ function Xi(e, n) {
|
|
|
580
587
|
}
|
|
581
588
|
return null;
|
|
582
589
|
}
|
|
583
|
-
function
|
|
590
|
+
function Pa(e, n, a) {
|
|
584
591
|
return e.some((i) => i.parameterKey === n) ? e.map(
|
|
585
592
|
(i) => i.parameterKey === n ? { ...i, value: a } : i
|
|
586
593
|
) : [...e, { parameterKey: n, value: a }];
|
|
587
594
|
}
|
|
588
|
-
function
|
|
589
|
-
const i =
|
|
595
|
+
function _a(e, n, a) {
|
|
596
|
+
const i = ct(n);
|
|
590
597
|
return i === "computed" || n.computed ? e : i === "anthropometric" ? {
|
|
591
598
|
...e,
|
|
592
599
|
anthropometrics: {
|
|
593
600
|
...e.anthropometrics,
|
|
594
|
-
[
|
|
601
|
+
[fa[n.key]]: a
|
|
595
602
|
}
|
|
596
603
|
} : i === "dietary" ? {
|
|
597
604
|
...e,
|
|
598
|
-
dietaryIntake:
|
|
605
|
+
dietaryIntake: Pa(
|
|
599
606
|
e.dietaryIntake ?? [],
|
|
600
607
|
n.key,
|
|
601
608
|
a
|
|
602
609
|
)
|
|
603
|
-
} : { ...e, labs:
|
|
610
|
+
} : { ...e, labs: Pa(e.labs, n.key, a) };
|
|
604
611
|
}
|
|
605
|
-
function
|
|
612
|
+
function dt(e, n, a) {
|
|
606
613
|
const i = a != null && Number.isFinite(a) ? a : null;
|
|
607
614
|
if (i == null) {
|
|
608
615
|
const r = e.targets.filter(
|
|
@@ -620,7 +627,7 @@ function ut(e, n, a) {
|
|
|
620
627
|
function xn(e, n) {
|
|
621
628
|
return e == null || !Number.isFinite(e) || !n ? null : n.min != null && e < n.min ? "low" : n.max != null && e > n.max ? "high" : null;
|
|
622
629
|
}
|
|
623
|
-
function
|
|
630
|
+
function $a(e, n) {
|
|
624
631
|
return n ? n.min != null && e < n.min ? n.min - e : n.max != null && e > n.max ? e - n.max : 0 : 0;
|
|
625
632
|
}
|
|
626
633
|
function kn(e, n, a) {
|
|
@@ -636,14 +643,14 @@ function kn(e, n, a) {
|
|
|
636
643
|
o = i > 0 ? "good" : "bad";
|
|
637
644
|
break;
|
|
638
645
|
case "toRange": {
|
|
639
|
-
const r =
|
|
646
|
+
const r = $a(n, a.referenceRange), l = $a(e, a.referenceRange);
|
|
640
647
|
l < r ? o = "good" : l > r ? o = "bad" : o = "neutral";
|
|
641
648
|
break;
|
|
642
649
|
}
|
|
643
650
|
}
|
|
644
651
|
return { abs: i, direction: s, valence: o };
|
|
645
652
|
}
|
|
646
|
-
function
|
|
653
|
+
function va(e, n) {
|
|
647
654
|
const a = new Map(
|
|
648
655
|
e.targets.map((i) => [i.parameterKey, i.target])
|
|
649
656
|
);
|
|
@@ -669,12 +676,12 @@ const Ji = [
|
|
|
669
676
|
"nutritionalProposal",
|
|
670
677
|
"clinicalNotes"
|
|
671
678
|
];
|
|
672
|
-
function
|
|
679
|
+
function ut(e, n) {
|
|
673
680
|
const a = 10 ** n;
|
|
674
681
|
return Math.round(e * a) / a;
|
|
675
682
|
}
|
|
676
683
|
function Zi(e, n) {
|
|
677
|
-
return e == null ? null :
|
|
684
|
+
return e == null ? null : ut(e, n);
|
|
678
685
|
}
|
|
679
686
|
function Dn(e, n = (a, i) => a === i) {
|
|
680
687
|
return e.every((a) => n(a, e[0]));
|
|
@@ -696,12 +703,12 @@ function ns(e, n) {
|
|
|
696
703
|
});
|
|
697
704
|
}
|
|
698
705
|
const i = [];
|
|
699
|
-
for (const r of
|
|
706
|
+
for (const r of za(e, (l) => l.pathologyCodes)) {
|
|
700
707
|
const l = e.map((c) => c.pathologyCodes.includes(r));
|
|
701
708
|
Dn(l) || i.push({ code: r, present: l });
|
|
702
709
|
}
|
|
703
710
|
const s = [];
|
|
704
|
-
for (const r of
|
|
711
|
+
for (const r of za(
|
|
705
712
|
e,
|
|
706
713
|
(l) => l.therapy.map((c) => c.id)
|
|
707
714
|
)) {
|
|
@@ -720,7 +727,7 @@ function ns(e, n) {
|
|
|
720
727
|
}
|
|
721
728
|
return { visits: [...e], numeric: a, pathologies: i, medications: s, texts: o };
|
|
722
729
|
}
|
|
723
|
-
function
|
|
730
|
+
function za(e, n) {
|
|
724
731
|
const a = [];
|
|
725
732
|
for (const i of e)
|
|
726
733
|
for (const s of n(i)) a.includes(s) || a.push(s);
|
|
@@ -729,15 +736,15 @@ function Oa(e, n) {
|
|
|
729
736
|
function qn(e) {
|
|
730
737
|
return e.visits[e.visits.length - 1];
|
|
731
738
|
}
|
|
732
|
-
const De = "—",
|
|
739
|
+
const De = "—", Ma = /* @__PURE__ */ new Map();
|
|
733
740
|
function as(e, n) {
|
|
734
741
|
const a = `${e ?? ""}|${n}`;
|
|
735
|
-
let i =
|
|
742
|
+
let i = Ma.get(a);
|
|
736
743
|
return i || (i = new Intl.NumberFormat(e, {
|
|
737
744
|
minimumFractionDigits: n,
|
|
738
745
|
maximumFractionDigits: n,
|
|
739
746
|
useGrouping: !1
|
|
740
|
-
}),
|
|
747
|
+
}), Ma.set(a, i)), i;
|
|
741
748
|
}
|
|
742
749
|
function Ee(e, n = 1, a) {
|
|
743
750
|
return e == null || !Number.isFinite(e) ? De : as(a, n).format(e);
|
|
@@ -748,13 +755,13 @@ function ts(e, n) {
|
|
|
748
755
|
) : De;
|
|
749
756
|
}
|
|
750
757
|
function is(e, n) {
|
|
751
|
-
return cn(e) ? new Intl.DateTimeFormat(n,
|
|
758
|
+
return cn(e) ? new Intl.DateTimeFormat(n, lt).format(
|
|
752
759
|
new Date(e)
|
|
753
760
|
) : De;
|
|
754
761
|
}
|
|
755
762
|
function ss(e, n = 1, a) {
|
|
756
763
|
if (!Number.isFinite(e)) return De;
|
|
757
|
-
const i =
|
|
764
|
+
const i = ut(e, n);
|
|
758
765
|
return i === 0 ? "0" : `${i > 0 ? "+" : "−"}${Ee(Math.abs(i), n, a)}`;
|
|
759
766
|
}
|
|
760
767
|
function un(e, n) {
|
|
@@ -765,11 +772,11 @@ function Ie(e) {
|
|
|
765
772
|
const n = e.lng;
|
|
766
773
|
return typeof n == "string" ? n : void 0;
|
|
767
774
|
}
|
|
768
|
-
function
|
|
775
|
+
function re(e, n) {
|
|
769
776
|
const a = Ie(n);
|
|
770
777
|
return ln(e) ? is(e, a) : ts(e, a);
|
|
771
778
|
}
|
|
772
|
-
function
|
|
779
|
+
function mt(e) {
|
|
773
780
|
const [n, a, i] = e.slice(0, 10).split("-").map(Number);
|
|
774
781
|
if (!(!n || !a || !i))
|
|
775
782
|
return new Date(n, a - 1, i);
|
|
@@ -781,11 +788,11 @@ function rs(e) {
|
|
|
781
788
|
const n = (a) => String(a).padStart(2, "0");
|
|
782
789
|
return `${e.getFullYear()}-${n(e.getMonth() + 1)}-${n(e.getDate())}`;
|
|
783
790
|
}
|
|
784
|
-
function
|
|
791
|
+
function pt(e, n, a, i = !1) {
|
|
785
792
|
const s = a("anamnesis.compare.visitOption", {
|
|
786
793
|
index: n + 1,
|
|
787
794
|
visitType: a(`anamnesis.visitType.${e.visitType}`),
|
|
788
|
-
date:
|
|
795
|
+
date: re(e.dateIso, a)
|
|
789
796
|
});
|
|
790
797
|
return i ? a("anamnesis.window.optionHasNote", { label: s }) : s;
|
|
791
798
|
}
|
|
@@ -808,25 +815,25 @@ function Te(e, n) {
|
|
|
808
815
|
const a = ze(e, n);
|
|
809
816
|
return e.unit ? `${a} (${e.unit})` : a;
|
|
810
817
|
}
|
|
811
|
-
function
|
|
818
|
+
function ge(e, n) {
|
|
812
819
|
return wn(e.label) ?? n(`anamnesis.field.${e.key}.label`, { defaultValue: e.key });
|
|
813
820
|
}
|
|
814
821
|
function cs(e, n) {
|
|
815
|
-
const a =
|
|
822
|
+
const a = ge(e, n);
|
|
816
823
|
return e.unit ? `${a} (${e.unit})` : a;
|
|
817
824
|
}
|
|
818
|
-
function
|
|
825
|
+
function ht(e, n) {
|
|
819
826
|
const a = wn(e.helpText);
|
|
820
827
|
return a || n(`anamnesis.field.${e.key}.help`, { defaultValue: "" }) || void 0;
|
|
821
828
|
}
|
|
822
829
|
function fe(e, n) {
|
|
823
830
|
return wn(e.label) ?? n(`anamnesis.section.${e.key}`, { defaultValue: e.key });
|
|
824
831
|
}
|
|
825
|
-
function
|
|
832
|
+
function ya(e, n, a) {
|
|
826
833
|
return wn(a == null ? void 0 : a.label) ?? n(Oi(e), { defaultValue: e });
|
|
827
834
|
}
|
|
828
835
|
function Se(e, n, a) {
|
|
829
|
-
const i =
|
|
836
|
+
const i = ya(e, n, a);
|
|
830
837
|
return i === e ? e : `${e} — ${i}`;
|
|
831
838
|
}
|
|
832
839
|
function Xe(e) {
|
|
@@ -916,7 +923,7 @@ function ms(e, n, a) {
|
|
|
916
923
|
const i = n(e.key);
|
|
917
924
|
return !i || !Xe(i) ? null : {
|
|
918
925
|
key: e.key,
|
|
919
|
-
label:
|
|
926
|
+
label: ge(e, a),
|
|
920
927
|
value: Bn(i, e, a)
|
|
921
928
|
};
|
|
922
929
|
}
|
|
@@ -927,7 +934,7 @@ function ps(e, n, a) {
|
|
|
927
934
|
const r = n(o.key);
|
|
928
935
|
!r || r.kind !== "yesNo" || r.present !== "yes" || i.push({
|
|
929
936
|
key: o.key,
|
|
930
|
-
label:
|
|
937
|
+
label: ge(o, a),
|
|
931
938
|
value: ((s = r.detail) == null ? void 0 : s.trim()) || a("anamnesis.common.yes")
|
|
932
939
|
});
|
|
933
940
|
}
|
|
@@ -949,7 +956,7 @@ function hs(e, n, a, i) {
|
|
|
949
956
|
}
|
|
950
957
|
return { groups: r, answered: l, total: s.length };
|
|
951
958
|
}
|
|
952
|
-
function
|
|
959
|
+
function gt(e, n, a, i) {
|
|
953
960
|
const s = [];
|
|
954
961
|
for (const o of e)
|
|
955
962
|
for (const r of o.fields) {
|
|
@@ -958,7 +965,7 @@ function ft(e, n, a, i) {
|
|
|
958
965
|
l && Xe(l) || s.push({
|
|
959
966
|
key: r.key,
|
|
960
967
|
sectionKey: o.key,
|
|
961
|
-
label:
|
|
968
|
+
label: ge(r, i)
|
|
962
969
|
});
|
|
963
970
|
}
|
|
964
971
|
return s;
|
|
@@ -971,7 +978,7 @@ function fs(e, n) {
|
|
|
971
978
|
return i ? (i.focus(), !0) : !1;
|
|
972
979
|
}
|
|
973
980
|
const vs = 4;
|
|
974
|
-
function
|
|
981
|
+
function ft() {
|
|
975
982
|
const e = we(null), [n, a] = z(null);
|
|
976
983
|
on(() => {
|
|
977
984
|
if (n == null) return;
|
|
@@ -992,7 +999,7 @@ function vt() {
|
|
|
992
999
|
const i = tn((s) => a(s), []);
|
|
993
1000
|
return { containerRef: e, requestJump: i };
|
|
994
1001
|
}
|
|
995
|
-
function
|
|
1002
|
+
function vt({
|
|
996
1003
|
missing: e,
|
|
997
1004
|
t: n,
|
|
998
1005
|
onJump: a,
|
|
@@ -1012,7 +1019,7 @@ function yt({
|
|
|
1012
1019
|
/* @__PURE__ */ t(He.Title, { as: "p", children: n("anamnesis.digest.missing.title", { count: e.length }) }),
|
|
1013
1020
|
/* @__PURE__ */ t(He.Description, { children: n("anamnesis.digest.missing.list", { list: l }) }),
|
|
1014
1021
|
/* @__PURE__ */ t(He.Action, { children: /* @__PURE__ */ t(
|
|
1015
|
-
|
|
1022
|
+
ne,
|
|
1016
1023
|
{
|
|
1017
1024
|
intent: "tonal",
|
|
1018
1025
|
size: "sm",
|
|
@@ -1068,7 +1075,7 @@ function bs({ digest: e, t: n }) {
|
|
|
1068
1075
|
}
|
|
1069
1076
|
);
|
|
1070
1077
|
}
|
|
1071
|
-
const xs =
|
|
1078
|
+
const xs = et(
|
|
1072
1079
|
"type-meta ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:tabular-nums",
|
|
1073
1080
|
{
|
|
1074
1081
|
variants: {
|
|
@@ -1085,7 +1092,7 @@ const xs = nt(
|
|
|
1085
1092
|
);
|
|
1086
1093
|
function Un({ delta: e, def: n, t: a }) {
|
|
1087
1094
|
if (!e) return null;
|
|
1088
|
-
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");
|
|
1089
1096
|
return /* @__PURE__ */ d(
|
|
1090
1097
|
"span",
|
|
1091
1098
|
{
|
|
@@ -1102,10 +1109,10 @@ function Un({ delta: e, def: n, t: a }) {
|
|
|
1102
1109
|
}
|
|
1103
1110
|
);
|
|
1104
1111
|
}
|
|
1105
|
-
function
|
|
1106
|
-
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") });
|
|
1107
1114
|
}
|
|
1108
|
-
function
|
|
1115
|
+
function ba({
|
|
1109
1116
|
flag: e,
|
|
1110
1117
|
t: n,
|
|
1111
1118
|
compact: a = !1
|
|
@@ -1113,12 +1120,12 @@ function xa({
|
|
|
1113
1120
|
if (!e) return null;
|
|
1114
1121
|
const i = n(e === "high" ? "anamnesis.range.aboveRange" : "anamnesis.range.belowRange");
|
|
1115
1122
|
return /* @__PURE__ */ t(
|
|
1116
|
-
|
|
1123
|
+
X,
|
|
1117
1124
|
{
|
|
1118
1125
|
variant: "warning",
|
|
1119
1126
|
size: "sm",
|
|
1120
1127
|
withDot: !0,
|
|
1121
|
-
leading: /* @__PURE__ */ t(e === "high" ?
|
|
1128
|
+
leading: /* @__PURE__ */ t(e === "high" ? nt : at, { "aria-hidden": "true" }),
|
|
1122
1129
|
"aria-label": i,
|
|
1123
1130
|
children: a ? null : i
|
|
1124
1131
|
}
|
|
@@ -1129,7 +1136,7 @@ const ks = {
|
|
|
1129
1136
|
bad: "var(--error)",
|
|
1130
1137
|
neutral: "var(--muted-foreground)"
|
|
1131
1138
|
};
|
|
1132
|
-
function
|
|
1139
|
+
function bt({
|
|
1133
1140
|
series: e,
|
|
1134
1141
|
def: n,
|
|
1135
1142
|
t: a,
|
|
@@ -1154,8 +1161,8 @@ function xt({
|
|
|
1154
1161
|
}
|
|
1155
1162
|
);
|
|
1156
1163
|
}
|
|
1157
|
-
const
|
|
1158
|
-
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({
|
|
1159
1166
|
intake: e,
|
|
1160
1167
|
sections: n,
|
|
1161
1168
|
sex: a,
|
|
@@ -1174,10 +1181,10 @@ function wt({
|
|
|
1174
1181
|
/* @__PURE__ */ t(_, { layout: "stacked", density: "compact", divider: "between", children: r.map((l) => {
|
|
1175
1182
|
const c = e.answers[l.key];
|
|
1176
1183
|
return c ? /* @__PURE__ */ d(_.Row, { children: [
|
|
1177
|
-
/* @__PURE__ */ t(_.Term, { children:
|
|
1184
|
+
/* @__PURE__ */ t(_.Term, { children: ge(l, i) }),
|
|
1178
1185
|
/* @__PURE__ */ t(_.Detail, { children: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1179
1186
|
/* @__PURE__ */ t("span", { children: Bn(c.value, l, i) }),
|
|
1180
|
-
c.origin === "patient" ? /* @__PURE__ */ t(
|
|
1187
|
+
c.origin === "patient" ? /* @__PURE__ */ t(yt, { t: i }) : null
|
|
1181
1188
|
] }) })
|
|
1182
1189
|
] }, l.key) : null;
|
|
1183
1190
|
}) })
|
|
@@ -1204,7 +1211,7 @@ function ws({
|
|
|
1204
1211
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: r("anamnesis.section.patientIntake") }),
|
|
1205
1212
|
e ? /* @__PURE__ */ d(Ae, { children: [
|
|
1206
1213
|
s.length > 0 ? /* @__PURE__ */ t(
|
|
1207
|
-
|
|
1214
|
+
vt,
|
|
1208
1215
|
{
|
|
1209
1216
|
missing: s,
|
|
1210
1217
|
t: r,
|
|
@@ -1213,22 +1220,22 @@ function ws({
|
|
|
1213
1220
|
}
|
|
1214
1221
|
) : null,
|
|
1215
1222
|
/* @__PURE__ */ t(bs, { digest: i, t: r }),
|
|
1216
|
-
/* @__PURE__ */ d(
|
|
1223
|
+
/* @__PURE__ */ d(ca, { variant: "default", children: [
|
|
1217
1224
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: /* @__PURE__ */ d(
|
|
1218
|
-
|
|
1225
|
+
Za,
|
|
1219
1226
|
{
|
|
1220
1227
|
"data-testid": "anamnesis-summary-full",
|
|
1221
|
-
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,
|
|
1222
1229
|
children: [
|
|
1223
1230
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1224
1231
|
r("anamnesis.summary.fullQuestionnaire"),
|
|
1225
|
-
/* @__PURE__ */ t(
|
|
1232
|
+
/* @__PURE__ */ t(X, { variant: "neutral", size: "sm", children: r("anamnesis.intake.sectionProgress", {
|
|
1226
1233
|
answered: i.answered,
|
|
1227
1234
|
total: i.total
|
|
1228
1235
|
}) })
|
|
1229
1236
|
] }),
|
|
1230
1237
|
/* @__PURE__ */ t(
|
|
1231
|
-
|
|
1238
|
+
ma,
|
|
1232
1239
|
{
|
|
1233
1240
|
"aria-hidden": "true",
|
|
1234
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"
|
|
@@ -1238,11 +1245,11 @@ function ws({
|
|
|
1238
1245
|
}
|
|
1239
1246
|
) }),
|
|
1240
1247
|
/* @__PURE__ */ t(
|
|
1241
|
-
|
|
1248
|
+
da,
|
|
1242
1249
|
{
|
|
1243
1250
|
"aria-label": r("anamnesis.summary.fullQuestionnaire"),
|
|
1244
1251
|
children: /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-md)]", children: /* @__PURE__ */ t(
|
|
1245
|
-
|
|
1252
|
+
kt,
|
|
1246
1253
|
{
|
|
1247
1254
|
intake: e,
|
|
1248
1255
|
sections: n,
|
|
@@ -1265,7 +1272,7 @@ const Ns = [
|
|
|
1265
1272
|
"pathologies",
|
|
1266
1273
|
"therapy",
|
|
1267
1274
|
"proposal"
|
|
1268
|
-
],
|
|
1275
|
+
], wt = [
|
|
1269
1276
|
"oncological",
|
|
1270
1277
|
"labs",
|
|
1271
1278
|
"fmd",
|
|
@@ -1292,7 +1299,7 @@ function Ss(e) {
|
|
|
1292
1299
|
const n = e.annualProgramme;
|
|
1293
1300
|
return n && (n.proposed || n.accepted) ? 1 : 0;
|
|
1294
1301
|
}
|
|
1295
|
-
function
|
|
1302
|
+
function Oa(e, n = []) {
|
|
1296
1303
|
const a = e ? Ts(e, n) : [], i = (e == null ? void 0 : e.visitType) === "first", s = {
|
|
1297
1304
|
oncological: e ? Cs(e) : 0,
|
|
1298
1305
|
labs: a.length,
|
|
@@ -1306,7 +1313,7 @@ function Va(e, n = []) {
|
|
|
1306
1313
|
}, r = {};
|
|
1307
1314
|
for (const l of Ns)
|
|
1308
1315
|
r[l] = { open: !0, fill: null, flagged: 0 };
|
|
1309
|
-
for (const l of
|
|
1316
|
+
for (const l of wt)
|
|
1310
1317
|
r[l] = { open: i, fill: s[l], flagged: o[l] };
|
|
1311
1318
|
return r;
|
|
1312
1319
|
}
|
|
@@ -1321,7 +1328,7 @@ function Kn(e) {
|
|
|
1321
1328
|
return a ? [{ field: n, text: a }] : [];
|
|
1322
1329
|
});
|
|
1323
1330
|
}
|
|
1324
|
-
function
|
|
1331
|
+
function Nt(e) {
|
|
1325
1332
|
return Kn(e).length > 0;
|
|
1326
1333
|
}
|
|
1327
1334
|
function Es({
|
|
@@ -1341,14 +1348,14 @@ function Is({
|
|
|
1341
1348
|
onOpenNote: i
|
|
1342
1349
|
}) {
|
|
1343
1350
|
if (Kn(e).length === 0) return null;
|
|
1344
|
-
const o = n(`anamnesis.visitType.${e.visitType}`), r =
|
|
1351
|
+
const o = n(`anamnesis.visitType.${e.visitType}`), r = re(e.dateIso, n), l = n(
|
|
1345
1352
|
i ? "anamnesis.visitNote.openInPanel" : "anamnesis.visitNote.trigger",
|
|
1346
1353
|
{ visitType: o, date: r }
|
|
1347
1354
|
);
|
|
1348
1355
|
return i ? /* @__PURE__ */ t(
|
|
1349
|
-
|
|
1356
|
+
ce,
|
|
1350
1357
|
{
|
|
1351
|
-
icon: /* @__PURE__ */ t(
|
|
1358
|
+
icon: /* @__PURE__ */ t(La, { "aria-hidden": "true" }),
|
|
1352
1359
|
intent: "ghost",
|
|
1353
1360
|
size: "sm",
|
|
1354
1361
|
"aria-label": l,
|
|
@@ -1357,9 +1364,9 @@ function Is({
|
|
|
1357
1364
|
}
|
|
1358
1365
|
) : /* @__PURE__ */ d(ye, { defaultOpen: a, children: [
|
|
1359
1366
|
/* @__PURE__ */ t(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1360
|
-
|
|
1367
|
+
ce,
|
|
1361
1368
|
{
|
|
1362
|
-
icon: /* @__PURE__ */ t(
|
|
1369
|
+
icon: /* @__PURE__ */ t(La, { "aria-hidden": "true" }),
|
|
1363
1370
|
intent: "ghost",
|
|
1364
1371
|
size: "sm",
|
|
1365
1372
|
"aria-label": l,
|
|
@@ -1408,8 +1415,8 @@ function Is({
|
|
|
1408
1415
|
)
|
|
1409
1416
|
] });
|
|
1410
1417
|
}
|
|
1411
|
-
const
|
|
1412
|
-
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({
|
|
1413
1420
|
column: e,
|
|
1414
1421
|
t: n,
|
|
1415
1422
|
emphasised: a = !1,
|
|
@@ -1425,7 +1432,7 @@ function St({
|
|
|
1425
1432
|
scope: "col",
|
|
1426
1433
|
className: [
|
|
1427
1434
|
bn,
|
|
1428
|
-
|
|
1435
|
+
Ct,
|
|
1429
1436
|
a ? "ds:bg-[color:var(--muted)]" : "ds:bg-[color:var(--card)]"
|
|
1430
1437
|
].join(" "),
|
|
1431
1438
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
@@ -1459,20 +1466,20 @@ function St({
|
|
|
1459
1466
|
) : null,
|
|
1460
1467
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
1461
1468
|
/* @__PURE__ */ t(
|
|
1462
|
-
|
|
1469
|
+
X,
|
|
1463
1470
|
{
|
|
1464
1471
|
variant: l.visitType === "first" ? "brand" : "neutral",
|
|
1465
1472
|
size: "sm",
|
|
1466
1473
|
children: n(`anamnesis.visitType.${l.visitType}`)
|
|
1467
1474
|
}
|
|
1468
1475
|
),
|
|
1469
|
-
i ? /* @__PURE__ */ t(
|
|
1476
|
+
i ? /* @__PURE__ */ t(X, { variant: "accentSoft", size: "sm", children: n("anamnesis.grid.editable") }) : null
|
|
1470
1477
|
] })
|
|
1471
1478
|
] })
|
|
1472
1479
|
}
|
|
1473
1480
|
);
|
|
1474
1481
|
}
|
|
1475
|
-
function
|
|
1482
|
+
function St({
|
|
1476
1483
|
captionId: e,
|
|
1477
1484
|
caption: n,
|
|
1478
1485
|
identityLabel: a,
|
|
@@ -1504,7 +1511,7 @@ function At({
|
|
|
1504
1511
|
"th",
|
|
1505
1512
|
{
|
|
1506
1513
|
scope: "col",
|
|
1507
|
-
className: `${
|
|
1514
|
+
className: `${xa} ${Rs}`,
|
|
1508
1515
|
children: a
|
|
1509
1516
|
}
|
|
1510
1517
|
),
|
|
@@ -1515,9 +1522,9 @@ function At({
|
|
|
1515
1522
|
scope: "col",
|
|
1516
1523
|
"data-testid": s,
|
|
1517
1524
|
className: [
|
|
1518
|
-
|
|
1525
|
+
ka,
|
|
1519
1526
|
"type-label ds:bg-[color:var(--card)]",
|
|
1520
|
-
|
|
1527
|
+
Ct
|
|
1521
1528
|
].join(" "),
|
|
1522
1529
|
children: i
|
|
1523
1530
|
}
|
|
@@ -1556,19 +1563,19 @@ function At({
|
|
|
1556
1563
|
}
|
|
1557
1564
|
);
|
|
1558
1565
|
}
|
|
1559
|
-
const
|
|
1566
|
+
const qa = 160, Ps = {
|
|
1560
1567
|
added: "success",
|
|
1561
1568
|
removed: "error",
|
|
1562
1569
|
changed: "info",
|
|
1563
1570
|
notMeasured: "neutral"
|
|
1564
1571
|
};
|
|
1565
|
-
function
|
|
1572
|
+
function wa(e) {
|
|
1566
1573
|
const n = e[0], a = e[e.length - 1];
|
|
1567
1574
|
return !n && a ? "added" : n && !a ? "removed" : "changed";
|
|
1568
1575
|
}
|
|
1569
1576
|
function _s(e) {
|
|
1570
1577
|
const n = e.trim();
|
|
1571
|
-
return n ? n.length >
|
|
1578
|
+
return n ? n.length > qa ? `${n.slice(0, qa).trimEnd()}…` : n : De;
|
|
1572
1579
|
}
|
|
1573
1580
|
function $s(e, n, a) {
|
|
1574
1581
|
var s;
|
|
@@ -1600,7 +1607,7 @@ function zs(e, { t: n, seriesByKey: a }) {
|
|
|
1600
1607
|
function Ms(e, { t: n, pathologies: a }) {
|
|
1601
1608
|
const i = n("anamnesis.compare.present");
|
|
1602
1609
|
return e.pathologies.map((s) => {
|
|
1603
|
-
const o =
|
|
1610
|
+
const o = wa(s.present);
|
|
1604
1611
|
return {
|
|
1605
1612
|
id: `pathology:${s.code}`,
|
|
1606
1613
|
categoryId: "pathology",
|
|
@@ -1617,7 +1624,7 @@ function Os(e, { t: n }) {
|
|
|
1617
1624
|
var l;
|
|
1618
1625
|
const s = i.entries.filter(
|
|
1619
1626
|
(c) => c != null
|
|
1620
|
-
), 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));
|
|
1621
1628
|
return {
|
|
1622
1629
|
id: `therapy:${i.id}`,
|
|
1623
1630
|
categoryId: "therapy",
|
|
@@ -1636,7 +1643,7 @@ function qs(e, { t: n }) {
|
|
|
1636
1643
|
return e.texts.flatMap((a) => {
|
|
1637
1644
|
const i = a.values.map(_s);
|
|
1638
1645
|
if (i.every((o) => o === i[0])) return [];
|
|
1639
|
-
const s =
|
|
1646
|
+
const s = wa(i.map((o) => o !== De));
|
|
1640
1647
|
return [
|
|
1641
1648
|
{
|
|
1642
1649
|
id: `note:${a.field}`,
|
|
@@ -1661,7 +1668,7 @@ function Bs(e, n) {
|
|
|
1661
1668
|
return Vs.flatMap((a) => a.rows(e, n));
|
|
1662
1669
|
}
|
|
1663
1670
|
function Us({ row: e, t: n }) {
|
|
1664
|
-
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 });
|
|
1665
1672
|
}
|
|
1666
1673
|
function Ks({
|
|
1667
1674
|
visits: e,
|
|
@@ -1680,7 +1687,7 @@ function Ks({
|
|
|
1680
1687
|
const p = Qe(), [k, v] = z(""), f = q(
|
|
1681
1688
|
() => e.map((T, L) => ({
|
|
1682
1689
|
value: T.id,
|
|
1683
|
-
label:
|
|
1690
|
+
label: pt(T, L, u)
|
|
1684
1691
|
})),
|
|
1685
1692
|
[e, u]
|
|
1686
1693
|
), C = q(
|
|
@@ -1690,13 +1697,13 @@ function Ks({
|
|
|
1690
1697
|
var m, N;
|
|
1691
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", {
|
|
1692
1699
|
total: n.length,
|
|
1693
|
-
from: T ?
|
|
1694
|
-
to: L ?
|
|
1700
|
+
from: T ? re(T, u) : "",
|
|
1701
|
+
to: L ? re(L, u) : ""
|
|
1695
1702
|
});
|
|
1696
1703
|
return n.length === 2 ? `${S} · ${u("anamnesis.compare.minimum")}` : S;
|
|
1697
1704
|
}, [n, u]), A = q(
|
|
1698
1705
|
() => n.map((T) => /* @__PURE__ */ t(
|
|
1699
|
-
|
|
1706
|
+
Tt,
|
|
1700
1707
|
{
|
|
1701
1708
|
column: T,
|
|
1702
1709
|
t: u,
|
|
@@ -1719,7 +1726,7 @@ function Ks({
|
|
|
1719
1726
|
"th",
|
|
1720
1727
|
{
|
|
1721
1728
|
scope: "row",
|
|
1722
|
-
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}`,
|
|
1723
1730
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1724
1731
|
/* @__PURE__ */ t("span", { className: "type-label ds:break-words ds:text-[color:var(--foreground)]", children: S.item }),
|
|
1725
1732
|
S.meta ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: S.meta }) : null
|
|
@@ -1737,8 +1744,8 @@ function Ks({
|
|
|
1737
1744
|
((x = n[N]) == null ? void 0 : x.key) ?? N
|
|
1738
1745
|
);
|
|
1739
1746
|
}),
|
|
1740
|
-
trend: /* @__PURE__ */ t("td", { className: `${
|
|
1741
|
-
|
|
1747
|
+
trend: /* @__PURE__ */ t("td", { className: `${ka} ${je}`, children: S.series && S.def ? /* @__PURE__ */ t(
|
|
1748
|
+
bt,
|
|
1742
1749
|
{
|
|
1743
1750
|
series: S.series,
|
|
1744
1751
|
def: S.def,
|
|
@@ -1762,7 +1769,7 @@ function Ks({
|
|
|
1762
1769
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]", children: [
|
|
1763
1770
|
/* @__PURE__ */ t("h3", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: u("anamnesis.compare.panelTitle") }),
|
|
1764
1771
|
h ? /* @__PURE__ */ t(
|
|
1765
|
-
|
|
1772
|
+
ne,
|
|
1766
1773
|
{
|
|
1767
1774
|
intent: "outline",
|
|
1768
1775
|
"data-testid": "anamnesis-compare-close",
|
|
@@ -1784,7 +1791,7 @@ function Ks({
|
|
|
1784
1791
|
label: u("anamnesis.compare.visitsLabel"),
|
|
1785
1792
|
description: w,
|
|
1786
1793
|
children: /* @__PURE__ */ t(
|
|
1787
|
-
|
|
1794
|
+
ua,
|
|
1788
1795
|
{
|
|
1789
1796
|
options: f,
|
|
1790
1797
|
value: [...a],
|
|
@@ -1820,8 +1827,8 @@ function Ks({
|
|
|
1820
1827
|
"data-testid": "anamnesis-compare-summary",
|
|
1821
1828
|
children: s ? /* @__PURE__ */ d(Ae, { children: [
|
|
1822
1829
|
/* @__PURE__ */ t("h4", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: u("anamnesis.compare.summaryTitle", {
|
|
1823
|
-
from:
|
|
1824
|
-
to:
|
|
1830
|
+
from: re(s.visits[0].dateIso, u),
|
|
1831
|
+
to: re(
|
|
1825
1832
|
s.visits[s.visits.length - 1].dateIso,
|
|
1826
1833
|
u
|
|
1827
1834
|
)
|
|
@@ -1835,7 +1842,7 @@ function Ks({
|
|
|
1835
1842
|
description: u("anamnesis.compare.noChangesDescription")
|
|
1836
1843
|
}
|
|
1837
1844
|
) : /* @__PURE__ */ t(
|
|
1838
|
-
|
|
1845
|
+
St,
|
|
1839
1846
|
{
|
|
1840
1847
|
captionId: p,
|
|
1841
1848
|
caption: u("anamnesis.compare.tableLabel"),
|
|
@@ -1854,13 +1861,13 @@ function Ks({
|
|
|
1854
1861
|
)
|
|
1855
1862
|
] });
|
|
1856
1863
|
}
|
|
1857
|
-
const
|
|
1864
|
+
const At = {
|
|
1858
1865
|
therapy: "cross",
|
|
1859
1866
|
diet: "circle",
|
|
1860
1867
|
fmd: "diamond",
|
|
1861
1868
|
surgery: "triangle",
|
|
1862
1869
|
lifestyle: "square"
|
|
1863
|
-
},
|
|
1870
|
+
}, Et = "neutral";
|
|
1864
1871
|
function Hs(e, n) {
|
|
1865
1872
|
const a = n.length - 1;
|
|
1866
1873
|
if (a < 1 || !cn(e.dateIso)) return null;
|
|
@@ -1883,13 +1890,13 @@ function Gs(e, n) {
|
|
|
1883
1890
|
return i == null ? [] : [{ event: a, position: i }];
|
|
1884
1891
|
}).sort((a, i) => a.position - i.position);
|
|
1885
1892
|
}
|
|
1886
|
-
function
|
|
1893
|
+
function oa(e, n) {
|
|
1887
1894
|
return n("anamnesis.event.chip", {
|
|
1888
1895
|
label: n(`anamnesis.event.label.${e.labelKey}`),
|
|
1889
|
-
date:
|
|
1896
|
+
date: re(e.dateIso, n)
|
|
1890
1897
|
});
|
|
1891
1898
|
}
|
|
1892
|
-
function
|
|
1899
|
+
function Dt(e, n) {
|
|
1893
1900
|
const a = n(`anamnesis.event.category.${e.category}`);
|
|
1894
1901
|
return e.sourceKey ? n("anamnesis.event.external", {
|
|
1895
1902
|
category: a,
|
|
@@ -1900,9 +1907,9 @@ function js(e, n, a) {
|
|
|
1900
1907
|
return e.filter((i) => n.has(i.event.id)).map(({ event: i, position: s }) => ({
|
|
1901
1908
|
id: i.id,
|
|
1902
1909
|
position: s,
|
|
1903
|
-
label:
|
|
1904
|
-
shape:
|
|
1905
|
-
tone:
|
|
1910
|
+
label: oa(i, a),
|
|
1911
|
+
shape: At[i.category],
|
|
1912
|
+
tone: Et
|
|
1906
1913
|
}));
|
|
1907
1914
|
}
|
|
1908
1915
|
function Ws({
|
|
@@ -1934,7 +1941,7 @@ function Ws({
|
|
|
1934
1941
|
const c = n.has(l.id);
|
|
1935
1942
|
return /* @__PURE__ */ d(ti, { children: [
|
|
1936
1943
|
/* @__PURE__ */ t(
|
|
1937
|
-
|
|
1944
|
+
ne,
|
|
1938
1945
|
{
|
|
1939
1946
|
size: "sm",
|
|
1940
1947
|
intent: c ? "primary" : "outline",
|
|
@@ -1944,20 +1951,20 @@ function Ws({
|
|
|
1944
1951
|
startIcon: /* @__PURE__ */ t(
|
|
1945
1952
|
mi,
|
|
1946
1953
|
{
|
|
1947
|
-
shape:
|
|
1948
|
-
tone:
|
|
1954
|
+
shape: At[l.category],
|
|
1955
|
+
tone: Et,
|
|
1949
1956
|
size: "sm"
|
|
1950
1957
|
}
|
|
1951
1958
|
),
|
|
1952
1959
|
onClick: () => a(l.id),
|
|
1953
|
-
children:
|
|
1960
|
+
children: oa(l, i)
|
|
1954
1961
|
}
|
|
1955
1962
|
),
|
|
1956
|
-
/* @__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) })
|
|
1957
1964
|
] }, l.id);
|
|
1958
1965
|
}),
|
|
1959
1966
|
/* @__PURE__ */ t("p", { className: "ds:sr-only", "aria-live": "polite", children: r.length === 0 ? i("anamnesis.event.noneShown") : i("anamnesis.event.shown", {
|
|
1960
|
-
list: r.map(({ event: l }) =>
|
|
1967
|
+
list: r.map(({ event: l }) => oa(l, i)).join(i("anamnesis.event.separator"))
|
|
1961
1968
|
}) })
|
|
1962
1969
|
]
|
|
1963
1970
|
}
|
|
@@ -1984,7 +1991,7 @@ function Fn(e, n, a = {}) {
|
|
|
1984
1991
|
lastIso: ((r = s[s.length - 1]) == null ? void 0 : r.visit.dateIso) ?? null
|
|
1985
1992
|
};
|
|
1986
1993
|
}
|
|
1987
|
-
function
|
|
1994
|
+
function It(e) {
|
|
1988
1995
|
return Fn(
|
|
1989
1996
|
e,
|
|
1990
1997
|
e.map((n) => n.id)
|
|
@@ -2028,7 +2035,7 @@ function Zs({
|
|
|
2028
2035
|
annotations: g,
|
|
2029
2036
|
onSelectAnnotation: p
|
|
2030
2037
|
}) {
|
|
2031
|
-
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 = [];
|
|
2032
2039
|
let T = null;
|
|
2033
2040
|
const L = (m) => (o == null ? void 0 : o.visitIds.has(m)) ?? !1;
|
|
2034
2041
|
if (f.forEach((m) => {
|
|
@@ -2037,19 +2044,19 @@ function Zs({
|
|
|
2037
2044
|
banner: a(`anamnesis.group.${m.def.group}`)
|
|
2038
2045
|
}));
|
|
2039
2046
|
const N = Js(m.def.referenceRange, a, v), x = A.map((P, $) => {
|
|
2040
|
-
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);
|
|
2041
2048
|
return /* @__PURE__ */ t(
|
|
2042
2049
|
"td",
|
|
2043
2050
|
{
|
|
2044
|
-
"data-changed":
|
|
2051
|
+
"data-changed": ae || void 0,
|
|
2045
2052
|
className: [
|
|
2046
2053
|
bn,
|
|
2047
2054
|
je,
|
|
2048
2055
|
"ds:tabular-nums",
|
|
2049
|
-
|
|
2056
|
+
me ? "ds:bg-[color:var(--muted)]/40" : "",
|
|
2050
2057
|
// Changed cells carry a fill tint AND a non-colour inline-start
|
|
2051
2058
|
// border bar so the change reads without relying on hue.
|
|
2052
|
-
|
|
2059
|
+
ae ? "ds:bg-[color:var(--info)]/10 ds:border-s-2 ds:border-[color:var(--info)]" : ""
|
|
2053
2060
|
].filter(Boolean).join(" "),
|
|
2054
2061
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
2055
2062
|
U ? /* @__PURE__ */ t(
|
|
@@ -2061,13 +2068,13 @@ function Zs({
|
|
|
2061
2068
|
"aria-label": a("anamnesis.grid.editCell", {
|
|
2062
2069
|
parameter: ze(m.def, a)
|
|
2063
2070
|
}),
|
|
2064
|
-
onChange: (
|
|
2071
|
+
onChange: (J) => s == null ? void 0 : s(F, m.def, J)
|
|
2065
2072
|
}
|
|
2066
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) }),
|
|
2067
2074
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
2068
|
-
H.outOfRange ? /* @__PURE__ */ t(
|
|
2069
|
-
|
|
2070
|
-
|
|
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
|
|
2071
2078
|
] })
|
|
2072
2079
|
] })
|
|
2073
2080
|
},
|
|
@@ -2082,7 +2089,7 @@ function Zs({
|
|
|
2082
2089
|
"th",
|
|
2083
2090
|
{
|
|
2084
2091
|
scope: "row",
|
|
2085
|
-
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}`,
|
|
2086
2093
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
2087
2094
|
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: ze(m.def, a) }),
|
|
2088
2095
|
/* @__PURE__ */ d("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: [
|
|
@@ -2100,8 +2107,8 @@ function Zs({
|
|
|
2100
2107
|
}
|
|
2101
2108
|
),
|
|
2102
2109
|
cells: x,
|
|
2103
|
-
trend: /* @__PURE__ */ t("td", { className: `${
|
|
2104
|
-
|
|
2110
|
+
trend: /* @__PURE__ */ t("td", { className: `${ka} ${je}`, children: /* @__PURE__ */ t(
|
|
2111
|
+
bt,
|
|
2105
2112
|
{
|
|
2106
2113
|
series: m.series,
|
|
2107
2114
|
def: m.def,
|
|
@@ -2129,7 +2136,7 @@ function Zs({
|
|
|
2129
2136
|
}
|
|
2130
2137
|
);
|
|
2131
2138
|
const S = A.map((m) => /* @__PURE__ */ t(
|
|
2132
|
-
|
|
2139
|
+
Tt,
|
|
2133
2140
|
{
|
|
2134
2141
|
column: m,
|
|
2135
2142
|
t: a,
|
|
@@ -2141,7 +2148,7 @@ function Zs({
|
|
|
2141
2148
|
m.key
|
|
2142
2149
|
));
|
|
2143
2150
|
return /* @__PURE__ */ t(
|
|
2144
|
-
|
|
2151
|
+
St,
|
|
2145
2152
|
{
|
|
2146
2153
|
captionId: k,
|
|
2147
2154
|
caption: a("anamnesis.grid.caption"),
|
|
@@ -2154,7 +2161,7 @@ function Zs({
|
|
|
2154
2161
|
}
|
|
2155
2162
|
);
|
|
2156
2163
|
}
|
|
2157
|
-
function
|
|
2164
|
+
function Na({
|
|
2158
2165
|
record: e,
|
|
2159
2166
|
t: n,
|
|
2160
2167
|
editable: a = !1,
|
|
@@ -2183,7 +2190,7 @@ function Ca({
|
|
|
2183
2190
|
() => c ? [...c] : fn(p)
|
|
2184
2191
|
), E = q(() => {
|
|
2185
2192
|
const O = $.filter(
|
|
2186
|
-
(G) => p.some((
|
|
2193
|
+
(G) => p.some((W) => W.id === G)
|
|
2187
2194
|
);
|
|
2188
2195
|
return O.length >= 2 ? O : fn(p);
|
|
2189
2196
|
}, [$, p]), H = q(
|
|
@@ -2194,25 +2201,25 @@ function Ca({
|
|
|
2194
2201
|
C
|
|
2195
2202
|
) : null, [R, H, C]), M = q(() => {
|
|
2196
2203
|
const O = /* @__PURE__ */ new Map();
|
|
2197
|
-
for (const G of
|
|
2204
|
+
for (const G of va(e, C))
|
|
2198
2205
|
O.set(G.def.key, G.series);
|
|
2199
2206
|
return O;
|
|
2200
|
-
}, [e, C]), [U,
|
|
2207
|
+
}, [e, C]), [U, Y] = z(
|
|
2201
2208
|
() => l ? [...l] : fn(p)
|
|
2202
|
-
),
|
|
2203
|
-
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));
|
|
2204
2211
|
return O.length > 0 ? O : fn(p);
|
|
2205
|
-
}, [U, p]),
|
|
2206
|
-
() => Fn(p,
|
|
2212
|
+
}, [U, p]), J = q(
|
|
2213
|
+
() => Fn(p, me, {
|
|
2207
2214
|
// A compared visit is always a column, so compare always marks its
|
|
2208
2215
|
// columns in the grid — comparing a visit the picker left out brings
|
|
2209
2216
|
// it back on screen rather than marking nothing.
|
|
2210
2217
|
alsoShowIds: R ? E : []
|
|
2211
2218
|
}),
|
|
2212
|
-
[p,
|
|
2219
|
+
[p, me, R, E]
|
|
2213
2220
|
), Re = q(
|
|
2214
|
-
() =>
|
|
2215
|
-
[
|
|
2221
|
+
() => J.columns.map((O) => O.visit.id),
|
|
2222
|
+
[J]
|
|
2216
2223
|
);
|
|
2217
2224
|
on(() => {
|
|
2218
2225
|
h == null || h(Re);
|
|
@@ -2220,34 +2227,34 @@ function Ca({
|
|
|
2220
2227
|
const D = q(
|
|
2221
2228
|
() => p.map((O, G) => ({
|
|
2222
2229
|
value: O.id,
|
|
2223
|
-
label:
|
|
2230
|
+
label: pt(O, G, n, Nt(O))
|
|
2224
2231
|
})),
|
|
2225
2232
|
[p, n]
|
|
2226
2233
|
), B = q(() => {
|
|
2227
|
-
const O =
|
|
2228
|
-
shown:
|
|
2229
|
-
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,
|
|
2230
2237
|
from: O,
|
|
2231
2238
|
to: G
|
|
2232
2239
|
}) : n("anamnesis.window.showingAll", {
|
|
2233
|
-
total:
|
|
2240
|
+
total: J.totalCount,
|
|
2234
2241
|
from: O,
|
|
2235
2242
|
to: G
|
|
2236
|
-
})], Je =
|
|
2237
|
-
return Je > 0 && be.push(n("anamnesis.window.addedByCompare", { added: Je })),
|
|
2238
|
-
}, [
|
|
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(
|
|
2239
2246
|
() => Gs(e.events, p),
|
|
2240
2247
|
[e.events, p]
|
|
2241
|
-
), [
|
|
2248
|
+
), [pe, de] = z(
|
|
2242
2249
|
() => u ? [...u] : []
|
|
2243
2250
|
), Le = q(() => {
|
|
2244
|
-
const O = new Set(
|
|
2245
|
-
return new Set(
|
|
2246
|
-
}, [
|
|
2247
|
-
() => js(
|
|
2248
|
-
[
|
|
2249
|
-
), Pe = (O) =>
|
|
2250
|
-
(G) => G.includes(O) ? G.filter((
|
|
2251
|
+
const O = new Set(ee.map((G) => G.event.id));
|
|
2252
|
+
return new Set(pe.filter((G) => O.has(G)));
|
|
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]
|
|
2251
2258
|
), Nn = q(
|
|
2252
2259
|
() => g ? (O) => g({ kind: "event", eventId: O }) : void 0,
|
|
2253
2260
|
[g]
|
|
@@ -2255,9 +2262,9 @@ function Ca({
|
|
|
2255
2262
|
if (!j) return null;
|
|
2256
2263
|
const O = /* @__PURE__ */ new Set();
|
|
2257
2264
|
for (const G of j.numeric)
|
|
2258
|
-
G.values.forEach((
|
|
2265
|
+
G.values.forEach((W, be) => {
|
|
2259
2266
|
const Je = be === 0 ? G.values[1] : G.values[be - 1];
|
|
2260
|
-
|
|
2267
|
+
W !== Je && O.add(`${j.visits[be].id}:${G.def.key}`);
|
|
2261
2268
|
});
|
|
2262
2269
|
return {
|
|
2263
2270
|
visitIds: new Set(j.visits.map((G) => G.id)),
|
|
@@ -2273,13 +2280,13 @@ function Ca({
|
|
|
2273
2280
|
description: n("anamnesis.empty.noVisits.description")
|
|
2274
2281
|
}
|
|
2275
2282
|
) }) : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2276
|
-
|
|
2283
|
+
ae || k ? /* @__PURE__ */ d(
|
|
2277
2284
|
"div",
|
|
2278
2285
|
{
|
|
2279
2286
|
"data-testid": "anamnesis-evolution-toolbar",
|
|
2280
2287
|
className: "ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-md)]",
|
|
2281
2288
|
children: [
|
|
2282
|
-
|
|
2289
|
+
ae ? /* @__PURE__ */ d(
|
|
2283
2290
|
"div",
|
|
2284
2291
|
{
|
|
2285
2292
|
"data-testid": "anamnesis-window-picker",
|
|
@@ -2291,14 +2298,14 @@ function Ca({
|
|
|
2291
2298
|
label: n("anamnesis.window.label"),
|
|
2292
2299
|
description: B,
|
|
2293
2300
|
children: /* @__PURE__ */ t(
|
|
2294
|
-
|
|
2301
|
+
ua,
|
|
2295
2302
|
{
|
|
2296
2303
|
options: D,
|
|
2297
|
-
value:
|
|
2304
|
+
value: me,
|
|
2298
2305
|
allowSelectAll: !0,
|
|
2299
2306
|
onChange: (O) => {
|
|
2300
2307
|
if (O.length > 0) {
|
|
2301
|
-
S(""),
|
|
2308
|
+
S(""), Y(O);
|
|
2302
2309
|
return;
|
|
2303
2310
|
}
|
|
2304
2311
|
S(n("anamnesis.window.minimum"));
|
|
@@ -2329,7 +2336,7 @@ function Ca({
|
|
|
2329
2336
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
2330
2337
|
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: "type-label ds:invisible", children: " " }),
|
|
2331
2338
|
/* @__PURE__ */ t(
|
|
2332
|
-
|
|
2339
|
+
ne,
|
|
2333
2340
|
{
|
|
2334
2341
|
ref: N,
|
|
2335
2342
|
id: f,
|
|
@@ -2350,7 +2357,7 @@ function Ca({
|
|
|
2350
2357
|
/* @__PURE__ */ t(
|
|
2351
2358
|
Ws,
|
|
2352
2359
|
{
|
|
2353
|
-
marks:
|
|
2360
|
+
marks: ee,
|
|
2354
2361
|
activeIds: Le,
|
|
2355
2362
|
onToggle: Pe,
|
|
2356
2363
|
t: n
|
|
@@ -2366,15 +2373,15 @@ function Ca({
|
|
|
2366
2373
|
onCellChange: i,
|
|
2367
2374
|
compare: mn,
|
|
2368
2375
|
framed: s,
|
|
2369
|
-
visitColumns:
|
|
2376
|
+
visitColumns: J.columns,
|
|
2370
2377
|
capturableKeys: w,
|
|
2371
2378
|
annotations: Fe,
|
|
2372
2379
|
onSelectAnnotation: Nn,
|
|
2373
2380
|
onOpenNote: g
|
|
2374
2381
|
}
|
|
2375
2382
|
),
|
|
2376
|
-
k ? /* @__PURE__ */ t(
|
|
2377
|
-
|
|
2383
|
+
k ? /* @__PURE__ */ t(ca, { open: R, onOpenChange: T, children: /* @__PURE__ */ t(
|
|
2384
|
+
da,
|
|
2378
2385
|
{
|
|
2379
2386
|
ref: m,
|
|
2380
2387
|
id: v,
|
|
@@ -2402,42 +2409,42 @@ function Ca({
|
|
|
2402
2409
|
) }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.compare.needTwoVisits") })
|
|
2403
2410
|
] });
|
|
2404
2411
|
}
|
|
2405
|
-
const Ce = ["clinician"],
|
|
2412
|
+
const Ce = ["clinician"], he = [
|
|
2406
2413
|
"clinician",
|
|
2407
2414
|
"patient"
|
|
2408
2415
|
], eo = [
|
|
2409
2416
|
{
|
|
2410
2417
|
id: "patient.identity",
|
|
2411
2418
|
surface: "intake",
|
|
2412
|
-
audiences:
|
|
2419
|
+
audiences: he,
|
|
2413
2420
|
rationale: "The patient supplied their own identifying details.",
|
|
2414
2421
|
status: "provisional"
|
|
2415
2422
|
},
|
|
2416
2423
|
{
|
|
2417
2424
|
id: "visit.date",
|
|
2418
2425
|
surface: "evolution",
|
|
2419
|
-
audiences:
|
|
2426
|
+
audiences: he,
|
|
2420
2427
|
rationale: "The patient attended the visit and knows when it happened.",
|
|
2421
2428
|
status: "provisional"
|
|
2422
2429
|
},
|
|
2423
2430
|
{
|
|
2424
2431
|
id: "visit.type",
|
|
2425
2432
|
surface: "evolution",
|
|
2426
|
-
audiences:
|
|
2433
|
+
audiences: he,
|
|
2427
2434
|
rationale: "First visit versus follow-up carries no clinical judgement.",
|
|
2428
2435
|
status: "provisional"
|
|
2429
2436
|
},
|
|
2430
2437
|
{
|
|
2431
2438
|
id: "visit.practitioner",
|
|
2432
2439
|
surface: "compile",
|
|
2433
|
-
audiences:
|
|
2440
|
+
audiences: he,
|
|
2434
2441
|
rationale: "The patient met the practitioner.",
|
|
2435
2442
|
status: "provisional"
|
|
2436
2443
|
},
|
|
2437
2444
|
{
|
|
2438
2445
|
id: "visit.reason",
|
|
2439
2446
|
surface: "compile",
|
|
2440
|
-
audiences:
|
|
2447
|
+
audiences: he,
|
|
2441
2448
|
rationale: "The human-readable reason for the visit is what the patient came for. Renders nothing today.",
|
|
2442
2449
|
status: "provisional"
|
|
2443
2450
|
},
|
|
@@ -2451,28 +2458,28 @@ const Ce = ["clinician"], pe = [
|
|
|
2451
2458
|
{
|
|
2452
2459
|
id: "intake.answers",
|
|
2453
2460
|
surface: "intake",
|
|
2454
|
-
audiences:
|
|
2461
|
+
audiences: he,
|
|
2455
2462
|
rationale: "The patient authored them.",
|
|
2456
2463
|
status: "provisional"
|
|
2457
2464
|
},
|
|
2458
2465
|
{
|
|
2459
2466
|
id: "anthropometrics.values",
|
|
2460
2467
|
surface: "compile",
|
|
2461
|
-
audiences:
|
|
2468
|
+
audiences: he,
|
|
2462
2469
|
rationale: "Measured with the patient present, and motivating to track.",
|
|
2463
2470
|
status: "provisional"
|
|
2464
2471
|
},
|
|
2465
2472
|
{
|
|
2466
2473
|
id: "dietary.intake",
|
|
2467
2474
|
surface: "compile",
|
|
2468
|
-
audiences:
|
|
2475
|
+
audiences: he,
|
|
2469
2476
|
rationale: "Estimated daily energy and protein describe what the patient eats — their own behaviour, and the thing the plan asks them to change.",
|
|
2470
2477
|
status: "provisional"
|
|
2471
2478
|
},
|
|
2472
2479
|
{
|
|
2473
2480
|
id: "derived.bmi",
|
|
2474
2481
|
surface: "compile",
|
|
2475
|
-
audiences:
|
|
2482
|
+
audiences: he,
|
|
2476
2483
|
rationale: "Derived from weight and height, both already disclosed.",
|
|
2477
2484
|
status: "provisional"
|
|
2478
2485
|
},
|
|
@@ -2500,14 +2507,14 @@ const Ce = ["clinician"], pe = [
|
|
|
2500
2507
|
{
|
|
2501
2508
|
id: "therapy.entries",
|
|
2502
2509
|
surface: "compile",
|
|
2503
|
-
audiences:
|
|
2510
|
+
audiences: he,
|
|
2504
2511
|
rationale: "The patient takes them and needs the list.",
|
|
2505
2512
|
status: "provisional"
|
|
2506
2513
|
},
|
|
2507
2514
|
{
|
|
2508
2515
|
id: "fmd.cycles",
|
|
2509
2516
|
surface: "compile",
|
|
2510
|
-
audiences:
|
|
2517
|
+
audiences: he,
|
|
2511
2518
|
rationale: "The patient follows the programme.",
|
|
2512
2519
|
status: "provisional"
|
|
2513
2520
|
},
|
|
@@ -2521,14 +2528,14 @@ const Ce = ["clinician"], pe = [
|
|
|
2521
2528
|
{
|
|
2522
2529
|
id: "notes.nutritionalProposal",
|
|
2523
2530
|
surface: "compile",
|
|
2524
|
-
audiences:
|
|
2531
|
+
audiences: he,
|
|
2525
2532
|
rationale: "This is the plan the patient is asked to follow.",
|
|
2526
2533
|
status: "provisional"
|
|
2527
2534
|
},
|
|
2528
2535
|
{
|
|
2529
2536
|
id: "annual.programme",
|
|
2530
2537
|
surface: "compile",
|
|
2531
|
-
audiences:
|
|
2538
|
+
audiences: he,
|
|
2532
2539
|
rationale: "The patient accepts or declines it.",
|
|
2533
2540
|
status: "provisional"
|
|
2534
2541
|
},
|
|
@@ -2549,7 +2556,7 @@ const Ce = ["clinician"], pe = [
|
|
|
2549
2556
|
{
|
|
2550
2557
|
id: "intake.digest",
|
|
2551
2558
|
surface: "compile",
|
|
2552
|
-
audiences:
|
|
2559
|
+
audiences: he,
|
|
2553
2560
|
rationale: "A summary of answers the patient wrote themselves.",
|
|
2554
2561
|
status: "provisional"
|
|
2555
2562
|
},
|
|
@@ -2577,7 +2584,7 @@ const Ce = ["clinician"], pe = [
|
|
|
2577
2584
|
{
|
|
2578
2585
|
id: "export.tabDocument",
|
|
2579
2586
|
surface: "export",
|
|
2580
|
-
audiences:
|
|
2587
|
+
audiences: he,
|
|
2581
2588
|
rationale: "The per-tab export ENVELOPE — a title, a meta block and a list of tables. It carries no clinical content of its own: every table inside is gated on the concept it renders, so this row decides only whether a file may be produced at all. The whole-record workbook stays reserved by export.workbook.",
|
|
2582
2589
|
status: "provisional"
|
|
2583
2590
|
}
|
|
@@ -2592,7 +2599,7 @@ const Hn = "export.tabDocument";
|
|
|
2592
2599
|
function te(e, n) {
|
|
2593
2600
|
return ao(n, e.audience) ? !0 : (e.withheld.add(n), !1);
|
|
2594
2601
|
}
|
|
2595
|
-
function
|
|
2602
|
+
function Rt(e) {
|
|
2596
2603
|
if (e.key === "bmi") return "derived.bmi";
|
|
2597
2604
|
switch (e.group) {
|
|
2598
2605
|
case "anthropometric":
|
|
@@ -2603,18 +2610,18 @@ function Lt(e) {
|
|
|
2603
2610
|
return "lab.values";
|
|
2604
2611
|
}
|
|
2605
2612
|
}
|
|
2606
|
-
function
|
|
2613
|
+
function Lt(e) {
|
|
2607
2614
|
return { kind: "section", cells: [e] };
|
|
2608
2615
|
}
|
|
2609
|
-
function
|
|
2616
|
+
function oe(e) {
|
|
2610
2617
|
const n = e == null ? void 0 : e.trim();
|
|
2611
2618
|
return n || null;
|
|
2612
2619
|
}
|
|
2613
|
-
function
|
|
2620
|
+
function Ft(e, n) {
|
|
2614
2621
|
const a = e.referenceRange;
|
|
2615
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;
|
|
2616
2623
|
}
|
|
2617
|
-
function
|
|
2624
|
+
function Pt(e, n) {
|
|
2618
2625
|
return e === "high" ? n("anamnesis.range.aboveRange") : e === "low" ? n("anamnesis.range.belowRange") : null;
|
|
2619
2626
|
}
|
|
2620
2627
|
function to(e) {
|
|
@@ -2635,45 +2642,45 @@ function Pn(e, n, a, i, s) {
|
|
|
2635
2642
|
a ?? ""
|
|
2636
2643
|
].filter(Boolean).join("-");
|
|
2637
2644
|
}
|
|
2638
|
-
function
|
|
2645
|
+
function Ca(e, n) {
|
|
2639
2646
|
return n(`anamnesis.export.audience.${e}`);
|
|
2640
2647
|
}
|
|
2641
2648
|
function io(e, n) {
|
|
2642
2649
|
return n(`anamnesis.export.tab.${e}`);
|
|
2643
2650
|
}
|
|
2644
|
-
function
|
|
2651
|
+
function _t(e, n) {
|
|
2645
2652
|
return n(`anamnesis.export.docTab.${e}`, {
|
|
2646
2653
|
defaultValue: io(e, n)
|
|
2647
2654
|
});
|
|
2648
2655
|
}
|
|
2649
|
-
function
|
|
2656
|
+
function Ta(e, n, a, i) {
|
|
2650
2657
|
const s = [], r = te(n, "patient.identity") ? `${e.patient.firstName} ${e.patient.lastName}`.trim() : null;
|
|
2651
2658
|
return r && (s.push({ label: a("anamnesis.header.name"), value: r }), s.push({
|
|
2652
2659
|
label: a("anamnesis.header.dob"),
|
|
2653
|
-
value:
|
|
2660
|
+
value: re(e.patient.dateOfBirthIso, a)
|
|
2654
2661
|
}), s.push({
|
|
2655
2662
|
label: a("anamnesis.header.age"),
|
|
2656
2663
|
value: Vn(e, a)
|
|
2657
2664
|
})), s.push({
|
|
2658
2665
|
label: a("anamnesis.export.generated"),
|
|
2659
|
-
value:
|
|
2666
|
+
value: re(i.slice(0, 10), a)
|
|
2660
2667
|
}), s.push({
|
|
2661
2668
|
label: a("anamnesis.export.audienceLabel"),
|
|
2662
|
-
value:
|
|
2669
|
+
value: Ca(n.audience, a)
|
|
2663
2670
|
}), { meta: s, patientName: r };
|
|
2664
2671
|
}
|
|
2665
2672
|
function _n(e, n, a) {
|
|
2666
|
-
const i =
|
|
2673
|
+
const i = _t(e, a);
|
|
2667
2674
|
return n ? a("anamnesis.export.docTitle", { tab: i, patient: n }) : i;
|
|
2668
2675
|
}
|
|
2669
|
-
function
|
|
2676
|
+
function Sa(e, n, a) {
|
|
2670
2677
|
return {
|
|
2671
2678
|
tab: e,
|
|
2672
2679
|
audience: n,
|
|
2673
2680
|
fileStem: `anamnesis-${e}-${n}`,
|
|
2674
|
-
title:
|
|
2681
|
+
title: _t(e, a),
|
|
2675
2682
|
patientName: null,
|
|
2676
|
-
audienceLabel:
|
|
2683
|
+
audienceLabel: Ca(n, a),
|
|
2677
2684
|
meta: [],
|
|
2678
2685
|
tables: [],
|
|
2679
2686
|
footnotes: [a("anamnesis.export.withheld")],
|
|
@@ -2685,7 +2692,7 @@ function $n(e, n, a, i = []) {
|
|
|
2685
2692
|
const s = [...n.withheld].sort(), o = [...i];
|
|
2686
2693
|
return s.length > 0 && o.push(a("anamnesis.export.withheld")), {
|
|
2687
2694
|
...e,
|
|
2688
|
-
audienceLabel:
|
|
2695
|
+
audienceLabel: Ca(n.audience, a),
|
|
2689
2696
|
footnotes: o,
|
|
2690
2697
|
withheld: s,
|
|
2691
2698
|
locale: Ie(a)
|
|
@@ -2695,20 +2702,20 @@ function so(e) {
|
|
|
2695
2702
|
var k;
|
|
2696
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() };
|
|
2697
2704
|
if (!te(r, Hn))
|
|
2698
|
-
return
|
|
2699
|
-
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;
|
|
2700
2707
|
if (te(r, "intake.answers") && g) {
|
|
2701
2708
|
const v = [];
|
|
2702
2709
|
for (const f of Ge(s)) {
|
|
2703
2710
|
const C = f.fields.filter((w) => un(w, n.patient.sex)).filter((w) => g.answers[w.key]);
|
|
2704
2711
|
if (C.length !== 0) {
|
|
2705
|
-
v.push(
|
|
2712
|
+
v.push(Lt(fe(f, i)));
|
|
2706
2713
|
for (const w of C) {
|
|
2707
2714
|
const A = g.answers[w.key];
|
|
2708
2715
|
A && v.push({
|
|
2709
2716
|
cells: [
|
|
2710
|
-
|
|
2711
|
-
|
|
2717
|
+
ge(w, i),
|
|
2718
|
+
oe(Bn(A.value, w, i)),
|
|
2712
2719
|
i(`anamnesis.export.source.${A.origin}`)
|
|
2713
2720
|
]
|
|
2714
2721
|
});
|
|
@@ -2753,14 +2760,14 @@ function Wn(e, n, a, i, s, o, r) {
|
|
|
2753
2760
|
const l = [];
|
|
2754
2761
|
let c = !1;
|
|
2755
2762
|
for (const h of a) {
|
|
2756
|
-
if (!te(s,
|
|
2763
|
+
if (!te(s, Rt(h))) continue;
|
|
2757
2764
|
c = !0;
|
|
2758
2765
|
const g = $e(i, h), p = [
|
|
2759
2766
|
ze(h, o),
|
|
2760
2767
|
g,
|
|
2761
2768
|
h.unit ?? null
|
|
2762
2769
|
];
|
|
2763
|
-
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 });
|
|
2764
2771
|
}
|
|
2765
2772
|
if (!c) return null;
|
|
2766
2773
|
const u = [
|
|
@@ -2788,8 +2795,8 @@ function Qn(e, n, a, i) {
|
|
|
2788
2795
|
function oo(e) {
|
|
2789
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() };
|
|
2790
2797
|
if (!te(r, Hn))
|
|
2791
|
-
return
|
|
2792
|
-
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 = [];
|
|
2793
2800
|
if (!u)
|
|
2794
2801
|
return g.push(i("anamnesis.export.none")), $n(
|
|
2795
2802
|
{
|
|
@@ -2813,7 +2820,7 @@ function oo(e) {
|
|
|
2813
2820
|
);
|
|
2814
2821
|
te(r, "visit.date") && l.push({
|
|
2815
2822
|
label: i("anamnesis.header.visitDate"),
|
|
2816
|
-
value:
|
|
2823
|
+
value: re(u.dateIso, i)
|
|
2817
2824
|
});
|
|
2818
2825
|
const p = [];
|
|
2819
2826
|
te(r, "visit.type") && p.push({
|
|
@@ -2824,12 +2831,12 @@ function oo(e) {
|
|
|
2824
2831
|
}), te(r, "visit.date") && p.push({
|
|
2825
2832
|
cells: [
|
|
2826
2833
|
i("anamnesis.header.visitDate"),
|
|
2827
|
-
|
|
2834
|
+
re(u.dateIso, i)
|
|
2828
2835
|
]
|
|
2829
2836
|
}), te(r, "visit.practitioner") && u.practitioner && p.push({
|
|
2830
2837
|
cells: [
|
|
2831
2838
|
i("anamnesis.field.practitioner.label"),
|
|
2832
|
-
|
|
2839
|
+
oe(u.practitioner)
|
|
2833
2840
|
]
|
|
2834
2841
|
}), p.length > 0 && h.push(
|
|
2835
2842
|
Qn("visit", i("anamnesis.section.visitMeta"), p, i)
|
|
@@ -2866,7 +2873,7 @@ function oo(e) {
|
|
|
2866
2873
|
}
|
|
2867
2874
|
],
|
|
2868
2875
|
rows: u.pathologyCodes.map((A) => ({
|
|
2869
|
-
cells: [A,
|
|
2876
|
+
cells: [A, ya(A, i, w[A])]
|
|
2870
2877
|
})),
|
|
2871
2878
|
emptyText: i("anamnesis.export.none")
|
|
2872
2879
|
});
|
|
@@ -2874,15 +2881,15 @@ function oo(e) {
|
|
|
2874
2881
|
if (te(r, "oncological.history")) {
|
|
2875
2882
|
const w = u.oncological, A = [];
|
|
2876
2883
|
if (w) {
|
|
2877
|
-
if (
|
|
2884
|
+
if (oe(w.tumourType) && A.push({
|
|
2878
2885
|
cells: [
|
|
2879
2886
|
i("anamnesis.field.tumourType.label"),
|
|
2880
|
-
|
|
2887
|
+
oe(w.tumourType)
|
|
2881
2888
|
]
|
|
2882
|
-
}),
|
|
2883
|
-
cells: [i("anamnesis.field.stage.label"),
|
|
2889
|
+
}), oe(w.stage) && A.push({
|
|
2890
|
+
cells: [i("anamnesis.field.stage.label"), oe(w.stage)]
|
|
2884
2891
|
}), w.metastases) {
|
|
2885
|
-
const R = i(`anamnesis.common.${w.metastases.present}`), T =
|
|
2892
|
+
const R = i(`anamnesis.common.${w.metastases.present}`), T = oe(w.metastases.site);
|
|
2886
2893
|
A.push({
|
|
2887
2894
|
cells: [
|
|
2888
2895
|
i("anamnesis.field.metastases.label"),
|
|
@@ -2890,10 +2897,10 @@ function oo(e) {
|
|
|
2890
2897
|
]
|
|
2891
2898
|
});
|
|
2892
2899
|
}
|
|
2893
|
-
|
|
2900
|
+
oe(w.treatmentStatus) && A.push({
|
|
2894
2901
|
cells: [
|
|
2895
2902
|
i("anamnesis.field.treatmentStatus.label"),
|
|
2896
|
-
|
|
2903
|
+
oe(w.treatmentStatus)
|
|
2897
2904
|
]
|
|
2898
2905
|
});
|
|
2899
2906
|
}
|
|
@@ -2916,8 +2923,8 @@ function oo(e) {
|
|
|
2916
2923
|
],
|
|
2917
2924
|
rows: u.therapy.map((w) => ({
|
|
2918
2925
|
cells: [
|
|
2919
|
-
|
|
2920
|
-
|
|
2926
|
+
oe(w.name),
|
|
2927
|
+
oe(w.dose),
|
|
2921
2928
|
i(`anamnesis.medKind.${w.kind}`)
|
|
2922
2929
|
]
|
|
2923
2930
|
})),
|
|
@@ -2944,9 +2951,9 @@ function oo(e) {
|
|
|
2944
2951
|
rows: u.fmdCycles.map((w) => ({
|
|
2945
2952
|
cells: [
|
|
2946
2953
|
i("anamnesis.compile.cycleNumber", { number: w.cycleNumber }),
|
|
2947
|
-
|
|
2954
|
+
re(w.startDateIso, i),
|
|
2948
2955
|
w.completed ? i("anamnesis.compile.cycleCompleted") : i("anamnesis.compile.cycleInProgress"),
|
|
2949
|
-
|
|
2956
|
+
oe(w.notes)
|
|
2950
2957
|
]
|
|
2951
2958
|
})),
|
|
2952
2959
|
emptyText: i("anamnesis.compile.noFmd")
|
|
@@ -2964,10 +2971,10 @@ function oo(e) {
|
|
|
2964
2971
|
i("anamnesis.field.annualAccepted.label"),
|
|
2965
2972
|
R(w.accepted)
|
|
2966
2973
|
]
|
|
2967
|
-
}),
|
|
2974
|
+
}), oe(w.declineReason) && A.push({
|
|
2968
2975
|
cells: [
|
|
2969
2976
|
i("anamnesis.field.annualDeclineReason.label"),
|
|
2970
|
-
|
|
2977
|
+
oe(w.declineReason)
|
|
2971
2978
|
]
|
|
2972
2979
|
});
|
|
2973
2980
|
}
|
|
@@ -2976,15 +2983,15 @@ function oo(e) {
|
|
|
2976
2983
|
);
|
|
2977
2984
|
}
|
|
2978
2985
|
const C = [];
|
|
2979
|
-
return te(r, "notes.nutritionalProposal") &&
|
|
2986
|
+
return te(r, "notes.nutritionalProposal") && oe(u.nutritionalProposal) && C.push({
|
|
2980
2987
|
cells: [
|
|
2981
2988
|
i("anamnesis.field.nutritionalProposal.label"),
|
|
2982
|
-
|
|
2989
|
+
oe(u.nutritionalProposal)
|
|
2983
2990
|
]
|
|
2984
|
-
}), te(r, "notes.clinicalNotes") &&
|
|
2991
|
+
}), te(r, "notes.clinicalNotes") && oe(u.clinicalNotes) && C.push({
|
|
2985
2992
|
cells: [
|
|
2986
2993
|
i("anamnesis.field.clinicalNotes.label"),
|
|
2987
|
-
|
|
2994
|
+
oe(u.clinicalNotes)
|
|
2988
2995
|
]
|
|
2989
2996
|
}), C.length > 0 && h.push({
|
|
2990
2997
|
id: "notes",
|
|
@@ -3021,8 +3028,8 @@ function ro(e, n, a) {
|
|
|
3021
3028
|
var r;
|
|
3022
3029
|
const o = ((r = e.cells[s.index]) == null ? void 0 : r.outOfRange) ?? null;
|
|
3023
3030
|
return o ? a("anamnesis.export.flagged", {
|
|
3024
|
-
date:
|
|
3025
|
-
flag:
|
|
3031
|
+
date: re(s.visit.dateIso, a),
|
|
3032
|
+
flag: Pt(o, a)
|
|
3026
3033
|
}) : null;
|
|
3027
3034
|
}).filter((s) => s != null);
|
|
3028
3035
|
return i.length === 0 ? null : i.join(a("anamnesis.export.listSeparator"));
|
|
@@ -3037,8 +3044,8 @@ function co(e) {
|
|
|
3037
3044
|
var C;
|
|
3038
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() };
|
|
3039
3046
|
if (!te(l, Hn))
|
|
3040
|
-
return
|
|
3041
|
-
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;
|
|
3042
3049
|
if (c.push({
|
|
3043
3050
|
label: i("anamnesis.export.visitsLabel"),
|
|
3044
3051
|
value: r === "all" ? i("anamnesis.export.visitsAll", { total: n.visits.length }) : i("anamnesis.export.visitsSelected", {
|
|
@@ -3046,7 +3053,7 @@ function co(e) {
|
|
|
3046
3053
|
total: n.visits.length
|
|
3047
3054
|
})
|
|
3048
3055
|
}), te(l, "visit.date") && v.length > 0) {
|
|
3049
|
-
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 = [
|
|
3050
3057
|
{ key: "parameter", header: i("anamnesis.grid.parameter") },
|
|
3051
3058
|
{ key: "unit", header: i("anamnesis.export.column.unit") },
|
|
3052
3059
|
{
|
|
@@ -3055,7 +3062,7 @@ function co(e) {
|
|
|
3055
3062
|
},
|
|
3056
3063
|
...v.map((N) => ({
|
|
3057
3064
|
key: `visit-${N.visit.id}`,
|
|
3058
|
-
header:
|
|
3065
|
+
header: re(N.visit.dateIso, i),
|
|
3059
3066
|
numeric: !0
|
|
3060
3067
|
})),
|
|
3061
3068
|
{
|
|
@@ -3075,12 +3082,12 @@ function co(e) {
|
|
|
3075
3082
|
], S = [];
|
|
3076
3083
|
let m = null;
|
|
3077
3084
|
for (const N of A)
|
|
3078
|
-
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({
|
|
3079
3086
|
precision: N.def.precision,
|
|
3080
3087
|
cells: [
|
|
3081
3088
|
ze(N.def, i),
|
|
3082
3089
|
N.def.unit ?? null,
|
|
3083
|
-
|
|
3090
|
+
Ft(N.def, i),
|
|
3084
3091
|
...v.map((x) => {
|
|
3085
3092
|
var P;
|
|
3086
3093
|
return ((P = N.cells[x.index]) == null ? void 0 : P.value) ?? null;
|
|
@@ -3135,13 +3142,13 @@ function mo(e, n) {
|
|
|
3135
3142
|
defaultValue: e
|
|
3136
3143
|
});
|
|
3137
3144
|
}
|
|
3138
|
-
function
|
|
3145
|
+
function Va(e, n) {
|
|
3139
3146
|
return {
|
|
3140
3147
|
included: e.tables.map((a) => a.title),
|
|
3141
3148
|
excluded: e.withheld.map((a) => mo(a, n)).sort((a, i) => a.localeCompare(i, e.locale))
|
|
3142
3149
|
};
|
|
3143
3150
|
}
|
|
3144
|
-
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
|
|
3145
3152
|
`, go = /^[=+\-@\t\r]/;
|
|
3146
3153
|
function fo(e) {
|
|
3147
3154
|
var n;
|
|
@@ -3154,8 +3161,8 @@ function fo(e) {
|
|
|
3154
3161
|
return ".";
|
|
3155
3162
|
}
|
|
3156
3163
|
}
|
|
3157
|
-
function
|
|
3158
|
-
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 };
|
|
3159
3166
|
}
|
|
3160
3167
|
function vo(e, n, a) {
|
|
3161
3168
|
if (!Number.isFinite(e)) return "";
|
|
@@ -3167,13 +3174,13 @@ function Oe(e, n) {
|
|
|
3167
3174
|
return a.includes(n.delimiter) || a.includes('"') || a.includes(`
|
|
3168
3175
|
`) || a.includes("\r") || a !== a.trim() ? `"${a.replace(/"/g, '""')}"` : a;
|
|
3169
3176
|
}
|
|
3170
|
-
function
|
|
3177
|
+
function Ua(e, n, a) {
|
|
3171
3178
|
return e == null ? "" : typeof e == "number" ? vo(e, a, n) : Oe(e, n);
|
|
3172
3179
|
}
|
|
3173
|
-
function
|
|
3180
|
+
function $t(e, n) {
|
|
3174
3181
|
return e.precision ?? (n == null ? void 0 : n.precision);
|
|
3175
3182
|
}
|
|
3176
|
-
function yo(e, n =
|
|
3183
|
+
function yo(e, n = Aa(e.locale)) {
|
|
3177
3184
|
const a = [], i = (s) => a.push(s.join(n.delimiter));
|
|
3178
3185
|
i([Oe(e.title, n)]);
|
|
3179
3186
|
for (const s of e.meta)
|
|
@@ -3188,15 +3195,15 @@ function yo(e, n = Ea(e.locale)) {
|
|
|
3188
3195
|
}
|
|
3189
3196
|
for (const o of s.rows) {
|
|
3190
3197
|
if (o.kind === "section") {
|
|
3191
|
-
i([
|
|
3198
|
+
i([Ua(o.cells[0] ?? null, n)]);
|
|
3192
3199
|
continue;
|
|
3193
3200
|
}
|
|
3194
3201
|
i(
|
|
3195
3202
|
s.columns.map(
|
|
3196
|
-
(r, l) =>
|
|
3203
|
+
(r, l) => Ua(
|
|
3197
3204
|
o.cells[l] ?? null,
|
|
3198
3205
|
n,
|
|
3199
|
-
|
|
3206
|
+
$t(o, r)
|
|
3200
3207
|
)
|
|
3201
3208
|
)
|
|
3202
3209
|
);
|
|
@@ -3208,7 +3215,7 @@ function yo(e, n = Ea(e.locale)) {
|
|
|
3208
3215
|
}
|
|
3209
3216
|
return a.join(n.eol) + n.eol;
|
|
3210
3217
|
}
|
|
3211
|
-
function bo(e, n =
|
|
3218
|
+
function bo(e, n = Aa(e.locale)) {
|
|
3212
3219
|
const a = yo(e, n);
|
|
3213
3220
|
return new Blob([n.bom ? `\uFEFF${a}` : a], { type: po });
|
|
3214
3221
|
}
|
|
@@ -3216,7 +3223,7 @@ async function xo() {
|
|
|
3216
3223
|
const e = await import("./exceljs.min-D2MHbJsF.js").then((a) => a.e), n = e;
|
|
3217
3224
|
return typeof n.Workbook == "function" ? e : n.default ?? e;
|
|
3218
3225
|
}
|
|
3219
|
-
function
|
|
3226
|
+
function Ka(e, n) {
|
|
3220
3227
|
const a = e.replace(/[\\/?*[\]:]/g, " ").trim().slice(0, 31);
|
|
3221
3228
|
let i = a || "Sheet", s = 2;
|
|
3222
3229
|
for (; n.has(i.toLowerCase()); ) {
|
|
@@ -3240,7 +3247,7 @@ function Co(e, n) {
|
|
|
3240
3247
|
async function To(e) {
|
|
3241
3248
|
const n = await xo(), a = new n.Workbook();
|
|
3242
3249
|
a.created = /* @__PURE__ */ new Date();
|
|
3243
|
-
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]);
|
|
3244
3251
|
o.font = { bold: !0 };
|
|
3245
3252
|
for (const l of e.meta) s.addRow([l.label, l.value]);
|
|
3246
3253
|
if (e.footnotes.length > 0) {
|
|
@@ -3249,7 +3256,7 @@ async function To(e) {
|
|
|
3249
3256
|
}
|
|
3250
3257
|
s.getColumn(1).width = 28, s.getColumn(2).width = 48;
|
|
3251
3258
|
for (const l of e.tables) {
|
|
3252
|
-
const c = a.addWorksheet(
|
|
3259
|
+
const c = a.addWorksheet(Ka(l.title, i)), u = c.addRow(
|
|
3253
3260
|
l.columns.map((h) => h.header)
|
|
3254
3261
|
);
|
|
3255
3262
|
u.font = { bold: !0 }, c.views = [{ state: "frozen", ySplit: 1 }], l.rows.length === 0 && l.emptyText && c.addRow([l.emptyText]);
|
|
@@ -3263,7 +3270,7 @@ async function To(e) {
|
|
|
3263
3270
|
l.columns.forEach((k, v) => {
|
|
3264
3271
|
const f = p.getCell(v + 1);
|
|
3265
3272
|
if (typeof g[v] != "number") return;
|
|
3266
|
-
const C = ko(
|
|
3273
|
+
const C = ko($t(h, k));
|
|
3267
3274
|
C && (f.numFmt = C), f.alignment = { horizontal: "right" };
|
|
3268
3275
|
});
|
|
3269
3276
|
}
|
|
@@ -3277,20 +3284,20 @@ async function To(e) {
|
|
|
3277
3284
|
const r = await a.xlsx.writeBuffer();
|
|
3278
3285
|
return new Blob([r], { type: ho });
|
|
3279
3286
|
}
|
|
3280
|
-
function
|
|
3287
|
+
function Ea(e, n) {
|
|
3281
3288
|
return `${e.fileStem}.${n}`;
|
|
3282
3289
|
}
|
|
3283
|
-
function
|
|
3290
|
+
function Da(e, n) {
|
|
3284
3291
|
if (typeof window > "u" || typeof document > "u" || typeof URL > "u" || typeof URL.createObjectURL != "function")
|
|
3285
3292
|
return !1;
|
|
3286
3293
|
const a = URL.createObjectURL(e), i = document.createElement("a");
|
|
3287
3294
|
return i.href = a, i.download = n, document.body.appendChild(i), i.click(), i.remove(), window.setTimeout(() => URL.revokeObjectURL(a), 0), !0;
|
|
3288
3295
|
}
|
|
3289
|
-
function So(e, n =
|
|
3290
|
-
return
|
|
3296
|
+
function So(e, n = Aa(e.locale)) {
|
|
3297
|
+
return Da(bo(e, n), Ea(e, "csv"));
|
|
3291
3298
|
}
|
|
3292
3299
|
async function Ao(e) {
|
|
3293
|
-
return
|
|
3300
|
+
return Da(await To(e), Ea(e, "xlsx"));
|
|
3294
3301
|
}
|
|
3295
3302
|
const Ke = {
|
|
3296
3303
|
headerFill: [237, 237, 240],
|
|
@@ -3406,7 +3413,7 @@ function qe(e) {
|
|
|
3406
3413
|
n.includes(a) && (n = n.split(a).join(i));
|
|
3407
3414
|
return n;
|
|
3408
3415
|
}
|
|
3409
|
-
const
|
|
3416
|
+
const se = 14, Io = 6, Ro = 15, Lo = 9, Fo = 11, Ha = 8.5, Ga = 8, Me = 5;
|
|
3410
3417
|
function Po(e) {
|
|
3411
3418
|
return e.tables.some(
|
|
3412
3419
|
(n) => n.columns.length > Io
|
|
@@ -3423,21 +3430,21 @@ function _o(e, n, a) {
|
|
|
3423
3430
|
return n == null ? String(e) : e.toFixed(n);
|
|
3424
3431
|
}
|
|
3425
3432
|
}
|
|
3426
|
-
function
|
|
3433
|
+
function zt(e, n, a) {
|
|
3427
3434
|
return e == null ? "" : qe(
|
|
3428
3435
|
typeof e == "number" ? _o(e, n, a) : e
|
|
3429
3436
|
);
|
|
3430
3437
|
}
|
|
3431
3438
|
function $o(e, n, a) {
|
|
3432
3439
|
return n.columns.map(
|
|
3433
|
-
(i, s) =>
|
|
3440
|
+
(i, s) => zt(
|
|
3434
3441
|
e.cells[s] ?? null,
|
|
3435
3442
|
e.precision ?? i.precision,
|
|
3436
3443
|
a
|
|
3437
3444
|
)
|
|
3438
3445
|
);
|
|
3439
3446
|
}
|
|
3440
|
-
async function
|
|
3447
|
+
async function Mt(e, n = {}) {
|
|
3441
3448
|
var v;
|
|
3442
3449
|
const [{ jsPDF: a }, { default: i }] = await Promise.all([
|
|
3443
3450
|
import("./jspdf.es.min-DaapWjR1.js").then((f) => f.j),
|
|
@@ -3446,36 +3453,36 @@ async function Ot(e, n = {}) {
|
|
|
3446
3453
|
orientation: Po(e) ? "landscape" : "portrait",
|
|
3447
3454
|
unit: "mm",
|
|
3448
3455
|
format: "a4"
|
|
3449
|
-
}), 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) => {
|
|
3450
3457
|
r.setFont("helvetica", f), r.setFontSize(C), r.setTextColor(w[0], w[1], w[2]);
|
|
3451
3458
|
};
|
|
3452
|
-
let g =
|
|
3459
|
+
let g = se;
|
|
3453
3460
|
h("bold", Ro, s.headerText);
|
|
3454
3461
|
for (const f of r.splitTextToSize(
|
|
3455
3462
|
qe(e.title),
|
|
3456
3463
|
u
|
|
3457
3464
|
))
|
|
3458
|
-
r.text(f,
|
|
3465
|
+
r.text(f, se, g), g += Me + 1;
|
|
3459
3466
|
g += 1, h("normal", Lo, s.mutedText);
|
|
3460
3467
|
for (const f of e.meta)
|
|
3461
|
-
r.text(qe(`${f.label}: ${f.value}`),
|
|
3468
|
+
r.text(qe(`${f.label}: ${f.value}`), se, g), g += Me - 0.6;
|
|
3462
3469
|
for (const f of e.tables) {
|
|
3463
|
-
if (g += Me, g > c -
|
|
3464
|
-
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;
|
|
3465
3472
|
continue;
|
|
3466
3473
|
}
|
|
3467
3474
|
const C = /* @__PURE__ */ new Set(), w = f.rows.map((T, L) => T.kind === "section" ? (C.add(L), [
|
|
3468
|
-
|
|
3475
|
+
zt(T.cells[0] ?? null, void 0, o),
|
|
3469
3476
|
...f.columns.slice(1).map(() => "")
|
|
3470
3477
|
]) : $o(T, f, o)), A = {}, R = {
|
|
3471
3478
|
head: [f.columns.map((T) => qe(T.header))],
|
|
3472
3479
|
body: w,
|
|
3473
3480
|
startY: g + 2,
|
|
3474
|
-
margin: { left:
|
|
3481
|
+
margin: { left: se, right: se, bottom: se + Me },
|
|
3475
3482
|
theme: "grid",
|
|
3476
3483
|
styles: {
|
|
3477
3484
|
font: "helvetica",
|
|
3478
|
-
fontSize:
|
|
3485
|
+
fontSize: Ha,
|
|
3479
3486
|
cellPadding: 1.6,
|
|
3480
3487
|
textColor: s.bodyText,
|
|
3481
3488
|
lineColor: s.headerFill,
|
|
@@ -3504,36 +3511,36 @@ async function Ot(e, n = {}) {
|
|
|
3504
3511
|
i(r, R), g = ((v = A.table) == null ? void 0 : v.finalY) ?? g + Me;
|
|
3505
3512
|
}
|
|
3506
3513
|
if (e.footnotes.length > 0) {
|
|
3507
|
-
g += Me + 1, g > c -
|
|
3514
|
+
g += Me + 1, g > c - se * 2 && (r.addPage(), g = se), h("normal", Ga, s.mutedText);
|
|
3508
3515
|
for (const f of e.footnotes)
|
|
3509
3516
|
for (const C of r.splitTextToSize(qe(f), u))
|
|
3510
|
-
r.text(C,
|
|
3517
|
+
r.text(C, se, g), g += Me - 1;
|
|
3511
3518
|
}
|
|
3512
3519
|
const p = qe(
|
|
3513
3520
|
[e.patientName, e.audienceLabel].filter(Boolean).join(" · ")
|
|
3514
3521
|
), k = r.getNumberOfPages();
|
|
3515
3522
|
for (let f = 1; f <= k; f += 1)
|
|
3516
|
-
r.setPage(f), h("normal",
|
|
3523
|
+
r.setPage(f), h("normal", Ga, s.mutedText), p && r.text(p, se, c - se + 4), r.text(
|
|
3517
3524
|
`${f} / ${k}`,
|
|
3518
|
-
l -
|
|
3519
|
-
c -
|
|
3525
|
+
l - se,
|
|
3526
|
+
c - se + 4,
|
|
3520
3527
|
{ align: "right" }
|
|
3521
3528
|
);
|
|
3522
3529
|
return n.autoPrint && r.autoPrint(), r.output("blob");
|
|
3523
3530
|
}
|
|
3524
3531
|
async function zo(e, n = {}) {
|
|
3525
|
-
return
|
|
3526
|
-
await
|
|
3527
|
-
|
|
3532
|
+
return Da(
|
|
3533
|
+
await Mt(e, n),
|
|
3534
|
+
Ea(e, "pdf")
|
|
3528
3535
|
);
|
|
3529
3536
|
}
|
|
3530
3537
|
async function Mo(e, n, a = {}) {
|
|
3531
3538
|
if (!n || typeof URL > "u" || typeof URL.createObjectURL != "function")
|
|
3532
3539
|
return null;
|
|
3533
|
-
const i = await
|
|
3540
|
+
const i = await Mt(e, { ...a, autoPrint: !0 }), s = URL.createObjectURL(i);
|
|
3534
3541
|
return n.setAttribute("src", s), s;
|
|
3535
3542
|
}
|
|
3536
|
-
const
|
|
3543
|
+
const ra = ["clinician", "patient"];
|
|
3537
3544
|
function Oo({
|
|
3538
3545
|
tab: e,
|
|
3539
3546
|
record: n,
|
|
@@ -3562,7 +3569,7 @@ function Oo({
|
|
|
3562
3569
|
}),
|
|
3563
3570
|
[e, n, a, i, s, h]
|
|
3564
3571
|
), P = a(`anamnesis.export.tab.${e}`), $ = a("anamnesis.export.control.audienceBadge"), F = q(
|
|
3565
|
-
() => p ?
|
|
3572
|
+
() => p ? Va(x("patient"), a).excluded : [],
|
|
3566
3573
|
[p, x, a]
|
|
3567
3574
|
), E = {
|
|
3568
3575
|
clinician: F.length > 0 ? a("anamnesis.export.control.holds", {
|
|
@@ -3572,22 +3579,22 @@ function Oo({
|
|
|
3572
3579
|
list: F.join(a("anamnesis.export.listSeparator"))
|
|
3573
3580
|
}) : a("anamnesis.export.control.excludesNone")
|
|
3574
3581
|
}, H = q(
|
|
3575
|
-
() => v ?
|
|
3582
|
+
() => v ? Va(x(C), a) : { included: [], excluded: [] },
|
|
3576
3583
|
[v, x, C, a]
|
|
3577
|
-
), j = (B) => R((
|
|
3584
|
+
), j = (B) => R((ee) => ({ text: B, seq: ee.seq + 1 })), M = (B, ee) => {
|
|
3578
3585
|
if (m.current) return;
|
|
3579
3586
|
m.current = !0;
|
|
3580
|
-
const
|
|
3581
|
-
Promise.resolve(
|
|
3582
|
-
(
|
|
3583
|
-
|
|
3584
|
-
file: `${
|
|
3587
|
+
const pe = x(c);
|
|
3588
|
+
Promise.resolve(ee(pe)).then(
|
|
3589
|
+
(de) => j(
|
|
3590
|
+
de ? a("anamnesis.export.control.ready", {
|
|
3591
|
+
file: `${pe.fileStem}.${B}`
|
|
3585
3592
|
}) : a("anamnesis.export.control.failed")
|
|
3586
3593
|
)
|
|
3587
3594
|
).catch(() => j(a("anamnesis.export.control.failed"))).finally(() => {
|
|
3588
3595
|
m.current = !1;
|
|
3589
3596
|
});
|
|
3590
|
-
}, 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 = () => {
|
|
3591
3598
|
m.current || (m.current = !0, Mo(x(c), L.current, { palette: U() }).then((B) => {
|
|
3592
3599
|
if (!B) {
|
|
3593
3600
|
j(a("anamnesis.export.control.failed"));
|
|
@@ -3616,7 +3623,7 @@ function Oo({
|
|
|
3616
3623
|
className: "ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]",
|
|
3617
3624
|
children: [
|
|
3618
3625
|
c !== "clinician" ? /* @__PURE__ */ t(
|
|
3619
|
-
|
|
3626
|
+
X,
|
|
3620
3627
|
{
|
|
3621
3628
|
variant: "warning",
|
|
3622
3629
|
size: "sm",
|
|
@@ -3625,19 +3632,19 @@ function Oo({
|
|
|
3625
3632
|
}
|
|
3626
3633
|
) : null,
|
|
3627
3634
|
/* @__PURE__ */ d(
|
|
3628
|
-
|
|
3635
|
+
le.Root,
|
|
3629
3636
|
{
|
|
3630
3637
|
open: p,
|
|
3631
3638
|
onOpenChange: k,
|
|
3632
3639
|
modal: !o,
|
|
3633
3640
|
children: [
|
|
3634
|
-
/* @__PURE__ */ t(
|
|
3635
|
-
|
|
3641
|
+
/* @__PURE__ */ t(le.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
3642
|
+
ne,
|
|
3636
3643
|
{
|
|
3637
3644
|
type: "button",
|
|
3638
3645
|
intent: "outline",
|
|
3639
3646
|
size: "sm",
|
|
3640
|
-
endIcon: /* @__PURE__ */ t(
|
|
3647
|
+
endIcon: /* @__PURE__ */ t(ma, { "aria-hidden": "true" }),
|
|
3641
3648
|
"aria-label": c === "clinician" ? a("anamnesis.export.control.triggerLabel", { tab: P }) : a("anamnesis.export.control.triggerLabelAudience", {
|
|
3642
3649
|
tab: P,
|
|
3643
3650
|
audience: $
|
|
@@ -3646,29 +3653,29 @@ function Oo({
|
|
|
3646
3653
|
children: a("anamnesis.export.control.trigger")
|
|
3647
3654
|
}
|
|
3648
3655
|
) }),
|
|
3649
|
-
/* @__PURE__ */ d(
|
|
3650
|
-
/* @__PURE__ */ t(
|
|
3651
|
-
/* @__PURE__ */ t(
|
|
3652
|
-
/* @__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") }),
|
|
3653
3660
|
/* @__PURE__ */ t(
|
|
3654
|
-
|
|
3661
|
+
le.RadioGroup,
|
|
3655
3662
|
{
|
|
3656
3663
|
value: c,
|
|
3657
3664
|
onValueChange: (B) => u(B),
|
|
3658
|
-
children:
|
|
3659
|
-
|
|
3665
|
+
children: ra.map((B) => /* @__PURE__ */ t(
|
|
3666
|
+
le.RadioItem,
|
|
3660
3667
|
{
|
|
3661
3668
|
value: B,
|
|
3662
3669
|
"aria-describedby": `${N}-${B}`,
|
|
3663
|
-
onSelect: (
|
|
3670
|
+
onSelect: (ee) => ee.preventDefault(),
|
|
3664
3671
|
children: a(`anamnesis.export.audience.${B}`)
|
|
3665
3672
|
},
|
|
3666
3673
|
B
|
|
3667
3674
|
))
|
|
3668
3675
|
}
|
|
3669
3676
|
),
|
|
3670
|
-
/* @__PURE__ */ t(
|
|
3671
|
-
|
|
3677
|
+
/* @__PURE__ */ t(le.Label, { "data-testid": "anamnesis-export-disclosure", children: E[c === "patient" ? "patient" : "clinician"] }),
|
|
3678
|
+
ra.map((B) => /* @__PURE__ */ t(
|
|
3672
3679
|
"span",
|
|
3673
3680
|
{
|
|
3674
3681
|
id: `${N}-${B}`,
|
|
@@ -3682,7 +3689,7 @@ function Oo({
|
|
|
3682
3689
|
whose OFF state has to be visible — an unticked checkbox row
|
|
3683
3690
|
renders as an empty slot. */
|
|
3684
3691
|
/* @__PURE__ */ t(
|
|
3685
|
-
|
|
3692
|
+
le.SwitchItem,
|
|
3686
3693
|
{
|
|
3687
3694
|
checked: h,
|
|
3688
3695
|
onCheckedChange: g,
|
|
@@ -3690,9 +3697,9 @@ function Oo({
|
|
|
3690
3697
|
}
|
|
3691
3698
|
)
|
|
3692
3699
|
) : null,
|
|
3693
|
-
/* @__PURE__ */ t(
|
|
3700
|
+
/* @__PURE__ */ t(le.Separator, {}),
|
|
3694
3701
|
/* @__PURE__ */ t(
|
|
3695
|
-
|
|
3702
|
+
le.Item,
|
|
3696
3703
|
{
|
|
3697
3704
|
startIcon: /* @__PURE__ */ t(pi, { "aria-hidden": "true" }),
|
|
3698
3705
|
onSelect: Re,
|
|
@@ -3700,35 +3707,35 @@ function Oo({
|
|
|
3700
3707
|
}
|
|
3701
3708
|
),
|
|
3702
3709
|
/* @__PURE__ */ t(
|
|
3703
|
-
|
|
3710
|
+
le.Item,
|
|
3704
3711
|
{
|
|
3705
3712
|
startIcon: /* @__PURE__ */ t(hi, { "aria-hidden": "true" }),
|
|
3706
|
-
onSelect:
|
|
3713
|
+
onSelect: Y,
|
|
3707
3714
|
children: a("anamnesis.export.control.pdf")
|
|
3708
3715
|
}
|
|
3709
3716
|
),
|
|
3710
3717
|
/* @__PURE__ */ t(
|
|
3711
|
-
|
|
3718
|
+
le.Item,
|
|
3712
3719
|
{
|
|
3713
3720
|
startIcon: /* @__PURE__ */ t(gi, { "aria-hidden": "true" }),
|
|
3714
|
-
onSelect:
|
|
3721
|
+
onSelect: J,
|
|
3715
3722
|
children: a("anamnesis.export.control.print")
|
|
3716
3723
|
}
|
|
3717
3724
|
),
|
|
3718
|
-
/* @__PURE__ */ t(
|
|
3725
|
+
/* @__PURE__ */ t(le.Separator, {}),
|
|
3719
3726
|
/* @__PURE__ */ t(
|
|
3720
|
-
|
|
3727
|
+
le.Item,
|
|
3721
3728
|
{
|
|
3722
3729
|
startIcon: /* @__PURE__ */ t(fi, { "aria-hidden": "true" }),
|
|
3723
|
-
onSelect:
|
|
3730
|
+
onSelect: ae,
|
|
3724
3731
|
children: a("anamnesis.export.control.xlsx")
|
|
3725
3732
|
}
|
|
3726
3733
|
),
|
|
3727
3734
|
/* @__PURE__ */ t(
|
|
3728
|
-
|
|
3735
|
+
le.Item,
|
|
3729
3736
|
{
|
|
3730
3737
|
startIcon: /* @__PURE__ */ t(vi, { "aria-hidden": "true" }),
|
|
3731
|
-
onSelect:
|
|
3738
|
+
onSelect: me,
|
|
3732
3739
|
children: a("anamnesis.export.control.csv")
|
|
3733
3740
|
}
|
|
3734
3741
|
)
|
|
@@ -3783,15 +3790,15 @@ function qo({
|
|
|
3783
3790
|
tabName: r,
|
|
3784
3791
|
t: l
|
|
3785
3792
|
}) {
|
|
3786
|
-
return /* @__PURE__ */ t(
|
|
3787
|
-
/* @__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: [
|
|
3788
3795
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
3789
|
-
/* @__PURE__ */ t(
|
|
3790
|
-
/* @__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") })
|
|
3791
3798
|
] }),
|
|
3792
|
-
/* @__PURE__ */ t(
|
|
3799
|
+
/* @__PURE__ */ t(Z.Description, { children: l("anamnesis.export.share.subtitle") })
|
|
3793
3800
|
] }),
|
|
3794
|
-
/* @__PURE__ */ d(
|
|
3801
|
+
/* @__PURE__ */ d(Z.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3795
3802
|
/* @__PURE__ */ d(He, { variant: "warning", "data-testid": "anamnesis-share-notice", children: [
|
|
3796
3803
|
/* @__PURE__ */ t(He.Title, { children: l("anamnesis.export.share.noticeTitle") }),
|
|
3797
3804
|
/* @__PURE__ */ t(He.Description, { children: l("anamnesis.export.share.notice") })
|
|
@@ -3802,7 +3809,7 @@ function qo({
|
|
|
3802
3809
|
label: l("anamnesis.export.share.audienceLabel"),
|
|
3803
3810
|
value: a,
|
|
3804
3811
|
onValueChange: (c) => i(c),
|
|
3805
|
-
children:
|
|
3812
|
+
children: ra.map((c) => /* @__PURE__ */ t(
|
|
3806
3813
|
ke,
|
|
3807
3814
|
{
|
|
3808
3815
|
value: c,
|
|
@@ -3813,7 +3820,7 @@ function qo({
|
|
|
3813
3820
|
}
|
|
3814
3821
|
),
|
|
3815
3822
|
/* @__PURE__ */ t(
|
|
3816
|
-
|
|
3823
|
+
ja,
|
|
3817
3824
|
{
|
|
3818
3825
|
title: l("anamnesis.export.share.includes"),
|
|
3819
3826
|
items: s.included,
|
|
@@ -3822,7 +3829,7 @@ function qo({
|
|
|
3822
3829
|
}
|
|
3823
3830
|
),
|
|
3824
3831
|
/* @__PURE__ */ t(
|
|
3825
|
-
|
|
3832
|
+
ja,
|
|
3826
3833
|
{
|
|
3827
3834
|
title: l("anamnesis.export.share.excludes"),
|
|
3828
3835
|
items: s.excluded,
|
|
@@ -3831,10 +3838,10 @@ function qo({
|
|
|
3831
3838
|
}
|
|
3832
3839
|
)
|
|
3833
3840
|
] }),
|
|
3834
|
-
/* @__PURE__ */ d(
|
|
3835
|
-
/* @__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") }) }),
|
|
3836
3843
|
/* @__PURE__ */ t(
|
|
3837
|
-
|
|
3844
|
+
ne,
|
|
3838
3845
|
{
|
|
3839
3846
|
type: "button",
|
|
3840
3847
|
intent: "primary",
|
|
@@ -3847,7 +3854,7 @@ function qo({
|
|
|
3847
3854
|
] })
|
|
3848
3855
|
] }) });
|
|
3849
3856
|
}
|
|
3850
|
-
function
|
|
3857
|
+
function ja({
|
|
3851
3858
|
title: e,
|
|
3852
3859
|
items: n,
|
|
3853
3860
|
emptyText: a,
|
|
@@ -3865,7 +3872,7 @@ function Qa({
|
|
|
3865
3872
|
}
|
|
3866
3873
|
);
|
|
3867
3874
|
}
|
|
3868
|
-
function
|
|
3875
|
+
function Ot(e, n) {
|
|
3869
3876
|
if (!e.highlight || !n) return !1;
|
|
3870
3877
|
switch (e.highlight) {
|
|
3871
3878
|
case "always":
|
|
@@ -3898,7 +3905,7 @@ function qt({
|
|
|
3898
3905
|
readOnly: o = !1,
|
|
3899
3906
|
t: r
|
|
3900
3907
|
}) {
|
|
3901
|
-
const l = cs(e, r), c =
|
|
3908
|
+
const l = cs(e, r), c = ht(e, r), u = i && s === "patient", h = Ot(e, n);
|
|
3902
3909
|
let g = null;
|
|
3903
3910
|
switch (e.type) {
|
|
3904
3911
|
case "text": {
|
|
@@ -4136,12 +4143,12 @@ function qt({
|
|
|
4136
4143
|
"data-highlighted": h ? "true" : void 0,
|
|
4137
4144
|
className: [
|
|
4138
4145
|
"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
4139
|
-
h ? "ds:
|
|
4146
|
+
h ? "ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--accent)] ds:p-[var(--spacing-md)] ds:shadow-[var(--shadow-card)] ds:bg-[color:color-mix(in_srgb,var(--accent)_6%,transparent)]" : ""
|
|
4140
4147
|
].filter(Boolean).join(" "),
|
|
4141
4148
|
children: [
|
|
4142
4149
|
u || h ? /* @__PURE__ */ d("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]", children: [
|
|
4143
4150
|
h ? /* @__PURE__ */ t("span", { "data-testid": `anamnesis-field-${e.key}-highlight`, children: /* @__PURE__ */ t(
|
|
4144
|
-
|
|
4151
|
+
X,
|
|
4145
4152
|
{
|
|
4146
4153
|
variant: "accentSoft",
|
|
4147
4154
|
size: "sm",
|
|
@@ -4149,7 +4156,7 @@ function qt({
|
|
|
4149
4156
|
children: r("anamnesis.field.highlighted")
|
|
4150
4157
|
}
|
|
4151
4158
|
) }) : null,
|
|
4152
|
-
u ? /* @__PURE__ */ t(
|
|
4159
|
+
u ? /* @__PURE__ */ t(yt, { t: r }) : null
|
|
4153
4160
|
] }) : null,
|
|
4154
4161
|
g
|
|
4155
4162
|
]
|
|
@@ -4201,7 +4208,7 @@ const Ko = {
|
|
|
4201
4208
|
function Go(e) {
|
|
4202
4209
|
return Ko[e] ?? Ho;
|
|
4203
4210
|
}
|
|
4204
|
-
function
|
|
4211
|
+
function Wa(e, n, a) {
|
|
4205
4212
|
return e.kind === "absolute" ? n : Math.abs(a) * n;
|
|
4206
4213
|
}
|
|
4207
4214
|
function jo(e, n, a) {
|
|
@@ -4209,7 +4216,7 @@ function jo(e, n, a) {
|
|
|
4209
4216
|
const i = Go(a), s = e - n;
|
|
4210
4217
|
if (i.sided === "atLeast" && s >= 0 || i.sided === "atMost" && s <= 0) return "onTarget";
|
|
4211
4218
|
const o = Math.abs(s);
|
|
4212
|
-
return o <=
|
|
4219
|
+
return o <= Wa(i, i.onTarget, n) ? "onTarget" : o <= Wa(i, i.approaching, n) ? "approaching" : "offTarget";
|
|
4213
4220
|
}
|
|
4214
4221
|
const Wo = {
|
|
4215
4222
|
weight: { min: 20, max: 400, step: 0.1 },
|
|
@@ -4246,7 +4253,7 @@ function Bt({
|
|
|
4246
4253
|
};
|
|
4247
4254
|
return /* @__PURE__ */ d(ye, { open: r, onOpenChange: f, children: [
|
|
4248
4255
|
/* @__PURE__ */ t(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
4249
|
-
|
|
4256
|
+
ce,
|
|
4250
4257
|
{
|
|
4251
4258
|
icon: /* @__PURE__ */ t(gn, { "aria-hidden": "true" }),
|
|
4252
4259
|
intent: "ghost",
|
|
@@ -4289,7 +4296,7 @@ function Bt({
|
|
|
4289
4296
|
p && g ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.targets.unsaved") }) : null,
|
|
4290
4297
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-sm)]", children: [
|
|
4291
4298
|
/* @__PURE__ */ t(
|
|
4292
|
-
|
|
4299
|
+
ne,
|
|
4293
4300
|
{
|
|
4294
4301
|
intent: "ghost",
|
|
4295
4302
|
size: "sm",
|
|
@@ -4300,7 +4307,7 @@ function Bt({
|
|
|
4300
4307
|
}
|
|
4301
4308
|
),
|
|
4302
4309
|
/* @__PURE__ */ t(
|
|
4303
|
-
|
|
4310
|
+
ne,
|
|
4304
4311
|
{
|
|
4305
4312
|
intent: "primary",
|
|
4306
4313
|
size: "sm",
|
|
@@ -4351,7 +4358,7 @@ function er({
|
|
|
4351
4358
|
// `mt-auto` pins it to the tile's foot, so a row of tiles stretched to
|
|
4352
4359
|
// the tallest one lines its chips up instead of leaving a hole.
|
|
4353
4360
|
/* @__PURE__ */ d("div", { className: "ds:mt-auto ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4354
|
-
s ? /* @__PURE__ */ t(
|
|
4361
|
+
s ? /* @__PURE__ */ t(X, { variant: Zo[s], size: "sm", withDot: !0, children: o }) : null,
|
|
4355
4362
|
r
|
|
4356
4363
|
] })
|
|
4357
4364
|
) : null
|
|
@@ -4466,7 +4473,7 @@ function Xn({
|
|
|
4466
4473
|
}
|
|
4467
4474
|
) }),
|
|
4468
4475
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4469
|
-
k ? /* @__PURE__ */ t(
|
|
4476
|
+
k ? /* @__PURE__ */ t(ba, { flag: k, t: o }) : null,
|
|
4470
4477
|
/* @__PURE__ */ t(Un, { delta: p, def: u, t: o }),
|
|
4471
4478
|
C || v != null ? /* @__PURE__ */ d("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
4472
4479
|
/* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: v == null ? o("anamnesis.targets.unset") : o("anamnesis.grid.target", {
|
|
@@ -4506,7 +4513,7 @@ function ve({
|
|
|
4506
4513
|
children: c
|
|
4507
4514
|
}) {
|
|
4508
4515
|
return /* @__PURE__ */ d(
|
|
4509
|
-
|
|
4516
|
+
ca,
|
|
4510
4517
|
{
|
|
4511
4518
|
variant: "default",
|
|
4512
4519
|
defaultOpen: r === void 0 ? a : void 0,
|
|
@@ -4515,24 +4522,24 @@ function ve({
|
|
|
4515
4522
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
4516
4523
|
children: [
|
|
4517
4524
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: /* @__PURE__ */ d(
|
|
4518
|
-
|
|
4525
|
+
Za,
|
|
4519
4526
|
{
|
|
4520
|
-
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,
|
|
4521
4528
|
children: [
|
|
4522
4529
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4523
4530
|
n(e),
|
|
4524
4531
|
i == null ? null : /* @__PURE__ */ t(
|
|
4525
|
-
|
|
4532
|
+
X,
|
|
4526
4533
|
{
|
|
4527
4534
|
variant: s === "outstanding" && i > 0 ? "warning" : "neutral",
|
|
4528
4535
|
size: "sm",
|
|
4529
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")
|
|
4530
4537
|
}
|
|
4531
4538
|
),
|
|
4532
|
-
o > 0 ? /* @__PURE__ */ t(
|
|
4539
|
+
o > 0 ? /* @__PURE__ */ t(X, { variant: "warning", size: "sm", children: n("anamnesis.compile.blockFlagged", { count: o }) }) : null
|
|
4533
4540
|
] }),
|
|
4534
4541
|
/* @__PURE__ */ t(
|
|
4535
|
-
|
|
4542
|
+
ma,
|
|
4536
4543
|
{
|
|
4537
4544
|
"aria-hidden": "true",
|
|
4538
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"
|
|
@@ -4542,7 +4549,7 @@ function ve({
|
|
|
4542
4549
|
}
|
|
4543
4550
|
) }),
|
|
4544
4551
|
/* @__PURE__ */ t(
|
|
4545
|
-
|
|
4552
|
+
da,
|
|
4546
4553
|
{
|
|
4547
4554
|
"aria-label": n(e),
|
|
4548
4555
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
@@ -4571,7 +4578,7 @@ function tr({
|
|
|
4571
4578
|
defaultShareOpen: v = !1,
|
|
4572
4579
|
defaultExportAudience: f = "clinician"
|
|
4573
4580
|
}) {
|
|
4574
|
-
var
|
|
4581
|
+
var Ra;
|
|
4575
4582
|
const [C, w] = z(
|
|
4576
4583
|
() => structuredClone(e)
|
|
4577
4584
|
), A = we(!1);
|
|
@@ -4595,34 +4602,34 @@ function tr({
|
|
|
4595
4602
|
() => new Set(F.map((y) => y.key)),
|
|
4596
4603
|
[F]
|
|
4597
4604
|
), H = q(
|
|
4598
|
-
() =>
|
|
4605
|
+
() => Oa(S, $),
|
|
4599
4606
|
[S, $]
|
|
4600
4607
|
), [j, M] = z(() => {
|
|
4601
|
-
const y =
|
|
4602
|
-
for (const I of
|
|
4608
|
+
const y = Oa(S, $), b = {};
|
|
4609
|
+
for (const I of wt) b[I] = y[I].open;
|
|
4603
4610
|
return b;
|
|
4604
4611
|
}), U = tn(
|
|
4605
4612
|
(y) => (b) => M((I) => ({ ...I, [y]: b })),
|
|
4606
4613
|
[]
|
|
4607
|
-
),
|
|
4614
|
+
), Y = q(
|
|
4608
4615
|
() => Ge(i),
|
|
4609
4616
|
[i]
|
|
4610
|
-
),
|
|
4611
|
-
|
|
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
|
+
pe(
|
|
4612
4619
|
(b) => b.length === y.length && b.every((I, K) => I === y[K]) ? b : [...y]
|
|
4613
4620
|
);
|
|
4614
|
-
}, []), { containerRef: Le, requestJump: Fe } =
|
|
4621
|
+
}, []), { containerRef: Le, requestJump: Fe } = ft(), Pe = tn(
|
|
4615
4622
|
(y) => {
|
|
4616
4623
|
var b, I;
|
|
4617
4624
|
return (I = (b = C.intake) == null ? void 0 : b.answers[y]) == null ? void 0 : I.value;
|
|
4618
4625
|
},
|
|
4619
4626
|
[C.intake]
|
|
4620
4627
|
), Nn = q(
|
|
4621
|
-
() => hs(
|
|
4622
|
-
[
|
|
4628
|
+
() => hs(Y, Pe, T.sex, n),
|
|
4629
|
+
[Y, Pe, T.sex, n]
|
|
4623
4630
|
), mn = q(
|
|
4624
|
-
() =>
|
|
4625
|
-
[
|
|
4631
|
+
() => gt(ae, Pe, T.sex, n),
|
|
4632
|
+
[ae, Pe, T.sex, n]
|
|
4626
4633
|
), [O] = z(() => new Set(mn.map((y) => y.key))), G = (y) => {
|
|
4627
4634
|
if (c) {
|
|
4628
4635
|
c(y);
|
|
@@ -4631,7 +4638,7 @@ function tr({
|
|
|
4631
4638
|
Re("compile"), B(!0), Fe(y.key);
|
|
4632
4639
|
};
|
|
4633
4640
|
if (!S)
|
|
4634
|
-
return /* @__PURE__ */ t(
|
|
4641
|
+
return /* @__PURE__ */ t(Qa, { embedded: a, children: /* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { children: /* @__PURE__ */ t(
|
|
4635
4642
|
Ue,
|
|
4636
4643
|
{
|
|
4637
4644
|
variant: "first-use",
|
|
@@ -4640,29 +4647,29 @@ function tr({
|
|
|
4640
4647
|
description: n("anamnesis.empty.noRecord.description")
|
|
4641
4648
|
}
|
|
4642
4649
|
) }) }) });
|
|
4643
|
-
const
|
|
4650
|
+
const W = (y) => {
|
|
4644
4651
|
w((b) => {
|
|
4645
4652
|
if (b.visits.length === 0) return b;
|
|
4646
4653
|
const I = b.visits.slice();
|
|
4647
4654
|
return I[I.length - 1] = y(I[I.length - 1]), { ...b, visits: I };
|
|
4648
4655
|
});
|
|
4649
|
-
}, be = (y, b) =>
|
|
4656
|
+
}, be = (y, b) => W((I) => _a(I, y, b)), Je = (y, b, I) => w((K) => ({
|
|
4650
4657
|
...K,
|
|
4651
4658
|
visits: K.visits.map(
|
|
4652
|
-
(Ze) => Ze.id === y.id ?
|
|
4659
|
+
(Ze) => Ze.id === y.id ? _a(Ze, b, I) : Ze
|
|
4653
4660
|
)
|
|
4654
4661
|
})), Gn = (y, b) => {
|
|
4655
|
-
w((I) =>
|
|
4656
|
-
}, 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) => ({
|
|
4657
4664
|
...I,
|
|
4658
4665
|
therapy: I.therapy.map((K) => K.id === y ? { ...K, ...b } : K)
|
|
4659
|
-
})), Yt = (y) =>
|
|
4666
|
+
})), Yt = (y) => W((b) => ({
|
|
4660
4667
|
...b,
|
|
4661
4668
|
therapy: b.therapy.filter((I) => I.id !== y)
|
|
4662
4669
|
})), Xt = () => {
|
|
4663
4670
|
R.current += 1;
|
|
4664
4671
|
const y = `new-${R.current}`;
|
|
4665
|
-
|
|
4672
|
+
W((b) => ({
|
|
4666
4673
|
...b,
|
|
4667
4674
|
therapy: [...b.therapy, { id: y, name: "", dose: "", kind: "medication" }]
|
|
4668
4675
|
}));
|
|
@@ -4707,11 +4714,11 @@ function tr({
|
|
|
4707
4714
|
});
|
|
4708
4715
|
}, ei = Hi(i).map(
|
|
4709
4716
|
(y) => {
|
|
4710
|
-
const b =
|
|
4717
|
+
const b = me[y], I = b == null ? void 0 : b.parentCode;
|
|
4711
4718
|
return {
|
|
4712
4719
|
value: y,
|
|
4713
4720
|
label: Se(y, n, b),
|
|
4714
|
-
group: I ?
|
|
4721
|
+
group: I ? ya(I, n, me[I]) : n("anamnesis.pathology.groupGeneral")
|
|
4715
4722
|
};
|
|
4716
4723
|
}
|
|
4717
4724
|
), Cn = S.oncological ?? {}, Tn = S.annualProgramme ?? {
|
|
@@ -4750,37 +4757,37 @@ function tr({
|
|
|
4750
4757
|
onTargetChange: Gn
|
|
4751
4758
|
}
|
|
4752
4759
|
),
|
|
4753
|
-
/* @__PURE__ */ t(
|
|
4754
|
-
|
|
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,
|
|
4755
4762
|
{
|
|
4756
|
-
value:
|
|
4763
|
+
value: J,
|
|
4757
4764
|
onValueChange: (y) => Re(y),
|
|
4758
4765
|
children: [
|
|
4759
4766
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
4760
|
-
/* @__PURE__ */ d(
|
|
4761
|
-
/* @__PURE__ */ t(
|
|
4762
|
-
/* @__PURE__ */ t(
|
|
4763
|
-
/* @__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") })
|
|
4764
4771
|
] }),
|
|
4765
4772
|
/* @__PURE__ */ t(
|
|
4766
4773
|
Oo,
|
|
4767
4774
|
{
|
|
4768
|
-
tab:
|
|
4775
|
+
tab: J,
|
|
4769
4776
|
record: C,
|
|
4770
4777
|
t: n,
|
|
4771
4778
|
config: i,
|
|
4772
|
-
shownVisitIds:
|
|
4779
|
+
shownVisitIds: ee,
|
|
4773
4780
|
defaultOpen: k,
|
|
4774
4781
|
defaultShareOpen: v,
|
|
4775
4782
|
defaultAudience: f
|
|
4776
4783
|
}
|
|
4777
4784
|
)
|
|
4778
4785
|
] }),
|
|
4779
|
-
/* @__PURE__ */ t(
|
|
4786
|
+
/* @__PURE__ */ t(Q.Content, { value: "summary", children: /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-md)]", children: /* @__PURE__ */ t(
|
|
4780
4787
|
ws,
|
|
4781
4788
|
{
|
|
4782
4789
|
intake: C.intake,
|
|
4783
|
-
sections:
|
|
4790
|
+
sections: Y,
|
|
4784
4791
|
sex: T.sex,
|
|
4785
4792
|
digest: Nn,
|
|
4786
4793
|
missing: mn,
|
|
@@ -4788,7 +4795,7 @@ function tr({
|
|
|
4788
4795
|
t: n
|
|
4789
4796
|
}
|
|
4790
4797
|
) }) }),
|
|
4791
|
-
/* @__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: [
|
|
4792
4799
|
/* @__PURE__ */ d(ve, { titleKey: "anamnesis.section.visitMeta", t: n, children: [
|
|
4793
4800
|
/* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
4794
4801
|
/* @__PURE__ */ t(V, { label: n("anamnesis.field.visitType.label"), children: /* @__PURE__ */ t(
|
|
@@ -4805,7 +4812,7 @@ function tr({
|
|
|
4805
4812
|
}
|
|
4806
4813
|
],
|
|
4807
4814
|
value: S.visitType,
|
|
4808
|
-
onValueChange: (y) =>
|
|
4815
|
+
onValueChange: (y) => W((b) => ({
|
|
4809
4816
|
...b,
|
|
4810
4817
|
visitType: y || "followUp"
|
|
4811
4818
|
}))
|
|
@@ -4816,7 +4823,7 @@ function tr({
|
|
|
4816
4823
|
{
|
|
4817
4824
|
options: h,
|
|
4818
4825
|
value: S.practitioner ?? "",
|
|
4819
|
-
onValueChange: (y) =>
|
|
4826
|
+
onValueChange: (y) => W((b) => ({
|
|
4820
4827
|
...b,
|
|
4821
4828
|
practitioner: y || void 0
|
|
4822
4829
|
}))
|
|
@@ -4825,7 +4832,7 @@ function tr({
|
|
|
4825
4832
|
ie,
|
|
4826
4833
|
{
|
|
4827
4834
|
value: S.practitioner ?? "",
|
|
4828
|
-
onChange: (y) =>
|
|
4835
|
+
onChange: (y) => W((b) => ({
|
|
4829
4836
|
...b,
|
|
4830
4837
|
practitioner: y.target.value
|
|
4831
4838
|
}))
|
|
@@ -4834,8 +4841,8 @@ function tr({
|
|
|
4834
4841
|
/* @__PURE__ */ t(V, { label: n("anamnesis.header.visitDate"), children: /* @__PURE__ */ t(
|
|
4835
4842
|
oi,
|
|
4836
4843
|
{
|
|
4837
|
-
value:
|
|
4838
|
-
onChange: (y) => y &&
|
|
4844
|
+
value: mt(S.dateIso),
|
|
4845
|
+
onChange: (y) => y && W((b) => ({
|
|
4839
4846
|
...b,
|
|
4840
4847
|
dateIso: rs(y) + os(b.dateIso)
|
|
4841
4848
|
}))
|
|
@@ -4843,7 +4850,7 @@ function tr({
|
|
|
4843
4850
|
) })
|
|
4844
4851
|
] }),
|
|
4845
4852
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
4846
|
-
|
|
4853
|
+
ne,
|
|
4847
4854
|
{
|
|
4848
4855
|
intent: "outline",
|
|
4849
4856
|
size: "sm",
|
|
@@ -4870,7 +4877,7 @@ function tr({
|
|
|
4870
4877
|
{
|
|
4871
4878
|
ref: Le,
|
|
4872
4879
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]",
|
|
4873
|
-
children:
|
|
4880
|
+
children: ae.map((y) => {
|
|
4874
4881
|
const b = y.fields.filter((I) => un(I, T.sex)).filter((I) => O.has(I.key));
|
|
4875
4882
|
return b.length === 0 ? null : /* @__PURE__ */ d(
|
|
4876
4883
|
"div",
|
|
@@ -4939,7 +4946,7 @@ function tr({
|
|
|
4939
4946
|
label: n("anamnesis.compile.pathologiesLabel"),
|
|
4940
4947
|
description: n("anamnesis.compile.pathologiesHelp"),
|
|
4941
4948
|
children: /* @__PURE__ */ t(
|
|
4942
|
-
|
|
4949
|
+
ua,
|
|
4943
4950
|
{
|
|
4944
4951
|
options: ei,
|
|
4945
4952
|
value: S.pathologyCodes,
|
|
@@ -4965,7 +4972,7 @@ function tr({
|
|
|
4965
4972
|
ie,
|
|
4966
4973
|
{
|
|
4967
4974
|
value: Cn.tumourType ?? "",
|
|
4968
|
-
onChange: (y) =>
|
|
4975
|
+
onChange: (y) => W((b) => ({
|
|
4969
4976
|
...b,
|
|
4970
4977
|
oncological: {
|
|
4971
4978
|
...b.oncological,
|
|
@@ -4978,7 +4985,7 @@ function tr({
|
|
|
4978
4985
|
ie,
|
|
4979
4986
|
{
|
|
4980
4987
|
value: Cn.stage ?? "",
|
|
4981
|
-
onChange: (y) =>
|
|
4988
|
+
onChange: (y) => W((b) => ({
|
|
4982
4989
|
...b,
|
|
4983
4990
|
oncological: {
|
|
4984
4991
|
...b.oncological,
|
|
@@ -4992,8 +4999,8 @@ function tr({
|
|
|
4992
4999
|
{
|
|
4993
5000
|
label: n("anamnesis.field.metastases.label"),
|
|
4994
5001
|
variant: "horizontal",
|
|
4995
|
-
value: ((
|
|
4996
|
-
onValueChange: (y) =>
|
|
5002
|
+
value: ((Ra = Cn.metastases) == null ? void 0 : Ra.present) ?? "unknown",
|
|
5003
|
+
onValueChange: (y) => W((b) => {
|
|
4997
5004
|
var I, K;
|
|
4998
5005
|
return {
|
|
4999
5006
|
...b,
|
|
@@ -5027,7 +5034,7 @@ function tr({
|
|
|
5027
5034
|
ie,
|
|
5028
5035
|
{
|
|
5029
5036
|
value: Cn.treatmentStatus ?? "",
|
|
5030
|
-
onChange: (y) =>
|
|
5037
|
+
onChange: (y) => W((b) => ({
|
|
5031
5038
|
...b,
|
|
5032
5039
|
oncological: {
|
|
5033
5040
|
...b.oncological,
|
|
@@ -5055,7 +5062,7 @@ function tr({
|
|
|
5055
5062
|
ie,
|
|
5056
5063
|
{
|
|
5057
5064
|
value: y.name,
|
|
5058
|
-
onChange: (b) =>
|
|
5065
|
+
onChange: (b) => Ia(y.id, {
|
|
5059
5066
|
name: b.target.value
|
|
5060
5067
|
})
|
|
5061
5068
|
}
|
|
@@ -5066,13 +5073,13 @@ function tr({
|
|
|
5066
5073
|
ie,
|
|
5067
5074
|
{
|
|
5068
5075
|
value: y.dose ?? "",
|
|
5069
|
-
onChange: (b) =>
|
|
5076
|
+
onChange: (b) => Ia(y.id, {
|
|
5070
5077
|
dose: b.target.value
|
|
5071
5078
|
})
|
|
5072
5079
|
}
|
|
5073
5080
|
) }),
|
|
5074
5081
|
/* @__PURE__ */ t(
|
|
5075
|
-
|
|
5082
|
+
X,
|
|
5076
5083
|
{
|
|
5077
5084
|
variant: y.kind === "medication" ? "info" : "neutral",
|
|
5078
5085
|
size: "md",
|
|
@@ -5080,7 +5087,7 @@ function tr({
|
|
|
5080
5087
|
}
|
|
5081
5088
|
),
|
|
5082
5089
|
/* @__PURE__ */ t(
|
|
5083
|
-
|
|
5090
|
+
ce,
|
|
5084
5091
|
{
|
|
5085
5092
|
icon: /* @__PURE__ */ t(Ci, { "aria-hidden": "true" }),
|
|
5086
5093
|
intent: "ghost",
|
|
@@ -5095,7 +5102,7 @@ function tr({
|
|
|
5095
5102
|
y.id
|
|
5096
5103
|
)),
|
|
5097
5104
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
5098
|
-
|
|
5105
|
+
ne,
|
|
5099
5106
|
{
|
|
5100
5107
|
intent: "outline",
|
|
5101
5108
|
size: "sm",
|
|
@@ -5154,7 +5161,7 @@ function tr({
|
|
|
5154
5161
|
}
|
|
5155
5162
|
) }),
|
|
5156
5163
|
/* @__PURE__ */ t(
|
|
5157
|
-
|
|
5164
|
+
X,
|
|
5158
5165
|
{
|
|
5159
5166
|
variant: y.completed ? "success" : "warning",
|
|
5160
5167
|
size: "sm",
|
|
@@ -5179,7 +5186,7 @@ function tr({
|
|
|
5179
5186
|
value: S.nutritionalProposal ?? "",
|
|
5180
5187
|
autoResize: !0,
|
|
5181
5188
|
minRows: 2,
|
|
5182
|
-
onChange: (y) =>
|
|
5189
|
+
onChange: (y) => W((b) => ({
|
|
5183
5190
|
...b,
|
|
5184
5191
|
nutritionalProposal: y.target.value
|
|
5185
5192
|
}))
|
|
@@ -5193,7 +5200,7 @@ function tr({
|
|
|
5193
5200
|
value: S.clinicalNotes ?? "",
|
|
5194
5201
|
autoResize: !0,
|
|
5195
5202
|
minRows: 2,
|
|
5196
|
-
onChange: (y) =>
|
|
5203
|
+
onChange: (y) => W((b) => ({
|
|
5197
5204
|
...b,
|
|
5198
5205
|
clinicalNotes: y.target.value
|
|
5199
5206
|
}))
|
|
@@ -5215,7 +5222,7 @@ function tr({
|
|
|
5215
5222
|
label: n("anamnesis.field.annualProposed.label"),
|
|
5216
5223
|
variant: "horizontal",
|
|
5217
5224
|
value: Tn.proposed ? "yes" : "no",
|
|
5218
|
-
onValueChange: (y) =>
|
|
5225
|
+
onValueChange: (y) => W((b) => {
|
|
5219
5226
|
var I, K;
|
|
5220
5227
|
return {
|
|
5221
5228
|
...b,
|
|
@@ -5238,7 +5245,7 @@ function tr({
|
|
|
5238
5245
|
label: n("anamnesis.field.annualAccepted.label"),
|
|
5239
5246
|
variant: "horizontal",
|
|
5240
5247
|
value: Tn.accepted ? "yes" : "no",
|
|
5241
|
-
onValueChange: (y) =>
|
|
5248
|
+
onValueChange: (y) => W((b) => {
|
|
5242
5249
|
var I, K;
|
|
5243
5250
|
return {
|
|
5244
5251
|
...b,
|
|
@@ -5265,7 +5272,7 @@ function tr({
|
|
|
5265
5272
|
value: Tn.declineReason ?? "",
|
|
5266
5273
|
autoResize: !0,
|
|
5267
5274
|
minRows: 2,
|
|
5268
|
-
onChange: (y) =>
|
|
5275
|
+
onChange: (y) => W((b) => {
|
|
5269
5276
|
var I, K;
|
|
5270
5277
|
return {
|
|
5271
5278
|
...b,
|
|
@@ -5284,8 +5291,8 @@ function tr({
|
|
|
5284
5291
|
}
|
|
5285
5292
|
)
|
|
5286
5293
|
] }) }),
|
|
5287
|
-
/* @__PURE__ */ t(
|
|
5288
|
-
|
|
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,
|
|
5289
5296
|
{
|
|
5290
5297
|
record: C,
|
|
5291
5298
|
t: n,
|
|
@@ -5293,7 +5300,7 @@ function tr({
|
|
|
5293
5300
|
config: i,
|
|
5294
5301
|
framed: !1,
|
|
5295
5302
|
onCellChange: Je,
|
|
5296
|
-
onVisitSelectionChange:
|
|
5303
|
+
onVisitSelectionChange: de,
|
|
5297
5304
|
onOpenNote: l
|
|
5298
5305
|
}
|
|
5299
5306
|
) }) }) })
|
|
@@ -5301,15 +5308,15 @@ function tr({
|
|
|
5301
5308
|
}
|
|
5302
5309
|
) }) })
|
|
5303
5310
|
] });
|
|
5304
|
-
return /* @__PURE__ */ t(
|
|
5311
|
+
return /* @__PURE__ */ t(Qa, { embedded: a, children: ni });
|
|
5305
5312
|
}
|
|
5306
|
-
function
|
|
5313
|
+
function Qa({
|
|
5307
5314
|
embedded: e,
|
|
5308
5315
|
children: n
|
|
5309
5316
|
}) {
|
|
5310
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 }) });
|
|
5311
5318
|
}
|
|
5312
|
-
function
|
|
5319
|
+
function Ya(e) {
|
|
5313
5320
|
var i;
|
|
5314
5321
|
const n = {}, a = ((i = e.intake) == null ? void 0 : i.answers) ?? {};
|
|
5315
5322
|
for (const [s, o] of Object.entries(a))
|
|
@@ -5326,38 +5333,33 @@ function Kt({
|
|
|
5326
5333
|
jumpToField: r,
|
|
5327
5334
|
readOnly: l = !1
|
|
5328
5335
|
}) {
|
|
5329
|
-
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(
|
|
5330
5337
|
() => {
|
|
5331
5338
|
var M;
|
|
5332
5339
|
return ((M = e.intake) == null ? void 0 : M.submittedAtIso) != null;
|
|
5333
5340
|
}
|
|
5334
5341
|
), v = (M, U) => {
|
|
5335
|
-
g((
|
|
5342
|
+
g((Y) => ({ ...Y, [M]: U }));
|
|
5336
5343
|
}, f = q(
|
|
5337
|
-
() =>
|
|
5344
|
+
() => ga(i).map((M) => ({
|
|
5338
5345
|
...M,
|
|
5339
5346
|
fields: M.fields.filter((U) => un(U, c.sex))
|
|
5340
5347
|
})).filter((M) => M.fields.length > 0),
|
|
5341
5348
|
[i, c.sex]
|
|
5342
|
-
), C = (
|
|
5343
|
-
var
|
|
5344
|
-
const
|
|
5345
|
-
|
|
5346
|
-
for (const se of f)
|
|
5347
|
-
se.fields.some(
|
|
5348
|
-
(X) => Ra(X, M[X.key])
|
|
5349
|
-
) && U.add(se.key);
|
|
5350
|
-
return [...U];
|
|
5349
|
+
), C = () => {
|
|
5350
|
+
var U;
|
|
5351
|
+
const M = s ?? ((U = f[0]) == null ? void 0 : U.key);
|
|
5352
|
+
return M ? [M] : [];
|
|
5351
5353
|
}, [w, A] = z(
|
|
5352
|
-
() => C(
|
|
5354
|
+
() => C()
|
|
5353
5355
|
), R = (M) => A((U) => U.includes(M) ? U : [...U, M]), [T, L] = z(e.intake);
|
|
5354
5356
|
if (e.intake !== T) {
|
|
5355
5357
|
L(e.intake);
|
|
5356
|
-
const M =
|
|
5357
|
-
g(M), A(C(
|
|
5358
|
+
const M = Ya(e);
|
|
5359
|
+
g(M), A(C());
|
|
5358
5360
|
}
|
|
5359
|
-
const { containerRef: S, requestJump: m } =
|
|
5360
|
-
() =>
|
|
5361
|
+
const { containerRef: S, requestJump: m } = ft(), N = q(
|
|
5362
|
+
() => gt(
|
|
5361
5363
|
f,
|
|
5362
5364
|
(M) => h[M],
|
|
5363
5365
|
c.sex,
|
|
@@ -5370,15 +5372,15 @@ function Kt({
|
|
|
5370
5372
|
on(() => {
|
|
5371
5373
|
if (!r) return;
|
|
5372
5374
|
const M = f.find(
|
|
5373
|
-
(U) => U.fields.some((
|
|
5375
|
+
(U) => U.fields.some((Y) => Y.key === r)
|
|
5374
5376
|
);
|
|
5375
5377
|
M && (R(M.key), m(r));
|
|
5376
5378
|
}, [r]);
|
|
5377
5379
|
const { answeredCount: P, totalCount: $ } = q(() => {
|
|
5378
5380
|
let M = 0, U = 0;
|
|
5379
|
-
for (const
|
|
5380
|
-
for (const
|
|
5381
|
-
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);
|
|
5382
5384
|
return { answeredCount: M, totalCount: U };
|
|
5383
5385
|
}, [f, h]), F = $ === 0 ? 0 : Math.round(P / $ * 100), E = n("anamnesis.intake.answered", {
|
|
5384
5386
|
answered: P,
|
|
@@ -5438,7 +5440,7 @@ function Kt({
|
|
|
5438
5440
|
)
|
|
5439
5441
|
] }),
|
|
5440
5442
|
H ? /* @__PURE__ */ t(
|
|
5441
|
-
|
|
5443
|
+
vt,
|
|
5442
5444
|
{
|
|
5443
5445
|
missing: N,
|
|
5444
5446
|
t: n,
|
|
@@ -5446,7 +5448,7 @@ function Kt({
|
|
|
5446
5448
|
announce: "off"
|
|
5447
5449
|
}
|
|
5448
5450
|
) : null,
|
|
5449
|
-
/* @__PURE__ */ t(
|
|
5451
|
+
/* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { ref: S, children: /* @__PURE__ */ d(
|
|
5450
5452
|
"section",
|
|
5451
5453
|
{
|
|
5452
5454
|
"aria-label": n("anamnesis.intake.sectionsLabel"),
|
|
@@ -5470,7 +5472,7 @@ function Kt({
|
|
|
5470
5472
|
onValueChange: A,
|
|
5471
5473
|
children: f.map((M) => {
|
|
5472
5474
|
const U = M.fields.filter(
|
|
5473
|
-
(
|
|
5475
|
+
(Y) => Xe(h[Y.key])
|
|
5474
5476
|
).length;
|
|
5475
5477
|
return /* @__PURE__ */ d(Si, { value: M.key, children: [
|
|
5476
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: [
|
|
@@ -5480,16 +5482,16 @@ function Kt({
|
|
|
5480
5482
|
total: M.fields.length
|
|
5481
5483
|
}) })
|
|
5482
5484
|
] }) }),
|
|
5483
|
-
/* @__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(
|
|
5484
5486
|
qt,
|
|
5485
5487
|
{
|
|
5486
5488
|
readOnly: l,
|
|
5487
|
-
def:
|
|
5488
|
-
answer: h[
|
|
5489
|
-
onChange: (
|
|
5489
|
+
def: Y,
|
|
5490
|
+
answer: h[Y.key],
|
|
5491
|
+
onChange: (ae) => v(Y.key, ae),
|
|
5490
5492
|
t: n
|
|
5491
5493
|
},
|
|
5492
|
-
|
|
5494
|
+
Y.key
|
|
5493
5495
|
)) }) })
|
|
5494
5496
|
] }, M.key);
|
|
5495
5497
|
})
|
|
@@ -5508,7 +5510,7 @@ function Kt({
|
|
|
5508
5510
|
}
|
|
5509
5511
|
),
|
|
5510
5512
|
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
|
|
5511
|
-
|
|
5513
|
+
ne,
|
|
5512
5514
|
{
|
|
5513
5515
|
intent: "primary",
|
|
5514
5516
|
startIcon: /* @__PURE__ */ t(_i, { "aria-hidden": "true" }),
|
|
@@ -5533,7 +5535,7 @@ function xe({
|
|
|
5533
5535
|
a
|
|
5534
5536
|
] });
|
|
5535
5537
|
}
|
|
5536
|
-
function
|
|
5538
|
+
function Jn({
|
|
5537
5539
|
defs: e,
|
|
5538
5540
|
visit: n,
|
|
5539
5541
|
previous: a,
|
|
@@ -5550,7 +5552,7 @@ function Zn({
|
|
|
5550
5552
|
] }),
|
|
5551
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: [
|
|
5552
5554
|
/* @__PURE__ */ t("span", { className: "ds:text-[color:var(--foreground)]", children: Ee(l, r.precision, o) }),
|
|
5553
|
-
h ? /* @__PURE__ */ t(
|
|
5555
|
+
h ? /* @__PURE__ */ t(ba, { flag: h, t: s }) : null,
|
|
5554
5556
|
/* @__PURE__ */ t(Un, { delta: u, def: r, t: s }),
|
|
5555
5557
|
g != null ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.grid.target", {
|
|
5556
5558
|
value: Ee(g, r.precision, o),
|
|
@@ -5571,7 +5573,7 @@ function ir({
|
|
|
5571
5573
|
e.targets.map((A) => [A.parameterKey, A.target])
|
|
5572
5574
|
), h = _e(i, "anthropometric"), g = _e(i, "dietary"), p = _e(i, "lab"), k = Ge(i), v = zn(i);
|
|
5573
5575
|
if (!l)
|
|
5574
|
-
return /* @__PURE__ */ t(
|
|
5576
|
+
return /* @__PURE__ */ t(Xa, { embedded: a, children: /* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { children: /* @__PURE__ */ t(
|
|
5575
5577
|
Ue,
|
|
5576
5578
|
{
|
|
5577
5579
|
variant: "first-use",
|
|
@@ -5589,7 +5591,7 @@ function ir({
|
|
|
5589
5591
|
] }),
|
|
5590
5592
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.readOnly.subtitle") })
|
|
5591
5593
|
] }),
|
|
5592
|
-
/* @__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: [
|
|
5593
5595
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.readOnly.summary", t: n, children: /* @__PURE__ */ d(
|
|
5594
5596
|
_,
|
|
5595
5597
|
{
|
|
@@ -5629,7 +5631,7 @@ function ir({
|
|
|
5629
5631
|
}
|
|
5630
5632
|
) }),
|
|
5631
5633
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.anthropometrics", t: n, children: /* @__PURE__ */ t(
|
|
5632
|
-
|
|
5634
|
+
Jn,
|
|
5633
5635
|
{
|
|
5634
5636
|
defs: h,
|
|
5635
5637
|
visit: l,
|
|
@@ -5639,7 +5641,7 @@ function ir({
|
|
|
5639
5641
|
}
|
|
5640
5642
|
) }),
|
|
5641
5643
|
g.length > 0 ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.dietary", t: n, children: /* @__PURE__ */ t(
|
|
5642
|
-
|
|
5644
|
+
Jn,
|
|
5643
5645
|
{
|
|
5644
5646
|
defs: g,
|
|
5645
5647
|
visit: l,
|
|
@@ -5648,7 +5650,7 @@ function ir({
|
|
|
5648
5650
|
t: n
|
|
5649
5651
|
}
|
|
5650
5652
|
) }) : null,
|
|
5651
|
-
/* @__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") }) }),
|
|
5652
5654
|
f ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.oncological", t: n, children: /* @__PURE__ */ d(
|
|
5653
5655
|
_,
|
|
5654
5656
|
{
|
|
@@ -5679,7 +5681,7 @@ function ir({
|
|
|
5679
5681
|
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: A.name }),
|
|
5680
5682
|
A.dose ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: A.dose }) : null,
|
|
5681
5683
|
/* @__PURE__ */ t(
|
|
5682
|
-
|
|
5684
|
+
X,
|
|
5683
5685
|
{
|
|
5684
5686
|
variant: A.kind === "medication" ? "info" : "neutral",
|
|
5685
5687
|
size: "sm",
|
|
@@ -5691,7 +5693,7 @@ function ir({
|
|
|
5691
5693
|
A.id
|
|
5692
5694
|
)) }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.readOnly.none") }) }),
|
|
5693
5695
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.labs", t: n, children: /* @__PURE__ */ t(
|
|
5694
|
-
|
|
5696
|
+
Jn,
|
|
5695
5697
|
{
|
|
5696
5698
|
defs: p,
|
|
5697
5699
|
visit: l,
|
|
@@ -5712,7 +5714,7 @@ function ir({
|
|
|
5712
5714
|
] }) : null,
|
|
5713
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: [
|
|
5714
5716
|
/* @__PURE__ */ d(
|
|
5715
|
-
|
|
5717
|
+
X,
|
|
5716
5718
|
{
|
|
5717
5719
|
variant: C.proposed ? "success" : "neutral",
|
|
5718
5720
|
size: "md",
|
|
@@ -5726,7 +5728,7 @@ function ir({
|
|
|
5726
5728
|
}
|
|
5727
5729
|
),
|
|
5728
5730
|
/* @__PURE__ */ d(
|
|
5729
|
-
|
|
5731
|
+
X,
|
|
5730
5732
|
{
|
|
5731
5733
|
variant: C.accepted ? "success" : "neutral",
|
|
5732
5734
|
size: "md",
|
|
@@ -5741,7 +5743,7 @@ function ir({
|
|
|
5741
5743
|
)
|
|
5742
5744
|
] }) }) : null,
|
|
5743
5745
|
e.intake && Object.keys(e.intake.answers).length > 0 ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.patientIntake", t: n, children: /* @__PURE__ */ t(
|
|
5744
|
-
|
|
5746
|
+
kt,
|
|
5745
5747
|
{
|
|
5746
5748
|
intake: e.intake,
|
|
5747
5749
|
sections: k,
|
|
@@ -5750,7 +5752,7 @@ function ir({
|
|
|
5750
5752
|
}
|
|
5751
5753
|
) }) : null,
|
|
5752
5754
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.evolution", t: n, children: /* @__PURE__ */ t(
|
|
5753
|
-
|
|
5755
|
+
Na,
|
|
5754
5756
|
{
|
|
5755
5757
|
record: e,
|
|
5756
5758
|
t: n,
|
|
@@ -5761,9 +5763,9 @@ function ir({
|
|
|
5761
5763
|
) })
|
|
5762
5764
|
] }) })
|
|
5763
5765
|
] });
|
|
5764
|
-
return /* @__PURE__ */ t(
|
|
5766
|
+
return /* @__PURE__ */ t(Xa, { embedded: a, children: w });
|
|
5765
5767
|
}
|
|
5766
|
-
function
|
|
5768
|
+
function Xa({
|
|
5767
5769
|
embedded: e,
|
|
5768
5770
|
children: n
|
|
5769
5771
|
}) {
|
|
@@ -5778,7 +5780,7 @@ function hn({
|
|
|
5778
5780
|
primaryAction: s,
|
|
5779
5781
|
secondaryAction: o
|
|
5780
5782
|
}) {
|
|
5781
|
-
return /* @__PURE__ */ t(
|
|
5783
|
+
return /* @__PURE__ */ t(ue, { variant: "elevated", "data-testid": n, children: /* @__PURE__ */ t(ue.Body, { children: /* @__PURE__ */ t(
|
|
5782
5784
|
Ue,
|
|
5783
5785
|
{
|
|
5784
5786
|
variant: e,
|
|
@@ -5824,7 +5826,7 @@ function Ht({
|
|
|
5824
5826
|
() => _e(a),
|
|
5825
5827
|
[a]
|
|
5826
5828
|
), $ = (F, E) => {
|
|
5827
|
-
L((H) =>
|
|
5829
|
+
L((H) => dt(H, F.key, E)), r == null || r(F.key, E);
|
|
5828
5830
|
};
|
|
5829
5831
|
return (
|
|
5830
5832
|
// The goals strip and the tabs are two objects, not one run-on block: an
|
|
@@ -5841,17 +5843,17 @@ function Ht({
|
|
|
5841
5843
|
onTargetChange: $
|
|
5842
5844
|
}
|
|
5843
5845
|
),
|
|
5844
|
-
/* @__PURE__ */ d(
|
|
5846
|
+
/* @__PURE__ */ d(Q, { value: A, onValueChange: R, children: [
|
|
5845
5847
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
5846
|
-
/* @__PURE__ */ d(
|
|
5847
|
-
c.map((F) => /* @__PURE__ */ t(
|
|
5848
|
-
/* @__PURE__ */ t(
|
|
5849
|
-
/* @__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") })
|
|
5850
5852
|
] }),
|
|
5851
5853
|
o ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: o }) : null
|
|
5852
5854
|
] }),
|
|
5853
5855
|
c.map((F) => /* @__PURE__ */ t(
|
|
5854
|
-
|
|
5856
|
+
Q.Content,
|
|
5855
5857
|
{
|
|
5856
5858
|
value: F.value,
|
|
5857
5859
|
forceMount: !0,
|
|
@@ -5861,7 +5863,7 @@ function Ht({
|
|
|
5861
5863
|
F.value
|
|
5862
5864
|
)),
|
|
5863
5865
|
/* @__PURE__ */ t(
|
|
5864
|
-
|
|
5866
|
+
Q.Content,
|
|
5865
5867
|
{
|
|
5866
5868
|
value: "questionnaire",
|
|
5867
5869
|
forceMount: !0,
|
|
@@ -5884,7 +5886,7 @@ function Ht({
|
|
|
5884
5886
|
}
|
|
5885
5887
|
),
|
|
5886
5888
|
/* @__PURE__ */ t(
|
|
5887
|
-
|
|
5889
|
+
Q.Content,
|
|
5888
5890
|
{
|
|
5889
5891
|
value: "trend",
|
|
5890
5892
|
forceMount: p ? !0 : void 0,
|
|
@@ -5910,16 +5912,18 @@ function Ht({
|
|
|
5910
5912
|
)
|
|
5911
5913
|
) : (
|
|
5912
5914
|
/* Read-only: values are answered in the questionnaire, never
|
|
5913
|
-
typed into the grid — one place to answer a question.
|
|
5914
|
-
|
|
5915
|
-
|
|
5915
|
+
typed into the grid — one place to answer a question. The
|
|
5916
|
+
same elevated card as the questionnaire's sections, so the
|
|
5917
|
+
grid is not the one surface sitting bare on the page. */
|
|
5918
|
+
/* @__PURE__ */ t(ue, { variant: "elevated", children: /* @__PURE__ */ t(ue.Body, { children: /* @__PURE__ */ t(
|
|
5919
|
+
Na,
|
|
5916
5920
|
{
|
|
5917
5921
|
record: T,
|
|
5918
5922
|
t: n,
|
|
5919
5923
|
config: a,
|
|
5920
5924
|
framed: !1
|
|
5921
5925
|
}
|
|
5922
|
-
)
|
|
5926
|
+
) }) })
|
|
5923
5927
|
)
|
|
5924
5928
|
}
|
|
5925
5929
|
)
|
|
@@ -6040,7 +6044,7 @@ function El({
|
|
|
6040
6044
|
}
|
|
6041
6045
|
);
|
|
6042
6046
|
}
|
|
6043
|
-
const or =
|
|
6047
|
+
const or = et("", {
|
|
6044
6048
|
variants: {
|
|
6045
6049
|
dragging: {
|
|
6046
6050
|
true: "ds:opacity-60",
|
|
@@ -6053,7 +6057,7 @@ const or = nt("", {
|
|
|
6053
6057
|
},
|
|
6054
6058
|
defaultVariants: { dragging: !1, dropTarget: !1 }
|
|
6055
6059
|
}), Gt = si(null);
|
|
6056
|
-
function
|
|
6060
|
+
function Zn({
|
|
6057
6061
|
count: e,
|
|
6058
6062
|
onReorder: n,
|
|
6059
6063
|
t: a,
|
|
@@ -6070,7 +6074,7 @@ function ea({
|
|
|
6070
6074
|
/* @__PURE__ */ t("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: r })
|
|
6071
6075
|
] });
|
|
6072
6076
|
}
|
|
6073
|
-
function
|
|
6077
|
+
function ea({
|
|
6074
6078
|
index: e,
|
|
6075
6079
|
label: n,
|
|
6076
6080
|
children: a
|
|
@@ -6113,7 +6117,7 @@ function na({
|
|
|
6113
6117
|
dropTarget: s && !u
|
|
6114
6118
|
})
|
|
6115
6119
|
}, g = /* @__PURE__ */ t(
|
|
6116
|
-
|
|
6120
|
+
ce,
|
|
6117
6121
|
{
|
|
6118
6122
|
size: "sm",
|
|
6119
6123
|
intent: "ghost",
|
|
@@ -6140,7 +6144,7 @@ function Dl() {
|
|
|
6140
6144
|
}))
|
|
6141
6145
|
};
|
|
6142
6146
|
}
|
|
6143
|
-
function
|
|
6147
|
+
function na(e, n) {
|
|
6144
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(
|
|
6145
6149
|
(r, l) => l === 0 ? r.toLowerCase() : r[0].toUpperCase() + r.slice(1).toLowerCase()
|
|
6146
6150
|
).join("");
|
|
@@ -6149,7 +6153,7 @@ function aa(e, n) {
|
|
|
6149
6153
|
s = `${i}${o}`, o += 1;
|
|
6150
6154
|
return s;
|
|
6151
6155
|
}
|
|
6152
|
-
function
|
|
6156
|
+
function aa(e, n, a) {
|
|
6153
6157
|
if (n === a || n < 0 || n >= e.length || a < 0 || a >= e.length) return null;
|
|
6154
6158
|
const i = [...e], [s] = i.splice(n, 1);
|
|
6155
6159
|
return i.splice(a, 0, s), i;
|
|
@@ -6174,7 +6178,7 @@ function jt(e, n) {
|
|
|
6174
6178
|
const a = e.type === "number" ? e.decimal ? "numberDecimal" : "numberInteger" : e.type === "choice" && e.detail ? "choiceWithText" : e.type;
|
|
6175
6179
|
return n(`anamnesis.configEditor.type.${a}`);
|
|
6176
6180
|
}
|
|
6177
|
-
const cr = ["down", "up", "toRange"],
|
|
6181
|
+
const cr = ["down", "up", "toRange"], la = ["anthropometric", "dietary", "lab"];
|
|
6178
6182
|
function Il({
|
|
6179
6183
|
config: e,
|
|
6180
6184
|
onConfigChange: n,
|
|
@@ -6192,14 +6196,14 @@ function Il({
|
|
|
6192
6196
|
)
|
|
6193
6197
|
} : P
|
|
6194
6198
|
), g = (m) => n({ ...e, pathologies: e.pathologies.map(m) }), p = (m, N, x) => {
|
|
6195
|
-
const P = _e(e, m), $ =
|
|
6199
|
+
const P = _e(e, m), $ = aa(P, N, x);
|
|
6196
6200
|
if (!$) return;
|
|
6197
6201
|
const F = new Map($.map((E, H) => [E.key, H]));
|
|
6198
6202
|
c(
|
|
6199
6203
|
(E) => F.has(E.key) ? { ...E, order: F.get(E.key) } : E
|
|
6200
6204
|
);
|
|
6201
6205
|
}, k = (m, N) => {
|
|
6202
|
-
const x =
|
|
6206
|
+
const x = aa(Ge(e), m, N);
|
|
6203
6207
|
if (!x) return;
|
|
6204
6208
|
const P = new Map(
|
|
6205
6209
|
x.map(($, F) => [$.key, F])
|
|
@@ -6208,7 +6212,7 @@ function Il({
|
|
|
6208
6212
|
($) => P.has($.key) ? { ...$, order: P.get($.key) } : $
|
|
6209
6213
|
);
|
|
6210
6214
|
}, v = (m, N, x) => {
|
|
6211
|
-
const P =
|
|
6215
|
+
const P = aa(m.fields, N, x);
|
|
6212
6216
|
if (!P) return;
|
|
6213
6217
|
const $ = new Map(
|
|
6214
6218
|
P.map((F, E) => [F.key, E])
|
|
@@ -6232,13 +6236,13 @@ function Il({
|
|
|
6232
6236
|
})) : g(
|
|
6233
6237
|
(x) => x.code === m.entry.code ? { ...x, enabled: N } : x
|
|
6234
6238
|
);
|
|
6235
|
-
}, C = Ne(e).length, w = _e(e).length, A =
|
|
6239
|
+
}, C = Ne(e).length, w = _e(e).length, A = ga(e).reduce(
|
|
6236
6240
|
(m, N) => m + N.fields.length,
|
|
6237
6241
|
0
|
|
6238
6242
|
), R = Ge(e).reduce(
|
|
6239
6243
|
(m, N) => m + N.fields.length,
|
|
6240
6244
|
0
|
|
6241
|
-
), T =
|
|
6245
|
+
), T = rt(e).length, L = sa(e).length, S = Ne(e).filter(
|
|
6242
6246
|
(m) => m.goal === !0
|
|
6243
6247
|
).length;
|
|
6244
6248
|
return /* @__PURE__ */ d(
|
|
@@ -6252,14 +6256,14 @@ function Il({
|
|
|
6252
6256
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: a("anamnesis.configEditor.title") }),
|
|
6253
6257
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.configEditor.intro") })
|
|
6254
6258
|
] }),
|
|
6255
|
-
/* @__PURE__ */ t(
|
|
6256
|
-
/* @__PURE__ */ d(
|
|
6257
|
-
/* @__PURE__ */ t(
|
|
6258
|
-
/* @__PURE__ */ t(
|
|
6259
|
-
/* @__PURE__ */ t(
|
|
6260
|
-
/* @__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") })
|
|
6261
6265
|
] }),
|
|
6262
|
-
/* @__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: [
|
|
6263
6267
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${a("anamnesis.configEditor.panelLive", {
|
|
6264
6268
|
count: A
|
|
6265
6269
|
})} · ${a("anamnesis.configEditor.panelNotCaptured", {
|
|
@@ -6268,7 +6272,7 @@ function Il({
|
|
|
6268
6272
|
count: R - A
|
|
6269
6273
|
})}` }),
|
|
6270
6274
|
/* @__PURE__ */ t(
|
|
6271
|
-
|
|
6275
|
+
Zn,
|
|
6272
6276
|
{
|
|
6273
6277
|
count: Ge(e).length,
|
|
6274
6278
|
onReorder: k,
|
|
@@ -6279,7 +6283,7 @@ function Il({
|
|
|
6279
6283
|
($) => $.enabled !== !1
|
|
6280
6284
|
).length;
|
|
6281
6285
|
return /* @__PURE__ */ t(
|
|
6282
|
-
|
|
6286
|
+
ea,
|
|
6283
6287
|
{
|
|
6284
6288
|
index: N,
|
|
6285
6289
|
label: fe(m, a),
|
|
@@ -6298,7 +6302,7 @@ function Il({
|
|
|
6298
6302
|
children: [
|
|
6299
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: [
|
|
6300
6304
|
fe(m, a),
|
|
6301
|
-
x ? /* @__PURE__ */ t(
|
|
6305
|
+
x ? /* @__PURE__ */ t(X, { size: "sm", variant: "neutral", children: a("anamnesis.configEditor.archived") }) : null
|
|
6302
6306
|
] }),
|
|
6303
6307
|
/* @__PURE__ */ d(
|
|
6304
6308
|
Sn,
|
|
@@ -6312,7 +6316,7 @@ function Il({
|
|
|
6312
6316
|
children: [
|
|
6313
6317
|
F,
|
|
6314
6318
|
/* @__PURE__ */ t(
|
|
6315
|
-
|
|
6319
|
+
ce,
|
|
6316
6320
|
{
|
|
6317
6321
|
size: "sm",
|
|
6318
6322
|
intent: "ghost",
|
|
@@ -6330,7 +6334,7 @@ function Il({
|
|
|
6330
6334
|
}
|
|
6331
6335
|
),
|
|
6332
6336
|
x ? /* @__PURE__ */ t(
|
|
6333
|
-
|
|
6337
|
+
ce,
|
|
6334
6338
|
{
|
|
6335
6339
|
size: "sm",
|
|
6336
6340
|
intent: "ghost",
|
|
@@ -6345,7 +6349,7 @@ function Il({
|
|
|
6345
6349
|
)
|
|
6346
6350
|
}
|
|
6347
6351
|
) : /* @__PURE__ */ t(
|
|
6348
|
-
|
|
6352
|
+
ce,
|
|
6349
6353
|
{
|
|
6350
6354
|
size: "sm",
|
|
6351
6355
|
intent: "ghost",
|
|
@@ -6370,24 +6374,24 @@ function Il({
|
|
|
6370
6374
|
"anamnesis.configEditor.sectionEmptyCapture"
|
|
6371
6375
|
) }) : null,
|
|
6372
6376
|
m.fields.length > 0 ? /* @__PURE__ */ t(
|
|
6373
|
-
|
|
6377
|
+
Zn,
|
|
6374
6378
|
{
|
|
6375
6379
|
count: m.fields.length,
|
|
6376
6380
|
onReorder: (E, H) => v(m, E, H),
|
|
6377
6381
|
t: a,
|
|
6378
6382
|
children: /* @__PURE__ */ t(en, { divider: "divided", children: m.fields.map((E, H) => /* @__PURE__ */ t(
|
|
6379
|
-
|
|
6383
|
+
ea,
|
|
6380
6384
|
{
|
|
6381
6385
|
index: H,
|
|
6382
|
-
label:
|
|
6386
|
+
label: ge(E, a),
|
|
6383
6387
|
children: ({ rowProps: j, handle: M }) => /* @__PURE__ */ t(
|
|
6384
6388
|
en.Item,
|
|
6385
6389
|
{
|
|
6386
6390
|
...j,
|
|
6387
6391
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6388
|
-
|
|
6392
|
+
ge(E, a),
|
|
6389
6393
|
E.required === !0 ? /* @__PURE__ */ t(
|
|
6390
|
-
|
|
6394
|
+
X,
|
|
6391
6395
|
{
|
|
6392
6396
|
size: "sm",
|
|
6393
6397
|
variant: "info",
|
|
@@ -6397,7 +6401,7 @@ function Il({
|
|
|
6397
6401
|
}
|
|
6398
6402
|
) : null,
|
|
6399
6403
|
E.enabled === !1 ? /* @__PURE__ */ t(
|
|
6400
|
-
|
|
6404
|
+
X,
|
|
6401
6405
|
{
|
|
6402
6406
|
size: "sm",
|
|
6403
6407
|
variant: "neutral",
|
|
@@ -6409,7 +6413,7 @@ function Il({
|
|
|
6409
6413
|
] }),
|
|
6410
6414
|
description: [
|
|
6411
6415
|
jt(E, a),
|
|
6412
|
-
|
|
6416
|
+
ht(E, a)
|
|
6413
6417
|
].filter(Boolean).join(" · "),
|
|
6414
6418
|
trailing: /* @__PURE__ */ d(
|
|
6415
6419
|
Sn,
|
|
@@ -6417,7 +6421,7 @@ function Il({
|
|
|
6417
6421
|
"aria-label": a(
|
|
6418
6422
|
"anamnesis.configEditor.rowActions",
|
|
6419
6423
|
{
|
|
6420
|
-
name:
|
|
6424
|
+
name: ge(
|
|
6421
6425
|
E,
|
|
6422
6426
|
a
|
|
6423
6427
|
)
|
|
@@ -6426,7 +6430,7 @@ function Il({
|
|
|
6426
6430
|
children: [
|
|
6427
6431
|
M,
|
|
6428
6432
|
/* @__PURE__ */ t(
|
|
6429
|
-
|
|
6433
|
+
ce,
|
|
6430
6434
|
{
|
|
6431
6435
|
size: "sm",
|
|
6432
6436
|
intent: "ghost",
|
|
@@ -6434,7 +6438,7 @@ function Il({
|
|
|
6434
6438
|
"aria-label": a(
|
|
6435
6439
|
"anamnesis.configEditor.edit",
|
|
6436
6440
|
{
|
|
6437
|
-
name:
|
|
6441
|
+
name: ge(
|
|
6438
6442
|
E,
|
|
6439
6443
|
a
|
|
6440
6444
|
)
|
|
@@ -6448,7 +6452,7 @@ function Il({
|
|
|
6448
6452
|
}
|
|
6449
6453
|
),
|
|
6450
6454
|
E.enabled === !1 ? /* @__PURE__ */ t(
|
|
6451
|
-
|
|
6455
|
+
ce,
|
|
6452
6456
|
{
|
|
6453
6457
|
size: "sm",
|
|
6454
6458
|
intent: "ghost",
|
|
@@ -6456,7 +6460,7 @@ function Il({
|
|
|
6456
6460
|
"aria-label": a(
|
|
6457
6461
|
"anamnesis.configEditor.restore",
|
|
6458
6462
|
{
|
|
6459
|
-
name:
|
|
6463
|
+
name: ge(
|
|
6460
6464
|
E,
|
|
6461
6465
|
a
|
|
6462
6466
|
)
|
|
@@ -6472,7 +6476,7 @@ function Il({
|
|
|
6472
6476
|
)
|
|
6473
6477
|
}
|
|
6474
6478
|
) : /* @__PURE__ */ t(
|
|
6475
|
-
|
|
6479
|
+
ce,
|
|
6476
6480
|
{
|
|
6477
6481
|
size: "sm",
|
|
6478
6482
|
intent: "ghost",
|
|
@@ -6480,7 +6484,7 @@ function Il({
|
|
|
6480
6484
|
"aria-label": a(
|
|
6481
6485
|
"anamnesis.configEditor.archive",
|
|
6482
6486
|
{
|
|
6483
|
-
name:
|
|
6487
|
+
name: ge(
|
|
6484
6488
|
E,
|
|
6485
6489
|
a
|
|
6486
6490
|
)
|
|
@@ -6507,7 +6511,7 @@ function Il({
|
|
|
6507
6511
|
}
|
|
6508
6512
|
) : null,
|
|
6509
6513
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
6510
|
-
|
|
6514
|
+
ne,
|
|
6511
6515
|
{
|
|
6512
6516
|
intent: "ghost",
|
|
6513
6517
|
size: "sm",
|
|
@@ -6528,7 +6532,7 @@ function Il({
|
|
|
6528
6532
|
}
|
|
6529
6533
|
),
|
|
6530
6534
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
6531
|
-
|
|
6535
|
+
ne,
|
|
6532
6536
|
{
|
|
6533
6537
|
intent: "outline",
|
|
6534
6538
|
size: "sm",
|
|
@@ -6538,13 +6542,13 @@ function Il({
|
|
|
6538
6542
|
}
|
|
6539
6543
|
) })
|
|
6540
6544
|
] }) }),
|
|
6541
|
-
/* @__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: [
|
|
6542
6546
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${a("anamnesis.configEditor.panelLive", {
|
|
6543
6547
|
count: C
|
|
6544
6548
|
})} · ${a("anamnesis.configEditor.panelArchived", {
|
|
6545
6549
|
count: w - C
|
|
6546
6550
|
})}` }),
|
|
6547
|
-
|
|
6551
|
+
la.map((m) => {
|
|
6548
6552
|
const N = _e(
|
|
6549
6553
|
e,
|
|
6550
6554
|
m
|
|
@@ -6556,7 +6560,7 @@ function Il({
|
|
|
6556
6560
|
children: [
|
|
6557
6561
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: a(`anamnesis.group.${m}`) }),
|
|
6558
6562
|
/* @__PURE__ */ t(
|
|
6559
|
-
|
|
6563
|
+
Zn,
|
|
6560
6564
|
{
|
|
6561
6565
|
count: N.length,
|
|
6562
6566
|
onReorder: (x, P) => p(m, x, P),
|
|
@@ -6570,7 +6574,7 @@ function Il({
|
|
|
6570
6574
|
x.locked ? a("anamnesis.configEditor.lockedHint") : null
|
|
6571
6575
|
].filter(Boolean).join(" · ");
|
|
6572
6576
|
return /* @__PURE__ */ t(
|
|
6573
|
-
|
|
6577
|
+
ea,
|
|
6574
6578
|
{
|
|
6575
6579
|
index: P,
|
|
6576
6580
|
label: Te(x, a),
|
|
@@ -6581,7 +6585,7 @@ function Il({
|
|
|
6581
6585
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6582
6586
|
Te(x, a),
|
|
6583
6587
|
x.locked ? /* @__PURE__ */ t(
|
|
6584
|
-
|
|
6588
|
+
X,
|
|
6585
6589
|
{
|
|
6586
6590
|
size: "sm",
|
|
6587
6591
|
variant: "neutral",
|
|
@@ -6589,7 +6593,7 @@ function Il({
|
|
|
6589
6593
|
children: a("anamnesis.configEditor.locked")
|
|
6590
6594
|
}
|
|
6591
6595
|
) : null,
|
|
6592
|
-
x.enabled === !1 ? /* @__PURE__ */ t(
|
|
6596
|
+
x.enabled === !1 ? /* @__PURE__ */ t(X, { size: "sm", variant: "neutral", children: a(
|
|
6593
6597
|
"anamnesis.configEditor.archived"
|
|
6594
6598
|
) }) : null
|
|
6595
6599
|
] }),
|
|
@@ -6609,7 +6613,7 @@ function Il({
|
|
|
6609
6613
|
children: [
|
|
6610
6614
|
E,
|
|
6611
6615
|
/* @__PURE__ */ t(
|
|
6612
|
-
|
|
6616
|
+
ce,
|
|
6613
6617
|
{
|
|
6614
6618
|
size: "sm",
|
|
6615
6619
|
intent: "ghost",
|
|
@@ -6630,7 +6634,7 @@ function Il({
|
|
|
6630
6634
|
}
|
|
6631
6635
|
),
|
|
6632
6636
|
x.locked ? null : x.enabled === !1 ? /* @__PURE__ */ t(
|
|
6633
|
-
|
|
6637
|
+
ce,
|
|
6634
6638
|
{
|
|
6635
6639
|
size: "sm",
|
|
6636
6640
|
intent: "ghost",
|
|
@@ -6653,7 +6657,7 @@ function Il({
|
|
|
6653
6657
|
)
|
|
6654
6658
|
}
|
|
6655
6659
|
) : /* @__PURE__ */ t(
|
|
6656
|
-
|
|
6660
|
+
ce,
|
|
6657
6661
|
{
|
|
6658
6662
|
size: "sm",
|
|
6659
6663
|
intent: "ghost",
|
|
@@ -6693,7 +6697,7 @@ function Il({
|
|
|
6693
6697
|
);
|
|
6694
6698
|
}),
|
|
6695
6699
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
6696
|
-
|
|
6700
|
+
ne,
|
|
6697
6701
|
{
|
|
6698
6702
|
intent: "outline",
|
|
6699
6703
|
size: "sm",
|
|
@@ -6703,13 +6707,13 @@ function Il({
|
|
|
6703
6707
|
}
|
|
6704
6708
|
) })
|
|
6705
6709
|
] }) }),
|
|
6706
|
-
/* @__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: [
|
|
6707
6711
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${a("anamnesis.configEditor.panelLive", {
|
|
6708
6712
|
count: T
|
|
6709
6713
|
})} · ${a("anamnesis.configEditor.panelArchived", {
|
|
6710
6714
|
count: L - T
|
|
6711
6715
|
})}` }),
|
|
6712
|
-
/* @__PURE__ */ t(en, { divider: "divided", children:
|
|
6716
|
+
/* @__PURE__ */ t(en, { divider: "divided", children: sa(e).map((m) => {
|
|
6713
6717
|
const N = e.pathologies.some(
|
|
6714
6718
|
(P) => P.parentCode === m.code && P.enabled !== !1
|
|
6715
6719
|
), x = [
|
|
@@ -6723,7 +6727,7 @@ function Il({
|
|
|
6723
6727
|
{
|
|
6724
6728
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6725
6729
|
Se(m.code, a, m),
|
|
6726
|
-
m.enabled === !1 ? /* @__PURE__ */ t(
|
|
6730
|
+
m.enabled === !1 ? /* @__PURE__ */ t(X, { size: "sm", variant: "neutral", children: a("anamnesis.configEditor.archived") }) : null
|
|
6727
6731
|
] }),
|
|
6728
6732
|
description: x || void 0,
|
|
6729
6733
|
trailing: /* @__PURE__ */ d(
|
|
@@ -6734,7 +6738,7 @@ function Il({
|
|
|
6734
6738
|
}),
|
|
6735
6739
|
children: [
|
|
6736
6740
|
/* @__PURE__ */ t(
|
|
6737
|
-
|
|
6741
|
+
ce,
|
|
6738
6742
|
{
|
|
6739
6743
|
size: "sm",
|
|
6740
6744
|
intent: "ghost",
|
|
@@ -6750,7 +6754,7 @@ function Il({
|
|
|
6750
6754
|
}
|
|
6751
6755
|
),
|
|
6752
6756
|
m.enabled === !1 ? /* @__PURE__ */ t(
|
|
6753
|
-
|
|
6757
|
+
ce,
|
|
6754
6758
|
{
|
|
6755
6759
|
size: "sm",
|
|
6756
6760
|
intent: "ghost",
|
|
@@ -6771,7 +6775,7 @@ function Il({
|
|
|
6771
6775
|
)
|
|
6772
6776
|
}
|
|
6773
6777
|
) : /* @__PURE__ */ t(
|
|
6774
|
-
|
|
6778
|
+
ce,
|
|
6775
6779
|
{
|
|
6776
6780
|
size: "sm",
|
|
6777
6781
|
intent: "ghost",
|
|
@@ -6800,7 +6804,7 @@ function Il({
|
|
|
6800
6804
|
);
|
|
6801
6805
|
}) }),
|
|
6802
6806
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
6803
|
-
|
|
6807
|
+
ne,
|
|
6804
6808
|
{
|
|
6805
6809
|
intent: "outline",
|
|
6806
6810
|
size: "sm",
|
|
@@ -6810,12 +6814,12 @@ function Il({
|
|
|
6810
6814
|
}
|
|
6811
6815
|
) })
|
|
6812
6816
|
] }) }),
|
|
6813
|
-
/* @__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: [
|
|
6814
6818
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.configEditor.panelTracked", {
|
|
6815
6819
|
count: S
|
|
6816
6820
|
}) }),
|
|
6817
6821
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.configEditor.targetsIntro") }),
|
|
6818
|
-
|
|
6822
|
+
la.map((m) => {
|
|
6819
6823
|
const N = Ne(e, m);
|
|
6820
6824
|
return N.length === 0 ? null : /* @__PURE__ */ d(
|
|
6821
6825
|
"section",
|
|
@@ -6824,7 +6828,7 @@ function Il({
|
|
|
6824
6828
|
children: [
|
|
6825
6829
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: a(`anamnesis.group.${m}`) }),
|
|
6826
6830
|
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: N.map((x) => /* @__PURE__ */ t(
|
|
6827
|
-
|
|
6831
|
+
ha,
|
|
6828
6832
|
{
|
|
6829
6833
|
label: Te(x, a),
|
|
6830
6834
|
checked: x.goal === !0,
|
|
@@ -6877,7 +6881,7 @@ function ur({
|
|
|
6877
6881
|
t: s
|
|
6878
6882
|
}) {
|
|
6879
6883
|
return /* @__PURE__ */ t(
|
|
6880
|
-
|
|
6884
|
+
Z,
|
|
6881
6885
|
{
|
|
6882
6886
|
open: e !== null,
|
|
6883
6887
|
onOpenChange: (o) => {
|
|
@@ -6956,10 +6960,10 @@ function pr({
|
|
|
6956
6960
|
});
|
|
6957
6961
|
n();
|
|
6958
6962
|
};
|
|
6959
|
-
return /* @__PURE__ */ d(
|
|
6960
|
-
/* @__PURE__ */ d(
|
|
6961
|
-
/* @__PURE__ */ t(
|
|
6962
|
-
/* @__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", {
|
|
6963
6967
|
code: o.code
|
|
6964
6968
|
}) : e.kind === "field" ? `${s("anamnesis.configEditor.keyLine", {
|
|
6965
6969
|
key: e.entry.key
|
|
@@ -6969,7 +6973,7 @@ function pr({
|
|
|
6969
6973
|
key: o.key
|
|
6970
6974
|
}) })
|
|
6971
6975
|
] }),
|
|
6972
|
-
/* @__PURE__ */ d(
|
|
6976
|
+
/* @__PURE__ */ d(Z.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
6973
6977
|
/* @__PURE__ */ t(
|
|
6974
6978
|
V,
|
|
6975
6979
|
{
|
|
@@ -6994,7 +6998,7 @@ function pr({
|
|
|
6994
6998
|
}
|
|
6995
6999
|
) }) : null,
|
|
6996
7000
|
e.kind === "field" ? /* @__PURE__ */ t(
|
|
6997
|
-
|
|
7001
|
+
ha,
|
|
6998
7002
|
{
|
|
6999
7003
|
label: s("anamnesis.configEditor.requiredField"),
|
|
7000
7004
|
checked: g,
|
|
@@ -7023,19 +7027,19 @@ function pr({
|
|
|
7023
7027
|
).join(", ")
|
|
7024
7028
|
}) }) : null
|
|
7025
7029
|
] }),
|
|
7026
|
-
/* @__PURE__ */ d(
|
|
7027
|
-
/* @__PURE__ */ t(
|
|
7028
|
-
/* @__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") })
|
|
7029
7033
|
] })
|
|
7030
7034
|
] });
|
|
7031
7035
|
}
|
|
7032
7036
|
function hr(e, n) {
|
|
7033
|
-
return e.kind === "parameter" ? Te({ ...e.entry, label: void 0 }, n) : e.kind === "section" ? fe({ ...e.entry, label: void 0 }, n) : e.kind === "field" ?
|
|
7037
|
+
return e.kind === "parameter" ? Te({ ...e.entry, label: void 0 }, n) : e.kind === "section" ? fe({ ...e.entry, label: void 0 }, n) : e.kind === "field" ? ge({ ...e.entry, label: void 0 }, n) : Se(e.entry.code, n, {
|
|
7034
7038
|
...e.entry,
|
|
7035
7039
|
label: void 0
|
|
7036
7040
|
});
|
|
7037
7041
|
}
|
|
7038
|
-
function
|
|
7042
|
+
function ta(e) {
|
|
7039
7043
|
return e === "choice" || e === "choiceWithText" || e === "multiChoice";
|
|
7040
7044
|
}
|
|
7041
7045
|
function gr({
|
|
@@ -7046,7 +7050,7 @@ function gr({
|
|
|
7046
7050
|
t: s
|
|
7047
7051
|
}) {
|
|
7048
7052
|
return /* @__PURE__ */ t(
|
|
7049
|
-
|
|
7053
|
+
Z,
|
|
7050
7054
|
{
|
|
7051
7055
|
open: e !== null,
|
|
7052
7056
|
onOpenChange: (o) => {
|
|
@@ -7073,7 +7077,7 @@ function fr({
|
|
|
7073
7077
|
onConfigChange: i,
|
|
7074
7078
|
t: s
|
|
7075
7079
|
}) {
|
|
7076
|
-
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) => ({
|
|
7077
7081
|
value: D,
|
|
7078
7082
|
label: s(`anamnesis.group.${D}`)
|
|
7079
7083
|
})), M = cr.map((D) => ({
|
|
@@ -7082,33 +7086,33 @@ function fr({
|
|
|
7082
7086
|
})), U = rr.map((D) => ({
|
|
7083
7087
|
value: D,
|
|
7084
7088
|
label: s(`anamnesis.configEditor.type.${D}`)
|
|
7085
|
-
})),
|
|
7089
|
+
})), Y = a.pathologies.filter((D) => !D.parentCode && D.enabled !== !1).map((D) => ({
|
|
7086
7090
|
value: D.code,
|
|
7087
7091
|
label: Se(D.code, s, D)
|
|
7088
|
-
})),
|
|
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
|
|
7089
7093
|
// everywhere codes are matched (lookup, archive, edit) —
|
|
7090
7094
|
// uniqueness is the add gate, matching keyFromLabel's guarantee
|
|
7091
7095
|
// on the other vocabularies.
|
|
7092
7096
|
!a.pathologies.some(
|
|
7093
7097
|
(D) => D.code.toLowerCase() === x.trim().toLowerCase()
|
|
7094
|
-
),
|
|
7098
|
+
), J = () => {
|
|
7095
7099
|
const D = o.trim();
|
|
7096
7100
|
if (e.kind === "parameter") {
|
|
7097
|
-
const B = new Set(a.parameters.map((Fe) => Fe.key)),
|
|
7101
|
+
const B = new Set(a.parameters.map((Fe) => Fe.key)), ee = (Fe) => {
|
|
7098
7102
|
if (Fe.trim() === "") return;
|
|
7099
7103
|
const Pe = Number(Fe);
|
|
7100
7104
|
return Number.isFinite(Pe) ? Pe : void 0;
|
|
7101
|
-
},
|
|
7102
|
-
key:
|
|
7105
|
+
}, pe = ee(k), de = ee(f), Le = {
|
|
7106
|
+
key: na(D, B),
|
|
7103
7107
|
label: D,
|
|
7104
7108
|
group: l,
|
|
7105
7109
|
betterDirection: u,
|
|
7106
7110
|
precision: Number(w),
|
|
7107
7111
|
...g.trim() ? { unit: g.trim() } : {},
|
|
7108
|
-
...
|
|
7112
|
+
...pe != null || de != null ? {
|
|
7109
7113
|
referenceRange: {
|
|
7110
|
-
...
|
|
7111
|
-
...
|
|
7114
|
+
...pe != null ? { min: pe } : {},
|
|
7115
|
+
...de != null ? { max: de } : {}
|
|
7112
7116
|
}
|
|
7113
7117
|
} : {}
|
|
7114
7118
|
};
|
|
@@ -7116,35 +7120,35 @@ function fr({
|
|
|
7116
7120
|
} else if (e.kind === "field") {
|
|
7117
7121
|
const B = new Set(
|
|
7118
7122
|
a.intakeSections.flatMap(
|
|
7119
|
-
(
|
|
7123
|
+
(de) => de.fields.map((Le) => Le.key)
|
|
7120
7124
|
)
|
|
7121
|
-
),
|
|
7122
|
-
key:
|
|
7125
|
+
), ee = R === "numberInteger" || R === "numberDecimal" ? "number" : R === "choiceWithText" ? "choice" : R, pe = {
|
|
7126
|
+
key: na(D, B),
|
|
7123
7127
|
label: D,
|
|
7124
|
-
type:
|
|
7128
|
+
type: ee,
|
|
7125
7129
|
...R === "numberDecimal" ? { decimal: !0 } : {},
|
|
7126
7130
|
...R === "choiceWithText" ? { detail: !0 } : {},
|
|
7127
|
-
...
|
|
7131
|
+
...ta(R) ? { options: ae } : {},
|
|
7128
7132
|
...m.trim() ? { helpText: m.trim() } : {},
|
|
7129
7133
|
...$ ? { required: !0 } : {}
|
|
7130
7134
|
};
|
|
7131
7135
|
i({
|
|
7132
7136
|
...a,
|
|
7133
7137
|
intakeSections: a.intakeSections.map(
|
|
7134
|
-
(
|
|
7138
|
+
(de) => de.key === e.sectionKey ? { ...de, fields: [...de.fields, pe] } : de
|
|
7135
7139
|
)
|
|
7136
7140
|
});
|
|
7137
7141
|
} else if (e.kind === "section") {
|
|
7138
7142
|
const B = new Set(
|
|
7139
|
-
a.intakeSections.map((
|
|
7140
|
-
),
|
|
7141
|
-
key:
|
|
7143
|
+
a.intakeSections.map((pe) => pe.key)
|
|
7144
|
+
), ee = {
|
|
7145
|
+
key: na(D, B),
|
|
7142
7146
|
label: D,
|
|
7143
7147
|
fields: []
|
|
7144
7148
|
};
|
|
7145
7149
|
i({
|
|
7146
7150
|
...a,
|
|
7147
|
-
intakeSections: [...a.intakeSections,
|
|
7151
|
+
intakeSections: [...a.intakeSections, ee]
|
|
7148
7152
|
});
|
|
7149
7153
|
} else {
|
|
7150
7154
|
const B = {
|
|
@@ -7161,12 +7165,12 @@ function fr({
|
|
|
7161
7165
|
}, Re = e.kind === "parameter" ? s("anamnesis.configEditor.addParameterTitle") : e.kind === "field" ? s("anamnesis.configEditor.addQuestionTitle", {
|
|
7162
7166
|
section: vr(a, e.sectionKey, s)
|
|
7163
7167
|
}) : e.kind === "section" ? s("anamnesis.configEditor.addSectionTitle") : s("anamnesis.configEditor.addCodeTitle");
|
|
7164
|
-
return /* @__PURE__ */ d(
|
|
7165
|
-
/* @__PURE__ */ d(
|
|
7166
|
-
/* @__PURE__ */ t(
|
|
7167
|
-
/* @__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") })
|
|
7168
7172
|
] }),
|
|
7169
|
-
/* @__PURE__ */ d(
|
|
7173
|
+
/* @__PURE__ */ d(Z.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
7170
7174
|
e.kind === "pathology" ? /* @__PURE__ */ t(V, { label: s("anamnesis.configEditor.codeField"), required: !0, children: /* @__PURE__ */ t(
|
|
7171
7175
|
ie,
|
|
7172
7176
|
{
|
|
@@ -7282,7 +7286,7 @@ function fr({
|
|
|
7282
7286
|
"aria-label": s("anamnesis.configEditor.typeField")
|
|
7283
7287
|
}
|
|
7284
7288
|
) }),
|
|
7285
|
-
|
|
7289
|
+
ta(R) ? /* @__PURE__ */ t(
|
|
7286
7290
|
V,
|
|
7287
7291
|
{
|
|
7288
7292
|
label: s("anamnesis.configEditor.optionsField"),
|
|
@@ -7306,7 +7310,7 @@ function fr({
|
|
|
7306
7310
|
}
|
|
7307
7311
|
) }),
|
|
7308
7312
|
/* @__PURE__ */ t(
|
|
7309
|
-
|
|
7313
|
+
ha,
|
|
7310
7314
|
{
|
|
7311
7315
|
label: s("anamnesis.configEditor.requiredField"),
|
|
7312
7316
|
checked: $,
|
|
@@ -7323,7 +7327,7 @@ function fr({
|
|
|
7323
7327
|
children: /* @__PURE__ */ t(
|
|
7324
7328
|
Ve,
|
|
7325
7329
|
{
|
|
7326
|
-
options:
|
|
7330
|
+
options: Y,
|
|
7327
7331
|
value: E,
|
|
7328
7332
|
onValueChange: (D) => H(D),
|
|
7329
7333
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
@@ -7335,9 +7339,9 @@ function fr({
|
|
|
7335
7339
|
) : null,
|
|
7336
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
|
|
7337
7341
|
] }),
|
|
7338
|
-
/* @__PURE__ */ d(
|
|
7339
|
-
/* @__PURE__ */ t(
|
|
7340
|
-
/* @__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") })
|
|
7341
7345
|
] })
|
|
7342
7346
|
] });
|
|
7343
7347
|
}
|
|
@@ -7347,12 +7351,12 @@ function vr(e, n, a) {
|
|
|
7347
7351
|
);
|
|
7348
7352
|
return i ? fe(i, a) : n;
|
|
7349
7353
|
}
|
|
7350
|
-
function
|
|
7354
|
+
function Ja(e) {
|
|
7351
7355
|
return e.kind === "visit" ? `anamnesis-visit-${e.visitId}` : `anamnesis-event-${e.eventId}`;
|
|
7352
7356
|
}
|
|
7353
7357
|
function Rl(e, n) {
|
|
7354
|
-
const a = e.visits.filter(
|
|
7355
|
-
id:
|
|
7358
|
+
const a = e.visits.filter(Nt).map((s) => ({
|
|
7359
|
+
id: Ja({ kind: "visit", visitId: s.id }),
|
|
7356
7360
|
dateIso: s.dateIso,
|
|
7357
7361
|
author: s.practitioner ? { name: s.practitioner } : void 0,
|
|
7358
7362
|
clinical: !0,
|
|
@@ -7371,7 +7375,7 @@ function Rl(e, n) {
|
|
|
7371
7375
|
|
|
7372
7376
|
`)
|
|
7373
7377
|
})), i = (e.events ?? []).map((s) => ({
|
|
7374
|
-
id:
|
|
7378
|
+
id: Ja({ kind: "event", eventId: s.id }),
|
|
7375
7379
|
dateIso: s.dateIso,
|
|
7376
7380
|
// No author and not clinical — see the header. The card renders the date
|
|
7377
7381
|
// itself, so the body carries the label without repeating it.
|
|
@@ -7381,7 +7385,7 @@ function Rl(e, n) {
|
|
|
7381
7385
|
// a gym membership as one.
|
|
7382
7386
|
"aria-label": n("anamnesis.rail.eventLabel"),
|
|
7383
7387
|
contentFormat: "markdown",
|
|
7384
|
-
content: `**${n(`anamnesis.event.label.${s.labelKey}`)}** — ${
|
|
7388
|
+
content: `**${n(`anamnesis.event.label.${s.labelKey}`)}** — ${Dt(
|
|
7385
7389
|
s,
|
|
7386
7390
|
n
|
|
7387
7391
|
)}`
|
|
@@ -7390,7 +7394,7 @@ function Rl(e, n) {
|
|
|
7390
7394
|
(s, o) => o.dateIso.localeCompare(s.dateIso)
|
|
7391
7395
|
);
|
|
7392
7396
|
}
|
|
7393
|
-
const
|
|
7397
|
+
const ia = "patterns", yr = {
|
|
7394
7398
|
anamnesis: {
|
|
7395
7399
|
mainLabel: "Anamnesis record — {{mode}}",
|
|
7396
7400
|
mode: { intake: "Intake", compile: "Compile", readOnly: "Read-only" },
|
|
@@ -9236,12 +9240,12 @@ const sa = "patterns", yr = {
|
|
|
9236
9240
|
};
|
|
9237
9241
|
function Ll(e) {
|
|
9238
9242
|
for (const [n, a] of Object.entries(wr))
|
|
9239
|
-
e.hasResourceBundle(n,
|
|
9243
|
+
e.hasResourceBundle(n, ia) ? e.addResourceBundle(n, ia, a, !0, !1) : e.addResourceBundle(n, ia, a);
|
|
9240
9244
|
}
|
|
9241
9245
|
function Nr(e) {
|
|
9242
9246
|
var a;
|
|
9243
9247
|
if (!e) return;
|
|
9244
|
-
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();
|
|
9245
9249
|
return n == null || Number.isNaN(n) ? void 0 : n;
|
|
9246
9250
|
}
|
|
9247
9251
|
function Wt(e) {
|
|
@@ -9265,9 +9269,9 @@ function Tr(e, n) {
|
|
|
9265
9269
|
function Sr(e, n, a) {
|
|
9266
9270
|
const i = {
|
|
9267
9271
|
id: e.key,
|
|
9268
|
-
label:
|
|
9272
|
+
label: ge(e, a),
|
|
9269
9273
|
value: Bn(n.answer, e, a),
|
|
9270
|
-
highlighted:
|
|
9274
|
+
highlighted: Ot(e, n.answer)
|
|
9271
9275
|
};
|
|
9272
9276
|
e.unit && (i.unit = e.unit);
|
|
9273
9277
|
const s = Wt(n.source);
|
|
@@ -9298,29 +9302,29 @@ function Fl(e, n, a, i) {
|
|
|
9298
9302
|
export {
|
|
9299
9303
|
El as A,
|
|
9300
9304
|
qi as L,
|
|
9301
|
-
|
|
9305
|
+
ia as P,
|
|
9302
9306
|
We as S,
|
|
9303
9307
|
Bi as T,
|
|
9304
9308
|
Il as a,
|
|
9305
9309
|
_e as b,
|
|
9306
|
-
|
|
9310
|
+
sa as c,
|
|
9307
9311
|
Ge as d,
|
|
9308
|
-
|
|
9312
|
+
Ja as e,
|
|
9309
9313
|
Rl as f,
|
|
9310
9314
|
Hi as g,
|
|
9311
9315
|
Ne as h,
|
|
9312
|
-
|
|
9313
|
-
|
|
9316
|
+
rt as i,
|
|
9317
|
+
ga as j,
|
|
9314
9318
|
Bn as k,
|
|
9315
|
-
|
|
9316
|
-
|
|
9319
|
+
ge as l,
|
|
9320
|
+
Ot as m,
|
|
9317
9321
|
Vi as n,
|
|
9318
9322
|
Ui as o,
|
|
9319
|
-
|
|
9323
|
+
na as p,
|
|
9320
9324
|
dn as q,
|
|
9321
9325
|
Ll as r,
|
|
9322
9326
|
Dl as s,
|
|
9323
9327
|
Vt as t,
|
|
9324
9328
|
Fl as u
|
|
9325
9329
|
};
|
|
9326
|
-
//# sourceMappingURL=anamnesis-summary-rows-
|
|
9330
|
+
//# sourceMappingURL=anamnesis-summary-rows-6tOCXdoz.js.map
|