The Whipple procedure is a complex surgical procedure used to treat pancreatic cancer and other diseases of the pancreas. It involves the removal of the head of the pancreas, the duodenum, the gallbladder, part of the stomach, and the nearby lymph nodes.