Learn R Programming

icd (version 4.0.9)

expand_range.icd10cm: Expand range of ICD-10 codes returning only defined codes in ICD-10-CM

Description

This will need generalizing to any list of officially defined codes, e.g. WHO or other. There are so many permutations of alphanumeric characters after the decimal place that it would be easy to generate many millions with simple ranges, the vast majority of which would be undefined.

Usage

# S3 method for icd10cm
expand_range(start, end, short_code = guess_short(c(start, end)), defined, ...)

Arguments

start

character vector of length one containing an ICD code

end

character vector of length one containing an ICD code