Overview
This page documents the use of admin tools for loading and removing snapshots of terminologies.
Prerequisites
For this mojo to run, a MySQL database must already exist (e.g. "mappingservicedb").
The Create/Update DB mojo must also have already run so that the database schema exists.
Details
This tool is used to rebuild Lucene indexes for objects indexed by the system.
Indexes are written into the directory specified by the hibernate.search.default.indexBase property in the
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 must be specified matching one of the RF2 terminologies supported in the config file
- e.g. SNOMEDCT
- See profiles in the pom.xml
- run.config - the standard configuration file specified as a -D parameter
- loader.<TERMINOLOGY>.input.data - specified in the properties file specified by run.config.
- This is the path to the RF2 input directory
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
Following are some details about the implementation of the ClaML loader:
Mojo: TerminologyRf2SnapshotLoaderMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)Project: admin/loader
Configuration Parameters
- A profile must be specified matching one of the ClaML terminologies supported in the config file
- e.g. ICD10, ICPC, or ICD9CM.
- See profiles in the pom.xml
- e.g. ICD10, ICPC, or ICD9CM.
- run.config - the standard configuration file specified as a -D parameter
- loader.<TERMINOLOGY>.input.data - specified in the config file specified by run.config where TERMINOLOGY matches the profile used.
- This is the path to the Claml file itself.
Following are some details about the implementation of the Terminology remover:
Mojo: TerminologyRemoverMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)
Project: admin/remover
Configuration Parameters
- A profile must be specified matching one of the terminologies supported in the config file
- e.g. SNOMEDCT, ICD10, ICPC, or ICD9CM.
- See profiles in the pom.xml
- run.config - the standard configuration file specified as a -D parameter
- Attempting to remove a terminology that is not loaded has no result.
Samples
Sample command line call of the admin tool to load SNOMEDCT:
% cd admin/loader % mvn -Drun.config=/home/ihtsdo/data/config.properties -P SNOMEDCT install |
Sample command line call of the admin tool to remove ICPC:
% cd admin/remover % mvn -Drun.config=/home/ihtsdo/data/config.properties -P 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 -Drun.config=/home/ihtsdo/data/config.properties -PICPC install ... perhaps a failure occurs here during the process # Run the remover % cd ~/code/admin/remover % mvn -Drun.config=/home/ihtsdo/data/config.properties -PICPC install # attempt to load ICPC again % cd ~/code/admin/loader % mvn -Drun.config=/home/ihtsdo/data/config.properties -PICPC install |
References/Links
- n/a