Skip to main content
        
        U.S. flag
                An official website of the United States government
                    Here’s how you know
                Here’s how you know**Official websites use .gov**
                        
                        A **.gov** website belongs to an official government organization in the United States.
            **Secure .gov websites use HTTPS**
                        
                        A **lock** (
                        Locked padlock icon
                        ) or **https://** means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.Search
    Menu

        Search for Information from NIDDK
            
            Entire Site
                Research & Funding
                Health Information
                News
                About NIDDKSearch

Home
            Research & Funding
                                Expand Research & Funding
                                Current Funding Opportunities
                                                    Research Programs & Contacts
                                                    Human Subjects Research
                                                    Funding Process
                                            Research Training & Career Development
                                                    Funded Grants & Grant History
                                                    Research Resources
                                            Research at NIDDK
                                                    Technology Advancement & Transfer
                                                    Meetings & Workshops
                        Health Information
                                Expand Health Information
                                Health Topics
                                                                                                    Diabetes
                                                    Digestive Diseases
                                                    Kidney Disease
                                                    Weight Management
                                                    Liver Disease
                                                    Urologic Diseases
                                                    Endocrine Diseases
                                                    Diet & Nutrition
                                                    Blood Diseases
                                                    Diagnostic Tests
                                            La información de la salud en español
                                                    Health Statistics
                                                    Healthy Moments Radio Broadcast
                                                    Clinical Trials
                                            For Health Professionals
                                                    Diabetes Discoveries & Practice Blog
                                                    Community Health & Outreach
                        News
                                Expand News
                                News Archive
                                                    For Reporters
                                            Meetings & Workshops
                                                    Media Library
                                            Follow Us
                        About NIDDK
                                Expand About NIDDK
                                Meet the Director
                                                    Offices & Divisions
                                                    Staff Directory
                                                    Budget & Legislative Information
                                            Advisory & Coordinating Committees
                                                    Strategic Plans & Reports
                                                    Research Areas
                                                    FAQs
                                            Jobs at NIDDK
                                                    Visit Us
                                                    Contact Us Home
                    Health Information
                    Diagnostic Tests
                    Endoscopic Retrograde Cholangiopancreatography (ERCP)

    Related Topics
    English
        English
                Español
        Diagnostic Tests
        A1C Test & Diabetes
                A1C Test & Race/Ethnicity
                Colonoscopy
                Cystoscopy & Ureteroscopy
                Endoscopic Retrograde Cholangiopancreatography (ERCP)
                Flexible Sigmoidoscopy
                Kidney Biopsy
                Liver Biopsy
                Lower GI Series
                Prostate Tests
                Thyroid Tests
                Upper GI Endoscopy
                Upper GI Series
                Urinary Tract Imaging
                Urodynamic Testing
                Virtual ColonoscopyEndoscopic Retrograde Cholangiopancreatography (ERCP)
**On this page:**
What is ERCP?
    What are the bile and pancreatic ducts?
    Why do doctors use ERCP?
    How do I prepare for ERCP?
    How do doctors perform ERCP?
    What should I expect after ERCP?
    What are the risks of ERCP?What is ERCP?
Endoscopic retrograde cholangiopancreatography (ERCP) is a procedure that combines upper gastrointestinal (GI) endoscopy and x-rays to find and treat problems of the bile and pancreatic ducts.
What are the bile and pancreatic ducts?
Your bile ducts are tubes that carry bile from your liver to your gallbladder and duodenum. Your pancreatic ducts are tubes that carry pancreatic juice from your pancreas to your duodenum. Small pancreatic ducts empty into the main pancreatic duct. Your common bile duct and main pancreatic duct join before emptying into your duodenum.
The liver, pancreas, duodenum, gallbladder, and bile ducts.Your common bile duct and main pancreatic duct join before emptying into your duodenum.
Why do doctors use ERCP?
Doctors use ERCP to treat problems of the bile and pancreatic ducts. Doctors also use ERCP to diagnose problems of the bile and pancreatic ducts if they expect to treat problems during the procedure.
For diagnosis alone, doctors may use tests that do not enter your body, called noninvasive tests. Noninvasive tests include magnetic resonance cholangiopancreatography (MRCP), ultrasound, or endoscopic ultrasound. These tests carry less risk than ERCP and can diagnose many problems of the bile and pancreatic ducts.
Doctors perform ERCP when your bile or pancreatic ducts are leaking or have become narrowed or blocked because of
gallstones  that form in your gallbladder and become stuck in your common bile duct
    infection
    acute pancreatitis
    tumors or cancers of the bile ducts  or pancreasHow do I prepare for ERCP?
To prepare for ERCP, you will need to talk with your doctor, arrange for a ride home, and avoid eating or drinking before the procedure.
Talk with your doctor
Talk with your doctor about your medical history. Your medical history includes any current or past health problems, allergies, or symptoms. Talk with your doctor about all prescription and over-the-counter medicines, vitamins, and supplements you take, including
aspirin or medicines that contain aspirin
    medicines for arthritis, diabetes, or blood pressure
    blood thinners
    nonsteroidal anti-inflammatory drugs (NSAIDs), such as ibuprofen and naproxenYou can take most of your medicines as usual. However, you may need to adjust or stop some medicines for a short time before your ERCP. Talk with your doctor about the specific medicines that you take and if you need to change the routine you follow when taking your medicines before the procedure.
Tell your doctor if you are, or may be, pregnant. Though research has found that ERCP during pregnancy is generally safe, you may be more likely to have complications if you are pregnant.1 If you are pregnant and need ERCP to treat a problem, the doctor performing the procedure may make changes to protect the fetus from x-rays.
Arrange for a ride home
Before your procedure, make plans for your recovery. For safety reasons, arrange for a ride home after the procedure, as the sedatives  or anesthesia  need time to wear off before you drive.
Do not eat or drink before the procedure
Your doctor may ask you not to eat or drink for up to 8 hours before the procedure.2 Some people may be given additional instructions on how to prepare for the procedure. Talk with your doctor about specific instructions.
How do doctors perform ERCP?
Doctors who have special training in ERCP perform this procedure at a hospital or outpatient center.
Before the procedure, you will be given a sedative or medicine to help you stay relaxed and comfortable during the procedure. A health care professional will place an intravenous  (IV) needle in your arm or hand to give you the sedative.
A health care professional may also give you a liquid medicine to gargle or a spray medicine to numb your throat. These medicines can help prevent you from gagging during the procedure. In some cases, you may receive general anesthesia.
You’ll be asked to lie on an exam table. When you are ready, the doctor will carefully pass the endoscope down your esophagus and into your stomachandduodenum. The endoscope pumps air into your stomach and duodenum, making them easier to see. A small camera mounted on the endoscope will send a video image to a monitor.
During ERCP, the doctor locates where the bile and pancreatic ducts empty into the duodenum. The doctor will then slide a thin, flexible tube called a catheter through the endoscope and into the bile and pancreatic ducts.
The doctor injects a special dye through the catheter into the ducts. The dye will make the ducts more visible on x-rays. The doctor uses a type of x-ray imaging, called fluoroscopy, to examine the ducts and look for narrowed areas or blockages.
The doctor may pass tiny tools through the endoscope to treat problems in the bile and pancreatic ducts. The doctor may also take small samples of tissues, called a biopsy, from your bile and pancreatic ducts for testing.
What should I expect after ERCP?
After ERCP, you may experience bloating, nausea, or a sore throat for a short time.
You can expect to stay at the hospital or outpatient center for 2 to 6 hours after the procedure so the sedative or anesthesia can wear off. Some people may need to stay at the hospital overnight.3
After the procedure, you—or a friend or family member who is with you—will receive instructions on how you should care for yourself when you are home. You should follow all instructions.
Your doctor may tell you to follow a clear-liquid diet for 4 to 6 hours after the procedure. Some people may need to wait 24 hours before eating solid food.3
Some results from ERCP are available right away. After the sedative has worn off, the doctor will share results with you or, if you choose, with your friend or family member.
A doctor talking with a patient.After the sedatives have worn off, your doctor will share available results with you.
If the doctor took tissue samples during the procedure, a pathologist will examine the samples. The results may take a few days or longer to come back.
What are the risks of ERCP?
The risks of ERCP may include
pancreatitis
    infection of the bile ducts or gallbladder
    excessive bleeding, called hemorrhage
    perforation in the bile or pancreatic ducts or in the duodenum
    an abnormal reaction to the sedative, including breathing or heart problemsThese problems occur in about 5% to 10% of ERCP procedures.4 People with complications often need treatment at a hospital.
Seek care right away
If you have any of the following symptoms after ERCP, seek medical care right away
bloody or black, tar-colored stool
    fever
    severe pain in your chest or abdomen
    problems breathing
    problems swallowing or throat pain that gets worse
    vomiting—particularly if your vomit is bloody or looks like coffee groundsReferences
[1] Sethi A, Banerjee S, Chahal P. Advanced endoscopic procedures in pregnancy. American Journal of Gastroenterology. 2022;117(10S):39–43. doi:10.14309/ajg.0000000000001959
[2] Groce R. ERCP: A patient’s guide. American College of Gastroenterology. Updated 2020. Accessed June 7, 2023. https://gi.org/topics/ercp-a-patients-guide
[3] Tringali A, Loperfido S, Costamagna G. Overview of endoscopic retrograde cholangiopancreatography (ERCP) in adults. UpToDate. Updated July 20, 2021. Accessed June 7, 2023. www.uptodate.com/contents/overview-of-endoscopic-retrograde-cholangiopancreatography-ercp-in-adults
[4] Meseeha M, Attia M. Endoscopic retrograde cholangiopancreatography. In: StatPearls [Internet]. StatPearls Publishing; 2023. Updated August 8, 2023. Accessed December 7, 2023. www.ncbi.nlm.nih.gov/books/NBK493160        Last Reviewed January 2024
Sharethis page

Print
    Facebook
    X
    Email
    
    More Options
    
    WhatsApp
    LinkedIn
    Reddit
    Pinterest
    
    Copy Link
                
                This content is provided as a service of the National Institute of Diabetes and Digestive and Kidney Diseases
(NIDDK), part of the National Institutes of Health. NIDDK translates and disseminates research findings to increase knowledge and understanding about health and disease among patients, health professionals, and the public. Content produced by NIDDK is carefully reviewed by NIDDK scientists and other experts.
    NIDDK would like to thank:
Christopher Forsmark, M.D. and Aleksey Novikov, M.D., University of Florida College of Medicine Contact Us
**Hours:** 8:30 a.m. to 5 p.m. ET, Monday - Friday**Email:** healthinfo@niddk.nih.gov**Phone:** +1-800-860-8747**TTY:** +711
Chat
Live Chat Available8:30 a.m - 5 p.m. ETMonday - Friday
Follow Us
LinkedIn
X
Facebook
YouTube
InstagramNIH... Turning Discovery Into Health ®
Privacy Policy
    Freedom of Information Act
    Accessibility
    Disclaimers
    Copyright
    Vulnerability Disclosure Policy
Site Map
    For Staff Only
    Get Email Updates
U.S. Department of Health and Human Services
    National Institutes of Health