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 Germany Edition into Snowstorm


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 download and use the Training SSH private key: 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 9.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 9.2.0 using the installation script.

The script also installs Java 17, 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 soon.

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. Load The SNOMED CT German Edition

  • First we need to tell Snowstorm that the German Edition will be the only Edition on this server and let it know the module id for the FHIR URI.
  • Run the two commands below to setup the Snowstorm configuration and restart Snowstorm:
echo 'codesystem.config.SNOMEDCT=Germany Edition|11000274103|de|Bundesinstitut für Arzneimittel und Medizinprodukte, BfArM' | sudo tee -a /opt/snowstorm/application.properties
echo '# German characters not folded for search äöüß' | sudo tee -a /opt/snowstorm/application.properties
echo 'search.language.charactersNotFolded.de=\u00e4\u00f6\u00fc\u00df' | sudo tee -a /opt/snowstorm/application.properties
sudo supervisorctl restart snowstorm


  • Check that the German SNOMED CT release package "SnomedCT_Germany-EditionRelease_PRODUCTION_20231115T120000Z.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

Snowstorm 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_Germany-EditionRelease_PRODUCTION_20231115T120000Z.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 364,001 active concepts in the November 2023 German Edition (including more than 1 million descriptions, 1 million relationships and 4 million reference set members).

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

(See Snowstorm documentation loading-snomed).

6. 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. We use the module identifier "11000274103" to reference the German Edition - http://<ip-address>:8080/fhir/ValueSet/$expand?url=http://snomed.info/sct/11000274103?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.


  • No labels