This commit is contained in:
Lizandro Guarnizo
2026-03-10 18:42:51 -05:00
parent b57fc16ab3
commit db469b2134
98 changed files with 16365 additions and 303 deletions
+16
View File
@@ -0,0 +1,16 @@
<?php
/** GET /api/lab/get_pacientes.php — Lista paginada de pacientes */
require_once __DIR__ . '/_helpers.php';
requireMethod('GET');
try {
$pac = new Paciente();
$busqueda = trim($_GET['busqueda'] ?? $_GET['search'] ?? '');
$pagina = max(1, (int)($_GET['page'] ?? $_GET['pagina'] ?? 1));
$por = max(1, min(100, (int)($_GET['limit'] ?? $_GET['por_pagina'] ?? 30)));
jsonOk($pac->listar($busqueda, $pagina, $por));
} catch (Exception $e) {
jsonError($e->getMessage(), 500);
}