Gastroenterology is a specialty of medicine that diagnoses (endoscopy) and treats diseases of the gastrointestinal tract. Liver disease (the field of hepatology) is generally considered part of gastroenterology.