NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Contents of this Page
h2. Introduction
This document is a section of the [LexEVS 6.0 Programmer's Guide|LexEVS 6.0 Programmer's Guide]. NEEDS UPDATING

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

* *Administration* - Ability to load, export and remove value set definitions
** Loader - Ability to load Value Set Definitions programmatically into the LexGrid repository using the domain objects that are available via the LexGrid logical model
** Exporter - Ability to export Value Set Definition and Value Set Resolution to a file in LexGrid XML format
** Remove - Ability to remove Value Set 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: valueSet URI) and dynamically resolve the definitions at run time
 **Resolve* - Ability to resolve Value Set Definition dynamically against selected Coding Scheme Version(s) and return all the concepts belonging to the value set

The LexEVS Value Set Services expose the API particularly for the Value Set Definition elements of the LexGrid Logical Model. For more information on LexGrid model see the [LexGrid model schema|VKC:LexBig_Model_and_Schema]

h2. LexEVSValueSetDefinitionServices Class Diagram

LexEVSValueSetDefinitionServices is the main interface for all the services provided by LexEVS Value Set API. Here is the class diagram of LexEVSValueSetDefinitionServices:

!LexEVSValueSetDefinitionServices.jpg!

h2. LexEVS Value Set Definition Services API

LexEVS Value Set Definition Services provides three major functions:

* Administraion function
* Query function and
* Resolve function

Each of these functions are described in following sections.


h2. Administration Functions

LexEVS Value Set Definition Services provide s following administration functions:

* Load
* Export and 
* Remove value set definitions. 

{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. Loading Value Set Definitions

There are two methods that could be used to load Value Set Definitions:

* Loading Value Set Definition Object - This function provides the capability to load supplied ValueSetDefinition object into the system.
* Loading Value Set Definitions in file - This function provides the capability to load Value Set Definitions found in file that are in LexGrid XML format.

h4. Loading Value Set Definition Object
This function provides the capability to load supplied ValueSetDefinition object into the system.

{{loadSetValueSetDefinition(ValueSetDefinition vsddef, String systemReleaseURI, Mappings mappings)}}

| Description: | Loads supplied valueSetDefinition object. Optionally, it can assign the release URI and mappings (supported attributes like SupportedCodingScheme, SupportedConceptDomain, SupportedAssociation etc) to the valueSetDefinition being loaded. |
| Input: |  _org.LexGrid.valueSets.ValueSetDefinition_ vsdDef - (Mandatory) Value Set Definition object to be loaded.
_java.lang.String_ systemReleaseURI - (Optional) System Release URI this Value Set Definition belongs to.
_org.LexGrid.naming.Mappings_ mappings - (Optional) List of Supported Attributes this Value Set Definition uses. |
| Output: | none |
| Exception: | _LBException_ |
| Implementation Details: | 
*_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to load a Value Set Definition object and optionally assign the System Release URI and mappings to this definition. 
*_Sample Call:_* 
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet:

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Create and populate the ValueSetDefinition object.  
ValueSetDefinition object can be created using: 

org.LexGrid.valueSets.ValueSetDefinition vsd = new org.LexGrid.valueSets.ValueSetDefinition;

Data for ValueSetDefinition object can be populated by using set methods: 

vsd.setValueSetDefinitionURI(uri);
vsd.setValueSetDefinitionName(name);
vsd.setDefaultCodingScheme(cs);
vsd.setEntityDescription(ed);

Similarly, DefinitionEntry, Property, and Mapping objects can be created and assigned to the valueSetDefinition object:

vsd.getDefinitionEntry.add(vdEntry);
vsd.setProperties(propertisObject);
vsd.setMappings(mappingsObject);

* _Step 3:_ Call the load method by passing the Value Set Definition object and optionally the System Release URI and mappings:

vsdServ.loadValueSetDefinition(vsd, systemReleaseURI, mappings);

 |

h4. Loading Value Set Definitions in File
This function provides the capability to load Value Set Definitions found in file that are in LexGrid XML format.

{{loadValueSetDefinition(String xmlFileLocation, boolean failOnAllErrors)}}

| Description: | Loads valueSetDefinitions found in input XML file. The input XML file should in LexGrid format i.e. the contents should confirm to LexGrid valueSets schema [|
| Input: |  _java.lang.String_ xmlFileLocation - (Mandatory) File containing ValueSetDefinitions 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 Value Set Definition Service instance to load all Value Set Definitions found in an XML file that is in LexGrid format.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

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

vsdServ.loadvalueSetDefinition(inputXMLFile, true);

 |


h3. Export Value Set
There are two export functions available :
1. Export Value Set Definition - This function provides the capability to export Value Set Definition to a file in LexGrid XML format. This will be helpful if there is a need to import this exported Value Set Definition in different instance of LexEVS.
2. Export Value Set Resolution (Expanded Value Set) - This function provides the capability to resolve the Value Set Definition and exports the resolved(expanded) contents as a LexGrid Coding Scheme in XML format.

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

{{exportValueSetDefinition(URI valueSetDefURI, String valueSetDefinitionRevisionId, String xmlFullPathName, boolean overwrite, boolean failOnAllErrors)}}

| Description: | Export Value Set Definition to a file in LexGrid XML format. |
| Input: | _java.net.URI_ valueSetDefinitionURI - (Mandatory) the URI of value set definition to be exported.
_java.lang.String_ valueSetDefinitionRevisionId - (Optional) revision id of the value set 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. |

| Output: | none |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_Call this method on the associated LexEVS Value Set Definition Service instance to export the Value Set Definition to a file in LexGrid XML format. 
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call exportValueSetDefinition method and provide parameter values :

vsdServ.exportValueSetDefinition(valueSetDefinitionURI, null, true, false);

 |


h4. Export Value Set Resolution
This function provides the capability to export Value Set Resolution (Expanded Value Set) to a file in LexGrid XML format as a Coding Scheme. This will be helpful if there is a need to import the contents of a value set as a separate Coding Scheme. The URI of the Coding Scheme will be set to URI of Value Set Definition being exported. And all the contents of the value set will be represented as an entities within that Coding Scheme.

{{exportValueSetResolution(URI valueSetDefinitionURI, String valueSetDefinitionRevisionId, URI exportDestination, AbsoluteCodingSchemeVersionReferenceList csVersionList, String csVersionTag, boolean overwrite, boolean failOnAllErrors)}}

| Description: | Export Value Set Resolution to a file in LexGrid XML format as a Coding Scheme. |
| Input: | _java.net.URI_ valueSetDefinitionURI - (Mandatory) the URI of value set definition to be exported.
_java.lang.String_ valueSetDefinitionRevisionId - (Optional) revision id of the value set definition to export
_java.net.URI_ exportDestination - (Mandatory) Location to save the definition
 _org.LexGrid.LexBIG.DataModel.Collections.AbsoluteCodingSchemeVersionReferenceList_  csVersionList - 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.
 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 Value Set Definition Service instance to export the Value Set Resolution to a file in LexGrid XML format as Coding Scheme. 
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call exportValueSetResolution method and provide parameter values :

String codingSchemeName = "NCI_Thesaurus";
String version = "10.08e";
AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));
vsdServ.exportValueSetResolution(valueSetDefinitionURI, null, csVersionList, "PRODUCTION", true, false);

 |

h3. Remove Value Set Definition

Below is the function to remove value set definition from the system.

{{removeValueSetDefinition(URI valueSetDefinitionURI)}

| Description: | Removes supplied value set definition from the system. |
| Input: | _java.net.URI_ valueSetDefinitionURI - (Mandatory) the URI of value set definition to be removed. |
| Output: | none |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_Call this method on the associated LexEVS Value Set Definition Service instance to remove the Value Set Definition from the system that matches the supplied URI. 
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call removeValueSetDefinition method 

vsdServ.removeValueSetDefinition(valueSetDefinitionURI);

 |


h2. Query Functions

Here are some of the query functions that can be run against value set definitions using the LexEVS Value Set Definition Services.


h3. Validate XML Resources

Function to perform validation of source XML file without loading.

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

| Description: | Performs validation of the candidate resource without loading data. |
| Input: |  _java.net URI_ xmlFileLocation - (Mandatory) File containing ValueSetDefinitions 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.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to validate the XML file that is in LexGrid format. This call will not load the data in XML file. 
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

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

java.net URI xmlFileLocation = new URI("C:
myVSDFile.xml");
vsdServ.validaten(xmlFileLocation, true);

 |


h3. isEntityInValueSet

There are two methods to check if supplied concept code is part of supplied value set definition.

{{isEntityInValueSet(String entityCode, URI valueSetDefinitionURI, String valueSetDefinitionRevisionId, String versionTag)}}

| Description: | Determine whether the supplied entity code is a valid entity code somewhere in the supplied value set definition. This function is intended for use with simple value set definition that are drawn from a single coding scheme where most parameters can be defaulted. |
| Input: | _java.lang.String_ entityCode - (Mandatory) the entity code to search for
_java.net.URI_ valueSetDefinitionURI - (Mandatory) the URI of the value set definition to search
_java.lang.String_ valueSetDefintionRevisionId - (Optional) the version of the value set definition
_java.lang.String_ versionTag - (Optional) the version or tag (e.g. "devel", "production", etc.) to be used for <i>all</i> of the coding schemes searched. |
| Output: | _org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference_ - coding scheme and version if the entityCode is valid, null otherwise |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to determine if the supplied entity code is a valid in the supplied Value Set Definition URI. If it is, returns Coding Scheme URI and the Version that was used to resolve; otherwise, returns null.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call isEntityInValueSet method:

java.net.URI valueSetDefURI = new URI("http://someDomain.html/ValueSets/NCIT/C3367_Value_set");
String entityCode = "C3367";

AbsoluteCodingSchemeVersionReference acsvr = vsdServ.isEntityInValueSet(entityCode, valueSetDefURI, null, "PRODUCTION");

 |

h4. isEntityInValueSet(String entityCode, URI entityCodeNamespace, URI valueSetDefinitionURI, String valueSetDefinitionRevisionId, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)

{{isEntityInValueSet(String entityCode, URI entityCodeNamespace, URI valueSetDefinitionURI, String valueSetDefinitionRevisionId, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)}}

| Description: | Similar to the previous method, this method determines if the supplied entity code and entity namespace is a valid result for the supplied value set definition when resolved against the supplied Coding Scheme Version or Tag. |
| Input: | _java.lang.String_ entityCode - (Mandatory) the entity code to search for
_java.net.URI_ entityCodeNamespace - (Optional)the URI of the entity code namespace.  If omitted, the default coding scheme namespace for the value set definition will be used, if it is present. Otherwise the first matching entity code, if any, will pass
_java.net.URI_ valueSetDefinitionURI - (Mandatory) the URI of the value set definition to search
_java.lang.String_ valueSetDefintionRevisionId - (Optional) the version of the value set definition
_org.LexGrid.LexBIG.DataModel.Core. AbsoluteCodingSchemeVersionReference_ 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 version or tag (e.g. "devel", "production", etc.) to be used for <i>all</i> of the coding schemes searched. |
| Output: | _org.LexGrid.LexBIG.DataModel.Core. AbsoluteCodingSchemeVersionReference_ - The codingScheme URI and version of that asserts that the code is in the value set |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to determine if the supplied entity code and its entity namespace is valid in the supplied Value Set Definition URI when resolved against supplied Coding Scheme Version or Tag. If it is, return Coding Scheme URI and the Version that was used to resolve; otherwise, returns null.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call isEntityInValueSet method:

java.net.URI valueSetDefURI = new URI("http://someDomain.html/ValueSets/NCIT/C3367_Value_set");
String codingSchemeName = "NCI_Thesaurus";
String version = "10.08e";
String entityCode = "C3367";
String entityCodeNamespace = "NCI_Thesaurus";
AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));

AbsoluteCodingSchemeVersionReference acsvr = vsdServ.isEntityInValueSet(entityCode, entityCodeNamespace, valueSetDefURI, null, csVersionList, "PRODUCTION");

 |


h3. listValueSetsWithEntityCode

Returns all the value set definition uris that contains supplied entity code.

{{listValueSetsWithEntityCode(String entityCode, URI entityCodeNamespace, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)}}

| Description: | Returns all the value set definition uris that contains supplied entity code. |
| Input: | _java.lang.String_ entityCode - (Mandatory) the entity code to search for
_java.net.URI_ entityCodeNamespace - (Optional)the URI of the entity code namespace.  If omitted, the default coding scheme namespace for the value set definition will be used, if it is present. Otherwise the first matching entity code, if any, will pass
_org.LexGrid.LexBIG.DataModel.Core. AbsoluteCodingSchemeVersionReference_ 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 version or tag (e.g. "devel", "production", etc.) to be used for <i>all</i> of the coding schemes searched. |
| Output: | _java.util.List<String>_ - list of value set definition URIs that contain supplied entity code |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get all the value set definition uris that contain the the supplied entity code.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call listValueSetsWithEntityCode method:

String codingSchemeName = "NCI_Thesaurus";
String version = "10.08e";
String entityCode = "C3367";
String entityCodeNamespace = "NCI_Thesaurus";
AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));

AbsoluteCodingSchemeVersionReference acsvr = vsdServ.listValueSetsWithEntityCode(entityCode, entityCodeNamespace, csVersionList, "PRODUCTION");

 |


h3. getCodedNodeSetForValueSetDefinition

Returns unresolved CodedNodeSet populated using definition entries in the value set definition.

{{getCodedNodeSetForValueSetDefinition(URI valueSetDefinitionURI, String valueSetDefinitionRevisionId, AbsoluteCodingSchemeVersionReferenceList csVersionList, String csVersionTag)}}

| Description: | Returns unresolved CodedNodeSet populated using definition entries in the value set definition. |
| Input: | _java.net.URI_ valueSetDefinitionURI - (Mandatory) the URI of the value set definition
_java.lang.String_ valueSetDefintionRevisionId - (Optional) the version of the value set definition
_org.LexGrid.LexBIG.DataModel.Core. AbsoluteCodingSchemeVersionReference_ 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 version or tag (e.g. "devel", "production", etc.) to be used for <i>all</i> of the coding schemes searched. |
| Output: | _org.lexgrid.valuesets.dto.ResolvedValueSetCodedNodeSet_ - Unresolved CodedNodeSet populated using definition entries in the value set definition. |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get unresolved CodedNodeSet populated using definition entries in the value set definition
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call getCodedNodeSetForValueSetDefinition method:

java.net.URI valueSetDefURI = new URI("http://someDomain.html/ValueSets/NCIT/C3367_Value_set");
String codingSchemeName = "NCI_Thesaurus";
String version = "10.08e";
AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));

ResolvedValueSetCodedNodeSet rvsCNS = vsdServ.getCodedNodeSetForValueSetDefinition(valueSetDefURI, null, csVersionList, "PRODUCTION");

 |


h3. isSubSet

This method checks if childValueSetDefinition is a sub set of parentValueSetDefinition.

{{isSubSet(URI childValueSetDefinitionURI, URI parentValueSetDefinitionURI, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)}}

| Description: | Checks whether childValueSetDefinition is a sub set of parentValueSetDefinition |
| Input: | _java.net.URI_ childValueSetDefinitionURI - (Mandatory) child value set definition URI
_java.net.URI_ parentValueSetDefinitionURI- (Mandatory) parent value set definition URI
_org.LexGrid.LexBIG.DataModel.Core. AbsoluteCodingSchemeVersionReference_ 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 version or tag (e.g. "devel", "production", etc.) to be used for <i>all</i> of the coding schemes searched. |
| Output: | _boolean_ - YES, if all the elements of the child value set are in the parent value set. NO otherwise. |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to determine if all the concepts that get resolved from the supplied Child Value Set Definition URI are children of concepts that get resolved from the Parent Value Set Definition URI. Returns true if they all are; otherwise, returns false.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call isSubSet method:

java.net.URI childValueSetDefinitionURI = new URI("http://someDomain.html/ValueSets/NCIT/Child_Value_set");
java.net.URI parentValueSetDefinitionURI = new URI("http://someDomain.html/ValueSets/NCIT/Parent_Value_set");
String codingSchemeName = "NCI_Thesaurus";
String version = "10.08e";
AbsoluteCodingSchemeVersionReferenceList csVersionList = new AbsoluteCodingSchemeVersionReferenceList();
csVersionList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(codingSchemeName, version));

boolean isSubSet = vsdServ.isSubSet(childValueSetDefinitionURI, parentValueSetDefinitionURI, csVersionList, "PRODUCTION");

 |


h3. getValueSetDefinition

Utility method that returns value set definition object for the supplied value set URI.

{{getValueSetDefinition(URI valueSetDefinitionURI, String valueSetDefinitionRevisionId)}}

| Description: | Returns value set definition object for the supplied value set definition URI. |
| Input: | _java.net.URI_ valueSetDefinitionURI - (Mandatory) value set definition URI
_java.lang.String_ valueSetDefinitionRevisionId - (Optional) the version of the value set definition |
| Output: | _org.LexGrid.valueSets.ValueSetDefinition_ - value set definition object |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get the Value Set Definition object of the supplied Value Set Definition URI.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call getValueSetDefinition method:

org.LexGrid.valueSets.ValueSetDefinition vsDef = vsdServ.getValueSetDefinition(valueSetDefinitionURI, null);

 |


h3. listValueSetDefinitions

Utility method that lists all the URI's of the value set definition(s) for the supplied value set definition name. If the name is null, returns everything. If the name is not null, returns the value set definition(s) that have the assigned name. 

{{listValueSetDefinitions(String valueSetDefinitionName)}}

| Description: | Returns the URI's of the value set definition(s) for the supplied name. If the name is null, returns everything. If the name is not null, returns the value set definition(s) that have the assigned name.
{info:title=Note}Plural because there is no guarantee of Value Set Definition name uniqueness. If the name is the empty string "", returns all unnamed valueSetDefinition(s).{info} |
| Input: | _java.lang.String_ valueSetDefinitionName - (Optional) name of the value set definition. If null, returns URIs all the value set definition(s) in the system, if empty string "", returns all unnamed value set definition URIs. If name is provided, returns value set definition uris with the name that matches supplied valueSetDefinitionName. |
| Output: | _java.util.List<String>_ - List of matching value set definition uris |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get the list of Value Set Definition URIs that matches the supplied name.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call listValueSetDefinitions method:

List<String> uris = vsdServ.listValueSetDefinitions("someValueSetDefinitionName");

 |


h3. listValueSetDefinitionURIs

Utility method that lists all the URI's of the value set definition(s) that are loaded in the system.

{{listValueSetDefinitionURIs()}}

| Description: | Returns all the URI's of the value set definition(s) that are loaded in the system. |
| Input: | none |
| Output: | _java.util.List<String>_ - List of all the value set definition uris available in the system |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get all the Value Set Definition URIs available in the system.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call listValueSetDefinitionURIs method:

List<String> uris = vsdServ.listValueSetDefinitionURIs();

 |

h3. getAllValueSetDefinitionsWithNoNames

This method returns all the value set definition URI's that contains no names.

{{getAllValueSetDefinitionsWithNoNames()}}

| Description: | Returns the URI's of all unnamed value set definition(s). |
| Input: | none |
| Output: | _java.util.List<String>_ - List of all unnamed value set definitions URI's |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get the list of Value Set Definition URI's that have no names.
*_Sample Call:_*
# _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call listValueSetDefinitionURIs method:

List<String> uris = vsdServ.getAllValueSetDefinitionsWithNoNames();

 |

h3. getValueSetDefinitionEntitiesForTerm

This method resolves the supplied value set definition and returns only those concept codes that matches the supplied term.

{{getValueSetDefinitionEntitiesForTerm(String term, String matchAlgorithm, URI valueSetDefinitionURI, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag)}}

| Description: | Resolves the value set definition supplied and restricts it to the term and matchAlgorith supplied. The returned object ResolvedValueSetCodedNodeSet contains the codingScheme URI and Version that was used to resolve and the CodedNodeSet.
{info:title=Note}The CodedNodeSet is unresolved.{info} |
| Input: | _java.lang.String_ term - (Mandatory) text to match. Format is specific to the match algorithm
_java.lang.String_ matchAlgorithm - (Optional) match algorithm to use.  Must be the name of a supported match algorithm. Default - Lucene Query
_java.net.URI_ valueSetDefinitionURI - (Mandatory) value set definition to resolve
_org.LexGrid.LexBIG.DataModel.Core. AbsoluteCodingSchemeVersionReference_ 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 version or tag (e.g. "devel", "production", etc.) to be used for <i>all</i> of the coding schemes searched. |
| Output: | _org.lexgrid.valuesets.dto.ResolvedValueSetCodedNodeSet_ - contains the codingScheme URI and Version that was used to resolve and the unresolved CodedNodeSet. |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get the resolved Value Set Entries as CodedNodeSet that is restricted to the supplied term and the match algorithm. The returned CodedNodeSet is not resolved.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call getValueSetDefinitionEntitiesForTerm method:

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

ResolvedValueSetCodedNodeSet vsvns = vsdServ.getValueSetDefinitionEntitiesForTerm ("General Motors", MatchAlgorithms.exactMatch.name(), new URI("AUTO:AllDomesticANDGM"), csVersionList, "PRODUCTION");

 |

h3. getCodingSchemesInValueSetDefinition

This method returns all the coding scheme referenced by supplied value set definition.

{{getCodingSchemesInValueSetDefinition(URI valueSetDefinitionURI)}}

| Description: | Returns list of coding scheme summary that is referenced by the supplied value set definition. |
| Input: | _java.net.URI_ valueSetDefinitionURI - (Mandatory) value set definition uri |
| Output: | _org.LexGrid.LexBIG.DataModel.Collections.AbsoluteCodingSchemeVersionReferenceList_ - list of coding scheme summary referenced by the supplied value set definition |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get List of all Coding Scheme URIs and the Versions that the supplied Value Set Definition URI references.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call getCodingSchemesInValueSetDefinition method:

AbsoluteCodingSchemeVersionReferenceList csvList = vsdServ.getCodingSchemesInValueSetDefinition(new URI("AUTO:AllDomesticANDGM"));

 |

h3. isValueSetDefinition

This method checks if the supplied entityCode is of type 'valueSetDefinition' in supplued coding scheme and version.

{{isValueSetDefinition(String entityCode, String codingSchemeName, CodingSchemeVersionOrTag csvt)}}

| Description: | Determines if the supplied entity code is of type valueSetDefinition in the supplied coding scheme and, if it is, returns true; otherwise returns false. |
| Input: |  _java.lang.String_ entityCode - (Mandatory) entity code
 _java.lang.String_ codingSchemeName - (Mandatory) name of coding scheme
 _org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag_ csvt - (Optional) coding scheme version or tag |
| Output: | _boolean_ - TRUE : If entityCode is of type valueSetDefinition in supplied coding scheme, FALSE : otherwise |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to check if the supplied entity code is of type valueSetDefinition in the supplied Coding Scheme.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call isValueSetDefinition method:

boolean isVSD = vsdServ.isValueSetDefinition("VSD005", "Automobiles", Constructors.createCodingSchemeVersionOrTag(null, "1.1"));

 |


h3. getValueSetDefinitionURIsWithCodingScheme

This method returns a list of Value Set Definition URIs that references supplied coding scheme.

{{getValueSetDefinitionURIsWithCodingScheme(String codingSchemename, String codingSchemeURI)}}

| Description: | Returns a list of Value Set Definition URIs that references supplied coding scheme. |
| Input: |  _java.lang.String_ codingSchemename - (Mandatory) Name of coding scheme to check
 _java.lang.String_ codingSchemeURI - (Mandatory) URI of coding scheme that codingSchemename belongs to |
| Output: | _java.util.List<String>_ - List of value set definition URIs that references the supplied coding scheme name |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get list of value set definition uris that references the supplied coding scheme.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call getValueSetDefinitionURIsWithCodingScheme method:

List<String> uris = vsdServ.getValueSetDefinitionURIsWithCodingScheme("Automobiles", "urn:oid:11.11.0.1");

 |


h3. getValueSetDefinitionURIsWithConceptDomain

This method returns a list of Value Set Definition URIs that are bound to supplied concept domain.

{{getValueSetDefinitionURIsWithConceptDomain(String conceptDomain, String codingSchemeURI)}

| Description: | Returns a list of Value Set Definition URIs that are bound to supplied concept domain. |
| Input: | _java.lang.String_ conceptDomain- (Mandatory) name or uri of concept domain to check
 _java.lang.String_ codingSchemeURI - (Mandatory) URI of coding scheme that concept domain belongs to |
| Output: | _java.util.List<String>_ - List of value set definition URIs that are bound to supplied concept domain |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get list of value set definition uris that are bound to the supplied concept domain.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call getValueSetDefinitionURIsWithConceptDomain method:

List<String> uris = vsdServ.getValueSetDefinitionURIsWithConceptDomain("Autos", "urn:oid:11.11.0.1");

 |


h3. getValueSetDefinitionURIsWithUsageContext

This method returns a list of Value Set Definition URIs that references supplied list of usage context(s).

{{getValueSetDefinitionURIsWithUsageContext(List<String> usageContexts, String codingSchemeURI)}}

| Description: | Returns a list of Value Set Definition URIs that references supplied list of usage context(s). |
| Input: | _java.util.List<java.lang.String>_ usageContexts- (Mandatory) list of name or uri of usage context to check
 _java.lang.String_ codingSchemeURI - (Mandatory) URI of coding scheme that usage context belongs to |
| Output: | _java.util.List<String>_ - List of value set definition URIs that references the supplied list of usage context |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get list of value set definition uris that references the supplied list of usage context.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call getValueSetDefinitionURIsWithUsageContext method:

List<String> usageContexts = new ArrayList<String>();
usageContexts.add("Automobiles");
usageContexts.add("Domestic Auto Makers");
List<String> uris = vsdServ.getValueSetDefinitionURIsWithUsageContext(usageContexts, "urn:oid:11.11.0.1");

 |


h3. getValueSetDefinitionURIsWithConceptDomainAndUsageContext

This method Returns list of Value Set Definition URIs that are bound to supplied concept domain and in supplied usage context.

{{getValueSetDefinitionURIsWithConceptDomainAndUsageContext(String conceptDomain, List<String> usageContexts, String codingSchemeURI)}}

| Description: | Returns list of Value Set Definition URIs that are bound to supplied concept domain and in supplied usage context. |
| Input: |  _java.lang.String_ conceptDomain - (Mandatory) name or uri of concept domain to check
 _java.util.List<java.lang.String>_ usageContexts- (Mandatory) list of name or uri of usage context to check
 _java.lang.String_ codingSchemeURI - (Mandatory) URI of coding scheme that usage context and concept domain belongs to |
| Output: | _java.util.List<String>_ - List of value set definition URIs that are bound to supplied concept domain and references the supplied list of usage context |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to get list of value set definition uris that is bound to supplied concept domain and references the supplied list of usage context.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

org.lexgrid.valuesets.LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Call getValueSetDefinitionURIsWithConceptDomainAndUsageContextmethod:

List<String> usageContexts = new ArrayList<String>();
usageContexts.add("Automobiles");
usageContexts.add("Domestic Auto Makers");
List<String> uris = vsdServ.getValueSetDefinitionURIsWithConceptDomainAndUsageContext("Autos", usageContexts, "urn:oid:11.11.0.1");

 |

h2. Resolve Functions
Rsolve functions provides the capability to resolve the value set definition against specific coding scheme version and get back the list of entities that belongs to the value set. 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 value set definition :
* Resolve Stored Value Set Definition - This function allows you to resolve value set definition that are loaded in the system.
* Resolve Supplied Value Set Definition - This function allows you to pass a ValueSetDefinition object that may not be loaded in the system and get it resolved.


h3. Resolving Stored Value Set Definition

This function resolves the value set definition that is loaded in the system and returns set of valied concept codes plus the code systems and its versions that were used.

{{resolveValueSetDefinition(URI valueSetDefinitionURI, String valueSetDefinitionRevisionId, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag, SortOptionList sortOptionList)}}

| Description: | Resolves a value set definition that is available in the system using the supplied set of coding scheme versions. |
| Input: | _java.net.URI_ valueSetDefinitionURI - (Mandatory) value set definition uri to resolve
_java.lang.String_ valueSetDefinitionRevisionId - (Optional) version of value set definition
_org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReferenceList_ csVersionList - (Optional) list of coding scheme versions to use in resolution. IF the value set definition uses a version that isn't mentioned in this list, the resolve function will return the codingScheme and version that was used as a default for the resolution. 
_java.lang.String_ versionTag - (Optional) the tag (e.g. "devel", "production", ...) to be used to determine which coding scheme to be used
_org.LexGrid.LexBIG.DataModel.Collections.SortOptionList" sortOptionList - (Optional) List of sort options to apply during resolution. If supplied, the sort algorithms will be applied in the order provided. Any algorithms not valid to be applied in context of node set iteration, as specified in the sort extension description, will result in a parameter exception. Available algorithms can be retrieved through the LexBIGService getSortExtensions() method after being defined to the LexBIGServiceManager extension registry. |
| Output: | _org.lexgrid.valuesets.dto.ResolvedValueSetDefinition_ - Resolved Value Set Definition |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to resolve supplied value set definition URI that is loaded in the system against list of Coding Scheme versions if supplied. If Coding Scheme Versions list is not supplied, API will resolve against any version of the loaded Coding Scheme that is referenced by the Value Set Definition. Returns object ResolvedValueSetDefinition, which contains AbsoluteCodingSchemeVersionReferenceList, which tells the Coding Scheme and the versions that were used for this resolve, plus the ResolvedConceptReferencesIterator, which is an iterator for all the valid concepts that belong to the Value Set and Value Set Definition itself.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

grid.valuesets.impl.LexEVSValueSetDefinitionServices vsdServ = org.lexgrid.valuesets.impl.LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Create AbsoluteCodingSchemeVersionReferenceList:

AbsoluteCodingSchemeVersionReferenceList csvList = new AbsoluteCodingSchemeVersionReferenceList();
csvList.addAbsoluteCodingSchemeVersionReference(Constructors.
createAbsoluteCodingSchemeVersionReference("Automobiles", "2.0"));
csvList.addAbsoluteCodingSchemeVersionReference(Constructors)
createAbsoluteCodingSchemeVersionReference("AutomobilesParts", "2.0"));

* _Step 3:_ Call resolveValueSetDefinition method:

ResolvedValueSetDefinition rvdDef = vsdServ.resolveValueSetDefinition(new URI("SRITEST:AUTO:AllDomesticANDGM1"), null, csvList, "PRODUCTION", null);

 |

h3. Resolving Supplied Value Set Definition Objects

This function resolves the value set definition that is supplied against the supplied coding scheme version(s) and returns set of valied concept codes plus the code systems and its versions that were used.

{{resolveValueSetDefinition(ValueSetDefinition vsDef, AbsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag, SortOptionList sortOptionList)}}

| Description: | Resolves a value set definition that is supplied using the supplied set of coding scheme version(s). |
| Input: | _org.LexGrid.valueSets.ValueSetDefinition_ vsDef- (Mandatory) value set definition object to resolve
_org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReferenceList_ csVersionList - (Optional) list of coding scheme versions to use in resolution. IF the value set definition uses a version that isn't mentioned in this list, the resolve function will return the codingScheme and version that was used as a default for the resolution. 
_java.lang.String_ versionTag - (Optional) the tag (e.g. "devel", "production", ...) to be used to determine which coding scheme to be used
_org.LexGrid.LexBIG.DataModel.Collections.SortOptionList" sortOptionList - (Optional) List of sort options to apply during resolution. If supplied, the sort algorithms will be applied in the order provided. Any algorithms not valid to be applied in context of node set iteration, as specified in the sort extension description, will result in a parameter exception. Available algorithms can be retrieved through the LexBIGService getSortExtensions() method after being defined to the LexBIGServiceManager extension registry. |
| Output: | _org.lexgrid.valuesets.dto.ResolvedValueSetDefinition_ - Resolved Value Set Definition |
| Exception: | _org.LexGrid.LexBIG.Exceptions.LBException_ |
| Implementation Details: | *_Implementation:_*
_Step 1:_ Call this method on the associated LexEVS Value Set Definition Service instance to resolve supplied value set definition object against list of Coding Scheme versions if supplied. If Coding Scheme Versions list is not supplied, API will resolve against any version of the loaded Coding Scheme that is referenced by the Value Set Definition. Returns object ResolvedValueSetDefinition, which contains AbsoluteCodingSchemeVersionReferenceList, which tells the Coding Scheme and the versions that were used for this resolve, plus the ResolvedConceptReferencesIterator, which is an iterator for all the valid concepts that belong to the Value Set and Value Set Definition itself.
*_Sample Call:_*
* _Step 1:_ Instantiate LexEVSValueSetDefinitionServices if it is not done yet :

grid.valuesets.impl.LexEVSValueSetDefinitionServices vsdServ = org.lexgrid.valuesets.impl.LexEVSValueSetDefinitionServicesImpl.defaultInstance();

* _Step 2:_ Generate ValueSetDefinition object:

org.LexGrid.valueSets.ValueSetDefinition vsd = new org.LexGrid.valueSets.ValueSetDefinition();
vsd.setValueSetDefinitionURI("SRITEST:JUNIT:TEST:VSD1");
vsd.setValueSetDefinitionName("JUnit test vsd 1");
vsd.setConceptDomain("cd");
vsd.addRepresentsRealmOrContext("context");
vsd.setDefaultCodingScheme("Automobiles");
vsd.setIsActive(false);
vsd.setOwner("lexevs");
java.util.List<org.LexGrid.commonTypes.Source> srcList = new java.util.ArrayList<org.LexGrid.commonTypes.Source>();
org.LexGrid.commonTypes.Source src = new org.LexGrid.commonTypes.Source();
src.setContent("lexevs");
srcList.add(src);
src = new org.LexGrid.commonTypes.Source();
src.setContent("cts2");
srcList.add(src);
vsd.setSource(srcList);

org.LexGrid.valueSets.DefinitionEntry de = new org.LexGrid.valueSets.DefinitionEntry();
de.setRuleOrder(1L);
de.setOperator(org.LexGrid.valueSets.types.DefinitionOperator.OR);
org.LexGrid.valueSets.CodingSchemeReference csr = new org.LexGrid.valueSets.CodingSchemeReference();
csr.setCodingScheme("Automobiles");
de.setCodingSchemeReference(csr);

vsd.addDefinitionEntry(de);

* _Step 3:_ Create AbsoluteCodingSchemeVersionReferenceList:

AbsoluteCodingSchemeVersionReferenceList csvList = new AbsoluteCodingSchemeVersionReferenceList();
csvList.addAbsoluteCodingSchemeVersionReference(Constructors.
createAbsoluteCodingSchemeVersionReference("Automobiles", "2.0"));
csvList.addAbsoluteCodingSchemeVersionReference(Constructors)
createAbsoluteCodingSchemeVersionReference("AutomobilesParts", "2.0"));

* _Step 4:_ Call resolveValueSetDefinition method:

ResolvedValueSetDefinition rvdDef = vsdServ.resolveValueSetDefinition(vsd, csvList, "PRODUCTION", null);

 |

h3. Resolved Value Set Objects

h4. ResolvedValueSetCodedNodeSet

Contains Coding Scheme Version reference list that was used to resolve the Value Set Definition and the CodedNodeSet.
{info:title=Note}
The CodedNodeSet is not resolved.
{info}

h4. ResolvedValueSetDefinition

A resolved Value Set Definition containing the Coding Scheme Version reference list that was used to resolve the Value Set Definition and an iterator for resolved concepts.


h2. Error Handling

LexEVS Value Set Definition 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 the console.

h2. Load Scripts

Following are the scripts that can be used to load value set definition that are in LexGrid XML format into the system :
* LoadValueSetDefinition.bat for Windows environment and 
* LoadValueSetDefinition.sh for Unix environment 

The above scripts can be found under 'Admin' folder of LexEVS install directory. 

Both scripts take in the following parameters:

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

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

h2. Sample Value Set Definition XML File

Below is a sample XML file containing Value Set Definitions in LexGrid format that can be loaded using LexEVS Value Set Definition Service.

<source>

<?xml version="1.0" encoding="UTF-8"?>
<lgVD:valueSetDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://LexGrid.org/schema/2010/01/LexGrid/versions http://LexGrid.org/schema/2010/01/LexGrid/versions.xsd"
    xmlns="http://LexGrid.org/schema/2010/01/LexGrid/versions"
    xmlns:lgVer="http://LexGrid.org/schema/2010/01/LexGrid/versions"
    xmlns:lgCommon="http://LexGrid.org/schema/2010/01/LexGrid/commonTypes"
    xmlns:data="data"
    xmlns:lgVD="http://LexGrid.org/schema/2010/01/LexGrid/valueSets"
    xmlns:lgNaming="http://LexGrid.org/schema/2010/01/LexGrid/naming"
    valueSetDefinitionURI="SRITEST:AUTO:PropertyRefTest1-VSDONLY" valueSetDefinitionName="Property Reference Test 1" defaultCodingScheme="Automobiles" effectiveDate="2009-01-01T11:00:00Z" isActive="true" status="ACTIVE">
    <lgVD:mappings>
        <lgNaming:supportedCodingScheme localId="Automobiles" uri="urn:oid:11.11.0.1"></lgNaming:supportedCodingScheme>
        <lgNaming:supportedConceptDomain localId="Autos">Autos</lgNaming:supportedConceptDomain>
        <lgNaming:supportedSource localId="GM">GM</lgNaming:supportedSource>
        <lgNaming:supportedSource localId="Ford">Ford</lgNaming:supportedSource>
    </lgVD:mappings>
    <lgVD:source role="role1" subRef="subRef1">GM</lgVD:source>
    <lgVD:source role="role2" subRef="subRef2">Ford</lgVD:source>
    <lgVD:representsRealmOrContext>Automobiles</lgVD:representsRealmOrContext>
    <lgVD:representsRealmOrContext>Ford</lgVD:representsRealmOrContext>
    <lgVD:representsRealmOrContext>GM</lgVD:representsRealmOrContext>
    <lgVD:properties>
        <lgCommon:property propertyName="textualPresentation">
            <lgCommon:source role="PropRole1" subRef="PropSubRef1">GM</lgCommon:source>
            <lgCommon:source role="PropRole2" subRef="PropSubRef2">Ford</lgCommon:source>
            <lgCommon:usageContext>PropUsageContext GM</lgCommon:usageContext>
            <lgCommon:usageContext>PropUsageContext Ford</lgCommon:usageContext>
            <lgCommon:propertyQualifier propertyQualifierName="PropQual1Namuuuuu" propertyQualifierType="PQual Type 1">
                <lgCommon:value dataType="text">PropQualValue GM</lgCommon:value>
            </lgCommon:propertyQualifier>
            <lgCommon:propertyQualifier propertyQualifierName="PropQual2Namuuuuu" propertyQualifierType="PQual Type 2">
                <lgCommon:value dataType="text">PropQualValue Ford</lgCommon:value>
            </lgCommon:propertyQualifier>
            <lgCommon:value>All Automobiles nodes</lgCommon:value>
        </lgCommon:property>
    </lgVD:properties>
    <lgVD:definitionEntry ruleOrder="1" operator="OR">
        <lgVD:propertyReference codingScheme="Automobiles">
            <lgVD:propertyMatchValue matchAlgorithm="LuceneQuery">General</lgVD:propertyMatchValue>
        </lgVD:propertyReference>
    </lgVD:definitionEntry>

</lgVD:valueSetDefinition>


</source>

System Testing

The System test case for the LexEVS Value Set 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.

Installation / Packaging

Value Set Definition Services are integrated parts of core LexEVS API and are packaged and installed with other LexEVS services.

Value Set GUI

Visit LexEVS 6.0 Value Set GUI for detailed functionality and howto's about using Value Sets developer GUI tool

  • No labels