Returns a data frame with ICD metadata, consisting of year, ICD code and label. Optional arguments allow selection of entries by year, code or label. This is beneficial because the entire history is relatively large and rarely required in full.

get_icd_labels(year = NULL, icd3 = NULL, search = NULL, ...)

Arguments

year

Year or years to get (numeric or character vector)

icd3

A character vector of three-digit ICD-10 codes to select

search

(optional) A string to search for in the label column using fuzzy matching (agrep)

...

(optional) Further arguments passed to agrep when searching with icd_label

Value

data.frame(year, icd3, icd_code, icd_normcode, icd_sub, label), see icd_labels