Solving a $Endoscopic retrograde cholangiopancreatography (ERCP) is a procedure that uses both upper gastrointestinal endoscopies and X-rays to treat problems in a patient’s bile and pancreatic ducts.