Gastrointestinal surgery is a treatment for diseases of the parts of the body involved in digestion. This includes the esophagus, stomach, small intestine, large intestine, and rectum. It also includes the liver, gallbladder, and pancreas. Surgery may be used to remove a cancerous or noncancerous growth or damaged part of the body, such as the intestine. It may also be used to repair a problem like a hernia. Minor surgical procedures are used to screen and diagnose problems of the digestive system.