Description Usage Arguments Examples
View source: R/icd_indicators.R
This function adds indicator (0,1) variables to emergency department or inpatient hospitalization claims data. Similar to cste_indicators, but in this case the user defines the ICD-10-CM codes to search.
1 2 3 4 5 | icd_indicators(data, icd_codes, new_var_names,
diag_codes=c("DIAG1", "DIAG2", "DIAG3", "DIAG4", "DIAG5", "DIAG6", "DIAG7", "DIAG8",
"DIAG9", "DIAG10", "DIAG11", "DIAG12", "DIAG13", "DIAG14", "DIAG15", "DIAG16",
"DIAG17", "DIAG18", "DIAG19", "DIAG20", "DIAG21", "DIAG22", "DIAG23", "DIAG24",
"DIAG25", "ECODE1", "ECODE2", "ECODE3","ECODE4", "ECODE5", "ECODE6"))
|
data |
The dataframe containing claims data. |
icd_codes |
A vector of quoted ICD-10 codes to search. These can be individual codes or regular expressions. |
new_var_names |
A vector of quoted strings representing the names of the new variables to be created. |
diag_codes |
A vector of quoted variable names representing the diagnosis codes in the data. Default is KIPRC's field names. |
1 | icd_indicators(ipdata, icd_codes=c("(T401.[1-4])(A|$|\b)", "(T405.[1-4])(A|$|\b)"), new_var_names=c("heroin", "cocaine"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.