Apple has published a reminder in their website stating that the magnets in their iPhones, especially the greater magnets in the 12 series, can interfere with the operation of some medical devices. This includes accessories that have MagSafe.
“Medical devices such as implanted pacemakers and defibrillators might contain sensors that respond to magnets and radios when in close contact. To avoid any potential interactions with these devices, keep your iPhone and MagSafe accessories a safe distance away from your device (more than 6 inches/15cm apart or more than 12 inches/30cm apart if wirelessly charging)” they said in the statement that can be found here.
It’s not limited to such devices though. If you are regularly using any medical device in your body, it would be best to consult your physician or the manufacturer of the device to see if you have to alter the way you use your iPhone.
Apple claims though that although the 12 series has more magnets than the previous generations, it doesn’t pose a greater risk of interference than prior models.