In an embodiment, the invention includes an implantable medical device with a pulse generator and a chemical sensor in communication with the pulse generator, the chemical sensor configured to detect an ion concentration in a bodily fluid. In an embodiment, the invention includes a method for providing cardiac arrhythmia therapy to a patient including sensing a physiological concentration of an analyte, communicating data regarding the physiological concentration of the analyte to an implanted pulse generator, and delivering therapy to the patient based in part on the physiological concentration of the ion. In an embodiment, the invention includes a method for monitoring diuretic therapy. In an embodiment, the invention includes a method for controlling delivery of an active agent into a human body. Other aspects and embodiments are provided herein.