SAN ANTONIO — When Clay Johnston, dean of the Dell Medical School at the University of Texas at Austin, saw a model of how the coronavirus might ravage the state after stay-at-home orders were lifted, he was incredulous.

“I didn’t believe it,” Johnston said.

Now health-care workers across Texas are seeing those alarming predictions come true, with overwhelmed testing centers, lines at emergency rooms and crowded intensive care units, where it is difficult to maintain adequate numbers of specialized staff.

Many hospitals in the state are dealing with a mounting influx of coronavirus patients and, in some places, shortages of the drug known to be effective in those who are critically ill with covid-19, the disease caused by the virus, plus staffing shortages.

Case numbers in Texas are three times as high as they were in April, and now the curve that the state flattened with its stay-at-home order is more of an upward arrow. The state saw record-high case counts over the past week, averaging nearly 6,300 a day. More than 175,000 Texans have tested positive for covid-19 and 2,525 have died.

“This is actually what the model predicted for a pretty open society,” Johnston said. “It goes up. It continues to go up,” he said.

Gov. Greg Abbott (R), who was among the first governors to reopen businesses on May 1, again closed bars and limited restaurant capacity last week. Abbott prohibited municipalities from implementing mandates on mask wearing and social distancing, but on Friday he required all people in counties with more than 20 coronavirus cases to wear masks while in public.

With the virus showing no signs of abating, some hospitals have to look elsewhere for beds for coronavirus patients. Harris Health System, which serves many uninsured patients in Houston and Harris County, has been transferring patients to other hospitals for days. Some are being sent as far as Conroe and Galveston.

“We’re pretty full,” said Harris Health spokesman Bryan McLeod. The system had transferred 33 patients in the previous 24 hours and was planning to relocate 15 more, he said.

Ricardo Cigarroa, an internist and cardiologist at Laredo Medical Center, said Thursday that the hospital has run out of remdesivir, the antiviral medication used to treat seriously ill patients.

The drug “helped tremendously,” he said. “For all of our sick patients who were close to being intubated, and the ones who were already intubated, it was helpful.”

Cigarroa said the hospital has asked the state for more of the drug. He was told another shipment is coming to Texas, but there are no guarantees that the hospital will receive more.

The Department of Health and Human Services said in an email that it will distribute more of the drug in mid-July. Priority goes to the states with the highest proportion of cases.

“We await further allocations,” said Roberta Schwartz, executive vice president of Houston Methodist, where there were just 250 cases in the first surge. Today, the hospital has 520 coronavirus cases and is planning for 800 to 1,000.

“We did not expect numbers to go beyond 600,” said Schwartz, who said other hospitals in the Texas Medical Center system are facing similar crunches.

Over the past four months, hospitals in Texas tried to control for everything in their power. Public health leaders warned about inadequacies with testing, contact tracing, public policy and inconsistent messaging. But they could not control what might have prevented this moment: the behavior of individual Texans.

The surge of cases — reflecting the activity of recent weeks, including Memorial Day gatherings — has awakened concerns about hospital capacity, particularly in intensive care units. Most Texas hospitals “are probably at about 75, encroaching on that 80 percent capacity level,” said Serena Bumpus, director of practice for the Texas Nurses Association and a nurse in Austin. Hospitals can convert space in their buildings for additional covid-19 patient beds. The more urgent problem is whether Texas facilities can staff those new wards, she said — a problem that could worsen if more health-care workers fall sick even as cases increase.

“You’ve got nurses who are bracing themselves — they are bracing for impact. They are scared,” Bumpus said. “When this is all said and done — will there be more layoffs? Will there be furloughs? Because we’ve already experienced that without the surge.”

Although some hospitals are overwhelmed and expect the situation to worsen, many doctors across the state are cautiously optimistic because they are able to draw on lessons learned during the first six months of the pandemic. Texas had time to bolster its health-care infrastructure, placing some hospitals and doctors in a confident, if wary, position to fight back, experts said.

“The good news is this is within our control,” said James McDeavitt, dean of clinical affairs at Baylor College of Medicine in Houston who heads Baylor’s Incident Command Center.

Pat Herlihy recalled transforming one of Baylor St. Luke’s Medical Center’s units in Houston into one that could receive coronavirus patients when he received the advice he needed.

Herlihy got a call from a doctor at New York-Presbyterian/Columbia University Medical Center who had seen the worst of the novel coronavirus as it swamped New York’s health-care system with tragic consequences.

The first three words out of the New York doctor’s mouth stuck with Herlihy: “Prepare. Prepare. Prepare.”

The reopening of the state worried public health officials who believed it was too fast, prompting medical directors to plan for a possible wave of cases.

Texas doctors including Herlihy communicated in real time with colleagues elsewhere, scoured social media, studied YouTube videos from around the world and reviewed articles for anything that could help them get ready. The state and municipalities had time to streamline supply chains for personal protective equipment (PPE) and scale up staff numbers. State officials used their robust emergency management apparatus to deliver ventilators, medicine and test kits.

Abbott restricted elective surgeries to help conserve PPE, and he ordered health-care institutions to reserve beds for covid-19 patients. Doctors in New York passed on what they had learned then and now.

“It was very important to communicate in real time because we were learning in real time,” said David Greenwald, director of clinical gastroenterology and endoscopy at Mount Sinai in New York.

“We are hearing from people in Texas,” he said. “All of that information that we created in March, we memorialized and we have been offering all those resources back out.”

Health-care workers in Texas have been trying to stay abreast of a flood of information on phone calls, Zoom lectures, in published papers and through medical societies.

“It’s impossible, impossible,” said Carol Wu, a radiologist at the MD Anderson Cancer Center, describing the tsunami of research coming not only from hard-hit U.S. cities such as New York, but also from China, other Asian countries and Europe.

In Texas, many coronavirus patients are significantly younger and a higher proportion are Hispanic, said David Lakey, a former Texas health commissioner. The severity of their illness is not as great as those hospitalized in New York three months earlier, he said.

Sam Bagchi, chief clinical officer at Christus Health, which has 30 hospitals in Texas including in Corpus Christi and San Antonio, said watching patients in other places have poor outcomes while on ventilators pushed Christus to try therapies that would keep patients off breathing machines or avoid them for as long as possible. The system cut its coronavirus mortality rate by more than half by May 31. Even the Centers for Disease Control and Prevention, which provides guidance on public health functions like contact tracing and infection prevention, seemed behind the learning curve, he said.

“Because the CDC has been so challenged, and maybe even politicized, at times we’ve had to look beyond the CDC,” he said. “We’ve moved things faster.”

At St. Luke’s in Houston, Herlihy and his team paid close attention to their staffing needs to determine the right ratio for the volume of patients. They monitored their health-care workers for burnout and fatigue. They set up protocols when patients showed signs of renal failure and cardiac arrest. Each new promising treatment option — from steroids to remdesivir to convalescent plasma — were used in intensive care units.

Hospitals normally update their protocols after medical journals publish the results of randomized clinical trials and expert groups provide recommendations. But the coronavirus has not allowed a great deal of time for that. Each week, medical chiefs are changing the strategy for how best to take care of their covid-19 patients.

Herlihy recently came across international reports of a fungal infection, aspergillosis, found in covid-19 patients and adjusted protocols to get ahead of any fatal consequences.

“When this thing first happened, there was a lot of fear because it was new,” Herlihy said. “Three months later, we feel more confident. It’s not new, and we know what it does.”

St. Luke’s is pushing past capacity, shifting beds and making space for more covid-19 patients. The virus is unpredictable, but Herlihy said he is grateful Texas had some time to draw from the experiences of his colleagues to feel secure.

“We have the attitude that failure is not an option,” he said.

Laurie McGinley contributed to this report.