fix: add db() to ingest_paciente; get_examenes_rips and recepcion updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-17 15:43:08 -05:00
co-authored by Claude Sonnet 4.6
parent 6bba6c6165
commit e595f5e569
4 changed files with 138 additions and 29 deletions
+4
View File
@@ -136,6 +136,10 @@ if (!in_array($modo, ['insertar', 'upsert'], true)) {
$examenesRaw = $data['examenes'] ?? null;
$examenesGuardados = 0;
function db(): \PDO {
return Database::getInstance()->getConnection();
}
function guardarExamenesPendientes(string $doc, array $examenes): int {
if (!$examenes || !$doc) return 0;
$pdo = db();