// Screen: Patient Profile (reached only from patient-name links) function PatientProfile({ patientId, nav }) { const p = PATIENTS[patientId] || PATIENTS.petersen; const medChip = (status) => { if (status === 'due') return Due now; if (status === 'expired') return Expired — renewal sent; return Active; }; return (
{/* Identity */}

{p.name}

{p.dob} {p.phone} Prefers {p.store}
{p.vet ? Veterinary · Chuckanut Valley Vet : null} {p.sync ? Med sync · anchor {p.syncDate} : null} {p.ar > 0 ? A/R balance ${p.ar.toFixed(2)} : A/R $0.00}
{p.allergies.length > 0 ? (
Allergies: {p.allergies.join(' · ')}
) : null}
{/* Active meds */}
{p.meds.map((m, i) => ( ))}
MedicationSigRefillsLast filledNext dueStatus
{m.drug} {m.sig} {m.refills} {m.last} {m.due} {medChip(m.status)}
{/* Recent fills */}
{p.fills.map((f, i) => ( ))}
DateFillStoreCopayStatus
{f[0]} {f[1]} {f[2]} {f[3]} {f[4]}
{/* Notes */}
{p.notes.map((n, i) => (
{n.date} · {n.by}
{n.text}
))}
); } Object.assign(window, { PatientProfile });