To register with a Spanish doctor you need a Spanish social security number and to be registered with your local town hall. Of course you also need your passport too.
To register with the social services it is a bit complicated, and we recommend you contact us to explain your particular circumstances and we will advise what we can do, as in the Valencian Community it is not always possible now to register with a Spanish public doctor depending on your age and you may need to take out private health insurance.