NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

Beyond these methods, 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 a central mapping class where the coding scheme creation is kicked off.    Other classes, when necessary, are supportive to this central class. 

Tasks to be Accomplished

These classes are generally classified by those that are responsible for either reading a source file or accessing an API that reads the file for you and those that map objects created from that file into LexEVS coding scheme metadata, entity and relationship objects. 

Mapping Entry Point

In the lbConverter project  the edu.mayo.informatics.lexgrid.convert.directConversions.medDRA package contains the classes that do much of the work of the MedDRA load into LexGrid.  edu.mayo.informatics.lexgrid.convert.directConversions.medDRA.MedDRA2LGMain provides a central kickoff point with some methods that can be wrapped for load and validation responsibilities down further up the execution chain.

Read the Data to Source Model Objects

This package also contains edu.mayo.informatics.lexgrid.convert.directConversions.medDRA.MedDRAMapToLexGrid 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 this 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. 

Map the Model Objects to LexGrid Model Objects

Once done the MedDRAMapToLexGrid  can map data objects derived from the MedDRA source into a complete coding scheme object. 

Recap and Passing Control Back to BaseLoader

So the tasks are to read the file into some kind of logical model or bean class object.  Organize these objects or make them available to be mapped into LexEVS objects, tie all objects together as a coding scheme, and pass this potentially large coding scheme object to LexEVS to be persisted to the database.  Back up the execution chaing chain in MeDRALoaderImpl the doLoad method first calls the mapping method of the conversion class MedDRA2LGMain, then passes control of the resulting coding scheme to BaseLoader by calling this.persistCodingSchemeToDatabase method on the BaseLoader super class. 

...