From d46c983776c24f53a82d6d7a6e2f7bed04adb45f Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Tue, 21 Jul 2026 16:35:29 -0500 Subject: [PATCH] recepcion: auto-check RIPS when turn has a cedula as patient name If the kiosk captured a numeric document number as paciente_nombre, fire consultarExamenesRips immediately on turn open without waiting for the receptionist to manually search the patient. Co-Authored-By: Claude Sonnet 4.6 --- modules/turnero/views/recepcion.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/turnero/views/recepcion.php b/modules/turnero/views/recepcion.php index 81b5c4e..fc1cbdf 100644 --- a/modules/turnero/views/recepcion.php +++ b/modules/turnero/views/recepcion.php @@ -1515,6 +1515,9 @@ function abrirFicha(turno) { if (data && !pacienteActivo) seleccionarPaciente(data); }) .catch(() => {}); + } else if (turno.paciente_nombre && /^\d{5,15}$/.test(turno.paciente_nombre.trim())) { + // El kiosko capturó una cédula como nombre — consultar RIPS de inmediato + consultarExamenesRips(turno.paciente_nombre.trim()); } // Cargar consentimientos del desk actual para este turno