@ttn-shared/ui 0.0.1 → 0.1.0
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/index.cjs +137 -96
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +105 -64
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
43
43
|
// src/components/PatientForm.tsx
|
|
44
44
|
var import_react7 = require("react");
|
|
45
45
|
var import_dayjs = __toESM(require("dayjs"), 1);
|
|
46
|
-
var
|
|
46
|
+
var import_core8 = require("@mantine/core");
|
|
47
47
|
var import_form = require("@mantine/form");
|
|
48
48
|
var import_icons_react6 = require("@tabler/icons-react");
|
|
49
49
|
|
|
@@ -1403,11 +1403,42 @@ var PatientAppointmentHistory = ({ patientId }) => {
|
|
|
1403
1403
|
] });
|
|
1404
1404
|
};
|
|
1405
1405
|
|
|
1406
|
-
// src/components/
|
|
1406
|
+
// src/components/PatientFormPolicy.tsx
|
|
1407
|
+
var import_core7 = require("@mantine/core");
|
|
1407
1408
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1409
|
+
function PatientFormPolicy({ content, opened, onClose }) {
|
|
1410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1411
|
+
import_core7.Modal,
|
|
1412
|
+
{
|
|
1413
|
+
opened,
|
|
1414
|
+
onClose,
|
|
1415
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Title, { order: 4, c: "brand-color", children: "Pol\xEDtica de datos" }),
|
|
1416
|
+
size: "lg",
|
|
1417
|
+
centered: true,
|
|
1418
|
+
children: [
|
|
1419
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1420
|
+
import_core7.Box,
|
|
1421
|
+
{
|
|
1422
|
+
dangerouslySetInnerHTML: { __html: content || "No hay pol\xEDtica de datos disponible." },
|
|
1423
|
+
style: {
|
|
1424
|
+
maxHeight: "60vh",
|
|
1425
|
+
overflowY: "auto",
|
|
1426
|
+
padding: "1rem"
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
),
|
|
1430
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Flex, { justify: "end", mt: "1rem", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Button, { onClick: onClose, children: "Aceptar" }) })
|
|
1431
|
+
]
|
|
1432
|
+
}
|
|
1433
|
+
);
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
// src/components/PatientForm.tsx
|
|
1437
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1408
1438
|
var PatientForm = ({
|
|
1409
1439
|
defaultMode,
|
|
1410
1440
|
patientId,
|
|
1441
|
+
policyContent,
|
|
1411
1442
|
onSavePatient,
|
|
1412
1443
|
onSaveError,
|
|
1413
1444
|
onBack
|
|
@@ -1417,6 +1448,7 @@ var PatientForm = ({
|
|
|
1417
1448
|
const [openPatientNotes, setOpenPatientNotes] = (0, import_react7.useState)(false);
|
|
1418
1449
|
const [openPatientAssistanceRisks, setOpenPatientAssistanceRisks] = (0, import_react7.useState)(false);
|
|
1419
1450
|
const [openPatientAdministrativeRisks, setOpenPatientAdministrativeRisks] = (0, import_react7.useState)(false);
|
|
1451
|
+
const [openPatientFormPolicy, setOpenPatientFormPolicy] = (0, import_react7.useState)(false);
|
|
1420
1452
|
const form = (0, import_form.useForm)({
|
|
1421
1453
|
mode: "controlled",
|
|
1422
1454
|
initialValues: {
|
|
@@ -1734,61 +1766,61 @@ var PatientForm = ({
|
|
|
1734
1766
|
label: ig.copaymentRateName
|
|
1735
1767
|
}));
|
|
1736
1768
|
}, [incomeGroups]);
|
|
1737
|
-
return /* @__PURE__ */ (0,
|
|
1738
|
-
/* @__PURE__ */ (0,
|
|
1739
|
-
|
|
1769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
1770
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Flex, { w: "100%", justify: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1771
|
+
import_core8.ActionIcon,
|
|
1740
1772
|
{
|
|
1741
1773
|
variant: "subtle",
|
|
1742
1774
|
onClick: handleCancelForm,
|
|
1743
1775
|
"data-testid": "patient-form-close-button",
|
|
1744
|
-
children: /* @__PURE__ */ (0,
|
|
1776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react6.IconX, { style: { width: 30, height: 30 } })
|
|
1745
1777
|
}
|
|
1746
1778
|
) }),
|
|
1747
|
-
/* @__PURE__ */ (0,
|
|
1748
|
-
mode !== "create" && /* @__PURE__ */ (0,
|
|
1749
|
-
mode === "view" && /* @__PURE__ */ (0,
|
|
1750
|
-
|
|
1779
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Title, { c: "secondary-color", mt: "xs", children: patientFormTitles[mode] }),
|
|
1780
|
+
mode !== "create" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Flex, { w: "100%", justify: "flex-end", gap: "xs", my: "xs", children: [
|
|
1781
|
+
mode === "view" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Tooltip, { label: "Editar", withArrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1782
|
+
import_core8.ActionIcon,
|
|
1751
1783
|
{
|
|
1752
1784
|
variant: "subtle",
|
|
1753
1785
|
onClick: () => setMode("edit"),
|
|
1754
1786
|
"data-testid": "patient-form-edit-button",
|
|
1755
|
-
children: /* @__PURE__ */ (0,
|
|
1787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react6.IconPencil, { style: { width: 24, height: 24 } })
|
|
1756
1788
|
}
|
|
1757
1789
|
) }),
|
|
1758
|
-
/* @__PURE__ */ (0,
|
|
1759
|
-
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Tooltip, { label: "Ver notas", withArrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1791
|
+
import_core8.ActionIcon,
|
|
1760
1792
|
{
|
|
1761
1793
|
variant: "subtle",
|
|
1762
1794
|
onClick: () => setOpenPatientNotes(true),
|
|
1763
1795
|
"data-testid": "patient-form-notes-button",
|
|
1764
|
-
children: /* @__PURE__ */ (0,
|
|
1796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react6.IconMessage, { style: { width: 24, height: 24 } })
|
|
1765
1797
|
}
|
|
1766
1798
|
) }),
|
|
1767
|
-
/* @__PURE__ */ (0,
|
|
1768
|
-
|
|
1799
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Tooltip, { label: "Riesgo asistencial", withArrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1800
|
+
import_core8.ActionIcon,
|
|
1769
1801
|
{
|
|
1770
1802
|
variant: "subtle",
|
|
1771
1803
|
color: "#83c036",
|
|
1772
1804
|
onClick: () => setOpenPatientAssistanceRisks(true),
|
|
1773
1805
|
"data-testid": "patient-form-assistance-risks-button",
|
|
1774
|
-
children: /* @__PURE__ */ (0,
|
|
1806
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react6.IconExclamationCircleFilled, { style: { width: 24, height: 24 } })
|
|
1775
1807
|
}
|
|
1776
1808
|
) }),
|
|
1777
|
-
/* @__PURE__ */ (0,
|
|
1778
|
-
|
|
1809
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Tooltip, { label: "Riesgo administrativo", withArrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1810
|
+
import_core8.ActionIcon,
|
|
1779
1811
|
{
|
|
1780
1812
|
variant: "subtle",
|
|
1781
1813
|
color: "#f39682",
|
|
1782
1814
|
onClick: () => setOpenPatientAdministrativeRisks(true),
|
|
1783
1815
|
"data-testid": "patient-form-administrative-risks-button",
|
|
1784
|
-
children: /* @__PURE__ */ (0,
|
|
1816
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react6.IconExclamationCircleFilled, { style: { width: 24, height: 24 } })
|
|
1785
1817
|
}
|
|
1786
1818
|
) })
|
|
1787
1819
|
] }),
|
|
1788
|
-
/* @__PURE__ */ (0,
|
|
1789
|
-
/* @__PURE__ */ (0,
|
|
1790
|
-
/* @__PURE__ */ (0,
|
|
1791
|
-
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("form", { onSubmit: form.onSubmit(handleSubmit), children: [
|
|
1821
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Grid, { children: [
|
|
1822
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1823
|
+
import_core8.Select,
|
|
1792
1824
|
{
|
|
1793
1825
|
readOnly: mode === "view",
|
|
1794
1826
|
withAsterisk: mode !== "view",
|
|
@@ -1798,8 +1830,8 @@ var PatientForm = ({
|
|
|
1798
1830
|
"data-testid": "patient-form-document-type-select"
|
|
1799
1831
|
}
|
|
1800
1832
|
) }),
|
|
1801
|
-
/* @__PURE__ */ (0,
|
|
1802
|
-
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1834
|
+
import_core8.TextInput,
|
|
1803
1835
|
{
|
|
1804
1836
|
readOnly: mode === "view",
|
|
1805
1837
|
withAsterisk: mode !== "view",
|
|
@@ -1808,8 +1840,8 @@ var PatientForm = ({
|
|
|
1808
1840
|
"data-testid": "patient-form-document-number-input"
|
|
1809
1841
|
}
|
|
1810
1842
|
) }),
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
1812
|
-
|
|
1843
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1844
|
+
import_core8.TextInput,
|
|
1813
1845
|
{
|
|
1814
1846
|
readOnly: mode === "view",
|
|
1815
1847
|
withAsterisk: mode !== "view",
|
|
@@ -1818,8 +1850,8 @@ var PatientForm = ({
|
|
|
1818
1850
|
"data-testid": "patient-form-first-name-input"
|
|
1819
1851
|
}
|
|
1820
1852
|
) }),
|
|
1821
|
-
/* @__PURE__ */ (0,
|
|
1822
|
-
|
|
1853
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1854
|
+
import_core8.TextInput,
|
|
1823
1855
|
{
|
|
1824
1856
|
readOnly: mode === "view",
|
|
1825
1857
|
label: "Segundo Nombre",
|
|
@@ -1827,8 +1859,8 @@ var PatientForm = ({
|
|
|
1827
1859
|
"data-testid": "patient-form-middle-name-input"
|
|
1828
1860
|
}
|
|
1829
1861
|
) }),
|
|
1830
|
-
/* @__PURE__ */ (0,
|
|
1831
|
-
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1863
|
+
import_core8.TextInput,
|
|
1832
1864
|
{
|
|
1833
1865
|
readOnly: mode === "view",
|
|
1834
1866
|
withAsterisk: mode !== "view",
|
|
@@ -1837,8 +1869,8 @@ var PatientForm = ({
|
|
|
1837
1869
|
"data-testid": "patient-form-surname-input"
|
|
1838
1870
|
}
|
|
1839
1871
|
) }),
|
|
1840
|
-
/* @__PURE__ */ (0,
|
|
1841
|
-
|
|
1872
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1873
|
+
import_core8.TextInput,
|
|
1842
1874
|
{
|
|
1843
1875
|
readOnly: mode === "view",
|
|
1844
1876
|
label: "Segundo Apellido",
|
|
@@ -1846,8 +1878,8 @@ var PatientForm = ({
|
|
|
1846
1878
|
"data-testid": "patient-form-second-surname-input"
|
|
1847
1879
|
}
|
|
1848
1880
|
) }),
|
|
1849
|
-
/* @__PURE__ */ (0,
|
|
1850
|
-
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1882
|
+
import_core8.TextInput,
|
|
1851
1883
|
{
|
|
1852
1884
|
readOnly: mode === "view",
|
|
1853
1885
|
withAsterisk: mode !== "view",
|
|
@@ -1857,8 +1889,8 @@ var PatientForm = ({
|
|
|
1857
1889
|
"data-testid": "patient-form-birth-date-input"
|
|
1858
1890
|
}
|
|
1859
1891
|
) }),
|
|
1860
|
-
/* @__PURE__ */ (0,
|
|
1861
|
-
|
|
1892
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1893
|
+
import_core8.NumberInput,
|
|
1862
1894
|
{
|
|
1863
1895
|
readOnly: true,
|
|
1864
1896
|
label: "Edad",
|
|
@@ -1867,8 +1899,8 @@ var PatientForm = ({
|
|
|
1867
1899
|
"data-testid": "patient-form-age-input"
|
|
1868
1900
|
}
|
|
1869
1901
|
) }),
|
|
1870
|
-
/* @__PURE__ */ (0,
|
|
1871
|
-
|
|
1902
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1903
|
+
import_core8.NumberInput,
|
|
1872
1904
|
{
|
|
1873
1905
|
readOnly: mode === "view",
|
|
1874
1906
|
withAsterisk: mode !== "view",
|
|
@@ -1879,8 +1911,8 @@ var PatientForm = ({
|
|
|
1879
1911
|
"data-testid": "patient-form-whatsapp-input"
|
|
1880
1912
|
}
|
|
1881
1913
|
) }),
|
|
1882
|
-
/* @__PURE__ */ (0,
|
|
1883
|
-
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1915
|
+
import_core8.Select,
|
|
1884
1916
|
{
|
|
1885
1917
|
readOnly: mode === "view",
|
|
1886
1918
|
withAsterisk: mode !== "view",
|
|
@@ -1890,8 +1922,8 @@ var PatientForm = ({
|
|
|
1890
1922
|
"data-testid": "patient-form-gender-select"
|
|
1891
1923
|
}
|
|
1892
1924
|
) }),
|
|
1893
|
-
/* @__PURE__ */ (0,
|
|
1894
|
-
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1926
|
+
import_core8.Select,
|
|
1895
1927
|
{
|
|
1896
1928
|
readOnly: mode === "view",
|
|
1897
1929
|
withAsterisk: mode !== "view",
|
|
@@ -1901,8 +1933,8 @@ var PatientForm = ({
|
|
|
1901
1933
|
"data-testid": "patient-form-affiliation-type-select"
|
|
1902
1934
|
}
|
|
1903
1935
|
) }),
|
|
1904
|
-
/* @__PURE__ */ (0,
|
|
1905
|
-
|
|
1936
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1937
|
+
import_core8.TextInput,
|
|
1906
1938
|
{
|
|
1907
1939
|
readOnly: mode === "view",
|
|
1908
1940
|
label: "Correo electr\xF3nico",
|
|
@@ -1910,8 +1942,8 @@ var PatientForm = ({
|
|
|
1910
1942
|
"data-testid": "patient-form-email-input"
|
|
1911
1943
|
}
|
|
1912
1944
|
) }),
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
1914
|
-
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1946
|
+
import_core8.Select,
|
|
1915
1947
|
{
|
|
1916
1948
|
readOnly: mode === "view",
|
|
1917
1949
|
withAsterisk: mode !== "view",
|
|
@@ -1921,20 +1953,21 @@ var PatientForm = ({
|
|
|
1921
1953
|
"data-testid": "patient-form-marital-status-select"
|
|
1922
1954
|
}
|
|
1923
1955
|
) }),
|
|
1924
|
-
/* @__PURE__ */ (0,
|
|
1925
|
-
|
|
1956
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 12, mt: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1957
|
+
import_core8.Checkbox,
|
|
1926
1958
|
{
|
|
1927
1959
|
readOnly: mode === "view",
|
|
1928
|
-
label: /* @__PURE__ */ (0,
|
|
1960
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Text, { fz: "sm", children: [
|
|
1929
1961
|
"Autorizo el tratamiento de mis datos personales conforme a la",
|
|
1930
1962
|
" ",
|
|
1931
|
-
/* @__PURE__ */ (0,
|
|
1932
|
-
|
|
1963
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1964
|
+
import_core8.Text,
|
|
1933
1965
|
{
|
|
1934
1966
|
span: true,
|
|
1935
1967
|
c: "brand-color",
|
|
1936
1968
|
td: "underline",
|
|
1937
1969
|
style: { cursor: "pointer" },
|
|
1970
|
+
onClick: () => setOpenPatientFormPolicy(true),
|
|
1938
1971
|
"data-testid": "patient-form-data-policy-link",
|
|
1939
1972
|
children: "pol\xEDtica de tratamiento de datos."
|
|
1940
1973
|
}
|
|
@@ -1945,9 +1978,9 @@ var PatientForm = ({
|
|
|
1945
1978
|
"data-testid": "patient-form-data-policy-checkbox"
|
|
1946
1979
|
}
|
|
1947
1980
|
) }),
|
|
1948
|
-
/* @__PURE__ */ (0,
|
|
1949
|
-
/* @__PURE__ */ (0,
|
|
1950
|
-
|
|
1981
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { mt: "md", span: 12, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Title, { order: 6, c: "brand-color", children: "Informaci\xF3n complementaria" }) }),
|
|
1982
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1983
|
+
import_core8.Select,
|
|
1951
1984
|
{
|
|
1952
1985
|
readOnly: mode === "view",
|
|
1953
1986
|
withAsterisk: mode !== "view",
|
|
@@ -1961,8 +1994,8 @@ var PatientForm = ({
|
|
|
1961
1994
|
"data-testid": "patient-form-province-select"
|
|
1962
1995
|
}
|
|
1963
1996
|
) }),
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
1965
|
-
|
|
1997
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1998
|
+
import_core8.Select,
|
|
1966
1999
|
{
|
|
1967
2000
|
readOnly: mode === "view",
|
|
1968
2001
|
withAsterisk: mode !== "view",
|
|
@@ -1972,8 +2005,8 @@ var PatientForm = ({
|
|
|
1972
2005
|
"data-testid": "patient-form-city-select"
|
|
1973
2006
|
}
|
|
1974
2007
|
) }),
|
|
1975
|
-
/* @__PURE__ */ (0,
|
|
1976
|
-
|
|
2008
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2009
|
+
import_core8.TextInput,
|
|
1977
2010
|
{
|
|
1978
2011
|
readOnly: mode === "view",
|
|
1979
2012
|
label: "Direcci\xF3n",
|
|
@@ -1981,8 +2014,8 @@ var PatientForm = ({
|
|
|
1981
2014
|
"data-testid": "patient-form-home-address-input"
|
|
1982
2015
|
}
|
|
1983
2016
|
) }),
|
|
1984
|
-
/* @__PURE__ */ (0,
|
|
1985
|
-
|
|
2017
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2018
|
+
import_core8.Select,
|
|
1986
2019
|
{
|
|
1987
2020
|
readOnly: mode === "view",
|
|
1988
2021
|
label: "Grupo sangu\xEDneo",
|
|
@@ -1991,8 +2024,8 @@ var PatientForm = ({
|
|
|
1991
2024
|
"data-testid": "patient-form-blood-type-select"
|
|
1992
2025
|
}
|
|
1993
2026
|
) }),
|
|
1994
|
-
/* @__PURE__ */ (0,
|
|
1995
|
-
|
|
2027
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2028
|
+
import_core8.NumberInput,
|
|
1996
2029
|
{
|
|
1997
2030
|
readOnly: mode === "view",
|
|
1998
2031
|
withAsterisk: mode !== "view",
|
|
@@ -2004,8 +2037,8 @@ var PatientForm = ({
|
|
|
2004
2037
|
"data-testid": "patient-form-cellphone-input"
|
|
2005
2038
|
}
|
|
2006
2039
|
) }),
|
|
2007
|
-
/* @__PURE__ */ (0,
|
|
2008
|
-
|
|
2040
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2041
|
+
import_core8.NumberInput,
|
|
2009
2042
|
{
|
|
2010
2043
|
readOnly: mode === "view",
|
|
2011
2044
|
label: "Tel\xE9fono fijo",
|
|
@@ -2016,8 +2049,8 @@ var PatientForm = ({
|
|
|
2016
2049
|
"data-testid": "patient-form-homephone-input"
|
|
2017
2050
|
}
|
|
2018
2051
|
) }),
|
|
2019
|
-
/* @__PURE__ */ (0,
|
|
2020
|
-
|
|
2052
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2053
|
+
import_core8.Select,
|
|
2021
2054
|
{
|
|
2022
2055
|
readOnly: mode === "view",
|
|
2023
2056
|
label: "Estrato",
|
|
@@ -2026,8 +2059,8 @@ var PatientForm = ({
|
|
|
2026
2059
|
"data-testid": "patient-form-stratum-select"
|
|
2027
2060
|
}
|
|
2028
2061
|
) }),
|
|
2029
|
-
/* @__PURE__ */ (0,
|
|
2030
|
-
|
|
2062
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2063
|
+
import_core8.Select,
|
|
2031
2064
|
{
|
|
2032
2065
|
readOnly: mode === "view",
|
|
2033
2066
|
label: "Pertenencia \xE9tnica",
|
|
@@ -2036,8 +2069,8 @@ var PatientForm = ({
|
|
|
2036
2069
|
"data-testid": "patient-form-ethnic-group-select"
|
|
2037
2070
|
}
|
|
2038
2071
|
) }),
|
|
2039
|
-
/* @__PURE__ */ (0,
|
|
2040
|
-
|
|
2072
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2073
|
+
import_core8.Select,
|
|
2041
2074
|
{
|
|
2042
2075
|
readOnly: mode === "view",
|
|
2043
2076
|
label: "Nivel educativo",
|
|
@@ -2046,11 +2079,11 @@ var PatientForm = ({
|
|
|
2046
2079
|
"data-testid": "patient-form-education-level-select"
|
|
2047
2080
|
}
|
|
2048
2081
|
) }),
|
|
2049
|
-
/* @__PURE__ */ (0,
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2051
|
-
/* @__PURE__ */ (0,
|
|
2052
|
-
/* @__PURE__ */ (0,
|
|
2053
|
-
|
|
2082
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 12, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Paper, { withBorder: true, p: "md", bg: "brand-color.0", shadow: "none", children: [
|
|
2083
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Title, { order: 6, c: "brand-color", mb: "sm", children: "Aseguradora obligatoria" }),
|
|
2084
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Grid, { children: [
|
|
2085
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2086
|
+
import_core8.Select,
|
|
2054
2087
|
{
|
|
2055
2088
|
readOnly: mode === "view",
|
|
2056
2089
|
withAsterisk: mode !== "view",
|
|
@@ -2067,8 +2100,8 @@ var PatientForm = ({
|
|
|
2067
2100
|
"data-testid": "patient-form-mandatory-insurance-company-select"
|
|
2068
2101
|
}
|
|
2069
2102
|
) }),
|
|
2070
|
-
/* @__PURE__ */ (0,
|
|
2071
|
-
|
|
2103
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2104
|
+
import_core8.Select,
|
|
2072
2105
|
{
|
|
2073
2106
|
readOnly: mode === "view",
|
|
2074
2107
|
withAsterisk: mode !== "view",
|
|
@@ -2084,8 +2117,8 @@ var PatientForm = ({
|
|
|
2084
2117
|
"data-testid": "patient-form-mandatory-insurance-plan-select"
|
|
2085
2118
|
}
|
|
2086
2119
|
) }),
|
|
2087
|
-
/* @__PURE__ */ (0,
|
|
2088
|
-
|
|
2120
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2121
|
+
import_core8.Select,
|
|
2089
2122
|
{
|
|
2090
2123
|
readOnly: mode === "view",
|
|
2091
2124
|
withAsterisk: mode !== "view",
|
|
@@ -2095,8 +2128,8 @@ var PatientForm = ({
|
|
|
2095
2128
|
"data-testid": "patient-form-mandatory-insurance-population-select"
|
|
2096
2129
|
}
|
|
2097
2130
|
) }),
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2132
|
+
import_core8.Select,
|
|
2100
2133
|
{
|
|
2101
2134
|
readOnly: mode === "view",
|
|
2102
2135
|
withAsterisk: mode !== "view",
|
|
@@ -2106,8 +2139,8 @@ var PatientForm = ({
|
|
|
2106
2139
|
"data-testid": "patient-form-mandatory-insurance-group-select"
|
|
2107
2140
|
}
|
|
2108
2141
|
) }),
|
|
2109
|
-
/* @__PURE__ */ (0,
|
|
2110
|
-
|
|
2142
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 6, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2143
|
+
import_core8.TextInput,
|
|
2111
2144
|
{
|
|
2112
2145
|
readOnly: mode === "view",
|
|
2113
2146
|
label: "N\xFAmero de p\xF3liza",
|
|
@@ -2117,8 +2150,8 @@ var PatientForm = ({
|
|
|
2117
2150
|
) })
|
|
2118
2151
|
] })
|
|
2119
2152
|
] }) }),
|
|
2120
|
-
/* @__PURE__ */ (0,
|
|
2121
|
-
form.values.voluntaryInsurance.map((insurance, index) => /* @__PURE__ */ (0,
|
|
2153
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Grid.Col, { span: 12, children: [
|
|
2154
|
+
form.values.voluntaryInsurance.map((insurance, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2122
2155
|
PatientVoluntaryInsuranceForm,
|
|
2123
2156
|
{
|
|
2124
2157
|
index,
|
|
@@ -2127,22 +2160,22 @@ var PatientForm = ({
|
|
|
2127
2160
|
},
|
|
2128
2161
|
insurance.id ?? index
|
|
2129
2162
|
)),
|
|
2130
|
-
/* @__PURE__ */ (0,
|
|
2131
|
-
|
|
2163
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Flex, { justify: "flex-end", children: mode !== "view" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2164
|
+
import_core8.Button,
|
|
2132
2165
|
{
|
|
2133
2166
|
variant: "outline",
|
|
2134
2167
|
color: "secondary",
|
|
2135
2168
|
size: "xs",
|
|
2136
2169
|
onClick: handleAddVoluntaryInsurance,
|
|
2137
|
-
leftSection: /* @__PURE__ */ (0,
|
|
2170
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react6.IconPlus, { style: { width: 16, height: 16 } }),
|
|
2138
2171
|
"data-testid": "patient-form-add-voluntary-insurance-button",
|
|
2139
2172
|
children: "Agregar aseguradora voluntaria"
|
|
2140
2173
|
}
|
|
2141
2174
|
) })
|
|
2142
2175
|
] })
|
|
2143
2176
|
] }),
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2145
|
-
|
|
2177
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Flex, { justify: "flex-end", mt: "lg", children: mode !== "view" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2178
|
+
import_core8.Button,
|
|
2146
2179
|
{
|
|
2147
2180
|
type: "submit",
|
|
2148
2181
|
color: "secondary-color",
|
|
@@ -2151,9 +2184,9 @@ var PatientForm = ({
|
|
|
2151
2184
|
children: "Guardar"
|
|
2152
2185
|
}
|
|
2153
2186
|
) }),
|
|
2154
|
-
mode === "view" && /* @__PURE__ */ (0,
|
|
2187
|
+
mode === "view" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PatientAppointmentHistory, { patientId })
|
|
2155
2188
|
] }),
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2189
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2157
2190
|
PatientNotes,
|
|
2158
2191
|
{
|
|
2159
2192
|
isOpen: openPatientNotes,
|
|
@@ -2161,7 +2194,7 @@ var PatientForm = ({
|
|
|
2161
2194
|
patientId
|
|
2162
2195
|
}
|
|
2163
2196
|
),
|
|
2164
|
-
/* @__PURE__ */ (0,
|
|
2197
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2165
2198
|
PatientAssistanceRisks,
|
|
2166
2199
|
{
|
|
2167
2200
|
isOpen: openPatientAssistanceRisks,
|
|
@@ -2169,13 +2202,21 @@ var PatientForm = ({
|
|
|
2169
2202
|
patientId
|
|
2170
2203
|
}
|
|
2171
2204
|
),
|
|
2172
|
-
/* @__PURE__ */ (0,
|
|
2205
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2173
2206
|
PatientAdministrativeRisks,
|
|
2174
2207
|
{
|
|
2175
2208
|
isOpen: openPatientAdministrativeRisks,
|
|
2176
2209
|
onClose: () => setOpenPatientAdministrativeRisks(false),
|
|
2177
2210
|
patientId
|
|
2178
2211
|
}
|
|
2212
|
+
),
|
|
2213
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2214
|
+
PatientFormPolicy,
|
|
2215
|
+
{
|
|
2216
|
+
content: policyContent,
|
|
2217
|
+
opened: openPatientFormPolicy,
|
|
2218
|
+
onClose: () => setOpenPatientFormPolicy(false)
|
|
2219
|
+
}
|
|
2179
2220
|
)
|
|
2180
2221
|
] });
|
|
2181
2222
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -46,11 +46,12 @@ interface PatientContractPayload {
|
|
|
46
46
|
interface PatientFormProps {
|
|
47
47
|
defaultMode: PatientFormMode;
|
|
48
48
|
patientId?: number;
|
|
49
|
+
policyContent?: string;
|
|
49
50
|
onSavePatient?: (payload: PatientPayload, mode: PatientFormMode) => void;
|
|
50
51
|
onSaveError?: (error: string) => void;
|
|
51
52
|
onBack?: () => void;
|
|
52
53
|
}
|
|
53
|
-
declare const PatientForm: ({ defaultMode, patientId, onSavePatient, onSaveError, onBack, }: PatientFormProps) => react_jsx_runtime.JSX.Element;
|
|
54
|
+
declare const PatientForm: ({ defaultMode, patientId, policyContent, onSavePatient, onSaveError, onBack, }: PatientFormProps) => react_jsx_runtime.JSX.Element;
|
|
54
55
|
|
|
55
56
|
interface Comment {
|
|
56
57
|
id: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -46,11 +46,12 @@ interface PatientContractPayload {
|
|
|
46
46
|
interface PatientFormProps {
|
|
47
47
|
defaultMode: PatientFormMode;
|
|
48
48
|
patientId?: number;
|
|
49
|
+
policyContent?: string;
|
|
49
50
|
onSavePatient?: (payload: PatientPayload, mode: PatientFormMode) => void;
|
|
50
51
|
onSaveError?: (error: string) => void;
|
|
51
52
|
onBack?: () => void;
|
|
52
53
|
}
|
|
53
|
-
declare const PatientForm: ({ defaultMode, patientId, onSavePatient, onSaveError, onBack, }: PatientFormProps) => react_jsx_runtime.JSX.Element;
|
|
54
|
+
declare const PatientForm: ({ defaultMode, patientId, policyContent, onSavePatient, onSaveError, onBack, }: PatientFormProps) => react_jsx_runtime.JSX.Element;
|
|
54
55
|
|
|
55
56
|
interface Comment {
|
|
56
57
|
id: number;
|
package/dist/index.js
CHANGED
|
@@ -3,16 +3,16 @@ import { useEffect as useEffect3, useMemo as useMemo4, useState as useState5 } f
|
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import {
|
|
5
5
|
ActionIcon as ActionIcon6,
|
|
6
|
-
Button as
|
|
6
|
+
Button as Button4,
|
|
7
7
|
Checkbox,
|
|
8
|
-
Flex as
|
|
8
|
+
Flex as Flex7,
|
|
9
9
|
Grid as Grid3,
|
|
10
10
|
NumberInput,
|
|
11
11
|
Paper as Paper5,
|
|
12
12
|
Select as Select4,
|
|
13
13
|
Text as Text6,
|
|
14
14
|
TextInput as TextInput3,
|
|
15
|
-
Title as
|
|
15
|
+
Title as Title5,
|
|
16
16
|
Tooltip
|
|
17
17
|
} from "@mantine/core";
|
|
18
18
|
import { useForm } from "@mantine/form";
|
|
@@ -1425,11 +1425,42 @@ var PatientAppointmentHistory = ({ patientId }) => {
|
|
|
1425
1425
|
] });
|
|
1426
1426
|
};
|
|
1427
1427
|
|
|
1428
|
+
// src/components/PatientFormPolicy.tsx
|
|
1429
|
+
import { Modal as Modal4, Box as Box3, Title as Title4, Flex as Flex6, Button as Button3 } from "@mantine/core";
|
|
1430
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1431
|
+
function PatientFormPolicy({ content, opened, onClose }) {
|
|
1432
|
+
return /* @__PURE__ */ jsxs7(
|
|
1433
|
+
Modal4,
|
|
1434
|
+
{
|
|
1435
|
+
opened,
|
|
1436
|
+
onClose,
|
|
1437
|
+
title: /* @__PURE__ */ jsx8(Title4, { order: 4, c: "brand-color", children: "Pol\xEDtica de datos" }),
|
|
1438
|
+
size: "lg",
|
|
1439
|
+
centered: true,
|
|
1440
|
+
children: [
|
|
1441
|
+
/* @__PURE__ */ jsx8(
|
|
1442
|
+
Box3,
|
|
1443
|
+
{
|
|
1444
|
+
dangerouslySetInnerHTML: { __html: content || "No hay pol\xEDtica de datos disponible." },
|
|
1445
|
+
style: {
|
|
1446
|
+
maxHeight: "60vh",
|
|
1447
|
+
overflowY: "auto",
|
|
1448
|
+
padding: "1rem"
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
),
|
|
1452
|
+
/* @__PURE__ */ jsx8(Flex6, { justify: "end", mt: "1rem", children: /* @__PURE__ */ jsx8(Button3, { onClick: onClose, children: "Aceptar" }) })
|
|
1453
|
+
]
|
|
1454
|
+
}
|
|
1455
|
+
);
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1428
1458
|
// src/components/PatientForm.tsx
|
|
1429
|
-
import { Fragment as Fragment2, jsx as
|
|
1459
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1430
1460
|
var PatientForm = ({
|
|
1431
1461
|
defaultMode,
|
|
1432
1462
|
patientId,
|
|
1463
|
+
policyContent,
|
|
1433
1464
|
onSavePatient,
|
|
1434
1465
|
onSaveError,
|
|
1435
1466
|
onBack
|
|
@@ -1439,6 +1470,7 @@ var PatientForm = ({
|
|
|
1439
1470
|
const [openPatientNotes, setOpenPatientNotes] = useState5(false);
|
|
1440
1471
|
const [openPatientAssistanceRisks, setOpenPatientAssistanceRisks] = useState5(false);
|
|
1441
1472
|
const [openPatientAdministrativeRisks, setOpenPatientAdministrativeRisks] = useState5(false);
|
|
1473
|
+
const [openPatientFormPolicy, setOpenPatientFormPolicy] = useState5(false);
|
|
1442
1474
|
const form = useForm({
|
|
1443
1475
|
mode: "controlled",
|
|
1444
1476
|
initialValues: {
|
|
@@ -1756,60 +1788,60 @@ var PatientForm = ({
|
|
|
1756
1788
|
label: ig.copaymentRateName
|
|
1757
1789
|
}));
|
|
1758
1790
|
}, [incomeGroups]);
|
|
1759
|
-
return /* @__PURE__ */
|
|
1760
|
-
/* @__PURE__ */
|
|
1791
|
+
return /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
1792
|
+
/* @__PURE__ */ jsx9(Flex7, { w: "100%", justify: "flex-end", children: /* @__PURE__ */ jsx9(
|
|
1761
1793
|
ActionIcon6,
|
|
1762
1794
|
{
|
|
1763
1795
|
variant: "subtle",
|
|
1764
1796
|
onClick: handleCancelForm,
|
|
1765
1797
|
"data-testid": "patient-form-close-button",
|
|
1766
|
-
children: /* @__PURE__ */
|
|
1798
|
+
children: /* @__PURE__ */ jsx9(IconX5, { style: { width: 30, height: 30 } })
|
|
1767
1799
|
}
|
|
1768
1800
|
) }),
|
|
1769
|
-
/* @__PURE__ */
|
|
1770
|
-
mode !== "create" && /* @__PURE__ */
|
|
1771
|
-
mode === "view" && /* @__PURE__ */
|
|
1801
|
+
/* @__PURE__ */ jsx9(Title5, { c: "secondary-color", mt: "xs", children: patientFormTitles[mode] }),
|
|
1802
|
+
mode !== "create" && /* @__PURE__ */ jsxs8(Flex7, { w: "100%", justify: "flex-end", gap: "xs", my: "xs", children: [
|
|
1803
|
+
mode === "view" && /* @__PURE__ */ jsx9(Tooltip, { label: "Editar", withArrow: true, children: /* @__PURE__ */ jsx9(
|
|
1772
1804
|
ActionIcon6,
|
|
1773
1805
|
{
|
|
1774
1806
|
variant: "subtle",
|
|
1775
1807
|
onClick: () => setMode("edit"),
|
|
1776
1808
|
"data-testid": "patient-form-edit-button",
|
|
1777
|
-
children: /* @__PURE__ */
|
|
1809
|
+
children: /* @__PURE__ */ jsx9(IconPencil, { style: { width: 24, height: 24 } })
|
|
1778
1810
|
}
|
|
1779
1811
|
) }),
|
|
1780
|
-
/* @__PURE__ */
|
|
1812
|
+
/* @__PURE__ */ jsx9(Tooltip, { label: "Ver notas", withArrow: true, children: /* @__PURE__ */ jsx9(
|
|
1781
1813
|
ActionIcon6,
|
|
1782
1814
|
{
|
|
1783
1815
|
variant: "subtle",
|
|
1784
1816
|
onClick: () => setOpenPatientNotes(true),
|
|
1785
1817
|
"data-testid": "patient-form-notes-button",
|
|
1786
|
-
children: /* @__PURE__ */
|
|
1818
|
+
children: /* @__PURE__ */ jsx9(IconMessage, { style: { width: 24, height: 24 } })
|
|
1787
1819
|
}
|
|
1788
1820
|
) }),
|
|
1789
|
-
/* @__PURE__ */
|
|
1821
|
+
/* @__PURE__ */ jsx9(Tooltip, { label: "Riesgo asistencial", withArrow: true, children: /* @__PURE__ */ jsx9(
|
|
1790
1822
|
ActionIcon6,
|
|
1791
1823
|
{
|
|
1792
1824
|
variant: "subtle",
|
|
1793
1825
|
color: "#83c036",
|
|
1794
1826
|
onClick: () => setOpenPatientAssistanceRisks(true),
|
|
1795
1827
|
"data-testid": "patient-form-assistance-risks-button",
|
|
1796
|
-
children: /* @__PURE__ */
|
|
1828
|
+
children: /* @__PURE__ */ jsx9(IconExclamationCircleFilled2, { style: { width: 24, height: 24 } })
|
|
1797
1829
|
}
|
|
1798
1830
|
) }),
|
|
1799
|
-
/* @__PURE__ */
|
|
1831
|
+
/* @__PURE__ */ jsx9(Tooltip, { label: "Riesgo administrativo", withArrow: true, children: /* @__PURE__ */ jsx9(
|
|
1800
1832
|
ActionIcon6,
|
|
1801
1833
|
{
|
|
1802
1834
|
variant: "subtle",
|
|
1803
1835
|
color: "#f39682",
|
|
1804
1836
|
onClick: () => setOpenPatientAdministrativeRisks(true),
|
|
1805
1837
|
"data-testid": "patient-form-administrative-risks-button",
|
|
1806
|
-
children: /* @__PURE__ */
|
|
1838
|
+
children: /* @__PURE__ */ jsx9(IconExclamationCircleFilled2, { style: { width: 24, height: 24 } })
|
|
1807
1839
|
}
|
|
1808
1840
|
) })
|
|
1809
1841
|
] }),
|
|
1810
|
-
/* @__PURE__ */
|
|
1811
|
-
/* @__PURE__ */
|
|
1812
|
-
/* @__PURE__ */
|
|
1842
|
+
/* @__PURE__ */ jsxs8("form", { onSubmit: form.onSubmit(handleSubmit), children: [
|
|
1843
|
+
/* @__PURE__ */ jsxs8(Grid3, { children: [
|
|
1844
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1813
1845
|
Select4,
|
|
1814
1846
|
{
|
|
1815
1847
|
readOnly: mode === "view",
|
|
@@ -1820,7 +1852,7 @@ var PatientForm = ({
|
|
|
1820
1852
|
"data-testid": "patient-form-document-type-select"
|
|
1821
1853
|
}
|
|
1822
1854
|
) }),
|
|
1823
|
-
/* @__PURE__ */
|
|
1855
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1824
1856
|
TextInput3,
|
|
1825
1857
|
{
|
|
1826
1858
|
readOnly: mode === "view",
|
|
@@ -1830,7 +1862,7 @@ var PatientForm = ({
|
|
|
1830
1862
|
"data-testid": "patient-form-document-number-input"
|
|
1831
1863
|
}
|
|
1832
1864
|
) }),
|
|
1833
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1834
1866
|
TextInput3,
|
|
1835
1867
|
{
|
|
1836
1868
|
readOnly: mode === "view",
|
|
@@ -1840,7 +1872,7 @@ var PatientForm = ({
|
|
|
1840
1872
|
"data-testid": "patient-form-first-name-input"
|
|
1841
1873
|
}
|
|
1842
1874
|
) }),
|
|
1843
|
-
/* @__PURE__ */
|
|
1875
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1844
1876
|
TextInput3,
|
|
1845
1877
|
{
|
|
1846
1878
|
readOnly: mode === "view",
|
|
@@ -1849,7 +1881,7 @@ var PatientForm = ({
|
|
|
1849
1881
|
"data-testid": "patient-form-middle-name-input"
|
|
1850
1882
|
}
|
|
1851
1883
|
) }),
|
|
1852
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1853
1885
|
TextInput3,
|
|
1854
1886
|
{
|
|
1855
1887
|
readOnly: mode === "view",
|
|
@@ -1859,7 +1891,7 @@ var PatientForm = ({
|
|
|
1859
1891
|
"data-testid": "patient-form-surname-input"
|
|
1860
1892
|
}
|
|
1861
1893
|
) }),
|
|
1862
|
-
/* @__PURE__ */
|
|
1894
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1863
1895
|
TextInput3,
|
|
1864
1896
|
{
|
|
1865
1897
|
readOnly: mode === "view",
|
|
@@ -1868,7 +1900,7 @@ var PatientForm = ({
|
|
|
1868
1900
|
"data-testid": "patient-form-second-surname-input"
|
|
1869
1901
|
}
|
|
1870
1902
|
) }),
|
|
1871
|
-
/* @__PURE__ */
|
|
1903
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1872
1904
|
TextInput3,
|
|
1873
1905
|
{
|
|
1874
1906
|
readOnly: mode === "view",
|
|
@@ -1879,7 +1911,7 @@ var PatientForm = ({
|
|
|
1879
1911
|
"data-testid": "patient-form-birth-date-input"
|
|
1880
1912
|
}
|
|
1881
1913
|
) }),
|
|
1882
|
-
/* @__PURE__ */
|
|
1914
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1883
1915
|
NumberInput,
|
|
1884
1916
|
{
|
|
1885
1917
|
readOnly: true,
|
|
@@ -1889,7 +1921,7 @@ var PatientForm = ({
|
|
|
1889
1921
|
"data-testid": "patient-form-age-input"
|
|
1890
1922
|
}
|
|
1891
1923
|
) }),
|
|
1892
|
-
/* @__PURE__ */
|
|
1924
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1893
1925
|
NumberInput,
|
|
1894
1926
|
{
|
|
1895
1927
|
readOnly: mode === "view",
|
|
@@ -1901,7 +1933,7 @@ var PatientForm = ({
|
|
|
1901
1933
|
"data-testid": "patient-form-whatsapp-input"
|
|
1902
1934
|
}
|
|
1903
1935
|
) }),
|
|
1904
|
-
/* @__PURE__ */
|
|
1936
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1905
1937
|
Select4,
|
|
1906
1938
|
{
|
|
1907
1939
|
readOnly: mode === "view",
|
|
@@ -1912,7 +1944,7 @@ var PatientForm = ({
|
|
|
1912
1944
|
"data-testid": "patient-form-gender-select"
|
|
1913
1945
|
}
|
|
1914
1946
|
) }),
|
|
1915
|
-
/* @__PURE__ */
|
|
1947
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1916
1948
|
Select4,
|
|
1917
1949
|
{
|
|
1918
1950
|
readOnly: mode === "view",
|
|
@@ -1923,7 +1955,7 @@ var PatientForm = ({
|
|
|
1923
1955
|
"data-testid": "patient-form-affiliation-type-select"
|
|
1924
1956
|
}
|
|
1925
1957
|
) }),
|
|
1926
|
-
/* @__PURE__ */
|
|
1958
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1927
1959
|
TextInput3,
|
|
1928
1960
|
{
|
|
1929
1961
|
readOnly: mode === "view",
|
|
@@ -1932,7 +1964,7 @@ var PatientForm = ({
|
|
|
1932
1964
|
"data-testid": "patient-form-email-input"
|
|
1933
1965
|
}
|
|
1934
1966
|
) }),
|
|
1935
|
-
/* @__PURE__ */
|
|
1967
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1936
1968
|
Select4,
|
|
1937
1969
|
{
|
|
1938
1970
|
readOnly: mode === "view",
|
|
@@ -1943,20 +1975,21 @@ var PatientForm = ({
|
|
|
1943
1975
|
"data-testid": "patient-form-marital-status-select"
|
|
1944
1976
|
}
|
|
1945
1977
|
) }),
|
|
1946
|
-
/* @__PURE__ */
|
|
1978
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 12, mt: "sm", children: /* @__PURE__ */ jsx9(
|
|
1947
1979
|
Checkbox,
|
|
1948
1980
|
{
|
|
1949
1981
|
readOnly: mode === "view",
|
|
1950
|
-
label: /* @__PURE__ */
|
|
1982
|
+
label: /* @__PURE__ */ jsxs8(Text6, { fz: "sm", children: [
|
|
1951
1983
|
"Autorizo el tratamiento de mis datos personales conforme a la",
|
|
1952
1984
|
" ",
|
|
1953
|
-
/* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ jsx9(
|
|
1954
1986
|
Text6,
|
|
1955
1987
|
{
|
|
1956
1988
|
span: true,
|
|
1957
1989
|
c: "brand-color",
|
|
1958
1990
|
td: "underline",
|
|
1959
1991
|
style: { cursor: "pointer" },
|
|
1992
|
+
onClick: () => setOpenPatientFormPolicy(true),
|
|
1960
1993
|
"data-testid": "patient-form-data-policy-link",
|
|
1961
1994
|
children: "pol\xEDtica de tratamiento de datos."
|
|
1962
1995
|
}
|
|
@@ -1967,8 +2000,8 @@ var PatientForm = ({
|
|
|
1967
2000
|
"data-testid": "patient-form-data-policy-checkbox"
|
|
1968
2001
|
}
|
|
1969
2002
|
) }),
|
|
1970
|
-
/* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
2003
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { mt: "md", span: 12, children: /* @__PURE__ */ jsx9(Title5, { order: 6, c: "brand-color", children: "Informaci\xF3n complementaria" }) }),
|
|
2004
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1972
2005
|
Select4,
|
|
1973
2006
|
{
|
|
1974
2007
|
readOnly: mode === "view",
|
|
@@ -1983,7 +2016,7 @@ var PatientForm = ({
|
|
|
1983
2016
|
"data-testid": "patient-form-province-select"
|
|
1984
2017
|
}
|
|
1985
2018
|
) }),
|
|
1986
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1987
2020
|
Select4,
|
|
1988
2021
|
{
|
|
1989
2022
|
readOnly: mode === "view",
|
|
@@ -1994,7 +2027,7 @@ var PatientForm = ({
|
|
|
1994
2027
|
"data-testid": "patient-form-city-select"
|
|
1995
2028
|
}
|
|
1996
2029
|
) }),
|
|
1997
|
-
/* @__PURE__ */
|
|
2030
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
1998
2031
|
TextInput3,
|
|
1999
2032
|
{
|
|
2000
2033
|
readOnly: mode === "view",
|
|
@@ -2003,7 +2036,7 @@ var PatientForm = ({
|
|
|
2003
2036
|
"data-testid": "patient-form-home-address-input"
|
|
2004
2037
|
}
|
|
2005
2038
|
) }),
|
|
2006
|
-
/* @__PURE__ */
|
|
2039
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2007
2040
|
Select4,
|
|
2008
2041
|
{
|
|
2009
2042
|
readOnly: mode === "view",
|
|
@@ -2013,7 +2046,7 @@ var PatientForm = ({
|
|
|
2013
2046
|
"data-testid": "patient-form-blood-type-select"
|
|
2014
2047
|
}
|
|
2015
2048
|
) }),
|
|
2016
|
-
/* @__PURE__ */
|
|
2049
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2017
2050
|
NumberInput,
|
|
2018
2051
|
{
|
|
2019
2052
|
readOnly: mode === "view",
|
|
@@ -2026,7 +2059,7 @@ var PatientForm = ({
|
|
|
2026
2059
|
"data-testid": "patient-form-cellphone-input"
|
|
2027
2060
|
}
|
|
2028
2061
|
) }),
|
|
2029
|
-
/* @__PURE__ */
|
|
2062
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2030
2063
|
NumberInput,
|
|
2031
2064
|
{
|
|
2032
2065
|
readOnly: mode === "view",
|
|
@@ -2038,7 +2071,7 @@ var PatientForm = ({
|
|
|
2038
2071
|
"data-testid": "patient-form-homephone-input"
|
|
2039
2072
|
}
|
|
2040
2073
|
) }),
|
|
2041
|
-
/* @__PURE__ */
|
|
2074
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2042
2075
|
Select4,
|
|
2043
2076
|
{
|
|
2044
2077
|
readOnly: mode === "view",
|
|
@@ -2048,7 +2081,7 @@ var PatientForm = ({
|
|
|
2048
2081
|
"data-testid": "patient-form-stratum-select"
|
|
2049
2082
|
}
|
|
2050
2083
|
) }),
|
|
2051
|
-
/* @__PURE__ */
|
|
2084
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2052
2085
|
Select4,
|
|
2053
2086
|
{
|
|
2054
2087
|
readOnly: mode === "view",
|
|
@@ -2058,7 +2091,7 @@ var PatientForm = ({
|
|
|
2058
2091
|
"data-testid": "patient-form-ethnic-group-select"
|
|
2059
2092
|
}
|
|
2060
2093
|
) }),
|
|
2061
|
-
/* @__PURE__ */
|
|
2094
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2062
2095
|
Select4,
|
|
2063
2096
|
{
|
|
2064
2097
|
readOnly: mode === "view",
|
|
@@ -2068,10 +2101,10 @@ var PatientForm = ({
|
|
|
2068
2101
|
"data-testid": "patient-form-education-level-select"
|
|
2069
2102
|
}
|
|
2070
2103
|
) }),
|
|
2071
|
-
/* @__PURE__ */
|
|
2072
|
-
/* @__PURE__ */
|
|
2073
|
-
/* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2104
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 12, children: /* @__PURE__ */ jsxs8(Paper5, { withBorder: true, p: "md", bg: "brand-color.0", shadow: "none", children: [
|
|
2105
|
+
/* @__PURE__ */ jsx9(Title5, { order: 6, c: "brand-color", mb: "sm", children: "Aseguradora obligatoria" }),
|
|
2106
|
+
/* @__PURE__ */ jsxs8(Grid3, { children: [
|
|
2107
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2075
2108
|
Select4,
|
|
2076
2109
|
{
|
|
2077
2110
|
readOnly: mode === "view",
|
|
@@ -2089,7 +2122,7 @@ var PatientForm = ({
|
|
|
2089
2122
|
"data-testid": "patient-form-mandatory-insurance-company-select"
|
|
2090
2123
|
}
|
|
2091
2124
|
) }),
|
|
2092
|
-
/* @__PURE__ */
|
|
2125
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2093
2126
|
Select4,
|
|
2094
2127
|
{
|
|
2095
2128
|
readOnly: mode === "view",
|
|
@@ -2106,7 +2139,7 @@ var PatientForm = ({
|
|
|
2106
2139
|
"data-testid": "patient-form-mandatory-insurance-plan-select"
|
|
2107
2140
|
}
|
|
2108
2141
|
) }),
|
|
2109
|
-
/* @__PURE__ */
|
|
2142
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2110
2143
|
Select4,
|
|
2111
2144
|
{
|
|
2112
2145
|
readOnly: mode === "view",
|
|
@@ -2117,7 +2150,7 @@ var PatientForm = ({
|
|
|
2117
2150
|
"data-testid": "patient-form-mandatory-insurance-population-select"
|
|
2118
2151
|
}
|
|
2119
2152
|
) }),
|
|
2120
|
-
/* @__PURE__ */
|
|
2153
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2121
2154
|
Select4,
|
|
2122
2155
|
{
|
|
2123
2156
|
readOnly: mode === "view",
|
|
@@ -2128,7 +2161,7 @@ var PatientForm = ({
|
|
|
2128
2161
|
"data-testid": "patient-form-mandatory-insurance-group-select"
|
|
2129
2162
|
}
|
|
2130
2163
|
) }),
|
|
2131
|
-
/* @__PURE__ */
|
|
2164
|
+
/* @__PURE__ */ jsx9(Grid3.Col, { span: 6, children: /* @__PURE__ */ jsx9(
|
|
2132
2165
|
TextInput3,
|
|
2133
2166
|
{
|
|
2134
2167
|
readOnly: mode === "view",
|
|
@@ -2139,8 +2172,8 @@ var PatientForm = ({
|
|
|
2139
2172
|
) })
|
|
2140
2173
|
] })
|
|
2141
2174
|
] }) }),
|
|
2142
|
-
/* @__PURE__ */
|
|
2143
|
-
form.values.voluntaryInsurance.map((insurance, index) => /* @__PURE__ */
|
|
2175
|
+
/* @__PURE__ */ jsxs8(Grid3.Col, { span: 12, children: [
|
|
2176
|
+
form.values.voluntaryInsurance.map((insurance, index) => /* @__PURE__ */ jsx9(
|
|
2144
2177
|
PatientVoluntaryInsuranceForm,
|
|
2145
2178
|
{
|
|
2146
2179
|
index,
|
|
@@ -2149,22 +2182,22 @@ var PatientForm = ({
|
|
|
2149
2182
|
},
|
|
2150
2183
|
insurance.id ?? index
|
|
2151
2184
|
)),
|
|
2152
|
-
/* @__PURE__ */
|
|
2153
|
-
|
|
2185
|
+
/* @__PURE__ */ jsx9(Flex7, { justify: "flex-end", children: mode !== "view" && /* @__PURE__ */ jsx9(
|
|
2186
|
+
Button4,
|
|
2154
2187
|
{
|
|
2155
2188
|
variant: "outline",
|
|
2156
2189
|
color: "secondary",
|
|
2157
2190
|
size: "xs",
|
|
2158
2191
|
onClick: handleAddVoluntaryInsurance,
|
|
2159
|
-
leftSection: /* @__PURE__ */
|
|
2192
|
+
leftSection: /* @__PURE__ */ jsx9(IconPlus, { style: { width: 16, height: 16 } }),
|
|
2160
2193
|
"data-testid": "patient-form-add-voluntary-insurance-button",
|
|
2161
2194
|
children: "Agregar aseguradora voluntaria"
|
|
2162
2195
|
}
|
|
2163
2196
|
) })
|
|
2164
2197
|
] })
|
|
2165
2198
|
] }),
|
|
2166
|
-
/* @__PURE__ */
|
|
2167
|
-
|
|
2199
|
+
/* @__PURE__ */ jsx9(Flex7, { justify: "flex-end", mt: "lg", children: mode !== "view" && /* @__PURE__ */ jsx9(
|
|
2200
|
+
Button4,
|
|
2168
2201
|
{
|
|
2169
2202
|
type: "submit",
|
|
2170
2203
|
color: "secondary-color",
|
|
@@ -2173,9 +2206,9 @@ var PatientForm = ({
|
|
|
2173
2206
|
children: "Guardar"
|
|
2174
2207
|
}
|
|
2175
2208
|
) }),
|
|
2176
|
-
mode === "view" && /* @__PURE__ */
|
|
2209
|
+
mode === "view" && /* @__PURE__ */ jsx9(PatientAppointmentHistory, { patientId })
|
|
2177
2210
|
] }),
|
|
2178
|
-
/* @__PURE__ */
|
|
2211
|
+
/* @__PURE__ */ jsx9(
|
|
2179
2212
|
PatientNotes,
|
|
2180
2213
|
{
|
|
2181
2214
|
isOpen: openPatientNotes,
|
|
@@ -2183,7 +2216,7 @@ var PatientForm = ({
|
|
|
2183
2216
|
patientId
|
|
2184
2217
|
}
|
|
2185
2218
|
),
|
|
2186
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ jsx9(
|
|
2187
2220
|
PatientAssistanceRisks,
|
|
2188
2221
|
{
|
|
2189
2222
|
isOpen: openPatientAssistanceRisks,
|
|
@@ -2191,13 +2224,21 @@ var PatientForm = ({
|
|
|
2191
2224
|
patientId
|
|
2192
2225
|
}
|
|
2193
2226
|
),
|
|
2194
|
-
/* @__PURE__ */
|
|
2227
|
+
/* @__PURE__ */ jsx9(
|
|
2195
2228
|
PatientAdministrativeRisks,
|
|
2196
2229
|
{
|
|
2197
2230
|
isOpen: openPatientAdministrativeRisks,
|
|
2198
2231
|
onClose: () => setOpenPatientAdministrativeRisks(false),
|
|
2199
2232
|
patientId
|
|
2200
2233
|
}
|
|
2234
|
+
),
|
|
2235
|
+
/* @__PURE__ */ jsx9(
|
|
2236
|
+
PatientFormPolicy,
|
|
2237
|
+
{
|
|
2238
|
+
content: policyContent,
|
|
2239
|
+
opened: openPatientFormPolicy,
|
|
2240
|
+
onClose: () => setOpenPatientFormPolicy(false)
|
|
2241
|
+
}
|
|
2201
2242
|
)
|
|
2202
2243
|
] });
|
|
2203
2244
|
};
|