The blood sugars are in good control. ERCP is an endoscopic procedure in which a tube is put past the stomach and dye is injected into the pancreatic duct to visualise it in detail. It gives evidence of changes in the duct (such as a block or malformation) which may have led to the episode of acute pancreatitis. It may also provide a clue as to whether the pancreatitis is acute or of long standing. Management will be different in the two cases.