Description Usage Arguments Details Methods (by class) Examples
Charlson score is calculated in the basis of the Quan revision of Deyo's ICD-9 mapping. (Peptic ulcer disease no longer warrants a point.) Quan published an updated set of scores, but it seems most people use the original scores for easier comparison between studies, even though Quan's were more predictive.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | charlson(
x,
visit_name = NULL,
scoring_system = c("original", "charlson", "quan"),
return_df = FALSE,
stringsAsFactors = getOption("stringsAsFactors"),
...
)
## S3 method for class 'data.frame'
charlson(
x,
visit_name = NULL,
scoring_system = c("original", "charlson", "quan"),
return_df = FALSE,
stringsAsFactors = getOption("stringsAsFactors"),
...
)
|
x |
data frame containing a column of visit or patient identifiers, and
a column of ICD-9 codes. It may have other columns which will be ignored.
By default, the first column is the patient identifier and is not counted.
If |
visit_name |
The name of the column in the data frame which contains the
patient or visit identifier. Typically this is the visit identifier, since
patients come leave and enter hospital with different ICD-9 codes. It is a
character vector of length one. If left empty, or |
scoring_system |
One of |
return_df |
single logical value, if |
stringsAsFactors |
single logical, passed on when constructing
data.frame if |
... |
further arguments to pass on to |
When used, hierarchy is applied per Quan, “The following comorbid conditions were mutually exclusive: diabetes with chronic complications and diabetes without chronic complications; mild liver disease and moderate or severe liver disease; and any malignancy and metastatic solid tumor.” The Quan scoring weights come from the 2011 paper. The comorbidity weights were recalculated using updated discharge data, and some changes, such as Myocardial Infarction decreasing from 1 to 0, may reflect improved outcomes due to advances in treatment since the original weights were determined in 1984.
data.frame
: Charlson scores from data frame of visits and ICD-9
codes. ICD-10 Charlson can be calculated simply by getting the Charlson
(e.g. Quan Deyo) comorbidities, then calling
charlson_from_comorbid
.
1 2 3 4 5 6 7 8 9 10 | mydf <- data.frame(
visit_name = c("a", "b", "c"),
icd9 = c("441", "412.93", "042")
)
charlson(mydf)
cmb <- icd9_comorbid_quan_deyo(mydf)
cmb
# can specify short_code directly instead of guessing
charlson(mydf, short_code = FALSE, return_df = TRUE)
charlson_from_comorbid(cmb)
|
The 'icd9' package is deprecated, and should be removed to avoid conflicts with 'icd' . The 'icd' package up to version 2.1 contains tested versions of all the deprecated function names which overlap with those in the old 'icd9' package, e.g., 'icd9ComorbidAhrq' '. It is highly recommended to run the command: 'remove.packages("icd9")'
a b c
1 1 6
MI CHF PVD Stroke Dementia Pulmonary Rheumatic PUD LiverMild DM
a FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
b TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
c FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
DMcx Paralysis Renal Cancer LiverSevere Mets HIV
a FALSE FALSE FALSE FALSE FALSE FALSE FALSE
b FALSE FALSE FALSE FALSE FALSE FALSE FALSE
c FALSE FALSE FALSE FALSE FALSE FALSE TRUE
visit_name Charlson
1 a 1
2 b 1
3 c 6
a b c
1 1 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.