Skip to content

Who has long COVID? Finding patients in health records with XGBoost

  • Article
  • Health

Read the announcement on Facebook

Most people recover fully from COVID-19, but some carry symptoms for months afterward. This is post-acute sequelae of SARS-CoV-2 infection (PASC), better known as long COVID, and it has slowed recovery from the pandemic for patients and for society. There is still no unambiguous definition of the condition, which makes it hard to know who has it. Emily R. Pfaff, Andrew T. Girvin, and their co-authors approached the problem from the data side: use electronic health records (EHR) to predict which patients likely have long COVID, then look at which features drove the prediction.

Approach

The data came from the National COVID Cohort Collaborative (N3C) EHR repository. For each patient the authors looked at demographics, healthcare utilization, diagnoses, and medications before and after COVID-19, and selected 924 features. They trained three XGBoost models, one for all COVID patients, one for hospitalized patients, and one for non-hospitalized patients. Training labels came from 597 patients seen at long COVID clinics.

Performance was measured with AUROC, the area under the receiver operating characteristic curve, which captures how well a model separates two classes. To interpret the models, the authors used SHAP (SHapley Additive exPlanation) values, which quantify how much each feature pushed a prediction.

Findings

The models found potential long COVID patients with high accuracy: an AUROC of 0.91 for the all-patients model, 0.90 for hospitalized patients, and 0.85 for non-hospitalized patients. The features that mattered most were the rate of healthcare utilization after COVID, patient age, dyspnea (shortness of breath), and other diagnosis and medication information already in the record. Applying the all-patients model to the wider N3C repository flagged 100,263 potential long COVID patients.

What it is for

The authors are careful about what the label means. Patients the model identifies should be read as “likely to be referred to or seek care at a long COVID specialty clinic,” which serves as a proxy for diagnosis while no formal definition exists. That is still enough to meet an urgent need: finding candidates for clinical trials. As new data sources arrive, the models can be retrained for the needs of a given study. The preprint the post summarized was later peer reviewed and published in The Lancet Digital Health.

Source: Pfaff, E. R., Girvin, A. T., Bennett, T. D., et al. (2022). Identifying who has long COVID in the USA: a machine learning approach using N3C data. The Lancet Digital Health, 4(7), e532 to e541. doi:10.1016/S2589-7500(22)00048-6. Preprint: medRxiv 2021.10.18.21265168.

Originally shared on Facebook.

Query console

Connected to dssoc. Type \h for the commands this console understands.