Researchers are working on a digital pill to manage opioid usage among patients. They are equipped with sensors that alert doctors whenever patients pop a pill. These pills aren’t available in the market, although the Food and Drug Administration (FDA) approved them earlier this month.

While the digital pills approved by the FDA are antipsychotic drugs, they could be much more useful for opioid prescription. According to the White House Council of Economic Advisers, the opioid epidemic costs more than $500 billion and claimed 64,000 lives last year. Doctors may have a chance of taming it by analyzing opioid intake by using these digital pills.

The methodology involved doctors prescribing the digital opioids to patients and then tracking their usage through a special device.

The researchers headed by Peter Chai from the Harvard Medical School’s Brigham and Women’s Hospital found patients did not take their doses as suggested by a doctor. The doctors sent 15 patients, who had broken bones, home with 21 pills and instructions on how to take them. They found most of the patients stopped taking the painkillers before the week ended, which indicated that doctors prescribed more medicines than required.

“Digital pills — where a medication is incorporated into a gelatin capsule containing a biosensor that activates in the stomach — can provide direct and definitive evidence of medication ingestion.12–17 Iterative improvements in data transmission and signal strength have made digital pills feasible and acceptable to patients,” according to the study titled “Oxycodone Ingestion Patterns in Acute Fracture Pain With Digital Pills,” which was published in the Anesthesia and Analgesia journal.

The researchers had some interesting findings — when prescribed normal doses of opiods, patients veered away from their treatment sooner than expected and stopped taking meds before being instructed to do so by their doctor. When doctors prescribed too many opioids, it would lead to patients taking more than required.

This is where digital opioids come in. These pills, which are made by Florida-based company eTectRx, are gel capsules that contain the drug and a radio transmitter, which is about the size of a sesame seed. Once the patient ingests the capsule, the gel cap dissolves and releases the painkiller along with the transmitter. When the painkiller gets in contact with the patient’s stomach acid, it powers up and sends signals to a device attached to their belly. This device, which the researchers said is the size of an iPad, then beams a message to a database in the cloud, notifying the doctor.

But what happens to the transmitter? After a certain amount of time, the patient poops out the transmitter and since the doctors don’t want them back, they can simply be disposed off.

In this manner, the doctor can monitor a patient’s opioid usage real-time. While the method has its drawbacks, since it needs an external device on the patient’s body to actually monitor usage, it is currently the most advanced method of detecting opioid usage and can help doctors prescribe better doses.