This has been in the news today so how about this solution.
To be treated if you are not from this country you sign a form stating you will pay for your treatment which will be paid for by an insurance you took out prior your travel. You also hand in your passport until your bill is settled. If they wont do this they will not be treated. If we travel we expect to pay our own insurance why not them if they can afford to get here. It is a National health service after all not an International one.