Mortality in persons with mental disorders is substantially overestimated using inpatient psychiatric diagnoses.