recepcion: auto-expand patient history with exams on patient select
Previously the history section required a manual click to expand and load. Now it opens and fetches automatically when a patient is selected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
7842de0d21
commit
89b407f5cc
@@ -1622,15 +1622,13 @@ function seleccionarPaciente(pac) {
|
|||||||
document.getElementById('bloque-pac-kiosko').classList.remove('d-none');
|
document.getElementById('bloque-pac-kiosko').classList.remove('d-none');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mostrar historial del paciente
|
// Mostrar historial del paciente y cargar automáticamente
|
||||||
const secHist = document.getElementById('sec-historial-pac');
|
document.getElementById('sec-historial-pac').classList.remove('d-none');
|
||||||
secHist.classList.remove('d-none');
|
document.getElementById('hist-pac-body').classList.remove('d-none');
|
||||||
// Resetear estado colapsado
|
document.getElementById('btn-hist-toggle').classList.add('open');
|
||||||
document.getElementById('hist-pac-body').classList.add('d-none');
|
_historialPacienteCargado = true;
|
||||||
document.getElementById('btn-hist-toggle').classList.remove('open');
|
|
||||||
// Precargar en background (usuario decide si abre)
|
|
||||||
_historialPacienteCargado = false;
|
|
||||||
_historialPacienteId = pac.id;
|
_historialPacienteId = pac.id;
|
||||||
|
cargarHistorialPaciente(pac.id);
|
||||||
|
|
||||||
// Consultar exámenes recientes en RIPS (últimos 5 min)
|
// Consultar exámenes recientes en RIPS (últimos 5 min)
|
||||||
const cedula = (pac.numero_documento || pac.documento || '').toString().trim();
|
const cedula = (pac.numero_documento || pac.documento || '').toString().trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user