Scientists at Khalifa University are finalizing a device that will predict a heart attack, hours or even days before it happens.

The wearable device looks for irregular heart patterns in patients with a history of heart attacks using an algorithm to monitor electrocardiography data.

“People who have already had heart attacks show a different shape of ECG reading to a normal, healthy heart," said Dr Ahsan Khandoker, professor of biomedical engineering, according to The National .

If you're not already impressed, the device will be powered by body heat, not batteries.

“We wanted this to be low maintenance and the body produces enough heat to electrically charge the device," Dr ­Baker Mohammed said .

Although there are similar devices in the market, this device looks at 'irregularities' giving longer lead time prior to the actual attack.

“We believe that this technology can give from three hours to up to a week’s warning, perhaps longer," Mohammed Ismail, director of KU’s semiconductor research centre, said .

The device includes a sensor, processor and wireless chip, allowing all the data to be transmitted to your mobile phone

The scientists are looking to get their device patented and have sent their application to the U.S. patent office. However, the process takes about 16 months.

The university's biomedical and electrical engineers team want to begin clinical trials.