Using artificial intelligence to derive data on the social determinants of health from electronic medical records