It is still a market (and a single-payer one, ultimately) in these places, but it is not a government service. It is the best solution: the government funds the appropriate cost of care, the provider group is financially responsible for meeting it, and they are incentivized directly to get it right.
The left needs to stop shrieking about Medicare-for-all and the right needs to stop pretending like it can even spell healthcare. There are good solutions.
> but also encourages just refusing to treat people.
It categorically does not. It would be foolish to do so.