Identifying mental health and substance use disorders using emergency department and hospital records: a population-based retrospective cohort study of diagnostic concordance and disease attribution.