A typical blood test involves going to a doctor's office to have blood drawn, then waiting several days for the lab results.

But what if an implant could tell you in real time about the compounds in your blood — then beam the results to your phone?

That's the technology developed by scientists at Ecole Polytechnique Fédérale de Lausanne (EPFL) in Switzerland. Their implant, measuring just one-half inch by one-thirteenth of an inch (14 millimeters by 2 mm), transmits data to a smartphone via Bluetooth, the BBC reports.

The device, which can be implanted just under the skin and easily removed, contains several sensors coated with different enzymes. Each enzyme reacts to the presence of a different compound in the blood, whether pharmaceuticals, cholesterol, proteins, blood sugars or other substances, reports Medical News Today.

The opportunities for patient care are virtually limitless, said Giovanni de Micheli of EPFL, one of the research team's leaders. "Potentially, we could detect just about anything," de Micheli said in a statement from EPFL.

Drugs used in chemotherapy, for example, affect different patients in different ways, depending on age, metabolism, weight and other factors.

The tiny "lab on a chip" would let doctors determine the exact dose of medicine to provide treatment and avoid side effects. "It will allow direct and continuous monitoring based on a patient's individual tolerance, and not on age and weight charts or weekly blood tests," de Micheli said.

Additionally, the implant could monitor high-risk patients for the presence of troponin, a protein that's released by stressed heart muscle in the hours before a heart attack, ExtremeTech.com reports.

By alerting patients and doctors to rising levels of the protein, treatment could be started quickly, potentially saving heart patients' lives. And the device could be invaluable to people with diabetes, who currently must monitor their blood sugar with painful finger pricks.

The implant is powered by a skin patch about the size of a credit card. Researchers, who've tested the device and found it's as reliable as typical blood tests, say they hope to have the technology ready for the market within four years.

Follow Marc Lallanilla on Twitter and Google+. Follow us @livescience, Facebook & Google+. Original article on LiveScience.com.