NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

Page info
title
title

Panel
titleContents of this Page
Table of Contents
minLevel2

...

Introduction

The Pick List services are integrated parts of the LexEVS API. It provide three major functions:

...

...

  • Administration - Ability to load, export and remove Pick List Definitions
    • Loader - Ability to load Pick List Definitions programmatically into the LexGrid repository using the domain objects that are available via the LexGrid logical model
    • Exporter - Ability to export Pick List Definition and Pick List Resolution to a file in LexGrid XML format
    • Remove - Ability to remove Pick List Definition from the system
      Info
      titleNote
      :panel

      These administration operations can be performed in LexEVS 'Local' environment only. This can not be performed using LexEVS Distributed environment.

      *

  • Query - Ability to apply user restrictions (ex: PickListId) and dynamically resolve the definitions at run time
  • *Resolve - Ability to resolve Pick List Definition dynamically against selected Coding Scheme Version(s) and return all/selected terms of the concepts belonging to the pick list

The LexEVS Pick List Services expose the API particularly for the Pick List Definition elements of the LexGrid Logical Model. For more information on LexGrid model see the LexGrid model schema

LexEVSPickListDefinitionServices Class Diagram

LexEVSPickListDefinitionServices is the main interface for all the services provided by LexEVS Pick List API. Here is the class diagram of LexEVSPickListDefinitionServices:

LexEVS Pick List Service API

LexEVS Pick List Definition Services provides three major functions:

...

Each of these functions are described in following sections.

Administration Functions

LexEVS Pick List Definition Services provides following administration functions :

  • Load
  • Export and
  • Remove
Info
titleNote

...

These administration operations can be performed in LexEVS 'Local' environment only. This can not be performed using LexEVS Distributed environment.

Load Functions

  • Loading Pick List Definition Object - This function provides the capability to load supplied PickListDefinition object into the system.
  • Loading Pick List Definitions in file - This function provides the capability to load Pick List Definitions found in file that are in LexGrid XML format.

Loading Pick List Definition Object

This function can be used to load supplied Pick List Definition object to the system.

<u>loadPickList(PickListDefinition pldef, String systemReleaseURI, Mappings mappings)</u>

Description:

Loads supplied Pick List Definition object

Input:

...

Panel

''plServ.loadPickList(pickList,"Release 2010", null); |

Loading Pick List Definitions in file

This function can be used to load Pick List Definition(s) to the system from a file that is in LexGrid XML format.

<u>loadPickList(String xmlFileLocation, boolean failOnAllErrors)</u>

Description:

Loads Pick List Definitions found in input xml file.

Input:

...

Panel

plServ.loadPickList(inputXMLFile, true); |

Export Pick List

The only export function available :

  • Export Pick List Definition - This function provides the capability to export Pick list Definition to a file in LexGrid XML format. This will be helpful if there is a need to import this exported Pick List Definition in different instance of LexEVS.

Export Pick List Definition

This function provides the capability to export Pick List Definition to a file in LexGrid XML format. This will be helpful if there is a need to import this exported Pick List Definition in different instance of LexEVS.

...

Panel

plServ.exportPickListDefinition(valueSetDefinitionURI, null, true, false); |

Remove Pick List Definition

This function provides the capability to remove pick list definition from the system.

...

Panel

plServ.removePickList ("AUTO:AllDomesticANDGM"); |

Query Functions

Here are some of the query functions that can be run against pick list definitions using the LexEVS Pick List Services.

Validate XML resources

<u>validate</u>

Description:

Perform validation of the candidate resource without loading data.

Input:

...

Panel

plServ.validate(uriOfXMLFile, true); |

getPickListDefinitionById

<u>getPickListDefinitionById(String pickListId)</u>

Description:

Returns pickList definition for supplied pickListId.

Input:

java.lang.String pickListId - (Mandatory) Id of a pickListDefinition

Output:

org.LexGrid.valueSets.PickListDefinition - Pick List Definition Object

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Implementation Details:

Implementation:

...

Panel

org.LexGrid.valueSets.PickListDefinition plDef = plServ.getPickListDefinitionById("AUTO:DomesticAutoMakers"); |

getPickListDefinitionIdForValueSetDefinitionUri

<u>getPickListDefinitionIdForValueSetDefinitionUri(URI valueSetDefinitionURI)</u>

Description:

Returns all the pickList definition id's that represent the supplied valueSetDefinition URI.

Input:

java.net.URI valueSetDefinitionURI - (Mandatory) URI of an value set definition

Output:

List<String> - List of Pick List Definition Id's that represents supplied valueSetDefURI.

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Implementation Details:

Implementation:

...

Panel

java.util.List<String> plDefs = pls.getPickListDefinitionIdForValueSetDefinitionUri(new URI("http://someDomain.html/ValueSets/NCIT/C3367_Value_set")); |

getPickListValueSetDefinition

<u>getPickListValueSetDefinition(String pickListId)</u>

Description:

Returns a URI of the represented value set definition of the pickList.

Input:

java.lang.String pickListId - (Mandatory) id of pick list definition

Output:

java.net.URI - Value Set Definition URI

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Implementation Details:

Implementation:

...

Panel

URI vsdURI = pls.getPickListValueSetDefinition("AUTO:DomesticAutoMakers"); |

listPickListIds

<u>listPickListIds()</u>

Description:

Returns a list of pickListIds that are available in the system.

Input:

none

Output:

java.util.List<java.lang.String> - list of available pickListIds

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Implementation Details:

Implementation:

...

Panel

java.util.List<String> plList = plServ.listPickListIds(); |

Resolve Functions

Resolve functions provides the capability to resolve the pick list definition against specific coding scheme version and get back the list of terms from the entities that belongs to the pick list. If no coding scheme version is provided, the API will pick the latest version of the coding scheme.

...

  • Resolve Stored Pick List Definition - This function allows you to resolve pick list definition that are loaded in the system.
  • Resolve Supplied Pick List Definition - This function allows you to pass a PickListDefinition object that may not be loaded in the system and get it resolved.

Resolving Stored Pick List Definition

This function resolves the Pick List Definition that is loaded in the system and returns set of valid terms of the concepts plus the code systems and its versions that were used.

resolvePickList

<u>resolvePickList(String pickListId, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)</u>

Description:

Resolves pickList definition for supplied pickListId.

Input:

...

Panel

ResolvedPickListEntryList pleList = plServ.resolvePickList("AUTO:DomesticAutoMakers", true, csVersionList, "PRODUCTION"); |

resolvePickList

<u>resolvePickList(String pickListId, Integer sortType, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)</u>

Description:

This method is similar to above method which resolves pickList definition for supplied pickListId. In addition to sorting the terms in Ascending or Descending, this method can be used to custom sort the terms.

Input:

...

Panel

ResolvedPickListEntryList pleList = plServ.resolvePickList("AUTO:DomesticAutoMakers", 3, csVersionList, "PRODUCTION"); |

resolvePickListForTerm

Wiki Markup
<u>*{{resolvePickListForTerm(String pickListId, String term, String matchAlgorithm, String language, String\[\] context, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag))*</u>}}

Description:

Resolves pickList definition by applying  supplied arguments.

Input:

...

Panel

ResolvedPickListEntryList pleList = plServ.resolvePickListForTerm ("AUTO:DomesticAutoMakers","Jaguar", MatchAlgorithms.exactMatch.name(), "en", null, true, csVersionList, "PRODUCTION"); |

Resolving Supplied Pick List Definition Object

This function resolves the supplied Pick List Definition object and returns set of valid terms of the concepts plus the code systems and its versions that were used.

resolvePickList

<u>resolvePickList(PickListDefinition pickList, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)</u>

Description:

Resolves supplied pick list definition object.

Input:

...

Panel

ResolvedPickListEntryList pleList = plServ.resolvePickList(pickList, true, csVersionList, "PRODUCTION"); |

Resolved Pick List Objects

Here are the resolved Objects from LexEVSPickListDefinitionServices :

  • ResolvedPickListEntry : contains resolved Pick List Entry Nodes.
  • ResolvedPickListEntryList : contains the list of resolved Pick List Entries. Also provides helpful features to add, remove, enumerate Pick List Entries.

Error Handling

LexEVS Pick List services uses org.LexGrid.LexBIG.Impl.loaders.MessageDirector to direct all fatal, error, warning, info messages with appropriate messages to the LexBIG log files in the 'log' folder of LexEVS install directory.

Along with MessageDirector, the services will also make use of org.LexGrid.LexBIG.exception.LBException to throw any fatal and error messages to the log file as well as to console.

Load Scripts

Scripts to load Pick List Definitions into LexEVS system will be located under 'Admin' folder of LexEVS install directory. These loader scripts will only load data in an XML file that is in LexGrid format.

LoadPickListDefinition.bat for Windows environment and
LoadPickListDefinition.sh for Unix environment.
Both of these scripts take in the following parameters:

Panelcode

-in
Input <uri>
URI or path specifying location of the source file.

-v

Panel

Validate <int>
Perform validation of the candidate resource without loading data. Supported levels of validation include:

...


 -in 
 Input <uri> 
 URI or path specifying location of the source file.

 -v
 Validate <int> 
 Perform validation of the candidate resource without loading data. Supported levels of validation include:

0 = Verify document is well-formed
1 = Verify document is valid 

Example:

Panel

sh LoadPickListDefinition.sh -in "file:///path/to/file.xml"

Sample Pick List Definitions XML File

Below is a sample XML file containing Pick List Definitions in LexGrid format that can be loaded using LexEVS Pick List Service.

...

</pickListDefinition>
</source>

Code Block

Installation / Packaging

Pick List service are integrated parts of core LexEVS API and are packaged and installed with other LexEVS services.

System Testing

The System test case for the LexEVS Pick List Definition service is performed using the JUnit test suite:

org.LexGrid.LexBIG.Impl.testUtility.VDAllTests

This test suite will be run as part of regular LexEVS test suites AllTestsAllConfigs and AllTestsNormalConfigs.

[LexEVS 6.0

...

Scrollbar
iconsfalse