diff --git a/modules/turnero/views/recepcion.php b/modules/turnero/views/recepcion.php index 182bc45..81b5c4e 100644 --- a/modules/turnero/views/recepcion.php +++ b/modules/turnero/views/recepcion.php @@ -1622,13 +1622,15 @@ function seleccionarPaciente(pac) { document.getElementById('bloque-pac-kiosko').classList.remove('d-none'); } - // Mostrar historial del paciente y cargar automáticamente - document.getElementById('sec-historial-pac').classList.remove('d-none'); - document.getElementById('hist-pac-body').classList.remove('d-none'); - document.getElementById('btn-hist-toggle').classList.add('open'); - _historialPacienteCargado = true; + // Mostrar historial del paciente + const secHist = document.getElementById('sec-historial-pac'); + secHist.classList.remove('d-none'); + // Resetear estado colapsado + document.getElementById('hist-pac-body').classList.add('d-none'); + document.getElementById('btn-hist-toggle').classList.remove('open'); + // Precargar en background (usuario decide si abre) + _historialPacienteCargado = false; _historialPacienteId = pac.id; - cargarHistorialPaciente(pac.id); // Consultar exámenes recientes en RIPS (últimos 5 min) const cedula = (pac.numero_documento || pac.documento || '').toString().trim();