This is from the NHS + website. It seems you are deemed non resident if you are away for 3 months or more or do not have a permanent UK address:
Living abroad for more than three months
If you are no longer resident in the UK and are living abroad, the NHS normally won't pay for any treatment or services. This includes people who are in receipt of UK state retirement pensions.
No longer resident, means that you have left the country for more than three months or don't have a permanent address in the UK. Therefore, you will have to obtain healthcare cover in the country you are in, or get private medical insurance.
If you take a particular medicine, you should check that it is available in the country that you plan to live in. Your GP in the UK can only prescribe you medicine for up to a maximum of three months. If you are going to be away from the UK longer than this, you will need to register with a local doctor in the country you are moving to. Some medicines may have a different brand name in other countries.
Some people who live abroad may be eligible to receive free or reduced cost healthcare in other European Economic Area (EEA) countries and Switzerland. For example, if you are working for a UK employer, are in the armed forces or you are in education. To see if you are eligible, see the Department of Health website: Other circumstances affecting eligibility.
Read this:
http://www.dh.gov.uk/en/Policyandguidance/International/OverseasVisitors/Browsable/DH_074386