Any abnormality found during endoscopic retrograde cholangiopancreatography, such as gallstones or narrowing of the ducts, will be removed or relieved with instruments inserted through the scope. A biopsy will be conducted if your doctor feels that further evaluation is necessary. A biopsy is used to diagnose many diseases, including cancer.