Historically, surgery has been viewed as definitive therapy for ulcerative colitis. Total proctocolectomy is often curative, alleviating symptoms and removing the risk of colonic adenocarcinoma. Prior to 1980, total proctocolectomy with end ileostomy or continent (or Koch) ileostomy was the mainstay of therapy.
In the late 1970s, however, reports of continence-preserving procedures involving ileal pouch–anal anastomosis (IPAA) began to surface. As experience amassed, the procedure was refined, and IPAA has become the most common operation for patients with ulcerative colitis who wish to maintain anal continence.  In patients with Crohn disease and pancolitis, however, total proctocolectomy is palliative.
For more information, see Ulcerative Colitis.
Indications for Surgery
Indications for urgent surgery in patients with ulcerative colitis include the following:
Toxic megacolon refractory to medical management
Fulminant attack refractory to medical management
Uncontrolled colonic bleeding
Perforation (free or walled off)
Obstruction and stricture with suspicion for cancer
Indications for elective surgery in ulcerative colitis include the following  :
Refractory disease with failure of medical management
Chronic steroid dependency
Dysplasia or adenocarcinoma found on screening biopsy
Disease present for 7-10 years
Systemic complications from medications, particularly steroids
Failure to thrive, in children
Failure of medical management is the most common indication for surgery. Classically, an acute attack of ulcerative colitis that does not respond to intravenous steroid therapy within 10 days warrants surgical intervention.  Steroid dependency is a predictor for the need for surgery and is likely a marker for more severe disease.
In children, the presence of pancolitis is the strongest predictor of the need for surgery; more than 80% of patients who require surgery have total colonic involvement.  However, during a fulminant attack, the patient's condition is compromised, with a potentially poor nutritional status, low albumin level, low hematocrit level, and complications of high-dose corticosteroid use.  Cyclosporine therapy may be useful in inducing remission, providing a window to an improvement in the patient's overall health status prior to surgery and, hence, minimizing complications.
Other indications for surgical intervention include hemorrhage, intolerance to steroid therapy, and growth retardation. One major goal of management in children is the avoidance of growth retardation caused by long-term steroid use. 
Contraindications for Surgery
The only absolute contraindication for surgical treatment of ulcerative colitis is anal sphincter dysfunction. Preexisting incontinence due to neurologic impairment or other causes makes reservoir construction unnecessary and makes ileoanal pull-through inadvisable.
Other contraindications include suspected Crohn disease. The diagnosis of ulcerative colitis must be certain before an ileal pouch reservoir is created in a patient with inflammatory bowel disease. The need for pelvic irradiation is also a contraindication to pelvic reservoir construction. For example, if rectal cancer is found at the time of exploration, end ileostomy should be performed in anticipation of postoperative pelvic irradiation. Radiation leads to pouch fibrosis and noncompliance, with resultant loss of reservoir function.
Risk of Adenocarcinoma
Colonic dysplasia is a precursor to adenocarcinoma and occurs in patients with ulcerative colitis.
Many physicians use surveillance colonoscopy for monitoring patients with ulcerative colitis and determining the need for colectomy. This involves scheduled annual or biannual colonoscopy with multiple random biopsies.
However, surveillance colonoscopy must be undertaken with caution, because even low-grade dysplasia is associated with synchronous adenocarcinoma in as many as 42% of cases, and as many as 84% of neoplasms in persons with ulcerative colitis are missed at random biopsy.
Furthermore, 1% of colon cancers in patients with ulcerative colitis have no foci of preexisting dysplasia. Even in patients in whom the disease is medically controlled, the optimal time for colectomy may be 7-10 years after the onset of disease, to prevent colon cancer. 
Historically, patients with ulcerative colitis had a 1% risk of colon adenocarcinoma per year after 8-10 years of disease. After 20 years of disease, the incidence of adenocarcinoma was as high as 25%.  However, data acquired after the advent of improved medical therapy suggested that the incidence of adenocarcinoma has decreased somewhat. Among 600 patients colonoscopically examined for 30 years, the cumulative risk of cancer was only 2.5% at 20 years, 7.6% at 30 years, and 10.8% at 40 years. 
Backwash ileitis is an independent marker for the presence of dysplasia, as is age older than 45 years and the presence of disease for more than 10 years. Therefore, the patient with ulcerative colitis must be made aware of the significant risk of colon cancer, and surgical intervention in nonacute cases must be encouraged after 10 years of disease.
Choice of ileal pouch size and type
The creation of an IPAA involves total proctocolectomy, with folding of the distal ileum into a J, S, or W formation to create a fecal reservoir. The anastomosis to the anus preserves continence function involving the internal and external anal sphincters. The S and W configurations have been associated with a failure rate as high as 66% and a need for revision. Conversely, the J configuration is associated with a need for revision in only 1-2% of cases. 
Reasons for failure with S and W pouches include dilation of the reservoir, leading to stasis, and elongation of the spout at the anal anastomosis, leading to stenosis.  These technical points are all but alleviated with the current technique of J pouch construction. Transanal defecation is restored in 88% of children with J pouches, whereas 32% of those with S pouches and 32% of those undergoing straight ileoanal pull-through procedures require revision. 
Although most surgeons do not use the S pouch as the first option (because of its pouchitis rate), the spout created in its construction provides an additional 3-5 cm in length to the entire ileal reservoir, compared with the length of a J pouch.
Some still advocate straight ileoanal pull-through anastomosis without reservoir construction. Straight endorectal pull-through causes dilatation and compensation over time so that the pouch develops a reservoir function. In addition, length is generally not a problem with a straight pull-through. Thus, many pediatric surgeons perform this as their primary procedure. Good long-term outcomes and patient satisfaction are reported. 
However, others have noted a need for revision of the straight pull-through configuration in 70% of cases.  Construction of the ileal J pouch-anal anastomosis is described below. One should keep in mind that the straight ileoanal pull-through is performed in essentially the same manner and uses less total length of small bowel.
In summary, the choice of pouch size and type is a balance between increasing reservoir function to decrease stool frequency and the risk of developing pouchitis. All reservoirs have a tendency to enlarge over time. Consequently, most surgeons have opted for a smaller initial reservoir that depends on reservoir enlargement to gradually decrease stooling frequency while avoiding pouchitis.
Timing of surgical intervention
Timing of the surgical intervention is the major preoperative concern in ulcerative colitis. If possible, emergency surgery should be avoided, but if it is indicated, most advocate use of a staged procedure. Initially, emergency total colectomy with end ileostomy is performed to alleviate the major symptoms of the disease, including bleeding and pain, and allows the patient to be weaned from steroids.
Later, an IPAA is created, if the patient desires it, with removal of the remaining rectum. Most advocate leaving the rectum in place during the initial emergency operation to prevent disrupting the pelvic tissue planes, in order to make the subsequent pelvic dissection safer. If the patient has mild disease or disease in remission, total proctocolectomy with the creation of an IPAA may be performed as the initial definitive procedure.
A total proctocolectomy is performed through a midline abdominal section. The ileum is divided close to the ileocecal valve with a stapler to save maximal ileal length. The ileal branch of the ileocolic artery is preserved, if possible, to provide optimal blood supply to the distal ileum. The rectum is stapled and divided, within 1 cm proximal to the dentate line.
This procedure theoretically preserves the sensory nerve fibers in the anal transition zone that contribute to discrimination between gas and stool. Some refute the importance of retaining this zone, reporting no change in functional outcome when the anal transition zone is removed.  However, rectal mucosectomy may be performed and the ileum brought through a short seromuscular sleeve of rectum.
The dimensions of the pouch depend on the size of the patient. In adolescents, as in adults, a 9- to 12-cm pouch is created by folding the distal ileum on itself in a J configuration and by using a linear cutting stapler to place staples longitudinally along the antimesenteric border between the two limbs of the J to create a reservoir. (See the image below.)
Limb lengths of 8-10 cm are used in small children. The bowel at the lower end (ie, curve) of the J is then used to create an anastomosis to the anus with a circular stapling device or sutures. Because of the increased incidence of cancer in patients with ulcerative colitis and primary sclerosing cholangitis (PSC), complete mucosectomy to the dentate line and creation of a handsewn pouch-anal anastomosis have been recommended in these patients.
To ensure a tension-free anastomosis at the anus, numerous techniques may be used to gain length in the small bowel. First, the ligament of Treitz may be mobilized to allow the proximal jejunum to turn toward the pelvis in a more gradual manner. The peritoneum overlying the small bowel mesentery may be sequentially opened in an orientation perpendicular to the superior mesenteric artery ("stair stepping") to release tension and provide length.
The superior mesenteric artery may be divided just distal to the origin of the first or second arterial arcade. This proximal division preserves distal collateral flow and provides length. Finally, vein interposition grafts may be used as a last resort in the most extreme cases in which length is prohibitively short. 
The need for fecal diversion after IPAA is controversial in adult patients. Because the need for surgery in young patients usually is due to the severity of illness, most surgeons prefer to divert the fecal stream proximally in these cases. During the procedure, the distal vascular arcades of the ileum are often divided to gain length to reach the pelvis; this division predisposes the patient to ischemia. Therefore, many surgeons opt for an end ileostomy or loop ileostomy as the means of diversion. Many use the latter because of the widely held belief that takedown of a loop ileostomy is technically easier.
Data have been derived, however, that refute this assumption. On average, the operating time with loop-ileostomy takedown is 54 minutes less than that of end-ileostomy takedown. However, loop-ileostomy takedown lengthens the hospital stay, increases the time to oral feeding, and has a twofold higher wound infection rate than does end-ileostomy takedown. In addition, loop ileostomy requires significantly more outpatient stoma care and is associated with more frequent anal complications. 
Several centers have reported success with using laparoscopy to perform the total colectomy combined with transanal mucosectomy to completely remove the diseased colon and rectal mucosa.  An ileoanal anastomosis (with or without a J pouch) can be successfully performed.
The main disadvantage of the laparoscopic approach is the increase in total operating time in comparison with open surgery. However, preliminary data suggest that laparoscopy is associated with decreased length of hospital stay, shorter time to return to normal activities and school, and improved cosmetic results. This technically demanding operation has also been successfully performed with the help of robotically assisted technology. 
After IPAA procedures, patients are treated as with any bowel procedure. Their diet is changed as bowel function returns, and they are weaned from steroid use. At 6-12 weeks, diverting ileostomies are evaluated for closure. This evaluation usually involves contrast-enhanced imaging of the pouch to assess healing. Once the ostomy is taken down, stool frequency is evaluated, and the need for bulk-forming agents or motility agents is determined.
Outcome of Surgery
Research suggests that after restorative proctocolectomy with IPAA, patients tend to have inferior functional outcomes and long-term health-related quality of life (HRQOL) than do study controls. [19, 20] Such results were found in a study by Andersson et al, who compared HRQOL in 105 patients with ulcerative colitis (and 5 patients with familial adenomatous polyposis), all with an intact pouch, with that of 4152 individuals from the general population. 
In the study by Andersson et al,  median patient follow-up time was 12 years (range, 2-22 years) after surgery. IPAA patient scores in four of six health domains on the SF-36 questionnaire were slightly, but significantly, lower than in members of the general population. In addition, IPAA patients had median defecation frequencies of seven bowel movements during the day and two per night. Moreover, 40% of the patients reported the need to make lifestyle alterations because of urgency of defecation, and most of the patients experienced fecal incontinence.
In a multicenter study that included 351 respondents to a cross-sectional survey of consecutive ulcerative colitis patients older than 18 years who had had a colectomy within the past 10 years, 84% of respondents had better quality of life after the procedure, but 81% had problems in one or more of the following areas: depression, work productivity, restrictions in diet, body image, and sexual function. 
Every patient who undergoes an IPAA procedure, as currently performed, must be able to accept the possibilities of stool seepage or incontinence and frequent bowel movements, with a minimum of four to six per day. Although the procedure results in removal of the diseased organ and is more technically advanced than end ileostomy, it is not a perfect solution. Surgical techniques can be improved to ensure better postoperative functional outcomes.