An x-ray is not is not a complex custom service.
> But how much is that worth when the entirety of the hospital visit is going to be a variable cost?
This is the exact same argument that hospitals used to use against itemized pricing, and yet it turns out that requiring hospitals to give itemized bills on request has pretty solidly been a good thing for consumers.
There are a huge number of reasons for this, not the least being fostering competition and putting natural pressure on the market to justify its prices helps it become more efficient, and these kinds of opaque systems will almost always naturally lead to inflated prices. There's little reason to believe that up-front price transparency for individual itemized procedures and drugs wouldn't also be good for the same reasons.
At the very least, this would help with the many health decisions that consumers make that aren't happening during life-threatening situations. Most of the time that I get an x-ray, most of the time when I'm being offered pain medication, most of the time when I'm making decisions about whether or not to opt for anesthesia before a procedure, I'm awake and not in danger of immediately dying.
It really doesn't make sense to keep leaning on the most extreme life-or-death situations as a defense for why a hospital can't walk me through the price differences in several different brands of pain medication. But sure, we'll make an exception for surgeons operating while a patient is literally unconscious during a time-sensitive procedure. Most health visits (and the vast majority of all preventative care procedures) do not fall into that category.
> jonathan-adly has done a great job explaining why drug prices are difficult to calculate upfront.
Let's make this simpler. johnathan-adly says:
> The cost of the aspirin depends on these things
Here's Rite-Aide's page that comes up when I search for an aspirin: https://www.riteaid.com/shop/medicine-health/pain-fever-reli...
Why is it that Rite-Aid can give me an upfront cost for an aspirin, and a hospital can't? 340B is a rebate system, it doesn't force doctors to avoid talking to patients about the baseline price differences between comparable off-the-shelf name-brand and generic drugs.