icd9VanWalraven(x, visitId = NULL, return.df = FALSE, stringsAsFactors = getOption("stringsAsFactors"), ...)
"icd9VanWalraven"(x, visitId = NULL, return.df = FALSE, stringsAsFactors = getOption("stringsAsFactors"), ...)
icd9VanWalravenComorbid(x, visitId = NULL, applyHierarchy = FALSE)
visitId
is not specified, the first column is used.NULL
, then an
attempt is made to guess which field has the ID for the patient encounter
(not a patient ID, although this can of course be specified directly). The
guesses proceed until a single match is made. Data frames may be wide with
many matching fields, so to avoid false positives, anything but a single
match is rejected. If there are no successful guesses, and visitId
was not specified, then the first column of the data frame is used.visitId
), containing all the visits, and the second column
containing the Charlson Comorbidity Index.return.df
is TRUE
. If the input data frame
x
has a factor for the visitId, this is not changed, but a
non-factor visitId may be converted or not converted according to your
system default or this setting.icd9ComorbidQuanElix
, e.g.
icd9Field
, applyHeirarchy
FALSE
. If
TRUE
, will drop DM if DMcx is present, etc.data.frame
: van Walraven scores from data frame of visits and ICD-9 codes
mydf <- data.frame(visitId = c("a", "b", "c"),
icd9 = c("412.93", "441", "044.9"))
print(
cmb <- icd9ComorbidQuanElix(mydf, isShort = FALSE, applyHierarchy = TRUE, return.df=TRUE)
)
icd9VanWalravenComorbid(cmb)
icd9VanWalraven(mydf)
icd9VanWalraven(mydf, return.df = TRUE)
Run the code above in your browser using DataLab