NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

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 :
    Code Block
     org.lexgrid.valuesets.LexEVSPickListDefinitionServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();
    
  • Step 2: Create and populate the PickListDefinition object.
    Code Block
     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);
    
    Similarly, PickListEntryNode, Property, and Mapping objects can be created and assigned to the pickList object.
    Code Block
     _pickList.getPickListEntryNode.add(pickListEntry);
     _pickList.setProperties(propertisObject);
     _pickList.setMappings(mappingsObject);
    
  • Step 3: Call the load method by passing the Pick List Definition object and the System Release URI.
    Code Block
     plServ.loadPickList(pickList,"Release 2010", null); 

...

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 :
    Code Block
     org.lexgrid.valuesets.LexEVSPickListDefinitionServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();
    
  • Step 2: Call load method by passing the inputfile location and boolean flag whether to stop on load errors:
    Code Block
     plServ.loadPickList(inputXMLFile, true);
    

...

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

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

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 export the Pick List Definition to a file in LexGrid XML format.
Sample Call:

  • Step 1: Instantiate LexEVSPickListDefinitionServices if it is not done yet :
    Code Block
     org.lexgrid.valuesets.LexEVSPickListDefinitionServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();
    
  • Step 2: Call exportPickListDefinition method and provide parameter values :
    Code Block
     plServ.exportPickListDefinition(valueSetDefinitionURI, null, true, false); 
    

...

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

Validate XML

...

Resources

validate(URI uri, int valicationLevel)

...

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.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 :
    Code Block
     org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();
    
  • Step 2: Populate coding scheme versions list object:
    Code Block
     String codingSchemeName = "Automobiles";
     String version = "1.1";
     AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
     csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));
    
  • Step 3: Call resolvePickList method:
    Code Block
     ResolvedPickListEntryList pleList = plServ.resolvePickList("AUTO:DomesticAutoMakers", true, csVersionList, "PRODUCTION");
    

...

Description:

Resolves pickList definition by applying  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 :
    Code Block
     org.lexgrid.valuesets.LexEVSPickListServices plServ = org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl.defaultInstance();
    
  • Step 2: Populate coding scheme versions list object:
    Code Block
     String codingSchemeName = "Automobiles";
     String version = "1.1";
     AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
     csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));
    
  • Step 3: Call resolvePickListForTerm method:
    Code Block
     ResolvedPickListEntryList pleList = plServ.resolvePickListForTerm ("AUTO:DomesticAutoMakers","Jaguar", MatchAlgorithms.exactMatch.name(), "en", null, true, csVersionList, "PRODUCTION");
    

...

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

...

Code Block

    <owner>Owner for Domestic Auto 

...

Makers</owner>

...


    <entityDescription>DomesticAutoMakers</entityDescription>

...


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

...


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

...


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

...

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

...


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

...


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

...


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

...


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

...


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

...


    </mappings>

...


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

...


        <owner>Owner for PL005p1</owner>

...


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

...


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

...


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

...


                <entryState containingRevision="R001" relativeOrder="1" changeType="NEW"

...

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

...


            </property>

...


        </properties>

...


    </pickListEntryNode>

...


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

...


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

...

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

...


            <pickText>American Car Companies</pickText>

...


        </inclusionEntry>

...


        <properties>
            <property propertyName="definition">
                <entryState containingRevision="R001" relativeOrder="1" changeType="NEW" prevRevision="R00A"/>

...


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

...


            </property>

...


        </properties>

...


    </pickListEntryNode>
Code Block

</pickListDefinition>

Code Block

</source>

Installation / Packaging

...