A new study out from health startup Cardiogram and the University of California San Francisco (UCSF) suggests wearables like the Apple Watch, Fitbit and others are able to accurately detect common but serious conditions like hypertension and sleep apnea.

Cardiogram and UCSF previously demonstrated the ability for the Apple Watch to detect abnormal heart rhythm with a 97 percent accuracy. This new study shows the Watch can detect sleep apnea with a 90 percent accuracy and hypertension with an 82 percent accuracy.

Sleep apnea affects an estimated 22 million adults in the U.S., with another 80 percent of cases of moderate and severe obstructive sleep apnea undiagnosed, according to the American Sleep Apnea Association. This is a serious condition where the person affected stops breathing in their sleep and can lead to death.

Another 75 million American adults have high blood pressure (hypertension), according to the Centers for Disease Control (CDC), putting them at risk for heart disease and stroke, the top causes of death in the United States.

Being able to detect sleep apnea and hypertension in the comfort of our homes with just a simple device could be a game-changer in medicine. Right now most patients must go to the doctor and wait to be tested at sporadic intervals, making it hard to detect if there’s a spike in blood pressure in the moment when it becomes critical, and even harder to tell if someone is suffering from sleep apnea, as that is something that happens while the person is asleep.

The new N=6,158 study recruited 6,115 participants through the Cardiogram app to test using their Apple Watch over a period of time. Study leads were then able to detect sleep apnea in 1,016 of the participants and hypertension in 2,230 of the subjects using a trained deep learning algorithm called DeepHeart.

DeepHeart was trained on data from 70 percent of participants, and then tested on the remaining 30 percent who were not used in training, according to Cardiogram co-founder Brandon Ballinger.

Though the study was conducted through the Apple Watch, Cardiogram’s other half Johnson Hsieh believes it shows promise for most wearables that incorporate a heart-rate sensor as “they basically all have the same technology built inside,” he told TechCrunch.

“The idea here is that by screening continuously you would identify people with hypertension who might not know they have it,” said Hsieh. “And then you’d guide them through the appropriate final diagnosis, which would be through a blood pressure cuff and then treatment.”

Cardiogram and UCSF’s study on heart health is the third major study of deep learning in medicine, following Google Brain’s results on diabetic eye disease in December of 2016 and a Stanford study on skin cancer this January.