feat(historial): mostrar nombre kiosko y datos BD (nombre+doc) en paciente
- API: agrega tipo_documento y numero_documento al SELECT - Vista: línea 1 = nombre BD + CC/doc, línea 2 gris = Kiosko: nombre Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1a3ff7219e
commit
498a144c18
@@ -107,6 +107,8 @@ $sqlTurnos = "
|
||||
p.color AS prioridad_color,
|
||||
l.nombre AS lugar_nombre,
|
||||
s2.nombre_completo AS paciente_bd,
|
||||
s2.tipo_documento AS paciente_tipo_doc,
|
||||
s2.numero_documento AS paciente_doc,
|
||||
rd.nombre AS recepcion_desk_nombre,
|
||||
ur.full_name AS atendido_recepcion_nombre,
|
||||
ul.full_name AS atendido_lugar_nombre,
|
||||
|
||||
@@ -418,6 +418,7 @@ function renderTabla(turnos) {
|
||||
const nombreBd = esc(t.paciente_bd || '');
|
||||
const nombreKiosko = esc(t.paciente_nombre || '');
|
||||
const nombre = nombreBd || nombreKiosko || '—';
|
||||
const docBd = t.paciente_doc ? esc((t.paciente_tipo_doc || 'CC') + ' ' + t.paciente_doc) : '';
|
||||
const lugar = esc(t.lugar_nombre || '—');
|
||||
const fecha = t.fecha_sesion || '—';
|
||||
const horaEnt = t.creado_at
|
||||
@@ -452,10 +453,8 @@ function renderTabla(turnos) {
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
${nombre}
|
||||
${nombreBd && nombreKiosko && nombreBd !== nombreKiosko
|
||||
? `<div class="text-muted" style="font-size:.72rem">Kiosko: ${nombreKiosko}</div>`
|
||||
: ''}
|
||||
<div>${nombre}${docBd ? `<span class="text-muted" style="font-size:.7rem;margin-left:5px">${docBd}</span>` : ''}</div>
|
||||
${nombreKiosko ? `<div class="text-muted" style="font-size:.72rem">Kiosko: ${nombreKiosko}</div>` : ''}
|
||||
</td>
|
||||
<td class="small">
|
||||
<div class="text-muted" style="font-size:.72rem"><i class="fas fa-desktop me-1 opacity-50"></i>${desk}</div>
|
||||
|
||||
Reference in New Issue
Block a user