The first diagnostic test for pancreatitis is usually imaging tests such as an abdominal ultrasound or a CT scan. These tests can help to identify inflammation of the pancreas and any possible complications such as blockage of the pancreatic ducts. Blood tests may also be used to detect levels of enzymes that are released from the pancreas when it is inflamed. Additionally, a stool sample may be taken to test for the presence of fat, which can be an indication of pancreatic dysfunction. Finally, an endoscopic retrograde cholangiopancreatography (ERCP) may be performed to further diagnose pancreatitis.