up
This commit is contained in:
@@ -33,6 +33,7 @@ if ($fechaDesde > $fechaHasta) $fechaDesde = $fechaHast
|
||||
$estadoFiltro = trim($_GET['estado'] ?? '');
|
||||
$lugarId = (int)($_GET['lugar_id'] ?? 0);
|
||||
$prioridadId = (int)($_GET['prioridad_id'] ?? 0);
|
||||
$pacienteId = (int)($_GET['paciente_id'] ?? 0);
|
||||
$q = trim($_GET['q'] ?? '');
|
||||
|
||||
$perPage = min(200, max(10, (int)($_GET['per_page'] ?? 50)));
|
||||
@@ -57,6 +58,10 @@ if ($prioridadId > 0) {
|
||||
$where[] = 't.prioridad_id = ?';
|
||||
$binds[] = $prioridadId;
|
||||
}
|
||||
if ($pacienteId > 0) {
|
||||
$where[] = 'ts2.paciente_id = ?';
|
||||
$binds[] = $pacienteId;
|
||||
}
|
||||
if ($q !== '') {
|
||||
$where[] = '(t.codigo LIKE ? OR t.paciente_nombre LIKE ? OR s2.nombre_completo LIKE ?)';
|
||||
$like = '%' . $q . '%';
|
||||
|
||||
Reference in New Issue
Block a user