In a major step toward closure, Hahnemann University Hospital will stop admitting patients through the emergency department as of July 17, according to the Pennsylvania Department of Health.

The emergency department will remain open to care for patients who can be treated and released. Patients who come to the ER with more serious medical needs will be stabilized and transferred to another hospital.

Since most of Hahnemann’s admissions come through the ER, no longer admitting patients that way will quickly reduce the hospital’s patient count. The 497-bed hospital had 97 inpatients, as of earlier this week.

“We see the need for the wind-down process to begin,” said Nate Wardle, press secretary for the Pennsylvania Department of Health, which has been monitoring the hospital.

Philadelphia Academic Health System, which owns the debt-ridden safety-net hospital, filed for Chapter 11 bankruptcy in late June and said it planned to close Hahnemann in early September.

In U.S. Bankruptcy Court in Wilmington Thursday, a lawyer for Hahnemann said the hospital’s creditors wanted to stop admissions through the ER because continuing to lose money at Hahnemann will make it harder to sell St. Christopher’s Hospital for Children.

St. Christopher’s was also included in the bankruptcy, but it is profitable, and is being sold to raise cash to pay Hahnemann’s debts.

On Friday lawyers for Hahnemann’s main creditors sparred in court before reaching a tentative agreement for funding the hospital’s last weeks and preparing to sell St. Christopher’s.

The hospital’s creditors include its former owner Tenet Healthcare and its technology subsidiaries, and MidCap Financial, a loan company managed by Sixers owner Josh Harris’ Apollo Global Management.

“The bleeding must stop,” said Gregory F. Pesce of law firm Kirkland & Ellis, who represented the hospital’s former owner, Tenet. “We cannot be required to provide services for free.”

As part of the bankruptcy proceedings, Tower Health has offered $7.5 million to buy Hahnemann’s 500-plus residency and fellowship slots, as well as the hospital’s Medicare ID number, which dictates the number of medical residents for which the hospital can receive federal funding.

Hahnemann has said it will release residents who want to transfer to another program. But residents are worried that the hospital will not keep its promise because administrators have provided few details, even as some new doctors receive offers from other teaching hospitals.

Main Line Health said it expects to take 40 Hahnemann residents across several specialties, primarily at its two teaching facilities, Lankenau and Bryn Mawr hospitals, said Bridget Therriault, a spokesperson for Main Line.

Penn Medicine has made offers to several dozen Hahnemann residents and is continuing to review applications for others, but it is too early to say how many will ultimately transfer, PJ Brennan, University of Pennsylvania Health System’s chief medical officer, said in a statement.

Jefferson said it does not yet know how many residents it may accept. Cooper and Temple have also said they would take Hahnemann residents.

In the meantime, residents continue to work with doctors and the rest of the hospital’s medical staff to treat the patients still arriving, though traffic has slowed.

Shortly after Hahnemann announced plans to shut down, it gave up its trauma designation and the ER stopped accepting critically ill patients.

City and state officials have demanded that the hospital not shut down services any more quickly than necessary. The state health department has stationed a temporary manager at Hahnemann to oversee an orderly closure.

State regulations require 90 days notice and an approved closure plan for any hospital wind-down, requirements which Hahnemann’s proposed Sept. 6 closure did not meet.

“We now see the fact that there’s no possible way that in the financial status Hahnemann is in, it would still be able to be open for a 90-day time frame of when they said they need to close,” Wardle said.

The state’s temporary manager will continue working with Hahnemann staff, to ensure the units that remain open are safe to operate, he said.