The era of digital pills is here. This week, for the first time ever, the Food and Drug Administration approved a pill with sensors inside to inform doctors how often the drug was taken.

In a press release, the FDA said a typical, anti-psychotic drug Abilify MyCite was the first medication it had approved with a “digital ingestion tracking system” to record whether the drug was actually ingested.

“The product is approved for the treatment of schizophrenia, acute treatment of manic and mixed episodes associated with bipolar I disorder and for use as an add-on treatment for depression in adults,” the FDA wrote. It said the pill worked by transmitting information from an internal sensor to a “wearable patch,” which then forwards data to a smartphone app or to caregivers and physicians monitoring their patients’ progress.

In the release, the FDA noted that while it had approved Abilify MyCite, “the ability of the product to improve patient compliance with their treatment regimen has not been shown.” It added that detection may be imperfect as “detection may be delayed or may not occur.”

The pill generates an electrical signal when splashed with stomach acid and contains copper, magnesium, and silicon, which are “safe ingredients found in foods,” the New York Times noted. Patients have to sign a consent form before any data is shared.

There’s good reasons as to why tracking whether people living with schizophrenia take their medication could be helpful. People with the disorder face an undue amount of social stigma—mostly due to an unfair popular perception that they’re violent ticking time bombs—but it’s still a severe condition that without treatment can lead to negative outcomes like substance abuse or victimization by others. Antipsychotic medications are relatively safe and effective, and treatment is important for the health, safety, and quality of life of people with schizophrenia and their friends and family. Studies suggest prescription noncompliance, in general, costs the U.S. at least $100 billion a year.

However, it’s also not hard to see how this technology could go poorly. For one, compulsory court-ordered medical treatment of disorders runs into civil rights territory (though advocates say it’s effective), and a sensor-equipped pill will let anyone with access to the data know exactly how often someone is taking their medication. Medical data is still ostensibly protected, but big data is increasingly commercializing semi-anonymous records that can be used to reveal information about individual patients. Imagine advertisers knowing exactly how often you take your anti-depressants, weight-loss pills, or STD treatments, or your insurance company monitoring how strictly you follow treatment regimens and using that information to jack up your premiums.