Treatment for patients with mental disorders has come a long way since medieval times, when mental illness was seen as?