From 4ee30ad8fe6d94b50c6fde7e05f81712a239282a Mon Sep 17 00:00:00 2001 From: snlavaise Date: Wed, 12 Aug 2026 01:51:26 +0000 Subject: [PATCH] =?UTF-8?q?Agregar=20boton=20Ver=20Otros=20y=20modal=20de?= =?UTF-8?q?=20observaciones=20en=20la=20pesta=C3=B1a=20laboratorios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sections/HistoriaClinica.tsx | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/sections/HistoriaClinica.tsx b/src/sections/HistoriaClinica.tsx index 7f0bc0d..bb0e129 100644 --- a/src/sections/HistoriaClinica.tsx +++ b/src/sections/HistoriaClinica.tsx @@ -951,6 +951,7 @@ function SeccionLaboratorios({ lab, patientId, internacionId, add, update, del, }) { const [dialog, setDialog] = useState(false); const [obsDialog, setObsDialog] = useState(false); + const [otrosDialog, setOtrosDialog] = useState(false); const [evolDialog, setEvolDialog] = useState(false); const [edit, setEdit] = useState(null); const [obsLab, setObsLab] = useState(null); @@ -1444,6 +1445,14 @@ function SeccionLaboratorios({ lab, patientId, internacionId, add, update, del, return labSortAsc ? -diff : diff; }); + const labsConObservaciones = lab + .filter(l => l.pacienteId === patientId && l.observaciones && l.observaciones.trim() !== '') + .sort((a, b) => { + const dateA = new Date(a.fecha + 'T' + (a.hora || '00:00')).getTime(); + const dateB = new Date(b.fecha + 'T' + (b.hora || '00:00')).getTime(); + return dateB - dateA; + }); + return (
@@ -1451,6 +1460,7 @@ function SeccionLaboratorios({ lab, patientId, internacionId, add, update, del, {canEdit && } +
@@ -1529,6 +1539,32 @@ function SeccionLaboratorios({ lab, patientId, internacionId, add, update, del, + + + + Otros / Observaciones de Laboratorio + +
+ {labsConObservaciones.length === 0 ? ( +

No hay observaciones registradas.

+ ) : ( + labsConObservaciones.map(l => ( +
+
+ {formatDateDDMMYYYY(l.fecha)} {l.hora || ''} + Obs +
+

{l.observaciones}

+
+ )) + )} +
+
+ +
+
+
+