diff --git a/app/routes/automation.py b/app/routes/automation.py
index 05d5dba..ab075f7 100644
--- a/app/routes/automation.py
+++ b/app/routes/automation.py
@@ -157,6 +157,7 @@ async def preview_automation(
"examenes": len(filas),
"valor": float(filas[0].get("VALORTOTAL") or 0),
"diag": str(filas[0].get("DIAG_PPAL") or ""),
+ "contrato": str(filas[0].get("CODCONTRATO") or "").strip(),
})
pacientes_preview = [
diff --git a/app/templates/automation.html b/app/templates/automation.html
index 196a7da..b53ec87 100644
--- a/app/templates/automation.html
+++ b/app/templates/automation.html
@@ -196,6 +196,7 @@ async function previewAutomation() {
${r.factura}
${r.fecha}
+ ${r.contrato || '—'}
${r.examenes} examen(es)
${r.diag}
$${Number(r.valor).toLocaleString('es-CO')}