Abstract
BACKGROUND: Dilated cardiomyopathy (DCM) represents the nonspecific conclusion to a diverse array of genetic and acquired myocardial insults and is the leading indication for heart transplantation worldwide. Free-text narratives in electronic health records (EHRs) capture real-world variation in patient trajectories and outcomes in detail, critical for improved disease characterisation. However, manual information extraction is resource-intensive and error-prone, highlighting the need for automated patient identification tools. PURPOSE: We aimed to develop a natural language processing (NLP) pipeline to identify patients with a non-ischaemic, non-valvular dilated cardiomyopathy phenotype from EHRs. METHODS: A named entity recognition (NER) and contextualisation pipeline based on word2vec embeddings and bidirectional Long Short-Term Memory architecture was developed using MedCAT, an open-source NLP toolkit. Thirteen clinical concepts defining DCM and its exclusion were selected from the biomedical ontology SNOMED for entity recognition and linking. Two medical professionals annotated 1,200 documents with the selected concepts, adding context with labels of ‘Experiencer’ (Patient, Family, Other), ‘Presence’ (Present, Not Present, Hypothetical), and ‘Temporality’ (Past, Recent, Future) to create a ground-truth dataset for supervised training. NLP performance was evaluated by comparing model predictions to expert annotations. RESULTS: In training, the NER model achieved high performance in extracting concepts and linking them to SNOMED terms, with a mean positive predictive value (PPV) of 0.94 and a mean sensitivity of 0.86 (Figure 1). Several outliers included sensitivity for myocardial infarction, aortic valve regurgitation, and aortic valve stenosis which are commonly expressed as abbreviations in text, potentially complicating detection by the model. For contextualisation, the ‘Experiencer’ model achieved a mean PPV of 0.91 and a mean sensitivity of 0.82, the ‘Presence’ model achieved a mean PPV of 0.61 and a mean sensitivity of 0.68, and the ‘Temporality’ model achieved a mean PPV of 0.89 and a mean sensitivity of 0.84 (Figure 2). The lower metrics of the ‘Presence’ model reflect the imbalance in the training data, as "Present" appeared around 20 times more frequently than the labels of "Not Present" and "Hypothetical" combined, biasing the algorithm to the majority class. CONCLUSION: We present proof of concept for the use of NLP as a novel patient identification tool in DCM using EHRs. Automated generation of large-scale cohorts with this pipeline can support clinical audit and observational research, recruitment for trials, and targeted genetic screening initiatives to improve disease characterisation. [Figure: see text] [Figure: see text]