The science of blood testing has come a long way in the past three years.

The research, in large part, has been driven by the alarming increase in the frequency of antibiotic-resistant bacteria.

Medical experts say part of the reason for this rise is patients being given antibiotics when they have a virus.

The drugs don’t cure the viral infection, but their circulation can spur bacteria to mutate and strengthen themselves against antibiotics.

So, researchers are homing in on ways to develop tests that can help distinguish between viral and bacterial infections, as well as pinpointing the exact type of infection.

In July, researchers at Stanford announced they have developed a test that reads 18 genes to determine if a patient is infected with a virus or bacteria.

In summer 2015, other researchers unveiled a test called VirSCAN that they said can identify every viral infection a person has had in their lifetime.

These breakthroughs are the outgrowth of research that broke new ground three years ago.

Read more: How one salmonella strain became so powerful »

Research that paved the way

In September 2013, a blood test developed by researchers at Duke University was touted as being able to predict with tremendous accuracy whether someone with, say, pneumonia has a viral or bacterial infection, even if the illness came from a previously unknown strain.

The test, described in the journal Science Translational Medicine, could someday help stop the unnecessary prescribing of antibiotics to patients who have viral infections.

This report came out the same week that the director of the U.S. Centers for Disease Control and Prevention (CDC) told reporters that something must be done to curtail the inappropriate use of antibiotics. The practice has led to emerging bacterial strains that are resistant to all known drugs.

“The timing of the CDC report regarding the overuse of antibiotics and our results is really amazing,” said Dr. Christopher Woods, who at the time was an infectious disease researcher at the Institute for Genome Sciences, which was then at Duke University’s School of Medicine in North Carolina.

The CDC director announced at that time that 23,000 Americans die of antibiotic-resistant bacterial infections every year.

“That's a small drop compared to what happens globally,” Woods said.

Read more: Concerns over ‘super gonorrhea’ heading to the United States »

How the test works

The Duke University test can recognize a specific genetic fingerprint that the body expresses when it's sick.

In an experiment, 102 subjects with viral and bacterial infections, as well as healthy control subjects, arrived at a hospital emergency room and were given the blood test.

With about 90 percent accuracy, the test returned the proper diagnosis in 12 hours.

Dr. Geoffrey S. Ginsburg, who was also then at Duke's Genome Institute, told Healthline the test results were confirmed using traditional lab tests, which take longer and are more labor-intensive.

“It was really outstanding from our perspective having an assay [test] that performed so robustly in a real-world setting.”

In larger studies, scientists planned to look at ways of paring down the number of genes the test analyzes and reducing the test's turnaround time to as little as one hour.

“We'd love to have the pregnancy test equivalent to viral infections,” Ginsburg said.

Read more: How bacteria on your breath can help antibiotic resistance »

Stamping out a bioterrorism threat

Woods, Ginsburg, and others filed for a provisional patent on the science behind the test.

Their experiment was funded in part by the Defense Advanced Research Project Agency (DARPA), an arm of the U.S. Department of Defense.

Many of the infectious samples the team used to develop the test came from the global H1N1 pandemic of 2009. Many H1N1 sufferers were not quickly diagnosed or treated, which allowed the disease to spread to more individuals.

In addition to the early detection of naturally occurring global pandemics, the authors believe their test could also help the United States respond to a bioterrorism attack.

“This could help screen people for exposure, perhaps even before they have fully developed symptoms,” Ginsburg said. “We hope it's an application, if it ever comes to that.”

Ginsburg said he expects medical technology companies will follow suit to develop smaller, more readily available diagnostic equipment for rapidly analyzing test samples. “Our hope is it could shut a pandemic down before it gets started,” he said.

The most immediate application, however, will be to curb the overuse of antibiotics. Patients often arrive at the doctor's office with a common cold, which is caused by a virus. Because the symptoms could falsely point to a bacterial infection, antibiotics are often prescribed.

Not only is the treatment futile, it lets bacteria learn to mutate and become more powerful, Ginsburg said, and wastes a patient's time and money.

In a brief statement to Healthline, the CDC said, “CDC welcomes new strategies and technologies that seek to curb unnecessary antibiotic use and resistance.”

Editor’s Note: This story was originally published on September 18, 2013, and was updated by David Mills on October 4, 2016.