ERCP (endoscopic retrograde cholangiopancreatography)
During this test a small optical scope is used to inject a dye into the ducts that drain bile and the pancreatic juices. It also allows doctors to insert a small tube (stent) if needed to relieve a blockage.