Usage
icd9Comorbidities(icd9df, visitId = "visitId", icd9Field = "icd9",
icd9Mapping = ahrqComorbid, validateMapping = F, shortMapping = T)icd9ComorbiditiesNotPoa(icd9df, icd9Mapping, visitId = "visitId",
icd9Field = "icd9Code", poaField = "poa")
icd9ComorbiditiesPoa(icd9df, icd9Mapping, visitId = "visitId",
icd9Field = "icd9Code", poaField = "poa")
Arguments
icd9df
data.frame with fields specified by visitId and icd9Code.
icd9Code is assumed to be a non-decimal 'short' form ICD9 code. There is a
many to many ratio of icd9:visitId. This table contains multiple visitId
rows, with one row per ICD-9 code. Therefore, eve
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. Defaults to "
icd9Field
The column in the data frame which contains the ICD-9 codes.
This is a character vector of length one.
icd9Mapping
list (or name of a list if character vector of length one
is given as argument) of the comorbidities with each top-level list item
containing a vector of decimal ICD9 codes. This is in the form of a list,
with the names of the items corresponding to the c
validateMapping
logical, whether to validate all the ICD-9 codes in
the mapping list. Default is not to check. If validation fails, stop with
an error. This is probably worth doing at least once for each mapping used,
since there should never be an error in mapping. Ther
shortMapping
logical, whether the mapping is defined with short ICD-9
codes (TRUE, the default), or decimal if set to FALSE.
poaField
The name of column in the data frame which contains the
Present On Arrival flag. The flag itself is a single character, typically
one of "Y", "N", "E", "X", "U" or empty. The poaField is a character vector
of length one.