Skip to contents

Lists the available sections inside a chapter for an ICD-10 release.

Usage

icd10_blocks(
  token,
  chapter,
  release = 2019,
  language = "en",
  codes_only = FALSE
)

Arguments

token

(list) Access token to the API obtained from get_token()

chapter

Roman numeral indicating the chapter of interest to obtain the blocks from.

release

(character) ICD-10 release (default = 2019). Use icd10_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.

Value

Data frame with all the blocks inside a chapter and their description

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_blocks(token, chapter = "IX", release = 2016)
}
#>      codes
#> 1  I00-I02
#> 2  I05-I09
#> 3  I10-I15
#> 4  I20-I25
#> 5  I26-I28
#> 6  I30-I52
#> 7  I60-I69
#> 8  I70-I79
#> 9  I80-I89
#> 10 I95-I99
#>                                                                             title
#> 1                                                           Acute rheumatic fever
#> 2                                                Chronic rheumatic heart diseases
#> 3                                                           Hypertensive diseases
#> 4                                                        Ischaemic heart diseases
#> 5                   Pulmonary heart disease and diseases of pulmonary circulation
#> 6                                                    Other forms of heart disease
#> 7                                                        Cerebrovascular diseases
#> 8                                Diseases of arteries, arterioles and capillaries
#> 9  Diseases of veins, lymphatic vessels and lymph nodes, not elsewhere classified
#> 10                      Other and unspecified disorders of the circulatory system