Most hospitals have pharmacies in-house. Would it be too much to ask that the hospital provide you with the prescription or pain meds that will take care of the problem that brought you there and include that in the bill? As far as the specialist is concerned, they can easily refer people to places that help the folks that can't afford such things. All they'd need to do is give a piece of paper with information on it.
It would essentially be this: YOu break your leg and go to the hospital. When you leave, you have not only a cast, but pain meds and crutches if required (many hospitals do not offer them). If you can't breathe and you need medicine for infection, you leave with the medicine. If you can't afford a follow up with a doctor, they refer you to folks that can help you.
Insurance doesn't help if you are near-broke and two days away from payday. Lots of folks can't afford their deductible plus the yearly out-of-pocket.