Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This page documents the use of admin tools to load or remove map records.  This is used to take mappings from a legacy system and install them into the new environment.

 

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.
  • A map project must exist with a refset id matching the data intended to be loaded
    • Either create a map project and configure it properly
    • Or import a map project
  • If using the "complex map refset" loader, the terminology version with the corresponding complex or extended map records must already be loaded (e.g. SNOMED CT).
  • IMPORTANT: The Tomcat server must not be running while this is run, otherwise indexes can get corrupted.

 

Details

This tool is used to load map records from either a loaded terminology (e.g. SNOMED CT) or from an RF2 file.  In either case, there is an alignment that must exist between the refset id in the file (or database) and the refset id of one of the map projects defined in the system.  Typically this process should only be run once for each map project and if data needs to be reloaded, the remover should be run first

  

Following are some details about the loader implementations:

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

Project: admin/loader

Configuration Parameters

  • A profile of "CreateMapRecords" must be specified
  • run.config - the standard configuration file specified as a -D parameter
  • refset.id - a comma-separated list of refset ids to create map records for specified as a -D parameter
    • Map projects with these refset ids must exist.

 

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

Project: admin/loader

Configuration Parameters

  • A profile of "MapRecords" must be specified
  • run.config - the standard configuration file specified as a -D parameter
  • loader.complexmap.input.data file  - specified in the properties file specified by the run.config setting and indicates the RF2 file to loadinput file specified as a -D parameter
    • Map projects with the refset ids specfiied in this file must exist

Related

  • You may also see the mojo MapRecordRf2ComplexMapSampleLoaderMojo.java.  This is a special purpose mojo for loading map records being incrementally developed using other tooling into this tooling environment with a particular sampling ratio.  Unless you specifically need this, the mojo should be avoided.

 

Following are some details about the remover implementation:

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

Project: admin/remover

Configuration Parameters

  • A profile of "MapRecords" must be specified
  • run.config - the standard configuration file specified as a -D parameter
  • refset.id - a comma-separated list of refset ids to remove map records for specified as a -D parameter
    • Map projects with these refset ids must exist.

Samples

Sample command line call of the admin tool to load map records from complex/extended map refset entries for refsets 447563008 and 447562003:

Code Block
% cd ~/code/admin/loader
% mvn -Drun.config=/home/ihtsdo/data/config.properties -PCreateMapRecords -Drefset.id=447563008,447562003 install

 

Sample command line call of the admin tool to load map records from an RF2 file:

Code Block
% cd ~/code/admin/loader
% mvn -Drun.config=~/config/config.properties -PMapRecords -Dinput.file=~/data/der2_iisssccRefset_ExtendedMapSnapshot_INT_20140131.txt install

 

Sample command line call of the admin tool to remove map records for for refsets 447563008 and 447562003:

Code Block
% cd ~/code/admin/remover
% mvn -Drun.config=~/config/config.properties -PMapRecords -Drefset.id=447563008,447562003 install

 

Sample Eclipse run configuration to load map records from complex map refset entries for refsets 447563008 and 447562003:


Sample Eclipse run configuration to load map records from an RF2 file:

Sample Eclipse run configuration to remove map records for refsets 447563008 and 447562003:

Troubleshooting

If anything goes wrong while loading map records, the remover can simply be used to clear the state and try again. The main two strategies for loading the mapping tool are
Load a terminology that contains mappings to be further maintained -> in which the "CreateMapRecords" mode is used.

Load records from another system that are not published with the terminology and are now going to be maintained -> in which the approach of loading an RF2 file of the map records is used.

  • n/a