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

Stability of diagnostic coding of psychiatric outpatient visits across the transition from the second to the third version of the Danish National Patient Registry

Martin Bernstorff, Lasse Hansen, Erik Perfalk, Andreas Aalkjær Danielsen, Søren Dinesen ØstergaardmedRxiv 2022

TL;DR

When Denmark updated its National Patient Registry (DNPR) in 2019, it fundamentally changed how outpatient psychiatric visits are recorded—moving from a single diagnosis per treatment course to a diagnosis for every individual visit. This study confirms that while this administrative shift caused minor statistical ripples, it did not break the long-term continuity of diagnostic data, ensuring that a decade's worth of psychiatric research remains valid.

What Problem Does This Paper Address?

For epidemiologists and psychiatric researchers, the Danish National Patient Registry (DNPR) is a gold mine of longitudinal data. However, in early 2019, the system underwent a major "version update" from DNPR2 to DNPR3.

The technical change was significant:

  • DNPR2 (Old): A "final" diagnosis was assigned to an entire treatment course, retroactively "overwriting" any preliminary labels for previous visits.
  • DNPR3 (New): Each visit is coded independently based on the clinical information available at that moment.

The fear was that this shift would create a "break" in the time-series data. If patients were suddenly assigned a broader range of diagnoses across multiple visits, it might look like a spike in disease incidence that wasn't actually there. Researchers needed to know: Can we safely conduct studies that span both the DNPR2 and DNPR3 eras?

Methods

The researchers analyzed data from over 100,000 outpatients in the Central Denmark Region between 2013 and 2021. They focused on the stability of ICD-10 "subchapters" (the broad categories like F2 for psychotic disorders or F3 for mood disorders).

To test the data's resilience, they:

  1. Compared the mean proportions of diagnoses before and after the transition.
  2. Tested "mitigation strategies"—mathematical attempts to make DNPR3 data look like DNPR2 data (e.g., by only counting the "most severe" or the "final" diagnosis in a sequence of visits).
  3. Used inpatient admissions as a "negative control," since their coding rules didn't change.

Datasets

The study utilized a massive dataset from the Business Intelligence Office in the Central Denmark Region, which mirrors the data sent to the national registry.

  • Scope: 100,501 unique patients.
  • Volume: 2,331,427 outpatient visits.
  • Timeline: January 1, 2013, to June 1, 2021 (capturing several years on either side of the 2019 transition).

Key Insights and Ideas

  • High Internal Consistency: Despite the freedom to change codes every visit in DNPR3, clinicians are remarkably consistent. In more than 90% of outpatient treatment courses, the diagnosis at the first visit matched the diagnosis at the last visit.
  • "Fixing" the Data Made it Worse: One of the most surprising findings was that the "mitigation strategies" actually introduced more instability. Trying to force DNPR3 data into the old DNPR2 format (by picking one "representative" diagnosis) created larger breaks in the time-series than simply using the raw, unmanipulated data.
  • The COVID-19 Factor: The researchers noted increased variability in the DNPR3 era. However, because this coincided with the COVID-19 pandemic—which disrupted healthcare patterns and patient symptoms—it’s difficult to untangle whether the variability stems from the new coding system or the global health crisis.

Key Results

  • Negligible Absolute Changes: While some shifts were statistically significant due to the massive sample size, they were tiny in practice. For example, the proportion of psychotic disorder (F2) diagnoses changed by only +0.9%, and mood disorders (F3) by a mere +0.1%.
  • Stable Incidence: The transition did not induce a marked destabilization in the number of diagnoses received by each patient.
  • Registry Validity: The authors conclude that the change is unlikely to pose a threat to the validity of psychiatric research conducted at the diagnostic subchapter level.

Limitations and Future Work

  • Regional vs. National: The data came strictly from the Central Denmark Region. While coding standards are national, regional variations in clinical culture could exist.
  • Granularity: This study looked at broad categories (subchapters). The authors warn that their findings might not generalize to very specific, granular diagnoses (e.g., specific four-digit ICD-10 codes).
  • Future Research: Research groups focusing on highly specific disorders should still perform their own "sanity checks" on the DNPR2-DNPR3 transition for their specific variables of interest.

Summary updated

BibTeX
@misc{bernstorff2022stability,
  author = {Martin Bernstorff and Lasse Hansen and Erik Perfalk and Andreas Aalkjær Danielsen and Søren Dinesen Østergaard},
  title = {{Stability of diagnostic coding of psychiatric outpatient visits across the transition from the second to the third version of the Danish National Patient Registry}},
  year = {2022},
  doi = {10.1101/2022.03.03.22271695},
  howpublished = {medRxiv},
}

Loading related content...

Figure