what diseases can be detected by an endoscopy