Terminology Loader and Remover

Overview

This page documents the use of admin tools for loading and removing snapshots of terminologies.

Prerequisites

  • MySQL database must already exist (e.g. "umlsdb").
  • MySQL database connection parameters must be defined in the properties file specified by "run.config.umls".
  • Create/Update DB mojo must also have already run so that the database schema exists.
  • If you have already loaded a terminology, remove it before reloading it again with the same version.

Details

There is an RRF loader, an RF2 loader, a ClaML loader, and a general terminology remover.

Loading RRF

This tool is used to load a set of RRF data files from the UMLS (or other RRF-based Metathesaurus).  Either the entire release can be loaded, or custom subsets of the complete package.  

Mojo: TerminologyRrfUmlsLoaderMojo.java (in admin/mojo/src/main/resources/java/com/wci/umls/server/mojo)
Project: admin/loader
Configuration Parameters

  • A profile indicating RRF-umls must be specified
  • run.config.umls - the standard configuration file specified as a -D parameter
  • input.dir - the input directory for the RRF data
    • NOTE: this directory must also contain an SRDEF file (from the NET/ folder of a standard distribution)
  • terminology - the terminology value to use when loading (e.g. "UMLS")
  • version - the (optional) terminology version, the value "latest" is used by default.
  • server - true/false indicating whether to run the mojo through the server 

Loading a Single Terminology from RRF

This tool is used to load just a single terminology from a larger set of RRF data files from the UMLS (or other RRF-based Metathesaurus).  For example, if given a complete set of RRF files for a UMLS edition, a single terminology, such as SNOMEDCT_US could be loaded without having to subset the files. 

Mojo: TerminologyRrfSingleLoaderMojo.java (in admin/mojo/src/main/resources/java/com/wci/umls/server/mojo)
Project: admin/loader
Configuration Parameters

  • A profile indicating RRF-single must be specified
  • run.config.umls - the standard configuration file specified as a -D parameter
  • input.dir - the input directory for the RRF data
    • NOTE: this directory must also contain an SRDEF file (from the NET/ folder of a standard distribution)
  • terminology - the terminology value to use when loading (e.g. "RXNORM")
  • version - the (optional) terminology version, the value "latest" is used by default.
  • server - true/false indicating whether to run the mojo through the server 

Loading a Terminology from RR2 Snapshot

This tool is used to load a SNOMEDCT based data set from snapshot RF2 data files.  The international edition, NRC extensions, and other affiliate extensions (e.g. Kaiser or Vet) can all be loaded using this admin tool. 

Mojo: TerminologyRf2SnapshotLoaderMojo.java (in admin/mojo/src/main/resources/java/com/wci/umls/server/mojo)
Project: admin/loader
Configuration Parameters

  • A profile indicating RF2-snapshot must be specified
  • run.config.umls - the standard configuration file specified as a -D parameter
  • input.dir - the input directory for the RF2 data
  • terminology - the terminology value to use when loading (e.g. "SNOMEDCT")
  • version - the (optional) terminology version, the value "latest" is used by default.
  • server - true/false indicating whether to run the mojo through the server 

Removing a Terminology

The terminology remover is used to remove any terminology (and version) from the database, regardless of what loader was used to load it.  NOTE, when a loading an entire Metathesaurus, each individual terminology stands on its own and so must be individually removed, if desired.

Mojo: TerminologyRemoverMojo.java (in admin/mojo/src/main/resources/java/com/wci/umls/server/mojo)
Project: admin/remover
Configuration Parameters

  • A profile of "Terminology" must be passed
  • run.config.umls - the standard configuration file specified as a -D parameter
  • terminology - the terminology to remove (e.g. UMLS)
  • version - the terminology version to remove, the default is "latest"
  • server - true/false indicating whether to run the mojo through the server 

Sample

Sample command line call of the admin tool to load RRF using the version "latest":

 

% cd ~/code/admin/loader
% mvn install -PRRF-umls -Drun.config.umls=/home/ec2-tomcat/config/config.properties -Dterminology=UMLS -Dinput.dir=../../config/src/main/resources/data/SAMPLE_2014AB

Sample command line call of the admin tool to load a single terminology from RRF files using the version "latest":

 

% cd ~/code/admin/loader
% mvn install -PRRF-single -Drun.config.umls=/home/ec2-tomcat/config/config.properties -Dterminology=SNOMEDCT_US -Dinput.dir=../../config/src/main/resources/data/SAMPLE_2014AB

 

Sample command line call of the admin tool to load SNOMEDCT from RF2:

 

% cd ~/code/admin/remover
% mvn install -PTerminology -Drun.config.umls=/home/ec2-tomcat/config/config.properties -Dterminology=SNOMEDCT -Dversion=latest -Dinput.dir=/path/to/RF2Release/Snapshot

 

Sample command line call of the admin tool to remove SNOMEDCT_US with version 2014_09_01:

 

% cd ~/code/admin/remover
% mvn install -PTerminology -Drun.config.umls=/home/ec2-tomcat/config/config.properties -Dterminology=SNOMEDCT_US -Dversion=2014_09_01

 

Sample Eclipse run configuration for loading an RRF data set:

Sample Eclipse run configuration for loading SNOMEDCT_US from an RRF data set:

 

Sample Eclipse run configuration for removing SNOMEDCT_US:

Troubleshooting

Occasionally the load of a terminology will fail for one reason or another. If the process does not run to completion, it is a recommend practice to clear the database using the "truncate_all.sql" script and recreating the database before attempting to import it again.

  • n/a