Template:Menu LexEVS 6.0 CTS2
LexEVS CTS2 Value Set Query API provides capability to query Value Sets available in the system and also to query the binding between Value Set and Concept Domain.
org.lexevs.cts2.query.ValueSetQueryOperation is the main interface for all the queries against Value Set. This interface can be accessed using main LexEVSCTS2 interface, like:
<source>
org.lexevs.cts2.query.ValueSetQueryOperation vsQueryOp = new org.lexevs.cts2.LexEvsCTS2Impl().getQueryOperation().getValueSetQueryOperation();
</source>
Here are the major query functions available using ValueSetQueryOperation interface:
This function returns value sets that are available in the system. Optionally, the list can be filtered by providing the criteria as input parameters.
*Description: * |
Lists the value sets that are available to the CTS 2 service. |
*Input: * |
java.lang.String codeSystemId - (Optional) code system id the value set should reference. |
*Output: * |
java.util.List<java.lang.String> - List of value set identifiers | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate ValueSetQueryOperation if it is not done yet :
org.lexevs.cts2.query.ValueSetQueryOperation vsQueryOp = new org.lexevs.cts2.LexEvsCTS2Impl().getQueryOperation().getValueSetQueryOperation(); |
Step 2: Set SortOption to sort the list in ascending order:
SortOption sortOption = new SortOption(); |
Step 3: Call listValueSets method by passing any filter criteria:
java.util.List<java.lang.String> valueSetList = vsQuery.listValueSets("Automobiles", "Autos", null, null, sortOption); | |
This function returns all the value sets that are available in the system.
*Description: * |
Lists all the value sets that are available to the CTS 2 service. |
*Input: * |
org.LexGrid.LexBIG.DataModel.InterfaceElements.SortOption sortOption - (Optional) to sort the return list of value set identifiers in Ascending or Descending. | |
*Output: * |
java.util.List<java.lang.String> - List of value set identifiers | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate ValueSetQueryOperation if it is not done yet :
org.lexevs.cts2.query.ValueSetQueryOperation vsQueryOp = new org.lexevs.cts2.LexEvsCTS2Impl().getQueryOperation().getValueSetQueryOperation(); |
Step 2: Set SortOption to sort the list in ascending order:
SortOption sortOption = new SortOption(); |
Step 3: Call listAllValueSets method to get all the value sets loaded in the system:
java.util.List<java.lang.String> valueSetList = vsQuery.listAllValueSets(sortOption); | |
This function returns detailed information about the value set.
*Description: * |
Returns detailed information about the value set. |
*Input: * |
java.lang.String valueSetId - (Mandatory) Id of an value set. |
*Output: * |
org.LexGrid.valueSets.ValueSetDefinition - Value Set Definition object with the details of value set | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate ValueSetQueryOperation if it is not done yet :
org.lexevs.cts2.query.ValueSetQueryOperation vsQueryOp = new org.lexevs.cts2.LexEvsCTS2Impl().getQueryOperation().getValueSetQueryOperation(); |
Step 2: Call getValueSetDetails method by providing value set id:
org.LexGrid.valueSets.ValueSetDefinition vsd = vsQuery.getValueSetDetails("SRITEST:AUTO:AllDomesticButGM", null); | |
This function returns the contents of value set (expanded value set).
*Description: * |
Returns the contents of value set (expanded value set). |
*Input: * |
java.lang.String valueSetId - (Mandatory) Id of an value set. |
*Output: * |
org.lexgrid.valuesets.dto.ResolvedValueSetDefinition - A resolved Value Set definition containing the code system version reference list that was used to resolve the value set and an iterator for resolved concepts. | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate ValueSetQueryOperation if it is not done yet :
org.lexevs.cts2.query.ValueSetQueryOperation vsQueryOp = new org.lexevs.cts2.LexEvsCTS2Impl().getQueryOperation().getValueSetQueryOperation(); |
Step 2: Populate the Code System Version reference list to be used for resolving the value set definition:
AbsoluteCodingSchemeVersionReference acsvr = new AbsoluteCodingSchemeVersionReference(); |
Step 3: Call listValueSetContents method by providing value set id and code system version list:
ResolvedValueSetDefinition vsdResolved = vsQueryop.listValueSetContents("SRITEST:AUTO:DomasticLeafOnly", null, csList, null, null); | |
This function determines whether one of the two supplied value sets subsumes the other.
*Description: * |
Determine whether one of the two supplied value sets subsumes the other. |
*Input: * |
java.lang.String childValueSetId - (Mandatory) Id of a child value set. |
*Output: * |
boolean - True; if childValueSet subsumes parentValueSet. False; otherwise. | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate ValueSetQueryOperation if it is not done yet :
org.lexevs.cts2.query.ValueSetQueryOperation vsQueryOp = new org.lexevs.cts2.LexEvsCTS2Impl().getQueryOperation().getValueSetQueryOperation(); |
Step 2: Populate the Code System Version reference list to be used for resolving the value set definitions:
AbsoluteCodingSchemeVersionReference acsvr = new AbsoluteCodingSchemeVersionReference(); |
Step 3: Call checkValueSetSubsumption method by providing child and parent value set id and code system version list:
boolean subsume = vsQueryop.checkValueSetSubsumption("SRITEST:AUTO:DomasticLeafOnly", null, "SRITEST:AUTO:EveryThing", null, csList, null); | |
This function determines whether the supplied coded concept exists in the supplied value set.
*Description: * |
Determine whether the supplied coded concept exists in the supplied value set. |
*Input: * |
java.lang.String conceptCode - (Mandatory) Coded concept to check membership. |
*Output: * |
boolean - True; if coded concept exists in value set. False; otherwise. | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate ValueSetQueryOperation if it is not done yet :
org.lexevs.cts2.query.ValueSetQueryOperation vsQueryOp = new org.lexevs.cts2.LexEvsCTS2Impl().getQueryOperation().getValueSetQueryOperation(); |
Step 2: Populate the Code System Version reference that contains the coded concept and to be used for resolving the value set definition:
AbsoluteCodingSchemeVersionReference acsvr = new AbsoluteCodingSchemeVersionReference(); |
Step 3: Call checkConceptValueSetMembership method by providing coded concept, code system version and value set id:
boolean member = vsQueryop.checkConceptValueSetMembership("GMC", new URI("Automobiles"), acsvr, "SRITEST:AUTO:GM", null, null); | |
This function returns all the value set identifiers that contains supplied concept code.
*Description: * |
Returns all the value set identifiers that contains supplied concept code. |
*Input: * |
java.lang.String conceptCode - (Mandatory) Coded concept to check membership. |
*Output: * |
java.util.List<java.lang.String> - List of value set identifiers that contains the supplied concept code. | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate ValueSetQueryOperation if it is not done yet :
org.lexevs.cts2.query.ValueSetQueryOperation vsQueryOp = new org.lexevs.cts2.LexEvsCTS2Impl().getQueryOperation().getValueSetQueryOperation(); |
Step 2: Populate the Code System Version reference list to be used for resolving the value sets:
AbsoluteCodingSchemeVersionReference acsvr = new AbsoluteCodingSchemeVersionReference(); |
Step 3: Call listValueSetsWithConceptCode method by providing coded concept and code system version list:
List<String> valueSetIdList = vsQueryop.listValueSetsWithConceptCode("GMC", new URI("Automobiles"), csList, null); | |