File size: 7,559 Bytes
8c9e659
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
// Timeline data
const timelineData = [
    {
        year: 1900,
        title: "SSA begins tracking mortality data",
        description: "Social Security Administration's Office of the Chief Actuary begins tracking historical death probabilities.",
        category: "policy"
    },
    {
        year: 1984,
        title: "Social Security disability standards updated",
        description: "Amendments mandate development of new disability standards for mental disorders.",
        category: "policy"
    },
    {
        year: 1991,
        title: "Corpus callosum findings in ADHD",
        description: "Hynd et al. identify smaller corpus callosum in children with ADHD.",
        category: "neuroimaging"
    },
    {
        year: 2002,
        title: "Brain volume reductions in ADHD",
        description: "Castellanos et al. find significant reductions in cerebral and cerebellar volumes in children with ADHD.",
        category: "neuroimaging"
    },
    {
        year: 2007,
        title: "Cortical thickness delay in ADHD",
        description: "Shaw et al. demonstrate children with ADHD reach peak cortical thickness ~3 years later.",
        category: "neuroimaging"
    },
    {
        year: 2017,
        title: "Brain volume confirmation",
        description: "Hoogman et al. confirm smaller brain volumes in ADHD through mega-analysis.",
        category: "neuroimaging"
    },
    {
        year: 2019,
        title: "27 genome-wide significant risk loci",
        description: "Demontis et al. identify genetic associations with ADHD.",
        category: "genetics"
    },
    {
        year: 2021,
        title: "International Consensus Statement",
        description: "Faraone et al. publish comprehensive review affirming ADHD as valid diagnosis.",
        category: "treatment"
    },
    {
        year: 2024,
        title: "Brain connectivity findings",
        description: "Norman et al. re-analyze fMRI data revealing altered connections in ADHD.",
        category: "neuroimaging"
    }
];

// Researchers data
const researchersData = [
    {
        name: "Castellanos et al.",
        contribution: "Longitudinal brain volume studies in ADHD",
        category: "neuroimaging"
    },
    {
        name: "Shaw et al.",
        contribution: "Cortical maturation delay in ADHD",
        category: "neuroimaging"
    },
    {
        name: "Hoogman et al.",
        contribution: "Mega-analyses of brain structure in ADHD",
        category: "neuroimaging"
    },
    {
        name: "Demontis et al.",
        contribution: "Genome-wide association studies in ADHD",
        category: "genetics"
    },
    {
        name: "Faraone et al.",
        contribution: "International consensus statements on ADHD",
        category: "treatment"
    }
];

// Cases data
const casesData = [
    {
        name: "Caustin Lee McLaughlin",
        description: "Case study illustrating genetic profile and disability claims process",
        category: "policy"
    },
    {
        name: "Shelley C. v. SSA",
        description: "Landmark case reversing SSA's denial of ADHD disability benefits",
        category: "policy"
    }
];

// Initialize the page
document.addEventListener('DOMContentLoaded', function() {
    renderTimeline();
    renderResearchers();
    renderCases();
    setupFilterButtons();
});

function renderTimeline() {
    const container = document.getElementById('timeline-items');
    
    timelineData.sort((a, b) => a.year - b.year).forEach(item => {
        const itemElement = document.createElement('div');
        itemElement.className = `timeline-item ${item.category}`;
        
        itemElement.innerHTML = `
            <div class="timeline-dot"></div>
            <div class="bg-white p-6 rounded-lg shadow-md relative card-hover transition-all duration-300">
                <div class="absolute -left-2 top-6 w-4 h-4 bg-indigo-600 transform rotate-45"></div>
                <div class="flex items-center mb-2">
                    <span class="inline-block px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm font-medium">${item.year}</span>
                    <span class="ml-2 px-2 py-1 bg-gray-100 text-gray-800 rounded-full text-xs font-medium">${item.category}</span>
                </div>
                <h3 class="text-xl font-semibold text-gray-800 mb-2">${item.title}</h3>
                <p class="text-gray-600">${item.description}</p>
            </div>
        `;
        
        container.appendChild(itemElement);
    });
}

function renderResearchers() {
    const container = document.getElementById('researchers-list');
    
    researchersData.forEach(researcher => {
        const itemElement = document.createElement('div');
        itemElement.className = `researcher-item ${researcher.category} bg-gray-50 p-4 rounded-lg`;
        
        itemElement.innerHTML = `
            <h4 class="font-bold text-indigo-700">${researcher.name}</h4>
            <p class="text-gray-600 text-sm">${researcher.contribution}</p>
            <span class="inline-block mt-2 px-2 py-1 bg-indigo-100 text-indigo-800 rounded-full text-xs font-medium">${researcher.category}</span>
        `;
        
        container.appendChild(itemElement);
    });
}

function renderCases() {
    const container = document.getElementById('cases-list');
    
    casesData.forEach(caseItem => {
        const itemElement = document.createElement('div');
        itemElement.className = `case-item ${caseItem.category} bg-gray-50 p-4 rounded-lg`;
        
        itemElement.innerHTML = `
            <h4 class="font-bold text-indigo-700">${caseItem.name}</h4>
            <p class="text-gray-600 text-sm">${caseItem.description}</p>
            <span class="inline-block mt-2 px-2 py-1 bg-indigo-100 text-indigo-800 rounded-full text-xs font-medium">${caseItem.category}</span>
        `;
        
        container.appendChild(itemElement);
    });
}

function setupFilterButtons() {
    const filterButtons = document.querySelectorAll('.filter-btn');
    
    filterButtons.forEach(button => {
        button.addEventListener('click', function() {
            // Update active state
            filterButtons.forEach(btn => btn.classList.remove('active', 'bg-indigo-600', 'text-white'));
            filterButtons.forEach(btn => btn.classList.add('bg-gray-200', 'text-gray-700'));
            this.classList.add('active', 'bg-indigo-600', 'text-white');
            this.classList.remove('bg-gray-200', 'text-gray-700');
            
            // Filter items
            const category = this.dataset.category;
            filterItems(category);
        });
    });
}

function filterItems(category) {
    const timelineItems = document.querySelectorAll('.timeline-item');
    const researcherItems = document.querySelectorAll('.researcher-item');
    const caseItems = document.querySelectorAll('.case-item');
    
    if (category === 'all') {
        timelineItems.forEach(item => item.style.display = 'block');
        researcherItems.forEach(item => item.style.display = 'block');
        caseItems.forEach(item => item.style.display = 'block');
        return;
    }
    
    timelineItems.forEach(item => {
        item.style.display = item.classList.contains(category) ? 'block' : 'none';
    });
    
    researcherItems.forEach(item => {
        item.style.display = item.classList.contains(category) ? 'block' : 'none';
    });
    
    caseItems.forEach(item => {
        item.style.display = item.classList.contains(category) ? 'block' : 'none';
    });
}