NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

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

      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:

Image Removed

LexEVS Pick List Service API

LexEVS Pick List Definition Services provides three major functions:

  • Administration function
  • Query function and
  • Resolve function

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.

loadPickList(PickListDefinition pldef, String systemReleaseURI, Mappings mappings)

Description:

Loads supplied Pick List Definition object

Input:

org.LexGrid.valueSets.PickListDefinition pldef - (Mandatory) pick list definition object to load
java.lang.String systemReleaseURI - (Optional) System Release URI this Pick List Definition belongs to.
org.LexGrid.naming.Mappings mappings - (Optional) List of Supported Attributes this Pick List Definition uses. |

Output:

none

Exception:

LBException

Implementation Details:

Implementation:

Step 1: Call this method on the associated LexEVS Pick List Service instance to load the Pick List Definition object and the System Release URI that this definition belongs to.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

Panelcode


h2. 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:title=Note}
These administration operations can be performed in LexEVS 'Local' environment only. This can not be performed using LexEVS Distributed environment.
{info}
* *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|http://informatics.mayo.edu/LexGrid/downloads/LexGrid%20Model/schemas/2010/01/EA/index.htm]

h2. 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:

!LexEVSPickListDefinitionServices.jpg!

h2. LexEVS Pick List Service API
LexEVS Pick List Definition Services provides three major functions:
* Administration function
* Query function and
* Resolve function

Each of these functions are described in following sections.


h2. Administration Functions

LexEVS Pick List Definition Services provides following administration functions :
* Load 
* Export and
* Remove 

{info:title=Note}
These administration operations can be performed in LexEVS 'Local' environment only. This can not be performed using LexEVS Distributed environment.
{info}

h3. 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.


h4. Loading Pick List Definition Object

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

{{loadPickList(PickListDefinition pldef, String systemReleaseURI, Mappings mappings)}}

| Description: | Loads supplied Pick List Definition object |
| Input: | 
_org.LexGrid.valueSets.PickListDefinition_ pldef - (Mandatory) pick list definition object to load
_java.lang.String_ systemReleaseURI - (Optional) System Release URI this Pick List Definition belongs to.
_org.LexGrid.naming.Mappings_ mappings - (Optional) List of Supported Attributes this Pick List Definition uses. |
| Output: | none |
| Exception: | _LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to load the Pick List Definition object and the System Release URI that this definition belongs to.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListDefinitionServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Create and populate the PickListDefinition object.
Panel

org.LexGrid.valueSets.PickListDefinition pickList = new org.LexGrid.valueSets.PickListDefinition();
pickList.setPickListId(pickListId);
pickList.setRepresentsValueSetDefinition(vdURI);
pickList.setCompleteSet(true);
pickList.setDefaultEntityCodeNamespace(ecns);
pickList.setDefaultLanguage("en");
pickList.setDefaultSortOrder("asc");
pickList.setIsActive(true);
pickList.setEntityDescription(red);

Code Block

Similarly, PickListEntryNode, Property, and Mapping objects can be created and assigned to the pickList object.
Panel

_pickList.getPickListEntryNode.add(pickListEntry);
_pickList.setProperties(propertisObject);
_pickList.setMappings(mappingsObject);

''
Code Block

* _Step 3:_ Call the load method by passing the Pick List Definition object and the System Release URI.
Panel

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

...

Loading Pick List Definitions in File

This function can be used to load Pick List

Code Block
 |

h4. 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.

...



{{loadPickList(String xmlFileLocation, boolean failOnAllErrors)

...

}}

| Description:

...

 | Loads Pick List Definitions found in input xml file.

...

 |
| Input:

...

 | 
_java.lang.String_ xmlFileLocation - (Mandatory) File containing Pick List Definition(s) in LexGrid XML format.

...


_boolean_ failOnErrors - (Optional) default is false. |

...


| Output:

...

none

...

Exception:

...

LBException

...

Implementation Details:

...

Implementation:

Step 1: Call this method on the associated LexEVS Pick List Service instance to load all Pick List Definitions found in an XML file that is in LexGrid format.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

Panel
 | none |
| Exception: | _LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1_: Call this method on the associated LexEVS Pick List Service instance to load all Pick List Definitions found in an XML file that is in LexGrid format.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListDefinitionServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Call load method by passing the inputfile location and boolean flag whether to stop on load errors:

...

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.

<u>exportPickListDefinition(String pickListId, String xmlFolderLocation, boolean overwrite, boolean failOnAllErrors)</u>

...

Description:

...

Export Pick List Definition to a file in LexGrid XML format.

...

Input:

java.lang.String pickListId- (Optional) id of pick list definition to export
java.lang.String xmlFullPathName - (Mandatory) Location to save the definition

...

Code Block
 |


h3. 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.

h4. 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.

{{exportPickListDefinition(String pickListId, String xmlFolderLocation, boolean overwrite, boolean failOnAllErrors)}}

| Description: | Export Pick List Definition to a file in LexGrid XML format. |
| Input: | 
_java.lang.String_ pickListId- (Optional) id of pick list definition to export
_java.lang.String_ xmlFullPathName - (Mandatory) Location to save the definition

boolean overwrite - True: to override the existing file.
boolean failOnAllErrors - True: stops exporting if any error. |

Code Block

| Output:

...

none

...

Exception:

 | none |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

...

Implementation:

...

_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_Call this method on the associated LexEVS Pick List Service instance to export the Pick List Definition to a file in LexGrid XML format.

...

 
*_Sample Call:

...

_*
* _Step 1:_ Instantiate LexEVSPickListDefinitionServices if it is not done yet :

...

panel

org.lexgrid.valuesets.LexEVSPickListDefinitionServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Call exportPickListDefinition method and provide parameter values :
Panel

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

...

Remove Pick List Definition

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

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

...

Description:

...

Removes supplied Pick List Definition from the system.

...

Input:

...

java.lang.String

...

Output:

...

none

...

Exception:

Code Block
 |


h3. Remove Pick List Definition

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

{{removePickList(String pickListId)}}

| Description: | Removes supplied Pick List Definition from the system. |
| Input: | _java.lang.String_ |
| Output: | none |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

...

Implementation:

Step 1: Call this method on the associated LexEVS Pick List Service instance to remove Pick List Definition from the system that matches the supplied pickListId.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

Panel
_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to remove Pick List Definition from the system that matches the supplied pickListId.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Call removePickList method:

...

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:

java.net URI xmlFileLocation - (Mandatory) File containing PickListDefinition(s) in LexGrid XML format.

Panel

int validationLevel - validatation level includes :

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

...

Output:

...

none

...

Exception:

Code Block
 |

h2. Query Functions

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


h3. Validate XML resources

{{validate(URI uri, int valicationLevel)}}

|
| Description: | Perform validation of the candidate resource without loading data. |
| Input: | _java.net URI_ xmlFileLocation - (Mandatory) File containing PickListDefinition(s) in LexGrid XML format.
_int_ validationLevel_ - validatation level includes:
* 0 = Verify document is well-formed
* 1 = Verify document is valid |
| Output: | none |
| Exception: | _Org.LexGrid.LexBIG.Exceptions.LBParameterException

...

Implementation Details:

...

Implementation:

Step 1: Call this method on the associated LexEVS Pick List Service instance to validate the XML file that is in LexGrid format. This call will not load the data in an XML file.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

Panel
_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to validate the XML file that is in LexGrid format. This call will not load the data in an XML file.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Call validate method for validation by supplying URI of the XML file and validation level.
Panel

plServ.validate(uriOfXMLFile, true);

...

getPickListDefinitionById

Code Block
 |


h3. getPickListDefinitionById

{{getPickListDefinitionById(String pickListId)

...

}}

| 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:

Step 1: Call this method on the associated LexEVS Pick List Service instance to get Pick List Definition for supplied pickListId.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

panel
_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to get Pick List Definition for supplied pickListId.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Call getPickListDefinitionById method:
Panel

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

...

getPickListDefinitionIdForValueSetDefinitionUri

Code Block
 |



h3. getPickListDefinitionIdForValueSetDefinitionUri

{{getPickListDefinitionIdForValueSetDefinitionUri(URI valueSetDefinitionURI)

...

}}

| 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:

Step 1: Call this method on the associated LexEVS Pick List Service instance to get all the Pick List Definitions that are represented by supplied Value Set Definition URI.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

Panel
_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to get all the Pick List Definitions that are represented by supplied Value Set Definition URI.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Call getPickListDefinitionIdForValueSetDefinitionUri method:
Panel

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

...

getPickListValueSetDefinition

Code Block
 |

h3. getPickListValueSetDefinition

{{getPickListValueSetDefinition(String pickListId)

...

}}

| 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:

Step 1: Call this method on the associated LexEVS Pick List Service instance to get a Value Set Definition URI represented by supplied pickListId.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

Panel
_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to get a Value Set Definition URI represented by supplied pickListId.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Call getPickListValueSetDefinition method:
Panel

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

...

listPickListIds

Code Block
 |


h3. listPickListIds

{{listPickListIds()

...

}}

| Description:

...

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

...

 |
| Input:

...

none

...

Output:

 | none |
| Output: | _java.util.List<java.lang.String>_ - list of available pickListIds

...

 |
| Exception:

...

 | _org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

...

Implementation:

Step 1: Call this method on the associated LexEVS Pick List Service instance to get all the PickListIds that are loaded in the system.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

Panel
_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to get all the PickListIds that are loaded in the system.
 *_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Call listPickListIds method:

...

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.

There are two separate functions available to resolve pick list definition :

  • 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

resolvePickList(String pickListId, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)

Description:

Resolves pickList definition for supplied pickListId.

Input:

java.langString pickListId - (Mandatory) pickListId of a pickListDefinition.
boolean sortByText - If True; the resolved pickListEntries will be sorted by text in ascending order.

Code Block
 |


h2. 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.

There are two separate functions available to resolve pick list definition :
* 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.


h3. 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.


h4. resolvePickList

{{resolvePickList(String pickListId, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)}}

| Description: | Resolves pickList definition for supplied pickListId. |
| Input: | _java.langString_ pickListId - (Mandatory) pickListId of a pickListDefinition.
_boolean_ sortByText - If True; the resolved pickListEntries will be sorted by text in ascending order.
_org.LexGrid.LexBIG.DataModel.Collections.AbsoluteCodingSchemeVersionReferenceList_ csVersionList - (Optional) a list of coding scheme URI's and versions to be used.  These will be used only if they are present in the service.  If absent, the most recent version will be used instead.

...


_java.lang.String_ versionTag - (Optional) the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing. |

...


| Output:

...

 | 
_org.lexgrid.valuesets.dto.ResolvedPickListEntryList_ - Resolved PickListEntries |

...


| Exception:

...

 | _org.LexGrid.LexBIG.Exceptions

...

Implementation Details:

...

Implementation:

Step 1: Call this method on the associated LexEVS Pick List Service instance to get the resolved Pick List Entries for the supplied pickListId. Optionally, if sortByTests is true, sort the pickText in the list.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

Panel
.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to get the resolved Pick List Entries for the supplied pickListId. Optionally, if sortByTests is true, sort the pickText in the list.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Populate coding scheme versions list object:

...

panel

String codingSchemeName = "Automobiles";
String version = "1.1";
AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));

Code Block

* _Step 3:_ Call resolvePickList method:

...

panel

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

...

resolvePickList

Code Block
 |

h4. resolvePickList

{{resolvePickList(String pickListId, Integer sortType, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)

...

}}

| 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:

...

 | _java.langString_ pickListId - (Mandatory) pickListId of a pickListDefinition.

...


_java.lang.Integer_ sortType - Sort type for pick text : 1-Ascending, 2-Descending, and 3-Custom

...


_org.LexGrid.LexBIG.DataModel.Collections.AbsoluteCodingSchemeVersionReferenceList_ csVersionList - (Optional) a list of coding scheme URI's and versions to be used.  These will be used only if they are present in the service.  If absent, the most recent version will be used instead.

...


_java.lang.String_ versionTag - (Optional) the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing. |
|

...

 Output:

...

 | _org.lexgrid.valuesets.dto.ResolvedPickListEntryList_ - Resolved PickListEntries |

...


| Exception:

...

 | _org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

...

Implementation:

Step 1: Call this method on the associated LexEVS Pick List Service instance to get the resolved Pick List Entries for the supplied pickListId. Optionally, pickText can be sorted in Ascending, Descending or in Custom order.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

Panel
_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to get the resolved Pick List Entries for the supplied pickListId. Optionally, pickText can be sorted in Ascending, Descending or in Custom order.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Populate coding scheme versions list object:
Panel

String codingSchemeName = "Automobiles";
String version = "1.1";
AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));

Code Block

* _Step 3:_ Call resolvePickList method:

...

panel

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

...

resolvePickListForTerm

Wiki Markup

Code Block
 |


h4. resolvePickListForTerm

{{resolvePickListForTerm(String pickListId, String term, String matchAlgorithm, String language, String\[\] context, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag))}}

...



| Description:

...

 | Resolves pickList definition by

...

Input:

 applying &nbsp;supplied arguments. |
| Input: | _java.lang.String_ pickListId - (Mandatory) pickListId of a pickListDefinition. This is required argument.

...


_java.lang.String_ term - (Mandatory) Term to restrict. This is required argument.

...


_java.lang.String_ matchAlgorithm - (Optional) match algorithm to use. Default - LuceneQuery

...


_java.lang.String_ language - (Optional) language to restrict.

...


_java.lang.String[]_ context - (Optional) list of context to restrict.

...


_boolean_ sortByText - If True; the resolved pickListEntries will be sorted by text in ascending order.

...


_org.LexGrid.LexBIG.DataModel.Collections.AbsoluteCodingSchemeVersionReferenceList_ csVersionList - (Optional) a list of coding scheme URI's and versions to be used.  These will be used only if they are present in the service.  If absent, the most recent version will be used instead.

...


_java.lang.String_ versionTag - (Optional) the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing. |

...


| Output:

...

 | 
_org.lexgrid.valuesets.dto.ResolvedPickListEntryList_ - Resolved PickListEntries. |
|

...

 Exception:

...

 | _org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

...

Implementation:

Step 1: Call this method on the associated LexEVS Pick List Service instance to get list of Pick List Entries that match the term supplied and meet other supplied restrictions.

Sample Call:

Step 1: Instantiate LexEVSPickListServices if it is not done yet :

panel
_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to get list of Pick List Entries that match the term supplied and meet other supplied restrictions.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :

org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

Code Block

* _Step 2:_ Populate coding scheme versions list object:
Panel

String codingSchemeName = "Automobiles";
String version = "1.1";
AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));

...

Step

Code Block

* _Step 3:_ Call resolvePickListForTerm method:
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

resolvePickList(PickListDefinition pickList, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)

Description:

Resolves supplied pick list definition object.

Input:

Code Block
 |

h3. 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.


h4. resolvePickList

{{resolvePickList(PickListDefinition pickList, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)}}

| Description: | Resolves supplied pick list definition object. |
| Input: | _org.LexGrid.valueSets.PickListDefinition_ pickList - (Mandatory) pickListDefinition object to resolve.

...


_boolean_ sortByText - If True; the resolved pickListEntries will be sorted by text in ascending order.

...


_org.LexGrid.LexBIG.DataModel.Collections.AbsoluteCodingSchemeVersionReferenceList_ csVersionList - (Optional) a list of coding scheme URI's and versions to be used.  These will be used only if they are present in the service.  If absent, the most recent version will be used instead.

...


_java.lang.String_ versionTag - (Optional) the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing. |

...


| Output:

...

 | _org.lexgrid.valuesets.dto.ResolvedPickListEntryList_ - Resolved PickListEntries |

...


| Exception:

...

 | _org.LexGrid.LexBIG.Exceptions.LBException

...

Implementation Details:

...

Implementation:

Step 1: Call this method on the associated LexEVS Pick List Service instance to get the resolved Pick List Entries for the supplied pickListId. Optionally, if sortByTests is true, sort the pickText in the list.

Sample Call:

...

_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Pick List Service instance to get the resolved Pick List Entries for the supplied pickListId. Optionally, if sortByTests is true, sort the pickText in the list.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSPickListServices if it is not done yet :
_org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();

...

_
* _Step 2:_ Populate PickListDefinition object :
Panel

PickListDefinition pickList = new PickListDefinition();
pickList.setCompleteSet(Boolean.TRUE);
pickList.setDefaultEntityCodeNamespace("Automobiles");
pickList.setDefaultLanguage("en");
pickList.setRepresentsValueSetDefinition("SRITEST:AUTO:GM");
pickList.setPickListId("PLObject");
pickList.setStatus("active");

Code Block

* _Step 2

...

:_ Populate coding scheme versions list object:
Panel

String codingSchemeName = "Automobiles";
String version = "1.1";
AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));

Code Block

* _Step 3:_ Call resolvePickList method:
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

Code Block
 |


h3. 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.

h2. 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.

h2.

...

 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:

Code Block

-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

...

Code Block


Example:
Panel

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

Code Block



h2. 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.

...



<source>

<?xml version="1.0" encoding="UTF-8"?>
<pickListDefinition pickListId="SRITEST:AUTO:DomesticAutoMakers" representsValueSetDefinition="SRITEST:AUTO:DomesticAutoMakers" isActive="true" defaultEntityCodeNamespace="Automobiles" defaultLanguage="en" completeSet="false">

Panelcode

    <owner>Owner for Domestic Auto Makers</owner>


    <entityDescription>DomesticAutoMakers</entityDescription>

<mappings>
<supportedCodingScheme

    <mappings>
        <supportedCodingScheme localId="Automobiles" uri="urn:oid:11.11.0.1">Automobiles</supportedCodingScheme>

<supportedDataType

        <supportedDataType localId="texthtml">text/html</supportedDataType>

<supportedDataType

        <supportedDataType localId="textplain">text/plain</supportedDataType>

<supportedLanguage
 
        <supportedLanguage localId="en" uri="www.en.org/orsomething">en</supportedLanguage>

<supportedNamespace

        <supportedNamespace localId="Automobiles" uri="urn:oid:11.11.0.1" equivalentCodingScheme="Automobiles">Automobiles</supportedNamespace>

<supportedProperty

        <supportedProperty localId="definition">definition</supportedProperty>

<supportedProperty

        <supportedProperty localId="textualPresentation">textualPresentation</supportedProperty>

<supportedSource

        <supportedSource  assemblyRule="rule1" uri="http://informatics.mayo.edu" localId="lexgrid.org">lexgrid.org</supportedSource>

<supportedSource

        <supportedSource localId="_111101">11.11.0.1</supportedSource>


    </mappings>


    <pickListEntryNode pickListEntryId="PL005p1" isActive="true">

<owner>Owner for

        <owner>Owner for PL005p1</owner>

<entryState

        <entryState containingRevision="R001" relativeOrder="1" changeType="NEW" prevRevision="R00A"
/>
<inclusionEntry
/>
        <inclusionEntry entityCode="005" entityCodeNamespace="Automobiles" propertyId="p1">

<pickText>Domestic Auto Makers</pickText>
<pickContext>Domestic Auto Makers</pickContext>
<pickContext>Cars</pickContext>
</inclusionEntry>
<properties>
<property

            <pickText>Domestic Auto Makers</pickText>
            <pickContext>Domestic Auto Makers</pickContext>
            <pickContext>Cars</pickContext>
        </inclusionEntry>
        <properties>
            <property propertyName="definition">

<entryState

                <entryState containingRevision="R001" relativeOrder="1" changeType="NEW" prevRevision="R00A"/>

<value

                <value dataType="textplain">Definition for Domestic Auto Makers</value>


            </property>


        </properties>


    </pickListEntryNode>


    <pickListEntryNode pickListEntryId="PL005p2" isActive="true">

<entryState

        <entryState containingRevision="R001" relativeOrder="1" changeType="NEW" prevRevision="R00A"/>

<inclusionEntry

        <inclusionEntry entityCode="005" entityCodeNamespace="Automobiles" propertyId="p2">

<pickText>American Car

            <pickText>American Car Companies</pickText>

</inclusionEntry>
<properties>
<property

        </inclusionEntry>
        <properties>
            <property propertyName="definition">

<entryState

                <entryState containingRevision="R001" relativeOrder="1" changeType="NEW" prevRevision="R00A"/>

<value

                <value dataType="textplain">Definition for Amerocan Auto Makers</value>


            </property>


        </properties>


    </pickListEntryNode>

</pickListDefinition>

Code Block

</source>

...

Installation / Packaging

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

...