An upper endoscopy, also known as esophagogastroduodenoscopy (EGD), is a procedure used to determine the cause of gastrointestinal disorders and symptoms including heartburn, the presence of hiatal hernias, the cause of abdominal pain, unexplained anemia, and the cause of swallowing difficulties, upper GI bleeding, and the presence of tumors or ulcers.