ERCP: Everything You Need to Know

An intervention for diagnosis and treatment of bile duct problems

Endoscopic retrograde cholangiopancreatography (ERCP) is an invasive procedure used for the diagnosis and treatment of obstruction in the biliary system. With ERCP, a camera-equipped device is placed into the mouth and advanced for visualization of the bile ducts, gallbladder, pancreas, or liver. Often, this procedure is used for obtaining a biopsy, repairing a lesion, or clearing a blockage in these structures.

You will see your doctor before your procedure

Getty Images / Frank and Helena

What Is ERCP?

An ERCP is a specialized procedure that combines endoscopy and imaging technology to visualize the bile ducts and, in some cases, allow for therapeutic intervention.

With endoscopy, an endoscope—a thin flexible tube that's attached to a light and a camera, is placed into the mouth and advanced down the gastrointestinal tract. Surgical tools are placed through the endoscope as needed. The key difference between an ERCP and other types of endoscopy is that an ERCP is specifically used to access the bile ducts, gallbladder, duodenum (the first part of the small intestine), and pancreas.

This procedure is typically done in an outpatient setting, and you shouldn't experience pain or discomfort during an ERCP because it's done with anesthesia sedation.

This intervention doesn't involve an incision in the skin, but it may require operative techniques, like an incision inside your digestive system or widening your bile duct with a stent.

Contraindications

Because of the imaging component of an ERCP, this procedure can pose a risk to the fetus if you are pregnant. And if you have a known allergy to contrast material, your healthcare provider may use a contrast that you aren't allergic to or opt to avoid the procedure altogether.

You might need to postpone your ERCP if you have an infection that could be exacerbated by this procedure.

Potential Risks

While the ERCP is not considered a high-risk procedure, there are potential complications that your healthcare provider will discuss with you.

In addition to the risks associated with anesthesia, the ERCP can cause:

Perforation—accidentally making a hole with the instruments used during the procedure—is an especially serious complication that can be life-threatening. When perforation occurs, a surgeon is typically consulted to urgently repair the damage.

Purpose of ERCP

This intervention is done to evaluate for and relieve biliary obstruction, which occurs when bile can't move through one or more of the bile ducts in the biliary system.

A gallstone, which is a lump of bile that hardens in the gallbladder, is the most common cause of biliary obstruction.

Other causes of biliary obstruction besides gallstones include:

  • Biliary stenosis, which is narrowing of the bile ducts
  • Cholangitis
  • Cysts in the bile ducts
  • Lymph node enlargement or a tumor compressing the duct from the outside
  • Pancreatitis, especially when it's recurring or chronic
  • Injury/trauma that involves the liver, gallbladder, pancreas, or bile ducts
  • Tumors invading the bile ducts
  • Infection of the gallbladder, bile ducts or pancreas
  • Liver disease

An ERCP may be used as part of the diagnostic process if you have the following symptoms:

These symptoms overlap with symptoms of many gastrointestinal conditions that are not treated with ERCP, including liver failure and appendicitis. Usually non-invasive diagnostic testing is done before an ERCP to ensure it is needed and to help craft a procedure plan.

Blood test results like an elevated bilirubin level or liver enzymes point to possible bile duct obstruction.

Other imaging tests that may be required include:

In addition to visualizing a biliary obstruction, an ERCP can also be used to relieve one and, in some cases, treat its underlying cause. For example, your healthcare provider might remove a cyst from inside a bile duct or widen a narrow bile duct with a stent during an ERCP. This procedure can't treat infections or relieve bile duct inflammation, however.

When being done for a chronic condition, an ERCP may be planned days or weeks in advance. An urgent ERCP may be needed if your symptoms are severe or if there is a concern that your condition could rapidly worsen.

How to Prepare

Before you have your ERCP, your healthcare provider will discuss your medical condition with you and explain the comprehensive treatment approach. This can include other therapies besides your ERCP, such as antibiotics for an infection or chemotherapy for cancer.

In addition to the tests that you have had as part of your diagnostic evaluation, you will also need pre-operative testing before your ERCP, which includes a complete blood count (CBC) and blood chemistry tests.

Location

You will have your ERCP in a procedural suite that is used for gastrointestinal procedures. This may be located in a hospital or an outpatient surgical center.

What to Wear

You can wear comfortable clothes and shoes to your procedure appointment. You will need to change into a hospital a gown for your ERCP.

Food and Drink

You will need to abstain from food or drink for eight hours before having your ERCP.

Medication

Your healthcare provider might instruct you to stop or adjust your dose of blood thinners, steroid medications, non-steroidal anti-inflammatory medications, aspirin, and treatments that you take for diabetes.

You might also need to adjust other medications, depending on your condition and the planned interventions during your ERCP.

What to Bring

Be sure to bring a form of identification, your health insurance information, and a method of payment if you will be paying for a portion or for the whole cost of your procedure. You might also be asked to bring your procedure order form to your appointment.

You need to have someone drive you home since you will be groggy after the anesthesia sedation.

Pre-Op Lifestyle Changes

You might need to make changes in your diet prior to having an ERCP. Your healthcare provider might instruct you to cut back on fatty foods for a week or so before your procedure.

Your healthcare provider might also advise you to cut back on cigarettes if you smoke.

What to Expect on the Day of Surgery

When you go in for your ERCP appointment, you will need to check in and sign a consent form. You might then go to a pre-operative waiting area or directly to the procedure room.

An ERCP can take half an hour if it's an uncomplicated diagnostic procedure, and several hours if you are having a lesion repaired.

Before the Procedure

Your ERCP will be performed by a gastroenterologist, which is a healthcare provider specialized in diseases of the digestive system. You will have an anesthesiologist or a nurse anesthetist monitoring your vital signs and administering your anesthesia.

Before your procedure, you will have an intravenous (IV) line placed in a vein in your hand or arm. You might have a CBC and blood chemistry checked again on the day of your ERCP.

Your vital signs, including blood pressure and pulse, will be monitored before, during, and after your ERCP.

You will most likely have IV anesthesia sedation, also described as monitored anesthesia care. You will also have numbing medication placed or sprayed in your mouth or throat so you won't feel discomfort as the endoscope is being introduced and advanced.

While it is not as common as IV sedation, intubation and general anesthesia are sometimes used for ERCP; your IV sedation might be converted to general anesthesia if a serious complication arises during the procedure.

During the Procedure

You shouldn't be able to feel the endoscope or any incisions during your procedure. You will be very sleepy and might fall asleep.

The endoscope will be inserted into your mouth and advanced down your throat, esophagus, stomach, and duodenum to where your biliary tracts are located. A dye will be injected so your healthcare provider can visualize these structures.

  • Your healthcare provider will inspect your biliary ducts with the camera that is attached to the endoscope. Typically, an image will be displayed on a monitor. X-ray is also used to identify the biliary tree and identify any defects or narrowing.
  • If you have an undiagnosed lesion, a biopsy sample may be taken for microscopic examination. The small biopsy incision will be repaired with a suture.
  • During your procedure, your healthcare provider may use the device to break up gallstones and remove them, remove a growth, repair a lesion, or place a stent to expand a very narrow bile duct.

After your biliary obstruction is diagnosed and/or treated, the endoscope will be removed. Your sedation medication will be stopped. If you have had general anesthesia, your healthcare providers will reverse your anesthesia medication, remove your breathing tube, and make sure you can breathe on your own.

You will be taken to a post-operative area with your IV in place for continued monitoring.

After the Procedure

In the hours after your procedure, you will begin to wake up, although you might be a little groggy. Your medical team will monitor your vital signs and ask you about pain or discomfort. You might receive pain medications at this point, but you will not have sedation again.

You might be able to go home a few hours after your procedure. However, if you have a serious medical issue that requires further medical or surgical care (e.g., a severe infection that requires IV antibiotics), your team might decide that you need to stay in the hospital after your ERCP. This may have been determined in advance of your procedure or only after reviewing the findings.

Your medical team will ensure that you can eat and swallow before you are discharged to go home and will give you instructions about how to advance your diet over the next few days.

Recovery

You might immediately feel much better after your procedure, especially if your biliary obstruction had been causing major pain and discomfort prior to this treatment. Still, take it easy for the rest of the day after your ERCP.

It should take between a few hours to a few days to heal after an ERCP. Generally, you should feel ready to resume your regular diet, level of activity, and bowel movements within a few days after an uncomplicated procedure.

Complications of an ERCP may require medical or surgical intervention and could involve a prolonged recovery.

Healing

You might experience nausea or a sore throat, but you should be able to eat and drink regular food.

You might have dark stools or blood-tinged stool if you have had an incision as part of your procedure. This should improve and should not worsen over time.

Warning signs of complications include:

Depending on your condition, your healthcare provider might give you some dietary instructions. For example, pancreatitis or problems with the biliary flow might make it difficult to digest fat, so your healthcare provider may suggest that you cut down on fat.

Long-Term Care

Part of your recovery involves ongoing treatment for the medical condition that contributed to your biliary obstruction. Each condition that warrants an ERCP varies, with some requiring more extensive long-term care than others.

Additionally, biliary duct obstruction can recur after treatment. In particular, if you have severe scar tissue or structural changes of the bile ducts, you will need to watch for signs of recurrent biliary obstruction and contact your healthcare provider if symptoms reemerge.

There is about a 20% chance of recurrence of gallstones after an ERCP. If you have had gallstones only once and were treated effectively, you are not highly likely to experience a recurrent biliary obstruction.

Possible Future Surgeries

While an ERCP is intended to be a one-time treatment, you may need a repeat procedure if your problem recurs.

And if it's discovered that you have an extensive biliary obstruction that can't be treated with ERCP, you may need to have a minimally invasive or open surgical procedure.

You might also need surgery for a disease that extends beyond the reach of an ERCP, such as cancer in the liver or pancreas.

Lifestyle Adjustments

Fat requires bile for absorption, and eating high-fat foods when you have a tendency to develop bile duct obstruction can lead to problems like abdominal discomfort, indigestion, diarrhea, or vomiting.

You might be advised to increase your dietary fiber while cutting back on calories and fat for the long term.

Because everyone's situation is unique, you might need to meet with a dietitian who can advise you about which foods and eating habits are best for you.

A Word From Verywell

An ERCP is a minimally invasive interventional procedure that is part of the diagnostic and treatment plan for a number of gastrointestinal conditions. Your ERCP will require that you dedicate about a day to the procedure and recovery. You may experience substantial relief as a result of this intervention. Depending on your condition, you might also need a variety of other tests and treatments to help improve your health.

Frequently Asked Questions

  • What is a sphincterotomy ERCP?

    A sphincterotomy ERCP, otherwise known as a biliary endoscopic sphincterotomy (EST), is a procedure that cuts part of the biliary sphincter, as well as the common bile duct. This treats a condition called sphincter of Oddi dysfunction, and it also helps with stenting and gallstone extraction.

  • Can an ERCP be used to test for cholangitis?

    Yes, an ERCP can be used to test for cholangitis (bile duct inflammation). The endoscope creates X-ray images so that a healthcare provider can see the bile and pancreatic ducts. This helps them spot abnormalities in these ducts.

  • Is it dangerous to have a stent?

    No, it is not dangerous to have a stent, but there are certain risks and side effects associated with the initial insertion of a stent. In some cases, these risks will prevent some people from being eligible for stenting. Biliary stents are capable of causing a perforation, pancreatitis, and cholecystitis. If you are concerned about stenting, consider asking your healthcare provider about the safety measures they take to ensure a smooth procedure.

  • How does an ERCP remove gallstones?

    An ERCP can remove gallstones by inserting small tools into the endoscope. These tools reach through the endoscope and can break up material that's blocking the common bile duct and pancreatic ducts. A stent can also be inserted through the endoscope to open up narrowed ducts.

9 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.
  1. National Institute of Diabetes and Digestive and Kidney Diseases. Endoscopic Retrograde Cholangiopancreatography (ERCP).

  2. Meseeha M, Attia M. Stat Pearls. Endoscopic Retrograde Cholangiopancreatography (ERCP).

  3. Ting PH, Luo JC, Lee KC, et al. Post-ERCP cholecystitis: Incidence and risk factorsJ Chin Med Assoc. doi:10.1097/JCMA.0000000000000383

  4. Lujian P, Xianneng C, Lei Z. Risk factors of stone recurrence after endoscopic retrograde cholangiopancreatography for common bile duct stonesMedicine (Baltimore). 2020;99(27):e20412. doi:10.1097/MD.0000000000020412

  5. Seo YJ, Hadaya J, Sareh S, Aguayo E, de Virgilio CM, Benharash P. National trends and outcomes in timing of ERCP in patients with cholangitisSurgery. 2020;S0039-6060(20)30259-2. doi:10.1016/j.surg.2020.04.047

  6. Barakat MT, Angelotti TP, Banerjee S. Use of an Ultra-slim Gastroscope to Accomplish Endoscopist-Facilitated Rescue Intubation During ERCP: A Novel Approach to Enhance Patient and Staff SafetyDig Dis Sci. 2020;10.1007/s10620-020-06360-w. doi:10.1007/s10620-020-06360-w

  7. Gaujoux S, Jacques J, Bourdariat R, et al. Pancreaticoduodenectomy following endoscopic ultrasound-guided choledochoduodenostomy with electrocautery-enhanced lumen-apposing stents an ACHBT - SFED study. HPB (Oxford). 2020;S1365-182X(20)31048-0. doi:10.1016/j.hpb.2020.06.001

  8. Köksal AŞ, Eminler AT, Parlak E. Biliary endoscopic sphincterotomy: Techniques and complications. World J Clin Cases. 2018;6(16):1073-1086. doi:10.12998/wjcc.v6.i16.1073

  9. Johns Hopkins Medicine. Primary Sclerosing Cholangitis.

By Jennifer Whitlock, RN, MSN, FN
Jennifer Whitlock, RN, MSN, FNP-C, is a board-certified family nurse practitioner. She has experience in primary care and hospital medicine.