But this is the problem with capitalism and health care, the providers just stop if there's not enough money in it for them.
Is this supposed to be a flaw?
If the cost of a lab is $500/patient then the patient (or their insurance) pays the $500 and the lab exists. If the cost of the lab is $50,000,000/patient, the lab probably shouldn't be funded, because its cost/benefit ratio is very bad and the same money could have saved more lives by putting it somewhere else.
What would you do in the alternative? Have the government provide unlimited funding for things that cost more than they're worth?
The patient (or whoever is paying the bill) and the provider determines the "worth". If they can't agree on a price, then it's not worthwhile.
In communism, would you really want to extract the equivalent of $50m of labour and resources in order to provide one person with this test? I can't imagine how that would be affordable.
Putting a monetary price on it in order to quantify the cost doesn't fundamentally change the equation. In the communist utopia I imagine it would be more like forcing x architects, engineers and builders to construct the facilities for the testing, x researchers and scientists to develop and conduct the test, x caregivers, plumbers, cleaners, drivers, baristas, chefs, etc for x weeks to provide this "free" test for one individual. Is that "worth" it?
if it means me and all my people can one day not get STD's, yes. 50m is a steal. Medcine is one of the few fields like tech where the solution is very hard to come by, but extremely scalable once it is derived. It should be the most important aspect to focus on if you want future RoI. Even if it's the indirect cost of your citizens (or you) not dying of some disease.
we don't think of STDs as deadly, but apply it to cancer and the value is obvious.