Endoscopic retrograde cholangiopancreatography (ERCP) is a test used to find and treat abnormalities in your pancreas, bile ducts, and gallbladder. ERCP is a combination of two tests: an endoscopy and an X-ray.

An endoscopy is a procedure in which a thin, flexible tube attached to a tiny camera is threaded down to your gastrointestinal (GI) tract. Your GI tract consists of your esophagus, stomach, and intestines.

This camera will be used to take an X-ray of the insides of your bile ducts and pancreatic ducts. Your bile ducts are also sometimes called biliary ducts. The ERCP can help your doctor find and treat any blockages in these ducts. The results will also help them diagnose the reason for the blockage.

Your pancreatic and bile ducts play an important role in digestion.

Your pancreas releases enzymes that help with your digestion and mix with bile. Bile helps you digest fat. Bile is produced by and stored in your liver, and delivered to your gallbladder through your bile ducts.

Problems with your gallbladder or liver can block your body’s ability to absorb nutrients. These problems include a narrowing of the ducts. You can also develop jaundice, a yellowing of your skin and the whites of your eyes, if your liver isn’t working properly.

ERCP can help your doctor diagnose blockages in your pancreatic and bile ducts. In some cases, your doctor can also provide treatment during ERCP to address these blockages.

The doctor performing your ERCP must be able to see your GI organs clearly. This is easier when your stomach is empty, so you will be asked to fast beforehand. Do not eat or drink after midnight if you’re scheduled for a morning ERCP. Your doctor will usually ask you to fast for eight hours if your procedure is scheduled for later in the day. You should also avoid smoking or chewing gum during this time.

Let your doctor know about all medications, vitamins, and supplements you take. You might be asked to temporarily stop taking medications that contain aspirin or other blood thinners. Examples of these medicines can include:

  • aspirin
  • heparin
  • ibuprofen
  • naproxen sodium
  • warfarin

Tell your doctor about any food and drug allergies you have. You should also let your doctor know if you’ve had bad reactions to contrast dye in the past.

For most people, ERCP is performed as an outpatient procedure. This means you won’t have to stay overnight in the hospital.

The procedure involves the following steps:

1. Sedation

You will receive sedative medication intravenously (through a vein) in your arm to help you relax during the ERCP. Your doctor might also spray a general anesthetic in your throat. This helps the endoscope enter your throat and digestive system with little discomfort. You will be awake but you will probably feel sleepy during the procedure.

2. Endoscopy

The doctor who performs the ERCP is a gastroenterologist. This is a specialist who studies the gastrointestinal tract. You will lie down on an X-ray table, which will be used to take the images. Your gastroenterologist will thread the endoscope down your esophagus to your stomach and the upper part of your small intestine. The camera attached to the end of the endoscope will transmit a video feed that they can view on a computer during the procedure.

Your doctor might also use the endoscope to pump some air into your stomach. The air helps them gently push the scope through to the upper area of your intestines, called the duodenum.

3. Catheterization and Contrast Dye

A small opening in your intestines connects your bile ducts with your duodenum. This opening is called the papilla. Your doctor will put a tube called a catheter into your papilla and inject contrast dye through it in a retrograde, or backward flow, pattern. Contrast dye is a fluid that highlights the ducts to make them more visible on an X-ray. The catheter carries the contrast dye to your pancreatic or biliary ducts.

4. X-Ray

The contrast dye helps any abnormalities in your ducts show up on the X-ray images taken during the procedure. Your doctor will view the X-ray images at a later date.

Abnormalities can include narrowed areas, scar tissue, and blockages. Narrowed spots in the ducts are called strictures. Blocked ducts may be caused by gallstones, a solid mass of hardened bile, or tumors.

5. Fluoroscopy

In many cases, these abnormalities can be treated during your ERCP. Your doctor will use X-ray video, also known as fluoroscopy, to see the ducts while carrying out treatment.

Your doctor may place a tiny tube in the duct to treat strictures. The tube, called a stent, is placed into the duct through your doctor’s endoscope. Gallstones can be removed or dissolved through the endoscope as well.

6. Recovery

When the procedure is over, you will be moved to a room where you can recover. Once the sedative has worn off, you can go home. You should have someone available to give you a ride. You’ll probably feel tired, so take it easy for the rest of the day.

ERCP is generally a very safe procedure. The American Gastroenterological Association estimates that only 5 to 10 percent of people suffer from complications related to ERCP. The most common risk is inflammation of the pancreas. Some people may have a sore throat from the endoscopy for a few days.

Excessive bleeding may occur in a small number of people. You face a higher risk of bleeding if you have stones removed from your bile ducts during the procedure. Puncture of the bile duct or bowel wall and infection are rare risks of ERCP. These complications may require hospitalization.

A doctor known as an interventional radiologist will take a look at the X-ray images produced during the ERCP. Once your doctor gets the results from the interventional radiologist, they will contact you to discuss them and talk about a plan of action. The results can help your doctor learn why your ducts are blocked. For example, they may be blocked due to inflammation of your pancreas or biliary tumors. Medications or surgery may be required to treat these conditions.

After your ERCP, you will be monitored for a brief recovery time. If your blood pressure and oxygen levels remain normal, and you become more alert, you can go home. Bring someone to drive you home, since you may still be drowsy after your procedure.

Notify your doctor if you experience severe abdominal pain, vomiting, fever, or blood in your stool.

Gas is the most common complaint after ERCP. Soft stools may also be a temporary side effect of the procedure. You can return to a normal diet and work schedule as soon as you feel ready.