ERCP is a procedure for endoscopic removal of bile duct stones. Since many patients have primary gallstones, gallbladder removal may be necessary. Patients who do not undergo surgery after ERCP are more likely to have gallbladder, bile duct, and pancreas problems.