Characterizing Design Patterns of EHR-Driven Phenotype Extraction Algorithms

Yizhen Zhong, Luke V. Rasmussen, Yu Deng, Jennifer A. Pacheco, Maureen E. Smith, Justin Starren, Wei‐Qi Wei, Peter Speltz, Joshua C. Denny, Nephi Walton, George Hripcsak, Christopher G. Chute, Yuan Luo · DOI

Abstract

The automatic development of phenotype algorithms from Electronic Health Record (EHR) data with machine learning (ML) techniques is of great interest given the current practice is very time-consuming and resource intensive. The extraction of design patterns from phenotype algorithms is essential to understand their rationale and standard, with great potential to automate the development process. In this pilot study, we perform network visualization on the design patterns and their associations with phenotypes and sites. We classify design patterns using the fragments from previously annotated phenotype algorithms as the ground truth. The classification performance is used as a proxy for coherence at the attribution level. The bag-of-words representation with knowledge-based features generated a good performance in the classification task (0.79 macro-f1 scores). Good classification accuracy with simple features demonstrated the attribution coherence and the feasibility of automatic identification of design patterns. Our results point to both the feasibility and challenges of automatic identification of phenotyping design patterns, which would power the automatic development of phenotype algorithms.

The Phenotyping Bottleneck

In clinical research, "phenotyping" is the critical process of identifying specific patient cohorts (e.g., individuals with Type 2 Diabetes) within the vast and often unstructured data of Electronic Health Records (EHR). Currently, this process is largely manual and labor-intensive. Experts must craft complex algorithms that account for institutional variations in data recording, making these algorithms difficult to transfer between different healthcare systems.

To address this, researchers have proposed the use of "phenotype design patterns"—standardized logical building blocks such as the "Rule of N" (requiring multiple occurrences of a code) or "Check for Negation" (filtering out mentions like "no history of diabetes"). However, manually identifying these patterns in existing algorithm descriptions remains a significant bottleneck. This study investigates the feasibility of using Natural Language Processing (NLP) and Machine Learning (ML) to automatically detect these patterns within narrative algorithm descriptions.

Methodology

The study employed a two-pronged approach: visualization and classification.

  1. Network Visualization: Using Google Fusion Tables, the researchers mapped the relationships between specific diseases (phenotypes), clinical sites (e.g., Vanderbilt, Marshfield), and design patterns to identify universal versus site-specific logic.
  2. Classification Models: The team tested two primary architectures: Support Vector Machines (SVM) using a "Bag-of-Words" (BOW) approach and Convolutional Neural Networks (CNN) utilizing word embeddings pre-trained on the MIMIC III clinical dataset.
  3. Feature Engineering: To enhance the models, the researchers integrated knowledge-based features from the Unified Medical Language System (UMLS), specifically Concept Unique Identifiers (CUIs) and Semantic Types (STs).
Table 1: Definitions and dataset distribution for the six phenotype design patterns.

As shown in Table 1, the dataset focused on six core design patterns, with the "Rule of N" being the most frequent, reflecting its importance in confirming diagnoses within noisy EHR data.

Results and Performance

The experimental results highlighted a clear advantage for models that incorporated medical context. The best-performing configuration was the SVM model using Bag-of-Words combined with UMLS Semantic Types (BOW + ST), which achieved a macro-F1 score of 0.79.

Table 2: F1-score performance comparison across different experimental configurations.

Key findings from the classification task include:

  • Simplicity and Context: The SVM models generally outperformed the deep learning CNN. This is likely due to the relatively small dataset (131 fragments), where traditional ML with high-quality features often excels over data-hungry deep learning architectures.
  • The Value of Semantic Types: Adding UMLS Semantic Types (ST) provided a significant performance boost, as it allowed the model to recognize that disparate terms (e.g., different drug names) belong to the same functional category.
  • Perfect Classification: For specific patterns like "Use Distinct Dates" and "Credentials of the Actor," the models achieved perfect F1 scores (1.00) when site or semantic information was included.

Discussion and Future Directions

This pilot study demonstrates that automatically identifying phenotyping design patterns is feasible even with relatively simple features. The high performance of the BOW + ST model suggests that the logical structure of these algorithms is coherent and detectable through NLP.

However, challenges remain, particularly regarding the heterogeneity of data across different clinical sites. Future work will focus on scaling the dataset to include more phenotypes and refining the NLP pipeline to better handle the complex, overlapping semantics of clinical language. Ultimately, these automated labels could enable the "auto-generation" of computable code, drastically accelerating the pace of clinical research.

Summary updated

BibTeX
@misc{zhong2018characterizing,
  author = {Yizhen Zhong and Luke V. Rasmussen and Yu Deng and Jennifer A. Pacheco and Maureen E. Smith and Justin Starren and Wei‐Qi Wei and Peter Speltz and Joshua C. Denny and Nephi Walton and George Hripcsak and Christopher G. Chute and Yuan Luo},
  title = {{Characterizing Design Patterns of EHR-Driven Phenotype Extraction Algorithms}},
  year = {2018},
  eprint = {1811.06183},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.06183},
}
Figure