Add test-rda page, fix prefijo/remisionante/especialidad for TNS RDA sends

- New /test-rda route: list Firebird candidates with valid contract/factura,
  send individual RDA with auto tercero creation and full result display
- json_generator: use prefijo_tns_default config instead of Firebird PREFIJO,
  add profesionalRemisionante from DOCIDMEDICO or remisionante_default config
- All queries: add DOCIDMEDICO column from MEDICO JOIN
- automation/transaccion: add remisionante_default and prefijo_tns_default params
- config: add remisionante_default (00) and prefijo_tns_default (00) keys
- automation SQL: filter NUM_FACTURA > 0 to skip unbilled records
- config.html: add UI fields for new config keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-26 18:57:54 -05:00
co-authored by Claude Sonnet 4.6
parent 3017c7956e
commit c64a68ec6f
10 changed files with 521 additions and 10 deletions
+3 -1
View File
@@ -155,10 +155,12 @@ async def send_transaccion(
resultados = []
prof_def = configs.get("profesional_default", "")
esp_def = configs.get("especialidad_default", "")
remis_def = configs.get("remisionante_default", "00")
prefijo_def = configs.get("prefijo_tns_default", "00")
async with httpx.AsyncClient(timeout=int(configs.get("api_timeout", 30))) as client:
for id_recepcion, grupo_rows in grupos.items():
trans_json = generar_rda_paciente(grupo_rows, prof_def, esp_def)
trans_json = generar_rda_paciente(grupo_rows, prof_def, esp_def, remis_def, prefijo_def)
status_ok = False
response_text = ""