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 comaprison between studies, even though Quan's were more predictive.
1 2 3 4 5 6 7 8 9 10 11 | icd9Charlson(x, visitId = NULL, scoringSystem = c("original", "charlson",
"quan"), return.df = FALSE,
stringsAsFactors = getOption("stringsAsFactors"), ...)
## S3 method for class 'data.frame'
icd9Charlson(x, visitId = NULL,
scoringSystem = c("original", "charlson", "quan"), return.df = FALSE,
stringsAsFactors = getOption("stringsAsFactors"), ...)
icd9CharlsonComorbid(x, visitId = NULL, applyHierarchy = FALSE,
scoringSystem = c("original", "charlson", "quan"))
|
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 |
visitId |
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 |
scoringSystem |
One of |
return.df |
single logical value, if true, a two column data frame will
be returned, with the first column named as in input data frame (i.e.
|
stringsAsFactors |
single logical, passed on when constructing
data.frame if |
... |
further arguments to pass on to |
applyHierarchy |
single logical value, default is FALSE. If TRUE, will drop DM if DMcx is present, etc. |
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 (dx.doi.org/10.1093/aje/kwq433). The comorbidity weights were recalculated using updated discharge data, and some changes, such as Myocardial Infarcation 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
1 2 3 4 5 6 7 | mydf <- data.frame(visitId = c("a", "b", "c"),
icd9 = c("441", "412.93", "044.9"))
cmb <- icd9ComorbidQuanDeyo(mydf, isShort = FALSE, applyHierarchy = TRUE)
cmb
icd9Charlson(mydf, isShort = FALSE)
icd9Charlson(mydf, isShort = FALSE, return.df = TRUE)
icd9CharlsonComorbid(cmb)
|
The icd9 package is now deprecated. The new 'icd' package is on CRAN and has ICD-10 support and bug-fixes. All the functions available in 'icd9' have been preserved in 'icd', but a simpler set of function names is also available.
To install it, use:
install.packages("icd")
# or for the development version:
devtools::install_github("jackwasey/icd")
Then:
remove.packages("icd9")
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
a b c
1 1 6
visitId 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.