Imagine a world where you could be scanned for illness each time you talked on your smartphone. What sounds like science fiction could soon be reality as researchers develop tests to analyze chemical signatures in the breath that offer clues about any illness — tests that would be cheaper, faster, and pain-free.

Although breath tests are still in the research phase, a study published in December showed they were successful at identifying 17 different conditions, including lung, kidney, and prostate cancers, Crohn’s disease, ulcerative colitis, irritable bowel syndrome, and multiple sclerosis.

Related: This App is Revolutionizing Diagnoses of Rare Diseases

Breath-based exams "have the potential to be the diagnostic test of the future,” says Stephen Steinhubl, Director of Digital Medicine at Scripps Translational Science Institute and a cardiologist at Scripps Health in San Diego, California. “They could replace routine cancer screenings, diagnose infectious disease, and monitor individuals at home for any chronic conditions.”

Consider the case of diabetes. Right now, a diagnosis takes a visit to a phlebotomist and a blood draw. Then the blood has to be sent away to a lab for testing, with the results returning days later. In the future, getting a diagnosis could be as easy as breathing into a tube and getting an immediate reading.

Tiny Molecules, Big Impact

These tests work because exhaled breath is the only time a person’s bloodstream mixes with the air. Most people exhale 17,000 to 30,000 times per day, and that breath isn’t just carbon dioxide — it also includes thousands of invisible compounds that come from deep within the body. About 1 percent of breath is made up of volatile organic compounds (also known as VOCs) that carry tiny chemical signatures of disease — from flu to cancer.

People have known there were signals in breath since around the 6th century, when Hippocrates urged doctors to recognize how a particular sweet smell in the breath meant a patient might be suffering from diabetes. Still, it wasn't a significant focus in medicine until nanotechnology made it possible to create sensors precise enough to analyze the compounds in breath.

Get the mach newsletter. This site is protected by recaptcha

The modern inspiration for these tests started back in the 1980s, when studies suggested dogs could sniff out cancer reliably. Experts suggest a canine's uncanny ability to smell is about a million times more sensitive than ours, but the dogs have to be trained, and are usually only able to pick up on one disease at a time. Breath tests, on the other hand, could scan for a wide range of conditions.

Today that research is coming to fruition. Scientists have created detectors that are sensitive enough to read a concentration of one part per million for certain molecules. Now they have to hone which particular signatures are present in which illness.

Fight the Flu

One condition for which diagnosis could be a major benefit is the flu. Perena Gouma, a professor at The University of Texas at Arlington, has created a breathalyzer to diagnose the virus instantly. This would let people get treatment early, without having to see a doctor or risk exposing others to their illness.

The test identifies three key biomarkers of the flu in a sick person’s breath: acetone, ammonia, and isoprene. Gouma imagines a person could soon visit a drug store to pick up a test for about $20. The result could be sent wirelessly to a doctor, and the patient could quickly obtain any medications needed.

“Early and instant detection would mean fewer people need to go to doctor’s office, which would cut down medical costs and time,” says Gouma, who published a paper on her test in the journal Sensors last month.

The technology could be a way to fight emerging pandemics as well, as it could be modified to offer instant diagnoses for Ebola and other viral infections.

Finger Prick-Free Diabetes Monitoring

Keeping people healthy is what drives Gus Hancock, Emeritus Professor of Chemistry at Oxford University, who developed a breath test for diabetes in 2014. Hancock explains that the test analyzes a person’s level of acetone — the byproduct from a buildup of chemicals that accumulate when insulin production is low.

Most people have breath acetone levels of between 0.5 to 1 parts per million, but that level can go up ten times or more when someone has untreated diabetes. To examine this, Hancock and his colleagues created a device that traps the acetone and analyzes its concentration.

In the future, information discovered through breath tests could be forwarded to you doctor for immediate diagnosis. John Fedele / Getty Images

So far, researchers have tested the device using healthy subjects under different conditions like overnight fasting or exercising. The results suggest that the technology would be able to identify patients who had undiagnosed type-1 diabetes, or problems controlling their blood glucose. Adding to the practicality of the device, researchers say it could be reused many times.

Hancock thinks the device could be used two ways in the near future: either as a routine screening device for diabetes, or a way to regularly monitor people without testing their blood. If the patient found their glucose levels were getting out of whack, they could go in for treatment.

Related: The Quest to Create Artificial Blood May Soon Be Over

Scripps’ Steinhubl says breath tests could be seamlessly integrated into health monitoring through your smart phone, which would sample breath every time you talked on it. “You might have a different cartridge for different uses that could be clipped on” to the device, he says.

Cancer screening tests could be done at home using similar methods, which may reduce the need for time-consuming and invasive tests like colonoscopies and mammograms, Steinhubl says. If the test raised a flag, then a patient would be sent in for further examinations. A patient could have specific tests prescribed — say, for asthma or heart disease — and could do their own monitoring at home.

“Like many digital tools, breath tests would have to part of a system of care, linked to a virtual health care provider,” he says. “If you want to discuss the results, you’d be able to — but you could avoid going to doctor’s office.”

Follow NBC MACH on Twitter, Facebook, and Instagram.