Esophagogastroduodenoscopy (EGD) is a diagnostic procedure that allows direct visualization of the upper gastrointestinal tract, including the esophagus, stomach, and duodenum, using a flexible endoscope. It is commonly used to investigate symptoms such as abdominal pain, bleeding, or swallowing difficulties and can also facilitate therapeutic interventions like biopsy or polyp removal.