To be able to use all the state healthcare network, primary healthcare centres (national health doctors surgeries), hospitals and sanitary residences you will need a temporary absence note, that you must request to the service of attention to the public before going on a trip.
This will be of use in case of an emergency whilst you are in this country.