Bleeding is typically divided into two main types: upper gastrointestinal bleeding and lower gastrointestinal bleeding. Causes of upper GI bleeds include: peptic ulcer disease, esophageal varices due to liver cirrhosis and cancer, among others. Causes of lower GI bleeds include: hemorrhoids, cancer, and inflammatory bowel disease among others. Diagnosis typically begins with a medical history and physical examination, along with blood tests. Small amounts of bleeding may be detected by fecal occult blood test. Endoscopy of the lower and upper gastrointestinal tract may locate the area of bleeding. Medical imaging may be useful in cases that are not clear.