WEDNESDAY, April 17 (HealthDay News) -- It was an uneventful early afternoon on Monday in the emergency departments at Boston area hospitals. Staffs were working purposefully, efficiently through routine caseloads.

Suddenly, the city's emergency management system burst alive: bombs had exploded shortly before 3 p.m. near the finish line of the fabled Boston Marathon in the city's fashionable Back Bay section. There were unknown numbers of wounded with still-unknown injuries.

Interviews with emergency management experts suggest that's just how the situation unfolded at eight Boston hospitals during the first minutes after the twin bombings that killed three people and injured more than 170 others.

But miraculously, countless lives were saved in a city famed for its world-class medical centers. And any success that staffs had in assessing and treating the large number of severely injured wasn't due to chance. Hospitals are required to routinely plan and prepare for a wide range of disasters, conducting practice drills and developing partnerships within the local health-care community.

"All hospitals have emergency operation plans to be able to respond to any disaster that may come at them. They're developed by thinking about the hazards and risks the hospitals face in their communities," said Roslyne Schulman, director of policy development at the American Hospital Association.

Most of the Boston bombing victims suffered traumatic injuries to their lower extremities. Many were pierced by sharp objects -- nails, BBs, ball bearings -- that had been planted in two crude "pressure-cooker" bombs. The bombs were designed to cause maximum damage to a human body. Some patients had as many as 40 pieces of shrapnel inside of them -- the types of injuries typically suffered by soldiers in Iraq and Afghanistan.

As ambulances started arriving at the hospitals, the disaster plans were playing out for real.

At Boston Medical Center, Dr. Andrew Ulrich said the shrapnel in victims "could be described as buckshot," the Boston Globe reported.

"We are used to a lot of chaos, but this was extraordinary," said Ulrich, who learned about the bombings just after starting his shift in the emergency department, the newspaper reported. "Within minutes eight or 10 patients arrived."

At Boston Medical Center, at least two patients had to have both legs amputated, the Globe reported.

At Massachusetts General Hospital, the wounds to the legs of some patients were so severe that they were considered "almost automatic amputees," said trauma chief Dr. George Velmahos. In those cases, "we finished what the bomb started," he told the Globe.

One of the first and biggest challenges facing physicians and nurses on the front lines: "Sorting out the people who are really sick from those who have life-threatening injuries," said Dr. William Durkin, president of the American Academy of Emergency Medicine, and an emergency physician in Alexandria, Va.

In a disaster like the Boston bombings, a hospital's entire emergency response team is in full action mode. The emergency department is kept updated about the hospital's critical data: how many operating rooms are available at any given time, how many ICU beds and patient rooms, Durkin said. "Things are happening all at once at many levels," he explained.

Patients have to be quickly assessed and triaged, sent for X-rays, CT scans and other tests.

Keeping track of what tests and treatments each patient needs and gets can be daunting, said Loni Howard, emergency preparedness coordinator at Sutter Medical Center in Sacramento, Calif. "We have abbreviated paper disaster charts," she said. But, she added, it can be difficult because the staff often doesn't know anything about the patient.

Meanwhile, hospital staffs start trying to free up beds for the injured, moving some patients out of the intensive care units and discharging others who are capable of going home, Howard explained. Elective surgeries are canceled to free up surgical suites for the disaster victims.

Hospitals are required by their accrediting organization -- The Joint Commission -- to have a detailed emergency operations plan. They also must perform two drills a year, focusing on risks they believe are most likely to occur, based on their location, said George Mills, a director at The Joint Commission, which evaluates and accredits more than 10,300 hospitals in the United States.

A disaster like the Boston bombing is the hardest type of catastrophe to plan for, said James Romagnoli, vice president of emergency management at North Shore-LIJ Health System, in Great Neck, N.Y.

"You have no idea of the who, what or where. Even a plane crash is easier to prepare for, as unexpected as they are," he said. "But [Monday], you had no time. You have to be able to turn a switch, and instantly everyone has to know that you're going into incident command."

Romagnoli said he spent Monday monitoring the events in Boston and remained in contact with law enforcement officials in his area. "I had a real concern that [a bombing] was going to happen simultaneously in New York," he said. "We figured it could happen in Manhattan."

Still, no matter what's happening in New York or elsewhere, the emergency management staff at Romagnoli's network of 16 hospitals always knows how many beds are available.