An ERCP is a specialized endoscopic procedure where a long, thin, flexible camera is placed into the mouth and advanced to the duodenum or first portion of the small intestine. This specialized camera allows the physician to examine the opening to the bile duct and pancreatic duct. An ERCP may be performed to diagnose and treat the cause of gastrointestinal symptoms such as abdominal pain, pancreatitis, abnormal liver test, or abnormal x-ray results. An x-ray machine is used to take pictures of the bile duct and pancreatic duct to see if there are any abnormalities that require treatment.