This commit is contained in:
Lizandro Guarnizo
2026-06-18 09:35:17 -05:00
parent c58998599b
commit 8d577947a6
7 changed files with 87 additions and 12 deletions
+8 -1
View File
@@ -881,7 +881,14 @@ function desvincularPaciente() {
}
function abrirNuevoPaciente(nombre) {
window.open('<?= BASE_URL ?>lab_pacientes.php?nuevo=1&nombre=' + encodeURIComponent(nombre), '_blank');
const ventana = window.open('<?= BASE_URL ?>lab_pacientes.php?nuevo=1&nombre=' + encodeURIComponent(nombre), '_blank');
// Detectar cuando se cierra la ventana y refrescar la búsqueda
const chequeo = setInterval(() => {
if (ventana.closed) {
clearInterval(chequeo);
setTimeout(() => buscarPaciente(), 500); // Buscar nuevamente después de cerrar
}
}, 500);
}
// ── Historial del paciente ──────────────────────────────────────