From 4c94311c0287ff2bf42a62fef1fefd960f7877de Mon Sep 17 00:00:00 2001 From: Santiago Lavaise Date: Mon, 13 Apr 2026 00:46:16 -0300 Subject: [PATCH] =?UTF-8?q?Fix:=20Mapa=20de=20camas=20responsive=20y=20mej?= =?UTF-8?q?oras=20en=20Historia=20Cl=C3=ADnica?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 6 +-- src/sections/HistoriaClinica.tsx | 81 ++++++++++++++++++-------------- src/sections/MapaCamas.tsx | 2 +- 3 files changed, 50 insertions(+), 39 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 16b206a..f3534ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,11 +4,11 @@ services: app: build: . ports: - - "80:80" + - "8077:80" - "4000:4000" volumes: - - hospital-data:/app/data + - hospital-data:/app restart: unless-stopped volumes: - hospital-data: \ No newline at end of file + hospital-data: diff --git a/src/sections/HistoriaClinica.tsx b/src/sections/HistoriaClinica.tsx index db71aa8..502e599 100644 --- a/src/sections/HistoriaClinica.tsx +++ b/src/sections/HistoriaClinica.tsx @@ -1,14 +1,14 @@ import { useState } from 'react'; import { PDFDocument } from 'pdf-lib'; -import { - FlaskConical, - Activity, - Microscope, - Plus, - Calendar, - Clock, - AlertCircle, - CheckCircle2, +import { + FlaskConical, + Activity, + Microscope, + Plus, + Calendar, + Clock, + AlertCircle, + CheckCircle2, ArrowLeft, Pencil, Trash2, @@ -154,23 +154,34 @@ export function HistoriaClinica({
- +

Historia Clínica

Cama: {cama?.numero || 'N/A'} | {paciente.apellido}, {paciente.nombre} | {paciente.fechaNacimiento ? calcularEdad(paciente.fechaNacimiento) + ' años' : ''} | DNI: {paciente.dni}

+
- + +
+ + + +
+
+ + + + @@ -284,7 +295,7 @@ export function HistoriaClinica({ try { const formField = form.getTextField(field.name); if (formField) formField.setText(field.value); - } catch (e) {} + } catch (e) { } } const pdfBytes = await pdfDoc.save(); const blob = new Blob([new Uint8Array(pdfBytes)], { type: 'application/pdf' }); @@ -793,9 +804,9 @@ function SeccionAcidosBase({ ab, patientId, add, del }: { const [lactato, setLactato] = useState(''); const [interpretacion, setInterpretacion] = useState(''); - const reset = () => { + const reset = () => { setFecha(new Date().toISOString().split('T')[0]); - setHora(new Date().toTimeString().slice(0, 5)); + setHora(new Date().toTimeString().slice(0, 5)); setPh(''); setPco2(''); setPo2(''); setHco3(''); setBe(''); setSato2(''); setLactato(''); setInterpretacion(''); }; @@ -917,12 +928,12 @@ function SeccionCultivos({ cults, patient, add, update, del }: { const [sensible, setSensible] = useState(''); const [resistente, setResistente] = useState(''); - const reset = () => { - setFechaToma(new Date().toISOString().split('T')[0]); + const reset = () => { + setFechaToma(new Date().toISOString().split('T')[0]); setProtocolo(''); - setTipoMuestra('HMCx2'); - setObservaciones(''); - setSelected(null); + setTipoMuestra('HMCx2'); + setObservaciones(''); + setSelected(null); }; const resetRes = () => { @@ -956,7 +967,7 @@ function SeccionCultivos({ cults, patient, add, update, del }: { const cs = cults.filter(c => c.pacienteId === patient.id).sort((a, b) => new Date(b.fechaToma).getTime() - new Date(a.fechaToma).getTime()); - const getEstadoColor = (estado:Cultivo['estado']) => { + const getEstadoColor = (estado: Cultivo['estado']) => { switch (estado) { case 'NAF/Pendiente': return 'bg-amber-100 text-amber-800'; case 'Parcial': return 'bg-orange-100 text-orange-800'; @@ -975,19 +986,19 @@ function SeccionCultivos({ cults, patient, add, update, del }: { }; const handle = () => { add({ pacienteId: patient.id, fechaToma, protocolo: protocolo || undefined, tipoMuestra, observaciones: observaciones || undefined, estado: 'NAF/Pendiente' }); setDialog(false); reset(); }; - - const handleParcial = () => { + + const handleParcial = () => { if (!selected) return; update(selected.id, { estado: 'Parcial', germen: germen || undefined, sensible: sensible || undefined, resistente: resistente || undefined }); - setResDialog(false); - resetRes(); + setResDialog(false); + resetRes(); }; - const handleDefinitivo = () => { + const handleDefinitivo = () => { if (!selected) return; update(selected.id, { fechaResultado, estado: estadoResultado, germen: germen || undefined, sensible: sensible || undefined, resistente: resistente || undefined }); - setEditDialog(false); - resetRes(); + setEditDialog(false); + resetRes(); }; return ( @@ -1005,7 +1016,7 @@ function SeccionCultivos({ cults, patient, add, update, del }: {
- setTipoMuestra(v)}> HMCx2 @@ -1049,7 +1060,7 @@ function SeccionCultivos({ cults, patient, add, update, del }: {
setFechaResultado(e.target.value)} />
- setEstadoResultado(v)}> Positivo diff --git a/src/sections/MapaCamas.tsx b/src/sections/MapaCamas.tsx index d6b3fb6..078473a 100644 --- a/src/sections/MapaCamas.tsx +++ b/src/sections/MapaCamas.tsx @@ -277,7 +277,7 @@ export function MapaCamas({ {/* Mapa de Camas */} -
+
{sortedCamas.map((cama) => { const paciente = cama.pacienteId ? getPacienteById(cama.pacienteId) : null; const internacion = cama.internacionId ? getInternacionById(cama.internacionId) : null;