create_consent_token.php ahora acepta paciente_id y lo vincula al turno
si aún no lo tiene, eliminando la carrera con vincular_paciente.php
(fire-and-forget). Ya no hace falta refrescar para firmar el consentimiento.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Escribir manualmente ya no dispara el turno: la persona oprime el botón.
El lector de cédula sí lo dispara porque mete los dígitos en ráfaga
(<35ms entre cada uno) o termina con Enter. Guard contra doble envío.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
La firma se guardaba en datos_cliente[campo_svg] pero el display
solo leía firma_profesional_svg (columna inexistente en lab_form_envios).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Kiosko: detector scanner (gap < 80ms), iconos 90px, fa-person-pregnant, ticket Arial
- Recepción: vincular_paciente.php para persistir paciente_id antes de firmar consentimiento
- Historial y dashboard: recepción desk, empleado recepción/muestras, exámenes y comentarios
- display_global: turno más pequeño, lugar-nombre más grande
- lab_pacientes: modal compacta con form-sm
- Configuración: icono embarazada fa-person-pregnant en prioridades
- ver_formulario_enviado: firma por campo (fix doble firma)
- docker-compose.local.yml: override BD producción para dev local
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Guarantees that the turno state is correct in memory before pasarALugar()
attempts the transition to en_espera_lugar, preventing 'espera' → 'en_espera_lugar'
errors.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
The sel-lugar dropdown is only for selecting the patient's next destination.
Desk consents are loaded by cargarConsentimientosDesk() on turno open
and must not be affected by destination lugar changes.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- cargarConsentimientosDesk() called from abrirFicha using DESK_ID
- First checks existing DB records (get_consentimientos), falls back to desk config
- abrirFormularioLugar shows proper errors if no patient or no turno
- Starts polling on open to detect patient signature in real time
- Fix creado_at column error in create_consent_token INSERT
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- API returns json.formularios, not json.data.formularios
- Now consents will properly display when selecting a lugar
- Fixes issue where configured consents were not appearing in recepcion
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Include id, token, estado, and turno_id in consent response
- Allows renderConsentimientos to display all consent information correctly
- Ensures consents created for lugar are properly shown with all fields
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>