Overview

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

Prerequisites

Details

There are two RF2 terminology loaders (Snapshot and Delta), a ClaML terminology loader, and a general terminology remover.

The RF2 snapshot loader will load a collection of RF2 Snap;shot files (e.g. from a SNOMEDCT International release or an NRC release).  This is used to either load an initial version of SNOMEDCT or to load the next published version after a version update.  The default version value is "latest", which in theory means the snapshot loader only needs to be run once, and "delta" files can be processed from that point on to update content to later "publication ready" or "published" states. 

Mojo: TerminologyRf2SnapshotLoaderMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/loader

Configuration Parameters

 

The RF2 delta loader is used to process a daily build of SNOMEDCT, or a definitive RF2 delta for a following release.  It only pays attention to concept, relationship, description, and language refset entries as all other data types are irrelevant for the mapping tool.  When running this, the last publication date must be explicitly provided in case the base terminology was loaded with a version of "latest".  This parameter allows the delta loader to know against which "effective time" values a data element should be compared  when determining if it has changed since the last processing of a delta.

Remember, when processing daily builds, each day's "delta" is actually a delta relative to the previous release of SNOMEDCT and not relative to the previous day's daily build.  Thus, many/most of the entries in a processed RF2 delta have already been processed (from the prior run).  For more information on the "drip feed" process see Drip Feed.

Mojo: TerminologyRf2DeltaLoaderMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/loader

Configuration Parameters

 

The ClaML loader is used to load ClaML-based terminologies into the mapping tool.  This includes ICD10 which is natively in ClaML as well as other terminologies like ICD9CM and ICPC that have been converted to ClaML.

Mojo: TerminologyClamlLoaderMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/loader

Configuration Parameters

The terminology remover is used to remove any terminology (and version) from the database, regardless of what loader was used to load it.

Mojo: TerminologyRemoverMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/remover

Configuration Parameters


The map members remover can be used to delete simple or complex map refset members from the database (by refset id).  This is useful for dropping and reloading a particular set of maps (e.g. to set the initial state correctly).

Mojo: TerminologyMapRemoverMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/remover

Configuration Parameters

Sample

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

% cd ~/code/admin/loader
% mvn install -PRF2-snapshot -Drun.config=/home/ihtsdo/config/config.properties -Dterminology=SNOMEDCT -Dinput.dir=/home/ihstdo/data/snomedct-20140731-snapshot

Sample command line call of the admin tool to remove ICPC:

% cd ~/code/admin/remover
% mvn install -PTerminology -Drun.config=/home/ihtsdo/config/config.properties -Dterminology=ICPC -Dversion=2010

 

Sample Eclipse run configuration for loading SNOMED CT:

]

Sample Eclipse run configuration for removing ICPC:

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 remove the terminology before attempting to import it again.

# stop the server
% service tomcat7 stop

# attempt to load ICPC
% cd ~/code/admin/loader
% mvn install -PClaML -Drun.config=/home/ihtsdo/config/config.properties -Dterminology=ICPC -Dversion=2010 -Dinput.file=/home/ihtsdo/data/icpc-2.xml

... perhaps a failure occurs here during the process

# Run the remover
% cd ~/code/admin/remover
% mvn install -PTerminology -Drun.config=/home/ihtsdoconfig/config.properties -Dterminology=ICPC -Dversion=2010

# attempt to load ICPC again
% cd ~/code/admin/loader
% mvn install -PClaML -Drun.config=/home/ihtsdo/config/config.properties -Dterminology=ICPC -Dversion=2010 -Dinput.file=/home/ihtsdo/data/icpc-2.xml

 

References/Links