feat: mostrar JSON de recepciones paso 2 en preview (expandible)

This commit is contained in:
Lizandro Guarnizo
2026-07-10 21:25:22 -05:00
parent 9f2bd5164e
commit ef02303dde
2 changed files with 30 additions and 9 deletions
+8
View File
@@ -289,6 +289,13 @@ async def preview_automation(
rda_por_pac = {}
for id_rec, filas in grupos.items():
cod = str(filas[0].get("COD_PACIENTE", ""))
num_fac = str(filas[0].get("NUM_FACTURA") or "").strip()
rda_json_prev = generar_rda_paciente(
filas, prof_def, esp_def, remis_def, prefijo_def,
numero_override=num_fac,
contrato_map=contrato_map,
sin_contrato_set=sin_contrato_set,
)
if cod not in rda_por_pac:
rda_por_pac[cod] = []
rda_por_pac[cod].append({
@@ -299,6 +306,7 @@ async def preview_automation(
"valor": float(filas[0].get("VALORTOTAL") or 0),
"diag": str(filas[0].get("DIAG_PPAL") or ""),
"contrato": str(filas[0].get("CODCONTRATO") or "").strip(),
"json": rda_json_prev,
})
pacientes_preview = [