Finding mental disorders with math

What if a brain scan could detect the presence of a mental disorder even before symptoms have emerged? Or predict which depressed patients would respond to a particular medication and which would not? Or determine the likely rate of progression of Alzheimer’s?