The idea that this is a free market system is patently false The cost is not $19k , it is whatever the billing department decides to surprise the patient with.
The medical care quality isn't relevant to the point, but it is dependent on how you want to measure it. If getting basic care to your citizens at an affordable cost is any important metric , then the US fails miserably.
I never goto the ER even if I need to anymore. I'm too busy paying off my $30k bill for a single EKG.