You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

Overview

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

Prerequisites

  • MySQL database must already exist (e.g. "mappingservicedb").
  • MySQL database connection parameters must be defined in the properties file specified by "run.config".
  • Create/Update DB mojo must also have already run so that the database schema exists.
  • IMPORTANT: The Tomcat server must not be running while this is run, otherwise indexes can get corrupted.

Details

This tool is used to load or remove an RF2-based terminology.

Following are some details about the implementation the RF2 snapshot loader:

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

Project: admin/loader

Configuration Parameters

  • A profile indicating RF2 must be specified
    • e.g. -PRF2
    • See profiles in the pom.xml
  • run.config - 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
  • version - the terminology version, the value "latest" is used by default.
  • loader.defaultPreferredNames.typeId - specified in the properties file specified by run.config
    • This is the RF2 preferred description typeId to use for computing concept preferred names.

  • loader.defaultPreferredNames.refSetId - specified in the properties file specified by run.config
    • This is the RF2 preferred description language refSetId to use for computing concept preferred names
  • loader.defaultPreferredNames.acceptabilityId - specified in the properties file specified by run.config

    • This is the RF2 language refset acceptability typeId to use for computing concept preferred names

 

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

Project: admin/loader

Configuration Parameters

  • A profile indicating ClaML must be specified
    • e.g. -PClaML
    • See profiles in the pom.xml
  • run.config - the standard configuration file specified as a -D parameter
  • input.file - the input ClaML file
  • terminology - the ClaML-based terminology being loaded (e.g. ICD10)

Sample

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

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

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

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

 

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 -PClaML -Drun.config=~/config/config.properties -Dterminology=ICPC -Dinput.file=~/data/icpc-2.xml install

... perhaps a failure occurs here during the process

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

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

 

  • n/a