Your activity: 264 p.v.
your limit has been reached. plz Donate us to allow your ip full access, Email:

Patient education: ERCP (endoscopic retrograde cholangiopancreatography) (Beyond the Basics)

Patient education: ERCP (endoscopic retrograde cholangiopancreatography) (Beyond the Basics)
Andrea Tringali, MD, PhD
Silvano Loperfido, MD
Section Editor:
John R Saltzman, MD, FACP, FACG, FASGE, AGAF
Deputy Editor:
Kristen M Robson, MD, MBA, FACG
Literature review current through: Nov 2022. | This topic last updated: Dec 15, 2021.

ERCP OVERVIEW — Endoscopy is the examination of an internal body part with an instrument called an endoscope. Endoscopic retrograde cholangiopancreatography (ERCP) is a technique that uses X-ray to view the bile and pancreatic ducts (figure 1).

The functions of the common bile duct and the pancreatic duct are to drain the gallbladder, liver, and pancreas; the two main ducts convey the bile and the pancreatic juice through a structure called the papilla into the duodenum (the first part of the small intestine). The most common reason why someone would need an ERCP is because of a blockage of one of these ducts (often due to stones). Generally, before ERCP is recommended, blood tests and noninvasive imaging tests such as ultrasound, computed tomographic (CT) scan or magnetic resonance imaging (MRI) are done.

The endoscopist (a doctor who has special training in the use of endoscopes) will examine the bile and/or pancreatic ducts, looking for abnormalities such as blockages, irregularity in the tissue, problems with the flow of bile or pancreatic fluid, stones, or tumors. If a problem is found, the endoscopist can often perform a procedure to repair or improve the condition and take tissue samples if needed; as a result, ERCP has replaced surgery in most patients with common bile duct and pancreatic disease.

ERCP is rarely indicated in children. However, if a child needs an ERCP, it is typically performed in a specialized center by experienced endoscopists who are specially trained.

ERCP can be performed as an outpatient procedure or in hospitalized patients, depending on the person's condition and on the complexity of the required procedure.

ERCP PREPARATION — You will be asked not to eat or drink anything for six to eight hours before the test. It is important for the stomach to be empty to allow the endoscopist to visualize the entire area, and to decrease the chance of vomiting during the procedure.

You may be instructed to adjust the dose of your medications or stop taking specific medications prior to the examination. Most drugs (such as blood pressure medication) can be continued as usual, but some medications need to be discontinued for several days. All medications and dietary supplements should be discussed with your provider, since some are more important than others; for example, if you are taking a blood-thinning (anticoagulant) medication, the provider will determine if you need to stop it prior to ERCP and if so, how and when to do this. If you have diabetes, adjustments will be made to your morning doses of medication (pills or insulin) because you cannot eat anything before your ERCP.

If you are pregnant, the ERCP should be postponed until after delivery if possible, but if the procedure is urgent, it can be done safely during pregnancy.

You will need a friend or family member to bring you home after the examination. This is because the medications used for sedation can impair reflexes, judgment, and your ability to drive (similar to the effects of alcohol).

WHAT TO EXPECT IN THE ENDOSCOPY UNIT — Prior to the endoscopy, you will be asked some questions about your medical history and the medications you are currently taking, and the results of your blood tests will be checked; the ERCP procedure will also be explained in detail, you will be asked to give your consent, and the doctor will verify that the consent form was signed. Prior to the procedure, you will be asked to confirm your name, date of birth, and the procedure that you are having.

Sedation — The nurse will start an intravenous (IV) line (by inserting a needle into a vein in the hand or arm) to administer medications. Most endoscopy units use a combination of a sedative to induce relaxation, and a medication to prevent discomfort. In some more complicated cases, you may be sedated more heavily or given anesthesia (put to sleep) for the ERCP. In some cases, an anti-inflammatory medication is given as a rectal suppository; this medication lowers the risk of acute inflammation of the pancreas (pancreatitis) following the procedure. For safety reasons, you will be asked to remove eyeglasses or contact lenses, dentures, and body piercings. Before the procedure begins, you may be given local anesthetic (a numbing spray applied onto the throat or gargled).

ERCP PROCEDURE — ERCP is performed in a room that contains X-ray equipment. You will lie on a special table, and you may be positioned on your left side, prone (facing down), or supine (facing up).

Although many people worry about discomfort from the endoscopy, most people tolerate it well and feel fine afterwards. Medications will be given through the IV line during the procedure. A plastic mouth guard is placed between the teeth to prevent damage to the teeth and endoscope. Many people sleep during the test; others are very relaxed and not aware of the examination.

The ERCP endoscope is a special flexible tube, approximately the size of a finger. It contains a lens and a light source that allows the endoscopist to view the inside of your body; images are magnified on a monitor so that even very small details and changes can be seen. The endoscope also contains channels that allow the endoscopist to take biopsies (painless tissue samples) and introduce or withdraw fluid, air, or other instruments.

Once the scope is gently inserted through the mouth, it is then passed into the esophagus, stomach, and intestine (figure 2). Then, a small plastic tube (cannula) is passed through the endoscope into the opening of the bile duct through the papilla (picture 1). A guidewire may be inserted into the bile duct before dye is injected. X-ray pictures are taken after the dye injection and displayed on a monitor so the endoscopist can examine the bile ducts and pancreatic duct.

Depending on what the endoscopist sees during the ERCP, they may perform a variety of procedures or treatments. If bile duct stones are present in the common bile duct, the opening of the papilla can be widened with electrocautery (which uses an electrical current to cut into tissue), and the stones are removed. If the X-ray pictures show a narrowing of the bile duct, a stent (a small wire-mesh or plastic tube) can be inserted to allow the bile to bypass the blockage and pass into the duodenum.

The length of the examination varies between 30 and 90 minutes (but is usually less than an hour).

RECOVERY AFTER ERCP — After ERCP, you will be monitored while the sedative medications wear off. The medicines cause most people to temporarily feel tired or have difficulty concentrating, so it is usually advised not to return to work or drive that day.

The most common discomfort after the examination is a feeling of bloating as a result of the air introduced during the examination. This usually resolves quickly. Some people also have a mild sore throat as a result of pressure from the scope. Most people are able to drink clear liquids shortly after the examination. In some cases, blood tests may be done the same day following ERCP.

The endoscopist can usually tell the person the results of their examination right away. If biopsies were taken, the tissue will need to be sent to a lab for analysis.

ERCP COMPLICATIONS — ERCP is a generally a safe procedure and serious complications are uncommon. If complications do occur, they are usually mild although can be moderate or severe, and may include the following:

Pancreatitis (inflammation of the pancreas) is the most frequent complication, occurring in about 3 to 5 percent of people undergoing ERCP. When it occurs, it is usually mild, causing abdominal pain and nausea, which resolve after a few days in the hospital. Rarely pancreatitis may be more severe. (See "Patient education: Acute pancreatitis (Beyond the Basics)".)

Often the endoscopist needs to make a cut into the papilla (the place where the common bile duct and pancreatic duct join the small bowel). This cut is known as a sphincterotomy. Bleeding can occur from a cut into the papilla, but it is usually minimal and stops quickly by itself or can be controlled during the ERCP procedure. For people taking warfarin or another blood-thinning medication, there is an increased risk of post-procedure bleeding compared with people who do not take these medications. Rarely, bleeding may be more severe and may begin after the procedure has been completed.

The ERCP scope or other instruments can cause a tear or hole in the intestine being examined (called perforation). This is a serious condition, often requiring surgical intervention, although it is very rare.

Infection of the bile ducts (cholangitis) is rare in general, but it can occur, particularly in people with certain pre-existing conditions. Treatment of infections requires antibiotics and drainage of excess fluid.

Aspiration (inhalation) of food or fluids into the lungs. The risk of this complication is minimal in people who do not eat or drink for several hours before the examination.

If you have any of the following symptoms, let your health care provider know immediately:

Severe abdominal pain (not just gas cramps)

A firm, distended abdomen


Fever or chills

Black or bloody stools

Difficulty in swallowing or a severe sore throat

A crunching feeling under the skin

WHERE TO GET MORE INFORMATION — Your healthcare provider is the best source of information for questions and concerns related to your medical problem.

This article will be updated as needed on our website ( Related topics for patients, as well as selected articles written for healthcare professionals, are also available. Some of the most relevant are listed below.

Patient level information — UpToDate offers two types of patient education materials.

The Basics — The Basics patient education pieces answer the four or five key questions a patient might have about a given condition. These articles are best for patients who want a general overview and who prefer short, easy-to-read materials.

Patient education: Gallbladder removal (cholecystectomy) (The Basics)
Patient education: Jaundice in adults (The Basics)
Patient education: Acute pancreatitis (The Basics)
Patient education: Pancreatic cancer (The Basics)

Beyond the Basics — Beyond the Basics patient education pieces are longer, more sophisticated, and more detailed. These articles are best for patients who want in-depth information and are comfortable with some medical jargon.

Patient education: Acute pancreatitis (Beyond the Basics)

Professional level information — Professional level articles are designed to keep doctors and other health professionals up-to-date on the latest medical findings. These articles are thorough, long, and complex, and they contain multiple references to the research on which they are based. Professional level articles are best for people who are comfortable with a lot of medical terminology and who want to read the same materials their doctors are reading.

Cholangioscopy and pancreatoscopy
Endoscopic balloon dilation for removal of bile duct stones
Endoscopic management of bile duct stones
Endoscopic retrograde cholangiopancreatography (ERCP) in children: Technique, success, and complications
Overview of endoscopic retrograde cholangiopancreatography (ERCP) in adults
Post-endoscopic retrograde cholangiopancreatography (ERCP) bleeding
Post-endoscopic retrograde cholangiopancreatography (ERCP) pancreatitis
Post-ERCP perforation
Infectious adverse events related to endoscopic retrograde cholangiopancreatography (ERCP)
Uncommon complications of endoscopic retrograde cholangiopancreatography (ERCP)

The following organizations also provide reliable health information.

National Library of Medicine


The American Society of Gastrointestinal Endoscopy


National Digestive Disease Information Clearinghouse


This generalized information is a limited summary of diagnosis, treatment, and/or medication information. It is not meant to be comprehensive and should be used as a tool to help the user understand and/or assess potential diagnostic and treatment options. It does NOT include all information about conditions, treatments, medications, side effects, or risks that may apply to a specific patient. It is not intended to be medical advice or a substitute for the medical advice, diagnosis, or treatment of a health care provider based on the health care provider's examination and assessment of a patient's specific and unique circumstances. Patients must speak with a health care provider for complete information about their health, medical questions, and treatment options, including any risks or benefits regarding use of medications. This information does not endorse any treatments or medications as safe, effective, or approved for treating a specific patient. UpToDate, Inc. and its affiliates disclaim any warranty or liability relating to this information or the use thereof. The use of this information is governed by the Terms of Use, available at ©2023 UpToDate, Inc. and its affiliates and/or licensors. All rights reserved.
Topic 2006 Version 28.0