Cardioversion. Primary is stroke from dislodging clot from the left atrium .., there is an risk from the sedation.
See below. It's extremely safe on the whole. The most common risk is related to the sedation meds--i.e. Suppression of respiration, aspiration of oral secretions into the airway; or rare idiosyncratic reactions. The primary cardiac risk is stroke, if pre-formed clot in the heart is squeezed out after conversion. This can be prevented by use of blood thinners ahead of time, or checking for clot with imaging.