So much water poured onto the grounds of Good Samaritan Hospital Medical Center and Our Lady of Consolation nursing home when superstorm Sandy struck that Richard Bie made an executive decision: evacuate about 100 of the most vulnerable patients.

The scale of damage to the West Islip campus became clear the next morning. The hospital's front doors were blown off and it sustained extensive roof and water damage.

Now Good Samaritan and the nursing home, as well as Southside Hospital in Bay Shore, are poised to receive multimillion-dollar hazard mitigation grants from the Federal Emergency Management Agency.

See alsoFind out how your hospital ranks

The money -- $20.1 million for Good Samaritan and $23.7 million for Southside -- will be used to bolster their resiliency against future storms by lifting emergency generators, protecting electrical infrastructure and sealing the perimeters off to flooding.

The night of Oct. 29, 2012, was a logistical nightmare for both hospitals, perched near the Great South Bay.

"After Sandy, we started thinking long and hard about how to reduce our vulnerability," said Bie, assistant vice president of facilities management at Good Samaritan.

advertisement | advertise on newsday

Southside Hospital sustained similar damage. Water pooled at the building's doors and covered much of the first floor, as it had during other storms, such as tropical storm Irene in 2011, said Anthony Pellicone, the hospital's associate executive director.

Sandy caused $11 million in damage and lost revenue at the 537-bed Good Samaritan and 450-bed Our Lady of Consolation. At the 431-bed Southside, the toll was about $3 million, hospital administrators said.

"In the past two-and-a-half years to three years we have had a 100-year hurricane and a 500-year flood, and we've had a blizzard," said Donna Moravick, executive director. "The one thing that has always impressed me at Southside is the anticipation of any problems. . . . We were here for this community."

@Newsday

Managers at the hospitals said the storm and others before it, such as Irene, mostly threatened their emergency generators, which switch on when electric power fails.

Some Long Islanders were out of power for weeks after Sandy struck, but hospitals are required to have emergency generators activated within 10 seconds of a power outage, Bie said.

At Southside, area residents with health difficulties who had no electricity at home came to the emergency room and clustered around a station that provided oxygen. Some 60 employees and their relatives lived on the hospital grounds until their lights at home came back on, Moravick said.

In both facilities, the FEMA money will replace and elevate generators.

At Good Samaritan, the seven generators dotting the campus will be consolidated into three and lifted onto a second floor in a special building that will have noise- and odor-reducing features. The managers may erect a berm or retracting wall to keep water out, too.

advertisement | advertise on newsday

At Southside, ground-level generators will be replaced and set on the second floor. The grant also may help solve flooding by enhancing drainage capacity, waterproofing the roof, elevating electrical mechanical equipment and bolstering infrastructure.

"These health-care facilities provide vital care and essential services to an extensive population, and must be able to stand up to severe weather and future storms," said Jamie Rubin, executive director of the Governor's Office of Storm Recovery, which helps administer the federal program. The storm recovery office has recommended that both hospitals receive the FEMA funds.

The federal agency will fund 75 percent of the projects, and the state the rest.

Other Long Island projects under consideration for hazard mitigation funding include:

A $40 million infrastructure overhaul in Island Park, where water rose to as much as 8 feet during Sandy.

advertisement | advertise on newsday

$47.5 million for upgrading state Department of Transportation bridges in Nassau and Suffolk counties that have experienced erosion.

Up to $130,000 toward a tidal wetland restoration project at Smith Point County Park in the Town of Brookhaven.