get_icd_labels: Get or query ICD-10 labels

View source: R/data.R

get_icd_labelsR Documentation

Get or query ICD-10 labels

Description

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

Usage

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

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

ICD10gm documentation built on March 7, 2023, 7:03 p.m.