Skip to content
Open access

medicalcoder: a unified and longitudinally aware framework for International Classification of Diseases code-based comorbidity assessment in R

Sep 2026 · JAMIA Open · Vol 9 · 0 citations · 29 references
Medicine

TL;DR

The developed medicalcoder package provides a unified, reproducible framework for ICD-based comorbidity assessment in modern clinical datasets.

Abstract

Abstract Objectives Comorbidity algorithms derived from International Classification of Diseases (ICD) codes are central to risk adjustment and cohort characterization, but existing software inconsistently handles mixed ICD-9/10 data and typically operates at the encounter level. We developed medicalcoder to address these limitations. Materials and Methods medicalcoder is an R package with an internal ICD database and unified interface for applying variants of the Charlson, Elixhauser, and Pediatric Complex Chronic Conditions (PCCC) algorithms. It supports full and compact ICD codes, mixed ICD versions, present-on-admission (POA) and primary diagnosis indicators, and encounter-level and cumulative longitudinal flagging. Results The medicalcoder package requires only R ≥ 3.5.0; no additional packages, internet access, or external data are required. Outputs are consistent with published reference implementations. Longitudinal flagging identifies additional comorbidity flags under a carry-forward assumption while accounting for POA or technology-dependent logic. Conclusions medicalcoder provides a unified, reproducible framework for ICD-based comorbidity assessment in modern clinical datasets.

Read PDF

Similar papers

Open access Oct 2026

Release-aware, SAS-equivalent Elixhauser comorbidity scoring in R: cross-implementation validation and application to Texas inpatient discharges

The Elixhauser comorbidity measures are among the most widely used risk adjusters in administrative health data. Their reference implementation, published by the Agency for Healthcare Research and Quality (AHRQ) as SAS programs, has eleven annual releases in two families, one screening pre-existing conditions on the pr...

M. Tran, D. Pei · 0 citations
Review Open access Sep 2026

Adjudicating evolving inpatient diagnoses with a clinical coding agent: a retrospective multicentre study

Clinico is developed and evaluated, a coding agent that organises evidence by time and clinical relationships to adjudicate diagnoses and update their status during admission and had the highest observed estimates of principal-diagnosis agreement and complete code-set micro-F1 among evaluated methods.

Y. Li, Y. Shi, Y. Sun et al. · 0 citations
Review Open access Sep 2026

Beyond ICD Codes: Fine-Tuning LLMs for In-Hospital Cardiac Arrest Identification from EHR Notes

Background: Identification of in-hospital cardiac arrest (IHCA) through manual chart abstraction is the gold standard, but its time-consuming and resource-intensive, which naturally limits its practicality. Diagnostic codes provide an accessible automated alternative, but prior work has shown this method of extraction...

D. Weissenbacher, J. Vo, A. Uy-Evanado et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.