medicalcoder: a unified and longitudinally aware framework for International Classification of Diseases code-based comorbidity assessment in R.
Peter E DeWitt, Seth Russell, James A Feinstein, Margaret N Rebull, Tellen D Bennett
Department of Biomedical Informatics, University of Colorado School of Medicine, University of Colorado Anschutz Medical Campus, Aurora, CO 80045, United States. · Adult and Child Center for Outcomes Research and Delivery Science, University of Colorado Anschutz Medical Campus, Aurora, CO 80045, United States.
Key points
From the paper's conclusion- medicalcoder provides a unified, reproducible framework for ICD-based comorbidity assessment in modern clinical datasets.
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 the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A semantic-based carry-forward approach: Uncovering chronic disease burden in real-world data analysis.International journal of medical informatics · 2026
- Release-aware, SAS-equivalent Elixhauser comorbidity scoring in R: cross-implementation validation and application to Texas inpatient discharges.medRxiv : the preprint server for health sciences · 2026
- Estimating the Charlson Comorbidity Index From Privacy-Truncated Diagnosis Codes: Single-Center Retrospective Cohort Study Evaluating Five Computational Strategies in 507,949 Inpatient Encounters.JMIR medical informatics · 2026
- Developing Country-Specific Charlson Comorbidity Index Mappings for Use with German Administrative Data: Methodological Comparative Study.JMIR medical informatics · 2026
- Adjudicating evolving inpatient diagnoses with a clinical coding agent: a retrospective multicentre studymedRxiv · 2026
- CohortCharacteristics: an R package for population characterisation in observational studies using the OMOP common data modelEuropean Journal of Epidemiology · 2026