Gastroenterology is the branch of medicine where the digestive system and its disorders are studied. This includes diseases that affect the entire gastrointestinal (GI) tract, which takes in food, digests it to extract energy and nutrients, and expels the remaining waste. The major functions of the GI tract are digestion and excretion.
The upper GI tract consists of the mouth, pharynx, esophagus, and stomach. The lower GI tract includes the intestines (small and large) and the anus.