Update lab_domicilios.php

This commit is contained in:
Lizandro Guarnizo
2026-04-06 17:09:30 -05:00
parent e1241a42ed
commit 69e075cbd6
+23
View File
@@ -475,6 +475,11 @@ $domIdParam = (int)($_GET['id'] ?? 0);
<dd class="col-8 d-none" id="inf-acudiente"></dd>
</dl>
<hr>
<!-- Servicios extras -->
<hr>
<h6 class="text-muted text-uppercase mb-2"><i class="fas fa-plus-circle me-1 text-primary"></i>Servicios extras</h6>
<div id="inf-servicios-extra"></div>
<hr>
<!-- Notas libres -->
<h6 class="text-muted text-uppercase mb-2"><i class="fas fa-sticky-note me-1"></i>Notas del enfermero</h6>
<div id="inf-notas-libres"></div>
@@ -932,6 +937,24 @@ async function verInformeDom() {
document.getElementById('inf-examenes').textContent = dom.examenes_solicitados || '—';
document.getElementById('inf-fecha').textContent = (dom.fecha_programada||'') + ' ' + (dom.hora_programada||'');
// Servicios extras (síncronos, vienen en _domActual)
const seEl = document.getElementById('inf-servicios-extra');
if (dom.servicios_extra && dom.servicios_extra.length) {
seEl.innerHTML = `<table class="table table-sm table-bordered small mb-0">
<thead class="table-light"><tr><th>Tipo</th><th>Descripción</th><th>Notas</th><th>Valor</th></tr></thead>
<tbody>${dom.servicios_extra.map(se =>
`<tr>
<td><span class="badge bg-primary bg-opacity-75">${esc(se.tipo||'—')}</span></td>
<td>${esc(se.descripcion||'—')}</td>
<td class="text-muted">${esc(se.notas||'—')}</td>
<td>${se.valor ? '$'+Number(se.valor).toLocaleString('es-CO') : (se.requiere_pago ? '<span class="text-warning">Pendiente</span>' : '—')}</td>
</tr>`).join('')}
</tbody>
</table>`;
} else {
seEl.innerHTML = '<span class="text-muted small">Sin servicios extras registrados</span>';
}
// Limpiar campos clínicos mientras cargamos
['inf-antecedentes','inf-medicamentos','inf-acudiente','inf-notas-libres'].forEach(id => {
const el = document.getElementById(id);