Medical history, physical examination, blood tests (such as liver function tests), imaging techniques (such as ultrasound, CT scan, or MRI), and occasionally endoscopic procedures like ERCP (endoscopic retrograde cholangiopancreatography) are all used to make a diagnosis.