Portugal has an excellent "National Health Service" which is available to all. The local hospital and health centre now usually ask for your European Health Insurance Card (EHIC - was E111). Sometimes they also ask for your passport, so take both.
For non-emergency situations, the Health Centre - on the western edge of the town on the road to Sagres - is your first point of contact. It has GP, analysis and treatment services, and it functions like a major UK Medical Centre. If they do not have the analytical or specialist equipment needed, you may well be referred to a private operator, at no extra cost to you.