Page tree


This exercise is intended to teach you how to:

  • Install Elasticsearch and Snowstorm on a blank Debian / Ubuntu server
  • Load the SNOMED CT International Edition


Last Updated:  

On this page

1. Accessing the server command line

Connect to the command line of the Ubuntu server, either by accessing the server machine physically or connecting remotely using SSH or similar.

The server should have around 16GB of memory and most of that should be available.

If you are connecting to one of the AWS servers provided by SNOMED International please use the SSH private key file below:

training.pem

Command to connect to the AWS server

chmod 700 training.pem
ssh -i training.pem ubuntu@IP-ADDRESS

Where IP-ADDRESS is the server IP address from the email you received. If the chmod command does not work on your machine try this windows solution to set the file permissions: https://superuser.com/a/1329702

2. Install Elasticsearch

The data store of Snowstorm version 8.x is Elasticsearch version 7.10.2, or a later 7.x version.

Command

bash <(curl -s https://raw.githubusercontent.com/IHTSDO/snowstorm-deploy/main/ubuntu_20.04_LTS/install_elasticsearch.sh)
Check that Elasticsearch is running using curl:
curl localhost:9200

The response should be JSON, including the lines:

{
  "version": {
    "number": "7.10.2"
},
"tagline": "You Know, for Search" }

4. Install Snowstorm

Install Snowstorm version 8.1.0 using the installation script.

The script also installs Java 11, that is required to run Snowstorm. Although this is an older version of Java it is a stable Long Term Service version. Snowstorm will switch to the newer Java 21 LTS version in the next couple of years.

Step

Command

Install

bash <(curl -s https://raw.githubusercontent.com/IHTSDO/snowstorm-deploy/main/ubuntu_20.04_LTS/install_snowstorm.sh)

Tail Snowstorm log until startup complete (1 mins)

sudo supervisorctl tail -f snowstorm

If possible leave an SSH window open with this tail command running so you can easily access the log output. 

5. Loading SNOMED CT International Edition

For this German training session we will use the Austrian SNOMED CT Edition because some concepts have been translated to the German language.

The latest SNOMED CT Austrian Edition is from February 2023 and is dependant on the December 2022 International Edition so we will load this first. 

  • Check that the International Edition release file "SnomedCT_InternationalRF2_PRODUCTION_20221231T120000Z.zip" is in the /opt/snomed-releases directory on the server.

  • Apply the snowstorm file permissions with the command: 

    sudo chown -R snowstorm:snowstorm /opt/snomed-releases

The Snowstorm application has two APIs:

  1. The Snowstorm FHIR API - this is the HL7 standards based API that is recommended for use in healthcare systems. This can be used to access any loaded code system including SNOMED CT, ICD, LOINC and others.

  2. The Snowstorm Native API - this for the SNOMED CT Browser and Authoring Platform. It is the only way to load SNOMED CT editions and extensions.


We will use the Snowstorm Native API to run the imports. Access the native API swagger interface using the server ip-address and port 8080, for example - http://<ip-address>:8080/

First we need to start the import process by creating a new import job. Expand the "Import" section and then create a new import using the start-local-file-import endpoint with the following request body:

{ "branchPath": "MAIN", "createCodeSystemVersion": true, "filePath": "/opt/snomed-releases/SnomedCT_InternationalRF2_PRODUCTION_20221231T120000Z.zip", "type": "SNAPSHOT" }

... and click on 'Execute'.

The Response Headers will contain the "Location" of the newly created job, the format is http://<ip-address>:8080/imports/<import_id>. Copy this URL into a new tab to monitor the status of the job. The Snowstorm log also gives information about imports.

Make sure that you wait for the import to complete before starting the next step!

  • The import job status will say status "COMPLETED"

  • The log will say ..."Completed RF2 SNAPSHOT import on branch MAIN"...


There are 359,658 active concepts in the December 2022 International Edition (including more than 1 million descriptions, 1 million relationships and 4 million reference set members).

The import should take between 40-60 minutes, depending mostly on disk speed.

(See Snowstorm documentation loading-snomed).

4. Check Loaded Content

As previously mentioned Snowstorm has two APIs: FHIR and Native. Let's use each of them to check that the content is loaded. Once the import has a status of "COMPLETED" we know that the content is there, the following exercise is just for this training session.

Snowstorm FHIR API - CodeSystem Resources

The FHIR API can list all loaded Code Systems including SNOMED CT code systems and others. When a new version of a SNOMED CT release is loaded it shows as a separate code system in FHIR.

  • Once the import is complete the FHIR CodeSystem listing will show the SNOMED CT code system - http://<ip-address>:8080/fhir/CodeSystem

  • It is also possible to check the number of concepts loaded by expanding the value set containing all active concepts in the International Edition. We use the module identifier "900000000000207008" to reference this - http://<ip-address>:8080/fhir/ValueSet/$expand?url=http://snomed.info/sct/900000000000207008?fhir_vs

Snowstorm Native API - Code System Registry

The Snowstorm Native API has a Code System Registry to manage SNOMED CT code systems. In the Native API code systems are listed as soon as they are created. Imported versions are listed separately.

  • Code systems that exist are listed here - http://<ip-address>:8080/codesystems

  • Once the import is complete the version will be listed here - http://<ip-address>:8080/codesystems/SNOMEDCT/versions

Check the registry throughout this exercise to see your changes reflected.

5. Loading the SNOMED CT Austrian Edition


  • Check that the Austrian SNOMED CT release package "SnomedCT_ManagedServiceAT_PRODUCTION_AT1000234_20230215T120000Z.zip" is in the /opt/snomed-releases directory on the server.

  • Apply the snowstorm file permissions with the command: 

    sudo chown -R snowstorm:snowstorm /opt/snomed-releases

When loading a second SNOMED CT Edition for the first time a new Code System must be created:


  • On the swagger interface in the ‘Code Systems’ section look for the ‘Create a code system’ endpoint. 

  • Use the following in the request to create the CodeSystem. Note the dependantVersionEffectiveTime allows you to create a CodeSystem dependent on a specific International Edition version.

{ "name": "Austrian Edition", "shortName": "SNOMEDCT-AT", "countryCode": "at", "branchPath": "MAIN/SNOMEDCT-AT", "dependantVersionEffectiveTime": 20221231, "defaultLanguageCode": "en" }

click 'Try it now'.


Now the extension package can be imported. Like last time, we need to start the import process by creating a new import job. Look for the Import endpoints and then create a new import using the start-local-file-import endpoint with the following importRequest parameter

{ "branchPath": "MAIN/SNOMEDCT-AT", "createCodeSystemVersion": true, "filePath": "/opt/snomed-releases/SnomedCT_ManagedServiceAT_PRODUCTION_AT1000234_20230215T120000Z.zip", "type": "SNAPSHOT" }

click 'Try it now'.

Copy the "location" from the Response Headers and open this in a new browser tab.

Refresh the import job in your browser to see the status change from WAITING_FOR_FILE to RUNNING and then COMPLETED. You can also see how this is progressing in the Snowstorm log.

This should take about 5 minutes.

Make sure that you wait for the import status to change to COMPLETED before going any further.


6. Check Loaded Content

Check that the Austrian Edition of SNOMED CT now appears in the FHIR API. The module identifier for this edition is 11000234105.


  • No labels