diff --git a/susconecta/app/paciente/page.tsx b/susconecta/app/paciente/page.tsx index 4058a86..5e427d1 100644 --- a/susconecta/app/paciente/page.tsx +++ b/susconecta/app/paciente/page.tsx @@ -1153,10 +1153,20 @@ export default function PacientePage() { { // prefer the resolved doctor name; while resolving, show a loading indicator instead of raw IDs (() => { + const looksLikeIdStr = (s: any) => { + try { + const hexOnly = String(s || '').replace(/[^0-9a-fA-F]/g, '') + const len = (typeof hexOnly === 'string') ? hexOnly.length : (Number(hexOnly) || 0) + return len >= 8 + } catch { return false } + } const maybeId = selectedReport?.doctor_id || selectedReport?.created_by || selectedReport?.doctor || null - if (reportDoctorName) return