Calculation of Comorbidity and Frailty Scores

Computes comorbidity indices and combined frailty scores for multiple ICD coding systems, including ICD-10-CA, ICD-10-CM, and ICD-11. The package provides tools to preprocess episode data, map diagnosis codes to chronic categories, propagate conditions across episodes, and generate comorbidity and frailty measures. The methodology is described in Nikiema, Bayani, and Bally (2026), "A Semantic-Based Carry-Forward Approach: Uncovering Chronic Disease Burden in Real-World Data Analysis", International Journal of Medical Informatics, article 106709 .


LABTNSCPSS

LABTNSCPSS is an R package that implements a reproducible pipeline to process episode-level clinical data and compute chronic pathology, frailty, and comorbidity indices from diagnosis codes.

The package computes:

  • Charlson Comorbidity Index (CCI)
  • Elixhauser Comorbidity Index (ECI)
  • Combined Comorbidity Index
  • Frailty Index
  • Morbidity-Frailty Index

from episode-level clinical data. URL of the paper: https://doi.org/10.1016/j.ijmedinf.2026.106709

Installation

Install from CRAN:

install.packages("LABTNSCPSS")

Load the package:

library(LABTNSCPSS)

##Quick Start Example

The example below uses the sample dataset included in the package.


tarball <- "./CRAN/LABTNSCPSS_1.0.4.tar.gz"

install.packages(
  tarball,
  repos = NULL,
  type = "source"
)
library(LABTNSCPSS)
packageVersion("LABTNSCPSS")
args(LABTNSCPSS::run_pipeline)

# Load example dataset included in the package

input_file <- system.file(
  "extdata",
  "testpackage.csv",
  package = "LABTNSCPSS"
)

if (input_file == "") {
  stop("The example file was not found in the installed package.")
}

col_mapping <- list(
  patient_id = "trajectoire_id",
  ICD = "diagnostic_code",
  start_date = "date_debut",
  end_date = "date_fin",
  episode_id = "episode_id"
)

out_dir <- tempdir()

# To use a different system, simply change the coding_system from here; possible values ("ICD-10-CA", "ICD-10-CM", "ICD-11"):
results <- LABTNSCPSS::run_pipeline(
  input_file = input_file,
  col_mapping = col_mapping,
  coding_system = "ICD-10-CA",
  out_dir = out_dir
)

results

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("LABTNSCPSS")

1.0.5 by Azadeh Bayani, a month ago


https://github.com/bayaniazadeh/LabTNSCPSSPackage, https://doi.org/10.1016/j.ijmedinf.2026.106709


Report a bug at https://github.com/bayaniazadeh/LabTNSCPSSPackage/issues


Browse source code at https://github.com/cran/LABTNSCPSS


Authors: Azadeh Bayani [aut, cre] (ORCID: , Jean Noel Nikiema [ctb] , Michèle Bally [ctb]


Documentation:   PDF Manual  


GPL-3 license


Imports checkmate, data.table, dplyr, glue, lubridate, magrittr, purrr, stringi, tibble, tidyr, tidyselect

Suggests testthat


See at CRAN