While your smartphone probably won’t ever replace a proper cardiologist, researchers have created an app that can detect if you have a heart condition.

The team at the Technology Research Centre (TRC) at the University of Turku, Finland, developed an algorithm that takes data from smartphone sensors to diagnose patients. The breakthrough could help revolutionize medical care and save lives.

Atrial fibrillation, which affects two percent of the world’s population, is normally preventable if properly diagnosed. However, the electrocardiogram (ECG) machines used for detecting the condition are big and expensive. The condition costs $19 million every year across the EU.

“If people feel odd and want to check their cardiac status, they can simply lie down, place the phone on their chest, take an accelerometer and gyroscope measurement, then use the app to analyse the result,” said Tero Koivisto, vice-director of the TRC, in a statement on EurekAlert. “They will get a simple yes/no answer as to whether they have atrial fibrillation or not.”

The app uses the phone’s accelerometer and gyroscope to work out whether a user has the condition. It’s surprisingly accurate: the testers were able to detect atrial fibrillation with a sensitivity of over 95 percent. Considering how many people have a capable smartphone, it could greatly aid in preventing the disease worldwide.

“This is a low cost, non-invasive way to detect atrial fibrillation that people can do themselves without any help from medical staff,” Koivisto said. “Given the widespread use of smartphones, it has the potential to be used by large populations worldwide. In future, a secure cloud service could be created to store and analyse larger masses of data.”

Photos via Getty Images / Ilya S. Savenok