Endoscopic Retrograde Cholangiopancreatography (ERCP) is a specialized procedure for evaluating the bile duct, which drains the liver and gall bladder and the pancreatic duct which drains the pancreas.
A thin flexible tube with a camera will be passed to the area of the small intestine where these ducts (or tubes) drain. The doctor will pass special tools through the camera into the these ducts and fill them with contrast in order to view them under x-ray and in some instances passing a fiberoptic camera into the duct. You will be given sedation or possibly anesthetized for this procedure.
This procedure is performed for multiple reasons including gall stones, bile duct blockages, etc. Preparation usually includes fasting prior to the procedure. The length of this procedure depends on many variables, most importantly the reason it is being performed. After this procedure, you will need to have someone available to drive you home.