NOTE: It is not recommended that the terminology services be accessed through SQL. The following methods are suggested as an alternative:
The purpose of these scripts, which are designed to align to the RF2 release structure of SNOMED CT-AU, is to explain and illustrate the release format of SNOMED CT-AU for those wishing to learn and understand its details. Section 9 of the SNOMED CT-AU Australian Technical Implementation Guide describes these scripts and the release format in detail.
These scripts are NOT recommended as a method of implementing SNOMED CT-AU, a terminology server and/or a bespoke data structure for the particular requirements should be used instead. Detail knowledge of the release format described by these scripts and the implementation guide are required to build, but not when using an appropriate terminology server, which will abstract these details away and typically provide much more relevant search functionality and algorithms.
The National Clinical Terminology Service provides an HL7 FHIR terminology service endpoint containing up to date terminologies for Australia, the National Terminology Server. The NCTS also makes available the terminology server software available at this endpoint free for use in Australian health care which can synchronise in content from the NCTS and be augmented with additional FHIR terminology resources as required, more details on this refer to the NCTS website.
Vendors and implementers in Australia are encouraged to use these services where possible to avoid the duplicated effort of implementing the details described by these scripts and insulate themselves from possible future change to them.
These scripts are based around MySQL, so access to a MySQL or MariaDB server is required. The scripts also assume a schema/database exists in the server called "sctau", this must be created and available to the user executing the scripts contained in this repository.
The scripts also require an unpacked release of SNOMED CT-AU available. SNOMED CT-AU may be downloaded from https://www.healthterminologies.gov.au/access or using the National Syndication Server for automated downloading.
The scripts can be executed using any client to the MySQL/MariaDB server being used. The instructions below assume using the MySQL command line client.
mysql> source /schema/1_createSchema.sql
mysql> source /schema/2_populateTables.sql
mysql> source /schema/3_createIndexes.sql
mysql> source /schema/4_createRoutines.sql
mysql> source /schema/5_createTransitiveClosure.sql
mysql> source /schema/6_createAMTObjects.sql
The 2_populateTables.sql script contains relative paths to the RF2 files. Depending on the operating system and version of mysql, you may need to amend these and replace with the full path. For example:
release-files/RF2Release/Snapshot/Terminology/sct2_Concept_Snapshot_AU1000036_20170831.txt
changes to
C:/Users/SomeUser/Downloads/release-files/RF2Release/Snapshot/Terminology/sct2_Concept_Snapshot_AU1000036_20170831.txt
The 5_createTransitiveClosure.sql file creates a procedure, which upon execution creates the transitive_closure table The creation of the transitive closure will take some time, up to 20 minutes, depending on the local system specifications.
Use case examples contained within each file: