An endoscopic retrograde cholangiopancreatogram (ERCP) is usually done by a gastroenterologist. This is a doctor who has special training in diseases of the digestive system. The doctor must be trained in endoscopy. A thin, flexible fiber-optic endoscope (scope) is used.