Enabling AI in an NHS Acute Trust with Plotly

Meet the Speaker

Andy Mayne
Andy Mayne is the Chief Analytical Scientist at Somerset NHS Foundation Trust.
This video highlights how Somerset NHS Foundation Trust (SFT) enabled AI across its operations using Plotly Dash and open source Python libraries. Facing challenges related to data interoperability, reproducibility, and diverse clinical workflows, the team sought a flexible solution that could support both sophisticated modeling and broad accessibility.
The trust rejected generic low-code platforms in favor of custom-built solutions tailored by NHS data scientists. They needed tooling that could handle over 100 treatment specialties across multiple sites, work with varying levels of data literacy, and support secure data sharing across organizations.
- Plotly Dash was chosen for its flexibility, transparency, and compatibility with the trust's Python-based workflows
- The team built fully open source apps using libraries like scikit-learn, SKTime, PyCaret, and SimPy, integrated into Dash for web delivery
- Dash Enterprise enabled quick deployment, access control, and scaling as needed
One key success was the AI-enhanced Emergency Care dashboard. Traditionally, admission decisions were made around three hours after triage, limiting time for patient flow teams to find beds. By building a classification model that predicts admission within 15 minutes of triage, the team provided hours of lead time, improving patient flow and reducing wait times.
Other applications include:
- A service planning app using clinical demand and geographic data to reduce travel time and carbon footprint
- A causal impact analysis tool allowing staff to independently evaluate interventions
- A hospital time series forecasting tool for operations and resource planning
- A machine learning platform tailored for clinical users, built with PyCaret
- A capacity simulation model using SimPy to assess staffing and demand scenarios
By keeping all data operations in Python and aligning with reproducible analytical pipelines, the team maintained transparency, control, and scalability. Dash apps run directly off shared data warehouses, ensuring consistency with analytical reporting teams.
The video underscores how Dash enabled rapid prototyping, secure deployment, and real-time insights across a large, complex organization. Watch the video to see how this NHS trust is transforming healthcare analytics with Python and Dash.