Code Monkey home page Code Monkey logo

scttsrapy's Introduction

SCTTSRApy: Python Interface to the SNOMED CT Snowstorm Terminology Server REST API

GitHub commits GitHub issues GitHub repo size made-with-python PRs Welcome

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

Installing

You can install the development version directly from GitHub with:

pip install git+https://github.com/AberystwythSystemsBiology/SCTTSRApy

Features

We currently support the following API endpoints:

  • Branching
  • Code Systems
  • Concepts
  • Descriptions
  • Relationships

Example

Retrieve all children of 363908000:

>>> from scttsrapy.concepts import get_concept_children
>>> get_concept_children("363908000")
{
    "success": true,
    "content": [
        {
            "conceptId": "763699005",
            "active": true,
            "definitionStatus": "PRIMITIVE",
            "moduleId": "900000000000207008",
            "fsn": {
                "term": "Clinical Opiate Withdrawal Scale score (observable entity)",
                "lang": "en"
            },
            "pt": {
                "term": "Clinical Opiate Withdrawal Scale score",
                "lang": "en"
            },
            "isLeafInferred": true,
            "id": "763699005"
        },
        ...
    ]
}
>>>

If you're using a custom Snowstorm instance, you can easily configure a custom endpoint_builder:

>>> from scttsrapy.api import EndpointBuilder
>>> endpoint_builder = EndpointBuilder()
>>> # Setting up the custom API endpoint
>>> endpoint_builder.set_api_endpoint("localhost:9000")
>>> # Setting up a custom header. In reality this isn't going to do anything, but you may want to lock your Snowstorm API behind a JWT.
>>> endpoint_builder.set_headers(
....{
....    "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36"
....})
>>> get_concept_children("363908000", endpoint_builder=endpoint_builder)
{
    ...
}

Bug reporting and feature suggestions

Please report all bugs or feature suggestions to the issues tracker. Please do not email me directly as I'm struggling to keep track of what needs to be fixed.

We welcome all sorts of contribution, so please be as candid as you want.

Terms & conditions

Server endpoint

By default, SCTTSRApy 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 SNOMED 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.

License

This project is proudly licensed under the GNU General Public License v3.0.

scttsrapy's People

Contributors

keirono avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.