Magnetic resonance imaging (MRI) requires patients to remain still for long periods of time. Anesthesia is sometimes used for MRI to ensure patient immobility and comfort, especially for pediatric or anxious patients. Electrical cardioversion uses electric shocks to treat abnormal heart rhythms and may require anesthesia or conscious sedation to minimize discomfort from the procedure.