Long stayers risk stratification
Owner
Developed by the NHS AI Lab Skunkworks in collaboration with Polygeist, Gloucestershire Hospitals NHS Foundation Trust, and the Home Office’s Accelerated Capability Environment (ACE).
The project is licensed under the MIT licence, which allows for free use of the software for modification, distribution, private use and commercial use.
Background
People who stay in hospital care for long periods of time often experience worse health outcomes than those who don’t, with a higher risk of readmittance and complications. According to the Journal of Gerontology, ‘Ten days of bed rest in hospital leads to the equivalent of ten years of ageing in the muscles of people over 80.’ (Kortbein et al 2004). More serious conditions require more intensive care, and can be more common for older patients, but when ‘long stayers’ are defined as patients with hospital residence exceeding 21 days, they have significantly worse medical and social outcomes than other patients, with double their mortality rate. These longer stays are often avoidable: one study showed that 60% of immobile older patients had no medical reason that required bed rest (Graf 2006, American Journal of Nursing). Long-stayers are often fit for discharge many days before they actually leave hospital but a complex mixture of medical, cultural and socioeconomic factors contribute to the causes of unnecessary long stays.
Long stayers at the Gloucestershire Hospital Trust occupy an average of 278 beds per day which is around 4% of all admissions but accounts for 34% of bed use. The ability to identify and intervene early could make a real difference to these patients and others.
Giuseppe Sollazzo, Deputy Director and Head of AI Skunkworks & Deployment for NHS’ CTO
Situation
The team at Gloucestershire Hospitals NHS Trust wanted to be able to better predict the length of stay of patients as they’re admitted to hospital. Where staff can be alerted to the possibility that patients may otherwise stay for a long time or have complications, they can adjust care plans appropriately, anticipate needs, and free up resources.
In April 2021, they presented a pilot project to the Artificial Intelligence (AI) Skunkworks team in the NHS’ Transformation Directorate. The AI Skunkworks team:
Demonstrate the potential for AI in health and social care, and provide open source code so that others can explore and develop AI tools. The NHS is a system with many different moving parts, which means different organisations are on different journeys regarding their use of technology and software. But I think overall, it's moving towards open sourcing some of the technology, the code, to a state where others will be able to reuse it, share knowledge between different organisations, and progress the ideas of the initial developer.
Amadeus Stevenson, Data Technology Lead at the NHS AI lab.
Aspiration
- Improve quality of care and care outcomes by proactively identifying patients who are likely to end up as long stayers at the point of admission
- Enable staff to develop appropriate intervention packages early
- Support staff in discharge planning and help improve bed management
- Make a case for the improvement of data collection and use to support better predictive analytics in healthcare
- Maximise learning by working in the open, making the resulting source code available for continued experimentation by other researchers and developers.
Solution and impact
The AI Skunkworks team aimed to develop a prototype tool that would:
- Standardise the process of length-of-stay assessment,
- Determine if an experimental AI approach to predicting hospital long-stayers was possible and if so,
- Produce a proof-of-concept (PoC) risk stratification tool.
Initial analysis of historical data identified that age, gender, ethnicity, location, presence of chronic illness, and presence of frailty might all contribute to a model for predicting length of stay. Using this analysis the team built a machine learning model that predicts the length of stay (in days) for an individual patient, and generates a risk score from 1-5 (where 5 is the highest risk of stays over 21 days). Looking backwards (through the historical data), the model successfully identified around two thirds of all patients who became long stayers at time of arrival. One of the issues that impacts the success of the model is the consistency of the data it uses to make predictions. Data quality can vary from one health care system to another: a more coherent approach to information collection and transmission would help improve the capability of this model and others like it.
The prototype is now being trialled in real time to assess its ‘live’ performance, with integration into the clinical electronic patient record (EPR) system. The model runs as a backend service which writes directly to the EPR database, and provides both risk score and estimated length of stay to staff for review.
Prior to full deployment, the model is under assessment to ensure compliance with UK Medical Device Regulation (2002). This approach will either fall under ISO standards for developing medical software, or regulatory requirements as either a class one or two medical device. This assignment is a common necessity for modern, digitally enabled, healthcare. Although open source software presents some specific challenges, the Medicines and Healthcare products Regulatory Agency (MHRA) and the regulatory Multi Agency Advisory Service (MAAS) are working with the NHS to ensure that projects like this are suitably assessed.
Functionality
Once regulatory assessment is complete and the relevant steps completed, this tool can be used in clinical settings to:
- Analyse historical patient data for patterns and relationships with length of hospital stay.
- Predict and categorise the risk of a patient staying for more than 21 days in hospital (using machine learning).
- Provide hospital staff with a visible long-stay risk score on a patient’s electronic record as soon as they arrive.
Capabilities
- Reduction in bed days
- Greater access to beds
- Train NHS teams on information governance, data collection, data processing
- Promote experimental data science and AI prototyping analysis
Scope
- The AI tool has the potential to lead to a decrease in the length of hospital stays overall with corresponding reductions in patient deterioration and mortality during admission
- With better care outcomes it may also lead to reduced readmission rates
- The project has been designed for integration with electronic patient records and patient administration systems in a clinical setting, and could be integrated into admission dashboards beyond Gloucestershire.
Key learning points
- Extracting data from the relevant data store required significant work and clean-up
- Recording data in a coherent and high-quality way is key for future studies
- Gloucestershire has only a handful of data scientists, finding the right people in an organisation with data science capability or who are “up and coming” can be a challenge.
- Working in the open is relatively new to the NHS and there is a challenge in educating people across the NHS about open source and collaborative ways of working.
- NHS IT colleagues are often under-resourced and need to be approached constructively.
- It’s important to develop and publish simple baseline models alongside more advanced models for comparison. An internal Skunkworks team will publish a comparator in summer 2022.
Digital equalities
- Helps to improve health outcomes for older and frail patients.
- Surfaces relationships between age, gender, ethnicity, location, and presence of chronic illness with longer hospital stays and worse care outcomes.
Give us feedback
Disclaimer
These case studies summarise user and patient experiences with digital solutions along the relevant care pathway. Unless expressly stated otherwise, the apps and digital tools referenced are not supplied, distributed or endorsed by NHS England or the Department of Health and Social Care and such parties are not liable for any injury, loss or damage arising from their use.
All playbook case studies have either passed, or are currently undergoing the Digital Technology Assessment Criteria (DTAC) assessment.
Please note the full legal disclaimer: NHS England playbook disclaimer
Page last updated: September 2022