get_icd_labels: Get or query ICD-10 labels

Description Usage Arguments Details Value Examples

View source: R/data.R

Description

A utility function to get or query icd_meta_codes, returning a limited selection of ICD-10 codes and labels.

Usage

1
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

Details

If an ICD code is provided as argument icd3, all corresponding codes and subcodes are returned. If a search term is provided, all codes are returned whose label matches the string approximately.

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.

Value

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

Examples

1
2
get_icd_labels(year = 2019, icd3 = "I25")
get_icd_labels(year = 2019, search = "Asthma")

edonnachie/ICD documentation built on Dec. 10, 2019, 11:35 a.m.