Diagnosis usually involves a combination of medical history, physical examination, and diagnostic tests such as endoscopy, which allows direct visualization of the digestive tract. Blood tests can also be important to check for anemia and other complications.