A system for monitoring medication compliance in a patient includes an electronic pill that includes a drug-transporting device and an antenna positioned on a surface of the drug-transporting device. A detector is positionable external a gastrointestinal tract of a patient for detecting a presence of the antenna in the patient gastrointestinal tract.