Do you have travel insurance?
They often offer a doctor consultant that you can call as it's cheaper than you paying for a local doctor in many situations.
Failing that, I would ask a pharmacist.
The good thing about Spain is that you can buy almost anything direct from the pharmacy without a prescription. I had to do it several years ago after leaving my insulin at a bus station. A costly mistake as it was around 35e for a packet of insulin cartridges. Still, it was a a no hassle event apart from the cash hit.