General
SNOMED CT
Troubleshooting
Installation
Maintenance
Use
FHIR is an emerging HL7 standard.
Fast Health Interoperability Resources
There is a very large, dynamic, and welcoming community of developers on FHIR Chat (Zulip) chat.fhir.org community expectations. This is the best place to go for general questions about FHIR, terminology services and FHIR, as well as Ontoserver itself.
For technical support issues directly related to Ontoserver, please email ontoserver-support@csiro.au.
If you have a Zip file containing the SNAPSHOT or FULL files for a complete SNOMED CT Edition, then skip to step 2.
For example, your docker-compose.yml may include the entry:
environment: - atom.syndication.feedLocation=file:///var/synd/syndication.xml
environment: - atom.syndication.feedLocation=file://var/synd/syndication.xml,https://stu3.ontoserver.csiro.au/synd/syndication.xml
<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:ncts="http://ns.electronichealth.net.au/ncts/syndication/asf/extensions/1.0.0"> <title type="text">Local Syndication Feed</title> <link rel="alternate" type="application/atom+xml" href="file:///var/synd/syndication.xml"/> <updated>2020-03-05T23:35:01+10:00</updated> <id>urn:uuid:145d7ab2-9e85-40fd-942c-c46fbc16c104</id> <generator>hand crafted</generator> <ncts:atomSyndicationFormatProfile>http://ns.electronichealth.net.au/ncts/syndication/asf/profile/1.0.0</ncts:atomSyndicationFormatProfile> <entry> <title>SNOMED CT</title> <id>urn:uuid:9f0e4007-16ff-4639-b4d9-cc6e9c7938f5</id> <author> <name>Leprechauns</name> </author> <rights>Copyright by Leprechauns</rights> <ncts:contentItemIdentifier>http://snomed.info/sct/MODULE</ncts:contentItemIdentifier> <ncts:contentItemVersion>http://snomed.info/sct/MODULE/version/DATE</ncts:contentItemVersion> <updated>2019-03-20T12:00:00+10:00</updated> <published>2019-03-20T12:00:00+10:00</published> <category term="SCT_RF2_SNAPSHOT" label="SNOMED CT RF2 SNAPSHOT" scheme="http://ns.electronichealth.net.au/ncts/syndication/asf/scheme/1.0.0" /> <link rel="alternate" type="application/zip" href="file:///var/synd/SnomedCT_RF2.zip" ncts:sha256Hash="SHA"/> </entry> </feed>
docker cp syndication-sct.xml ontoserver:/var/synd/syndication.xml docker cp MySnomedCT_Edition.zip ontoserver:/var/synd/SnomedCT_RF2.zip
docker exec ontoserver /index.sh -s http://snomed.info/sct -v http://snomed.info/sct/MODULE/version/DATE
environment: - JAVA_OPTS=-Xmx14G
There are two possibilities here:
In both cases you will need to adjust the heap available to Ontoserver. You can do this by setting JAVA_OPTS in the environment section of Ontoserver's docker-compose configuration. It should look something like the following:
environment: - JAVA_OPTS=-Xmx2G
Ontoserver does support CORS (see config of cors.allowed.*).
If you're seeing 400 series errors then you are probably not making a valid CORS request. Both Origin and Access-Control-Request-Method must be provided as HTTP headers for a CORS request to be recognized.
There are two main parts to removing Ontoserver completely from your system: removing the docker images (which contain ontoserver and postgres), and removing the docker volumes (which contain the data).
You can see the docker images by running
docker images
docker rmi -f aehrc/ontoserver:5.4
docker rmi -f $(docker images | grep 'aehrc/ontoserver' | awk {'print $3'})
docker rmi -f postgres
You can see the docker volumes by running
docker volume ls
docker volume rm $(docker volume ls | grep -E '_onto|_pgdata' | awk {'print $2'})
You may also wish to remove your docker-compose.yml file, or even to uninstall Docker itself (instructions can be found on the relevant Docker installation pages)
Note: these commands assume a default configuration. If you have made changes, e.g. to the volumes that are used, then the commands for uninstalling images and volumes may differ.
Ontoserver is built to support standard HTTP caching using ETags and Last-Modified headers.
This means you can use standard front-side caches such as Apache, NGINX, Varnish, Squid, etc.
This GitHub project provides a sample deployment setup for Ontoserver using an NGINX cache.
The following environment variables can be set in your docker-compose.yml file, in the environment section of your ontoserver container, to support Ontoserver connecting out through a proxy:
For example, you might have the following configuration in your docker-compose.yml file:
ontoserver: image: aehrc/ontoserver:ctsa-5.8 container_name: ontoserver depends_on: - db ports: - "8443:8443" - "8080:8080" environment: - JAVA_OPTS=-Xmx4G - HTTP_PROXY_HOST=myproxy.com - HTTPS_PROXY_HOST=myproxy.com - HTTP_PROXY_PORT=8080 - HTTPS_PROXY_PORT=8080
Dataabase configuration comes from Spring Boot. The key parameters are:
However, it is not good practice to put credentials in your docker-compose file. Instead, one can use profiles to pass in this configuration. For example, create a file application-jdbc.properties that contains the appropriate configurationfor the above spring.datasource parameters. Copy this into your Ontoserver container (you may want to create a derived Docker image for this), and then use the spring.profiles.active configuration to enable/select the profile. For example:
ontoserver: image: aehrc/ontoserver:ctsa-5 container_name: ontoserver ports: - "8443:8443" - "8080:8080" environment: - spring.profiles.active=jdbc
Ontoserver's data consists of two artifacts that need to be backed up, both mounted as docker volumes.
Note: These volume are mounted by the containers, but do not live inside the containers,
so it is not sufficient to snapshot the ontoserver and postgres containers.
Once you have your docker client pointed at the docker-machine that is running the Ontoserver instance you wish to back up, and assuming your docker-compose.yml file is located in a myOntoserver directory):
docker run --rm --volumes-from ontoserver -v /home/ubuntu/backup:/backup ubuntu tar cvf /backup/backup-ontoserver.tar /var/onto
docker run --rm --volumes-from myOntoserver_db_1 -v /home/ubuntu/backup:/backup ubuntu tar cvf /backup/backup-pgdata.tar /var/lib/postgresql/data
These commands create two tar files in the /home/ubuntu/backup directory of the machine (real or virtual) where Ontoserver is running. You may wish to retrieve them to another machine using a program such as sftp.
Once you have the backup tar files (see backup), and with your docker client pointed at the docker-machine where you want to restore Ontoserver:
docker-compose up –d
docker-compose stop
docker run --rm --volumes-from ontoserver -v /home/ubuntu/backup:/backup ubuntu bash -c "tar xvf /backup/backup-ontoserver.tar"
docker run --rm --volumes-from myOntoserver_db_1 -v /home/ubuntu/backup:/backup ubuntu bash -c "tar xvf /backup/backup-pgdata.tar"
docker-compose up –d
If your docker-compose.yml file refers to a major-minor version (e.g. ontoserver:ctsa-5.7), and you want to upgrade to the latest patch version (e.g. from 5.7.0 to 5.7.1), then all you have to do is pull the latest 5.7 release. To do this, simply run
docker pull aehrc/ontoserver:ctsa-5.7
If you want to change to a specific version, then you can also change the specific version in your docker-compose.yml file. The list of available versions can be found here.
Once you have done either (or both) of these, then you can apply the change by re-upping your docker-compose:
docker-compose up -d
This should recreate the ontoserver container with the new version.
If you are updating to Ontoserver 5.x from Ontoserver 4.1.x, then FHIR resources (other than SNOMED and LOINC code systems) in the database will not be migrated. This is because the structure of these resources has changed from FHIR DSTU 2.1 (Ontoserver 4.1.x) to FHIR STU 3 (Ontoserver 5.x). If Ontoserver 5.x finds these old resources in its database, then it will refuse to start up.
If you wish to retrieve FHIR resources from Ontoserver 4.1.x so that you can migrate them, you can use the FHIR search (GET requests on /fhir/CodeSystem, /fhir/ConceptMap, /fhir/ValueSet) or read (/fhir/CodeSystem/[id], /fhir/ConceptMap/[id], /fhir/ValueSet/[id]) endpoints from a running Ontoserver 4.1.x instance to retrieve them.
Once resources have been converted to STU3 resources, start Ontoserver 5 with an empty database and add migrated resources either individually using FHIR create/update endpoints, or as a bundle using the /api/addBundle endpoint.
/fhir/ConceptMap/$translate?url=http://snomed.info/sct?fhir_cm=281000036105&system=http://snomed.info/sct&code=31586011000036103&target=http://snomed.info/sct?fhir_vs