Diverticulitis has a range of presentations. Most cases are amenable to outpatient antibiotic therapy. A small, but not inconsequential, percentage of patients will present with free air and peritonitis. These patients warrant immediate exploration in OR, generally. Findings usually include extensive inflammatory changes involving the rectosigmoid colon, along with secondary serositis of loops of small bowel entrapped by the process. Purulent ascites is the norm and sometimes frank stool will be present. Classic teaching states that the surgeon should wash out the abdomen, perform rectosigmoid resection, and then temporarily divert the stream of stool with an end colostomy (i.e. the Hartmann's procedure).
Recently, there has been a transition toward trying to re-anastomose the descending colon to the rectum, even in contaminated cases. The benefit of such an approach is that one avoids a colostomy bag. Colostomy reversals are notoriously tough cases and statistically only 70% will ever be reversed. The drawback is that you are connecting bowel in very sub optimal circumstances. The patient is septic. The blood pressure may be labile post operatively. And the tissues during acute peritonitis can be very friable and inconducive to holding staple or suture lines. No one likes a leak.
Here's my management strategy for different scenarios:
1) If the patient is toxic with fecal peritonitis and unstable hemodynamically, then a quick Hartmann's is the procedure of choice. Usually the OR time can be milited to 45 minutes or less. Minimize the time on the table. Get patient to ICU to continue resuscitation.
2) Extensive purulent contamination of the pelvis/lower abdomen in a patient who is hemodynamically stable warrants consideration of primary anastomosis. My practice is to try to do a colorectal anastomosis at the first surgery. Invariably I will protect the pelvic anastomosis with a loop ileostomy. A recent study from Annals of Surgery (randomized trial!) seems to support such such an approach. Reversing loop ileostomies, although not an "easy case", is certainly a much more tolerable procedure with higher degrees of success than trying to dig out a scarred rectum from the pelvis.
3) Sometimes you get in there and the findings aren't all that impressive. Sigmoid phlegmon is present but there isn't a whole lot of contamination. The patient is stable and doesn't have a lot of co-morbidities. I will generally reconnect these patients without diversion.
Other caveats: Patients with concerning co-morbidities (morbid obesity, on steroids, on immunosuppressive agents, uncontrolled diabetics) will invariably get a stoma. And if it's three in the morning and my surgical assistant someone who usually does ortho cases and has never fired a gastrointestinal stapler, then the patient will probably get a diverting colostomy.