Code Monkey home page Code Monkey logo

snowstorm-lite's Introduction

Snowstorm Lite FHIR Terminology Server (Beta)

A fast FHIR Terminology Server for SNOMED CT with a small memory footprint.

Use Case

  • Scaling architecture
  • Supporting user data input with SNOMED CT driven search where responsiveness is critical
  • Using SNOMED CT offline:
    • Locations with poor connectivity and limited machine memory
    • Trusted research environments that are not able to make external API requests
  • Not suitable as a national terminology server

Features

  • Host a single SNOMED CT Edition with incredible speed
  • SNOMED query support using a subset of ECL
  • Perfect for search
    • Most relevant results first
    • Supports terminology binding
    • Multiple language support with configurable character folding
  • FHIR Terminology Operations

Limitations

  • Only supports the FHIR API
  • Only ValueSets support create/update/delete
  • Only supports one snapshot of the SNOMED CT International Edition at this time
    • Support for other SNOMED CT editions and include multiple language search is planned

Technical Details

  • Only supports one SNOMED CT CodeSystem at a time
  • Minimal memory footprint is perfect for autoscaling
    • After creating the index the app can run with just 500mb memory
  • Self-contained application using Apache Lucene™
  • Uses Spring Boot and HAPI FHIR Frameworks
  • Requires JDK 17

Quick Start

Choose an admin password and replace yourAdminPassword values in the following commands.

Option 1: Using a SNOMED Syndication Service

If you have access to the SNOMED International MLDS service then Snowstorm Lite can download a release automatically from there.

Run Snowstorm Lite in your local Docker:

docker pull snomedinternational/snowstorm-lite:latest
docker run -i -t -p 8080:8080 snomedinternational/snowstorm-lite \
  --admin.password=yourAdminPassword \
  --syndicate --version-uri=http://snomed.info/sct/900000000000207008

Set version-uri to the URI of the SNOMED Edition to be loaded. See SNOMED Edition URI Examples.

The console will ask for the syndication service username and password before downloading the relevant packages and building the index. By default the SNOMED International MLDS feed is used, this uses the same credentials as MLDS. The feel URL can be changed using the syndication.url configuration option.

Then Snowstorm Lite will be ready for use! The FHIR interface is here: http://localhost:8085/fhir.

Option 2: Using a SNOMED Archive File

If you have access to a SNOMED CT Edition release archive this can be imported.

Run Snowstorm Lite in your local Docker:

docker pull snomedinternational/snowstorm-lite:latest
docker run -p 8080:8080 snomedinternational/snowstorm-lite \
  --admin.password=yourAdminPassword

Upload a SNOMED CT package:

curl -u admin:yourAdminPassword \
  --form file=@SnomedCT_InternationalRF2_PRODUCTION_20240101T120000Z.zip \
  --form version-uri="http://snomed.info/sct/900000000000207008/version/20240101" \
  http://localhost:8080/fhir-admin/load-package

Importing a SNOMED CT release takes about 5 minutes.

When the import is complete Snowstorm Lite will be ready for use! The FHIR interface is here: http://localhost:8085/fhir.

It is possible to import extension or derivative packages.

It is also possible to deploy as a Java application, without Docker.

Postman

This Postman collection allows you to try the various API functions of the Snowstorm Lite server. It's similar to a Swagger UI.
You will need a local Snowstorm Lite instance running.

Run in Postman

Roadmap

  • Nothing currently planned.

Full ECL support is not planned. Snowstorm Lite supports the most often used ECL features without the full complexity and memory demands of the complete ECL specification.

snowstorm-lite's People

Contributors

jonzammit avatar kaicode avatar sivareddyp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jonzammit

snowstorm-lite's Issues

$expand operation with ECL, "member of" syntax, reference set types

Inconsistent results when using $expand operation in combination with ECL, ^ "member of" syntax, and different reference set types.

Example 1) - query to expand 723264001 |Lateralizable body structure reference set|, a simple reference set type. This produces the expected results. 20,000+ members in expansion:

{{url}}ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/%5E723264001

URI-decoded ecl query: ^723264001

Example 2) - query to expand 446608001 |SNOMED CT to ICD-O simple map|, a simple map type refset. Response indicates 0 concepts in expansion:

{{url}}ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/%5E446608001

URI-decoded ecl query: ^446608001

ECL Bug, ancestors of concept set

There is a bug in the ECL engine. When requesting the ancestors of a concept set all concepts are returned rather than only the ancestors.

For example, the results of this ECL should not include 195967001 |Asthma|:

> ( >> 195967001 |Asthma| )

The current release is returning Asthma.

$expand sorting is different (worse) than the full snowstorm version

Example:

curl --silent 'https://snowstorm.ihtsdotools.org/fhir/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs&filter=Breast+Cancer&count=5' | jq

responds with:

{
  "resourceType": "ValueSet",
  "id": "5fc7dd97-888a-4385-aa05-8c2fabce0fe1",
  "url": "http://snomed.info/sct?fhir_vs",
  "status": "active",
  "copyright": "This value set includes content from SNOMED CT, which is copyright © 2002+ International Health Terminology Standards Development Organisation (SNOMED International), and distributed by agreement between SNOMED International and HL7. Implementer use of SNOMED CT is not covered by this agreement.",
  "expansion": {
    "id": "7cc5cd7b-f6ca-4602-9e76-76d2499dd01b",
    "timestamp": "2024-01-15T14:43:46+00:00",
    "total": 45,
    "offset": 0,
    "parameter": [
      {
        "name": "version",
        "valueUri": "http://snomed.info/sct|http://snomed.info/sct/900000000000207008/version/20240101"
      },
      {
        "name": "displayLanguage",
        "valueString": "en"
      }
    ],
    "contains": [
      {
        "system": "http://snomed.info/sct",
        "code": "254837009",
        "display": "Malignant tumor of breast"
      },
      {
        "system": "http://snomed.info/sct",
        "code": "372064008",
        "display": "Malignant neoplasm of female breast"
      },
      {
        "system": "http://snomed.info/sct",
        "code": "724451007",
        "display": "Fear of breast cancer"
      },
      {
        "system": "http://snomed.info/sct",
        "code": "134405005",
        "display": "Suspected breast cancer"
      },
      {
        "system": "http://snomed.info/sct",
        "code": "268547008",
        "display": "Screening for malignant neoplasm of breast"
      }
    ]
  }
}

Whereas local snowstorm-lite server is returning

curl -u admin:yourAdminPassword --silent 'http://localhost:8085/fhir/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs&filter=Breast+Cancer&count=5' | jq
{
  "resourceType": "ValueSet",
  "url": "http://snomed.info/sct?fhir_vs",
  "name": "SNOMED CT Implicit ValueSet of all concepts.",
  "status": "active",
  "copyright": "This value set includes content from SNOMED CT, which is copyright © 2002+ International Health Terminology Standards Development Organisation (SNOMED International), and distributed by agreement between SNOMED International and HL7. Implementer use of SNOMED CT is not covered by this agreement.",
  "expansion": {
    "identifier": "1e115cd2-d887-4b14-b399-4362974939b0",
    "timestamp": "2024-01-15T14:47:43+00:00",
    "total": 50,
    "parameter": [
      {
        "name": "version",
        "valueUri": "http://snomed.info/sct|http://snomed.info/sct/900000000000207008/version/20230131"
      }
    ],
    "contains": [
      {
        "system": "http://snomed.info/sct",
        "code": "717129004",
        "display": "Claus Model"
      },
      {
        "system": "http://snomed.info/sct",
        "code": "724451007",
        "display": "Fear of breast cancer"
      },
      {
        "system": "http://snomed.info/sct",
        "code": "134405005",
        "display": "Suspected breast cancer"
      },
      {
        "system": "http://snomed.info/sct",
        "code": "254843006",
        "display": "Familial cancer of breast"
      },
      {
        "system": "http://snomed.info/sct",
        "code": "254837009",
        "display": "Malignant tumor of breast"
      }
    ]
  }
}

Where "Fear of breast cancer" is higher on the list than "Malignant tumor of breast" ... not the response we were expecting (and the full version was correctly returning).

Maybe we have to configure / reindex something to make it work the same as the full version?

Docker image version: snomedinternational/snowstorm:9.2.0

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.