ERCP (understandably shortened from its full name given above) is a means of accessing the tubes (ducts) that drain the liver and the pancreas using an endoscope introduced through the mouth.
The type of endoscope (shown opposite) differs from other types of endoscopic instruments (such as in the picture above) in that the camera points sideways rather than out of the end. The reason for this is that the opening of the liver and pancreas ducts is on the sidewall of the upper small intestine (duodenum) and is not easily visualised using a gastroscope.
In the X-ray image at the bottom of this page, the endoscope itself is seen, and the normal ducts draining the liver (top left) and pancreas (to the right and below the scope) are shown opacified with contrast that shows up on the X ray. The cystic duct that drains the gallbladder is also shown.
Given the significant advances in imaging technology such as 'MRI', ERCP is nowadays only used for therapeutic purposes - commonly removing gallstones that have spilt out of the gallbladder and into the tubing draining the liver, or placing 'stents' (metal or plastic tubes) that open up ducts that are blocked, for instance by cancer.
In order to access the ducts, it is often necessary to make a small cut - called 'sphincterotomy' in the muscle that closes off their lower end as they join the intestine. This cut is only a few mms long and is painless as there are no pain receptors at this site.
The procedure is carried out under good sedation in order to make sure that it can be completed successfully and comfortably.