Lists the available codes inside a block for an ICD-10 release.
Arguments
- token
(
list
) Access token to the API obtained fromget_token()
- block
Character with range of values that conform an ICD-10 code (such as
"I70-I79"
). Note that not all possible ranges are blocks. Seeicd10_blocks()
to list all blocks for a chapter.- release
(
character
) ICD-10 release (default = 2019
). Useicd10_releases()
to get all available releases.- language
(
character
) Language for the request. Available languages are listed in https://icd.who.int/docs/icd-api/SupportedClassifications/ the default is English (language = "en"
).- codes_only
Return only the codes without the titles. This option is faster as it realizes less requests.
Examples
#Assuming that the CLIENT ID and CLIENT SECRET are set up. Substitute accordingly
if (exists("CLIENT_ID") & exists("CLIENT_SECRET")) {
#Generated token
token <- get_token(CLIENT_ID, CLIENT_SECRET)
# Get title and url for release
icd10_codes(token, "I70-I79")
}
#> codes
#> 1 I70
#> 2 I71
#> 3 I72
#> 4 I73
#> 5 I74
#> 6 I77
#> 7 I78
#> 8 I79
#> title
#> 1 Atherosclerosis
#> 2 Aortic aneurysm and dissection
#> 3 Other aneurysm and dissection
#> 4 Other peripheral vascular diseases
#> 5 Arterial embolism and thrombosis
#> 6 Other disorders of arteries and arterioles
#> 7 Diseases of capillaries
#> 8 Disorders of arteries, arterioles and capillaries in diseases classified elsewhere