Endoscopic retrograde cholangiopancreatography, or ERCP, is a study of the ducts that drain the liver and pancreas. ERCP is used primarily to diagnose and treat conditions of the bile ducts, including gallstones, inflammatory strictures (scars), leaks (from trauma and surgery), and cancer.
ERCP combines the use of x rays and an endoscope, which is a long, flexible, lighted tube. Through the endoscope, the physician can see the inside of the stomach and duodenum, and inject dyes into the ducts in the biliary tree and pancreas so they can be seen on x rays. If the exam shows a gallstone or narrowing of the ducts, the physician can insert instruments such as stents through the scope to remove or relieve the obstruction. Also, tissue samples (biopsy) can be taken for further testing.