From bf0439c49dc77515919d8ac35355cb17537eedc7 Mon Sep 17 00:00:00 2001 From: Sergio Nicolas Lavaise Date: Tue, 21 Apr 2026 03:00:38 -0300 Subject: [PATCH] refactor: remove unused state variables and streamline Tabs layout in HistoriaClinica component --- src/sections/HistoriaClinica.tsx | 242 ++++++++++++++++--------------- 1 file changed, 128 insertions(+), 114 deletions(-) diff --git a/src/sections/HistoriaClinica.tsx b/src/sections/HistoriaClinica.tsx index 222ca9b..4dac8f3 100644 --- a/src/sections/HistoriaClinica.tsx +++ b/src/sections/HistoriaClinica.tsx @@ -206,15 +206,7 @@ export function HistoriaClinica({ onEditarIngreso, }: HistoriaClinicaProps) { const [tabActivo, setTabActivo] = useState('evoluciones'); - const [detalleExpandido, setDetalleExpandido] = useState(false); - const [editIngresoDialog, setEditIngresoDialog] = useState(false); - const [editFechaIngreso, setEditFechaIngreso] = useState(internacion.fechaIngresoClinica); - const [editMotivoConsulta, setEditMotivoConsulta] = useState(internacion.motivoConsulta || ''); - const [editDiagnostico, setEditDiagnostico] = useState(internacion.diagnosticoIngreso || ''); - const [editEnfermedadActual, setEditEnfermedadActual] = useState(internacion.enfermedadActual || ''); - const [editAntecedentes, setEditAntecedentes] = useState(internacion.antecedentesEnfermedadActual || ''); - const [editMedico, setEditMedico] = useState(internacion.medicoIngresante || ''); - const [editCamaId, setEditCamaId] = useState(internacion.camaId || ''); + const calcularEdad = (fechaNacimiento: string) => { const hoy = new Date(); @@ -250,18 +242,19 @@ export function HistoriaClinica({ -
- - -
+ +
+ + +
@@ -472,105 +465,108 @@ export function HistoriaClinica({ +
+
+ + + + + + Evoluciones + ({evoluciones.length}) + - - - - - - Evoluciones - ({evoluciones.length}) - + + + Indicaciones - - - Indicaciones + - + + + Laboratorio + ({laboratorios.length}) + + + + EAB + ({acidosBase.length}) + + + + Cultivos + ({cultivos.length}) + + + + ATB + ({atb.length}) + + + + Estudios + ({estudiosComplementarios.length}) + + + + Interconsultas + ({interconsultas.length}) + + + + - - - Laboratorio - ({laboratorios.length}) - - - - EAB - ({acidosBase.length}) - - - - Cultivos - ({cultivos.length}) - - - - ATB - ({atb.length}) - - - - Estudios - ({estudiosComplementarios.length}) - - - - Interconsultas - ({interconsultas.length}) - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + + +
+
); } @@ -1388,10 +1384,10 @@ function SeccionEvoluciones({ evos, internacionId, add, update, del }: {
-