An EGD can be used to diagnose and treat diseases of the upper GI system.