Endoscopic examination of the bile ducts and pancreas