The function icd_history takes the result of icd_expand, specified for a particular year, and returns a data.frame containing all corresponding codes for the specified years (from 2003). To do this, it applies the ICD-10-GM transition tables to map codes between successive ICD-10-GM versions. Only automatic transitions are followed.

icd_history(icd_expand, years, custom_transitions = NULL)

Arguments

icd_expand

A data.frame (e.g. as generated by the function icd_expand)

years

Years to historize (e.g. 2005:2014)

custom_transitions

(Optional) A data.frame containing custom transitions to complement the official transitions provided by icd_meta_transition.

Value

data.frame with columns YEAR, ICD_CODE, ICD_COMPRESSED, ICD_LABEL and, if specified, DIAG_GROUP