LIVERMORE -- Your head aches, you're congested and simply getting out of bed is a chore. You pay a visit to your doctor, and within minutes -- using a simple cheek swab placed in a tiny box -- he knows precisely which virus or bacteria is causing the symptoms and prescribes the right treatment.

While this scene would be right at home in the "Star Trek" sick bay, it may become a staple in real-world clinics within the decade, according to Lawrence Livermore Laboratory chemical engineer Elizabeth Wheeler.

Wheeler's team of engineers, biologists and chemists, headed by principal investigator Reginald Beer, is developing a method to recognize disease-causing pathogens quicker than ever before. The key: obtaining the bacteria or virus DNA and rapidly copying it so there's enough to identify what's causing your illness.

"It's basically like you're Xeroxing it," Wheeler said. "Once you've got enough of it, you can detect it."

The technique -- polymerase chain reaction (PCR) -- isn't a recent phenomenon. In fact, it turned 30 this year. Discovered in 1983 by Nobel Prize winner and UC Berkeley alum Kary Mullis, it's been used for identifying human remains, food safety, and bacterial detection.

Just as you learned in science class, DNA has two strands. Using PCR, a special enzyme is added and the DNA is heated up to 94 degrees Celsius (202 degrees Fahrenheit). The strands break apart and the enzyme "fills in" the opposite strand. By alternately heating and cooling the sample in a device the size of two toasters stacked on top of each other, the technique doubles the amount of genetic material with each cycle. It takes about three minutes to run the 30 cycles needed to amplify the DNA to a size where it can be identified.

Wheeler, whose husband is a San Ramon physician, said the project's goal is to have Fast PCR devices in every clinician's office, allowing patients to submit a sample and have it processed while the doctor goes through his checkup routine. Before the exam is over -- in about the time it takes to cook a bag of microwave popcorn -- the physician could make a decision on appropriate treatment.

"Everyone's been frustrated when you go in and its like, 'is it a virus or a bacteria?'" Wheeler said. "You could run this and they can say 'yep, you have a bacterial infection, here's the antibiotic,' or 'it's a virus, go home and rest.'"

Dr. Stephen Bustin, a British scientist and former professor of molecular sciences, literally wrote the book on the PCR technique. While reactions once took hours, Bustin said via email, they're now routinely done in tens of minutes.

The amplification now takes only three minutes but other preparations make the whole process longer. Within a year or two, he adds, getting results in less than 10 minutes will become commonplace.

"This opens up all kinds of diagnostic possibilities," Bustin wrote, including "carrying out PCR evaluations of a patient's sample whilst talking to the doctor."

Working on Fast PCR since 2010, Beer's team was responsible for speeding up the amplification part to less than three minutes. In that technique, cold water is passed over a porous copper platform holding the microscopic samples, rapidly dropping the temperature to 55 degrees Celsius (131 degrees Fahrenheit). The platform is heated back up, the cycle repeats 30 times, and the results are matched to a known genetic signature. As speedy as the procedure is now, Wheeler thinks the team can go even faster.

The Livermore researchers' next step is integrating optics into the device to detect the DNA even earlier, and finding more practical options to time-consuming sample preparation. Wheeler said the pieces are already in place to allow the entire process to be done in less than 10 minutes.

Dr. John Leamon, head of biological research and development at CyVek, an American biotech company focused on health care, said rapid PCR could be a valuable tool in other areas where time plays a key factor. It could be used to detect pathogenic agents during military conflicts, he said, or to monitor food supplies and crops. Scientists could take a food sample, test it for harmful bacteria within minutes, and remove the tainted supply before it even ships.

Lab officials believe it could be useful during outbreaks of diseases like SARS. Scientists would be able to test passengers entering the country within minutes, rather than quarantining them for days.

Lab spokesman Steve Wampler said two unnamed companies have already expressed interest in licensing the technology, adding that a consumer version of the device would take at least five to seven years to bring to market.

Contact Jeremy Thomas at 925-847-2184. Follow him at Twitter.com/jet_bang.