Faster than a medic (Image: Aurora Photos/Alamy)

WHEN someone shouts “Code Blue!” in a hospital, it usually means a patient needs immediate help. An algorithm may be able to make that call 4 hours earlier to head off dangerous situations.

Code Blue events, which include cardiac or respiratory arrest, can be difficult to anticipate. Doctors use a scorecard, known as the Modified Early Warning Score, to estimate the severity of a patient’s status by looking at vital signs like heart rate, blood pressure and temperature. Knowing that certain patients are at high risk helps hospitals to lower rates of arrest and shorten hospital stays.

Sriram Somanchi of Carnegie Mellon University in Pittsburgh, Pennsylvania, and his colleagues wanted to see if a computer could predict when these emergencies were imminent. “We had to understand what happens in Code Blue patients before they enter Code Blue,” Somanchi says.


The researchers trained a machine-learning algorithm on data from 133,000 patients who visited the NorthShore University HealthSystem, a partnership of four Chicago hospitals, between 2006 and 2011. Doctors called a Code Blue 815 times. By looking at 72 parameters in patients’ medical history including vital signs, age, blood glucose and platelet counts, the system was able to tell, sometimes from data from 4 hours before an event, whether a patient would have gone into arrest. It guessed correctly about two-thirds of the time, while a scorecard flagged just 30 per cent of events.

An algorithm can predict heart attacks and respiratory arrests 4 hours before they happen

Peter Donnan at the University of Dundee, UK, says it may be difficult for the system to work in hospitals that don’t collect such detailed patient data. The advantage of the scorecard, he says, is that it relies on a small number of parameters. “When we look at it from a statistical point of view, a small model is better.”

The algorithm still needs work – it reports a false positive 20 per cent of the time, says Somanchi. To improve its performance, his team is planning to train the system with data from other hospitals. The work will be presented at the Knowledge Discovery and Data Mining conference in New York City in August.

This article appeared in print under the headline “Machine beats medics at predicting heart attacks”