A utility function to query the icd_meta_transition table.
Arguments
- years
Year or years to get (numeric or character vector)
- icd3
(optional) ICD codes to select (regular expression, matched exactly using grep)
Details
Returns a data frame with ICD transition history, consisting of year, ICD code and label. Optional arguments allow selection of entries by year or ICD code. This is beneficial because the entire history is relatively large and rarely required in full.
Examples
get_icd_history(years = 2009:2010, icd3 = "K52")
#> year_from year_to icd_from icd_to automatic_forward automatic_backward
#> 70767 2009 2010 K52.0 K52.0 A A
#> 70768 2009 2010 K52.1 K52.1 A A
#> 70769 2009 2010 K52.2 K52.2 A A
#> 70770 2009 2010 K52.8 K52.30 A
#> 70771 2009 2010 K52.8 K52.31 A
#> 70772 2009 2010 K52.8 K52.32 A
#> 70773 2009 2010 K52.8 K52.38 A
#> 70774 2009 2010 K52.8 K52.8 A
#> 70775 2009 2010 K52.9 A09.9
#> 70776 2009 2010 K52.9 K52.9 A
#> 84223 2010 2011 K52.0 K52.0 A A
#> 84224 2010 2011 K52.1 K52.1 A A
#> 84225 2010 2011 K52.2 K52.2 A A
#> 84226 2010 2011 K52.30 K52.30 A A
#> 84227 2010 2011 K52.31 K52.31 A A
#> 84228 2010 2011 K52.32 K52.32 A A
#> 84229 2010 2011 K52.38 K52.38 A A
#> 84230 2010 2011 K52.8 K52.8 A A
#> 84231 2010 2011 K52.9 K52.9 A A
#> change_5 change_4 change_3 change icd3 icd_kapitel
#> 70767 FALSE TRUE FALSE FALSE K52 K
#> 70768 FALSE TRUE FALSE FALSE K52 K
#> 70769 FALSE TRUE FALSE FALSE K52 K
#> 70770 FALSE TRUE FALSE TRUE K52 K
#> 70771 FALSE TRUE FALSE TRUE K52 K
#> 70772 FALSE TRUE FALSE TRUE K52 K
#> 70773 FALSE TRUE FALSE TRUE K52 K
#> 70774 FALSE TRUE FALSE FALSE K52 K
#> 70775 FALSE FALSE TRUE TRUE A09 A
#> 70776 FALSE TRUE FALSE FALSE K52 K
#> 84223 FALSE TRUE FALSE FALSE K52 K
#> 84224 FALSE TRUE FALSE FALSE K52 K
#> 84225 FALSE TRUE FALSE FALSE K52 K
#> 84226 FALSE TRUE FALSE FALSE K52 K
#> 84227 FALSE TRUE FALSE FALSE K52 K
#> 84228 FALSE TRUE FALSE FALSE K52 K
#> 84229 FALSE TRUE FALSE FALSE K52 K
#> 84230 FALSE TRUE FALSE FALSE K52 K
#> 84231 FALSE TRUE FALSE FALSE K52 K