comorbid_pccc_dx.Rd
Unlike with ICD-9 and ICD-10 diagnostic codes, 'icd' doesn't
currently have a method for guessing which fields are procedure
codes, so icd_name
must be specified for the _pcs
functions.
comorbid_pccc_dx(x, visit_name = get_visit_name(x), icd_name = get_icd_name(x), short_code = guess_short(x, icd_name = icd_name), return_df = FALSE, return_binary = FALSE, ...) comorbid_pccc_pcs(x, visit_name = get_visit_name(x), icd_name, return_df = FALSE, return_binary = FALSE, ...) icd9_comorbid_pccc_dx(x, visit_name = NULL, icd_name = NULL, short_code = guess_short(x, icd_name = icd_name), return_df = FALSE, return_binary = FALSE, ..., abbrev_names = TRUE) icd10_comorbid_pccc_dx(x, visit_name = NULL, icd_name = NULL, short_code = guess_short(x, icd_name = icd_name), return_df = FALSE, return_binary = FALSE, ..., abbrev_names = TRUE) icd9_comorbid_pccc_pcs(x, visit_name = get_visit_name(x), icd_name = get_icd_pc_name(x), return_df = FALSE, return_binary = FALSE, ..., abbrev_names = TRUE) icd10_comorbid_pccc_pcs(x, visit_name = get_visit_name(x), icd_name, return_df = FALSE, return_binary = FALSE, ..., abbrev_names = TRUE)
x |
|
---|---|
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 |
icd_name | The name of the column in the |
short_code | single logical value which determines whether the ICD-9
code provided is in short ( |
return_df | single logical value, if |
return_binary | Single logical value, if |
... | Arguments passed through to |
abbrev_names | single logical value that defaults to |
comorbid_pccc_pcs
: Calculate the PCCC comorbidities based
on procedure codes,
icd9_comorbid_pccc_dx
: Calculate PCCC comorbidities from ICD-9
diagnosis codes
icd10_comorbid_pccc_dx
: Calculate PCCC comorbidities from ICD-10
diagnosis codes
icd9_comorbid_pccc_pcs
: Calculate PCCC comorbidities from ICD-9
procedure codes
icd10_comorbid_pccc_pcs
: Calculate PCCC comorbidities from ICD-10
procedure codes
Other comorbidity computations: comorbid_hcc
,
comorbid
Other comorbidities: comorbid_hcc
,
comorbid
, icd10_map_ahrq_pcs
,
icd9_map_ahrq
, icd9_map_elix
,
icd9_map_hcc
, icd9_map_pccc
,
icd9_map_quan_deyo
,
icd9_map_quan_elix
,
icd9_map_single_ccs
#> Neuromusc CVD Respiratory Renal GI HematoImmu Metabolic CongeniGenetic #> 7 FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE #> 10 FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE #> 13 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> 16 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> 37 FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE #> 41 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> Malignancy Neonatal TechDep Transplant #> 7 TRUE FALSE FALSE FALSE #> 10 FALSE FALSE FALSE FALSE #> 13 FALSE FALSE FALSE FALSE #> 16 FALSE FALSE FALSE FALSE #> 37 FALSE FALSE FALSE FALSE #> 41 FALSE FALSE FALSE FALSE# Six random codes from each PCCC procedure code map. 'icd' will use # an heuristic to guess whether ICD-9 or ICD-10: pts <- data.frame( encounters = c(10, 11, 12), icd9_pcs = c("0152", "304", "0050"), icd10_pcs = c("0B110Z4", "02YA0Z2", "031209D") ) comorbid_pccc_pcs(pts, icd_name = "icd9_pcs", return_binary = TRUE)#> Neuromusc CVD Respiratory Renal GI HematoImmu Metabolic CongeniGenetic #> 10 1 0 0 0 0 0 0 0 #> 11 0 0 1 0 0 0 0 0 #> 12 0 1 0 0 0 0 0 0 #> Malignancy Neonatal TechDep Transplant #> 10 0 0 0 0 #> 11 0 0 0 0 #> 12 0 0 1 0comorbid_pccc_pcs(pts, icd_name = "icd10_pcs", return_binary = TRUE)#> Neuromusc CVD Respiratory Renal GI HematoImmu Metabolic CongeniGenetic #> 10 0 0 1 0 0 0 0 0 #> 11 0 1 0 0 0 0 0 0 #> 12 0 0 0 1 0 0 0 0 #> Malignancy Neonatal TechDep Transplant #> 10 0 0 0 0 #> 11 0 0 0 1 #> 12 0 0 1 0# All ICD-9 procedure codes are numeric, some ICD-10 procedure codes # are numeric, so best to call functions directly: pts <- data.frame(encounters = c(100), icd10_pcs = c("0016070")) icd10_comorbid_pccc_pcs(pts, icd_name = "icd10_pcs")#> Neuromusc CVD Respiratory Renal GI HematoImmu Metabolic CongeniGenetic #> 100 TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> Malignancy Neonatal TechDep Transplant #> 100 FALSE FALSE FALSE FALSE