An endoscopic retrograde cholangiopancreatogram (ERCP) is a test that combines the use of a flexible, lighted scope (endoscope) with X-ray pictures to examine the tubes that drain the liver, gallbladder, and pancreas. The endoscope is inserted through the mouth and gently moved down the throat into the esophagus, stomach and duodenum until it reaches the point where the ducts from the pancreas (pancreatic ducts) and gallbladder (bile ducts) drain into the duodenum.
ERCP can treat certain problems found during the test. If an abnormal growth is seen, an instrument can be inserted through the endoscope to obtain a sample of the tissue for further testing (biopsy). If a gallstone is present in the common bile duct, the doctor can sometimes remove the stone with instruments inserted through the endoscope. A narrowed bile duct can be opened by inserting a small wire-mesh or plastic tube (called a stent) through the endoscope and into the duct.