Surgery of the pancreas is the set of surgical interventions that are performed to treat cases of acute or chronic pancreatitis, or pancreatic cancer. In the latter case, there are different surgical procedures: Whipple operation, total pancreatectomy, distal pancreatectomy and biliary deviation. Whipple surgery involves the removal of the head of the pancreas, a part of the small intestine and some surrounding tissues. The surgeon leaves a small part of the pancreas to continue producing digestive juices and insulin. Total pancreatectomy involves removing the entire pancreas, part of the small intestine, part of the stomach, bile duct, gallbladder, spleen, and most of the lymph nodes in the region. For its part, distal pancreatectomy involves removing the body and tail of the pancreas. Bile diversion is done if the cancer blocks the small intestine and bile accumulates in the gallbladder. In this case, the bile duct is cut and attached to the intestine, although the problem can also be solved by placing a catheter to drain the bile. As for treatment for acute or chronic pancreatitis, the procedure, called a cholecystectomy, consists of extracting the gall bladder by laparoscopy (small incisions in the abdomen) by an accumulation of stones.