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 endoscope 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.

Doctor inserting endoscope into patient's mouth
Westend61 / Getty Images

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, a camera, and surgical tools—is placed into the mouth and advanced down the gastrointestinal tract. 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

An ERCP is usually not recommended if a less invasive test or treatment can be performed instead.

Conservative management or preliminary treatments for biliary obstruction might be used before an ERCP. For example, medical treatment for gallstones—including administration of Actigall (ursodiol) and Chenix (chenodiol)—might be considered before an ERCP.

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 doctor 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 doctor 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

These may be suspected, and an ERCP ordered as part of the diagnostic process, if you present with 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 performing 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:

  • Ultrasound of the abdomen
  • Computed tomography (CT) scan of the abdomen
  • Percutaneous transhepatic cholangiogram (PTCA)
  • Magnetic resonance cholangiopancreatography (MRCP): This non-invasive imaging test uses magnetic resonance imaging (MRI) to visualize the liver, pancreas, gallbladder, and bile ducts. An MRCP test is commonly used to help plan an ERCP as it can identify the presence and cause of biliary obstruction.

In addition to accessing a biliary obstruction, an ERCP can also be used to relieve one and, in some cases, treat its underlying cause. For example, your doctor 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 resolve certain 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 doctor will discuss your medical condition with you and a 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, 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 doctor might instruct you to stop or adjust your dose of blood thinners, steroid medications, non-steroidal anti-inflammatory medications, 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 doctor might instruct you to cut back on fatty foods for a week or so before your procedure.

Your doctor 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 doctor 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 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 doctor can visualize these structures.

  • Your doctor will inspect your biliary ducts with the camera that is attached to the endoscope. Typically, an image will be displayed on a monitor.
  • If you have an undiagnosed lesion, a biopsy sample may be taken for examination under a microscope. The small biopsy incision will be repaired with a suture.
  • During your procedure, your doctor 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 doctors 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 doctor might give you some dietary instructions. For example, pancreatitis or problems with the biliary flow might make it difficult to digest fat, so your doctor 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 doctor 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 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.

Was this page helpful?
Article 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). June 2016.

  2. Meseeha M, Attia M. Stat Pearls. Endoscopic Retrograde Cholangiopancreatography (ERCP). Updated April 27, 2020.

  3. Ting PH, Luo JC, Lee KC, et al. Post-ERCP cholecystitis: Incidence and risk factors [published online ahead of print, 2020 Jun 22]J Chin Med Assoc. 2020.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 cholangitis [published online ahead of print, 2020 Jun 28]Surgery. 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 Safety [published online ahead of print, 2020 Jun 5]Dig 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 [published online ahead of print, 2020 Jul 6]HPB (Oxford). 2020;S1365-182X(20)31048-0. doi:10.1016/j.hpb.2020.06.001