Association between drug prescribing and quality of life in primary care