On Sunday night, almost as soon as reports started coming in of gunfire at an outdoor music festival in Las Vegas, local hospitals and medical personnel kicked into action.

The gunman, perched on the 32nd floor of the Las Vegas Mandalay Bay Hotel and Casino, opened fire on thousands of concert-goers on the street below, killing at least 58 people and wounding nearly 500. It was the deadliest mass shooting in modern U.S. history.

Dr. Jay Coates, a trauma surgeon at UNLV School of Medicine, said it was a night of non-stop surgeries.

Get Breaking News Delivered to Your Inbox

"It was a little bit of controlled chaos. We've had mass casualties come through this trauma center but nothing of this magnitude," he told Las Vegas station KTTV.

While many of the most seriously wounded were taken straight to the trauma center, another 105 patients flooded into Desert Springs Hospital, a smaller community medical center closest to the shooting site.

People "just dropped everything and rushed to our facility," Dr. Donald Reisch, Desert Springs' ER medical director, told CBS News.

He said they treated victims with gunshot wounds to the head, chest, and extremities; shrapnel-like injuries from bullets that bounced off the pavement; and injuries from getting trampled in the crowd or jumping over fences to escape.

To save as many lives as possible during a tragic event like this, first responders and emergency room doctors must act quickly and make difficult decisions.

"It's an ethical and moral dilemma that all physicians and health care providers go through because we try to save everyone, but unfortunately that's not the case," Dr. Robert Glatter, an emergency room doctor at Lenox Hill Hospital in New York, told CBS "This Morning."

On the scene, he explains, there is a tagging system that prioritizes wounded patients based on who needs to be seen first.

People who have life-threatening injuries and need immediate attention, such as those with a collapsed lung, are tagged red and are brought in for treatment right away.

Those with severe, but less life-threatening injuries are ranked a tier lower with a yellow tag.

Unfortunately, doctors must also decide when a patient cannot be saved.

"Say there's a person with a head injury who's barely breathing. We try to open their airways but if there's not much chance of saving them we have to move on," Glatter said.

CBS News medical contributor Dr. David Agus explains that doctors must make these decisions quickly, sometimes within seconds, in order to save as many people as possible.

"It's a horrible decision to have to make, but you need to start to say, where can I use the men and women power I have to save people," he said. "It's a very difficult thing because with some people you're going to have to say these are people who we are not going to be able to save even though if the emergency room was empty they would be able to save them."

Hospitals periodically run drills and trainings to help prepare staff for how to respond in a crisis situation.

The medical community also comes away with important lessons learned following past tragic events that they can put into action in the future.

For example, following the 2013 Boston Marathon bombing, first responders learned how vital tourniquets can be to saving lives.

"Using certain tourniquets, properly applied tourniquets, can be life-saving. Certainly, individuals don't carry these — they may use belts or other improvised devices. But tourniquets are something that can stem blood loss because blood loss is one of the key things and ultimately that is the issue that kills people," Glatter said.

Because of the nature of the injury caused by gunshot wounds, experts say many of the victims will need multiple surgeries over the next few weeks and even months, prompting the need for more blood donations.

"These automatic weapons cause devastating internal injuries. We may see an entry wound and an exit wound or may not even see the exit but it's internally that they wreak havoc," Glatter said. "They can destroy the intestines, they can puncture the lungs, cause fractures, cause bleeding in the pelvis, and this is the unknown area where we have to use imaging tests and figure out exactly what's causing the bleeding."

Patients may remain in the hospital for months with delayed complications like infections and hypothermia — having a dangerously low body temperature — he said.

In a press conference Monday morning, Las Vegas Mayor Carolyn Goodman urged citizens to help by donating blood. County officials tweeted a link for residents to schedule a time to donate.

Long waits to donate blood - we thank you so much, making a reservation might help save you some time. #PrayForVegas #LasVegasShootings https://t.co/oqmqeQUGmO — Clark County Nevada (@ClarkCountyNV) October 2, 2017

"It's urgent. I would behoove everyone to try to get there and donate," Glatter said. "Blood is the sustenance of life and we need it. It's really life-saving."

Some who went to local blood banks this morning tweeted photos on social media of the long lines of people waiting to donate blood to the victims of the shooting.

This is the scene at one of the local blood banks (United Blood on W Charleston). Vegas is an amazing community. Our city is coming together pic.twitter.com/Xk7zTZWOR6 — Dave Farra (@DaveFarra) October 2, 2017

The line at the united blood service on Whitney Ranch location. So happy to see so many people coming out to help. #LasVegas #mandalaybay pic.twitter.com/Xo8X3Qu661 — Jourdan Lasko (@Heilos) October 2, 2017