Digestive Health Exams & Procedures What Is Endoscopic Retrograde Cholangiopancreatography (ERCP)? Test is used to see the inside of the bile and pancreatic ducts By Amber J. Tresca Amber J. Tresca Facebook LinkedIn Twitter Amber J. Tresca is a freelance writer and speaker who covers digestive conditions, including IBD. She was diagnosed with ulcerative colitis at age 16. Learn about our editorial process Updated on April 24, 2022 Medically reviewed by Jay N. Yepuri, MD, MS Medically reviewed by Jay N. Yepuri, MD, MS Facebook LinkedIn Twitter Jay Yepuri, MD, MS, is board-certified in gastroenterology. He is a partner with Digestive Health Associates of Texas and a medical director at Texas Health Harris Methodist HEB Hospital. Learn about our Medical Expert Board Print Table of Contents View All Table of Contents Purpose of Test Risks and Contraindications Before the Test During the Test After the Test Interpreting Results An endoscopic retrograde cholangiopancreatography (ERCP) is an imaging test that uses endoscopy and X-rays to see the inside of the bile and pancreatic ducts. During this test, a flexible tube with a light on the end called an endoscope is passed through the mouth, the esophagus, and the stomach, and into the first part of the small intestine. An ERCP may be used to look for diseases and conditions in the bile and pancreatic ducts and may also be used to deliver treatment. SDI Productions / Getty Images Bile and Pancreatic Ducts Bile is a fluid that helps with digestion. It is made in the liver and stored in the gallbladder. Bile travels between the liver and the gallbladder and duodenum (first part of the small intestine) through the bile ducts. If the bile ducts are blocked, such as by gallstones, it is called a biliary obstruction. A biliary obstruction can lead to a buildup of bile in the liver. This, in turn, causes to a buildup of bilirubin (what’s leftover after red blood cells break down) in the liver, which causes jaundice and can lead to several other types of complications. The pancreas is a gland that secretes hormones and enzymes that are involved in digestion. These substances travel from the pancreas to the duodenum through the pancreatic ducts. If the ducts are blocked, the hormones and enzymes can become backed up and cause pancreatitis (inflammation in the pancreas). The bile and pancreatic ducts come together to form one main duct that empties into the duodenum. Purpose of Test An ERCP is used to help diagnose conditions of the bile and pancreatic ducts. It may also be used to treat certain conditions in those ducts. Most of the time, an ERCP is not used only to diagnose because it is an invasive test. There are other, less-invasive tests available that may be used instead. However, if there’s a strong suspicion of a problem in the bile or pancreatic ducts, an ERCP may be used not only to diagnose but also to treat it at the same time. Some of the conditions for which an ERCP might be used include: Cancer or tumor of the bile ducts or pancreas Gallstones Infection Pancreatitis (acute or chronic) Pancreatic pseudocysts Risks and Contraindications Complications may occur in between 5% to 10% of patients who have an ERCP. Some of the potential complications include: Bleeding. Bleeding (hemorrhage) may occur directly after an ERCP but can also occur up to two weeks after the procedure is completed. Some episodes of bleeding may resolve on their own. In severe cases, epinephrine may be given or another procedure might be needed to stop the bleeding. Infection. ERCP is an invasive procedure, which means that there is a risk of infection of the gallbladder (which is called cholecystitis) or the bile ducts. Antibiotics may be given before the procedure in order to cut the risk of this complication. Pancreatitis. Inflammation in the pancreas is a potential risk of an ERCP. It may be possible for physicians to identify which patients may be at an increased risk for pancreatitis. Placing a stent (a tiny wire mesh tube) in the pancreatic duct may be used to help prevent pancreatitis. Perforation. A hole (perforation) in the bile duct, the pancreatic duct, or the duodenum is a potential complication, though it is not common (it occurs in less than 1% of patients). Smaller perforations may be treated with medication but larger ones may require another procedure to place a stent or surgery to close them. Before the Test Before having an ERCP it will be important to talk with the doctor about all current medications and supplements, including both those that are prescription and over-the-counter. This is because some medications or supplements may interfere with the ability of the blood to clot effectively or the sedatives that are given during the procedure. For that reason, there may be instructions given prior to the procedure about stopping medications for a time. While it’s important to talk about all medications, it is especially important to tell a doctor about: Arthritis medications Blood pressure medications Blood thinners Diabetes medications Nonsteroidal anti-inflammatory drugs (NSAIDs), including aspirin and ibuprofen It is also important to tell a physician about any other medical conditions. Being pregnant, or possibly being pregnant should also be discussed. It is possible to complete an ERCP during pregnancy and it has been shown to be safe, but physicians will need to know about the pregnancy in order to protect the fetus from X-rays. Because sedatives are used during an ERCP, patients will need to arrange for a ride home with a friend or relative after the procedure. Timing The entire procedure will take several hours from the time of arrival at the facility where the procedure takes place. The procedure itself can take anywhere from 30 minutes to two hours. Many facilities will also ask that patients arrive about an hour prior to their procedure. After the ERCP is over, it may be necessary to stay in the procedure area for another hour or two while the sedatives wear off. The physician will come and explain any results or aftercare needed to the patient and the adult that is driving them home. Location An ERCP may take place in a hospital or in an outpatient clinic. This is a specialized test and it will be performed by clinicians who are trained in completing the procedure. Cost and Health Insurance According to MDsave, an ERCP could cost between $3,393 and $6,456. Pre-approval may be necessary by some health insurance carriers. Call the number on the back of your insurance card or check the insurance company web site to find out what the patient's responsibility will be for this test. During the Test Patients will be asked to arrive for their appointment in time to fill out forms and answer questions about medical history. After check-in, there may be a wait in a waiting room before being called back to the procedure area. Pre-Test Patients should not have anything to eat for about eight hours (or per doctor instructions) before the test. After being called into the treatment area, it will be necessary to change into a hospital gown. The healthcare providers assisting with the test will give instructions on where to put clothing and other items until the test is over. An intravenous line (IV) will be started so that the sedative that’s used during the test can be given. A spray may also be given to the throat to numb it and prevent the gag reflex when the exam begins. Throughout the Test Patients will be on a hospital bed that is then wheeled into the treatment room, which contains all the equipment used during the test. It is often during this time that patients are introduced to the healthcare providers that are assisting. A sedative will be given through the IV for comfort and many patients will fall asleep. The physician performing the test will pass an endoscope into the mouth and down through the esophagus to the stomach and the duodenum. Air may be passed into the endoscope and into the duodenum. A liquid contrast material will also be administered into the pancreatic or bile ducts during the test. Post-Test After the test is over, you will be wheeled into a recovery area where you are observed for a period of time (one hour or longer) and are allowed to recover from the anesthetic. A physician may come in to talk about how the test went and to outline any next steps. A nurse or other care provider will go over the discharge instructions, which will include avoiding going to work or driving for the rest of the day. A ride home with a friend or relative is essential. This person can also help in remembering what the physician says after the test because it can be difficult to remember conversations because of the grogginess caused by the sedative. After the Test Feeling groggy for the rest of the day is normal and some people will also have a sore throat. In most cases, it will be safe to return to a regular diet after returning home. Taking it easy for the rest of the day by not doing any work or housework is usually recommended. Managing Side Effects The discharge instructions will outline who to call if there are any symptoms that occur after the test. Some people will have a sore throat and will feel tired or groggy for the rest of the day. Some of the symptoms for which patients should call a doctor or seek medical care immediately if they are an emergency, include severe abdominal pain, problems swallowing, chest pain, fever, chills, vomiting, or rectal bleeding (including black or bloody stools). Interpreting Results The surgeon or physician who conducts the procedure may be able to offer some results of the test right away, by describing what they did or did not see during the test. Follow-Up Any biopsies that were taken will take several days to analyze and receive the results. The doctor’s office will follow up a few days after the test to give any results about the biopsies, usually either by phone or through the patient portal. There may also be a follow-up visit scheduled in the office to go over the results of the test with the doctor. If you have any questions about the results of your test, don't hesitate to get in touch with your physician to get answers. A Word From Verywell An ERCP is a test that can be used not only as part of a diagnosis, but also as a treatment. For that reason, it will be important to keep in close contact with physicians to understand what took place during the procedure (such as a placement of a stent) and what the follow-up will be. Depending on what the results of the test show, it may be necessary to have other procedures or tests to confirm or rule out diseases or conditions that may be affecting the bile or pancreatic ducts. An ERCP is a safe test that can provide a lot of information (as well as treatment) and most people go about their normal activities the day after the test is completed. 7 Sources Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy. MedlinePlus. Bile duct obstruction. American Cancer Society. What is bile duct cancer? Tringali A, Loperfido S. Patient education: ERCP (endoscopic retrograde cholangiopancreatography) (Beyond the Basics). Johns Hopkins Medicine. Endoscopic retrograde cholangiopancreatography (ECRP). Szary NM, Al-Kawas FH. Complications of endoscopic retrograde cholangiopancreatography: how to avoid and manage them. Gastroenterol Hepatol (N Y). 2013;9:496–504. Cappell MS, Stavropoulos SN, Friedel D. Systematic review of safety and efficacy of therapeutic endoscopic-retrograde-cholangiopancreatography during pregnancy including studies of radiation-free therapeutic endoscopic-retrograde-cholangiopancreatography. World J Gastrointest Endosc. 2018;10:308–321. doi:10.4253/wjge.v10.i10.308 MDsave Incorporated. ERCP. Additional Reading National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Endoscopic retrograde cholangiopancreatography (ERCP). By Amber J. Tresca Amber J. Tresca is a freelance writer and speaker who covers digestive conditions, including IBD. She was diagnosed with ulcerative colitis at age 16. See Our Editorial Process Meet Our Medical Expert Board Share Feedback Was this page helpful? Thanks for your feedback! What is your feedback? Other Helpful Report an Error Submit