Could ‘R’ become the basis for effective NHS analytics?

Profile picture for user gflood By Gary Flood December 3, 2019
Why burns surgeons, anaesthetists and other NHS medical specialists are teaching themselves a complex programming language more commonly used by statisticians and data miners

Image of a heart monitor

As you probably know, R is an Open Source language and environment used for developing statistical software and data analysis. Kicked off in 1992, its usage is especially common in the banking and finance sectors for use cases such as credit analysis, though it has also been picked for key projects by vendors ranging from Google to Microsoft to Airbnb.

What you probably don’t know is it’s becoming of growing interest in the NHS —and the people picking it up aren’t data scientists, but frontline medical professionals.

Take the work of Dr Tom Lawton, a consultant in critical care and anaesthesia who works at Bradford Royal Infirmary. He recently published a paper on how he and a colleague had used R to better model patient flow and resource use at his hospital’s critical care unit, as well as “explore the effects of nursing staffing, bed- base changes, and other changes to working which might impact on flow through the unit” during the Winter crisis of 2015-16.

A one-off? It turns out Dr Lawton may be just the first of many practitioners who think that what they can get from this Open Source stats environment is worth taking the time and trouble of learning the language for. For instance, a team from NHS Improvement has been using R to support the annual process of activity planning for 2018/19, using something called time series forecasting to support the planning of activity for 148 acute hospitals, resulting in a process that used to take many months to do, which now is undertaken in just a few hours. And in another project, a doctor has developed an R software tool that can speed up analysis of free or semi-structured endoscopy reports and their associated pathology specimens. 

The evidence for these success stories and the wider prediction of further use of R in the National Health Service is the rapid growth of something set up 18 months ago called the NHS-R Community.

The Community defines itself as “a community dedicated to promoting the learning, application and utilisation of R” in the National Health Service, and which had its very successful second-ever annual conference recently in Birmingham. Speakers on the day included representatives of organisations like Guy's and St Thomas' NHS Foundation Trust and Bradford Institute of Health Research, as well as data science specialists, analytics software vendors like Mango Solutions and health charities. 

This was the second such get-together for this sector. For its first one-day conference in November last year, 119 delegates from the UK from 36 NHS organisations, including hospitals, showed up. But at this second go-round a couple of weeks ago, two days were organised—with all places going inside two hours, and more like 300 delegates from over 45 NHS organisations rocking up.

While we have previously reported on other R conferences, this is definitely the first time diginomica/government became aware of just how popular R-based analytics work is becoming in UK healthcare. We wanted to know more, so reached out to the Director of the NHS-R Community, Dr Mohammed Mohammed, Principal Consultant (Strategy Unit), Professor of Healthcare, Quality & Effectiveness at the University of Bradford.

Dr Mohammed started with some context about why he’d come to work in this space, and how NHS-R got started:

I am an academic working in the Strategy Unit in the NHS, and most of my research has made secondary use of data routinely collected in the NHS as part of the process of care. In much of my work I used R - a free, leading data science language. The Health Foundation, a charity committed to helping improve healthcare, put out funding call to improve data analytics in the NHS.

In response, I submitted a successful bid to promote the use of R in the NHS in November 2017. In March of last year, the NHS-R Community project was started and subsequently extended by an additional three years of funding from the Health Foundation.

‘The absence of a world leading, free, NHS data science means that we’re paying for proprietary software when we don’t have to’

But why R in particular? How did it become so central to the NHS analytics story? Dr Mohammed said: 

R is now widely used in industry and academia, is ranked amongst the most popular programming languages in the world, but its use in the NHS is almost non-existent. 

Whilst there are several reasons for this, the absence of R at scale in the NHS means that  it’s unable to take advantage of the huge benefits of R, which include cutting-edge visualisation and statistical tools and a worldwide R community which freely shares learning and resources. 

We want the NHS to solve analytical problems using R. To get there, we need the community to take part in identifying problems, as well as developing, testing and implementing solutions. The absence of a world leading, free, NHS data science tool means that we’re paying for proprietary software when we don’t have to. And the NHS analytical community does not have a way to mobilise knowledge by sharing solutions, because solutions developed in one team are not transferable unless they have the same proprietary software.

So our aim is to promote the use of R in the NHS, and help to make the NHS better at data science. I’m pretty sure there is enough brain power in NHS to tackle any analytical challenge, but what we have to do is harness that power, promoting R as the incredible tool that it is, and one that can enable the growing NHS analytics community us to work collaboratively, rather than in silos.

Part of that, he argues, will be widening awareness of what R can do, which he says is already being proven by the fact that the Community already has 1365 Twitter followers and 20 people who regularly blog about its potential and applications in UK healthcare. But the real deliverable: capacity with a plan to train at least 10,000 NHS staffers in R by the end of the initial three-year Health Foundation funding.

Next steps in R’s perhaps surprising mushrooming in the NHS, he told us, will include the setting up of a virtual NHS-R Academy to provide yet more training and support for useful NHS R-based solutions complementing existing resources like the website, free workshops and that fast-growing annual conference.