Embodiments include an implantable electronic device with at least one electromagnetic field detection unit and at least one antenna, wherein the at least one electromagnetic field detection unit is connected to the at least one antenna. The at least one electromagnetic field detection unit responds to electromagnetic fields that occur or are present in an environment surrounding a patient outside an environment of an MRI device and electromagnetic fields that are shielded in the environment of the MRI device. The at least one electromagnetic field detection unit indicates an absence of the electromagnetic fields that typically occur in the environment surrounding a patient outside an MRI device and that are shielded in the environment of an MRI device.