Abstract
Electronic Health Records (EHRs) provide a wealth of clinical data but often lack reliable annotations for specific medical conditions. While patient-level phenotyping has advanced with unsupervised methods like PheNorm, there remains a critical need for visit-level resolution to track disease progression and acute events. This paper presents PheVis, an unsupervised "white box" algorithm that identifies medical conditions at the visit level by integrating structured codes, NLP-extracted concepts, and a tunable temporal "memory" of patient history. Validated on French EHR data for Rheumatoid Arthritis (chronic) and Tuberculosis (acute), PheVis demonstrates superior performance over state-of-the-art unsupervised methods, achieving AUROCs of 0.947 and 0.987, respectively.
Introduction
Electronic Health Records (EHRs) are a cornerstone of modern clinical research, yet their utility is often hampered by the lack of reliable diagnostic labels. Traditionally, researchers have relied on manual chart reviews—a process that is both time-consuming and expensive—or rigid, rule-based algorithms that lack portability across different healthcare systems.
Recent advancements in unsupervised learning, such as the PheNorm algorithm, have automated patient-level phenotyping (determining if a patient has a disease). However, many clinical applications require a higher resolution: visit-level phenotyping. For acute conditions that resolve over time or chronic conditions that fluctuate in severity, knowing when a condition is active is as vital as knowing if it exists. PheVis was developed to address this need, providing a scalable, interpretable, and unsupervised framework for visit-level phenotyping.
The PheVis Framework
PheVis is designed as an interpretable "white box" algorithm that combines multiple data streams and temporal context to estimate the probability of a condition at each hospital visit. The workflow consists of four primary stages:
- Data Integration: The model utilizes both structured data (ICD-10 billing codes) and unstructured data (medical concepts extracted from clinical notes via Natural Language Processing).
- Temporal Memory (The "Memory" Factor): A core innovation of PheVis is the use of exponential decay to carry information from previous visits forward. This allows the model to maintain context. For chronic diseases like Rheumatoid Arthritis (RA), the information "half-life" can be set to infinity, reflecting the lifelong nature of the condition. For acute diseases like Tuberculosis (TB), a shorter half-life (e.g., 180 days) is used to reflect the potential for cure.
- Surrogate Labeling: To remain unsupervised, the algorithm generates a "silver standard" surrogate label based on the most relevant diagnostic codes, which serves as the initial training target.
- Multi-Stage Machine Learning Pipeline:
- Variable Selection: Elastic-net regression identifies the most predictive features.
- Smoothing: A Random Forest model is used for "pseudo-labeling" to stabilize probability scores across visits.
- Final Prediction: A noising-denoising logistic regression produces the final occurrence probability, ensuring the model remains interpretable for clinicians.
Experimental Setup and Results
The algorithm was validated using the data warehouse of the University Hospital of Bordeaux, utilizing French-language EHRs. The study focused on two distinct use cases: Rheumatoid Arthritis (RA) as a chronic condition and Tuberculosis (TB) as an acute condition. The dataset comprised over 300,000 visits from approximately 11,461 patients.
Performance Metrics
PheVis demonstrated significant improvements over existing unsupervised benchmarks:
- Rheumatoid Arthritis (Chronic): PheVis achieved an AUROC of 0.947 [0.944; 0.948], vastly outperforming the original PheNorm (0.870).
- Tuberculosis (Acute): PheVis achieved an AUROC of 0.987 [0.983; 0.990]. While the Area Under the Precision-Recall Curve (AUPRC) was lower (0.212) due to the rarity of TB visits, it remained superior to state-of-the-art alternatives.
Discussion and Key Insights
The Power of Temporal Context
By incorporating past medical history, PheVis maintains stable and accurate predictions even during visits where a specific disease might not be explicitly mentioned in the clinical notes. This is particularly effective for chronic diseases where the accumulation of history is a strong predictor of current status.
Language and Interpretability
PheVis proves that high-performance phenotyping is possible outside of English-language EHRs. Furthermore, because the final output is based on a logistic regression model, clinicians can inspect which specific codes or keywords contributed to a high probability score, fostering trust in the automated system.
Limitations
The primary limitation identified was the sensitivity of French NLP tools to temporal nuances. In some cases, the tools struggled to distinguish between a patient's current condition and a mention of past medical history (e.g., "history of TB"). This can lead to "trailing" probabilities where the model continues to flag an acute condition as active long after it has been resolved.
Conclusion
PheVis represents a significant step forward in EHR phenotyping, moving from patient-level summaries to granular, visit-level insights. Its unsupervised nature and interpretability make it a powerful tool for large-scale clinical research, particularly for chronic disease tracking. Future work will focus on integrating laboratory results and medication data to further refine the accuracy of the "silver standard" surrogates, especially for acute medical conditions.
Summary updated