An attorney for Hahnemann called that sale "game-changing" because the money would go a long way to help the hospital pay its creditors.
The ruling came over the objection of the federal government's Centers for Medicare and Medicaid Services (CMS), which opposed the sale, saying it was against the law and Hahnemann's Medicare agreement can't be transferred.
The judge asked CMS and Hahnemann to try to broker an agreement Wednesday, but that didn't happen.
Gross admitted there are rulings that cause a judge to "lie awake at night" knowing it would be an unpopular decision, and this case is one of them.
There were two other groups seeking to buy the hospital, but the judge ruled that essentially, their offers were too little, too late, and not concrete.
Gross indicated from the bench that it's better to have a firm deal in hand that will bring $55 million to Hahnemann's creditors as opposed to a speculative deal that was not very concrete.
The judge's order will not take effect for another week, to give the government time to decide whether to appeal the decision.
Samir Sonti with the Pennsylvania Association of Staff Nurses (PASNAP) said the idea that there could be a secondary market for trading residency slots is preposterous.
"Medical residents, people talk about them like they're some kind of asset or indentured servants really, is the way they've been characterized through this proceeding. But what they are, are really valuable employees to a hospital," he said.
Residency programs are funded through public tax dollars to provide patient care services and to train new physicians, Sonti explained, some of whom do residencies of three to five years.
"And so once those folks are gone, there's no way you can run a hospital this size," he said.
Pending any appeals, the judge's approval to sell the residency program pretty much ensures that Hahnemann Hospital will close for good and that, he said, is dangerous overall for healthcare in America.
"The precedent that it sets is that now, any big corporate hospital chain or massive academic center could start buying up these slots left and right from safety net hospitals that need an infusion of cash."