From the NHS website:
Are you taking up or resuming permanent residence in the UK?
What if I should need hospital treatment?
Under the current Regulations, anyone who is taking up or resuming permanent residence in the UK is entitled to free National Health Service (NHS) hospital treatment in England. If your intention is to live permanently in the UK you will be exempt from hospital charges from the date of your arrival in the country but you should expect to be asked to prove your intention and that you are legally entitled to live here. This exemption applies to your spouse and children (under the age of 16, or 19 if in further education) if they are living here with you on a permanent basis.
If you do not have an automatic right to take up permanent residence but have applied to the Home Office for leave to enter/remain on a settled basis, you will be chargeable for any hospital treatment up to the point your application is granted.
Once you are living here permanently you will become ordinarily resident and the Regulations will cease to apply to you. Your spouse and child will also be considered ordinarily resident if they are living permanently in the UK with you. If they are not living permanently in the UK then the Regulations will apply and in order to be entitled to free hospital treatment they will have to meet one of the categories of exemption in their own right.
In common with those ordinarily resident in the UK, anyone who meets the criteria of ordinary residence or is exempt from charges for hospital treatment will have to pay statutory NHS charges, eg prescription charges, unless they also qualify for exemption from these, and will have to go on to waiting lists for treatment where appropriate.
If I should need hospital treatment what documents will I need?
The Regulations place a responsibility on individual hospitals to determine whether, in accordance with the Regulations, a patient is liable to be charged for treatment or not. In order to establish entitlement, hospitals can ask you to provide documentation that supports your claim that you intend to live permanently in the UK. It is for you to decide what to supply, however examples of evidence could include:
documentation to prove you are entitled to live in the UK such as British Passport, permission from the Home Office;
documentation that proves your intention is to reside here permanently such as sale of goods/property overseas, receipts showing shipping of goods, looking for work, application for benefits, children are attending school.
Am I entitled to access primary care services?
Any person living here lawfully and on a settled basis is regarded as resident in the UK and therefore entitled to free primary medical services. On taking up residence in the UK it is advisable to approach a GP practice and apply to register on to its list of NHS patients. The practice may choose to accept or decline your application. An application may be refused if the practice has reasonable grounds for doing so, such as if you are living outside their practice area. A practice would not be able to refuse your application on the grounds of race, gender, social class, age, religion, sexual orientation, appearance, disability or medical condition.
Further information on registering with a primary care practice.
Do I have to pay for emergency treatment if I have an accident?
Regardless of residential status or nationality, emergency treatment given at Primary Care Practices (a GP) or in Accident and Emergency departments or a Walk-in Centre providing services similar to those of a hospital Accident and Emergency department is free of charge.
In the case of treatment given in an Accident and Emergency department or Walk-in Centre the exemption from charges will cease to apply once the patient is formally admitted as an in-patient (this will include emergency operations and admittance to High Dependency Units) or registered at an outpatient clinic.
Am I entitled to help with the costs of non-emergency NHS treatment?
Information about help with health costs is detailed in
leaflet HC11 'Are you entitled to help with health costs?'
What are the other exemptions from charge for NHS hospital treatment?
Full list of exemptions from charges
What if I do not meet one of these exemptions from charges?
If you are not ordinarily resident or exempt under the regulations, charges will apply for any hospital treatment you receive and cannot be waived. If this is the case you are strongly advised to take out private healthcare insurance that would cover you for the length of time you are in the UK. There is no facility to purchase healthcare insurance from the NHS therefore any necessary insurance must be organised privately.
Please note the above information gives general guidance only and should not be treated as a complete and authoritative statement of law. In all cases the Regulations place the responsibility of deciding who is entitled to receive free hospital treatment with the hospital providing treatment.