A new type of antipsychotic pill approved by the Food and Drug Administration will be able to share information about when it was taken with patients and providers — but it comes with a warning for older patients with dementia.

Abilify MyCite received FDA approval Monday. The pill includes a sensor that can send data from the pill to a wearable patch, which then transmits the information to a mobile app. Patients can track the medication on their phone, and opt to share the data with their caregivers or doctors through a web-based application, the FDA said Monday.

Although the ability to track the drug’s ingestion could be “useful” for certain patients, the new digital pill comes with a boxed warning telling of its potential effect on seniors, the FDA said.

The antipsychotic is primarily approved for treatment of schizophrenia, episodes linked to bipolar I disorder and depression. But it could put seniors with dementia-related psychosis “at an increased risk of death,” FDA warned. Because of that, Abilify MyCite was not approved to treat elderly patients with dementia-related psychosis.