ERCP combines the use of a thin, flexible, lighted viewing tube (endoscope) with x-rays to visualize the pancreatic ducts and the bile ducts in and near the liver (biliary tract). The doctor inserts the scope into your mouth and guides it through the digestive tract until the point where the bile and pancreatic ducts open into the first part of the small intestine, or duodenum. A contrast dye is then injected through the scope to delineate the ducts on x-ray films and uncover any abnormalities. In addition, instruments may be passed through the scope to obtain tissue or fluid samples for laboratory analysis or to perform therapeutic procedures.

This procedure is usually ordered after less invasive tests, such as abdominal CT scanning or ultrasound, fail to provide a definitive diagnosis.

Purpose of the ERCP

  • To diagnose conditions that affect the pancreas, bile ducts, liver and gallbladder
  • To detect bile duct obstructions in and near the liver and gallbladder—such as tumors, stones, and abnormal narrowings (strictures)—that may be causing pain and jaundice (yellowing of the skin)
  • To diagnose or to rule out cancer of the pancreas
  • To determine the cause of recurrent pancreatic inflammation
  • To evaluate the pancreas prior to surgery
  • Used therapeutically to remove bile duct stones, dilate narrow ducts, unblock obstructions caused by tumors, and open the muscular ring at the point where the common bile duct enters the duodenum.

Who Performs ERCP

  • A doctor who is specially trained in endoscopic procedures.

Special Concerns about ERCP

  • This procedure is associated with fewer complications than percutaneous transhepatic cholangiography.
  • ERCP may not be appropriate for people with an infectious disease; acute inflammation of the pancreas; an abnormal narrowing or obstruction of the esophagus or duodenum; pancreatic pseudocysts (a condition in which pancreatic fluids break through the ducts and collect in spaces in the pancreas); inflammation of the bile ducts (cholangitis); or severe heart or lung disease.
  • People with allergies to iodine or shellfish may experience an allergic reaction to the iodine-based contrast dye.
  • Pregnant women should not undergo this test because exposure to ionizing radiation may harm the fetus.
  • Residual barium in the abdomen following recent contrast x-rays of the digestive tract may interfere with visualization of the biliary and pancreatic ducts on the x-rays.

Before the ERCP

  • Inform your doctor if you regularly take anticoagulants or nonsteroidal anti-inflammatory drugs (such as aspirin, ibuprofen, or naproxen). You will be instructed to discontinue these medications for some time before the test.
  • Tell your doctor if you have an artificial heart valve or have been told you must take antibiotics before a dental or surgical procedure. If so, antibiotics may be necessary prior to undergoing ERCP.
  • Tell your doctor if you have diabetes and use insulin. In some cases, your insulin dosage may need to be adjusted on the day of the test. Your diabetes care provider will work with you to make this adjustment. Bring your diabetes medication with you so you can take it after your ERCP.
  • Tell your doctor if you have kidney disease or are on dialysis.
  • Tell your doctor if you are pregnant or may be pregnant, if you have a lung or heart condition, or if you have an allergy or sensitivity to any medications.
  • Tell your doctor if you’ve ever had an allergic reaction to iodine or shellfish or to an anesthetic medication.
  • Do not eat anything after midnight on the day before the test and drink only a small amount (6oz) of clear liquids up to 3 hours before the test.
  • At the testing facility, you will be asked to disrobe from the waist up and put on a hospital gown and remove your eyeglasses and dentures.
  • You will be advised to empty your bladder before the test.
  • Immediately before the test, an intravenous (IV) needle or catheter is inserted into a vein in your arm. You will receive a mild sedative medication, but will remain conscious throughout the procedure.

What You Experience during ERCP

  • You are positioned on your side on an x-ray table.
  • A local anesthetic (lidocaine) is sprayed on the back of your throat to suppress the gag reflex. (You may still experience mild gagging as the scope passes through your throat.) A plastic mouthpiece is inserted into your mouth to hold it open.
  • The doctor inserts a narrow, flexible tube with a light (endoscope) into your mouth and carefully passes it down the throat, through the esophagus and stomach, and into the duodenum. Continuous x-ray imaging, or fluoroscopy, may be used to guide the progress of the scope on a viewing monitor.
  • Images of the opening that drains the bile ducts and pancreas are displayed on a screen for the doctor to see. The doctor closely inspects the internal structures through the scope, looking for any abnormalities.
  • Several medications may be administered through the IV line or through the scope to relax the opening from the duodenum into the common bile duct, to remove air bubbles, and to otherwise improve the view through the scope.
  • A thin tube, or catheter, is then advanced through the scope until it reaches the point at which the common bile duct opens into the duodenum.
  • A contrast dye is infused through the catheter into the bile and pancreatic ducts, and a series of x-ray films is obtained. You may feel a brief flushing sensation as the dye is infused.
  • You may need to wait as the initial films are developed, so that additional x-rays can be taken if necessary.
  • If appropriate, the physician may insert instruments through the scope to remove tissue samples for analysis; to remove stones; to dilate any narrow segments; or to perform other procedures.
  • Throughout the procedure, excess saliva is suctioned from your mouth, your blood pressure and oxygen levels are monitored, and fluids are administered through the IV line.
  • The procedure usually takes 1 to 2 hours.

Risks and Complications of ERCP

  • Some people may experience an allergic reaction to the iodine-based contrast dye, which can cause symptoms such as nausea, sneezing, vomiting, hives, and occasionally a life-threatening response called anaphylactic shock. Emergency medications and equipment are kept readily available.
  • Your throat may be sore and you may feel bloated after the procedure from air in your stomach.
  • Rare complications after ERCP include inflammation of the pancreas (pancreatitis); infection; perforation of the esophagus, stomach, or duodenum; bleeding; and respiratory arrest due to oversedation.
  • Severe complications develop in fewer than 1% of procedures.
  • Certain medications administered during the test may cause side effects such as dry mouth, nausea, or urine retention.

After the ERCP

  • You are taken to a recovery room, where your vital signs are monitored and you are observed for any adverse reaction to the anesthetic or other complications.
  • Once the sedation wears off, you may usually return home. Arrange for someone to drive you.
  • If therapeutic procedures were performed, you may need to stay in the hospital overnight for observation.
  • You may experience a feeling of fullness, cramping, or flatulence for several hours after the test.
  • Do not eat or drink until your gag reflex returns, usually in a few hours. (Touching the back of the throat with a tongue depressor tests for this reflex.) You may then drink fluids and have a light meal, according to your doctor’s instructions.
  • You may have a sore throat for several days. Lozenges or a warm saline gargle may provide some relief.
  • Contact your doctor immediately if you develop abdominal or back pain or blood in the stool after this test.

Results of ERCP

  • The doctor examines the x-rays for evidence of stones, tumors, strictures, or other abnormalities in the biliary and pancreatic ducts. In some instances, this review will prompt immediate interventions during ERCP, such as placement of a stent to widen a narrowed duct.
  • If any tissue, cell, or fluid samples were obtained, the specimen containers may be sent to several different laboratories for examination. The samples will be analyzed for evidence of infection, inflammation, or cancer.
  • If a definitive diagnosis cannot be made, additional tests may be ordered.


The Johns Hopkins Consumer Guide to Medical Tests

Simeon Margolis, M.D., Ph.D., Medical Editor

Updated by Remedy Health Media

Publication Review By: the Editorial Staff at

Published: 11 Jan 2012

Last Modified: 11 Jan 2012