Interrogate the SNOMED CT clinical ontology using the SNOMED International Terminology Server REST API.

Installation

You can install the development version from GitHub with:

install.packages("devtools")
devtools::install_github("ramses-antibiotics/snomedizer")

Example

snomedizer provides a direct interface to the SNOMED CT Terminology Server REST API.

By default, the package uses the public SNOMED International server available for reference purposes only (see terms & conditions).

For example, GET /branch/concepts is implemented in api_concepts():

library(dplyr)
library(snomedizer)
#> The following SNOMED CT Terminology Server has been selected:
#> https://snowstorm.ihtsdotools.org/snowstorm/snomed-ct
#> This server may be used for reference purposes only.
#> It MUST NOT be used in production. Please refer to ?snomedizer for details.

api_concepts(term = "pneumonia", activeFilter = TRUE)
#> Response [https://snowstorm.ihtsdotools.org/snowstorm/snomed-ct/MAIN/concepts?term=pneumonia&limit=50&offset=0&activeFilter=TRUE]
#>   Date: 2022-07-06 17:45
#>   Status: 200
#>   Content-Type: application/json
#>   Size: 22 kB
#> {
#>   "items" : [ {
#>     "conceptId" : "233604007",
#>     "active" : true,
#>     "definitionStatus" : "FULLY_DEFINED",
#>     "moduleId" : "900000000000207008",
#>     "effectiveTime" : "20150131",
#>     "fsn" : {
#>       "term" : "Pneumonia (disorder)",
#>       "lang" : "en"
#> ...

Simpler wrapper functions are available for common operations, which provide results as data frames:

concept_find(term = "pneumonia", limit = 5) %>% 
  dplyr::select(conceptId, fsn.term, pt.term) 
#> Warning: 
#> This server request returned just 5 of a total 614 results.
#> Please increase the server `limit` to fetch all results.
#>   conceptId                         fsn.term            pt.term
#> 1 233604007             Pneumonia (disorder)          Pneumonia
#> 2 161525004 History of pneumonia (situation)     H/O: pneumonia
#> 3 416916004    Lipoid pneumonitis (disorder) Lipoid pneumonitis
#> 4 300999006       Basal pneumonia (disorder)    Basal pneumonia
#> 5 278516003       Lobar pneumonia (disorder)    Lobar pneumonia

Development and new features

Please share your experience as a user!

Do not hesitate to get in touch on GitHub to report bugs or request new features.

Terms & conditions

Server endpoint

By default, snomedizer queries the public SNOMED CT terminology endpoint hosted by SNOMED International.

This server has no service level agreement and MUST NOT be used as part of production systems in healthcare settings, even if you hold a SNOMED CT licence.

Please refer to the Snowstorm documentation for instructions on how to build a dedicated endpoint for production.

SNOMED CT Terminology

In order to use SNOMED CT terminology, a licence is required which depends both on the country you are based in, and the purpose of your work.

SNOMED International maintains a public SNOMED CT terminology server for strict ‘reference purposes’ under the SNOMED International SNOMED CT Browser License Agreement.

Use of SNOMED CT terminology for data analysis or health care production systems is subject to other licences. Some users are eligible for free licences:

  • UK-based users can obtain a licence free of charge on the NHS TRUD website.
  • residents of other Member Countries and low-income countries are also eligible. More information can be found on the SNOMED International website.

Licence

Copyright © 2022 University College London

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Funders

National Institute of Health Research    Economic and Social Research Council    Precision AMR

Code of conduct

The snomedizer project is released with a Contributor Code of Conduct.

By contributing to this project, you agree to abide by its terms.