Endoscopic retrograde cholangiopancreatography (ERCP) is used to diagnose issues in the biliary system, the gallbladder, liver, bile ducts and pancreas. It can help to diagnose conditions like gallstones, scars, leaks and cancer. The procedure combines the use of X-rays with endoscopy, a flexible lighted tube that allows a gastroenterologist to view the inside of the stomach and duodenum.
A dye will be injected through the tube as well, which allows the bile ducts to show up on X-rays. If gallstones or narrowing of the bile ducts is visible, a doctor can then insert instruments to remove the obstruction. This procedure also allows a physician to take samples for a biopsy or other further testing.