fix: send numero sin prefijo LHXC en RDA TNS

TNS espera solo el numero numerico (ej: "4001"), no el formato
combinado con prefijo (ej: "LHXC04001"). El codigoPrefijo "00"
ya referencia la serie correcta en la configuracion de TNS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-26 21:09:58 -05:00
co-authored by Claude Sonnet 4.6
parent 90de09b22c
commit be1910b5d8
3 changed files with 4 additions and 9 deletions
+1 -2
View File
@@ -265,8 +265,7 @@ async def run_automation(
async with httpx.AsyncClient(timeout=timeout) as client:
for id_recepcion, grupo_rows in grupos.items():
num_fac = str(grupo_rows[0].get("NUM_FACTURA") or "").strip()
prefijo_fb = str(grupo_rows[0].get("PREFIJO") or "").strip()
num_override = f"{prefijo_fb}{num_fac.zfill(5)}" if prefijo_fb and num_fac else num_fac
num_override = num_fac
rda_json = generar_rda_paciente(grupo_rows, prof_def, esp_def, remis_def, prefijo_def, num_override)
factura = num_override or str(id_recepcion)
try: