This story was covered in The Observer last Sunday - see
here
They offer this advice:
State pensioners - British pensioners who have retired to Spain are entitled to free healthcare under an agreement whereby the UK pays Spain a set sum each year per pensioner. To transfer their NHS rights to the Spanish system, a pensioner must obtain an E121 form from the Department for Work and Pensions (DWP) in Newcastle. Some disabled people under 60 can get an E121.