Pharmacoepidemiology of headache treatment before and after referral to a specialist centre