A system and method comprise positioning a medical device within a subject. The medical device includes a plurality of compartments and each of the plurality of compartments includes a ferrous material. Further, each of the plurality of compartments is configured to hold a substance. The system and method further include delivering electromagnetic radiation, by an electromagnetic radiation source, to the medical device and varying, by a controller, an amount of the electromagnetic radiation delivered by the electromagnetic radiation source for selectively heating the ferrous material of at least one of the plurality of compartments and selectively releasing the substance held in the at least one of the plurality of compartments for managing a condition.