Mapping Care Pathways of Mental Health Patients: A linked data analysis of primary and secondary care in Leeds
Precious-Gift Alele, Samuel Relton, Marlous Hall, Max Henderson, Richard Irvine
University of Leeds in collaboration with the West Yorkshire ICB
Every year, one in four adults living in England experience a mental health problem. But what happens when these individuals are admitted to hospital for physical illnesses that appear to be unrelated to their mental health, such as heart failure or COPD is less clear.
Approximately 30% of people with long-term physical health conditions also have a co-occurring mental health condition, known as Mental-Physical Multimorbidity (MPM), a pattern increasingly seen in hospital care. These patients often experience worse hospital outcomes, including longer stays, higher complication rates, and increased emergency readmissions, compared to those with only a physical health condition. Overall, this contributes to poorer patient experiences and places increased strain on already limited hospital resources.
Yet, little is known about the extent to which these health outcome disparities vary across patient subgroups, or which specific combinations of mental and physical conditions are more strongly associated with adverse outcomes. To answer these questions, we need access to contextual, linked, granular data- much of which currently sits in institutional silos, separated across primary care, mental health, acute care and community services.
Understanding which specific MPM combinations are associated with poorer outcomes in different patient subgroups could support more targeted, cost-effective interventions to improve patient care and reduce NHS costs.
This project set out as a proof-of-concept to:
- Conduct a detailed analysis of clinically coded data within the Leeds Data Model (LDM) to facilitate better understanding of the mental-physical-multimorbidity population and to support future population health management strategies.
- Generate and describe a cohort of patients admitted to the general hospital who have Mental-Physical Multimorbidity and examine their transitions in and out of primary and secondary care.
Data Source
This project draws on the Leeds Data Model (LDM), a population-level linked dataset maintained by the Leeds Office of Data Analytics (ODA). It includes health and social care data for about 880,000 individuals across Leeds for the purpose of population health management and service planning. The LDM integrates information from different sources, including hospitals, GP practices, urgent care (ambulance and 111 calls), maternity services, adult social care, community services and mental health services. Its linkage across care settings makes it suitable for studying multimorbidity, where relevant diagnoses and outcomes are elsewhere often siloed across primary, secondary, and mental health services.

Figure 1. The Leeds Data Model
All data are pseudonymised which ensures that individuals cannot be directly identified in order to maintain patient confidentiality. Access was provided by the West Yorkshire Integrated Care Board (ICB) via the Leeds City Council’s secure database infrastructure.
Methods
Defining Mental Health Conditions: SMI and CMD
Mental health conditions are often separated into two broad groups:
Severe Mental Illness (SMI)
Defined using the Quality and Outcomes Framework (QoF) register definition:
- Schizophrenia
- Bipolar affective disorder
- Other psychotic disorders
These were identified in GP records using SNOMED-CT diagnostic codes. GPs are required to keep a Register of all patients on their caseload with a Severe Mental Illness.
Common Mental Disorders (CMD)
For this project, we included only Depression and Anxiety disorders (two of the most common types of co-morbid mental health conditions). CMDs were identified in GP records using a combination of:
- SNOMED-CT diagnostic codes.
- BNF medication codes for antidepressants and anxiolytics
Unlike severe mental illnesses, there is no equivalent formal case register for common mental disorders. We used both diagnostic and medication codes to identify common mental disorders in primary care records to ensure more complete identification of individuals affected by CMDs.
Mental Health Cohort Identification Challenge: Identifying individuals with co-occurring mental health conditions at the point of hospital admission presented a methodological challenge. The available data included only the primary diagnosis field which reflects the main reasons for admission - often a physical health condition. As such, mental health conditions were underrepresented in secondary physical healthcare records to which we had access. Alternative individual-level approaches would be unethical, impractical, expensive, and likely biased.
Mental Health Cohort Identification Approach
To address this challenge, we adopted a pathway-based approach which we referred to as the A → B → A approach.
- We first identified individuals with a mental health condition recorded in (A) primary care (GP records) where such diagnoses are more reliably captured.
- We then traced these individuals through the Leeds Data Model to identify those who were subsequently admitted to (B) hospital (secondary care).
- Following discharge, we confirmed their return to (A) primary care, to ensure continuity of care and enable outcome tracking.

Figure 2. A → B → A approach.
This approach allowed us to identify a cohort of patients with Mental-Physical Multimorbidity (mental disorder identified in primary care + physical disorder from acute hospital care) and compare their hospital outcomes to those of patients admitted to hospital during the same period but without a mental health condition. Cohort identification was based on data from January 2020 to October 2024.
The SNOMED-CT and BNF codes used in this project were sourced from the HDR UK Phenotype library and DynAIRx Project, then adapted to align with the project objectives.
Key findings
A → B → A approach: Using linked primary and secondary care data in the LDM, we generated a mental health cohort spanning January 2020 to October 2024.
Primary Care (A)
- A cohort of individuals with Severe Mental Illness (SMI) was identified using 619 SNOMED-CT diagnostic codes recorded in primary care.
A separate cohort of individuals with Common Mental Disorders (CMD)- depression and anxiety- was identified using a combination of 497 SNOMED-CT diagnostic codes and 491 BNF medication codes. The CMD cohort was approximately 47 times larger than the SMI cohort.Figure 3. Mental Health Cohort Identification in primary care

Figure 3. Mental Health Cohort Identification in primary care
Secondary Care (B)
- 30% of the SMI population were admitted to hospital following their identification in primary care, and this dropped to 27% after record classification filtering.
Approximately 10% of individuals identified with CMD in primary care were admitted to hospital within six months. Following record classification filtering, this figure reduced to 8.4%.Figure 4. Mental Health Cohort Identification in secondary care

Figure 4. Mental Health Cohort Identification in secondary care
Return to Primary Care Post-Discharge (A)
LDM data also enabled us track individual’s ongoing medical care as they returned to primary care following hospital discharge.
- 95.9% of admitted individuals with an SMI and 78.8% of those admitted individuals with CMD had evidence of continued care engagement in primary care.
- The final cohort combining both SMI and CMD patients who completed the care pathway was comprised of:
- A small fraction of people with both SMI and CMD (1.6%)
- SMI only accounting for 6.3%
- CMD only making up 92.2%
The variation in return to primary care likely reflects a range of factors, including variation in care-seeking patterns and follow-up practices, data capture, or individual circumstances.

Figure 5. Mental Health Cohort Identification upon return to primary care
Value of the research
This foundational project used a longitudinal approach to analyse linked primary and secondary care data in the LDM. We used detailed SNOMED-CT diagnostic codes and BNF prescription codes in order to comprehensively define the mental health population of Leeds for the first time. This provides valuable and high-resolution information for the West Yorkshire ICB to facilitate more targeted population health management.
This project is being further developed to understand the differential outcomes for patients with Mental-Physical Multimorbidity and those with only a physical health condition. Further work will include:
- Conducting mental health population characterisation and analyses to adjust for potential confounders with a view of determining causal pathways
- Stratifying analyses by heath conditions to identify specific combinations that are linked to worse outcomes, thereby enabling targeted interventions.
- Applying this analytical framework to data from other regions within the ICB (such as Bradford) to better understand how different models of care delivery shape patient pathways.
Quote from project partner
“It is so great to see this work develop - gaining a greater understanding of the outcomes for patients who have a co-occurring mental health condition will be so valuable in ensuring can provide more targeted support. I am excited to see how we can develop this work further.“
Richard Irvine, Chief Data Officer, NHS West Yorkshire ICB
Insights
- Successfully tracked individuals’ journeys across different healthcare settings.
- Medication-based identification proved valuable for identifying patients without clear diagnostic codes.
- Future work involving further characterisation of cohorts could support strategic planning for mental health service delivery in Leeds.
Research theme
- Health
Programme theme
- The Science of Data Science
- Visualisation
- Data Science Infrastructures
Team
- Precious-Gift Alele, Data Scientist, Leeds Institute for Data Analytics, University of Leeds
- Samuel Relton, Associate Professor of Health Data Science, University of Leeds
- Marlous Hall, Associate Professor of Epidemiology, University of Leeds
- Max Henderson, Professor of Psychological Medicine and Occupational Psychiatry, University of Leeds
- Richard Irvine, Chief Data Officer, Leeds City Council/ NHS West Yorkshire ICB
Partner
- NHS West Yorkshire ICB
Funder
Funded by the ESRC IAA LSSI (Impact Acceleration Account Leeds Social Sciences Institute) exclusively for promoting women in data science.
This work has been facilitated by the Leeds Institute for Data Analytics (LIDA) Data Scientist Development Programme, which employs early-career data scientists to deliver real-world data-driven impact in the interests of the public good.
References
NHS Confederation (2022) Moving from silos to system improvement: what healthcare leaders want to see from the health disparities white paper. Available at: Moving from silos to system improvement | NHS Confederation
NHS England (n.d.) Adult mental health. Available at: NHS England » Adult and older adult mental health
NHS England and NHS Improvement (2018) The Improving Access to Psychological Therapies (IAPT) Pathway for People with Long-term Physical Health Conditions and Medically Unexplained Symptoms. Available at: https://www.england.nhs.uk/wp-content/uploads/2018/03/improving-access-to-psychological-therapies-long-term-conditions-pathway.pdf
Pati, S., MacRae, C., Henderson., D., Weller, D., Guthrie, B. and Mercer, S. (2023) Defining and measuring complex multimorbidity: a critical analysis. British Journal of General Practice, 73(733), pp.373-376. Available at: https://doi.org/10.3399/bjgp23X734661
Abbreviations
BNF: British National Formulary
CMD: Common Mental Disorders
COPD: Chronic Obstructive Pulmonary Disease
MH: Mental Health
Non-MH: Non-Mental Health
SMI: Severe Mental Illness
SNOMED-CT: Systematized Nomenclature of Medicine - Clinical Terms
