Free NHS treatment is only available to those who are “ordinarily resident” in the UK or who are otherwise exempt from the charges.
“Ordinarily resident” is a common law concept meaning someone who is living lawfully in the United Kingdom voluntarily and for settled purpose, as part of the regular order of their life for the time being. Nationality or past or present payments of UK taxes and National Insurance contributions are not taken into consideration when establishing residence. The only thing relevant is whether you ordinarily live in the UK.
Changes to the Immigration Rules currently before Parliament will mean that those subject to immigration control who fail to settle an outstanding bill of £1,000 or more for NHS treatment will not be allowed to enter or remain in the UK until the debt is settled. The NHS will share information with the UK Border Agency to enable it to identify debtors. It is anticipated that the £1,000 threshold will catch 94 per cent of outstanding amounts owed to the NHS.