Turnero: mejoras UI, historial detallado, kiosko scanner, firma por turno
- 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>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
ebbf4ac6cf
commit
f363631b32
@@ -846,6 +846,14 @@ async function buscarPaciente() {
|
||||
|
||||
function seleccionarPaciente(pac) {
|
||||
pacienteActivo = pac;
|
||||
// Persistir vínculo en BD para que create_consent_token pueda verificar paciente_id
|
||||
if (turnoActivo?.id && pac?.id) {
|
||||
fetch(API + 'vincular_paciente.php', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ turno_id: turnoActivo.id, paciente_id: pac.id }),
|
||||
}).catch(() => {});
|
||||
}
|
||||
document.getElementById('bloque-pac-no-vinculado').classList.add('d-none');
|
||||
document.getElementById('bloque-pac-seleccionado').classList.remove('d-none');
|
||||
document.getElementById('lbl-pac-nombre').textContent =
|
||||
@@ -959,17 +967,6 @@ function renderHistorialTimeline(turnos, total) {
|
||||
</div>`;
|
||||
}
|
||||
|
||||
// Consentimientos
|
||||
let consStr = '';
|
||||
if (t.consentimientos && t.consentimientos.length) {
|
||||
consStr = `<div style="margin-top:6px;font-size:.75rem">
|
||||
<strong style="color:#64748b">Consentimientos:</strong>
|
||||
<div>${t.consentimientos.map(c =>
|
||||
`<span style="display:inline-block;margin-right:6px">${CONS_ICON[c.estado]||'?'} ${escHtml(c.nombre||'Consentimiento')}</span>`
|
||||
).join('')}</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
// Comentarios
|
||||
let comStr = '';
|
||||
if (t.comentarios && t.comentarios.length) {
|
||||
@@ -988,7 +985,7 @@ function renderHistorialTimeline(turnos, total) {
|
||||
<div class="timeline-codigo" style="color:${color}">${escHtml(t.codigo)}</div>
|
||||
<div class="timeline-lugar">${lugar}</div>
|
||||
<span class="timeline-eb" style="${eStyle}">${escHtml(eLbl)}</span>${mins}
|
||||
${examStr}${consStr}${comStr}
|
||||
${examStr}${comStr}
|
||||
</div>
|
||||
</div>`;
|
||||
}).join('');
|
||||
|
||||
Reference in New Issue
Block a user