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