When pacemakers first became common medical devices, patients were advised to keep away from all magnets. This was because pacemakers include magnets as a core part of their functionality, so doctors worried that disrupting the magnet would affect the operation of the pacemaker. Today, pacemaker technology has advanced significantly. They are much more robust than they used to be, and day-to-day contact with magnets won't affect them. It would take an industrial-level magnet to exert enough force to disrupt a modern pacemaker's operation.
However, advice does vary - the
American Heart Association still advises that individuals with pacemakers fitted keep magnets at least 6 inches away from their device implantation site. Most magnetic locks are fitted at the top of the door and frame, and for most people that is much more than 6 inches away from the chest area where pacemakers are implanted.