@alfadocs/ui-kit-debug 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{anamnesis-i18n-DGRdwc0i.js → anamnesis-i18n-BEhPg2hh.js} +762 -759
- package/dist/_chunks/{anamnesis-i18n-DGRdwc0i.js.map → anamnesis-i18n-BEhPg2hh.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/index.js +1 -1
- package/dist/patterns/anamnesis/anamnesis-intake.d.ts +8 -2
- package/dist/patterns/anamnesis/anamnesis-intake.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis.d.ts +6 -1
- package/dist/patterns/anamnesis/anamnesis.d.ts.map +1 -1
- package/dist/patterns/anamnesis/index.d.ts +1 -0
- package/dist/patterns/anamnesis/index.d.ts.map +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as d, jsx as t, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as De, useState as
|
|
3
|
-
import { B as
|
|
2
|
+
import { useRef as De, useState as $, useEffect as Ea, useCallback as da, useId as je, useMemo as M, Fragment as Rt } from "react";
|
|
3
|
+
import { B as W } from "./badge-DCOqV9mI.js";
|
|
4
4
|
import { B as J } from "./button-CPGiR_bH.js";
|
|
5
5
|
import { I as Q } from "./icon-button-C_kbcd7I.js";
|
|
6
6
|
import { C as ye } from "./card-DPmk26CL.js";
|
|
7
7
|
import { C as tn, b as Un, a as sn } from "./collapsible-CGL9ontS.js";
|
|
8
8
|
import { E as Qe } from "./empty-state-CrLsi0XI.js";
|
|
9
|
-
import { F as
|
|
9
|
+
import { F as O } from "./form-field-M5UpX65Z.js";
|
|
10
10
|
import { M as on } from "./multi-select-CC52Qws6.js";
|
|
11
11
|
import { N as ha } from "./number-input-DjWzmlEY.js";
|
|
12
12
|
import { R as we } from "./radio-TWf9Q-mp.js";
|
|
@@ -940,7 +940,7 @@ function Oi(e, a) {
|
|
|
940
940
|
}
|
|
941
941
|
const Mi = 4;
|
|
942
942
|
function et() {
|
|
943
|
-
const e = De(null), [a, n] =
|
|
943
|
+
const e = De(null), [a, n] = $(null);
|
|
944
944
|
Ea(() => {
|
|
945
945
|
if (a == null) return;
|
|
946
946
|
let s = 0, o = 0;
|
|
@@ -1071,7 +1071,7 @@ function Oa({ delta: e, def: a, t: n }) {
|
|
|
1071
1071
|
);
|
|
1072
1072
|
}
|
|
1073
1073
|
function nt({ t: e }) {
|
|
1074
|
-
return /* @__PURE__ */ t(
|
|
1074
|
+
return /* @__PURE__ */ t(W, { variant: "info", size: "sm", leading: /* @__PURE__ */ t(_t, { "aria-hidden": "true" }), children: e("anamnesis.origin.fromPatient") });
|
|
1075
1075
|
}
|
|
1076
1076
|
function gn({
|
|
1077
1077
|
flag: e,
|
|
@@ -1081,7 +1081,7 @@ function gn({
|
|
|
1081
1081
|
if (!e) return null;
|
|
1082
1082
|
const i = a(e === "high" ? "anamnesis.range.aboveRange" : "anamnesis.range.belowRange");
|
|
1083
1083
|
return /* @__PURE__ */ t(
|
|
1084
|
-
|
|
1084
|
+
W,
|
|
1085
1085
|
{
|
|
1086
1086
|
variant: "warning",
|
|
1087
1087
|
size: "sm",
|
|
@@ -1190,7 +1190,7 @@ function Ki({
|
|
|
1190
1190
|
children: [
|
|
1191
1191
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1192
1192
|
r("anamnesis.summary.fullQuestionnaire"),
|
|
1193
|
-
/* @__PURE__ */ t(
|
|
1193
|
+
/* @__PURE__ */ t(W, { variant: "neutral", size: "sm", children: r("anamnesis.intake.sectionProgress", {
|
|
1194
1194
|
answered: i.answered,
|
|
1195
1195
|
total: i.total
|
|
1196
1196
|
}) })
|
|
@@ -1419,14 +1419,14 @@ function ct({
|
|
|
1419
1419
|
] }),
|
|
1420
1420
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
1421
1421
|
/* @__PURE__ */ t(
|
|
1422
|
-
|
|
1422
|
+
W,
|
|
1423
1423
|
{
|
|
1424
1424
|
variant: l.visitType === "first" ? "brand" : "neutral",
|
|
1425
1425
|
size: "sm",
|
|
1426
1426
|
children: a(`anamnesis.visitType.${l.visitType}`)
|
|
1427
1427
|
}
|
|
1428
1428
|
),
|
|
1429
|
-
i ? /* @__PURE__ */ t(
|
|
1429
|
+
i ? /* @__PURE__ */ t(W, { variant: "accentSoft", size: "sm", children: a("anamnesis.grid.editable") }) : null
|
|
1430
1430
|
] })
|
|
1431
1431
|
] })
|
|
1432
1432
|
}
|
|
@@ -1495,7 +1495,7 @@ function dt({
|
|
|
1495
1495
|
] }) }),
|
|
1496
1496
|
/* @__PURE__ */ t("tbody", { children: c.map(
|
|
1497
1497
|
(h) => {
|
|
1498
|
-
var N,
|
|
1498
|
+
var N, S;
|
|
1499
1499
|
return h.banner != null ? /* @__PURE__ */ t("tr", { className: "ds:bg-[color:var(--muted)]", children: /* @__PURE__ */ t(
|
|
1500
1500
|
"th",
|
|
1501
1501
|
{
|
|
@@ -1507,7 +1507,7 @@ function dt({
|
|
|
1507
1507
|
h.header,
|
|
1508
1508
|
(N = h.cells) == null ? void 0 : N[0],
|
|
1509
1509
|
h.trend,
|
|
1510
|
-
(
|
|
1510
|
+
(S = h.cells) == null ? void 0 : S.slice(1),
|
|
1511
1511
|
h.trailing
|
|
1512
1512
|
] }, h.key);
|
|
1513
1513
|
}
|
|
@@ -1619,7 +1619,7 @@ function ds(e, a) {
|
|
|
1619
1619
|
return cs.flatMap((n) => n.rows(e, a));
|
|
1620
1620
|
}
|
|
1621
1621
|
function ms({ row: e, t: a }) {
|
|
1622
|
-
return e.def && e.delta ? /* @__PURE__ */ t(Oa, { delta: e.delta, def: e.def, t: a }) : /* @__PURE__ */ t(
|
|
1622
|
+
return e.def && e.delta ? /* @__PURE__ */ t(Oa, { delta: e.delta, def: e.def, t: a }) : /* @__PURE__ */ t(W, { variant: ns[e.change], size: "sm", children: e.changeLabel });
|
|
1623
1623
|
}
|
|
1624
1624
|
function us({
|
|
1625
1625
|
visits: e,
|
|
@@ -1634,43 +1634,43 @@ function us({
|
|
|
1634
1634
|
t: m,
|
|
1635
1635
|
onClose: p
|
|
1636
1636
|
}) {
|
|
1637
|
-
const g = je(), [h, N] =
|
|
1638
|
-
() => e.map((
|
|
1639
|
-
value:
|
|
1640
|
-
label: Xn(
|
|
1637
|
+
const g = je(), [h, N] = $(""), S = M(
|
|
1638
|
+
() => e.map((E, P) => ({
|
|
1639
|
+
value: E.id,
|
|
1640
|
+
label: Xn(E, P, m)
|
|
1641
1641
|
})),
|
|
1642
1642
|
[e, m]
|
|
1643
|
-
),
|
|
1643
|
+
), f = M(
|
|
1644
1644
|
() => s ? ds(s, { t: m, pathologies: r, seriesByKey: o }) : [],
|
|
1645
1645
|
[s, m, r, o]
|
|
1646
|
-
), C =
|
|
1647
|
-
var
|
|
1648
|
-
const
|
|
1646
|
+
), C = M(() => {
|
|
1647
|
+
var T, u;
|
|
1648
|
+
const E = (T = a[0]) == null ? void 0 : T.visit.dateIso, P = (u = a[a.length - 1]) == null ? void 0 : u.visit.dateIso, I = m("anamnesis.compare.selected", {
|
|
1649
1649
|
total: a.length,
|
|
1650
|
-
from:
|
|
1651
|
-
to:
|
|
1650
|
+
from: E ? se(E, m) : "",
|
|
1651
|
+
to: P ? se(P, m) : ""
|
|
1652
1652
|
});
|
|
1653
1653
|
return a.length === 2 ? `${I} · ${m("anamnesis.compare.minimum")}` : I;
|
|
1654
|
-
}, [a, m]),
|
|
1655
|
-
() => a.map((
|
|
1654
|
+
}, [a, m]), y = M(
|
|
1655
|
+
() => a.map((E) => /* @__PURE__ */ t(
|
|
1656
1656
|
ct,
|
|
1657
1657
|
{
|
|
1658
|
-
column:
|
|
1658
|
+
column: E,
|
|
1659
1659
|
t: m,
|
|
1660
1660
|
emphasised: !0,
|
|
1661
1661
|
withNote: !1
|
|
1662
1662
|
},
|
|
1663
|
-
|
|
1663
|
+
E.key
|
|
1664
1664
|
)),
|
|
1665
1665
|
[a, m]
|
|
1666
|
-
),
|
|
1667
|
-
const
|
|
1668
|
-
let
|
|
1669
|
-
for (const I of
|
|
1670
|
-
I.categoryId !==
|
|
1666
|
+
), A = M(() => {
|
|
1667
|
+
const E = [];
|
|
1668
|
+
let P = null;
|
|
1669
|
+
for (const I of f)
|
|
1670
|
+
I.categoryId !== P && (P = I.categoryId, E.push({
|
|
1671
1671
|
key: `group-${I.categoryId}`,
|
|
1672
1672
|
banner: m(`anamnesis.compare.category.${I.categoryId}`)
|
|
1673
|
-
})),
|
|
1673
|
+
})), E.push({
|
|
1674
1674
|
key: I.id,
|
|
1675
1675
|
header: /* @__PURE__ */ t(
|
|
1676
1676
|
"th",
|
|
@@ -1683,15 +1683,15 @@ function us({
|
|
|
1683
1683
|
] })
|
|
1684
1684
|
}
|
|
1685
1685
|
),
|
|
1686
|
-
cells: I.values.map((
|
|
1687
|
-
var
|
|
1686
|
+
cells: I.values.map((T, u) => {
|
|
1687
|
+
var w;
|
|
1688
1688
|
return /* @__PURE__ */ t(
|
|
1689
1689
|
"td",
|
|
1690
1690
|
{
|
|
1691
1691
|
className: `${ya} ${Ke} ds:tabular-nums`,
|
|
1692
|
-
children: /* @__PURE__ */ t("span", { className: "type-body-sm ds:block ds:break-words ds:whitespace-normal ds:text-[color:var(--foreground)]", children:
|
|
1692
|
+
children: /* @__PURE__ */ t("span", { className: "type-body-sm ds:block ds:break-words ds:whitespace-normal ds:text-[color:var(--foreground)]", children: T })
|
|
1693
1693
|
},
|
|
1694
|
-
((
|
|
1694
|
+
((w = a[u]) == null ? void 0 : w.key) ?? u
|
|
1695
1695
|
);
|
|
1696
1696
|
}),
|
|
1697
1697
|
trend: /* @__PURE__ */ t("td", { className: `${yn} ${Ke}`, children: I.series && I.def ? /* @__PURE__ */ t(
|
|
@@ -1713,8 +1713,8 @@ function us({
|
|
|
1713
1713
|
}
|
|
1714
1714
|
)
|
|
1715
1715
|
});
|
|
1716
|
-
return
|
|
1717
|
-
}, [
|
|
1716
|
+
return E;
|
|
1717
|
+
}, [f, a, l, c, m]);
|
|
1718
1718
|
return /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1719
1719
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]", children: [
|
|
1720
1720
|
/* @__PURE__ */ t("h3", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: m("anamnesis.compare.panelTitle") }),
|
|
@@ -1736,19 +1736,19 @@ function us({
|
|
|
1736
1736
|
className: "ds:min-w-[18rem] ds:max-w-[32rem]",
|
|
1737
1737
|
children: [
|
|
1738
1738
|
/* @__PURE__ */ t(
|
|
1739
|
-
|
|
1739
|
+
O,
|
|
1740
1740
|
{
|
|
1741
1741
|
label: m("anamnesis.compare.visitsLabel"),
|
|
1742
1742
|
description: C,
|
|
1743
1743
|
children: /* @__PURE__ */ t(
|
|
1744
1744
|
on,
|
|
1745
1745
|
{
|
|
1746
|
-
options:
|
|
1746
|
+
options: S,
|
|
1747
1747
|
value: [...n],
|
|
1748
1748
|
allowSelectAll: !0,
|
|
1749
|
-
onChange: (
|
|
1750
|
-
if (
|
|
1751
|
-
N(""), i(
|
|
1749
|
+
onChange: (E) => {
|
|
1750
|
+
if (E.length >= 2) {
|
|
1751
|
+
N(""), i(E);
|
|
1752
1752
|
return;
|
|
1753
1753
|
}
|
|
1754
1754
|
N(m("anamnesis.compare.minimum"));
|
|
@@ -1783,7 +1783,7 @@ function us({
|
|
|
1783
1783
|
m
|
|
1784
1784
|
)
|
|
1785
1785
|
}) }),
|
|
1786
|
-
|
|
1786
|
+
f.length === 0 ? /* @__PURE__ */ t(
|
|
1787
1787
|
Qe,
|
|
1788
1788
|
{
|
|
1789
1789
|
variant: "no-results",
|
|
@@ -1800,8 +1800,8 @@ function us({
|
|
|
1800
1800
|
trendLabel: m("anamnesis.grid.trend"),
|
|
1801
1801
|
trailingLabel: m("anamnesis.compare.column.change"),
|
|
1802
1802
|
trailingTestId: "anamnesis-compare-change-column",
|
|
1803
|
-
visitHeaders:
|
|
1804
|
-
rows:
|
|
1803
|
+
visitHeaders: y,
|
|
1804
|
+
rows: A,
|
|
1805
1805
|
testId: "anamnesis-compare-table"
|
|
1806
1806
|
}
|
|
1807
1807
|
)
|
|
@@ -1972,16 +1972,16 @@ function ks({
|
|
|
1972
1972
|
annotations: g,
|
|
1973
1973
|
onSelectAnnotation: h
|
|
1974
1974
|
}) {
|
|
1975
|
-
const N = je(),
|
|
1976
|
-
let
|
|
1977
|
-
const
|
|
1978
|
-
if (
|
|
1979
|
-
|
|
1980
|
-
key: `group-${
|
|
1981
|
-
banner: n(`anamnesis.group.${
|
|
1975
|
+
const N = je(), S = mn(e, a), f = e.visits, C = f.length - 1, y = m ?? ht(f), A = [];
|
|
1976
|
+
let E = null;
|
|
1977
|
+
const P = (T) => (o == null ? void 0 : o.visitIds.has(T)) ?? !1;
|
|
1978
|
+
if (S.forEach((T) => {
|
|
1979
|
+
T.def.group !== E && (E = T.def.group, A.push({
|
|
1980
|
+
key: `group-${T.def.group}`,
|
|
1981
|
+
banner: n(`anamnesis.group.${T.def.group}`)
|
|
1982
1982
|
}));
|
|
1983
|
-
const u = xs(
|
|
1984
|
-
const { visit:
|
|
1983
|
+
const u = xs(T.def.referenceRange, n), w = y.map((x, L) => {
|
|
1984
|
+
const { visit: V, index: k } = x, _ = T.cells[k] ?? vs, B = k === C, H = p == null || p.has(T.def.key), ue = i && B && H && !T.def.computed, pe = !bs(y, L), ve = o != null && o.changedCells.has(`${V.id}:${T.def.key}`), he = P(V.id);
|
|
1985
1985
|
return /* @__PURE__ */ t(
|
|
1986
1986
|
"td",
|
|
1987
1987
|
{
|
|
@@ -2000,17 +2000,17 @@ function ks({
|
|
|
2000
2000
|
ha,
|
|
2001
2001
|
{
|
|
2002
2002
|
size: "sm",
|
|
2003
|
-
value:
|
|
2004
|
-
mode: (
|
|
2003
|
+
value: _.value,
|
|
2004
|
+
mode: (T.def.precision ?? 0) > 0 ? "decimal" : "integer",
|
|
2005
2005
|
"aria-label": n("anamnesis.grid.editCell", {
|
|
2006
|
-
parameter: Le(
|
|
2006
|
+
parameter: Le(T.def, n)
|
|
2007
2007
|
}),
|
|
2008
|
-
onChange: (ce) => s == null ? void 0 : s(
|
|
2008
|
+
onChange: (ce) => s == null ? void 0 : s(V, T.def, ce)
|
|
2009
2009
|
}
|
|
2010
|
-
) : /* @__PURE__ */ t("span", { className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]", children: qe(
|
|
2010
|
+
) : /* @__PURE__ */ t("span", { className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]", children: qe(_.value, T.def.precision) }),
|
|
2011
2011
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
2012
|
-
|
|
2013
|
-
pe ? null : /* @__PURE__ */ t(Oa, { delta:
|
|
2012
|
+
_.outOfRange ? /* @__PURE__ */ t(gn, { flag: _.outOfRange, t: n, compact: !0 }) : null,
|
|
2013
|
+
pe ? null : /* @__PURE__ */ t(Oa, { delta: _.delta, def: T.def, t: n }),
|
|
2014
2014
|
ve ? /* @__PURE__ */ t("span", { className: "ds:sr-only", children: n("anamnesis.compare.changedCell") }) : null
|
|
2015
2015
|
] })
|
|
2016
2016
|
] })
|
|
@@ -2018,8 +2018,8 @@ function ks({
|
|
|
2018
2018
|
x.key
|
|
2019
2019
|
);
|
|
2020
2020
|
});
|
|
2021
|
-
|
|
2022
|
-
key:
|
|
2021
|
+
A.push({
|
|
2022
|
+
key: T.def.key,
|
|
2023
2023
|
// Sticky parameter column (inline-start). The shell splices the trend
|
|
2024
2024
|
// in after the first value cell — the order is not decided here.
|
|
2025
2025
|
header: /* @__PURE__ */ t(
|
|
@@ -2028,34 +2028,34 @@ function ks({
|
|
|
2028
2028
|
scope: "row",
|
|
2029
2029
|
className: `${fn} ds:sticky ds:start-0 ds:z-[1] ds:bg-[color:var(--card)] ds:text-start ds:shadow-[var(--shadow-chrome-end)] ${Ke}`,
|
|
2030
2030
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
2031
|
-
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: Le(
|
|
2031
|
+
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: Le(T.def, n) }),
|
|
2032
2032
|
/* @__PURE__ */ d("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: [
|
|
2033
|
-
|
|
2033
|
+
T.def.unit,
|
|
2034
2034
|
u ? /* @__PURE__ */ d(Ie, { children: [
|
|
2035
2035
|
" · ",
|
|
2036
2036
|
u
|
|
2037
2037
|
] }) : null
|
|
2038
2038
|
] }),
|
|
2039
|
-
|
|
2040
|
-
value: qe(
|
|
2041
|
-
unit:
|
|
2039
|
+
T.target != null ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.grid.target", {
|
|
2040
|
+
value: qe(T.target, T.def.precision),
|
|
2041
|
+
unit: T.def.unit ?? ""
|
|
2042
2042
|
}) }) : null
|
|
2043
2043
|
] })
|
|
2044
2044
|
}
|
|
2045
2045
|
),
|
|
2046
|
-
cells:
|
|
2046
|
+
cells: w,
|
|
2047
2047
|
trend: /* @__PURE__ */ t("td", { className: `${yn} ${Ke}`, children: /* @__PURE__ */ t(
|
|
2048
2048
|
tt,
|
|
2049
2049
|
{
|
|
2050
|
-
series:
|
|
2051
|
-
def:
|
|
2050
|
+
series: T.series,
|
|
2051
|
+
def: T.def,
|
|
2052
2052
|
t: n,
|
|
2053
2053
|
annotations: g,
|
|
2054
2054
|
onSelectAnnotation: h
|
|
2055
2055
|
}
|
|
2056
2056
|
) })
|
|
2057
2057
|
});
|
|
2058
|
-
}),
|
|
2058
|
+
}), S.length === 0)
|
|
2059
2059
|
return /* @__PURE__ */ t(
|
|
2060
2060
|
"div",
|
|
2061
2061
|
{
|
|
@@ -2072,17 +2072,17 @@ function ks({
|
|
|
2072
2072
|
)
|
|
2073
2073
|
}
|
|
2074
2074
|
);
|
|
2075
|
-
const I =
|
|
2075
|
+
const I = y.map((T) => /* @__PURE__ */ t(
|
|
2076
2076
|
ct,
|
|
2077
2077
|
{
|
|
2078
|
-
column:
|
|
2078
|
+
column: T,
|
|
2079
2079
|
t: n,
|
|
2080
|
-
emphasised:
|
|
2081
|
-
editable: i &&
|
|
2080
|
+
emphasised: P(T.visit.id),
|
|
2081
|
+
editable: i && T.index === C,
|
|
2082
2082
|
defaultOpenNoteVisitId: l,
|
|
2083
2083
|
onOpenNote: c
|
|
2084
2084
|
},
|
|
2085
|
-
|
|
2085
|
+
T.key
|
|
2086
2086
|
));
|
|
2087
2087
|
return /* @__PURE__ */ t(
|
|
2088
2088
|
dt,
|
|
@@ -2093,7 +2093,7 @@ function ks({
|
|
|
2093
2093
|
trendLabel: n("anamnesis.grid.trend"),
|
|
2094
2094
|
trendTestId: "anamnesis-grid-trend",
|
|
2095
2095
|
visitHeaders: I,
|
|
2096
|
-
rows:
|
|
2096
|
+
rows: A,
|
|
2097
2097
|
framed: r
|
|
2098
2098
|
}
|
|
2099
2099
|
);
|
|
@@ -2112,102 +2112,102 @@ function gt({
|
|
|
2112
2112
|
onVisitSelectionChange: p,
|
|
2113
2113
|
onOpenNote: g
|
|
2114
2114
|
}) {
|
|
2115
|
-
const { visits: h } = e, N = h.length >= 2,
|
|
2116
|
-
() => new Set(Ne(o).map((
|
|
2115
|
+
const { visits: h } = e, N = h.length >= 2, S = je(), f = je(), C = M(() => Me(o), [o]), y = M(
|
|
2116
|
+
() => new Set(Ne(o).map((z) => z.key)),
|
|
2117
2117
|
[o]
|
|
2118
|
-
),
|
|
2118
|
+
), A = M(() => _a(o), [o]), [E, P] = $(r), [I, T] = $(""), u = De(null), w = De(null), x = De(!1);
|
|
2119
2119
|
Ea(() => {
|
|
2120
|
-
var
|
|
2121
|
-
x.current &&
|
|
2122
|
-
}, [
|
|
2120
|
+
var z;
|
|
2121
|
+
x.current && E && ((z = u.current) == null || z.scrollIntoView({ block: "start" })), x.current = !0;
|
|
2122
|
+
}, [E]);
|
|
2123
2123
|
const L = () => {
|
|
2124
|
-
var
|
|
2125
|
-
|
|
2126
|
-
}, [
|
|
2124
|
+
var z;
|
|
2125
|
+
P(!1), (z = w.current) == null || z.focus();
|
|
2126
|
+
}, [V, k] = $(
|
|
2127
2127
|
() => c ? [...c] : ca(h)
|
|
2128
|
-
),
|
|
2129
|
-
const
|
|
2130
|
-
(
|
|
2128
|
+
), _ = M(() => {
|
|
2129
|
+
const z = V.filter(
|
|
2130
|
+
(K) => h.some((be) => be.id === K)
|
|
2131
2131
|
);
|
|
2132
|
-
return
|
|
2133
|
-
}, [
|
|
2134
|
-
() => Ia(h,
|
|
2135
|
-
[h,
|
|
2136
|
-
),
|
|
2137
|
-
|
|
2132
|
+
return z.length >= 2 ? z : ca(h);
|
|
2133
|
+
}, [V, h]), B = M(
|
|
2134
|
+
() => Ia(h, _).columns,
|
|
2135
|
+
[h, _]
|
|
2136
|
+
), H = M(() => E ? Si(
|
|
2137
|
+
B.map((z) => z.visit),
|
|
2138
2138
|
C
|
|
2139
|
-
) : null, [
|
|
2140
|
-
const
|
|
2141
|
-
for (const
|
|
2142
|
-
|
|
2143
|
-
return
|
|
2144
|
-
}, [e, C]), [pe, ve] =
|
|
2139
|
+
) : null, [E, B, C]), ue = M(() => {
|
|
2140
|
+
const z = /* @__PURE__ */ new Map();
|
|
2141
|
+
for (const K of mn(e, C))
|
|
2142
|
+
z.set(K.def.key, K.series);
|
|
2143
|
+
return z;
|
|
2144
|
+
}, [e, C]), [pe, ve] = $(
|
|
2145
2145
|
() => l ? [...l] : ca(h)
|
|
2146
|
-
), he = ys(h), ce =
|
|
2147
|
-
const
|
|
2148
|
-
return
|
|
2149
|
-
}, [pe, h]), Z =
|
|
2146
|
+
), he = ys(h), ce = M(() => {
|
|
2147
|
+
const z = pe.filter((K) => h.some((be) => be.id === K));
|
|
2148
|
+
return z.length > 0 ? z : ca(h);
|
|
2149
|
+
}, [pe, h]), Z = M(
|
|
2150
2150
|
() => Ia(h, ce, {
|
|
2151
2151
|
// A compared visit is always a column, so compare always marks its
|
|
2152
2152
|
// columns in the grid — comparing a visit the picker left out brings
|
|
2153
2153
|
// it back on screen rather than marking nothing.
|
|
2154
|
-
alsoShowIds:
|
|
2154
|
+
alsoShowIds: E ? _ : []
|
|
2155
2155
|
}),
|
|
2156
|
-
[h, ce,
|
|
2157
|
-
), Fe =
|
|
2158
|
-
() => Z.columns.map((
|
|
2156
|
+
[h, ce, E, _]
|
|
2157
|
+
), Fe = M(
|
|
2158
|
+
() => Z.columns.map((z) => z.visit.id),
|
|
2159
2159
|
[Z]
|
|
2160
2160
|
);
|
|
2161
2161
|
Ea(() => {
|
|
2162
2162
|
p == null || p(Fe);
|
|
2163
2163
|
}, [Fe, p]);
|
|
2164
|
-
const
|
|
2165
|
-
() => h.map((
|
|
2166
|
-
value:
|
|
2167
|
-
label: Xn(
|
|
2164
|
+
const D = M(
|
|
2165
|
+
() => h.map((z, K) => ({
|
|
2166
|
+
value: z.id,
|
|
2167
|
+
label: Xn(z, K, a, rt(z))
|
|
2168
2168
|
})),
|
|
2169
2169
|
[h, a]
|
|
2170
|
-
), q =
|
|
2171
|
-
const
|
|
2170
|
+
), q = M(() => {
|
|
2171
|
+
const z = Z.firstIso ? se(Z.firstIso, a) : "", K = Z.lastIso ? se(Z.lastIso, a) : "", Ae = [Z.hiddenCount > 0 ? a("anamnesis.window.showing", {
|
|
2172
2172
|
shown: Z.shownCount,
|
|
2173
2173
|
total: Z.totalCount,
|
|
2174
|
-
from:
|
|
2175
|
-
to:
|
|
2174
|
+
from: z,
|
|
2175
|
+
to: K
|
|
2176
2176
|
}) : a("anamnesis.window.showingAll", {
|
|
2177
2177
|
total: Z.totalCount,
|
|
2178
|
-
from:
|
|
2179
|
-
to:
|
|
2178
|
+
from: z,
|
|
2179
|
+
to: K
|
|
2180
2180
|
})], Xe = Z.shownCount - ce.length;
|
|
2181
2181
|
return Xe > 0 && Ae.push(a("anamnesis.window.addedByCompare", { added: Xe })), ce.length === 1 && Ae.push(a("anamnesis.window.minimum")), Ae.join(" · ");
|
|
2182
|
-
}, [Z, ce, a]),
|
|
2182
|
+
}, [Z, ce, a]), j = M(
|
|
2183
2183
|
() => hs(e.events, h),
|
|
2184
2184
|
[e.events, h]
|
|
2185
|
-
), [le, ae] =
|
|
2185
|
+
), [le, ae] = $(
|
|
2186
2186
|
() => m ? [...m] : []
|
|
2187
|
-
), Ce =
|
|
2188
|
-
const
|
|
2189
|
-
return new Set(le.filter((
|
|
2190
|
-
}, [le,
|
|
2191
|
-
() => gs(
|
|
2192
|
-
[
|
|
2193
|
-
),
|
|
2194
|
-
(
|
|
2195
|
-
), Ye =
|
|
2196
|
-
() => g ? (
|
|
2187
|
+
), Ce = M(() => {
|
|
2188
|
+
const z = new Set(j.map((K) => K.event.id));
|
|
2189
|
+
return new Set(le.filter((K) => z.has(K)));
|
|
2190
|
+
}, [le, j]), Ee = M(
|
|
2191
|
+
() => gs(j, Ce, a),
|
|
2192
|
+
[j, Ce, a]
|
|
2193
|
+
), G = (z) => ae(
|
|
2194
|
+
(K) => K.includes(z) ? K.filter((be) => be !== z) : [...K, z]
|
|
2195
|
+
), Ye = M(
|
|
2196
|
+
() => g ? (z) => g({ kind: "event", eventId: z }) : void 0,
|
|
2197
2197
|
[g]
|
|
2198
|
-
), Ba =
|
|
2199
|
-
if (!
|
|
2200
|
-
const
|
|
2201
|
-
for (const
|
|
2202
|
-
|
|
2203
|
-
const Xe = Ae === 0 ?
|
|
2204
|
-
be !== Xe &&
|
|
2198
|
+
), Ba = M(() => {
|
|
2199
|
+
if (!H) return null;
|
|
2200
|
+
const z = /* @__PURE__ */ new Set();
|
|
2201
|
+
for (const K of H.numeric)
|
|
2202
|
+
K.values.forEach((be, Ae) => {
|
|
2203
|
+
const Xe = Ae === 0 ? K.values[1] : K.values[Ae - 1];
|
|
2204
|
+
be !== Xe && z.add(`${H.visits[Ae].id}:${K.def.key}`);
|
|
2205
2205
|
});
|
|
2206
2206
|
return {
|
|
2207
|
-
visitIds: new Set(
|
|
2208
|
-
changedCells:
|
|
2207
|
+
visitIds: new Set(H.visits.map((K) => K.id)),
|
|
2208
|
+
changedCells: z
|
|
2209
2209
|
};
|
|
2210
|
-
}, [
|
|
2210
|
+
}, [H]);
|
|
2211
2211
|
return h.length === 0 ? /* @__PURE__ */ t("div", { className: "ds:w-full", "data-testid": "anamnesis-evolution-empty", children: /* @__PURE__ */ t(
|
|
2212
2212
|
Qe,
|
|
2213
2213
|
{
|
|
@@ -2230,22 +2230,22 @@ function gt({
|
|
|
2230
2230
|
className: "ds:min-w-[18rem] ds:max-w-[32rem] ds:grow",
|
|
2231
2231
|
children: [
|
|
2232
2232
|
/* @__PURE__ */ t(
|
|
2233
|
-
|
|
2233
|
+
O,
|
|
2234
2234
|
{
|
|
2235
2235
|
label: a("anamnesis.window.label"),
|
|
2236
2236
|
description: q,
|
|
2237
2237
|
children: /* @__PURE__ */ t(
|
|
2238
2238
|
on,
|
|
2239
2239
|
{
|
|
2240
|
-
options:
|
|
2240
|
+
options: D,
|
|
2241
2241
|
value: ce,
|
|
2242
2242
|
allowSelectAll: !0,
|
|
2243
|
-
onChange: (
|
|
2244
|
-
if (
|
|
2245
|
-
|
|
2243
|
+
onChange: (z) => {
|
|
2244
|
+
if (z.length > 0) {
|
|
2245
|
+
T(""), ve(z);
|
|
2246
2246
|
return;
|
|
2247
2247
|
}
|
|
2248
|
-
|
|
2248
|
+
T(a("anamnesis.window.minimum"));
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
2251
|
)
|
|
@@ -2266,15 +2266,15 @@ function gt({
|
|
|
2266
2266
|
N ? /* @__PURE__ */ t(
|
|
2267
2267
|
J,
|
|
2268
2268
|
{
|
|
2269
|
-
ref:
|
|
2270
|
-
id:
|
|
2271
|
-
intent:
|
|
2269
|
+
ref: w,
|
|
2270
|
+
id: f,
|
|
2271
|
+
intent: E ? "primary" : "outline",
|
|
2272
2272
|
"data-testid": "anamnesis-compare-toggle",
|
|
2273
|
-
"aria-pressed":
|
|
2274
|
-
"aria-expanded":
|
|
2275
|
-
"aria-controls":
|
|
2276
|
-
onClick: () =>
|
|
2277
|
-
children: a(
|
|
2273
|
+
"aria-pressed": E,
|
|
2274
|
+
"aria-expanded": E,
|
|
2275
|
+
"aria-controls": S,
|
|
2276
|
+
onClick: () => P((z) => !z),
|
|
2277
|
+
children: a(E ? "anamnesis.compare.stop" : "anamnesis.compare.start")
|
|
2278
2278
|
}
|
|
2279
2279
|
) : null
|
|
2280
2280
|
]
|
|
@@ -2283,9 +2283,9 @@ function gt({
|
|
|
2283
2283
|
/* @__PURE__ */ t(
|
|
2284
2284
|
fs,
|
|
2285
2285
|
{
|
|
2286
|
-
marks:
|
|
2286
|
+
marks: j,
|
|
2287
2287
|
activeIds: Ce,
|
|
2288
|
-
onToggle:
|
|
2288
|
+
onToggle: G,
|
|
2289
2289
|
t: a
|
|
2290
2290
|
}
|
|
2291
2291
|
),
|
|
@@ -2300,30 +2300,30 @@ function gt({
|
|
|
2300
2300
|
compare: Ba,
|
|
2301
2301
|
framed: s,
|
|
2302
2302
|
visitColumns: Z.columns,
|
|
2303
|
-
capturableKeys:
|
|
2303
|
+
capturableKeys: y,
|
|
2304
2304
|
annotations: Ee,
|
|
2305
2305
|
onSelectAnnotation: Ye,
|
|
2306
2306
|
onOpenNote: g
|
|
2307
2307
|
}
|
|
2308
2308
|
),
|
|
2309
|
-
N ? /* @__PURE__ */ t(tn, { open:
|
|
2309
|
+
N ? /* @__PURE__ */ t(tn, { open: E, onOpenChange: P, children: /* @__PURE__ */ t(
|
|
2310
2310
|
sn,
|
|
2311
2311
|
{
|
|
2312
2312
|
ref: u,
|
|
2313
|
-
id:
|
|
2314
|
-
"aria-labelledby":
|
|
2313
|
+
id: S,
|
|
2314
|
+
"aria-labelledby": f,
|
|
2315
2315
|
"data-testid": "anamnesis-compare-panel",
|
|
2316
2316
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
2317
2317
|
children: /* @__PURE__ */ t(
|
|
2318
2318
|
us,
|
|
2319
2319
|
{
|
|
2320
2320
|
visits: h,
|
|
2321
|
-
columns:
|
|
2322
|
-
selectedIds:
|
|
2323
|
-
onSelectionChange:
|
|
2324
|
-
diff:
|
|
2321
|
+
columns: B,
|
|
2322
|
+
selectedIds: _,
|
|
2323
|
+
onSelectionChange: k,
|
|
2324
|
+
diff: H,
|
|
2325
2325
|
seriesByKey: ue,
|
|
2326
|
-
pathologies:
|
|
2326
|
+
pathologies: A,
|
|
2327
2327
|
annotations: Ee,
|
|
2328
2328
|
onSelectAnnotation: Ye,
|
|
2329
2329
|
t: a,
|
|
@@ -2637,18 +2637,18 @@ function Es(e) {
|
|
|
2637
2637
|
return xn("summary", n, i);
|
|
2638
2638
|
const { meta: l, patientName: c } = bn(a, r, i, o), m = [], p = [], g = a.intake;
|
|
2639
2639
|
if (X(r, "intake.answers") && g) {
|
|
2640
|
-
const
|
|
2641
|
-
for (const
|
|
2642
|
-
const C =
|
|
2640
|
+
const S = [];
|
|
2641
|
+
for (const f of na(s)) {
|
|
2642
|
+
const C = f.fields.filter((y) => sa(y, a.patient.sex)).filter((y) => g.answers[y.key]);
|
|
2643
2643
|
if (C.length !== 0) {
|
|
2644
|
-
|
|
2645
|
-
for (const
|
|
2646
|
-
const
|
|
2647
|
-
|
|
2644
|
+
S.push(yt(me(f, i)));
|
|
2645
|
+
for (const y of C) {
|
|
2646
|
+
const A = g.answers[y.key];
|
|
2647
|
+
A && S.push({
|
|
2648
2648
|
cells: [
|
|
2649
|
-
de(
|
|
2650
|
-
te(hn(
|
|
2651
|
-
i(`anamnesis.export.source.${
|
|
2649
|
+
de(y, i),
|
|
2650
|
+
te(hn(A.value, y, i)),
|
|
2651
|
+
i(`anamnesis.export.source.${A.origin}`)
|
|
2652
2652
|
]
|
|
2653
2653
|
});
|
|
2654
2654
|
}
|
|
@@ -2662,7 +2662,7 @@ function Es(e) {
|
|
|
2662
2662
|
{ key: "answer", header: i("anamnesis.export.column.answer") },
|
|
2663
2663
|
{ key: "source", header: i("anamnesis.export.column.source") }
|
|
2664
2664
|
],
|
|
2665
|
-
rows:
|
|
2665
|
+
rows: S,
|
|
2666
2666
|
emptyText: i("anamnesis.summary.noAnswers")
|
|
2667
2667
|
});
|
|
2668
2668
|
} else g || p.push(i("anamnesis.compile.noIntake"));
|
|
@@ -2788,7 +2788,7 @@ function As(e) {
|
|
|
2788
2788
|
!1
|
|
2789
2789
|
);
|
|
2790
2790
|
N && p.push(N);
|
|
2791
|
-
const
|
|
2791
|
+
const S = Ka(
|
|
2792
2792
|
"dietary",
|
|
2793
2793
|
i("anamnesis.section.dietary"),
|
|
2794
2794
|
Ne(s, "dietary"),
|
|
@@ -2797,8 +2797,8 @@ function As(e) {
|
|
|
2797
2797
|
i,
|
|
2798
2798
|
!1
|
|
2799
2799
|
);
|
|
2800
|
-
if (
|
|
2801
|
-
const
|
|
2800
|
+
if (S && p.push(S), X(r, "pathology.codes")) {
|
|
2801
|
+
const y = _a(s);
|
|
2802
2802
|
p.push({
|
|
2803
2803
|
id: "pathologies",
|
|
2804
2804
|
title: i("anamnesis.section.pathologies"),
|
|
@@ -2809,35 +2809,35 @@ function As(e) {
|
|
|
2809
2809
|
header: i("anamnesis.export.column.description")
|
|
2810
2810
|
}
|
|
2811
2811
|
],
|
|
2812
|
-
rows: m.pathologyCodes.map((
|
|
2813
|
-
cells: [
|
|
2812
|
+
rows: m.pathologyCodes.map((A) => ({
|
|
2813
|
+
cells: [A, pn(A, i, y[A])]
|
|
2814
2814
|
})),
|
|
2815
2815
|
emptyText: i("anamnesis.export.none")
|
|
2816
2816
|
});
|
|
2817
2817
|
}
|
|
2818
2818
|
if (X(r, "oncological.history")) {
|
|
2819
|
-
const
|
|
2820
|
-
if (
|
|
2821
|
-
if (te(
|
|
2819
|
+
const y = m.oncological, A = [];
|
|
2820
|
+
if (y) {
|
|
2821
|
+
if (te(y.tumourType) && A.push({
|
|
2822
2822
|
cells: [
|
|
2823
2823
|
i("anamnesis.field.tumourType.label"),
|
|
2824
|
-
te(
|
|
2824
|
+
te(y.tumourType)
|
|
2825
2825
|
]
|
|
2826
|
-
}), te(
|
|
2827
|
-
cells: [i("anamnesis.field.stage.label"), te(
|
|
2828
|
-
}),
|
|
2829
|
-
const
|
|
2830
|
-
|
|
2826
|
+
}), te(y.stage) && A.push({
|
|
2827
|
+
cells: [i("anamnesis.field.stage.label"), te(y.stage)]
|
|
2828
|
+
}), y.metastases) {
|
|
2829
|
+
const E = i(`anamnesis.common.${y.metastases.present}`), P = te(y.metastases.site);
|
|
2830
|
+
A.push({
|
|
2831
2831
|
cells: [
|
|
2832
2832
|
i("anamnesis.field.metastases.label"),
|
|
2833
|
-
|
|
2833
|
+
P ? `${E} — ${P}` : E
|
|
2834
2834
|
]
|
|
2835
2835
|
});
|
|
2836
2836
|
}
|
|
2837
|
-
te(
|
|
2837
|
+
te(y.treatmentStatus) && A.push({
|
|
2838
2838
|
cells: [
|
|
2839
2839
|
i("anamnesis.field.treatmentStatus.label"),
|
|
2840
|
-
te(
|
|
2840
|
+
te(y.treatmentStatus)
|
|
2841
2841
|
]
|
|
2842
2842
|
});
|
|
2843
2843
|
}
|
|
@@ -2845,7 +2845,7 @@ function As(e) {
|
|
|
2845
2845
|
Ha(
|
|
2846
2846
|
"oncological",
|
|
2847
2847
|
i("anamnesis.section.oncological"),
|
|
2848
|
-
|
|
2848
|
+
A,
|
|
2849
2849
|
i
|
|
2850
2850
|
)
|
|
2851
2851
|
);
|
|
@@ -2858,16 +2858,16 @@ function As(e) {
|
|
|
2858
2858
|
{ key: "dose", header: i("anamnesis.export.column.dose") },
|
|
2859
2859
|
{ key: "kind", header: i("anamnesis.export.column.kind") }
|
|
2860
2860
|
],
|
|
2861
|
-
rows: m.therapy.map((
|
|
2861
|
+
rows: m.therapy.map((y) => ({
|
|
2862
2862
|
cells: [
|
|
2863
|
-
te(
|
|
2864
|
-
te(
|
|
2865
|
-
i(`anamnesis.medKind.${
|
|
2863
|
+
te(y.name),
|
|
2864
|
+
te(y.dose),
|
|
2865
|
+
i(`anamnesis.medKind.${y.kind}`)
|
|
2866
2866
|
]
|
|
2867
2867
|
})),
|
|
2868
2868
|
emptyText: i("anamnesis.compile.noTherapy")
|
|
2869
2869
|
});
|
|
2870
|
-
const
|
|
2870
|
+
const f = Ka(
|
|
2871
2871
|
"labs",
|
|
2872
2872
|
i("anamnesis.section.labs"),
|
|
2873
2873
|
Ne(s, "lab"),
|
|
@@ -2876,7 +2876,7 @@ function As(e) {
|
|
|
2876
2876
|
i,
|
|
2877
2877
|
!0
|
|
2878
2878
|
);
|
|
2879
|
-
if (
|
|
2879
|
+
if (f && p.push(f), X(r, "fmd.cycles") && p.push({
|
|
2880
2880
|
id: "fmd",
|
|
2881
2881
|
title: i("anamnesis.section.fmd"),
|
|
2882
2882
|
columns: [
|
|
@@ -2885,38 +2885,38 @@ function As(e) {
|
|
|
2885
2885
|
{ key: "status", header: i("anamnesis.export.column.status") },
|
|
2886
2886
|
{ key: "notes", header: i("anamnesis.export.column.notes") }
|
|
2887
2887
|
],
|
|
2888
|
-
rows: m.fmdCycles.map((
|
|
2888
|
+
rows: m.fmdCycles.map((y) => ({
|
|
2889
2889
|
cells: [
|
|
2890
|
-
i("anamnesis.compile.cycleNumber", { number:
|
|
2891
|
-
se(
|
|
2892
|
-
|
|
2893
|
-
te(
|
|
2890
|
+
i("anamnesis.compile.cycleNumber", { number: y.cycleNumber }),
|
|
2891
|
+
se(y.startDateIso, i),
|
|
2892
|
+
y.completed ? i("anamnesis.compile.cycleCompleted") : i("anamnesis.compile.cycleInProgress"),
|
|
2893
|
+
te(y.notes)
|
|
2894
2894
|
]
|
|
2895
2895
|
})),
|
|
2896
2896
|
emptyText: i("anamnesis.compile.noFmd")
|
|
2897
2897
|
}), X(r, "annual.programme")) {
|
|
2898
|
-
const
|
|
2899
|
-
if (
|
|
2900
|
-
const
|
|
2901
|
-
|
|
2898
|
+
const y = m.annualProgramme, A = [];
|
|
2899
|
+
if (y) {
|
|
2900
|
+
const E = (P) => i(P ? "anamnesis.common.yes" : "anamnesis.common.no");
|
|
2901
|
+
A.push({
|
|
2902
2902
|
cells: [
|
|
2903
2903
|
i("anamnesis.field.annualProposed.label"),
|
|
2904
|
-
|
|
2904
|
+
E(y.proposed)
|
|
2905
2905
|
]
|
|
2906
|
-
}),
|
|
2906
|
+
}), A.push({
|
|
2907
2907
|
cells: [
|
|
2908
2908
|
i("anamnesis.field.annualAccepted.label"),
|
|
2909
|
-
|
|
2909
|
+
E(y.accepted)
|
|
2910
2910
|
]
|
|
2911
|
-
}), te(
|
|
2911
|
+
}), te(y.declineReason) && A.push({
|
|
2912
2912
|
cells: [
|
|
2913
2913
|
i("anamnesis.field.annualDeclineReason.label"),
|
|
2914
|
-
te(
|
|
2914
|
+
te(y.declineReason)
|
|
2915
2915
|
]
|
|
2916
2916
|
});
|
|
2917
2917
|
}
|
|
2918
2918
|
p.push(
|
|
2919
|
-
Ha("annual", i("anamnesis.section.annual"),
|
|
2919
|
+
Ha("annual", i("anamnesis.section.annual"), A, i)
|
|
2920
2920
|
);
|
|
2921
2921
|
}
|
|
2922
2922
|
const C = [];
|
|
@@ -2982,24 +2982,24 @@ function Rs(e) {
|
|
|
2982
2982
|
const { record: a, audience: n, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = e.scope ?? "selected", l = { audience: n, withheld: /* @__PURE__ */ new Set() };
|
|
2983
2983
|
if (!X(l, qa))
|
|
2984
2984
|
return xn("evolution", n, i);
|
|
2985
|
-
const { meta: c, patientName: m } = bn(a, l, i, o), p = [], g = [], h = e.selectedVisitIds ? [...e.selectedVisitIds] : null, N = h && h.length > 0 ? h : ca(a.visits),
|
|
2985
|
+
const { meta: c, patientName: m } = bn(a, l, i, o), p = [], g = [], h = e.selectedVisitIds ? [...e.selectedVisitIds] : null, N = h && h.length > 0 ? h : ca(a.visits), S = r === "all" ? ht(a.visits) : Ia(a.visits, N).columns;
|
|
2986
2986
|
if (c.push({
|
|
2987
2987
|
label: i("anamnesis.export.visitsLabel"),
|
|
2988
2988
|
value: r === "all" ? i("anamnesis.export.visitsAll", { total: a.visits.length }) : i("anamnesis.export.visitsSelected", {
|
|
2989
|
-
shown:
|
|
2989
|
+
shown: S.length,
|
|
2990
2990
|
total: a.visits.length
|
|
2991
2991
|
})
|
|
2992
|
-
}), X(l, "visit.date") &&
|
|
2993
|
-
const
|
|
2992
|
+
}), X(l, "visit.date") && S.length > 0) {
|
|
2993
|
+
const y = Me(s), A = mn(a, y), E = se(S[0].visit.dateIso, i), P = se(S[S.length - 1].visit.dateIso, i), I = [
|
|
2994
2994
|
{ key: "parameter", header: i("anamnesis.grid.parameter") },
|
|
2995
2995
|
{ key: "unit", header: i("anamnesis.export.column.unit") },
|
|
2996
2996
|
{
|
|
2997
2997
|
key: "referenceRange",
|
|
2998
2998
|
header: i("anamnesis.export.column.referenceRange")
|
|
2999
2999
|
},
|
|
3000
|
-
...
|
|
3001
|
-
key: `visit-${
|
|
3002
|
-
header: se(
|
|
3000
|
+
...S.map((w) => ({
|
|
3001
|
+
key: `visit-${w.visit.id}`,
|
|
3002
|
+
header: se(w.visit.dateIso, i),
|
|
3003
3003
|
numeric: !0
|
|
3004
3004
|
})),
|
|
3005
3005
|
{
|
|
@@ -3010,39 +3010,39 @@ function Rs(e) {
|
|
|
3010
3010
|
{
|
|
3011
3011
|
key: "change",
|
|
3012
3012
|
header: i("anamnesis.export.column.change", {
|
|
3013
|
-
from:
|
|
3014
|
-
to:
|
|
3013
|
+
from: E,
|
|
3014
|
+
to: P
|
|
3015
3015
|
}),
|
|
3016
3016
|
numeric: !0
|
|
3017
3017
|
},
|
|
3018
3018
|
{ key: "outOfRange", header: i("anamnesis.export.column.outOfRange") }
|
|
3019
|
-
],
|
|
3019
|
+
], T = [];
|
|
3020
3020
|
let u = null;
|
|
3021
|
-
for (const
|
|
3022
|
-
X(l, ft(
|
|
3023
|
-
precision:
|
|
3021
|
+
for (const w of A)
|
|
3022
|
+
X(l, ft(w.def)) && (w.def.group !== u && (u = w.def.group, T.push(yt(i(`anamnesis.group.${w.def.group}`)))), T.push({
|
|
3023
|
+
precision: w.def.precision,
|
|
3024
3024
|
cells: [
|
|
3025
|
-
Le(
|
|
3026
|
-
|
|
3027
|
-
vt(
|
|
3028
|
-
...
|
|
3025
|
+
Le(w.def, i),
|
|
3026
|
+
w.def.unit ?? null,
|
|
3027
|
+
vt(w.def, i),
|
|
3028
|
+
...S.map((x) => {
|
|
3029
3029
|
var L;
|
|
3030
|
-
return ((L =
|
|
3030
|
+
return ((L = w.cells[x.index]) == null ? void 0 : L.value) ?? null;
|
|
3031
3031
|
}),
|
|
3032
|
-
|
|
3033
|
-
Is(
|
|
3034
|
-
Ds(
|
|
3032
|
+
w.target,
|
|
3033
|
+
Is(w, S),
|
|
3034
|
+
Ds(w, S, i)
|
|
3035
3035
|
]
|
|
3036
3036
|
}));
|
|
3037
3037
|
p.push({
|
|
3038
3038
|
id: "matrix",
|
|
3039
3039
|
title: i("anamnesis.section.evolution"),
|
|
3040
3040
|
columns: I,
|
|
3041
|
-
rows:
|
|
3041
|
+
rows: T,
|
|
3042
3042
|
emptyText: i("anamnesis.export.none")
|
|
3043
3043
|
});
|
|
3044
|
-
} else
|
|
3045
|
-
const
|
|
3044
|
+
} else S.length === 0 && g.push(i("anamnesis.export.none"));
|
|
3045
|
+
const f = Ve((C = S[S.length - 1]) == null ? void 0 : C.visit.dateIso) ?? Ve(o);
|
|
3046
3046
|
return Pa(
|
|
3047
3047
|
{
|
|
3048
3048
|
tab: "evolution",
|
|
@@ -3050,7 +3050,7 @@ function Rs(e) {
|
|
|
3050
3050
|
fileStem: Ra(
|
|
3051
3051
|
"evolution",
|
|
3052
3052
|
a,
|
|
3053
|
-
|
|
3053
|
+
f,
|
|
3054
3054
|
!!m,
|
|
3055
3055
|
n
|
|
3056
3056
|
),
|
|
@@ -3203,12 +3203,12 @@ async function js(e) {
|
|
|
3203
3203
|
N.font = { bold: !0 };
|
|
3204
3204
|
continue;
|
|
3205
3205
|
}
|
|
3206
|
-
const g = l.columns.map((N,
|
|
3207
|
-
l.columns.forEach((N,
|
|
3208
|
-
const
|
|
3209
|
-
if (typeof g[
|
|
3206
|
+
const g = l.columns.map((N, S) => p.cells[S] ?? null), h = c.addRow(g);
|
|
3207
|
+
l.columns.forEach((N, S) => {
|
|
3208
|
+
const f = h.getCell(S + 1);
|
|
3209
|
+
if (typeof g[S] != "number") return;
|
|
3210
3210
|
const C = Bs(kt(p, N));
|
|
3211
|
-
C && (
|
|
3211
|
+
C && (f.numFmt = C), f.alignment = { horizontal: "right" };
|
|
3212
3212
|
});
|
|
3213
3213
|
}
|
|
3214
3214
|
l.columns.forEach((p, g) => {
|
|
@@ -3382,38 +3382,38 @@ function to(e, a, n) {
|
|
|
3382
3382
|
);
|
|
3383
3383
|
}
|
|
3384
3384
|
async function Nt(e, a = {}) {
|
|
3385
|
-
var
|
|
3385
|
+
var S;
|
|
3386
3386
|
const [{ jsPDF: n }, { default: i }] = await Promise.all([
|
|
3387
|
-
import("./jspdf.es.min-DaapWjR1.js").then((
|
|
3387
|
+
import("./jspdf.es.min-DaapWjR1.js").then((f) => f.j),
|
|
3388
3388
|
import("./jspdf.plugin.autotable-CSiDNyPn.js")
|
|
3389
3389
|
]), s = a.palette ?? Be, o = e.locale, r = new n({
|
|
3390
3390
|
orientation: ao(e) ? "landscape" : "portrait",
|
|
3391
3391
|
unit: "mm",
|
|
3392
3392
|
format: "a4"
|
|
3393
|
-
}), l = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), m = l - ne * 2, p = (
|
|
3394
|
-
r.setFont("helvetica",
|
|
3393
|
+
}), l = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), m = l - ne * 2, p = (f, C, y) => {
|
|
3394
|
+
r.setFont("helvetica", f), r.setFontSize(C), r.setTextColor(y[0], y[1], y[2]);
|
|
3395
3395
|
};
|
|
3396
3396
|
let g = ne;
|
|
3397
3397
|
p("bold", Js, s.headerText);
|
|
3398
|
-
for (const
|
|
3398
|
+
for (const f of r.splitTextToSize(
|
|
3399
3399
|
$e(e.title),
|
|
3400
3400
|
m
|
|
3401
3401
|
))
|
|
3402
|
-
r.text(
|
|
3402
|
+
r.text(f, ne, g), g += _e + 1;
|
|
3403
3403
|
g += 1, p("normal", Zs, s.mutedText);
|
|
3404
|
-
for (const
|
|
3405
|
-
r.text($e(`${
|
|
3406
|
-
for (const
|
|
3407
|
-
if (g += _e, g > c - ne * 2 && (r.addPage(), g = ne), p("bold", eo, s.headerText), r.text($e(
|
|
3408
|
-
g += _e, p("normal", zn, s.mutedText), r.text($e(
|
|
3404
|
+
for (const f of e.meta)
|
|
3405
|
+
r.text($e(`${f.label}: ${f.value}`), ne, g), g += _e - 0.6;
|
|
3406
|
+
for (const f of e.tables) {
|
|
3407
|
+
if (g += _e, g > c - ne * 2 && (r.addPage(), g = ne), p("bold", eo, s.headerText), r.text($e(f.title), ne, g), g += 2, f.rows.length === 0 && f.emptyText) {
|
|
3408
|
+
g += _e, p("normal", zn, s.mutedText), r.text($e(f.emptyText), ne, g), g += 1;
|
|
3409
3409
|
continue;
|
|
3410
3410
|
}
|
|
3411
|
-
const C = /* @__PURE__ */ new Set(),
|
|
3412
|
-
wt(
|
|
3413
|
-
...
|
|
3414
|
-
]) : to(
|
|
3415
|
-
head: [
|
|
3416
|
-
body:
|
|
3411
|
+
const C = /* @__PURE__ */ new Set(), y = f.rows.map((P, I) => P.kind === "section" ? (C.add(I), [
|
|
3412
|
+
wt(P.cells[0] ?? null, void 0, o),
|
|
3413
|
+
...f.columns.slice(1).map(() => "")
|
|
3414
|
+
]) : to(P, f, o)), A = {}, E = {
|
|
3415
|
+
head: [f.columns.map((P) => $e(P.header))],
|
|
3416
|
+
body: y,
|
|
3417
3417
|
startY: g + 2,
|
|
3418
3418
|
margin: { left: ne, right: ne, bottom: ne + _e },
|
|
3419
3419
|
theme: "grid",
|
|
@@ -3433,32 +3433,32 @@ async function Nt(e, a = {}) {
|
|
|
3433
3433
|
},
|
|
3434
3434
|
alternateRowStyles: { fillColor: s.zebraFill },
|
|
3435
3435
|
columnStyles: Object.fromEntries(
|
|
3436
|
-
|
|
3436
|
+
f.columns.map((P, I) => [
|
|
3437
3437
|
I,
|
|
3438
|
-
|
|
3438
|
+
P.numeric ? { halign: "right" } : {}
|
|
3439
3439
|
])
|
|
3440
3440
|
),
|
|
3441
|
-
didParseCell: (
|
|
3442
|
-
|
|
3441
|
+
didParseCell: (P) => {
|
|
3442
|
+
P.section === "body" && C.has(P.row.index) && (P.cell.styles.fillColor = s.sectionFill, P.cell.styles.textColor = s.headerText, P.cell.styles.fontStyle = "bold");
|
|
3443
3443
|
},
|
|
3444
|
-
didDrawPage: (
|
|
3445
|
-
|
|
3444
|
+
didDrawPage: (P) => {
|
|
3445
|
+
A.table = P.table;
|
|
3446
3446
|
}
|
|
3447
3447
|
};
|
|
3448
|
-
i(r,
|
|
3448
|
+
i(r, E), g = ((S = A.table) == null ? void 0 : S.finalY) ?? g + _e;
|
|
3449
3449
|
}
|
|
3450
3450
|
if (e.footnotes.length > 0) {
|
|
3451
3451
|
g += _e + 1, g > c - ne * 2 && (r.addPage(), g = ne), p("normal", $n, s.mutedText);
|
|
3452
|
-
for (const
|
|
3453
|
-
for (const C of r.splitTextToSize($e(
|
|
3452
|
+
for (const f of e.footnotes)
|
|
3453
|
+
for (const C of r.splitTextToSize($e(f), m))
|
|
3454
3454
|
r.text(C, ne, g), g += _e - 1;
|
|
3455
3455
|
}
|
|
3456
3456
|
const h = $e(
|
|
3457
3457
|
[e.patientName, e.audienceLabel].filter(Boolean).join(" · ")
|
|
3458
3458
|
), N = r.getNumberOfPages();
|
|
3459
|
-
for (let
|
|
3460
|
-
r.setPage(
|
|
3461
|
-
`${
|
|
3459
|
+
for (let f = 1; f <= N; f += 1)
|
|
3460
|
+
r.setPage(f), p("normal", $n, s.mutedText), h && r.text(h, ne, c - ne + 4), r.text(
|
|
3461
|
+
`${f} / ${N}`,
|
|
3462
3462
|
l - ne,
|
|
3463
3463
|
c - ne + 4,
|
|
3464
3464
|
{ align: "right" }
|
|
@@ -3488,10 +3488,10 @@ function oo({
|
|
|
3488
3488
|
defaultShareOpen: r = !1,
|
|
3489
3489
|
defaultAudience: l = "clinician"
|
|
3490
3490
|
}) {
|
|
3491
|
-
const [c, m] =
|
|
3491
|
+
const [c, m] = $(l), [p, g] = $(!1), [h, N] = $(o), [S, f] = $(r), [C, y] = $(l), [A, E] = $({ text: "", seq: 0 }), P = De(null), I = De(null), T = De(null), u = De(!1), w = je();
|
|
3492
3492
|
Ea(
|
|
3493
3493
|
() => () => {
|
|
3494
|
-
|
|
3494
|
+
T.current && URL.revokeObjectURL(T.current);
|
|
3495
3495
|
},
|
|
3496
3496
|
[]
|
|
3497
3497
|
);
|
|
@@ -3505,46 +3505,46 @@ function oo({
|
|
|
3505
3505
|
scope: p ? "all" : "selected"
|
|
3506
3506
|
}),
|
|
3507
3507
|
[e, a, n, i, s, p]
|
|
3508
|
-
), L = n(`anamnesis.export.tab.${e}`),
|
|
3508
|
+
), L = n(`anamnesis.export.tab.${e}`), V = n("anamnesis.export.control.audienceBadge"), k = M(
|
|
3509
3509
|
() => h ? Ln(x("patient"), n).excluded : [],
|
|
3510
3510
|
[h, x, n]
|
|
3511
|
-
),
|
|
3512
|
-
clinician:
|
|
3513
|
-
list:
|
|
3511
|
+
), _ = {
|
|
3512
|
+
clinician: k.length > 0 ? n("anamnesis.export.control.holds", {
|
|
3513
|
+
list: k.join(n("anamnesis.export.listSeparator"))
|
|
3514
3514
|
}) : n("anamnesis.export.control.holdsNone"),
|
|
3515
|
-
patient:
|
|
3516
|
-
list:
|
|
3515
|
+
patient: k.length > 0 ? n("anamnesis.export.control.excludes", {
|
|
3516
|
+
list: k.join(n("anamnesis.export.listSeparator"))
|
|
3517
3517
|
}) : n("anamnesis.export.control.excludesNone")
|
|
3518
|
-
},
|
|
3519
|
-
() =>
|
|
3520
|
-
[
|
|
3521
|
-
),
|
|
3518
|
+
}, B = M(
|
|
3519
|
+
() => S ? Ln(x(C), n) : { included: [], excluded: [] },
|
|
3520
|
+
[S, x, C, n]
|
|
3521
|
+
), H = (q) => E((j) => ({ text: q, seq: j.seq + 1 })), ue = (q, j) => {
|
|
3522
3522
|
if (u.current) return;
|
|
3523
3523
|
u.current = !0;
|
|
3524
3524
|
const le = x(c);
|
|
3525
|
-
Promise.resolve(
|
|
3526
|
-
(ae) =>
|
|
3525
|
+
Promise.resolve(j(le)).then(
|
|
3526
|
+
(ae) => H(
|
|
3527
3527
|
ae ? n("anamnesis.export.control.ready", {
|
|
3528
3528
|
file: `${le.fileStem}.${q}`
|
|
3529
3529
|
}) : n("anamnesis.export.control.failed")
|
|
3530
3530
|
)
|
|
3531
|
-
).catch(() =>
|
|
3531
|
+
).catch(() => H(n("anamnesis.export.control.failed"))).finally(() => {
|
|
3532
3532
|
u.current = !1;
|
|
3533
3533
|
});
|
|
3534
|
-
}, pe = () => Qs(
|
|
3534
|
+
}, pe = () => Qs(P.current), ve = () => ue("pdf", (q) => io(q, { palette: pe() })), he = () => ue("xlsx", Ws), ce = () => ue("csv", Gs), Z = () => {
|
|
3535
3535
|
u.current || (u.current = !0, so(x(c), I.current, { palette: pe() }).then((q) => {
|
|
3536
3536
|
if (!q) {
|
|
3537
|
-
|
|
3537
|
+
H(n("anamnesis.export.control.failed"));
|
|
3538
3538
|
return;
|
|
3539
3539
|
}
|
|
3540
|
-
|
|
3541
|
-
}).catch(() =>
|
|
3540
|
+
T.current && URL.revokeObjectURL(T.current), T.current = q, H(n("anamnesis.export.control.printing"));
|
|
3541
|
+
}).catch(() => H(n("anamnesis.export.control.failed"))).finally(() => {
|
|
3542
3542
|
u.current = !1;
|
|
3543
3543
|
}));
|
|
3544
3544
|
}, Fe = () => {
|
|
3545
|
-
|
|
3546
|
-
},
|
|
3547
|
-
m(C),
|
|
3545
|
+
y(c), f(!0);
|
|
3546
|
+
}, D = () => {
|
|
3547
|
+
m(C), f(!1), H(
|
|
3548
3548
|
n("anamnesis.export.share.confirmed", {
|
|
3549
3549
|
audience: n(`anamnesis.export.audience.${C}`)
|
|
3550
3550
|
})
|
|
@@ -3553,19 +3553,19 @@ function oo({
|
|
|
3553
3553
|
return /* @__PURE__ */ d(
|
|
3554
3554
|
"div",
|
|
3555
3555
|
{
|
|
3556
|
-
ref:
|
|
3556
|
+
ref: P,
|
|
3557
3557
|
"data-component": "anamnesis-export-menu",
|
|
3558
3558
|
"data-tab": e,
|
|
3559
3559
|
"data-audience": c,
|
|
3560
3560
|
className: "ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]",
|
|
3561
3561
|
children: [
|
|
3562
3562
|
c !== "clinician" ? /* @__PURE__ */ t(
|
|
3563
|
-
|
|
3563
|
+
W,
|
|
3564
3564
|
{
|
|
3565
3565
|
variant: "warning",
|
|
3566
3566
|
size: "sm",
|
|
3567
3567
|
"data-testid": "anamnesis-export-audience",
|
|
3568
|
-
children:
|
|
3568
|
+
children: V
|
|
3569
3569
|
}
|
|
3570
3570
|
) : null,
|
|
3571
3571
|
/* @__PURE__ */ d(
|
|
@@ -3584,7 +3584,7 @@ function oo({
|
|
|
3584
3584
|
endIcon: /* @__PURE__ */ t(rn, { "aria-hidden": "true" }),
|
|
3585
3585
|
"aria-label": c === "clinician" ? n("anamnesis.export.control.triggerLabel", { tab: L }) : n("anamnesis.export.control.triggerLabelAudience", {
|
|
3586
3586
|
tab: L,
|
|
3587
|
-
audience:
|
|
3587
|
+
audience: V
|
|
3588
3588
|
}),
|
|
3589
3589
|
"data-testid": "anamnesis-export-trigger",
|
|
3590
3590
|
children: n("anamnesis.export.control.trigger")
|
|
@@ -3603,21 +3603,21 @@ function oo({
|
|
|
3603
3603
|
oe.RadioItem,
|
|
3604
3604
|
{
|
|
3605
3605
|
value: q,
|
|
3606
|
-
"aria-describedby": `${
|
|
3607
|
-
onSelect: (
|
|
3606
|
+
"aria-describedby": `${w}-${q}`,
|
|
3607
|
+
onSelect: (j) => j.preventDefault(),
|
|
3608
3608
|
children: n(`anamnesis.export.audience.${q}`)
|
|
3609
3609
|
},
|
|
3610
3610
|
q
|
|
3611
3611
|
))
|
|
3612
3612
|
}
|
|
3613
3613
|
),
|
|
3614
|
-
/* @__PURE__ */ t(oe.Label, { "data-testid": "anamnesis-export-disclosure", children:
|
|
3614
|
+
/* @__PURE__ */ t(oe.Label, { "data-testid": "anamnesis-export-disclosure", children: _[c === "patient" ? "patient" : "clinician"] }),
|
|
3615
3615
|
an.map((q) => /* @__PURE__ */ t(
|
|
3616
3616
|
"span",
|
|
3617
3617
|
{
|
|
3618
|
-
id: `${
|
|
3618
|
+
id: `${w}-${q}`,
|
|
3619
3619
|
className: "ds:sr-only",
|
|
3620
|
-
children:
|
|
3620
|
+
children: _[q]
|
|
3621
3621
|
},
|
|
3622
3622
|
q
|
|
3623
3623
|
)),
|
|
@@ -3683,12 +3683,12 @@ function oo({
|
|
|
3683
3683
|
/* @__PURE__ */ t(
|
|
3684
3684
|
ro,
|
|
3685
3685
|
{
|
|
3686
|
-
open:
|
|
3687
|
-
onOpenChange:
|
|
3686
|
+
open: S,
|
|
3687
|
+
onOpenChange: f,
|
|
3688
3688
|
audience: C,
|
|
3689
|
-
onAudienceChange:
|
|
3690
|
-
preview:
|
|
3691
|
-
onConfirm:
|
|
3689
|
+
onAudienceChange: y,
|
|
3690
|
+
preview: B,
|
|
3691
|
+
onConfirm: D,
|
|
3692
3692
|
tabName: L,
|
|
3693
3693
|
t: n
|
|
3694
3694
|
}
|
|
@@ -3710,7 +3710,7 @@ function oo({
|
|
|
3710
3710
|
"aria-live": "polite",
|
|
3711
3711
|
"data-testid": "anamnesis-export-status",
|
|
3712
3712
|
className: "type-body-sm ds:text-[color:var(--muted-foreground)]",
|
|
3713
|
-
children:
|
|
3713
|
+
children: A.text ? `${A.text}${A.seq % 2 ? "" : ""}` : ""
|
|
3714
3714
|
}
|
|
3715
3715
|
)
|
|
3716
3716
|
]
|
|
@@ -3731,7 +3731,7 @@ function ro({
|
|
|
3731
3731
|
/* @__PURE__ */ d(Y.Header, { children: [
|
|
3732
3732
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
3733
3733
|
/* @__PURE__ */ t(Y.Title, { children: l("anamnesis.export.share.title", { tab: r }) }),
|
|
3734
|
-
/* @__PURE__ */ t(
|
|
3734
|
+
/* @__PURE__ */ t(W, { variant: "warning", size: "sm", children: l("anamnesis.export.share.mockBadge") })
|
|
3735
3735
|
] }),
|
|
3736
3736
|
/* @__PURE__ */ t(Y.Description, { children: l("anamnesis.export.share.subtitle") })
|
|
3737
3737
|
] }),
|
|
@@ -3833,7 +3833,7 @@ function Ct({
|
|
|
3833
3833
|
switch (e.type) {
|
|
3834
3834
|
case "text": {
|
|
3835
3835
|
const p = (a == null ? void 0 : a.kind) === "text" ? a.text : "";
|
|
3836
|
-
m = /* @__PURE__ */ t(
|
|
3836
|
+
m = /* @__PURE__ */ t(O, { label: r, description: l, children: /* @__PURE__ */ t(
|
|
3837
3837
|
ee,
|
|
3838
3838
|
{
|
|
3839
3839
|
value: p,
|
|
@@ -3844,7 +3844,7 @@ function Ct({
|
|
|
3844
3844
|
}
|
|
3845
3845
|
case "textarea": {
|
|
3846
3846
|
const p = (a == null ? void 0 : a.kind) === "text" ? a.text : "";
|
|
3847
|
-
m = /* @__PURE__ */ t(
|
|
3847
|
+
m = /* @__PURE__ */ t(O, { label: r, description: l, children: /* @__PURE__ */ t(
|
|
3848
3848
|
aa,
|
|
3849
3849
|
{
|
|
3850
3850
|
value: p,
|
|
@@ -3857,7 +3857,7 @@ function Ct({
|
|
|
3857
3857
|
}
|
|
3858
3858
|
case "number": {
|
|
3859
3859
|
const p = (a == null ? void 0 : a.kind) === "number" ? a.value : null;
|
|
3860
|
-
m = /* @__PURE__ */ t(
|
|
3860
|
+
m = /* @__PURE__ */ t(O, { label: r, description: l, children: /* @__PURE__ */ t(
|
|
3861
3861
|
ha,
|
|
3862
3862
|
{
|
|
3863
3863
|
value: p,
|
|
@@ -3871,7 +3871,7 @@ function Ct({
|
|
|
3871
3871
|
case "frequency": {
|
|
3872
3872
|
const p = (a == null ? void 0 : a.kind) === "frequency" ? a.perWeek : null, g = (a == null ? void 0 : a.kind) === "frequency" ? a.detail ?? "" : "";
|
|
3873
3873
|
m = /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3874
|
-
/* @__PURE__ */ t(
|
|
3874
|
+
/* @__PURE__ */ t(O, { label: r, description: l, children: /* @__PURE__ */ t(
|
|
3875
3875
|
ha,
|
|
3876
3876
|
{
|
|
3877
3877
|
value: p,
|
|
@@ -3885,7 +3885,7 @@ function Ct({
|
|
|
3885
3885
|
})
|
|
3886
3886
|
}
|
|
3887
3887
|
) }),
|
|
3888
|
-
e.detail ? /* @__PURE__ */ t(
|
|
3888
|
+
e.detail ? /* @__PURE__ */ t(O, { label: o(`anamnesis.field.${e.key}.detailLabel`), children: /* @__PURE__ */ t(
|
|
3889
3889
|
ee,
|
|
3890
3890
|
{
|
|
3891
3891
|
value: g,
|
|
@@ -3921,7 +3921,7 @@ function Ct({
|
|
|
3921
3921
|
]
|
|
3922
3922
|
}
|
|
3923
3923
|
),
|
|
3924
|
-
e.detail && p === "yes" ? /* @__PURE__ */ t(
|
|
3924
|
+
e.detail && p === "yes" ? /* @__PURE__ */ t(O, { label: o("anamnesis.common.details"), children: /* @__PURE__ */ t(
|
|
3925
3925
|
ee,
|
|
3926
3926
|
{
|
|
3927
3927
|
value: g,
|
|
@@ -3945,7 +3945,7 @@ function Ct({
|
|
|
3945
3945
|
})
|
|
3946
3946
|
}));
|
|
3947
3947
|
m = /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3948
|
-
/* @__PURE__ */ t(
|
|
3948
|
+
/* @__PURE__ */ t(O, { label: r, description: l, children: /* @__PURE__ */ t(
|
|
3949
3949
|
Oe,
|
|
3950
3950
|
{
|
|
3951
3951
|
options: h,
|
|
@@ -3958,7 +3958,7 @@ function Ct({
|
|
|
3958
3958
|
})
|
|
3959
3959
|
}
|
|
3960
3960
|
) }),
|
|
3961
|
-
e.detail && p ? /* @__PURE__ */ t(
|
|
3961
|
+
e.detail && p ? /* @__PURE__ */ t(O, { label: o("anamnesis.common.details"), children: /* @__PURE__ */ t(
|
|
3962
3962
|
ee,
|
|
3963
3963
|
{
|
|
3964
3964
|
value: g,
|
|
@@ -3999,7 +3999,7 @@ function Ct({
|
|
|
3999
3999
|
m = /* @__PURE__ */ d("fieldset", { className: "ds:m-0 ds:border-0 ds:p-0", children: [
|
|
4000
4000
|
/* @__PURE__ */ t("legend", { className: "type-label ds:mb-[var(--spacing-2xs)] ds:text-[color:var(--foreground)]", children: r }),
|
|
4001
4001
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:sm:flex-row ds:sm:items-start", children: [
|
|
4002
|
-
/* @__PURE__ */ t(
|
|
4002
|
+
/* @__PURE__ */ t(O, { label: o("anamnesis.common.time"), children: /* @__PURE__ */ t(
|
|
4003
4003
|
jt,
|
|
4004
4004
|
{
|
|
4005
4005
|
value: lo(p),
|
|
@@ -4010,7 +4010,7 @@ function Ct({
|
|
|
4010
4010
|
})
|
|
4011
4011
|
}
|
|
4012
4012
|
) }),
|
|
4013
|
-
/* @__PURE__ */ t("div", { className: "ds:grow", children: /* @__PURE__ */ t(
|
|
4013
|
+
/* @__PURE__ */ t("div", { className: "ds:grow", children: /* @__PURE__ */ t(O, { label: o("anamnesis.common.whatEaten"), children: /* @__PURE__ */ t(
|
|
4014
4014
|
ee,
|
|
4015
4015
|
{
|
|
4016
4016
|
value: g,
|
|
@@ -4121,12 +4121,12 @@ function Tt({
|
|
|
4121
4121
|
t: s,
|
|
4122
4122
|
onCommit: o
|
|
4123
4123
|
}) {
|
|
4124
|
-
const [r, l] =
|
|
4125
|
-
|
|
4126
|
-
}, C = (
|
|
4127
|
-
o(
|
|
4124
|
+
const [r, l] = $(!1), [c, m] = $(n), p = vo(e), g = bo(c, p), h = !xo(c, n), N = ke(e, s), S = ko(p, e), f = (y) => {
|
|
4125
|
+
y && m(n), l(y);
|
|
4126
|
+
}, C = (y) => {
|
|
4127
|
+
o(y), l(!1);
|
|
4128
4128
|
};
|
|
4129
|
-
return /* @__PURE__ */ d(fe, { open: r, onOpenChange:
|
|
4129
|
+
return /* @__PURE__ */ d(fe, { open: r, onOpenChange: f, children: [
|
|
4130
4130
|
/* @__PURE__ */ t(fe.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
4131
4131
|
Q,
|
|
4132
4132
|
{
|
|
@@ -4149,11 +4149,11 @@ function Tt({
|
|
|
4149
4149
|
/* @__PURE__ */ t(fe.Description, { children: i }),
|
|
4150
4150
|
/* @__PURE__ */ d("div", { className: "ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
4151
4151
|
/* @__PURE__ */ t(
|
|
4152
|
-
|
|
4152
|
+
O,
|
|
4153
4153
|
{
|
|
4154
4154
|
label: s("anamnesis.targets.editField"),
|
|
4155
|
-
description: s("anamnesis.targets.bounds", { range:
|
|
4156
|
-
error: g ? void 0 : s("anamnesis.targets.outOfBounds", { range:
|
|
4155
|
+
description: s("anamnesis.targets.bounds", { range: S }),
|
|
4156
|
+
error: g ? void 0 : s("anamnesis.targets.outOfBounds", { range: S }),
|
|
4157
4157
|
children: /* @__PURE__ */ t(
|
|
4158
4158
|
ha,
|
|
4159
4159
|
{
|
|
@@ -4233,7 +4233,7 @@ function No({
|
|
|
4233
4233
|
// `mt-auto` pins it to the tile's foot, so a row of tiles stretched to
|
|
4234
4234
|
// the tallest one lines its chips up instead of leaving a hole.
|
|
4235
4235
|
/* @__PURE__ */ d("div", { className: "ds:mt-auto ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4236
|
-
s ? /* @__PURE__ */ t(
|
|
4236
|
+
s ? /* @__PURE__ */ t(W, { variant: wo[s], size: "sm", withDot: !0, children: o }) : null,
|
|
4237
4237
|
r
|
|
4238
4238
|
] })
|
|
4239
4239
|
) : null
|
|
@@ -4322,13 +4322,13 @@ function Ga({
|
|
|
4322
4322
|
onTargetChange: l
|
|
4323
4323
|
}) {
|
|
4324
4324
|
return /* @__PURE__ */ t("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: a.filter((c) => !c.computed).map((c) => {
|
|
4325
|
-
const m = Re(n, c), p = i ? Re(i, c) : null, g = i ? ba(m, p, c) : null, h = va(m, c.referenceRange), N = s.get(c.key) ?? null,
|
|
4325
|
+
const m = Re(n, c), p = i ? Re(i, c) : null, g = i ? ba(m, p, c) : null, h = va(m, c.referenceRange), N = s.get(c.key) ?? null, S = ke(c, o), f = l != null && fi(c.key) && !e.has(c.key);
|
|
4326
4326
|
return /* @__PURE__ */ d(
|
|
4327
4327
|
"div",
|
|
4328
4328
|
{
|
|
4329
4329
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
4330
4330
|
children: [
|
|
4331
|
-
/* @__PURE__ */ t(
|
|
4331
|
+
/* @__PURE__ */ t(O, { label: S, children: /* @__PURE__ */ t(
|
|
4332
4332
|
ha,
|
|
4333
4333
|
{
|
|
4334
4334
|
value: m,
|
|
@@ -4339,16 +4339,16 @@ function Ga({
|
|
|
4339
4339
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4340
4340
|
h ? /* @__PURE__ */ t(gn, { flag: h, t: o }) : null,
|
|
4341
4341
|
/* @__PURE__ */ t(Oa, { delta: g, def: c, t: o }),
|
|
4342
|
-
|
|
4342
|
+
f || N != null ? /* @__PURE__ */ d("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
4343
4343
|
/* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: N == null ? o("anamnesis.targets.unset") : o("anamnesis.grid.target", {
|
|
4344
4344
|
value: qe(N, c.precision),
|
|
4345
4345
|
unit: c.unit ?? ""
|
|
4346
4346
|
}) }),
|
|
4347
|
-
|
|
4347
|
+
f ? /* @__PURE__ */ t(
|
|
4348
4348
|
Tt,
|
|
4349
4349
|
{
|
|
4350
4350
|
def: c,
|
|
4351
|
-
label:
|
|
4351
|
+
label: S,
|
|
4352
4352
|
committed: N,
|
|
4353
4353
|
nowLabel: o("anamnesis.targets.now", {
|
|
4354
4354
|
value: `${qe(m, c.precision)} ${c.unit ?? ""}`.trim()
|
|
@@ -4393,14 +4393,14 @@ function ge({
|
|
|
4393
4393
|
/* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
4394
4394
|
a(e),
|
|
4395
4395
|
i == null ? null : /* @__PURE__ */ t(
|
|
4396
|
-
|
|
4396
|
+
W,
|
|
4397
4397
|
{
|
|
4398
4398
|
variant: s === "outstanding" && i > 0 ? "warning" : "neutral",
|
|
4399
4399
|
size: "sm",
|
|
4400
4400
|
children: s === "outstanding" ? i > 0 ? a("anamnesis.compile.blockOutstanding", { count: i }) : a("anamnesis.compile.blockSettled") : i > 0 ? a("anamnesis.compile.blockFilled", { count: i }) : a("anamnesis.compile.blockEmpty")
|
|
4401
4401
|
}
|
|
4402
4402
|
),
|
|
4403
|
-
o > 0 ? /* @__PURE__ */ t(
|
|
4403
|
+
o > 0 ? /* @__PURE__ */ t(W, { variant: "warning", size: "sm", children: a("anamnesis.compile.blockFlagged", { count: o }) }) : null
|
|
4404
4404
|
] }),
|
|
4405
4405
|
/* @__PURE__ */ t(
|
|
4406
4406
|
rn,
|
|
@@ -4439,53 +4439,53 @@ function So({
|
|
|
4439
4439
|
defaultExportAudience: g = "clinician"
|
|
4440
4440
|
}) {
|
|
4441
4441
|
var Cn;
|
|
4442
|
-
const [h, N] =
|
|
4442
|
+
const [h, N] = $(
|
|
4443
4443
|
() => structuredClone(e)
|
|
4444
|
-
),
|
|
4444
|
+
), S = De(0), { patient: f, visits: C } = h, y = C[C.length - 1], A = C.length > 1 ? C[C.length - 2] : void 0, E = M(
|
|
4445
4445
|
() => new Map(h.targets.map((v) => [v.parameterKey, v.target])),
|
|
4446
4446
|
[h.targets]
|
|
4447
|
-
),
|
|
4447
|
+
), P = M(
|
|
4448
4448
|
() => Ne(i, "anthropometric"),
|
|
4449
4449
|
[i]
|
|
4450
|
-
), I =
|
|
4450
|
+
), I = M(
|
|
4451
4451
|
() => Ne(i, "dietary"),
|
|
4452
4452
|
[i]
|
|
4453
|
-
),
|
|
4453
|
+
), T = M(() => Ne(i, "lab"), [i]), u = M(() => uo(i), [i]), w = M(
|
|
4454
4454
|
() => new Set(u.map((v) => v.key)),
|
|
4455
4455
|
[u]
|
|
4456
|
-
), x =
|
|
4457
|
-
() => In(
|
|
4458
|
-
[
|
|
4459
|
-
), [L,
|
|
4460
|
-
const v = In(
|
|
4461
|
-
for (const
|
|
4456
|
+
), x = M(
|
|
4457
|
+
() => In(y, T),
|
|
4458
|
+
[y, T]
|
|
4459
|
+
), [L, V] = $(() => {
|
|
4460
|
+
const v = In(y, T), b = {};
|
|
4461
|
+
for (const R of ot) b[R] = v[R].open;
|
|
4462
4462
|
return b;
|
|
4463
|
-
}),
|
|
4464
|
-
(v) => (b) =>
|
|
4463
|
+
}), k = da(
|
|
4464
|
+
(v) => (b) => V((R) => ({ ...R, [v]: b })),
|
|
4465
4465
|
[]
|
|
4466
|
-
),
|
|
4466
|
+
), _ = M(
|
|
4467
4467
|
() => na(i),
|
|
4468
4468
|
[i]
|
|
4469
|
-
),
|
|
4469
|
+
), B = M(() => cn(i), [i]), H = M(() => _a(i), [i]), [ue, pe] = $(c), [ve, he] = $(!0), [ce, Z] = $([]), Fe = da((v) => {
|
|
4470
4470
|
Z(
|
|
4471
|
-
(b) => b.length === v.length && b.every((
|
|
4471
|
+
(b) => b.length === v.length && b.every((R, U) => R === v[U]) ? b : [...v]
|
|
4472
4472
|
);
|
|
4473
|
-
}, []), { containerRef:
|
|
4473
|
+
}, []), { containerRef: D, requestJump: q } = et(), j = da(
|
|
4474
4474
|
(v) => {
|
|
4475
|
-
var b,
|
|
4476
|
-
return (
|
|
4475
|
+
var b, R;
|
|
4476
|
+
return (R = (b = h.intake) == null ? void 0 : b.answers[v]) == null ? void 0 : R.value;
|
|
4477
4477
|
},
|
|
4478
4478
|
[h.intake]
|
|
4479
|
-
), le =
|
|
4480
|
-
() => zi(
|
|
4481
|
-
[
|
|
4482
|
-
), ae =
|
|
4483
|
-
() => Zn(
|
|
4484
|
-
[
|
|
4485
|
-
), [Ce] =
|
|
4479
|
+
), le = M(
|
|
4480
|
+
() => zi(_, j, f.sex, a),
|
|
4481
|
+
[_, j, f.sex, a]
|
|
4482
|
+
), ae = M(
|
|
4483
|
+
() => Zn(B, j, f.sex, a),
|
|
4484
|
+
[B, j, f.sex, a]
|
|
4485
|
+
), [Ce] = $(() => new Set(ae.map((v) => v.key))), Ee = (v) => {
|
|
4486
4486
|
pe("compile"), he(!0), q(v.key);
|
|
4487
4487
|
};
|
|
4488
|
-
if (!
|
|
4488
|
+
if (!y)
|
|
4489
4489
|
return /* @__PURE__ */ t(Vn, { embedded: n, children: /* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { children: /* @__PURE__ */ t(
|
|
4490
4490
|
Qe,
|
|
4491
4491
|
{
|
|
@@ -4495,41 +4495,41 @@ function So({
|
|
|
4495
4495
|
description: a("anamnesis.empty.noRecord.description")
|
|
4496
4496
|
}
|
|
4497
4497
|
) }) }) });
|
|
4498
|
-
const
|
|
4498
|
+
const G = (v) => {
|
|
4499
4499
|
N((b) => {
|
|
4500
4500
|
if (b.visits.length === 0) return b;
|
|
4501
|
-
const
|
|
4502
|
-
return
|
|
4501
|
+
const R = b.visits.slice();
|
|
4502
|
+
return R[R.length - 1] = v(R[R.length - 1]), { ...b, visits: R };
|
|
4503
4503
|
});
|
|
4504
|
-
}, Ye = (v, b) =>
|
|
4505
|
-
...
|
|
4506
|
-
visits:
|
|
4507
|
-
(Je) => Je.id === v.id ? En(Je, b,
|
|
4504
|
+
}, Ye = (v, b) => G((R) => En(R, v, b)), Ba = (v, b, R) => N((U) => ({
|
|
4505
|
+
...U,
|
|
4506
|
+
visits: U.visits.map(
|
|
4507
|
+
(Je) => Je.id === v.id ? En(Je, b, R) : Je
|
|
4508
4508
|
)
|
|
4509
|
-
})),
|
|
4510
|
-
N((
|
|
4511
|
-
},
|
|
4512
|
-
...
|
|
4513
|
-
therapy:
|
|
4514
|
-
})), Ae = (v) =>
|
|
4509
|
+
})), z = (v, b) => {
|
|
4510
|
+
N((R) => wi(R, v.key, b)), s == null || s(v.key, b);
|
|
4511
|
+
}, K = (v) => G((b) => ({ ...b, pathologyCodes: v })), be = (v, b) => G((R) => ({
|
|
4512
|
+
...R,
|
|
4513
|
+
therapy: R.therapy.map((U) => U.id === v ? { ...U, ...b } : U)
|
|
4514
|
+
})), Ae = (v) => G((b) => ({
|
|
4515
4515
|
...b,
|
|
4516
|
-
therapy: b.therapy.filter((
|
|
4516
|
+
therapy: b.therapy.filter((R) => R.id !== v)
|
|
4517
4517
|
})), Xe = () => {
|
|
4518
|
-
|
|
4519
|
-
const v = `new-${
|
|
4520
|
-
|
|
4518
|
+
S.current += 1;
|
|
4519
|
+
const v = `new-${S.current}`;
|
|
4520
|
+
G((b) => ({
|
|
4521
4521
|
...b,
|
|
4522
4522
|
therapy: [...b.therapy, { id: v, name: "", dose: "", kind: "medication" }]
|
|
4523
4523
|
}));
|
|
4524
4524
|
}, Et = (v, b) => {
|
|
4525
|
-
N((
|
|
4526
|
-
var
|
|
4525
|
+
N((R) => {
|
|
4526
|
+
var U;
|
|
4527
4527
|
return {
|
|
4528
|
-
...
|
|
4528
|
+
...R,
|
|
4529
4529
|
intake: {
|
|
4530
|
-
...
|
|
4530
|
+
...R.intake,
|
|
4531
4531
|
answers: {
|
|
4532
|
-
...(
|
|
4532
|
+
...(U = R.intake) == null ? void 0 : U.answers,
|
|
4533
4533
|
[v]: { value: b, origin: "clinician" }
|
|
4534
4534
|
}
|
|
4535
4535
|
}
|
|
@@ -4537,23 +4537,23 @@ function So({
|
|
|
4537
4537
|
});
|
|
4538
4538
|
}, At = vi(i).map(
|
|
4539
4539
|
(v) => {
|
|
4540
|
-
const b =
|
|
4540
|
+
const b = H[v], R = b == null ? void 0 : b.parentCode;
|
|
4541
4541
|
return {
|
|
4542
4542
|
value: v,
|
|
4543
4543
|
label: Se(v, a, b),
|
|
4544
|
-
group:
|
|
4544
|
+
group: R ? pn(R, a, H[R]) : a("anamnesis.pathology.groupGeneral")
|
|
4545
4545
|
};
|
|
4546
4546
|
}
|
|
4547
|
-
), ka =
|
|
4547
|
+
), ka = y.oncological ?? {}, wa = y.annualProgramme ?? {
|
|
4548
4548
|
proposed: !1,
|
|
4549
4549
|
accepted: !1
|
|
4550
4550
|
}, Dt = /* @__PURE__ */ d(Ie, { children: [
|
|
4551
4551
|
!n || r ? /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-end ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
4552
4552
|
n ? /* @__PURE__ */ t("span", {}) : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
4553
4553
|
/* @__PURE__ */ d("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: [
|
|
4554
|
-
|
|
4554
|
+
f.firstName,
|
|
4555
4555
|
" ",
|
|
4556
|
-
|
|
4556
|
+
f.lastName
|
|
4557
4557
|
] }),
|
|
4558
4558
|
/* @__PURE__ */ d("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: [
|
|
4559
4559
|
$a(h, a),
|
|
@@ -4573,11 +4573,11 @@ function So({
|
|
|
4573
4573
|
o ? null : /* @__PURE__ */ t(
|
|
4574
4574
|
To,
|
|
4575
4575
|
{
|
|
4576
|
-
visit:
|
|
4576
|
+
visit: y,
|
|
4577
4577
|
defs: u,
|
|
4578
|
-
targets:
|
|
4578
|
+
targets: E,
|
|
4579
4579
|
t: a,
|
|
4580
|
-
onTargetChange:
|
|
4580
|
+
onTargetChange: z
|
|
4581
4581
|
}
|
|
4582
4582
|
),
|
|
4583
4583
|
/* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: /* @__PURE__ */ d(
|
|
@@ -4610,8 +4610,8 @@ function So({
|
|
|
4610
4610
|
Ki,
|
|
4611
4611
|
{
|
|
4612
4612
|
intake: h.intake,
|
|
4613
|
-
sections:
|
|
4614
|
-
sex:
|
|
4613
|
+
sections: _,
|
|
4614
|
+
sex: f.sex,
|
|
4615
4615
|
digest: le,
|
|
4616
4616
|
missing: ae,
|
|
4617
4617
|
onJump: Ee,
|
|
@@ -4620,7 +4620,7 @@ function So({
|
|
|
4620
4620
|
) }) }),
|
|
4621
4621
|
/* @__PURE__ */ t(ie.Content, { value: "compile", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
|
|
4622
4622
|
/* @__PURE__ */ t(ge, { titleKey: "anamnesis.section.visitMeta", t: a, children: /* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
4623
|
-
/* @__PURE__ */ t(
|
|
4623
|
+
/* @__PURE__ */ t(O, { label: a("anamnesis.field.visitType.label"), children: /* @__PURE__ */ t(
|
|
4624
4624
|
Oe,
|
|
4625
4625
|
{
|
|
4626
4626
|
options: [
|
|
@@ -4633,42 +4633,42 @@ function So({
|
|
|
4633
4633
|
label: a("anamnesis.visitType.followUp")
|
|
4634
4634
|
}
|
|
4635
4635
|
],
|
|
4636
|
-
value:
|
|
4637
|
-
onValueChange: (v) =>
|
|
4636
|
+
value: y.visitType,
|
|
4637
|
+
onValueChange: (v) => G((b) => ({
|
|
4638
4638
|
...b,
|
|
4639
4639
|
visitType: v || "followUp"
|
|
4640
4640
|
}))
|
|
4641
4641
|
}
|
|
4642
4642
|
) }),
|
|
4643
|
-
/* @__PURE__ */ t(
|
|
4643
|
+
/* @__PURE__ */ t(O, { label: a("anamnesis.field.site.label"), children: /* @__PURE__ */ t(
|
|
4644
4644
|
Oe,
|
|
4645
4645
|
{
|
|
4646
4646
|
options: [
|
|
4647
4647
|
{ value: "milan", label: a("anamnesis.site.milan") },
|
|
4648
4648
|
{ value: "rome", label: a("anamnesis.site.rome") }
|
|
4649
4649
|
],
|
|
4650
|
-
value:
|
|
4651
|
-
onValueChange: (v) =>
|
|
4650
|
+
value: y.siteKey ?? "",
|
|
4651
|
+
onValueChange: (v) => G((b) => ({
|
|
4652
4652
|
...b,
|
|
4653
4653
|
siteKey: v || void 0
|
|
4654
4654
|
}))
|
|
4655
4655
|
}
|
|
4656
4656
|
) }),
|
|
4657
|
-
/* @__PURE__ */ t(
|
|
4657
|
+
/* @__PURE__ */ t(O, { label: a("anamnesis.field.practitioner.label"), children: /* @__PURE__ */ t(
|
|
4658
4658
|
ee,
|
|
4659
4659
|
{
|
|
4660
|
-
value:
|
|
4661
|
-
onChange: (v) =>
|
|
4660
|
+
value: y.practitioner ?? "",
|
|
4661
|
+
onChange: (v) => G((b) => ({
|
|
4662
4662
|
...b,
|
|
4663
4663
|
practitioner: v.target.value
|
|
4664
4664
|
}))
|
|
4665
4665
|
}
|
|
4666
4666
|
) }),
|
|
4667
|
-
/* @__PURE__ */ t(
|
|
4667
|
+
/* @__PURE__ */ t(O, { label: a("anamnesis.header.visitDate"), children: /* @__PURE__ */ t(
|
|
4668
4668
|
Lt,
|
|
4669
4669
|
{
|
|
4670
|
-
value: Di(
|
|
4671
|
-
onChange: (v) => v &&
|
|
4670
|
+
value: Di(y.dateIso),
|
|
4671
|
+
onChange: (v) => v && G((b) => ({
|
|
4672
4672
|
...b,
|
|
4673
4673
|
dateIso: Ii(v)
|
|
4674
4674
|
}))
|
|
@@ -4689,30 +4689,30 @@ function So({
|
|
|
4689
4689
|
/* @__PURE__ */ t(
|
|
4690
4690
|
"div",
|
|
4691
4691
|
{
|
|
4692
|
-
ref:
|
|
4692
|
+
ref: D,
|
|
4693
4693
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]",
|
|
4694
|
-
children:
|
|
4695
|
-
const b = v.fields.filter((
|
|
4694
|
+
children: B.map((v) => {
|
|
4695
|
+
const b = v.fields.filter((R) => sa(R, f.sex)).filter((R) => Ce.has(R.key));
|
|
4696
4696
|
return b.length === 0 ? null : /* @__PURE__ */ d(
|
|
4697
4697
|
"div",
|
|
4698
4698
|
{
|
|
4699
4699
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
4700
4700
|
children: [
|
|
4701
4701
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: me(v, a) }),
|
|
4702
|
-
b.map((
|
|
4702
|
+
b.map((R) => {
|
|
4703
4703
|
var Je;
|
|
4704
|
-
const
|
|
4704
|
+
const U = (Je = h.intake) == null ? void 0 : Je.answers[R.key];
|
|
4705
4705
|
return /* @__PURE__ */ t(
|
|
4706
4706
|
Ct,
|
|
4707
4707
|
{
|
|
4708
|
-
def:
|
|
4709
|
-
answer:
|
|
4710
|
-
origin:
|
|
4708
|
+
def: R,
|
|
4709
|
+
answer: U == null ? void 0 : U.value,
|
|
4710
|
+
origin: U == null ? void 0 : U.origin,
|
|
4711
4711
|
showOrigin: !0,
|
|
4712
|
-
onChange: (It) => Et(
|
|
4712
|
+
onChange: (It) => Et(R.key, It),
|
|
4713
4713
|
t: a
|
|
4714
4714
|
},
|
|
4715
|
-
|
|
4715
|
+
R.key
|
|
4716
4716
|
);
|
|
4717
4717
|
})
|
|
4718
4718
|
]
|
|
@@ -4730,32 +4730,32 @@ function So({
|
|
|
4730
4730
|
/* @__PURE__ */ t(
|
|
4731
4731
|
Ga,
|
|
4732
4732
|
{
|
|
4733
|
-
stripKeys:
|
|
4734
|
-
defs:
|
|
4735
|
-
visit:
|
|
4736
|
-
previous:
|
|
4737
|
-
targets:
|
|
4733
|
+
stripKeys: w,
|
|
4734
|
+
defs: P,
|
|
4735
|
+
visit: y,
|
|
4736
|
+
previous: A,
|
|
4737
|
+
targets: E,
|
|
4738
4738
|
t: a,
|
|
4739
4739
|
onChange: Ye,
|
|
4740
|
-
onTargetChange:
|
|
4740
|
+
onTargetChange: z
|
|
4741
4741
|
}
|
|
4742
4742
|
)
|
|
4743
4743
|
] }),
|
|
4744
4744
|
I.length > 0 ? /* @__PURE__ */ t(ge, { titleKey: "anamnesis.section.dietary", t: a, children: /* @__PURE__ */ t(
|
|
4745
4745
|
Ga,
|
|
4746
4746
|
{
|
|
4747
|
-
stripKeys:
|
|
4747
|
+
stripKeys: w,
|
|
4748
4748
|
defs: I,
|
|
4749
|
-
visit:
|
|
4750
|
-
previous:
|
|
4751
|
-
targets:
|
|
4749
|
+
visit: y,
|
|
4750
|
+
previous: A,
|
|
4751
|
+
targets: E,
|
|
4752
4752
|
t: a,
|
|
4753
4753
|
onChange: Ye,
|
|
4754
|
-
onTargetChange:
|
|
4754
|
+
onTargetChange: z
|
|
4755
4755
|
}
|
|
4756
4756
|
) }) : null,
|
|
4757
4757
|
/* @__PURE__ */ t(ge, { titleKey: "anamnesis.section.pathologies", t: a, children: /* @__PURE__ */ t(
|
|
4758
|
-
|
|
4758
|
+
O,
|
|
4759
4759
|
{
|
|
4760
4760
|
label: a("anamnesis.compile.pathologiesLabel"),
|
|
4761
4761
|
description: a("anamnesis.compile.pathologiesHelp"),
|
|
@@ -4763,12 +4763,12 @@ function So({
|
|
|
4763
4763
|
on,
|
|
4764
4764
|
{
|
|
4765
4765
|
options: At,
|
|
4766
|
-
value:
|
|
4766
|
+
value: y.pathologyCodes,
|
|
4767
4767
|
allowClear: !0,
|
|
4768
4768
|
placeholder: a(
|
|
4769
4769
|
"anamnesis.compile.pathologiesPlaceholder"
|
|
4770
4770
|
),
|
|
4771
|
-
onChange:
|
|
4771
|
+
onChange: K
|
|
4772
4772
|
}
|
|
4773
4773
|
)
|
|
4774
4774
|
}
|
|
@@ -4779,14 +4779,14 @@ function So({
|
|
|
4779
4779
|
titleKey: "anamnesis.section.oncological",
|
|
4780
4780
|
t: a,
|
|
4781
4781
|
open: L.oncological,
|
|
4782
|
-
onOpenChange:
|
|
4782
|
+
onOpenChange: k("oncological"),
|
|
4783
4783
|
fill: x.oncological.fill,
|
|
4784
4784
|
children: /* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
4785
|
-
/* @__PURE__ */ t(
|
|
4785
|
+
/* @__PURE__ */ t(O, { label: a("anamnesis.field.tumourType.label"), children: /* @__PURE__ */ t(
|
|
4786
4786
|
ee,
|
|
4787
4787
|
{
|
|
4788
4788
|
value: ka.tumourType ?? "",
|
|
4789
|
-
onChange: (v) =>
|
|
4789
|
+
onChange: (v) => G((b) => ({
|
|
4790
4790
|
...b,
|
|
4791
4791
|
oncological: {
|
|
4792
4792
|
...b.oncological,
|
|
@@ -4795,11 +4795,11 @@ function So({
|
|
|
4795
4795
|
}))
|
|
4796
4796
|
}
|
|
4797
4797
|
) }),
|
|
4798
|
-
/* @__PURE__ */ t(
|
|
4798
|
+
/* @__PURE__ */ t(O, { label: a("anamnesis.field.stage.label"), children: /* @__PURE__ */ t(
|
|
4799
4799
|
ee,
|
|
4800
4800
|
{
|
|
4801
4801
|
value: ka.stage ?? "",
|
|
4802
|
-
onChange: (v) =>
|
|
4802
|
+
onChange: (v) => G((b) => ({
|
|
4803
4803
|
...b,
|
|
4804
4804
|
oncological: {
|
|
4805
4805
|
...b.oncological,
|
|
@@ -4814,15 +4814,15 @@ function So({
|
|
|
4814
4814
|
label: a("anamnesis.field.metastases.label"),
|
|
4815
4815
|
variant: "horizontal",
|
|
4816
4816
|
value: ((Cn = ka.metastases) == null ? void 0 : Cn.present) ?? "unknown",
|
|
4817
|
-
onValueChange: (v) =>
|
|
4818
|
-
var
|
|
4817
|
+
onValueChange: (v) => G((b) => {
|
|
4818
|
+
var R, U;
|
|
4819
4819
|
return {
|
|
4820
4820
|
...b,
|
|
4821
4821
|
oncological: {
|
|
4822
4822
|
...b.oncological,
|
|
4823
4823
|
metastases: {
|
|
4824
4824
|
present: v,
|
|
4825
|
-
site: (
|
|
4825
|
+
site: (U = (R = b.oncological) == null ? void 0 : R.metastases) == null ? void 0 : U.site
|
|
4826
4826
|
}
|
|
4827
4827
|
}
|
|
4828
4828
|
};
|
|
@@ -4841,14 +4841,14 @@ function So({
|
|
|
4841
4841
|
}
|
|
4842
4842
|
),
|
|
4843
4843
|
/* @__PURE__ */ t(
|
|
4844
|
-
|
|
4844
|
+
O,
|
|
4845
4845
|
{
|
|
4846
4846
|
label: a("anamnesis.field.treatmentStatus.label"),
|
|
4847
4847
|
children: /* @__PURE__ */ t(
|
|
4848
4848
|
ee,
|
|
4849
4849
|
{
|
|
4850
4850
|
value: ka.treatmentStatus ?? "",
|
|
4851
|
-
onChange: (v) =>
|
|
4851
|
+
onChange: (v) => G((b) => ({
|
|
4852
4852
|
...b,
|
|
4853
4853
|
oncological: {
|
|
4854
4854
|
...b.oncological,
|
|
@@ -4863,13 +4863,13 @@ function So({
|
|
|
4863
4863
|
}
|
|
4864
4864
|
),
|
|
4865
4865
|
/* @__PURE__ */ t(ge, { titleKey: "anamnesis.section.therapy", t: a, children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
4866
|
-
|
|
4866
|
+
y.therapy.length === 0 ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.noTherapy") }) : y.therapy.map((v) => /* @__PURE__ */ d(
|
|
4867
4867
|
"div",
|
|
4868
4868
|
{
|
|
4869
4869
|
className: "ds:flex ds:flex-wrap ds:items-end ds:gap-[var(--spacing-sm)]",
|
|
4870
4870
|
children: [
|
|
4871
4871
|
/* @__PURE__ */ t("div", { className: "ds:grow", children: /* @__PURE__ */ t(
|
|
4872
|
-
|
|
4872
|
+
O,
|
|
4873
4873
|
{
|
|
4874
4874
|
label: a("anamnesis.field.medName.label"),
|
|
4875
4875
|
children: /* @__PURE__ */ t(
|
|
@@ -4883,7 +4883,7 @@ function So({
|
|
|
4883
4883
|
)
|
|
4884
4884
|
}
|
|
4885
4885
|
) }),
|
|
4886
|
-
/* @__PURE__ */ t(
|
|
4886
|
+
/* @__PURE__ */ t(O, { label: a("anamnesis.field.medDose.label"), children: /* @__PURE__ */ t(
|
|
4887
4887
|
ee,
|
|
4888
4888
|
{
|
|
4889
4889
|
value: v.dose ?? "",
|
|
@@ -4893,7 +4893,7 @@ function So({
|
|
|
4893
4893
|
}
|
|
4894
4894
|
) }),
|
|
4895
4895
|
/* @__PURE__ */ t(
|
|
4896
|
-
|
|
4896
|
+
W,
|
|
4897
4897
|
{
|
|
4898
4898
|
variant: v.kind === "medication" ? "info" : "neutral",
|
|
4899
4899
|
size: "md",
|
|
@@ -4932,17 +4932,17 @@ function So({
|
|
|
4932
4932
|
titleKey: "anamnesis.section.labs",
|
|
4933
4933
|
t: a,
|
|
4934
4934
|
open: L.labs,
|
|
4935
|
-
onOpenChange:
|
|
4935
|
+
onOpenChange: k("labs"),
|
|
4936
4936
|
fill: x.labs.fill,
|
|
4937
4937
|
flagged: x.labs.flagged,
|
|
4938
4938
|
children: /* @__PURE__ */ t(
|
|
4939
4939
|
Ga,
|
|
4940
4940
|
{
|
|
4941
|
-
stripKeys:
|
|
4942
|
-
defs:
|
|
4943
|
-
visit:
|
|
4944
|
-
previous:
|
|
4945
|
-
targets:
|
|
4941
|
+
stripKeys: w,
|
|
4942
|
+
defs: T,
|
|
4943
|
+
visit: y,
|
|
4944
|
+
previous: A,
|
|
4945
|
+
targets: E,
|
|
4946
4946
|
t: a,
|
|
4947
4947
|
onChange: Ye
|
|
4948
4948
|
}
|
|
@@ -4955,9 +4955,9 @@ function So({
|
|
|
4955
4955
|
titleKey: "anamnesis.section.fmd",
|
|
4956
4956
|
t: a,
|
|
4957
4957
|
open: L.fmd,
|
|
4958
|
-
onOpenChange:
|
|
4958
|
+
onOpenChange: k("fmd"),
|
|
4959
4959
|
fill: x.fmd.fill,
|
|
4960
|
-
children:
|
|
4960
|
+
children: y.fmdCycles.length === 0 ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.noFmd") }) : /* @__PURE__ */ t("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: y.fmdCycles.map((v) => /* @__PURE__ */ d(
|
|
4961
4961
|
"li",
|
|
4962
4962
|
{
|
|
4963
4963
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
@@ -4975,7 +4975,7 @@ function So({
|
|
|
4975
4975
|
}
|
|
4976
4976
|
) }),
|
|
4977
4977
|
/* @__PURE__ */ t(
|
|
4978
|
-
|
|
4978
|
+
W,
|
|
4979
4979
|
{
|
|
4980
4980
|
variant: v.completed ? "success" : "warning",
|
|
4981
4981
|
size: "sm",
|
|
@@ -4991,16 +4991,16 @@ function So({
|
|
|
4991
4991
|
),
|
|
4992
4992
|
/* @__PURE__ */ d(ge, { titleKey: "anamnesis.section.proposal", t: a, children: [
|
|
4993
4993
|
/* @__PURE__ */ t(
|
|
4994
|
-
|
|
4994
|
+
O,
|
|
4995
4995
|
{
|
|
4996
4996
|
label: a("anamnesis.field.nutritionalProposal.label"),
|
|
4997
4997
|
children: /* @__PURE__ */ t(
|
|
4998
4998
|
aa,
|
|
4999
4999
|
{
|
|
5000
|
-
value:
|
|
5000
|
+
value: y.nutritionalProposal ?? "",
|
|
5001
5001
|
autoResize: !0,
|
|
5002
5002
|
minRows: 2,
|
|
5003
|
-
onChange: (v) =>
|
|
5003
|
+
onChange: (v) => G((b) => ({
|
|
5004
5004
|
...b,
|
|
5005
5005
|
nutritionalProposal: v.target.value
|
|
5006
5006
|
}))
|
|
@@ -5008,13 +5008,13 @@ function So({
|
|
|
5008
5008
|
)
|
|
5009
5009
|
}
|
|
5010
5010
|
),
|
|
5011
|
-
/* @__PURE__ */ t(
|
|
5011
|
+
/* @__PURE__ */ t(O, { label: a("anamnesis.field.clinicalNotes.label"), children: /* @__PURE__ */ t(
|
|
5012
5012
|
aa,
|
|
5013
5013
|
{
|
|
5014
|
-
value:
|
|
5014
|
+
value: y.clinicalNotes ?? "",
|
|
5015
5015
|
autoResize: !0,
|
|
5016
5016
|
minRows: 2,
|
|
5017
|
-
onChange: (v) =>
|
|
5017
|
+
onChange: (v) => G((b) => ({
|
|
5018
5018
|
...b,
|
|
5019
5019
|
clinicalNotes: v.target.value
|
|
5020
5020
|
}))
|
|
@@ -5027,7 +5027,7 @@ function So({
|
|
|
5027
5027
|
titleKey: "anamnesis.section.annual",
|
|
5028
5028
|
t: a,
|
|
5029
5029
|
open: L.annual,
|
|
5030
|
-
onOpenChange:
|
|
5030
|
+
onOpenChange: k("annual"),
|
|
5031
5031
|
fill: x.annual.fill,
|
|
5032
5032
|
children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
5033
5033
|
/* @__PURE__ */ d(
|
|
@@ -5036,14 +5036,14 @@ function So({
|
|
|
5036
5036
|
label: a("anamnesis.field.annualProposed.label"),
|
|
5037
5037
|
variant: "horizontal",
|
|
5038
5038
|
value: wa.proposed ? "yes" : "no",
|
|
5039
|
-
onValueChange: (v) =>
|
|
5040
|
-
var
|
|
5039
|
+
onValueChange: (v) => G((b) => {
|
|
5040
|
+
var R, U;
|
|
5041
5041
|
return {
|
|
5042
5042
|
...b,
|
|
5043
5043
|
annualProgramme: {
|
|
5044
5044
|
proposed: v === "yes",
|
|
5045
|
-
accepted: ((
|
|
5046
|
-
declineReason: (
|
|
5045
|
+
accepted: ((R = b.annualProgramme) == null ? void 0 : R.accepted) ?? !1,
|
|
5046
|
+
declineReason: (U = b.annualProgramme) == null ? void 0 : U.declineReason
|
|
5047
5047
|
}
|
|
5048
5048
|
};
|
|
5049
5049
|
}),
|
|
@@ -5059,14 +5059,14 @@ function So({
|
|
|
5059
5059
|
label: a("anamnesis.field.annualAccepted.label"),
|
|
5060
5060
|
variant: "horizontal",
|
|
5061
5061
|
value: wa.accepted ? "yes" : "no",
|
|
5062
|
-
onValueChange: (v) =>
|
|
5063
|
-
var
|
|
5062
|
+
onValueChange: (v) => G((b) => {
|
|
5063
|
+
var R, U;
|
|
5064
5064
|
return {
|
|
5065
5065
|
...b,
|
|
5066
5066
|
annualProgramme: {
|
|
5067
|
-
proposed: ((
|
|
5067
|
+
proposed: ((R = b.annualProgramme) == null ? void 0 : R.proposed) ?? !1,
|
|
5068
5068
|
accepted: v === "yes",
|
|
5069
|
-
declineReason: (
|
|
5069
|
+
declineReason: (U = b.annualProgramme) == null ? void 0 : U.declineReason
|
|
5070
5070
|
}
|
|
5071
5071
|
};
|
|
5072
5072
|
}),
|
|
@@ -5077,7 +5077,7 @@ function So({
|
|
|
5077
5077
|
}
|
|
5078
5078
|
),
|
|
5079
5079
|
wa.accepted ? null : /* @__PURE__ */ t(
|
|
5080
|
-
|
|
5080
|
+
O,
|
|
5081
5081
|
{
|
|
5082
5082
|
label: a("anamnesis.field.annualDeclineReason.label"),
|
|
5083
5083
|
children: /* @__PURE__ */ t(
|
|
@@ -5086,13 +5086,13 @@ function So({
|
|
|
5086
5086
|
value: wa.declineReason ?? "",
|
|
5087
5087
|
autoResize: !0,
|
|
5088
5088
|
minRows: 2,
|
|
5089
|
-
onChange: (v) =>
|
|
5090
|
-
var
|
|
5089
|
+
onChange: (v) => G((b) => {
|
|
5090
|
+
var R, U;
|
|
5091
5091
|
return {
|
|
5092
5092
|
...b,
|
|
5093
5093
|
annualProgramme: {
|
|
5094
|
-
proposed: ((
|
|
5095
|
-
accepted: ((
|
|
5094
|
+
proposed: ((R = b.annualProgramme) == null ? void 0 : R.proposed) ?? !1,
|
|
5095
|
+
accepted: ((U = b.annualProgramme) == null ? void 0 : U.accepted) ?? !1,
|
|
5096
5096
|
declineReason: v.target.value
|
|
5097
5097
|
}
|
|
5098
5098
|
};
|
|
@@ -5142,46 +5142,47 @@ function Ao({
|
|
|
5142
5142
|
t: a,
|
|
5143
5143
|
embedded: n = !1,
|
|
5144
5144
|
config: i,
|
|
5145
|
-
defaultOpenSection: s
|
|
5145
|
+
defaultOpenSection: s,
|
|
5146
|
+
onSubmit: o
|
|
5146
5147
|
}) {
|
|
5147
|
-
const { patient:
|
|
5148
|
+
const { patient: r } = e, l = za(e), [c, m] = $(() => Eo(e)), [p, g] = $(
|
|
5148
5149
|
() => {
|
|
5149
|
-
var
|
|
5150
|
-
return ((
|
|
5150
|
+
var k;
|
|
5151
|
+
return ((k = e.intake) == null ? void 0 : k.submittedAtIso) != null;
|
|
5151
5152
|
}
|
|
5152
|
-
), [
|
|
5153
|
-
|
|
5154
|
-
},
|
|
5155
|
-
() => cn(i).map((
|
|
5156
|
-
...
|
|
5157
|
-
fields:
|
|
5158
|
-
})).filter((
|
|
5159
|
-
[i,
|
|
5160
|
-
), [
|
|
5153
|
+
), [h, N] = $(!1), S = (k, _) => {
|
|
5154
|
+
m((B) => ({ ...B, [k]: _ })), g(!1);
|
|
5155
|
+
}, f = M(
|
|
5156
|
+
() => cn(i).map((k) => ({
|
|
5157
|
+
...k,
|
|
5158
|
+
fields: k.fields.filter((_) => sa(_, r.sex))
|
|
5159
|
+
})).filter((k) => k.fields.length > 0),
|
|
5160
|
+
[i, r.sex]
|
|
5161
|
+
), [C, y] = $(
|
|
5161
5162
|
() => {
|
|
5162
|
-
var
|
|
5163
|
-
return s ?? ((
|
|
5163
|
+
var k;
|
|
5164
|
+
return s ?? ((k = f[0]) == null ? void 0 : k.key) ?? "";
|
|
5164
5165
|
}
|
|
5165
|
-
), { containerRef:
|
|
5166
|
+
), { containerRef: A, requestJump: E } = et(), P = M(
|
|
5166
5167
|
() => Zn(
|
|
5167
|
-
|
|
5168
|
-
(
|
|
5169
|
-
|
|
5168
|
+
f,
|
|
5169
|
+
(k) => c[k],
|
|
5170
|
+
r.sex,
|
|
5170
5171
|
a
|
|
5171
5172
|
),
|
|
5172
|
-
[
|
|
5173
|
-
),
|
|
5174
|
-
|
|
5175
|
-
}, { answeredCount:
|
|
5176
|
-
let
|
|
5177
|
-
for (const
|
|
5178
|
-
for (const
|
|
5179
|
-
|
|
5180
|
-
return { answeredCount:
|
|
5181
|
-
}, [
|
|
5182
|
-
answered:
|
|
5183
|
-
total:
|
|
5184
|
-
}),
|
|
5173
|
+
[f, c, r.sex, a]
|
|
5174
|
+
), I = (k) => {
|
|
5175
|
+
y(k.sectionKey), E(k.key);
|
|
5176
|
+
}, { answeredCount: T, totalCount: u } = M(() => {
|
|
5177
|
+
let k = 0, _ = 0;
|
|
5178
|
+
for (const B of f)
|
|
5179
|
+
for (const H of B.fields)
|
|
5180
|
+
_ += 1, fa(c[H.key]) && (k += 1);
|
|
5181
|
+
return { answeredCount: k, totalCount: _ };
|
|
5182
|
+
}, [f, c]), w = u === 0 ? 0 : Math.round(T / u * 100), x = a("anamnesis.intake.answered", {
|
|
5183
|
+
answered: T,
|
|
5184
|
+
total: u
|
|
5185
|
+
}), L = P.length > 0 && (T > 0 || h || p), V = /* @__PURE__ */ d(Ie, { children: [
|
|
5185
5186
|
n ? null : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
5186
5187
|
/* @__PURE__ */ t("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: a("anamnesis.intake.title") }),
|
|
5187
5188
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.intake.subtitle") })
|
|
@@ -5190,12 +5191,12 @@ function Ao({
|
|
|
5190
5191
|
/* @__PURE__ */ d(F.Row, { children: [
|
|
5191
5192
|
/* @__PURE__ */ t(F.Term, { children: a("anamnesis.header.name") }),
|
|
5192
5193
|
/* @__PURE__ */ d(F.Detail, { children: [
|
|
5193
|
-
|
|
5194
|
+
r.firstName,
|
|
5194
5195
|
" ",
|
|
5195
|
-
|
|
5196
|
+
r.lastName
|
|
5196
5197
|
] })
|
|
5197
5198
|
] }),
|
|
5198
|
-
|
|
5199
|
+
l ? /* @__PURE__ */ d(F.Row, { children: [
|
|
5199
5200
|
/* @__PURE__ */ t(F.Term, { children: a("anamnesis.header.age") }),
|
|
5200
5201
|
/* @__PURE__ */ t(F.Detail, { children: $a(e, a) })
|
|
5201
5202
|
] }) : null,
|
|
@@ -5204,19 +5205,19 @@ function Ao({
|
|
|
5204
5205
|
/* @__PURE__ */ t(F.Detail, { children: /* @__PURE__ */ t(
|
|
5205
5206
|
ta,
|
|
5206
5207
|
{
|
|
5207
|
-
value:
|
|
5208
|
+
value: r.dateOfBirthIso,
|
|
5208
5209
|
format: "absolute",
|
|
5209
5210
|
shape: "bare",
|
|
5210
5211
|
absoluteFormat: We
|
|
5211
5212
|
}
|
|
5212
5213
|
) })
|
|
5213
5214
|
] }),
|
|
5214
|
-
|
|
5215
|
+
l ? /* @__PURE__ */ d(F.Row, { children: [
|
|
5215
5216
|
/* @__PURE__ */ t(F.Term, { children: a("anamnesis.header.visitDate") }),
|
|
5216
5217
|
/* @__PURE__ */ t(F.Detail, { children: /* @__PURE__ */ t(
|
|
5217
5218
|
ta,
|
|
5218
5219
|
{
|
|
5219
|
-
value:
|
|
5220
|
+
value: l.dateIso,
|
|
5220
5221
|
format: "absolute",
|
|
5221
5222
|
shape: "bare",
|
|
5222
5223
|
absoluteFormat: We
|
|
@@ -5225,33 +5226,33 @@ function Ao({
|
|
|
5225
5226
|
] }) : null
|
|
5226
5227
|
] }),
|
|
5227
5228
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
5228
|
-
/* @__PURE__ */ t(ai, { value:
|
|
5229
|
+
/* @__PURE__ */ t(ai, { value: w, ariaLabel: x }),
|
|
5229
5230
|
/* @__PURE__ */ t(
|
|
5230
5231
|
"p",
|
|
5231
5232
|
{
|
|
5232
5233
|
className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]",
|
|
5233
5234
|
"aria-live": "polite",
|
|
5234
|
-
children:
|
|
5235
|
+
children: x
|
|
5235
5236
|
}
|
|
5236
5237
|
)
|
|
5237
5238
|
] }),
|
|
5238
|
-
|
|
5239
|
+
L ? /* @__PURE__ */ t(
|
|
5239
5240
|
at,
|
|
5240
5241
|
{
|
|
5241
|
-
missing:
|
|
5242
|
+
missing: P,
|
|
5242
5243
|
t: a,
|
|
5243
|
-
onJump:
|
|
5244
|
+
onJump: I,
|
|
5244
5245
|
announce: "off"
|
|
5245
5246
|
}
|
|
5246
5247
|
) : null,
|
|
5247
|
-
/* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { ref:
|
|
5248
|
+
/* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { ref: A, children: /* @__PURE__ */ d(
|
|
5248
5249
|
"section",
|
|
5249
5250
|
{
|
|
5250
5251
|
"aria-label": a("anamnesis.intake.sectionsLabel"),
|
|
5251
5252
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
5252
5253
|
children: [
|
|
5253
5254
|
/* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]", children: a("anamnesis.intake.sectionsLabel") }),
|
|
5254
|
-
|
|
5255
|
+
f.length === 0 ? /* @__PURE__ */ t(
|
|
5255
5256
|
Qe,
|
|
5256
5257
|
{
|
|
5257
5258
|
variant: "first-use",
|
|
@@ -5265,31 +5266,31 @@ function Ao({
|
|
|
5265
5266
|
type: "single",
|
|
5266
5267
|
collapsible: !0,
|
|
5267
5268
|
variant: "default",
|
|
5268
|
-
value:
|
|
5269
|
-
onValueChange:
|
|
5270
|
-
children:
|
|
5271
|
-
const
|
|
5272
|
-
(
|
|
5269
|
+
value: C,
|
|
5270
|
+
onValueChange: y,
|
|
5271
|
+
children: f.map((k) => {
|
|
5272
|
+
const _ = k.fields.filter(
|
|
5273
|
+
(B) => fa(c[B.key])
|
|
5273
5274
|
).length;
|
|
5274
|
-
return /* @__PURE__ */ d(Jt, { value:
|
|
5275
|
+
return /* @__PURE__ */ d(Jt, { value: k.key, children: [
|
|
5275
5276
|
/* @__PURE__ */ t(Zt, { 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: [
|
|
5276
|
-
/* @__PURE__ */ t("span", { children: me(
|
|
5277
|
+
/* @__PURE__ */ t("span", { children: me(k, a) }),
|
|
5277
5278
|
/* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.intake.sectionProgress", {
|
|
5278
|
-
answered:
|
|
5279
|
-
total:
|
|
5279
|
+
answered: _,
|
|
5280
|
+
total: k.fields.length
|
|
5280
5281
|
}) })
|
|
5281
5282
|
] }) }),
|
|
5282
|
-
/* @__PURE__ */ t(ei, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children:
|
|
5283
|
+
/* @__PURE__ */ t(ei, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: k.fields.map((B) => /* @__PURE__ */ t(
|
|
5283
5284
|
Ct,
|
|
5284
5285
|
{
|
|
5285
|
-
def:
|
|
5286
|
-
answer:
|
|
5287
|
-
onChange: (
|
|
5286
|
+
def: B,
|
|
5287
|
+
answer: c[B.key],
|
|
5288
|
+
onChange: (H) => S(B.key, H),
|
|
5288
5289
|
t: a
|
|
5289
5290
|
},
|
|
5290
|
-
|
|
5291
|
+
B.key
|
|
5291
5292
|
)) }) })
|
|
5292
|
-
] },
|
|
5293
|
+
] }, k.key);
|
|
5293
5294
|
})
|
|
5294
5295
|
}
|
|
5295
5296
|
)
|
|
@@ -5302,7 +5303,7 @@ function Ao({
|
|
|
5302
5303
|
{
|
|
5303
5304
|
className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]",
|
|
5304
5305
|
"aria-live": "polite",
|
|
5305
|
-
children: a(
|
|
5306
|
+
children: a(h ? "anamnesis.intake.submittedNotice" : p ? "anamnesis.intake.savedNotice" : "anamnesis.intake.unsavedNotice")
|
|
5306
5307
|
}
|
|
5307
5308
|
),
|
|
5308
5309
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
@@ -5312,7 +5313,7 @@ function Ao({
|
|
|
5312
5313
|
intent: "outline",
|
|
5313
5314
|
startIcon: /* @__PURE__ */ t(oi, { "aria-hidden": "true" }),
|
|
5314
5315
|
"data-testid": "anamnesis-intake-save",
|
|
5315
|
-
onClick: () =>
|
|
5316
|
+
onClick: () => g(!0),
|
|
5316
5317
|
children: a("anamnesis.intake.saveAndContinue")
|
|
5317
5318
|
}
|
|
5318
5319
|
),
|
|
@@ -5323,7 +5324,7 @@ function Ao({
|
|
|
5323
5324
|
startIcon: /* @__PURE__ */ t(li, { "aria-hidden": "true" }),
|
|
5324
5325
|
"data-testid": "anamnesis-intake-submit",
|
|
5325
5326
|
onClick: () => {
|
|
5326
|
-
|
|
5327
|
+
N(!0), o == null || o(c), g(!0);
|
|
5327
5328
|
},
|
|
5328
5329
|
children: a("anamnesis.intake.submit")
|
|
5329
5330
|
}
|
|
@@ -5331,7 +5332,7 @@ function Ao({
|
|
|
5331
5332
|
] })
|
|
5332
5333
|
] })
|
|
5333
5334
|
] });
|
|
5334
|
-
return n ? /* @__PURE__ */ t("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-lg)]", children:
|
|
5335
|
+
return n ? /* @__PURE__ */ t("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-lg)]", children: V }) : /* @__PURE__ */ t("div", { className: "ds:min-h-[100dvh] ds:w-full ds:bg-[color:var(--app-shell-background)] ds:py-[var(--spacing-xl)]", children: /* @__PURE__ */ t("div", { className: "ds:mx-auto ds:flex ds:w-full ds:max-w-[48rem] ds:flex-col ds:gap-[var(--spacing-lg)] ds:px-[var(--spacing-md)]", children: V }) });
|
|
5335
5336
|
}
|
|
5336
5337
|
function xe({
|
|
5337
5338
|
titleKey: e,
|
|
@@ -5377,8 +5378,8 @@ function Do({
|
|
|
5377
5378
|
onOpenNote: s
|
|
5378
5379
|
}) {
|
|
5379
5380
|
const { patient: o, visits: r } = e, l = r[r.length - 1], c = r.length > 1 ? r[r.length - 2] : void 0, m = new Map(
|
|
5380
|
-
e.targets.map((
|
|
5381
|
-
), p = Me(i, "anthropometric"), g = Me(i, "dietary"), h = Me(i, "lab"), N = na(i),
|
|
5381
|
+
e.targets.map((A) => [A.parameterKey, A.target])
|
|
5382
|
+
), p = Me(i, "anthropometric"), g = Me(i, "dietary"), h = Me(i, "lab"), N = na(i), S = _a(i);
|
|
5382
5383
|
if (!l)
|
|
5383
5384
|
return /* @__PURE__ */ t(qn, { embedded: n, children: /* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { children: /* @__PURE__ */ t(
|
|
5384
5385
|
Qe,
|
|
@@ -5389,7 +5390,7 @@ function Do({
|
|
|
5389
5390
|
description: a("anamnesis.empty.noRecord.description")
|
|
5390
5391
|
}
|
|
5391
5392
|
) }) }) });
|
|
5392
|
-
const
|
|
5393
|
+
const f = l.oncological, C = l.annualProgramme, y = /* @__PURE__ */ d(Ie, { children: [
|
|
5393
5394
|
n ? null : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
5394
5395
|
/* @__PURE__ */ d("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: [
|
|
5395
5396
|
o.firstName,
|
|
@@ -5457,47 +5458,47 @@ function Do({
|
|
|
5457
5458
|
t: a
|
|
5458
5459
|
}
|
|
5459
5460
|
) }) : null,
|
|
5460
|
-
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.pathologies", t: a, children: l.pathologyCodes.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: l.pathologyCodes.map((
|
|
5461
|
-
|
|
5461
|
+
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.pathologies", t: a, children: l.pathologyCodes.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: l.pathologyCodes.map((A) => /* @__PURE__ */ t(W, { variant: "neutral", size: "md", children: Se(A, a, S[A]) }, A)) }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.readOnly.none") }) }),
|
|
5462
|
+
f ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.oncological", t: a, children: /* @__PURE__ */ d(
|
|
5462
5463
|
F,
|
|
5463
5464
|
{
|
|
5464
5465
|
layout: "inline",
|
|
5465
5466
|
labelWidth: "fixed",
|
|
5466
5467
|
divider: "between",
|
|
5467
5468
|
children: [
|
|
5468
|
-
|
|
5469
|
+
f.tumourType ? /* @__PURE__ */ d(F.Row, { children: [
|
|
5469
5470
|
/* @__PURE__ */ t(F.Term, { children: a("anamnesis.field.tumourType.label") }),
|
|
5470
|
-
/* @__PURE__ */ t(F.Detail, { children:
|
|
5471
|
+
/* @__PURE__ */ t(F.Detail, { children: f.tumourType })
|
|
5471
5472
|
] }) : null,
|
|
5472
|
-
|
|
5473
|
+
f.stage ? /* @__PURE__ */ d(F.Row, { children: [
|
|
5473
5474
|
/* @__PURE__ */ t(F.Term, { children: a("anamnesis.field.stage.label") }),
|
|
5474
|
-
/* @__PURE__ */ t(F.Detail, { children:
|
|
5475
|
+
/* @__PURE__ */ t(F.Detail, { children: f.stage })
|
|
5475
5476
|
] }) : null,
|
|
5476
|
-
|
|
5477
|
+
f.treatmentStatus ? /* @__PURE__ */ d(F.Row, { children: [
|
|
5477
5478
|
/* @__PURE__ */ t(F.Term, { children: a("anamnesis.field.treatmentStatus.label") }),
|
|
5478
|
-
/* @__PURE__ */ t(F.Detail, { children:
|
|
5479
|
+
/* @__PURE__ */ t(F.Detail, { children: f.treatmentStatus })
|
|
5479
5480
|
] }) : null
|
|
5480
5481
|
]
|
|
5481
5482
|
}
|
|
5482
5483
|
) }) : null,
|
|
5483
|
-
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.therapy", t: a, children: l.therapy.length > 0 ? /* @__PURE__ */ t("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: l.therapy.map((
|
|
5484
|
+
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.therapy", t: a, children: l.therapy.length > 0 ? /* @__PURE__ */ t("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: l.therapy.map((A) => /* @__PURE__ */ d(
|
|
5484
5485
|
"li",
|
|
5485
5486
|
{
|
|
5486
5487
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
5487
5488
|
children: [
|
|
5488
|
-
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children:
|
|
5489
|
-
|
|
5489
|
+
/* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: A.name }),
|
|
5490
|
+
A.dose ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: A.dose }) : null,
|
|
5490
5491
|
/* @__PURE__ */ t(
|
|
5491
|
-
|
|
5492
|
+
W,
|
|
5492
5493
|
{
|
|
5493
|
-
variant:
|
|
5494
|
+
variant: A.kind === "medication" ? "info" : "neutral",
|
|
5494
5495
|
size: "sm",
|
|
5495
|
-
children: a(`anamnesis.medKind.${
|
|
5496
|
+
children: a(`anamnesis.medKind.${A.kind}`)
|
|
5496
5497
|
}
|
|
5497
5498
|
)
|
|
5498
5499
|
]
|
|
5499
5500
|
},
|
|
5500
|
-
|
|
5501
|
+
A.id
|
|
5501
5502
|
)) }) : /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.readOnly.none") }) }),
|
|
5502
5503
|
/* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.labs", t: a, children: /* @__PURE__ */ t(
|
|
5503
5504
|
Wa,
|
|
@@ -5521,7 +5522,7 @@ function Do({
|
|
|
5521
5522
|
] }) : null,
|
|
5522
5523
|
C ? /* @__PURE__ */ t(xe, { titleKey: "anamnesis.section.annual", t: a, children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: [
|
|
5523
5524
|
/* @__PURE__ */ d(
|
|
5524
|
-
|
|
5525
|
+
W,
|
|
5525
5526
|
{
|
|
5526
5527
|
variant: C.proposed ? "success" : "neutral",
|
|
5527
5528
|
size: "md",
|
|
@@ -5535,7 +5536,7 @@ function Do({
|
|
|
5535
5536
|
}
|
|
5536
5537
|
),
|
|
5537
5538
|
/* @__PURE__ */ d(
|
|
5538
|
-
|
|
5539
|
+
W,
|
|
5539
5540
|
{
|
|
5540
5541
|
variant: C.accepted ? "success" : "neutral",
|
|
5541
5542
|
size: "md",
|
|
@@ -5570,7 +5571,7 @@ function Do({
|
|
|
5570
5571
|
) })
|
|
5571
5572
|
] }) })
|
|
5572
5573
|
] });
|
|
5573
|
-
return /* @__PURE__ */ t(qn, { embedded: n, children:
|
|
5574
|
+
return /* @__PURE__ */ t(qn, { embedded: n, children: y });
|
|
5574
5575
|
}
|
|
5575
5576
|
function qn({
|
|
5576
5577
|
embedded: e,
|
|
@@ -5589,18 +5590,20 @@ function jr({
|
|
|
5589
5590
|
hideTargetStrip: l,
|
|
5590
5591
|
statusSlot: c,
|
|
5591
5592
|
onOpenNote: m,
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5593
|
+
onIntakeSubmit: p,
|
|
5594
|
+
defaultView: g,
|
|
5595
|
+
defaultExportMenuOpen: h,
|
|
5596
|
+
defaultShareOpen: N,
|
|
5597
|
+
defaultExportAudience: S
|
|
5596
5598
|
}) {
|
|
5597
|
-
const
|
|
5599
|
+
const f = e === "intake" ? /* @__PURE__ */ t(
|
|
5598
5600
|
Ao,
|
|
5599
5601
|
{
|
|
5600
5602
|
record: a,
|
|
5601
5603
|
t: n,
|
|
5602
5604
|
embedded: s,
|
|
5603
|
-
config: o
|
|
5605
|
+
config: o,
|
|
5606
|
+
onSubmit: p
|
|
5604
5607
|
}
|
|
5605
5608
|
) : e === "compile" ? /* @__PURE__ */ t(
|
|
5606
5609
|
So,
|
|
@@ -5613,10 +5616,10 @@ function jr({
|
|
|
5613
5616
|
hideTargetStrip: l,
|
|
5614
5617
|
statusSlot: c,
|
|
5615
5618
|
onOpenNote: m,
|
|
5616
|
-
defaultView:
|
|
5617
|
-
defaultExportMenuOpen:
|
|
5618
|
-
defaultShareOpen:
|
|
5619
|
-
defaultExportAudience:
|
|
5619
|
+
defaultView: g,
|
|
5620
|
+
defaultExportMenuOpen: h,
|
|
5621
|
+
defaultShareOpen: N,
|
|
5622
|
+
defaultExportAudience: S
|
|
5620
5623
|
}
|
|
5621
5624
|
) : /* @__PURE__ */ t(
|
|
5622
5625
|
Do,
|
|
@@ -5634,7 +5637,7 @@ function jr({
|
|
|
5634
5637
|
"data-component": i,
|
|
5635
5638
|
"data-mode": e,
|
|
5636
5639
|
className: "ds:w-full",
|
|
5637
|
-
children:
|
|
5640
|
+
children: f
|
|
5638
5641
|
}
|
|
5639
5642
|
) : /* @__PURE__ */ t(
|
|
5640
5643
|
"main",
|
|
@@ -5645,7 +5648,7 @@ function jr({
|
|
|
5645
5648
|
mode: n(`anamnesis.mode.${e}`)
|
|
5646
5649
|
}),
|
|
5647
5650
|
className: "ds:w-full",
|
|
5648
|
-
children:
|
|
5651
|
+
children: f
|
|
5649
5652
|
}
|
|
5650
5653
|
);
|
|
5651
5654
|
}
|
|
@@ -5710,62 +5713,62 @@ function Wr({
|
|
|
5710
5713
|
t: n,
|
|
5711
5714
|
dataComponent: i = "anamnesis-config-editor"
|
|
5712
5715
|
}) {
|
|
5713
|
-
const [s, o] =
|
|
5716
|
+
const [s, o] = $(null), [r, l] = $(null), c = (u) => a({ ...e, parameters: e.parameters.map(u) }), m = (u) => a({
|
|
5714
5717
|
...e,
|
|
5715
5718
|
intakeSections: e.intakeSections.map(u)
|
|
5716
|
-
}), p = (u,
|
|
5719
|
+
}), p = (u, w, x) => m(
|
|
5717
5720
|
(L) => L.key === u ? {
|
|
5718
5721
|
...L,
|
|
5719
5722
|
fields: L.fields.map(
|
|
5720
|
-
(
|
|
5723
|
+
(V) => V.key === w ? x(V) : V
|
|
5721
5724
|
)
|
|
5722
5725
|
} : L
|
|
5723
|
-
), g = (u) => a({ ...e, pathologies: e.pathologies.map(u) }), h = (u,
|
|
5724
|
-
const L = Me(e, u),
|
|
5725
|
-
if (!
|
|
5726
|
-
const
|
|
5727
|
-
[...
|
|
5726
|
+
), g = (u) => a({ ...e, pathologies: e.pathologies.map(u) }), h = (u, w, x) => {
|
|
5727
|
+
const L = Me(e, u), V = Ya(L, w, x);
|
|
5728
|
+
if (!V) return;
|
|
5729
|
+
const k = Io(V), _ = new Map(
|
|
5730
|
+
[...k].map(([B, H]) => [B.key, H])
|
|
5728
5731
|
);
|
|
5729
5732
|
c(
|
|
5730
|
-
(
|
|
5733
|
+
(B) => _.has(B.key) ? { ...B, order: _.get(B.key) } : B
|
|
5731
5734
|
);
|
|
5732
|
-
}, N = (u,
|
|
5733
|
-
const x = na(e), L = Ya(x, u,
|
|
5735
|
+
}, N = (u, w) => {
|
|
5736
|
+
const x = na(e), L = Ya(x, u, w);
|
|
5734
5737
|
if (!L) return;
|
|
5735
|
-
const
|
|
5738
|
+
const V = new Map(L.map((k, _) => [k.key, _]));
|
|
5736
5739
|
m(
|
|
5737
|
-
(
|
|
5740
|
+
(k) => V.has(k.key) ? { ...k, order: V.get(k.key) } : k
|
|
5738
5741
|
);
|
|
5739
|
-
},
|
|
5740
|
-
const L = Ya(u.fields,
|
|
5742
|
+
}, S = (u, w, x) => {
|
|
5743
|
+
const L = Ya(u.fields, w, x);
|
|
5741
5744
|
if (!L) return;
|
|
5742
|
-
const
|
|
5745
|
+
const V = new Map(L.map((k, _) => [k.key, _]));
|
|
5743
5746
|
m(
|
|
5744
|
-
(
|
|
5745
|
-
...
|
|
5746
|
-
fields:
|
|
5747
|
-
(
|
|
5747
|
+
(k) => k.key === u.key ? {
|
|
5748
|
+
...k,
|
|
5749
|
+
fields: k.fields.map(
|
|
5750
|
+
(_) => V.has(_.key) ? { ..._, order: V.get(_.key) } : _
|
|
5748
5751
|
)
|
|
5749
|
-
} :
|
|
5752
|
+
} : k
|
|
5750
5753
|
);
|
|
5751
|
-
},
|
|
5754
|
+
}, f = (u, w) => {
|
|
5752
5755
|
u.kind === "parameter" ? c(
|
|
5753
|
-
(x) => x.key === u.entry.key ? { ...x, enabled:
|
|
5756
|
+
(x) => x.key === u.entry.key ? { ...x, enabled: w } : x
|
|
5754
5757
|
) : u.kind === "section" ? m(
|
|
5755
|
-
(x) => x.key === u.entry.key ? { ...x, enabled:
|
|
5758
|
+
(x) => x.key === u.entry.key ? { ...x, enabled: w } : x
|
|
5756
5759
|
) : u.kind === "field" ? p(u.sectionKey, u.entry.key, (x) => ({
|
|
5757
5760
|
...x,
|
|
5758
|
-
enabled:
|
|
5761
|
+
enabled: w
|
|
5759
5762
|
})) : g(
|
|
5760
|
-
(x) => x.code === u.entry.code ? { ...x, enabled:
|
|
5763
|
+
(x) => x.code === u.entry.code ? { ...x, enabled: w } : x
|
|
5761
5764
|
);
|
|
5762
|
-
}, C = Ne(e).length,
|
|
5763
|
-
(u,
|
|
5765
|
+
}, C = Ne(e).length, y = Me(e).length, A = cn(e).reduce(
|
|
5766
|
+
(u, w) => u + w.fields.length,
|
|
5764
5767
|
0
|
|
5765
|
-
),
|
|
5766
|
-
(u,
|
|
5768
|
+
), E = na(e).reduce(
|
|
5769
|
+
(u, w) => u + w.fields.length,
|
|
5767
5770
|
0
|
|
5768
|
-
),
|
|
5771
|
+
), P = Wn(e).length, I = Za(e).length, T = Ne(e).filter(
|
|
5769
5772
|
(u) => u.goal === !0
|
|
5770
5773
|
).length;
|
|
5771
5774
|
return /* @__PURE__ */ d(
|
|
@@ -5788,16 +5791,16 @@ function Wr({
|
|
|
5788
5791
|
] }),
|
|
5789
5792
|
/* @__PURE__ */ t(ie.Content, { value: "questionnaire", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
|
|
5790
5793
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${n("anamnesis.configEditor.panelLive", {
|
|
5791
|
-
count:
|
|
5794
|
+
count: A
|
|
5792
5795
|
})} · ${n("anamnesis.configEditor.panelNotCaptured", {
|
|
5793
5796
|
// Not "archived": this also counts live questions inside
|
|
5794
5797
|
// an archived section, which capture drops as a whole.
|
|
5795
|
-
count:
|
|
5798
|
+
count: E - A
|
|
5796
5799
|
})}` }),
|
|
5797
5800
|
na(e).map(
|
|
5798
|
-
(u,
|
|
5799
|
-
const L = u.enabled === !1,
|
|
5800
|
-
(
|
|
5801
|
+
(u, w, x) => {
|
|
5802
|
+
const L = u.enabled === !1, V = u.fields.filter(
|
|
5803
|
+
(k) => k.enabled !== !1
|
|
5801
5804
|
).length;
|
|
5802
5805
|
return /* @__PURE__ */ d(
|
|
5803
5806
|
"section",
|
|
@@ -5807,7 +5810,7 @@ function Wr({
|
|
|
5807
5810
|
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
5808
5811
|
/* @__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: [
|
|
5809
5812
|
me(u, n),
|
|
5810
|
-
L ? /* @__PURE__ */ t(
|
|
5813
|
+
L ? /* @__PURE__ */ t(W, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
|
|
5811
5814
|
] }),
|
|
5812
5815
|
/* @__PURE__ */ d(
|
|
5813
5816
|
Na,
|
|
@@ -5825,8 +5828,8 @@ function Wr({
|
|
|
5825
5828
|
"aria-label": n("anamnesis.configEditor.moveUp", {
|
|
5826
5829
|
name: me(u, n)
|
|
5827
5830
|
}),
|
|
5828
|
-
disabled:
|
|
5829
|
-
onClick: () => N(
|
|
5831
|
+
disabled: w === 0,
|
|
5832
|
+
onClick: () => N(w, -1)
|
|
5830
5833
|
}
|
|
5831
5834
|
),
|
|
5832
5835
|
/* @__PURE__ */ t(
|
|
@@ -5838,8 +5841,8 @@ function Wr({
|
|
|
5838
5841
|
"aria-label": n("anamnesis.configEditor.moveDown", {
|
|
5839
5842
|
name: me(u, n)
|
|
5840
5843
|
}),
|
|
5841
|
-
disabled:
|
|
5842
|
-
onClick: () => N(
|
|
5844
|
+
disabled: w === x.length - 1,
|
|
5845
|
+
onClick: () => N(w, 1)
|
|
5843
5846
|
}
|
|
5844
5847
|
),
|
|
5845
5848
|
/* @__PURE__ */ t(
|
|
@@ -5864,7 +5867,7 @@ function Wr({
|
|
|
5864
5867
|
"anamnesis.configEditor.restore",
|
|
5865
5868
|
{ name: me(u, n) }
|
|
5866
5869
|
),
|
|
5867
|
-
onClick: () =>
|
|
5870
|
+
onClick: () => f(
|
|
5868
5871
|
{ kind: "section", entry: u },
|
|
5869
5872
|
void 0
|
|
5870
5873
|
)
|
|
@@ -5879,7 +5882,7 @@ function Wr({
|
|
|
5879
5882
|
"anamnesis.configEditor.archive",
|
|
5880
5883
|
{ name: me(u, n) }
|
|
5881
5884
|
),
|
|
5882
|
-
onClick: () =>
|
|
5885
|
+
onClick: () => f(
|
|
5883
5886
|
{ kind: "section", entry: u },
|
|
5884
5887
|
!1
|
|
5885
5888
|
)
|
|
@@ -5889,27 +5892,27 @@ function Wr({
|
|
|
5889
5892
|
}
|
|
5890
5893
|
)
|
|
5891
5894
|
] }),
|
|
5892
|
-
|
|
5893
|
-
u.fields.length > 0 ? /* @__PURE__ */ t(Ze, { divider: "divided", children: u.fields.map((
|
|
5895
|
+
V === 0 && !L ? /* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.configEditor.sectionEmptyCapture") }) : null,
|
|
5896
|
+
u.fields.length > 0 ? /* @__PURE__ */ t(Ze, { divider: "divided", children: u.fields.map((k, _) => /* @__PURE__ */ t(
|
|
5894
5897
|
Ze.Item,
|
|
5895
5898
|
{
|
|
5896
5899
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
5897
|
-
de(
|
|
5898
|
-
|
|
5900
|
+
de(k, n),
|
|
5901
|
+
k.required === !0 ? /* @__PURE__ */ t(W, { size: "sm", variant: "info", children: n(
|
|
5899
5902
|
"anamnesis.configEditor.requiredBadge"
|
|
5900
5903
|
) }) : null,
|
|
5901
|
-
|
|
5904
|
+
k.enabled === !1 ? /* @__PURE__ */ t(W, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
|
|
5902
5905
|
] }),
|
|
5903
5906
|
description: [
|
|
5904
|
-
St(
|
|
5905
|
-
Jn(
|
|
5907
|
+
St(k, n),
|
|
5908
|
+
Jn(k, n)
|
|
5906
5909
|
].filter(Boolean).join(" · "),
|
|
5907
5910
|
trailing: /* @__PURE__ */ d(
|
|
5908
5911
|
Na,
|
|
5909
5912
|
{
|
|
5910
5913
|
"aria-label": n(
|
|
5911
5914
|
"anamnesis.configEditor.rowActions",
|
|
5912
|
-
{ name: de(
|
|
5915
|
+
{ name: de(k, n) }
|
|
5913
5916
|
),
|
|
5914
5917
|
children: [
|
|
5915
5918
|
/* @__PURE__ */ t(
|
|
@@ -5920,10 +5923,10 @@ function Wr({
|
|
|
5920
5923
|
icon: /* @__PURE__ */ t(ua, { "aria-hidden": "true" }),
|
|
5921
5924
|
"aria-label": n(
|
|
5922
5925
|
"anamnesis.configEditor.moveUp",
|
|
5923
|
-
{ name: de(
|
|
5926
|
+
{ name: de(k, n) }
|
|
5924
5927
|
),
|
|
5925
|
-
disabled:
|
|
5926
|
-
onClick: () =>
|
|
5928
|
+
disabled: _ === 0,
|
|
5929
|
+
onClick: () => S(u, _, -1)
|
|
5927
5930
|
}
|
|
5928
5931
|
),
|
|
5929
5932
|
/* @__PURE__ */ t(
|
|
@@ -5934,10 +5937,10 @@ function Wr({
|
|
|
5934
5937
|
icon: /* @__PURE__ */ t(pa, { "aria-hidden": "true" }),
|
|
5935
5938
|
"aria-label": n(
|
|
5936
5939
|
"anamnesis.configEditor.moveDown",
|
|
5937
|
-
{ name: de(
|
|
5940
|
+
{ name: de(k, n) }
|
|
5938
5941
|
),
|
|
5939
|
-
disabled:
|
|
5940
|
-
onClick: () =>
|
|
5942
|
+
disabled: _ === u.fields.length - 1,
|
|
5943
|
+
onClick: () => S(u, _, 1)
|
|
5941
5944
|
}
|
|
5942
5945
|
),
|
|
5943
5946
|
/* @__PURE__ */ t(
|
|
@@ -5948,16 +5951,16 @@ function Wr({
|
|
|
5948
5951
|
icon: /* @__PURE__ */ t(ra, { "aria-hidden": "true" }),
|
|
5949
5952
|
"aria-label": n(
|
|
5950
5953
|
"anamnesis.configEditor.edit",
|
|
5951
|
-
{ name: de(
|
|
5954
|
+
{ name: de(k, n) }
|
|
5952
5955
|
),
|
|
5953
5956
|
onClick: () => o({
|
|
5954
5957
|
kind: "field",
|
|
5955
5958
|
sectionKey: u.key,
|
|
5956
|
-
entry:
|
|
5959
|
+
entry: k
|
|
5957
5960
|
})
|
|
5958
5961
|
}
|
|
5959
5962
|
),
|
|
5960
|
-
|
|
5963
|
+
k.enabled === !1 ? /* @__PURE__ */ t(
|
|
5961
5964
|
Q,
|
|
5962
5965
|
{
|
|
5963
5966
|
size: "sm",
|
|
@@ -5966,14 +5969,14 @@ function Wr({
|
|
|
5966
5969
|
"aria-label": n(
|
|
5967
5970
|
"anamnesis.configEditor.restore",
|
|
5968
5971
|
{
|
|
5969
|
-
name: de(
|
|
5972
|
+
name: de(k, n)
|
|
5970
5973
|
}
|
|
5971
5974
|
),
|
|
5972
|
-
onClick: () =>
|
|
5975
|
+
onClick: () => f(
|
|
5973
5976
|
{
|
|
5974
5977
|
kind: "field",
|
|
5975
5978
|
sectionKey: u.key,
|
|
5976
|
-
entry:
|
|
5979
|
+
entry: k
|
|
5977
5980
|
},
|
|
5978
5981
|
void 0
|
|
5979
5982
|
)
|
|
@@ -5987,14 +5990,14 @@ function Wr({
|
|
|
5987
5990
|
"aria-label": n(
|
|
5988
5991
|
"anamnesis.configEditor.archive",
|
|
5989
5992
|
{
|
|
5990
|
-
name: de(
|
|
5993
|
+
name: de(k, n)
|
|
5991
5994
|
}
|
|
5992
5995
|
),
|
|
5993
|
-
onClick: () =>
|
|
5996
|
+
onClick: () => f(
|
|
5994
5997
|
{
|
|
5995
5998
|
kind: "field",
|
|
5996
5999
|
sectionKey: u.key,
|
|
5997
|
-
entry:
|
|
6000
|
+
entry: k
|
|
5998
6001
|
},
|
|
5999
6002
|
!1
|
|
6000
6003
|
)
|
|
@@ -6004,7 +6007,7 @@ function Wr({
|
|
|
6004
6007
|
}
|
|
6005
6008
|
)
|
|
6006
6009
|
},
|
|
6007
|
-
|
|
6010
|
+
k.key
|
|
6008
6011
|
)) }) : null,
|
|
6009
6012
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
6010
6013
|
J,
|
|
@@ -6040,21 +6043,21 @@ function Wr({
|
|
|
6040
6043
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${n("anamnesis.configEditor.panelLive", {
|
|
6041
6044
|
count: C
|
|
6042
6045
|
})} · ${n("anamnesis.configEditor.panelArchived", {
|
|
6043
|
-
count:
|
|
6046
|
+
count: y - C
|
|
6044
6047
|
})}` }),
|
|
6045
6048
|
nn.map((u) => {
|
|
6046
|
-
const
|
|
6049
|
+
const w = Me(
|
|
6047
6050
|
e,
|
|
6048
6051
|
u
|
|
6049
6052
|
);
|
|
6050
|
-
return
|
|
6053
|
+
return w.length === 0 ? null : /* @__PURE__ */ d(
|
|
6051
6054
|
"section",
|
|
6052
6055
|
{
|
|
6053
6056
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
6054
6057
|
children: [
|
|
6055
6058
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${u}`) }),
|
|
6056
|
-
/* @__PURE__ */ t(Ze, { divider: "divided", children:
|
|
6057
|
-
const
|
|
6059
|
+
/* @__PURE__ */ t(Ze, { divider: "divided", children: w.map((x, L) => {
|
|
6060
|
+
const V = [
|
|
6058
6061
|
Fo(x, n),
|
|
6059
6062
|
n(
|
|
6060
6063
|
`anamnesis.configEditor.direction.${x.betterDirection}`
|
|
@@ -6067,7 +6070,7 @@ function Wr({
|
|
|
6067
6070
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6068
6071
|
ke(x, n),
|
|
6069
6072
|
x.locked ? /* @__PURE__ */ t(
|
|
6070
|
-
|
|
6073
|
+
W,
|
|
6071
6074
|
{
|
|
6072
6075
|
size: "sm",
|
|
6073
6076
|
variant: "neutral",
|
|
@@ -6075,9 +6078,9 @@ function Wr({
|
|
|
6075
6078
|
children: n("anamnesis.configEditor.locked")
|
|
6076
6079
|
}
|
|
6077
6080
|
) : null,
|
|
6078
|
-
x.enabled === !1 ? /* @__PURE__ */ t(
|
|
6081
|
+
x.enabled === !1 ? /* @__PURE__ */ t(W, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
|
|
6079
6082
|
] }),
|
|
6080
|
-
description:
|
|
6083
|
+
description: V,
|
|
6081
6084
|
trailing: /* @__PURE__ */ d(
|
|
6082
6085
|
Na,
|
|
6083
6086
|
{
|
|
@@ -6110,7 +6113,7 @@ function Wr({
|
|
|
6110
6113
|
"anamnesis.configEditor.moveDown",
|
|
6111
6114
|
{ name: ke(x, n) }
|
|
6112
6115
|
),
|
|
6113
|
-
disabled: L ===
|
|
6116
|
+
disabled: L === w.length - 1,
|
|
6114
6117
|
onClick: () => h(u, L, 1)
|
|
6115
6118
|
}
|
|
6116
6119
|
),
|
|
@@ -6142,7 +6145,7 @@ function Wr({
|
|
|
6142
6145
|
name: ke(x, n)
|
|
6143
6146
|
}
|
|
6144
6147
|
),
|
|
6145
|
-
onClick: () =>
|
|
6148
|
+
onClick: () => f(
|
|
6146
6149
|
{ kind: "parameter", entry: x },
|
|
6147
6150
|
void 0
|
|
6148
6151
|
)
|
|
@@ -6159,7 +6162,7 @@ function Wr({
|
|
|
6159
6162
|
name: ke(x, n)
|
|
6160
6163
|
}
|
|
6161
6164
|
),
|
|
6162
|
-
onClick: () =>
|
|
6165
|
+
onClick: () => f(
|
|
6163
6166
|
{ kind: "parameter", entry: x },
|
|
6164
6167
|
!1
|
|
6165
6168
|
)
|
|
@@ -6190,25 +6193,25 @@ function Wr({
|
|
|
6190
6193
|
] }) }),
|
|
6191
6194
|
/* @__PURE__ */ t(ie.Content, { value: "pathologies", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:pt-[var(--spacing-md)]", children: [
|
|
6192
6195
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${n("anamnesis.configEditor.panelLive", {
|
|
6193
|
-
count:
|
|
6196
|
+
count: P
|
|
6194
6197
|
})} · ${n("anamnesis.configEditor.panelArchived", {
|
|
6195
|
-
count: I -
|
|
6198
|
+
count: I - P
|
|
6196
6199
|
})}` }),
|
|
6197
6200
|
/* @__PURE__ */ t(Ze, { divider: "divided", children: Za(e).map((u) => {
|
|
6198
|
-
const
|
|
6201
|
+
const w = e.pathologies.some(
|
|
6199
6202
|
(L) => L.parentCode === u.code && L.enabled !== !1
|
|
6200
6203
|
), x = [
|
|
6201
6204
|
u.parentCode ? n("anamnesis.configEditor.subCodeOf", {
|
|
6202
6205
|
code: u.parentCode
|
|
6203
6206
|
}) : null,
|
|
6204
|
-
|
|
6207
|
+
w ? n("anamnesis.configEditor.familyHeading") : null
|
|
6205
6208
|
].filter(Boolean).join(" · ");
|
|
6206
6209
|
return /* @__PURE__ */ t(
|
|
6207
6210
|
Ze.Item,
|
|
6208
6211
|
{
|
|
6209
6212
|
title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
6210
6213
|
Se(u.code, n, u),
|
|
6211
|
-
u.enabled === !1 ? /* @__PURE__ */ t(
|
|
6214
|
+
u.enabled === !1 ? /* @__PURE__ */ t(W, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
|
|
6212
6215
|
] }),
|
|
6213
6216
|
description: x || void 0,
|
|
6214
6217
|
trailing: /* @__PURE__ */ d(
|
|
@@ -6250,7 +6253,7 @@ function Wr({
|
|
|
6250
6253
|
)
|
|
6251
6254
|
}
|
|
6252
6255
|
),
|
|
6253
|
-
onClick: () =>
|
|
6256
|
+
onClick: () => f(
|
|
6254
6257
|
{ kind: "pathology", entry: u },
|
|
6255
6258
|
void 0
|
|
6256
6259
|
)
|
|
@@ -6271,7 +6274,7 @@ function Wr({
|
|
|
6271
6274
|
)
|
|
6272
6275
|
}
|
|
6273
6276
|
),
|
|
6274
|
-
onClick: () =>
|
|
6277
|
+
onClick: () => f(
|
|
6275
6278
|
{ kind: "pathology", entry: u },
|
|
6276
6279
|
!1
|
|
6277
6280
|
)
|
|
@@ -6297,24 +6300,24 @@ function Wr({
|
|
|
6297
6300
|
] }) }),
|
|
6298
6301
|
/* @__PURE__ */ t(ie.Content, { value: "targets", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
|
|
6299
6302
|
/* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.configEditor.panelTracked", {
|
|
6300
|
-
count:
|
|
6303
|
+
count: T
|
|
6301
6304
|
}) }),
|
|
6302
6305
|
/* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.configEditor.targetsIntro") }),
|
|
6303
6306
|
nn.map((u) => {
|
|
6304
|
-
const
|
|
6305
|
-
return
|
|
6307
|
+
const w = Ne(e, u);
|
|
6308
|
+
return w.length === 0 ? null : /* @__PURE__ */ d(
|
|
6306
6309
|
"section",
|
|
6307
6310
|
{
|
|
6308
6311
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
6309
6312
|
children: [
|
|
6310
6313
|
/* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${u}`) }),
|
|
6311
|
-
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children:
|
|
6314
|
+
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: w.map((x) => /* @__PURE__ */ t(
|
|
6312
6315
|
ln,
|
|
6313
6316
|
{
|
|
6314
6317
|
label: ke(x, n),
|
|
6315
6318
|
checked: x.goal === !0,
|
|
6316
6319
|
onCheckedChange: (L) => c(
|
|
6317
|
-
(
|
|
6320
|
+
(V) => V.key === x.key ? { ...V, goal: L === !0 } : V
|
|
6318
6321
|
)
|
|
6319
6322
|
},
|
|
6320
6323
|
x.key
|
|
@@ -6392,29 +6395,29 @@ function $o({
|
|
|
6392
6395
|
onConfigChange: i,
|
|
6393
6396
|
t: s
|
|
6394
6397
|
}) {
|
|
6395
|
-
const o = e.entry, r = Oo(e, s), [l, c] =
|
|
6398
|
+
const o = e.entry, r = Oo(e, s), [l, c] = $(o.label ?? ""), [m, p] = $(
|
|
6396
6399
|
e.kind === "field" ? o.helpText ?? "" : ""
|
|
6397
|
-
), [g, h] =
|
|
6400
|
+
), [g, h] = $(
|
|
6398
6401
|
e.kind === "field" && e.entry.required === !0
|
|
6399
|
-
), N = e.kind === "field" ? e.entry : null,
|
|
6400
|
-
|
|
6401
|
-
),
|
|
6402
|
-
const I = l.trim(),
|
|
6403
|
-
const
|
|
6404
|
-
return I ?
|
|
6402
|
+
), N = e.kind === "field" ? e.entry : null, S = N !== null && (N.type === "choice" || N.type === "multiChoice"), f = S && !Lo.has(N.key), [C, y] = $(
|
|
6403
|
+
f ? (N.options ?? []).join(", ") : ""
|
|
6404
|
+
), A = C.split(",").map((I) => I.trim()).filter(Boolean), E = !f || A.length > 0, P = () => {
|
|
6405
|
+
const I = l.trim(), T = (u) => {
|
|
6406
|
+
const w = { ...u };
|
|
6407
|
+
return I ? w.label = I : delete w.label, w;
|
|
6405
6408
|
};
|
|
6406
6409
|
if (e.kind === "parameter")
|
|
6407
6410
|
i({
|
|
6408
6411
|
...n,
|
|
6409
6412
|
parameters: n.parameters.map(
|
|
6410
|
-
(u) => u.key === e.entry.key ?
|
|
6413
|
+
(u) => u.key === e.entry.key ? T(u) : u
|
|
6411
6414
|
)
|
|
6412
6415
|
});
|
|
6413
6416
|
else if (e.kind === "section")
|
|
6414
6417
|
i({
|
|
6415
6418
|
...n,
|
|
6416
6419
|
intakeSections: n.intakeSections.map(
|
|
6417
|
-
(u) => u.key === e.entry.key ?
|
|
6420
|
+
(u) => u.key === e.entry.key ? T(u) : u
|
|
6418
6421
|
)
|
|
6419
6422
|
});
|
|
6420
6423
|
else if (e.kind === "field") {
|
|
@@ -6422,21 +6425,21 @@ function $o({
|
|
|
6422
6425
|
i({
|
|
6423
6426
|
...n,
|
|
6424
6427
|
intakeSections: n.intakeSections.map(
|
|
6425
|
-
(
|
|
6426
|
-
...
|
|
6427
|
-
fields:
|
|
6428
|
+
(w) => w.key === e.sectionKey ? {
|
|
6429
|
+
...w,
|
|
6430
|
+
fields: w.fields.map((x) => {
|
|
6428
6431
|
if (x.key !== e.entry.key) return x;
|
|
6429
|
-
const L =
|
|
6430
|
-
return u ? L.helpText = u : delete L.helpText,
|
|
6432
|
+
const L = T(x);
|
|
6433
|
+
return u ? L.helpText = u : delete L.helpText, f && (L.options = A), g ? L.required = !0 : delete L.required, L;
|
|
6431
6434
|
})
|
|
6432
|
-
} :
|
|
6435
|
+
} : w
|
|
6433
6436
|
)
|
|
6434
6437
|
});
|
|
6435
6438
|
} else
|
|
6436
6439
|
i({
|
|
6437
6440
|
...n,
|
|
6438
6441
|
pathologies: n.pathologies.map(
|
|
6439
|
-
(u) => u.code === o.code ?
|
|
6442
|
+
(u) => u.code === o.code ? T(u) : u
|
|
6440
6443
|
)
|
|
6441
6444
|
});
|
|
6442
6445
|
a();
|
|
@@ -6456,7 +6459,7 @@ function $o({
|
|
|
6456
6459
|
] }),
|
|
6457
6460
|
/* @__PURE__ */ d(Y.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
6458
6461
|
/* @__PURE__ */ t(
|
|
6459
|
-
|
|
6462
|
+
O,
|
|
6460
6463
|
{
|
|
6461
6464
|
label: s("anamnesis.configEditor.labelField"),
|
|
6462
6465
|
description: s("anamnesis.configEditor.labelFieldHelp"),
|
|
@@ -6470,7 +6473,7 @@ function $o({
|
|
|
6470
6473
|
)
|
|
6471
6474
|
}
|
|
6472
6475
|
),
|
|
6473
|
-
e.kind === "field" ? /* @__PURE__ */ t(
|
|
6476
|
+
e.kind === "field" ? /* @__PURE__ */ t(O, { label: s("anamnesis.configEditor.helpField"), optional: !0, children: /* @__PURE__ */ t(
|
|
6474
6477
|
aa,
|
|
6475
6478
|
{
|
|
6476
6479
|
value: m,
|
|
@@ -6486,8 +6489,8 @@ function $o({
|
|
|
6486
6489
|
onCheckedChange: (I) => h(I === !0)
|
|
6487
6490
|
}
|
|
6488
6491
|
) : null,
|
|
6489
|
-
|
|
6490
|
-
|
|
6492
|
+
f ? /* @__PURE__ */ t(
|
|
6493
|
+
O,
|
|
6491
6494
|
{
|
|
6492
6495
|
label: s("anamnesis.configEditor.optionsField"),
|
|
6493
6496
|
description: s("anamnesis.configEditor.optionsFieldHelp"),
|
|
@@ -6496,11 +6499,11 @@ function $o({
|
|
|
6496
6499
|
ee,
|
|
6497
6500
|
{
|
|
6498
6501
|
value: C,
|
|
6499
|
-
onChange: (I) =>
|
|
6502
|
+
onChange: (I) => y(I.target.value)
|
|
6500
6503
|
}
|
|
6501
6504
|
)
|
|
6502
6505
|
}
|
|
6503
|
-
) :
|
|
6506
|
+
) : S ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.configEditor.optionsCurrent", {
|
|
6504
6507
|
list: (N.options ?? []).map(
|
|
6505
6508
|
(I) => s(`anamnesis.field.${N.key}.option.${I}`, {
|
|
6506
6509
|
defaultValue: I
|
|
@@ -6510,7 +6513,7 @@ function $o({
|
|
|
6510
6513
|
] }),
|
|
6511
6514
|
/* @__PURE__ */ d(Y.Footer, { children: [
|
|
6512
6515
|
/* @__PURE__ */ t(J, { intent: "ghost", onClick: a, children: s("anamnesis.configEditor.cancel") }),
|
|
6513
|
-
/* @__PURE__ */ t(J, { intent: "primary", onClick:
|
|
6516
|
+
/* @__PURE__ */ t(J, { intent: "primary", onClick: P, disabled: !E, children: s("anamnesis.configEditor.save") })
|
|
6514
6517
|
] })
|
|
6515
6518
|
] });
|
|
6516
6519
|
}
|
|
@@ -6558,37 +6561,37 @@ function Vo({
|
|
|
6558
6561
|
onConfigChange: i,
|
|
6559
6562
|
t: s
|
|
6560
6563
|
}) {
|
|
6561
|
-
const [o, r] =
|
|
6562
|
-
value:
|
|
6563
|
-
label: s(`anamnesis.group.${
|
|
6564
|
-
})), ue = Po.map((
|
|
6565
|
-
value:
|
|
6566
|
-
label: s(`anamnesis.configEditor.direction.${
|
|
6567
|
-
})), pe = Ro.map((
|
|
6568
|
-
value:
|
|
6569
|
-
label: s(`anamnesis.configEditor.type.${
|
|
6570
|
-
})), ve = n.pathologies.filter((
|
|
6571
|
-
value:
|
|
6572
|
-
label: Se(
|
|
6573
|
-
})), he = I.split(",").map((
|
|
6564
|
+
const [o, r] = $(""), [l, c] = $(""), [m, p] = $(""), [g, h] = $(""), [N, S] = $(""), [f, C] = $(""), [y, A] = $("0"), [E, P] = $(""), [I, T] = $(""), [u, w] = $(""), [x, L] = $(""), [V, k] = $(!1), [_, B] = $(""), H = nn.map((D) => ({
|
|
6565
|
+
value: D,
|
|
6566
|
+
label: s(`anamnesis.group.${D}`)
|
|
6567
|
+
})), ue = Po.map((D) => ({
|
|
6568
|
+
value: D,
|
|
6569
|
+
label: s(`anamnesis.configEditor.direction.${D}`)
|
|
6570
|
+
})), pe = Ro.map((D) => ({
|
|
6571
|
+
value: D,
|
|
6572
|
+
label: s(`anamnesis.configEditor.type.${D}`)
|
|
6573
|
+
})), ve = n.pathologies.filter((D) => !D.parentCode && D.enabled !== !1).map((D) => ({
|
|
6574
|
+
value: D.code,
|
|
6575
|
+
label: Se(D.code, s, D)
|
|
6576
|
+
})), he = I.split(",").map((D) => D.trim()).filter(Boolean), ce = e.kind === "parameter" ? o.trim() !== "" && l !== "" && m !== "" : e.kind === "field" ? o.trim() !== "" && E !== "" && (!Xa(E) || he.length > 0) : e.kind === "section" ? o.trim() !== "" : o.trim() !== "" && x.trim() !== "" && // A duplicate code would collide with the existing entry
|
|
6574
6577
|
// everywhere codes are matched (lookup, archive, edit) —
|
|
6575
6578
|
// uniqueness is the add gate, matching keyFromLabel's guarantee
|
|
6576
6579
|
// on the other vocabularies.
|
|
6577
6580
|
!n.pathologies.some(
|
|
6578
|
-
(
|
|
6581
|
+
(D) => D.code.toLowerCase() === x.trim().toLowerCase()
|
|
6579
6582
|
), Z = () => {
|
|
6580
|
-
const
|
|
6583
|
+
const D = o.trim();
|
|
6581
6584
|
if (e.kind === "parameter") {
|
|
6582
|
-
const q = new Set(n.parameters.map((Ee) => Ee.key)),
|
|
6585
|
+
const q = new Set(n.parameters.map((Ee) => Ee.key)), j = (Ee) => {
|
|
6583
6586
|
if (Ee.trim() === "") return;
|
|
6584
|
-
const
|
|
6585
|
-
return Number.isFinite(
|
|
6586
|
-
}, le =
|
|
6587
|
-
key: Qa(
|
|
6588
|
-
label:
|
|
6587
|
+
const G = Number(Ee);
|
|
6588
|
+
return Number.isFinite(G) ? G : void 0;
|
|
6589
|
+
}, le = j(N), ae = j(f), Ce = {
|
|
6590
|
+
key: Qa(D, q),
|
|
6591
|
+
label: D,
|
|
6589
6592
|
group: l,
|
|
6590
6593
|
betterDirection: m,
|
|
6591
|
-
precision: Number(
|
|
6594
|
+
precision: Number(y),
|
|
6592
6595
|
...g.trim() ? { unit: g.trim() } : {},
|
|
6593
6596
|
...le != null || ae != null ? {
|
|
6594
6597
|
referenceRange: {
|
|
@@ -6603,15 +6606,15 @@ function Vo({
|
|
|
6603
6606
|
n.intakeSections.flatMap(
|
|
6604
6607
|
(ae) => ae.fields.map((Ce) => Ce.key)
|
|
6605
6608
|
)
|
|
6606
|
-
),
|
|
6607
|
-
key: Qa(
|
|
6608
|
-
label:
|
|
6609
|
-
type:
|
|
6610
|
-
...
|
|
6611
|
-
...
|
|
6612
|
-
...Xa(
|
|
6609
|
+
), j = E === "numberInteger" || E === "numberDecimal" ? "number" : E === "choiceWithText" ? "choice" : E, le = {
|
|
6610
|
+
key: Qa(D, q),
|
|
6611
|
+
label: D,
|
|
6612
|
+
type: j,
|
|
6613
|
+
...E === "numberDecimal" ? { decimal: !0 } : {},
|
|
6614
|
+
...E === "choiceWithText" ? { detail: !0 } : {},
|
|
6615
|
+
...Xa(E) ? { options: he } : {},
|
|
6613
6616
|
...u.trim() ? { helpText: u.trim() } : {},
|
|
6614
|
-
...
|
|
6617
|
+
...V ? { required: !0 } : {}
|
|
6615
6618
|
};
|
|
6616
6619
|
i({
|
|
6617
6620
|
...n,
|
|
@@ -6622,20 +6625,20 @@ function Vo({
|
|
|
6622
6625
|
} else if (e.kind === "section") {
|
|
6623
6626
|
const q = new Set(
|
|
6624
6627
|
n.intakeSections.map((le) => le.key)
|
|
6625
|
-
),
|
|
6626
|
-
key: Qa(
|
|
6627
|
-
label:
|
|
6628
|
+
), j = {
|
|
6629
|
+
key: Qa(D, q),
|
|
6630
|
+
label: D,
|
|
6628
6631
|
fields: []
|
|
6629
6632
|
};
|
|
6630
6633
|
i({
|
|
6631
6634
|
...n,
|
|
6632
|
-
intakeSections: [...n.intakeSections,
|
|
6635
|
+
intakeSections: [...n.intakeSections, j]
|
|
6633
6636
|
});
|
|
6634
6637
|
} else {
|
|
6635
6638
|
const q = {
|
|
6636
6639
|
code: x.trim(),
|
|
6637
|
-
label:
|
|
6638
|
-
...
|
|
6640
|
+
label: D,
|
|
6641
|
+
..._ ? { parentCode: _ } : {}
|
|
6639
6642
|
};
|
|
6640
6643
|
i({
|
|
6641
6644
|
...n,
|
|
@@ -6652,33 +6655,33 @@ function Vo({
|
|
|
6652
6655
|
/* @__PURE__ */ t(Y.Description, { children: s("anamnesis.configEditor.addNote") })
|
|
6653
6656
|
] }),
|
|
6654
6657
|
/* @__PURE__ */ d(Y.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
6655
|
-
e.kind === "pathology" ? /* @__PURE__ */ t(
|
|
6658
|
+
e.kind === "pathology" ? /* @__PURE__ */ t(O, { label: s("anamnesis.configEditor.codeField"), required: !0, children: /* @__PURE__ */ t(
|
|
6656
6659
|
ee,
|
|
6657
6660
|
{
|
|
6658
6661
|
value: x,
|
|
6659
|
-
onChange: (
|
|
6662
|
+
onChange: (D) => L(D.target.value)
|
|
6660
6663
|
}
|
|
6661
6664
|
) }) : null,
|
|
6662
|
-
/* @__PURE__ */ t(
|
|
6665
|
+
/* @__PURE__ */ t(O, { label: s("anamnesis.configEditor.labelField"), required: !0, children: /* @__PURE__ */ t(
|
|
6663
6666
|
ee,
|
|
6664
6667
|
{
|
|
6665
6668
|
value: o,
|
|
6666
|
-
onChange: (
|
|
6669
|
+
onChange: (D) => r(D.target.value)
|
|
6667
6670
|
}
|
|
6668
6671
|
) }),
|
|
6669
6672
|
e.kind === "parameter" ? /* @__PURE__ */ d(Ie, { children: [
|
|
6670
|
-
/* @__PURE__ */ t(
|
|
6673
|
+
/* @__PURE__ */ t(O, { label: s("anamnesis.configEditor.groupField"), required: !0, children: /* @__PURE__ */ t(
|
|
6671
6674
|
Oe,
|
|
6672
6675
|
{
|
|
6673
|
-
options:
|
|
6676
|
+
options: H,
|
|
6674
6677
|
value: l,
|
|
6675
|
-
onValueChange: (
|
|
6678
|
+
onValueChange: (D) => c(D),
|
|
6676
6679
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
6677
6680
|
"aria-label": s("anamnesis.configEditor.groupField")
|
|
6678
6681
|
}
|
|
6679
6682
|
) }),
|
|
6680
6683
|
/* @__PURE__ */ t(
|
|
6681
|
-
|
|
6684
|
+
O,
|
|
6682
6685
|
{
|
|
6683
6686
|
label: s("anamnesis.configEditor.directionField"),
|
|
6684
6687
|
required: !0,
|
|
@@ -6687,7 +6690,7 @@ function Vo({
|
|
|
6687
6690
|
{
|
|
6688
6691
|
options: ue,
|
|
6689
6692
|
value: m,
|
|
6690
|
-
onValueChange: (
|
|
6693
|
+
onValueChange: (D) => p(D),
|
|
6691
6694
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
6692
6695
|
"aria-label": s("anamnesis.configEditor.directionField")
|
|
6693
6696
|
}
|
|
@@ -6695,15 +6698,15 @@ function Vo({
|
|
|
6695
6698
|
}
|
|
6696
6699
|
),
|
|
6697
6700
|
/* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-2 ds:gap-[var(--spacing-md)]", children: [
|
|
6698
|
-
/* @__PURE__ */ t(
|
|
6701
|
+
/* @__PURE__ */ t(O, { label: s("anamnesis.configEditor.unitField"), optional: !0, children: /* @__PURE__ */ t(
|
|
6699
6702
|
ee,
|
|
6700
6703
|
{
|
|
6701
6704
|
value: g,
|
|
6702
|
-
onChange: (
|
|
6705
|
+
onChange: (D) => h(D.target.value)
|
|
6703
6706
|
}
|
|
6704
6707
|
) }),
|
|
6705
6708
|
/* @__PURE__ */ t(
|
|
6706
|
-
|
|
6709
|
+
O,
|
|
6707
6710
|
{
|
|
6708
6711
|
label: s("anamnesis.configEditor.precisionField"),
|
|
6709
6712
|
optional: !0,
|
|
@@ -6715,8 +6718,8 @@ function Vo({
|
|
|
6715
6718
|
{ value: "1", label: "1" },
|
|
6716
6719
|
{ value: "2", label: "2" }
|
|
6717
6720
|
],
|
|
6718
|
-
value:
|
|
6719
|
-
onValueChange: (
|
|
6721
|
+
value: y,
|
|
6722
|
+
onValueChange: (D) => A(D || "0"),
|
|
6720
6723
|
"aria-label": s("anamnesis.configEditor.precisionField")
|
|
6721
6724
|
}
|
|
6722
6725
|
)
|
|
@@ -6725,7 +6728,7 @@ function Vo({
|
|
|
6725
6728
|
] }),
|
|
6726
6729
|
/* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-2 ds:gap-[var(--spacing-md)]", children: [
|
|
6727
6730
|
/* @__PURE__ */ t(
|
|
6728
|
-
|
|
6731
|
+
O,
|
|
6729
6732
|
{
|
|
6730
6733
|
label: s("anamnesis.configEditor.rangeMinField"),
|
|
6731
6734
|
optional: !0,
|
|
@@ -6734,13 +6737,13 @@ function Vo({
|
|
|
6734
6737
|
{
|
|
6735
6738
|
inputMode: "decimal",
|
|
6736
6739
|
value: N,
|
|
6737
|
-
onChange: (
|
|
6740
|
+
onChange: (D) => S(D.target.value)
|
|
6738
6741
|
}
|
|
6739
6742
|
)
|
|
6740
6743
|
}
|
|
6741
6744
|
),
|
|
6742
6745
|
/* @__PURE__ */ t(
|
|
6743
|
-
|
|
6746
|
+
O,
|
|
6744
6747
|
{
|
|
6745
6748
|
label: s("anamnesis.configEditor.rangeMaxField"),
|
|
6746
6749
|
optional: !0,
|
|
@@ -6748,8 +6751,8 @@ function Vo({
|
|
|
6748
6751
|
ee,
|
|
6749
6752
|
{
|
|
6750
6753
|
inputMode: "decimal",
|
|
6751
|
-
value:
|
|
6752
|
-
onChange: (
|
|
6754
|
+
value: f,
|
|
6755
|
+
onChange: (D) => C(D.target.value)
|
|
6753
6756
|
}
|
|
6754
6757
|
)
|
|
6755
6758
|
}
|
|
@@ -6757,18 +6760,18 @@ function Vo({
|
|
|
6757
6760
|
] })
|
|
6758
6761
|
] }) : null,
|
|
6759
6762
|
e.kind === "field" ? /* @__PURE__ */ d(Ie, { children: [
|
|
6760
|
-
/* @__PURE__ */ t(
|
|
6763
|
+
/* @__PURE__ */ t(O, { label: s("anamnesis.configEditor.typeField"), required: !0, children: /* @__PURE__ */ t(
|
|
6761
6764
|
Oe,
|
|
6762
6765
|
{
|
|
6763
6766
|
options: pe,
|
|
6764
|
-
value:
|
|
6765
|
-
onValueChange: (
|
|
6767
|
+
value: E,
|
|
6768
|
+
onValueChange: (D) => P(D),
|
|
6766
6769
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
6767
6770
|
"aria-label": s("anamnesis.configEditor.typeField")
|
|
6768
6771
|
}
|
|
6769
6772
|
) }),
|
|
6770
|
-
Xa(
|
|
6771
|
-
|
|
6773
|
+
Xa(E) ? /* @__PURE__ */ t(
|
|
6774
|
+
O,
|
|
6772
6775
|
{
|
|
6773
6776
|
label: s("anamnesis.configEditor.optionsField"),
|
|
6774
6777
|
description: s("anamnesis.configEditor.optionsFieldHelp"),
|
|
@@ -6777,16 +6780,16 @@ function Vo({
|
|
|
6777
6780
|
ee,
|
|
6778
6781
|
{
|
|
6779
6782
|
value: I,
|
|
6780
|
-
onChange: (
|
|
6783
|
+
onChange: (D) => T(D.target.value)
|
|
6781
6784
|
}
|
|
6782
6785
|
)
|
|
6783
6786
|
}
|
|
6784
6787
|
) : null,
|
|
6785
|
-
/* @__PURE__ */ t(
|
|
6788
|
+
/* @__PURE__ */ t(O, { label: s("anamnesis.configEditor.helpField"), optional: !0, children: /* @__PURE__ */ t(
|
|
6786
6789
|
aa,
|
|
6787
6790
|
{
|
|
6788
6791
|
value: u,
|
|
6789
|
-
onChange: (
|
|
6792
|
+
onChange: (D) => w(D.target.value),
|
|
6790
6793
|
minRows: 2
|
|
6791
6794
|
}
|
|
6792
6795
|
) }),
|
|
@@ -6794,13 +6797,13 @@ function Vo({
|
|
|
6794
6797
|
ln,
|
|
6795
6798
|
{
|
|
6796
6799
|
label: s("anamnesis.configEditor.requiredField"),
|
|
6797
|
-
checked:
|
|
6798
|
-
onCheckedChange: (
|
|
6800
|
+
checked: V,
|
|
6801
|
+
onCheckedChange: (D) => k(D === !0)
|
|
6799
6802
|
}
|
|
6800
6803
|
)
|
|
6801
6804
|
] }) : null,
|
|
6802
6805
|
e.kind === "pathology" ? /* @__PURE__ */ t(
|
|
6803
|
-
|
|
6806
|
+
O,
|
|
6804
6807
|
{
|
|
6805
6808
|
label: s("anamnesis.configEditor.parentField"),
|
|
6806
6809
|
description: s("anamnesis.configEditor.parentFieldHelp"),
|
|
@@ -6809,8 +6812,8 @@ function Vo({
|
|
|
6809
6812
|
Oe,
|
|
6810
6813
|
{
|
|
6811
6814
|
options: ve,
|
|
6812
|
-
value:
|
|
6813
|
-
onValueChange: (
|
|
6815
|
+
value: _,
|
|
6816
|
+
onValueChange: (D) => B(D),
|
|
6814
6817
|
placeholder: s("anamnesis.configEditor.selectPlaceholder"),
|
|
6815
6818
|
clearable: !0,
|
|
6816
6819
|
"aria-label": s("anamnesis.configEditor.parentField")
|
|
@@ -8717,4 +8720,4 @@ export {
|
|
|
8717
8720
|
Yr as r,
|
|
8718
8721
|
Gr as s
|
|
8719
8722
|
};
|
|
8720
|
-
//# sourceMappingURL=anamnesis-i18n-
|
|
8723
|
+
//# sourceMappingURL=anamnesis-i18n-BEhPg2hh.js.map
|