Development of phenotype algorithms using electronic medical records and incorporating natural language processing