Biliary endoscopy  or endoscopic retrograde cholangiopancreatography (ERCP)  is a procedure that combines endoscopy and fluoroscopy (internal imaging to obtain real-time  moving X-ray images of internal structures) ERCP enables physicians to diagnose and treat problems in the gallbladder  bile ducts  pancreas and liver  such as gallstones  strictures  leaks resulting from trauma or surgery  and cancers