diff --git a/modules/turnero/api/get_consentimientos.php b/modules/turnero/api/get_consentimientos.php
index fd3c215..97781fe 100644
--- a/modules/turnero/api/get_consentimientos.php
+++ b/modules/turnero/api/get_consentimientos.php
@@ -399,7 +399,7 @@ if ($incluirSolicitud) {
LEFT JOIN lab_tipos_muestra lt ON lt.codigo = tm.tipo_muestra
WHERE ts.paciente_id = ?
AND tm.solicitud_id != ?
- AND tm.estado = 'pendiente'
+ AND tm.estado IN ('pendiente','rechazada')
ORDER BY tm.id ASC"
);
$stmtPrev->execute([$solicitud['paciente_id'], $solicitud['id']]);
@@ -432,7 +432,7 @@ if ($incluirSolicitud) {
JOIN turnero_solicitudes ts ON ts.id = tm.solicitud_id
LEFT JOIN lab_tipos_muestra lt ON lt.codigo = tm.tipo_muestra
WHERE ts.paciente_id = ?
- AND tm.estado = 'pendiente'
+ AND tm.estado IN ('pendiente','rechazada')
ORDER BY tm.id ASC"
);
$stmtPrev->execute([$pacId]);
diff --git a/modules/turnero/views/historial.php b/modules/turnero/views/historial.php
index ad6a698..0e1c51a 100644
--- a/modules/turnero/views/historial.php
+++ b/modules/turnero/views/historial.php
@@ -251,6 +251,7 @@ Layout::open('Historial de Turnos', 'fas fa-history');
Historial de Turnos
═══════════════════════════════════════════════════════════ */
const API = '= BASE_URL ?>modules/turnero/api/';
+const SERVICIO_PROLONGADO_MIN = 20; // minutos — a partir de aquí se resalta en rojo
let _state = {
fechaDesde : '',
@@ -447,7 +448,10 @@ function renderTabla(turnos) {
.toLocaleString('es-CO',{hour:'2-digit',minute:'2-digit'})
: '—';
const espMin = t.espera_min != null ? t.espera_min + ' m' : '—';
- const srvMin = t.servicio_min != null ? t.servicio_min + ' m' : '—';
+ const esProlongado = t.servicio_min != null && t.servicio_min > SERVICIO_PROLONGADO_MIN;
+ const srvMin = t.servicio_min != null
+ ? `${esProlongado ? '' : ''}${t.servicio_min} m`
+ : '—';
const totMin = t.total_min != null ? t.total_min + ' m' : '—';
const tel = esc(t.paciente_cel || '—');
const priCls = esc(t.prioridad_color || '#888');
diff --git a/modules/turnero/views/lugar.php b/modules/turnero/views/lugar.php
index f52454d..12bef02 100644
--- a/modules/turnero/views/lugar.php
+++ b/modules/turnero/views/lugar.php
@@ -2492,8 +2492,9 @@ function renderMuestras(lista) {
summary.innerHTML = chips;
cont.innerHTML = lista.map(m => {
- const esPend = m.estado === 'pendiente';
const esPrevio = !!m.es_pendiente_anterior;
+ // Rechazadas de una visita anterior también se pueden recibir directo (el paciente trae muestra nueva)
+ const esPend = m.estado === 'pendiente' || (esPrevio && m.estado === 'rechazada');
const label = escHtml(m.label || m.tipo_muestra || 'MUESTRA');
const origenTag = esPrevio
? `