Skip to contents

Return the Shortest ICD-10 Codes that Match a Regex Pattern. Requires an internet connection.

Usage

icd_finder(disease_pattern, maximum_number_results = 10L, ...)

Arguments

disease_pattern

Regex pattern describing a disease.

maximum_number_results

Integer giving the maximum number of ICD codes to return, with preference given to shorter codes.

...

Arguments to pass on to grepl. It is recommended to set ignore.case = TRUE and often perl = TRUE.

Examples

icd_finder("chick")  ## Struc by chicken!!
#>    code                description
#> 1   B01     Varicella [chickenpox]
#> 2  W613       Contact with chicken
#> 3 W6132          Struck by chicken
#> 4 W6133          Pecked by chicken
#> 5 W6139 Other contact with chicken