multimorbidity: Calculate multimorbidity domains

Description Usage Arguments Value References Examples

View source: R/multimorbidity.R

Description

Calculate 30 morbidity domains corresponding to chronic conditions, according to the definition of Tonelli et al. (see reference below).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
multimorbidity(
  data_hospitalisations,
  data_claims,
  data_drugs,
  id,
  code,
  date,
  index_date,
  atc,
  npacks,
  combine_cirrhosis = TRUE
)

Arguments

data_hospitalisations

Dataset used for data input, containing hospitalisation codes (see the algorithm in the paper by Tonelli et al.). Must be in long format and contain a column with subject IDs, ICD-10 codes, dates at which each code was recorded, and an index date at which the conditions are calculated.

data_claims

Dataset used for data input, containing inpatient and outpatient codes (see the algorithm in the paper by Tonelli et al.). Must be in long format and contain a column with subject IDs, ICD-10 codes, dates at which each code was recorded, and an index date at which the conditions are calculated.

data_drugs

Dataset used for data input, containing drugs purchases. This expands the algorithm by Tonelli et al., and must be in long format and including a column with subject IDs, ATC codes, dates at which each drug was purchased, how many packages of such drugs were purchased, and an index date at which the conditions are calculated.

id

Name of the column identifying subject IDs in every data_* dataset.

code

Name of the column identifying ICD-10 codes in data_hospitalisations and data_claims.

date

Name of the column identifying dates at which codes are recorded or drugs purchased in every data_* input dataset.

index_date

Name of the column identifying index date in every data_* input dataset.

atc

Name of the column identifying ATC codes in the data_drugs input dataset.

npacks

Name of the column identifying the number of purchased drug packages in the data_drugs input dataset.

combine_cirrhosis

Cirrhosis is defined as the concurrent presence of (at least) two codes, if combine_cirrhosis = TRUE (the default) then a single column (combination of the two) is returned. If not, two columns are returned.

Value

A dataset with a row per individual and a column per condition.

References

Tonelli, M., Wiebe, N., Fortin, M. et al. Methods for identifying 30 chronic conditions: application to administrative data. BMC Med Inform Decis Mak 15, 31 (2016). doi: 10.1186/s12911-015-0155-5.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data("icd10", package = "SCREAM")
data("drug", package = "SCREAM")
multimorbidity(
  data_hospitalisations = icd10$hospitalisations,
  data_claims = icd10$claims,
  data_drugs = drug,
  id = "id",
  code = "code",
  date = "date",
  index_date = "index_date",
  atc = "atc",
  npacks = "npacks"
)

ellessenne/SCREAM documentation built on Dec. 20, 2021, 4:19 a.m.