Fix error display in test-rda, remove PO from default article filter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-26 19:19:06 -05:00
co-authored by Claude Sonnet 4.6
parent c1cbe54105
commit b5e56f2238
2 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ async def get_candidatos(request: Request, user: dict = Depends(get_current_user
return JSONResponse({"error": f"Error Firebird: {fb_msg}"})
# Artículos configurados con especialidad en TNS
arts_default = "CH4,CREA,TGP,VSG,PCR,AU,FER,TPO,TSH,TGO,GLI,BUN,COL,TRI,HDL,LDL,HBA1,VB12,VITD,PO,FER,K,NA,MG,URO,PRL,TSH,T4L,T3,T4,T3L,HIV,VDRL,PSA,AFP,CEA,CA125,CA199,FV,TP,TPT"
arts_default = "CH4,CREA,TGP,VSG,PCR,AU,FER,TPO,TSH,TGO,GLI,BUN,COL,TRI,HDL,LDL,HBA1,VB12,VITD,FER,K,NA,MG,URO,PRL,T4L,T3,T4,T3L,HIV,VDRL,PSA,AFP,CEA,CA125,CA199,FV,TP,TPT"
arts_str = articulos.strip() if articulos.strip() else arts_default
arts_list = [a.strip().upper() for a in arts_str.split(",") if a.strip()]
arts_in = ", ".join(f"'{a}'" for a in arts_list)
+8 -5
View File
@@ -192,20 +192,23 @@ async function enviarRDA() {
html += `
<div class="rounded-lg border ${p.ok ? 'border-green-200 bg-green-50' : 'border-red-200 bg-red-50'}">
<div class="flex items-start gap-3 p-3">
<span class="text-lg">${icon}</span>
<div class="flex-1">
<span class="text-lg leading-tight">${icon}</span>
<div class="flex-1 min-w-0">
<p class="text-sm font-medium text-gray-800">
IDRECEPCION <span class="font-mono text-blue-700">${p.idrecepcion}</span>
· Factura <span class="font-mono">${p.factura}</span>
· Contrato <span class="font-mono text-purple-700">${p.contrato}</span>
</p>
<p class="text-xs text-gray-500 mt-0.5">Exámenes: ${(p.examenes || []).join(', ')}</p>
<p class="text-sm mt-1 ${p.ok ? 'text-green-700' : 'text-red-700'} font-medium">${p.mensaje}</p>
<div class="mt-1.5 px-3 py-2 rounded ${p.ok ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'} text-sm font-medium break-words">
${p.ok ? '✅' : '❌'} ${p.mensaje || '(sin mensaje)'}
</div>
${!p.ok ? `<p class="text-xs text-gray-400 mt-1">HTTP ${p.status || '?'}</p>` : ''}
</div>
<button onclick="document.getElementById('${uid}').classList.toggle('hidden')"
class="text-xs text-gray-400 hover:text-gray-600 shrink-0">JSON</button>
class="px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 rounded shrink-0">Ver JSON</button>
</div>
<pre id="${uid}" class="hidden mx-3 mb-3 p-3 bg-gray-900 text-green-300 rounded text-xs overflow-x-auto">${jsonStr.replace(/</g,'&lt;')}</pre>
<pre id="${uid}" class="hidden mx-3 mb-3 p-3 bg-gray-900 text-green-300 rounded text-xs overflow-x-auto whitespace-pre-wrap">${jsonStr.replace(/</g,'&lt;')}</pre>
</div>`;
}
});