The invention is entitled "Detecting and mapping
phrenic nerve through pacing." The invention relates to an apparatus comprising an interface and a processor. The interface is configured to receive one or more magnetic localization signals from one or more position sensors coupled to one or more
body surface patches attached to a body of a patient, the magnetic localization signals being indicative of respective positions of the position sensors. The processor is configured to (i) detect an unintentional stimulation of a
phrenic nerve of the patient, the unintentional stimulation occurring due to
cardiac pacing applied by an intracardiac
electrode in a heart of the patient, (ii) estimate, based on the magnetic localization signals, a motion of one or more of the
body surface patches occurring during the detected stimulation of the
phrenic nerve, (iii) estimate, based on the estimated motion of the
body surface patches, a distance between the pacing
electrode and the phrenic nerve, and (iv) send an output derived from the estimated distance to an
output device.