The device is implanted in the patient and connected to an outside power source .