Here you can find details of a range of current and previously-completed HSMA projects that have their code made available in a Github repository.
Click on the preview for each project to read the full details. For many completed projects, you can watch a short talk from the HSMAs who undertook the project on their plans, successes and challenges.
Completed Projects with Code

Meeting the demand of 111 for primary care services
The project modelled NHS 111 calls triaged to primary care. Simulations showed timely primary care contact could reduce 999 calls and ED attendances but would require nearly doubling primary care services.
• NHS Devon ICB
• University of Plymouth

The role of Patient Initiated Follow-up (PIFU) and ‘Digital Outpatients’ in Supporting the Elective Recovery - Can We Better Size Potential for Clearing the Backlog?
The project aimed to explore the role of Patient Initiated Follow-up (PIFU) in addressing backlogs by mapping rheumatology outpatient pathways using discrete event simulation. The team modelled resource use and redeployment, focusing on PIFU's impact on referral-to-treatment waiting lists.

Reducing Travel Times to Treatment for Cardiac Patients in the South East of England
The project analysed travel times to understand the impact of flow of activity into London on patient travel. It identified a gap in cardiac surgery access for Kent & Medway patients, suggesting new sites could help. A Streamlit app visualised these impacts.
• NHS England
• The Strategy Unit

Developing a Service Planning Decision Support Tool to Tackle Inequalities and Minimise Carbon Output
The project explored the feasibility of considering inequalities and carbon emissions in new clinic locations. Achievements include automating a Health Equity Assessment, running logistic regression models to predict appointment no-shows, and estimating patient travel carbon emissions.
• Torbay Council
• West Sussex County Council

Using Discrete Event Simulation to model the bottlenecks in the Acute Medical Unit pathway
In this project, a computer simulation of the acute medical pathway in a Devon trust was created, along with an interactive tool allowing parameters such as the staffing levels to be changed. This allowed staff to explore the optimum levels of resourcing, enabling risk-free testing of staffing and resource changes before committing to these changes in the real-world.

Discrete Event Simulation to model elective surgery pathways
The project created a Discrete Event Simulation to model elective surgery pathways. This tool optimises surgical pathways and provides a ready-made format for creating interactive webapps, benefiting future HSMA participants and other interested users.

Network Analysis of diagnostic procedures in A&E setting
The project aimed to analyse the relationship between different diagnostic procedures in A&E using NHS ECDS data. A web tool was developed to provide insights into diagnostic procedure usage across the country. The tool will allow users to explore graphic visualisations and accompanying analytics.

Creating a tool to automatically generate health equity audits for Community Diagnostic Centres
The project aimed to create a tool to perform a health equity audit for Community Diagnostic Centres (CDCs) in England. The tool will identify healthcare inequalities, suggests data improvements, and supports local CDCs in understanding their impact. Developed using Python and Streamlit, it allows for easier comparison and sharing of learning across regions, with potential applications beyond CDCs.
• Reading Borough Council

Investigating factors impacting NHS workforce retention
This project aimed to work out which factors are the biggest drivers of staff turnover using regression modelling on staff workforce figures as well as other local factors such as employment. This was turned into a dashboard for internal use.
• Yorkshire Ambulance Service NHS Trust
In Progress Projects with Code
Discrete Event Simulation modelling of Non-elective flow
Poor patient flow in Emergency Departments leads to long admission waits and poorer patient outcomes. Strategies include increasing beds and reducing discharge delays. This project uses Discrete Event Simulation to explore bed numbers, length of stay, and Same Day Emergency Care impacts on ED waits, aiming to optimise patient flow.
Discrete Event Simulation modelling of childrens ADHD diagnosis and treatment
The project uses Discrete Event Simulation to model the children's ADHD diagnostic and treatment pathway, aiming to reduce waiting times and lists. It proposes a new pathway with preliminary diagnostic testing to ensure accurate ADHD assessments. The model will evaluate the impact of these changes and may extend to include 1:1 and group session appointments.
Modelling eye injection pathways
The project aims to develop a flexible simulation model to optimise anti-VEGF treatment strategies in ophthalmology. It will use dual modelling frameworks, a modular design, and an interactive dashboard. The model will analyse clinical effectiveness, costs, and resource requirements, adapting to new treatments. The objective is to provide a tool to improve patient outcomes and optimize resource use and costs.
Modelling bed occupancy on an Acute Ward
The project aims to develop a tool for time series forecasting of bed occupancy using historical data, incorporating seasonality and growth. A web-based app will simulate acute bed models, including variables like closed beds and additional capacity. Using machine learning and discrete event simulation, the tool will aid decision-making and provide reliable daily forecasts.
Developing a streamlit app for creating Theographs of patient journeys
The project aims to create an open-source application for generating interactive theograph visuals to understand patient/client journeys. It will be a generic tool requiring minimal data fields, usable in various healthcare or social care settings.
Modelling the benefit of MECC (Making Every Contact Count) Training using agent based simulation
Making Every Contact Count (MECC) is an e-learning program for health and social care staff to promote healthy lifestyles. This project uses Agent Based Simulation to model MECC's impact on behaviors like smoking, drinking, and exercise.
• Surrey and Sussex Healthcare NHS Trust
• Somerset NHS Foundation Trust
Proactive Patient Attendance Prediction: Enhancing Healthcare Efficiency through Attendance Forecasting
At Barts Health NHS Trust, 12% of outpatient appointments are missed monthly, wasting over 10,000 hours of clinical resources. Missed appointments can lead to extended waiting lists and patient deterioration. This project aims to develop a machine learning model to forecast non-attendance, a patient contact capture tool, and integrate the model into enterprise reports.
Using machine learning to identify factors that increase number of appointments per pathway
The new EPP data set offers the most comprehensive view of elective pathway activity. Currently, the reasons for varying appointment numbers are unclear, but one theory is that longer waits lead to sicker patients and more appointments. This project plans to use Machine Learning to investigate this further.
DES Modelling of The Hyperacute / Acute Stroke Pathway - Patient and Economic Outcomes
Stroke prevalence in the UK is forecasted to increase by 40-60% from 2021 to 2030, straining hospitals and society. This project aims to develop a discrete simulation model to optimise the Hyperacute/Acute stroke pathway, improving patient outcomes, reducing costs, and enhancing economic benefits. It will analyse variables like staffing and operating hours

Building a Machine Learning tool to predict Did Not Attend (DNA) events
This project is developing a machine learning-based tool that looks at the likelihood outpatient Did Not Attend (DNA) incidences across different services/demographics.
Optimising Same Day Emergency Care (SDEC) Resourcing
This project will model Same Day Emergency Care (SDEC) and Emergency Department (ED) pathways at University Hospitals Bristol and Weston NHS Foundation Trust.
Developing a primary care load management tool
A GP practice had peak call wait times of 60 minutes. Adding more staff improved this, but lower utilisation was then seen during quieter periods. This project will model the telephone system and call handlers' workload to optimise resourcing, producing a web app to test different scenarios.
Modelling the Talking Therapies clinical pathway using a Discrete Event Simulation
The NHS Talking Therapies programme, supports NICE guidelines for treating anxiety and depression. The aim is to develop a Discrete Event Simulation to model patient flow through the new clinical pathway. This project will identify potential waiting list build-ups due to increased referrals into Talking Therapies.
eFIT: Extra funding allocation - inequality tool
The project addresses the lack of national guidance for allocating extra primary care funding by ICBs. It proposes using an equation based on deprivation scores and local needs. A Streamlit web-app tool will help ICBs allocate funds more equitably, considering various indicators and demographics, ensuring a fair distribution and reducing inequalities.