{'fraction_non_alphanumeric': 0.04090909090909091, 'fraction_numerical': 0.028181818181818183, 'mean_word_length': 5.754601226993865, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Natural Language Processing to Identify Patients with Cognitive Impairment

INTRODUCTION: Early detection of patients with cognitive impairment may facilitate care for individuals in this population. Natural language processing (NLP) is a potential approach to identifying patients with cognitive impairment from electronic health records (EHR). METHODS: We used three machine learning algorithms (logistic regression, multilayer perceptron, and random forest) using clinical terms extracted by NLP to predict cognitive impairment in a cohort of 199 patients. Cognitive impairment was defined as a mini-mental status exams (MMSE) score <24. RESULTS: NLP identified 69 (35%) patients with cognitive impairment and ICD codes identified 44 (22%). Using MMSE as a reference standard, NLP sensitivity was 35%, specificity 66%, precision 41%, and NPV 61%. The random forest method had the best test parameters; sensitivity 95%, specificity 100%, precision 100%, and NPV 97% DISCUSSION: NLP can identify adults with cognitive impairment with moderate test performance that is enhanced with machine learning.