It's either a medical miracle, or the ultimate surveillance device, depending on your perspective. This incredible new sensor can monitor drug levels in your blood in real-time, and has already been shown to work in mice. This video shows how it functions.

Unlike current blood sensors, which can only measure the levels of a few molecules in your blood — like insulin, for example — this device can measure levels of almost any molecule you like.

In a paper published last week in Science Translational Medicine, we learn more about how the sensor, called MEDIC, works:

The sensor in the device consists of shape-changing probes, switches that can only be flipped by the right molecule. The greater the concentration of a drug in solution, the more switches will get flipped. The biosensor is versatile; it can be reconfigured to measure different drugs by swapping out the probes on the chip with different ones. To keep out the sticky stuff found in blood, the surface of the sensor is equipped with a special kind of filter that lets fast-diffusing medications rapidly cross the barrier.

A device like this could eventually become a small, wearable package similar to what diabetics wear to constantly monitor their blood sugar levels. And in a dystopian version of the future, you could imagine some employers forcing their employees to wear these, to prove they aren't using recreational drugs after work. Or police officers could be allowed to ask to see your sensor, the same way they can see your ID.

Currently, however, the uses for MEDIC are entirely for research and medicine.

UC Santa Barbara bioengineer Hyongsok Tom Soh and colleagues describe the uses for the device, and how they tested it:

Such technology would enable truly personalized medicine, wherein therapeutic agents could be tailored with optimal doses for each patient to maximize efficacy and minimize side effects . . . To demonstrate the system's versatility, we measured therapeutic in vivo concentrations of doxorubicin (a chemotherapeutic) and kanamycin (an antibiotic) in live rats and in human whole blood for several hours with high sensitivity and specificity at subminute temporal resolution.

Instead of dosing you with a drug and then waiting to see what happens, MEDIC would allow doctors to monitor exactly what dose you needed to keep the drug circulating effectively in your system. It could prevent over- and under-dosing, and also give doctors a window on what molecules are circulating in your blood at any given time. The researchers hope to broaden the device's sensor abilities further, allowing researchers to test for a range of molecules like proteins and drug metabolites — this would help them track a patient's disease in real time.

Read the full article in Science Translational Medicine