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 -3
View File
@@ -292,9 +292,7 @@ async def test_enviar(request: Request, user: dict = Depends(get_current_user)):
async with httpx.AsyncClient(timeout=30) as client:
for id_rec, grupo_rows in grupos.items():
num_factura = str(grupo_rows[0].get("NUM_FACTURA") or "").strip()
prefijo_fb = str(grupo_rows[0].get("PREFIJO") or "").strip()
# Formato igual al RIPS: LHXC03990
numero_override = f"{prefijo_fb}{num_factura.zfill(5)}" if prefijo_fb and num_factura else num_factura
numero_override = num_factura
rda_json = generar_rda_paciente(grupo_rows, prof_def, esp_def, remis_def, prefijo_def, numero_override)
examenes = [r.get("COD_EXAMEN", "") for r in grupo_rows]
try: