Make every hospital into two separate corporations, one a for-profit and the other a not-for-profit. Budget their revenue and expenses entirely separately. Intake government-enforced "charity cases" only to the not-for-profit.
And then, don't allow the for-profit to loan or grant or shift any resources over to the not-for-profit. In fact, ensure they're not owned by the same parent corporation or even the same shareholders.
Keep the logistics consolidated—everything flows through the for-profit's buyer—but then, have the for-profit rent its facilities and machinery, and provide its pre-acquired drugs and materials, to the not-for-profit at market price.
And have the for-profit and not-for-profit hire the same employees and split their shifts; or perhaps, have the for-profit hire them, with the option to volunteer as many hours as they wish to the not-for-profit. (This would lower the expenses of the not-for-profit considerably.)
In other words, leave the not-for-profit "twisting in the wind", where it's still running but nobody's paying for it, so it's just running at more and more of a loss each year. Try to minimize its costs—in fact, have people working for the not-for-profit entirely dedicated to trying to minimize its costs (successful strategies for which can be rolled back into the for-profit.)
But also, treat the not-for-profit as a thing which needs to raise money, rather than just making revenue. A thing like a University, which has entire departments dedicated to getting funding from its alumni. Maybe even work with other not-for-profit hospitals in a Public Advocacy Coalition to build a social norm that if one of these not-for-profit hospitals saved your life, and you went on to great [monetary] success, you should donate to that hospital (and it will, in turn, privilege your family while pretending not to, just like Universities do.)
A fun effect of this is that the not-for-profit will now be a large, visible advocate for cost-minimization in the for-profit's purchasing—since those costs will be passed on to them (so they'll be incentivized to lower them), but they can't just lower them by buying cheaper themselves (because they don't have their own purchasing/facilities management/IT/etc. departments), they'll instead have to figure out how the hospital as a whole can lower costs, in order for them to save any money.
Essentially, this is doing the same thing that creating municipal vote districts along income lines does: the rich voters and the poor voters each get their own voices in how the city should be run, and so the poor voters (through their representative) get the chance to argue against proposals that would benefit the rich voters but hurt them. Right now, hospitals don't have any such representative for their "poor voters."
---
(Yes, I know that a lot of hospitals are already not-for-profits. They're still run on a model that tries to maximize revenue, though, because they need that money. If you split the unprofitable patients out, suddenly the for-profit hospital can lower its prices, while the not-for-profit is forced to lower its costs.)