Objective: To use data from electronic health records (EHRs) to describe the demographic, clinical and functional correlates of childhood sexual abuse (CSA) in patients with severe mental illness (SMI), and compare their clinical outcomes (admissions and receipt of antipsychotic medications) to those of patients with no recorded history of CSA., Methods: We applied a string-matching technique to clinical text records of 7000 patients with SMI (non-organic psychotic disorders or bipolar disorder), identifying 619 (8.8%) patients with a recorded history of CSA. Data were extracted from both free-text and structured fields of patients' EHRs., Results: Comorbid diagnoses of major depressive disorder, post-traumatic stress disorder and personality disorders were more prevalent in patients with CSA. Positive psychotic symptoms, depressed mood, self-harm, substance use and aggression were also more prevalent in this group, as were problems with relationships and living conditions. The odds of inpatient admissions were higher in patients with CSA than in those without (adjusted OR = 1.95, 95% CI: 1.64-2.33), and they were more likely to have spent more than 10 days per year as inpatients (adjusted OR = 1.32, 95% CI: 1.07-1.62). Patients with CSA were more likely to be prescribed antipsychotic medications (adjusted OR = 2.48, 95% CI: 1.69-3.66) and be given over 75% of the maximum recommended daily dose (adjusted OR = 1.72, 95% CI: 1.44-2.04)., Conclusion: Data-driven approaches are a reliable, promising avenue for research on childhood trauma. Clinicians should be trained and skilled at identifying childhood adversity in patients with SMI, and addressing it as part of the care plan., (© 2021 The Authors. Acta Psychiatrica Scandinavica published by John Wiley & Sons Ltd.)