feat(lab): endpoint server-to-server ingest_paciente para sync desde RIPS

Agrega /api/lab/ingest_paciente.php con autenticación por X-Lab-Key
(LAB_SYNC_KEY en config). Hace UPSERT por numero_documento sin requerir
sesión de admin — permite que RIPS Manager sincronice pacientes directo
a lab_pacientes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-09 10:48:50 -05:00
co-authored by Claude Sonnet 4.6
parent 1f45f58205
commit 9651f14302
2 changed files with 164 additions and 0 deletions
+4
View File
@@ -402,6 +402,10 @@ if (!defined('BASE_URL')) {
if (!defined('MIGRATION_TOKEN')) {
define('MIGRATION_TOKEN', 'lab2026migrate');
}
// API key server-to-server para ingesta de pacientes desde RIPS Manager
if (!defined('LAB_SYNC_KEY')) {
define('LAB_SYNC_KEY', getenv('LAB_SYNC_KEY') ?: 'rips-lab-sync-2026');
}
define('TIMEZONE', 'America/Bogota');
// Información del desarrollador