Using machine learning methods to improve chronic disease case definitions in primary care electronic medical records