Skip to contents

Returns the residual from a URI

Usage

icd11_residual(
  token,
  id,
  residual = "",
  linearization = "mms",
  release = "2024-01",
  include = NULL,
  language = "en",
  auto_update = TRUE
)

icd11_residual2(
  token,
  id,
  residual = "",
  linearization = "mms",
  include = NULL,
  language = "en",
  auto_update = TRUE
)

Arguments

token

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

id

(stirng) String either with a complete URI of the last digits of the URI

residual

For residual categories: - this could be 'other' for other specified residual category - or 'unspecified' for the unspecified residual category

linearization

(character) ICD-11 linearization (default = "mms"). See all linearizations in the WHO's API website https://icd.who.int/docs/icd-api/APIDoc-Version2/#the-icd11-linearizations

release

Release version as listed in https://icd.who.int/docs/icd-api/SupportedClassifications/#supported-classifications-and-versions the default is 2024-01.

include

Either NULL of provide additional information such as ancestor, decendant or diagnosticCriteria. For example, if you set include="ancestor" the returned response will include all ancestor entity URIs for the requested entity. Use a vector to include multiple properties. For example include = c("ancestor", "diagnosticCriteria")

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").

auto_update

Attempts to update token automatically

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)

  # Search for ICD-11 URI across multiple releases
  icd11_residual(token, id = "1442995018")

}
#> $`@context`
#> [1] "http://id.who.int/icd/contexts/contextForLinearizationEntity.json"
#> 
#> $`@id`
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/1442995018"
#> 
#> $parent
#> $parent[[1]]
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/843843448"
#> 
#> 
#> $browserUrl
#> [1] "https://icd.who.int/browse/2024-01/mms/en#1442995018"
#> 
#> $code
#> [1] "8B20"
#> 
#> $source
#> [1] "http://id.who.int/icd/entity/1442995018"
#> 
#> $classKind
#> [1] "category"
#> 
#> $postcoordinationScale
#> $postcoordinationScale[[1]]
#> $postcoordinationScale[[1]]$`@id`
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/1442995018/postcoordinationScale/laterality"
#> 
#> $postcoordinationScale[[1]]$axisName
#> [1] "http://id.who.int/icd/schema/laterality"
#> 
#> $postcoordinationScale[[1]]$requiredPostcoordination
#> [1] "false"
#> 
#> $postcoordinationScale[[1]]$allowMultipleValues
#> [1] "NotAllowed"
#> 
#> $postcoordinationScale[[1]]$scaleEntity
#> $postcoordinationScale[[1]]$scaleEntity[[1]]
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/627678743"
#> 
#> $postcoordinationScale[[1]]$scaleEntity[[2]]
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/271422288"
#> 
#> $postcoordinationScale[[1]]$scaleEntity[[3]]
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/876572005"
#> 
#> $postcoordinationScale[[1]]$scaleEntity[[4]]
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/1038788978"
#> 
#> 
#> 
#> $postcoordinationScale[[2]]
#> $postcoordinationScale[[2]]$`@id`
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/1442995018/postcoordinationScale/hasManifestation"
#> 
#> $postcoordinationScale[[2]]$axisName
#> [1] "http://id.who.int/icd/schema/hasManifestation"
#> 
#> $postcoordinationScale[[2]]$requiredPostcoordination
#> [1] "false"
#> 
#> $postcoordinationScale[[2]]$allowMultipleValues
#> [1] "AllowAlways"
#> 
#> $postcoordinationScale[[2]]$scaleEntity
#> $postcoordinationScale[[2]]$scaleEntity[[1]]
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/1173205716"
#> 
#> 
#> 
#> 
#> $title
#> $title$`@language`
#> [1] "en"
#> 
#> $title$`@value`
#> [1] "Stroke not known if ischaemic or haemorrhagic"
#> 
#> 
#> $definition
#> $definition$`@language`
#> [1] "en"
#> 
#> $definition$`@value`
#> [1] "Fulfills criteria for stroke in acute symptoms of focal brain injury that have lasted 24 hours or more (or led to death before 24 hours), but subtype of stroke (ischemic or haemorrhagic) has not been determined by neuroimaging or other techniques."
#> 
#> 
#> $exclusion
#> $exclusion[[1]]
#> $exclusion[[1]]$label
#> $exclusion[[1]]$label$`@language`
#> [1] "en"
#> 
#> $exclusion[[1]]$label$`@value`
#> [1] "sequelae of stroke"
#> 
#> 
#> $exclusion[[1]]$foundationReference
#> [1] "http://id.who.int/icd/entity/557175275"
#> 
#> $exclusion[[1]]$linearizationReference
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/557175275"
#> 
#> 
#> 
#> $relatedEntitiesInMaternalChapter
#> $relatedEntitiesInMaternalChapter[[1]]
#> [1] "http://id.who.int/icd/entity/564191997"
#> 
#> 
#> $indexTerm
#> $indexTerm[[1]]
#> $indexTerm[[1]]$label
#> $indexTerm[[1]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[1]]$label$`@value`
#> [1] "Stroke not known if ischaemic or haemorrhagic"
#> 
#> 
#> 
#> $indexTerm[[2]]
#> $indexTerm[[2]]$label
#> $indexTerm[[2]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[2]]$label$`@value`
#> [1] "apoplexy"
#> 
#> 
#> 
#> $indexTerm[[3]]
#> $indexTerm[[3]]$label
#> $indexTerm[[3]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[3]]$label$`@value`
#> [1] "brain vascular accident"
#> 
#> 
#> 
#> $indexTerm[[4]]
#> $indexTerm[[4]]$label
#> $indexTerm[[4]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[4]]$label$`@value`
#> [1] "cerebral accident"
#> 
#> 
#> 
#> $indexTerm[[5]]
#> $indexTerm[[5]]$label
#> $indexTerm[[5]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[5]]$label$`@value`
#> [1] "cerebral apoplexy"
#> 
#> 
#> 
#> $indexTerm[[6]]
#> $indexTerm[[6]]$label
#> $indexTerm[[6]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[6]]$label$`@value`
#> [1] "cerebrovascular accident"
#> 
#> 
#> 
#> $indexTerm[[7]]
#> $indexTerm[[7]]$label
#> $indexTerm[[7]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[7]]$label$`@value`
#> [1] "stroke"
#> 
#> 
#> 
#> $indexTerm[[8]]
#> $indexTerm[[8]]$label
#> $indexTerm[[8]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[8]]$label$`@value`
#> [1] "stroke syndrome"
#> 
#> 
#> 
#> $indexTerm[[9]]
#> $indexTerm[[9]]$label
#> $indexTerm[[9]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[9]]$label$`@value`
#> [1] "stroke, not specified as haemorrhage or infarction"
#> 
#> 
#> 
#> $indexTerm[[10]]
#> $indexTerm[[10]]$label
#> $indexTerm[[10]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[10]]$label$`@value`
#> [1] "CVA - [cerebrovascular accident]"
#> 
#> 
#> 
#> $indexTerm[[11]]
#> $indexTerm[[11]]$label
#> $indexTerm[[11]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[11]]$label$`@value`
#> [1] "cerebral vascular accident"
#> 
#> 
#> 
#> $indexTerm[[12]]
#> $indexTerm[[12]]$label
#> $indexTerm[[12]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[12]]$label$`@value`
#> [1] "stroke NOS"
#> 
#> 
#> 
#> $indexTerm[[13]]
#> $indexTerm[[13]]$label
#> $indexTerm[[13]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[13]]$label$`@value`
#> [1] "cerebrovascular incident"
#> 
#> 
#> 
#> $indexTerm[[14]]
#> $indexTerm[[14]]$label
#> $indexTerm[[14]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[14]]$label$`@value`
#> [1] "acute cerebrovascular accident"
#> 
#> 
#> 
#> $indexTerm[[15]]
#> $indexTerm[[15]]$label
#> $indexTerm[[15]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[15]]$label$`@value`
#> [1] "cerebrovascular event"
#> 
#> 
#> 
#> $indexTerm[[16]]
#> $indexTerm[[16]]$label
#> $indexTerm[[16]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[16]]$label$`@value`
#> [1] "massive cerebral vascular accident"
#> 
#> 
#> 
#> $indexTerm[[17]]
#> $indexTerm[[17]]$label
#> $indexTerm[[17]]$label$`@language`
#> [1] "en"
#> 
#> $indexTerm[[17]]$label$`@value`
#> [1] "massive cerebrovascular accident"
#> 
#> 
#> 
#> 
# 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)

  # Search for ICD-11 URI across multiple releases
  icd11_residual2(token, id = "1442995018")

}
#> $`@context`
#> [1] "http://id.who.int/icd/contexts/contextForMultiVersion.json"
#> 
#> $`@id`
#> [1] "http://id.who.int/icd/release/11/mms/1442995018"
#> 
#> $title
#> $title$`@language`
#> [1] "en"
#> 
#> $title$`@value`
#> [1] "Stroke not known if ischaemic or haemorrhagic"
#> 
#> 
#> $latestRelease
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/1442995018"
#> 
#> $release
#> $release[[1]]
#> [1] "http://id.who.int/icd/release/11/2024-01/mms/1442995018"
#> 
#> $release[[2]]
#> [1] "http://id.who.int/icd/release/11/2023-01/mms/1442995018"
#> 
#> $release[[3]]
#> [1] "http://id.who.int/icd/release/11/2022-02/mms/1442995018"
#> 
#> $release[[4]]
#> [1] "http://id.who.int/icd/release/11/2021-05/mms/1442995018"
#> 
#> $release[[5]]
#> [1] "http://id.who.int/icd/release/11/2020-09/mms/1442995018"
#> 
#> $release[[6]]
#> [1] "http://id.who.int/icd/release/11/2019-04/mms/1442995018"
#> 
#> $release[[7]]
#> [1] "http://id.who.int/icd/release/11/2018/mms/1442995018"
#> 
#>