import React, { useState } from 'react'; import { ClipboardCheck, Download, AlertCircle, CheckCircle2, ChevronRight, Activity } from 'lucide-react'; import { SCREENER_QUESTIONS, SCREENER_THRESHOLDS } from '../constants'; const ScreenerModule: React.FC = () => { const [activeTab, setActiveTab] = useState<'ASRS' | 'CADI' | 'HIV'>('ASRS'); const [responses, setResponses] = useState>({}); const [score, setScore] = useState<{ total: number; interpretation: string } | null>(null); const handleResponse = (key: string, val: number) => { setResponses(prev => ({ ...prev, [key]: val })); }; const calculateResults = () => { const keys = activeTab === 'ASRS' ? SCREENER_QUESTIONS.ASRS : activeTab === 'CADI' ? SCREENER_QUESTIONS.CADI_INATTENTION : SCREENER_QUESTIONS.HIV_COGNITIVE; let total = 0; keys.forEach((_, i) => { total += responses[`${activeTab}_${i}`] || 0; }); let interpretation = ""; if (activeTab === 'ASRS') { if (total >= SCREENER_THRESHOLDS.ASRS.VERY_HIGH) interpretation = "Very High likelihood of adult ADHD. Documented executive dysfunction."; else if (total >= SCREENER_THRESHOLDS.ASRS.HIGH) interpretation = "High likelihood of ADHD. Recommended clinical evaluation."; else interpretation = "Low probability of ADHD based on this screen."; } else if (activeTab === 'HIV') { interpretation = total > 10 ? "Possible HAND (HIV-Associated Neurocognitive Disorder) detected. Differentiating from ADHD is critical." : "Cognitive profile appears stable."; } else { interpretation = total >= 18 ? "Meets clinical criteria for inattentive presentation. Building case for 504 accommodations." : "Sub-threshold symptoms detected."; } setScore({ total, interpretation }); }; return (
{(['ASRS', 'CADI', 'HIV'] as const).map(tab => ( ))}

{activeTab === 'ASRS' && "WHO Adult ADHD Self-Report Scale"} {activeTab === 'CADI' && "Comprehensive Diagnostic Interview"} {activeTab === 'HIV' && "HIV+ Aging & Comorbidity Screener"}

{activeTab === 'ASRS' && "The primary 6-item validated screener used by medical professionals to detect executive function deficits."} {activeTab === 'CADI' && "A dissertation-level assessment covering 9 symptoms of inattention required for SSI/SSDI determination."} {activeTab === 'HIV' && "Differentiates between HIV-Associated Neurocognitive Disorder (HAND) and ADHD comorbidity."}

{(activeTab === 'ASRS' ? SCREENER_QUESTIONS.ASRS : activeTab === 'CADI' ? SCREENER_QUESTIONS.CADI_INATTENTION : SCREENER_QUESTIONS.HIV_COGNITIVE).map((q, i) => (

{i + 1}. {q}

{["Never", "Rarely", "Sometimes", "Often", "Very Often"].map((label, val) => ( ))}
))}
{score && (
Diagnostic Profile Generated
{score.total}
Scientific Score Magnitude

{score.interpretation}

)}
); }; export default ScreenerModule;