A wrapper function for api_concepts
searching for a
term or a list of concepts
concept_find(
term = NULL,
conceptIds = NULL,
ecl = NULL,
activeFilter = TRUE,
encoding = "UTF-8",
silent = FALSE,
limit = snomedizer_options_get("limit"),
...
)
a string containing search terms
a character vector of one or more SNOMED CT codes to search
a character expression constraint query (with full inference). Consult the Expression Constraint Language guide for more detail.
whether to restrict results to active concepts. Default is `TRUE`. Consult the SNOMED glossary for more detail.
HTTP charset parameter to use (default is "UTF-8"
)
whether to hide progress bar. Default is FALSE
a positive integer for the maximum number of results to return.
See snomedizer_options
. The maximum limit on public endpoints
is 10,000.
other optional arguments listed in api_operations
, such as
endpoint
, branch
or limit
a data frame
In order to use SNOMED CT, a licence is required which depends both on the country you are based in, and the purpose of your work. See details on snomedizer.
Other wrapper:
concept_ancestors()
,
concept_descriptions()
,
release_version()
# Free text search
str(concept_find("asthma"))
#> Warning:
#> This server request returned just 50 of a total 246 results.
#> Please increase the server `limit` to fetch all results.
#> 'data.frame': 50 obs. of 16 variables:
#> $ conceptId : chr "195967001" "160377001" "56968009" "406162001" ...
#> $ active : logi TRUE TRUE TRUE TRUE TRUE TRUE ...
#> $ definitionStatus: chr "PRIMITIVE" "FULLY_DEFINED" "FULLY_DEFINED" "PRIMITIVE" ...
#> $ moduleId : chr "900000000000207008" "900000000000207008" "900000000000207008" "900000000000207008" ...
#> $ effectiveTime : chr "20040731" "20040731" "20020731" "20040131" ...
#> $ id : chr "195967001" "160377001" "56968009" "406162001" ...
#> $ idAndFsnTerm : chr "195967001 | Asthma (disorder) |" "160377001 | Family history: Asthma (situation) |" "56968009 | Asthma caused by wood dust (disorder) |" "406162001 | Asthma management (regime/therapy) |" ...
#> $ fsn.term : chr "Asthma (disorder)" "Family history: Asthma (situation)" "Asthma caused by wood dust (disorder)" "Asthma management (regime/therapy)" ...
#> $ fsn.lang : chr "en" "en" "en" "en" ...
#> $ pt.term : chr "Asthma" "Family history of asthma" "Asthma caused by wood dust" "Asthma management" ...
#> $ pt.lang : chr "en" "en" "en" "en" ...
#> $ total : int 246 246 246 246 246 246 246 246 246 246 ...
#> $ limit : int 50 50 50 50 50 50 50 50 50 50 ...
#> $ offset : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ searchAfter : chr "WzQxODM5NTAwNF0=" "WzQxODM5NTAwNF0=" "WzQxODM5NTAwNF0=" "WzQxODM5NTAwNF0=" ...
#> $ searchAfterArray: int 418395004 418395004 418395004 418395004 418395004 418395004 418395004 418395004 418395004 418395004 ...
# Retrieve multiple concepts
concept_find(conceptIds = c("233604007", "68566005"))
#> conceptId active definitionStatus moduleId effectiveTime id
#> 1 68566005 TRUE FULLY_DEFINED 900000000000207008 20020131 68566005
#> 2 233604007 TRUE FULLY_DEFINED 900000000000207008 20150131 233604007
#> idAndFsnTerm
#> 1 68566005 | Urinary tract infectious disease (disorder) |
#> 2 233604007 | Pneumonia (disorder) |
#> fsn.term fsn.lang
#> 1 Urinary tract infectious disease (disorder) en
#> 2 Pneumonia (disorder) en
#> pt.term pt.lang total limit offset
#> 1 Urinary tract infectious disease en 2 50 0
#> 2 Pneumonia en 2 50 0
#> searchAfter searchAfterArray
#> 1 WyIyMzM2MDQwMDciXQ== 233604007
#> 2 WyIyMzM2MDQwMDciXQ== 233604007
# Use the SNOMED CT Expression Constraint Language
concept_find(
ecl = paste(
"<! 68566005 | Urinary tract infectious disease (disorder) |",
"AND",
"< 87628006 | Bacterial infectious disease (disorder) |"
)
)
#> conceptId active definitionStatus moduleId effectiveTime id
#> 1 312124009 TRUE FULLY_DEFINED 900000000000207008 20030131 312124009
#> idAndFsnTerm
#> 1 312124009 | Bacterial urinary infection (disorder) |
#> fsn.term fsn.lang pt.term
#> 1 Bacterial urinary infection (disorder) en Bacterial urinary infection
#> pt.lang total limit offset searchAfter searchAfterArray
#> 1 en 1 50 0 WzMxMjEyNDAwOV0= 312124009