You are not legally entitled to NHS treatment in the UK when you have been out of the country for more than 3 months.
[
!]
If you go back you can claim treatment if you say you have come back there to live and you have a UK address.
Alternative.....work the system. Have a UK address and keep registered with your doctor.
I know people who call up the doctors make an appointment and then cancel it saying they're better. This keeps you active on the doctors list. I also know people who need regular appointments for ongoing treatment that go back every 3 months and the NHS treat them.
My take is we have paid NI all our lives and we still pay UK taxes so we will still use the NHS services.
We always make appointment for check ups when we are back there.
Be wise when you are planning your move out here and don't tell them you are leaving the UK. We've paid for it (and they still take our taxes) and we're dammed sure we're going to get our monies worth if we need it.