ERCP Introduction (What it is)
Endoscopic retrograde cholangiopancreatography (ERCP) is a procedure that combines endoscopy and X-ray imaging to evaluate the bile ducts and pancreatic duct.
It is commonly used in hospitals and endoscopy units by gastroenterologists and GI surgical teams.
ERCP can be diagnostic, but it is most often used to treat specific duct problems.
It is a key tool in hepatobiliary and pancreatic care when duct drainage or therapy is needed.
Why ERCP used (Purpose / benefits)
ERCP is used to evaluate and manage conditions affecting the biliary tree (the duct system that drains bile from the liver and gallbladder into the small intestine) and the pancreatic duct (which carries digestive enzymes from the pancreas into the small intestine).
In many clinical pathways, ERCP is chosen because it can do more than “look.” While cross-sectional imaging may identify a ductal abnormality, ERCP can often intervene during the same session—for example, by removing an obstructing stone or placing a stent to restore drainage. Restoring bile or pancreatic juice flow can be clinically important because impaired drainage may be associated with pain, jaundice (yellowing of skin/eyes due to elevated bilirubin), infection, or pancreatitis, depending on the cause and location of obstruction.
General goals and potential benefits of ERCP include:
- Confirming and characterizing ductal obstruction (for example, narrowing/stricture, stone, or tumor-related compression) when additional detail or direct duct therapy is needed.
- Relieving obstruction to improve bile flow (which can affect digestion and fat-soluble vitamin absorption) and reduce cholestasis (impaired bile flow) when clinically appropriate.
- Treating complications of gallstone disease such as choledocholithiasis (common bile duct stones) and related cholangitis (bile duct infection), in selected cases.
- Managing ductal leaks (for example, after surgery or trauma) by diverting flow with stents to support healing.
- Sampling ductal tissue or brushings when malignancy is part of the differential diagnosis (recognizing that sampling sensitivity varies by technique and case).
- Providing access for specialized therapies (such as dilation, sphincterotomy, stone extraction, or stent placement) without open surgery in many settings.
Importantly, ERCP is generally used when the expected value comes from therapeutic capability, not merely from diagnosis, because other noninvasive tests can often provide high-quality diagnostic information.
Clinical context (When gastroenterologists or GI clinicians use it)
ERCP is typically used when symptoms, labs, and imaging suggest a duct-level problem that may require intervention.
Common clinical scenarios include:
- Suspected or confirmed common bile duct stones (choledocholithiasis), especially with jaundice, cholestatic liver tests, or biliary dilation on imaging
- Acute cholangitis (infection in an obstructed biliary system), where duct decompression may be needed depending on severity and response to supportive care
- Obstructive jaundice due to benign stricture, malignancy, or extrinsic compression
- Biliary strictures after surgery (for example, post-cholecystectomy injury) or due to chronic inflammation
- Pancreatic duct strictures or leaks in selected contexts (for example, chronic pancreatitis-related ductal disease)
- Bile leaks after hepatobiliary surgery or liver trauma, when endoscopic diversion may help
- Evaluation of indeterminate biliary imaging findings when tissue sampling or direct duct therapy is required
- Management of stent occlusion or exchange in patients with known biliary or pancreatic strictures
- Selected disorders involving the ampulla of Vater (the opening where the bile and pancreatic ducts drain into the duodenum)
Clinicians typically interpret ERCP findings alongside liver chemistries (for example, alkaline phosphatase and bilirubin), pancreatic enzymes, and imaging (ultrasound, computed tomography (CT), or magnetic resonance imaging (MRI)) to build a coherent hepatobiliary or pancreatic diagnosis.
Contraindications / when it’s NOT ideal
ERCP is invasive and not ideal when the clinical question can be answered safely with less invasive approaches or when the risk profile is unfavorable. Contraindications can be absolute or relative and often depend on urgency, operator experience, patient anatomy, and comorbidities.
Situations where ERCP may not be suitable or may be deferred include:
- Low probability of ductal disease requiring intervention, where noninvasive imaging (such as magnetic resonance cholangiopancreatography (MRCP)) may be preferred
- Uncorrected or high-risk coagulopathy or significant thrombocytopenia when interventions like sphincterotomy are anticipated (risk assessment varies by clinician and case)
- Hemodynamic instability or severe cardiopulmonary compromise that increases anesthesia/sedation risk, unless emergent duct decompression is essential
- Suspected or known gastrointestinal perforation or conditions where endoscopy could worsen injury
- Certain altered surgical anatomies (for example, Roux-en-Y gastric bypass), where standard duodenoscope access to the papilla is difficult; alternative endoscopic or radiologic approaches may be favored depending on local expertise
- Inability to tolerate sedation or anesthesia, when alternatives can provide needed information or drainage
- Acute pancreatitis without clear evidence of persistent biliary obstruction or cholangitis, where ERCP is not routinely indicated solely for pancreatitis (decision-making varies by clinician and case)
- Allergy or prior severe reaction to contrast agents may require special planning or alternative imaging; the approach varies by clinician and case
- Pregnancy considerations, where minimizing radiation exposure is important; if ERCP is necessary, technique modifications may be used, and the decision is individualized
When ERCP is not ideal, alternatives may include MRCP, endoscopic ultrasound (EUS), percutaneous transhepatic cholangiography/drainage, or surgical management, depending on the problem being addressed.
How it works (Mechanism / physiology)
ERCP works by combining two complementary methods:
- Endoscopy: A side-viewing endoscope (duodenoscope) is advanced through the mouth into the esophagus, stomach, and then the duodenum. The endoscopist identifies the major duodenal papilla (the opening of the ampulla of Vater).
- Fluoroscopy (real-time X-ray imaging): A small catheter is used to cannulate (enter) the bile duct and/or pancreatic duct through the papilla. Contrast is injected to outline duct anatomy under fluoroscopy.
Key anatomic and physiologic concepts that help learners understand ERCP:
- The liver produces bile, which drains through intrahepatic ducts into the common hepatic duct, joins with the cystic duct from the gallbladder, and becomes the common bile duct.
- The pancreas drains via the pancreatic duct.
- These ducts typically empty into the duodenum through a shared channel at the ampulla of Vater, regulated by the sphincter of Oddi (a muscular valve controlling flow).
ERCP is not a physiologic “measurement” test like manometry; it is primarily a duct-access and intervention platform. Its clinical interpretation is based on:
- Duct caliber and filling (dilation, abrupt cutoff, irregular narrowing)
- Filling defects (for example, stones)
- Contrast drainage patterns (suggesting obstruction or leak)
- Response to therapy (stone removal, stricture dilation, stent placement)
Time course and reversibility considerations:
- The diagnostic imaging component is immediate.
- Therapeutic effects (like improved bile drainage after stenting) can be immediate in terms of duct decompression, but symptom and lab improvement timing varies by condition and patient factors.
- Some interventions are temporary (for example, plastic stents that require exchange), while others may be longer-term; durability varies by material and manufacturer, and by disease process.
ERCP Procedure overview (How it’s applied)
A high-level ERCP workflow typically follows a structured clinical sequence. Specific protocols vary by institution and case.
-
History and exam
– Clinicians assess symptoms (for example, jaundice, right upper quadrant pain, fever, pruritus, pancreatitis features), prior surgeries, anticoagulant use, and comorbidities that affect sedation and bleeding risk. -
Labs
– Common lab evaluation includes liver chemistries (bilirubin, alkaline phosphatase, aminotransferases), complete blood count, and tests relevant to infection or pancreatitis, depending on presentation. -
Imaging/diagnostics
– Ultrasound, CT, MRI/MRCP, and/or EUS are often used first to estimate the likelihood of a ductal obstructive process and to plan whether ERCP is likely to be therapeutic. -
Preparation
– Patients are typically asked to fast before sedation/anesthesia.
– Medication management (for example, anticoagulants) and antibiotic decisions depend on indication and planned interventions; practices vary by clinician and case. -
Intervention/testing (the ERCP itself)
– The endoscope reaches the duodenum, the papilla is identified, and duct cannulation is attempted.
– Contrast injection outlines ducts under fluoroscopy.
– If indicated, therapy may include sphincterotomy (cutting the sphincter to enlarge access), balloon/basket stone extraction, stricture dilation, stent placement, or tissue sampling. -
Immediate checks
– Teams monitor for procedure-related complications during recovery, including abdominal pain patterns, bleeding, fever, and signs concerning for pancreatitis. -
Follow-up
– Follow-up plans may include repeat labs, imaging, and scheduled stent exchange or removal when applicable, as well as coordination with surgery or oncology when needed.
This overview emphasizes the typical decision-making flow rather than step-by-step technical details, which depend heavily on anatomy and indication.
Types / variations
ERCP varies by purpose, target duct, and adjunct techniques.
Common classifications include:
- Diagnostic vs therapeutic ERCP
- Diagnostic: duct imaging and sampling when noninvasive tests are insufficient and results will change management.
-
Therapeutic: interventions such as stone extraction, stenting, dilation, or leak management.
-
Biliary vs pancreatic ERCP
- Biliary ERCP: focuses on the common bile duct and hepatic ducts (stones, strictures, malignant obstruction, cholangitis-related decompression).
-
Pancreatic ERCP: focuses on pancreatic duct pathology (selected strictures, leaks, or chronic pancreatitis duct issues).
-
Sphincterotomy vs no sphincterotomy
- Sphincterotomy may facilitate therapy (stone removal, stenting) but can change bleeding risk considerations.
-
Some cases may use balloon dilation of the papilla or minimal manipulation depending on goals.
-
Stent type and strategy
- Plastic vs self-expanding metal stents may be used depending on indication; choice varies by clinician and case, and durability varies by material and manufacturer.
-
Stents can be temporary (bridging a leak) or longer-term (palliation of malignant obstruction).
-
Adjunct visualization and access techniques
- Brush cytology/biopsy for strictures, and in selected centers, cholangioscopy-assisted evaluation (direct visualization within the bile duct) may be used.
Pros and cons
Pros:
- Can diagnose and treat duct problems in the same session
- Provides direct access to bile and pancreatic ducts for targeted interventions
- Can relieve obstruction through stone extraction, dilation, or stenting when indicated
- Enables tissue sampling of ductal strictures in selected cases
- Often avoids or delays more invasive surgical approaches in appropriate patients
- Allows repeat interventions (for example, stent exchange) as part of longitudinal care
Cons:
- Invasive procedure with recognized risks, including post-ERCP pancreatitis (PEP)
- Potential for bleeding, especially when sphincterotomy is performed
- Risk of infection (for example, cholangitis) in certain settings, particularly if drainage is incomplete
- Possible perforation or injury to the gastrointestinal tract
- Requires sedation or anesthesia, which adds cardiopulmonary considerations
- Diagnostic yield and technical success can be limited by altered anatomy or difficult cannulation
- May require repeat procedures (for example, planned stent removal/exchange)
Aftercare & longevity
Aftercare following ERCP centers on monitoring for early complications and ensuring the underlying disease process is addressed. Immediate recovery is influenced by sedation/anesthesia type, procedure complexity, and whether therapeutic interventions were performed.
General factors that can affect outcomes over time include:
- Underlying diagnosis and severity, such as the degree of obstruction, presence of infection, or chronic inflammatory disease
- Whether adequate drainage was achieved, which can influence symptom and lab trajectory
- Stent considerations, including stent type, expected patency, and the need for scheduled exchange or removal (timing varies by clinician and case)
- Coordination with definitive management, such as cholecystectomy for gallstone disease, oncology evaluation for suspected malignancy, or treatment of chronic pancreatitis contributors
- Comorbidities and medication tolerance, which can affect recovery and follow-up planning
- Need for surveillance or repeat endoscopy, especially when strictures are indeterminate or when stents are placed
Longevity of benefit is highly condition-dependent. For example, removing a stone may resolve the immediate duct obstruction, while malignant strictures often require ongoing stent management and coordinated cancer care.
Alternatives / comparisons
ERCP is one option within a broader hepatobiliary and pancreatic diagnostic and therapeutic toolkit. The best comparison depends on the clinical question: “Do we need to see the ducts, sample them, drain them, or treat an obstruction?”
Common alternatives and how they differ:
- MRCP (magnetic resonance cholangiopancreatography)
- Noninvasive MRI technique that images bile and pancreatic ducts without endoscopic cannulation.
-
Useful for diagnosis and mapping anatomy, but it does not provide duct therapy.
-
EUS (endoscopic ultrasound)
- Endoscopic imaging from within the stomach/duodenum to evaluate the pancreas, bile duct, gallbladder, and surrounding structures.
-
Can assess stones, masses, and lymph nodes and can obtain tissue via fine-needle techniques; therapeutic options exist in specialized settings, but standard duct interventions are typically performed via ERCP.
-
CT and MRI (cross-sectional imaging)
- Helpful for evaluating pancreatitis complications, masses, and broader abdominal pathology.
-
Often complementary to ERCP for staging, identifying alternative diagnoses, or planning interventions.
-
Percutaneous transhepatic cholangiography/drainage (PTC/PTBD)
- Radiology-guided access to bile ducts through the skin and liver.
-
Can provide external or internal drainage when ERCP is not feasible or has failed, particularly in certain anatomies or high biliary obstructions.
-
Surgical approaches
- Options include bile duct exploration, bypass procedures, or definitive management such as cholecystectomy.
-
Surgery may be preferred when endoscopic approaches are not possible, when concurrent surgical disease is present, or when long-term anatomy correction is needed.
-
Observation/monitoring and medications
- Some mild or resolving presentations may be managed conservatively when there is no evidence of ongoing obstruction or infection; the appropriateness varies by clinician and case.
- Medications may address symptoms or underlying disease drivers but do not mechanically remove stones or open strictures.
ERCP Common questions (FAQ)
Q: Is ERCP mainly a diagnostic test or a treatment?
ERCP can provide diagnostic information, but it is often used primarily as a therapeutic procedure. Many patients undergo ERCP because there is a reasonable likelihood that an intervention—such as stone extraction or stent placement—will be needed. When only diagnosis is needed, noninvasive imaging like MRCP is often considered first.
Q: Does ERCP hurt?
During the procedure, discomfort is typically minimized with sedation or anesthesia, so patients often do not remember the procedure itself. Afterward, some throat soreness, bloating, or transient abdominal discomfort can occur. Significant or worsening abdominal pain after ERCP is clinically important and is evaluated by the care team.
Q: What kind of anesthesia or sedation is used for ERCP?
ERCP commonly uses deep sedation or general anesthesia, depending on patient factors and procedural complexity. The choice is influenced by airway considerations, comorbidities, and local practice. Sedation strategy varies by clinician and case.
Q: Do patients need to fast before ERCP?
Fasting is commonly required to reduce aspiration risk during sedation or anesthesia. The specific fasting window depends on institutional protocols and anesthesia guidance. Patients typically receive instructions from the endoscopy unit before the procedure.
Q: How long does it take to recover after ERCP?
Recovery time varies with sedation type and whether therapeutic interventions were performed. Some patients are observed and discharged the same day, while others may require hospital monitoring, especially when ERCP is performed for infection or significant obstruction. Return to usual routines depends on clinical course and institutional guidance.
Q: How safe is ERCP?
ERCP is widely performed but carries recognized risks, including post-ERCP pancreatitis, bleeding, infection, and perforation. Risk depends on patient factors, anatomy, indication (diagnostic vs therapeutic), and procedural complexity. Clinicians weigh these risks against the potential benefit of relieving obstruction or treating duct disease.
Q: How long do ERCP results last?
It depends on what ERCP accomplishes and the underlying condition. Removing a bile duct stone may provide durable relief if the duct is cleared and the underlying gallstone disease is addressed, while strictures—especially malignant ones—may require ongoing stent management. Longevity varies by clinician and case.
Q: Will ERCP show cancer?
ERCP can suggest malignancy by showing irregular strictures or abrupt duct cutoffs and can allow brushings or biopsies for tissue evaluation. However, tissue sampling sensitivity varies, and additional tests (such as EUS-guided sampling or cross-sectional imaging) are often used to clarify diagnosis and staging. ERCP is typically one part of a broader diagnostic workup.
Q: What is a stent in ERCP, and does it need to be removed?
A stent is a small tube placed in the bile duct or pancreatic duct to keep it open or divert flow. Some stents are intended for temporary use (for example, to manage a leak), while others may be used longer-term (for example, in malignant obstruction). Whether and when a stent is exchanged or removed varies by stent type, material, and clinical indication.
Q: What does ERCP cost?
Costs vary widely by country, healthcare system, facility setting (outpatient vs inpatient), insurance coverage, anesthesia services, and whether therapeutic interventions (like stenting) are required. Because ERCP often involves specialized equipment and imaging, the overall cost is commonly higher than noninvasive imaging tests. Specific pricing is best addressed by the billing resources of the treating institution.