NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

In theory the developer could at this point implement only doLoad by mapping content to a coding scheme object and persisting it before turning control over to BaseLoader which will call the doLoad method and set default load options in its load method and kick off the processes to persist a coding scheme object to the database.  The other option is to implement doLoad and override the load method which sets up end user option choices for the loader.   Most loaders implement the load method, customizing load options to provide to the end user.  In the case of the MedDRA loader, a CUI load option is provided to the end user.

Beyond these methods, where a coding scheme object is passed to LexEVS for processing, the structuring of code is largely and necessarily left up to the developer.  However a few common patterns are fairly consistent in this implementation.  Generally speaking, there is some kind of source reading mechanism and  there is a central mapping class where the coding scheme object is built.  Other classes, when necessary, are supportive to this central class. 

...

In the lbConverter project  the edu.mayo.informatics.lexgrid.convert.directConversions.medDRA package contains the classes that do much of the work of the load.  edu.mayo.informatics.lexgrid.convert.directConversions.medDRA.MedDRA2LGMain provides central kickoff point with some methods that can be wrapped for load and validation responsibilities down further up the execution chain. This package also contains edu.mayo.informatics.lexgrid.convert.directConversions.medDRA.MedDRAMapToLexGrid which does the active mapping of data objects derived from the MedDRA source and in this case also provides pushes the completed LexGrid correlations to the database.  So this contains read, map and store functions all in one class.  Notice the map method in MedDRAMapToLexGrid.  It calls three methods that separately load the coding scheme metadata, the entities and the relationships.   This level of granularity provides a guideline for what can safely be loaded into LexEVS separately and sometimes as parallel functions.with a readMedDRAFile that reads data from a CSV file and persists it to objects defined in package edu.mayo.informatics.lexgrid.convert.directConversions.medDRA.Data.  While data package defines some of the beans that model the content of lines read from the CSV file, it also organizes them into structures that are easier for the mapping code to user.  Once done the MedDRAMapToLexGrid  does the active mapping of data objects derived from the MedDRA source into a complete coding scheme object.