NeurIPS 2026Coming to NeurIPS in Sydney?Explore papers, orals & directions

Data-driven discovery of changes in clinical code usage over time: a case-study on changes in cardiovascular disease recording in two English electronic health records databases (2001-2015)

Patrick Rockenschaub, Vincent Nguyen, Robert W Aldridge, Dionisio Acosta, Juan M. García‐Gómez, Carlos SáezmedRxiv 2019

Abstract

Objectives: To demonstrate how data-driven variability methods can be used to identify changes in disease recording in two English electronic health records databases between 2001-2015.
Design: Repeated cross-sectional analysis applying data-driven temporal variability methods to assess month-by-month changes in routinely-collected medical data.
Setting: 400 English primary care practices (CPRD GOLD) and 451 hospital trusts (HES).
Main outcomes: Proportion of patients/admissions with recorded cardiovascular diseases.
Results: Gradual changes were observed between 2001-2008. CPRD GOLD saw a 47%-62% increase in recorded prevalence, partially reversing after 2008. HES showed relative decreases in angina and unspecified stroke, with increases in chronic coronary heart disease. Abrupt changes in myocardial infarction codes occurred biennially from 2010, linked to coding guideline updates.
Conclusions: Temporal variability measures provide a robust technique to identify artificial changes in EHR studies, which might otherwise violate statistical assumptions.

Introduction

Researchers increasingly rely on Electronic Health Record (EHR) data for large-scale clinical research. However, because these data are primarily collected for administrative and billing purposes, they are subject to "artificial" shifts. Changes in clinical coding guidelines, financial incentives, or institutional policies can create trends in the data that do not reflect underlying biological or medical realities. If researchers fail to account for these shifts, they risk drawing spurious conclusions or violating the statistical assumptions of independence required by many models. Identifying these undocumented changes is a significant challenge for researchers who were not involved in the original data collection process.

Methodology

To address this, the study proposes a scalable, unsupervised approach to monitor data quality over time using Information-Geometric Temporal (IGT) plots. This method, implemented in the EHRtemporalVariability R package, follows a three-stage workflow:

  1. Joint Distribution Estimation: For each month, the joint distribution of relevant variables—such as age, gender, socio-economic status (IMD), and specific disease codes—is calculated. This captures the multi-dimensional state of the data at a specific point in time.
  2. Dissimilarity Calculation: The Jensen-Shannon Distance (JSD) is used to quantify the "distance" or dissimilarity between the distributions of any two months. A JSD of 0 indicates identical distributions, while a JSD of 1 indicates no overlap.
  3. Geometric Mapping: Multidimensional Scaling (MDS) is applied to the resulting dissimilarity matrix to project these high-dimensional distances into a 2D or 3D geometric space.
The three-stage workflow for identifying temporal variability in EHR data, from data slicing to MDS visualization.

In the resulting scatter plots, each point represents a month. Points clustered together indicate stable coding periods, while abrupt jumps or changes in the trajectory of points signal significant shifts in data recording practices.

Data Sources

The study analyzed two massive, representative English databases covering the period from 2001 to 2015:

  • Clinical Practice Research Datalink (CPRD GOLD): Primary care data from 400 English practices, encompassing approximately 4.4 million patients.
  • Hospital Episode Statistics (HES): Secondary care data from 451 hospital trusts, specifically focusing on admissions related to cardiovascular disease (ICD-10 codes I20-I69 and G45).

Findings

The analysis identified two distinct types of temporal variability: "evolutionary" (gradual) and "revolutionary" (abrupt).

In primary care (CPRD GOLD), a gradual increase in the recorded prevalence of cardiovascular diseases (47% to 62%) was observed between 2001 and 2008. This trend partially reversed after 2008, a shift likely linked to the Quality and Outcomes Framework (QOF), a pay-for-performance scheme that altered recording incentives.

In hospital care (HES), the data revealed significant relative shifts in specific codes. Recording for angina pectoris dropped by 34.4% and unspecified stroke by 42.3%, while chronic coronary heart disease increased by 14.3%. Furthermore, abrupt "staircase" jumps in the recording of myocardial infarction were detected in March/April of 2010, 2012, and 2014. These shifts aligned precisely with the release of updated National Clinical Coding Standards, demonstrating how administrative policy leaves a distinct "fingerprint" on clinical data.

Conclusion

Data quality in EHRs is dynamic rather than static. A dataset may be reliable for one period but compromised by a coding change in another. While the IGT plot method identifies that a change has occurred, human expertise is still required to investigate the underlying cause—be it a policy shift, software update, or genuine medical event. By providing an objective and robust technique to identify these changes, researchers can better account for artificial variability in EHR-based studies, potentially using these variability measures as covariates in statistical models to adjust for coding shifts.

Summary updated

Abstract

ABSTRACT Objectives To demonstrate how data-driven variability methods can be used to identify changes in disease recording in two English electronic health records databases between 2001-2015. Design Repeated cross-sectional analysis that applied data-driven temporal variability methods to assess month-by-month changes in routinely-collected medical data. A measure of difference between months was calculated based on joint distributions of age, gender, socio-economic status and recorded cardiovascular diseases. Distances between months were used to identify temporal trends in data recording. Setting 400 English primary care practices from the Clinical Practice Research Datalink (CPRD GOLD) and 451 hospital trusts from the Hospital Episode Statistics (HES). Main outcomes The proportion of patients (CPRD GOLD) and hospital admissions (HES) with a recorded cardiovascular disease (CPRD GOLD: coronary heart disease, heart failure, peripheral arterial disease, stroke; HES: International Classification of Disease ICD codes I20-I69/G45). Results Both databases showed gradual changes in cardiovascular disease recording between 2001 and 2008. The recorded prevalence of included cardiovascular diseases in CPRD GOLD increased by 47%-62%, which partially reversed after 2008. For hospital records in HES, there was a relative decrease in angina pectoris (−34.4%) and unspecified stroke (−42.3%) over the same time period, with a concomitant increase in chronic coronary heart disease (+14.3%). Multiple abrupt changes in the use of myocardial infarction codes in hospital were found in March/April 2010, 2012 and 2014, possibly linked to updates of clinical coding guidelines. Conclusions Identified temporal variability could be related to potentially non-medical causes such as updated coding guidelines. These artificial changes may introduce temporal correlation among diagnoses inferred from routine data, violating the assumptions of frequently used statistical methods. Temporal variability measures provided an objective and robust technique to identify, and subsequently account for, those changes in electronic health records studies without any prior knowledge of the data collection process.
BibTeX
@misc{rockenschaub2019data,
  author = {Patrick Rockenschaub and Vincent Nguyen and Robert W Aldridge and Dionisio Acosta and Juan M. García‐Gómez and Carlos Sáez},
  title = {{Data-driven discovery of changes in clinical code usage over time: a case-study on changes in cardiovascular disease recording in two English electronic health records databases (2001-2015)}},
  year = {2019},
  doi = {10.1101/19006098},
  howpublished = {medRxiv},
}

Loading related content...

Figure