NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

Code Block
Iterator<? extends ResolvedConceptReference>

Concept vs Entity

In 5.0 org.LexGrid.concepts.Concept

...

and org.LexGrid.concepts.Instance were a subclass of org.LexGrid.concepts.Entity

...

. These have been removed for 6.0. If you

...

have used concept or instance in LexEVS 5.x ,then in 6.0 you will want to modify your code to use Entity instead.

In 5.0, for example, a concept can be defined as follows:

...

Association vs AssociationPredicate and AssociationEntity

org.LexGrid.relations.Association is replaced by AssociationPredicate and AssociationEntity in 6.0. The AssociationPredicate class contains 'associationName' and 'sourceList' properties, and their get/set methods. AssociationEntity class contains the properties such as 'forwardName', 'isNavigable', 'isTransitive', 'reverseName' etc., plus their get/set methods. For example, in 5.0 an Association class can be created as follows:

Code Block
Association association = new Association();
association.setAssociationName("name");
association.addSource(source);
association.setForwardName("forwardName");
association.setIsNavigable(true);

...

  • All class names that contain "ValueDomain" are now replaced with "ValueSet", for instance, ValueDomainDefinition is renamed to ValueSetDefinition.
  • Major Value Set interfaces changes: These affect class names, method names, method's input/output type/names. If the name contains "ValueDomain", rename it to "ValueSet".
    • ValueDomainDefinition to ValueSetDefinition.
    • LexEVSValueDomainServices to LexEVSValueSetDefinitionServices.
  • All packages that had "valuedomain" are now "valuesets".
  • LexEVSPickListServices has been renamed to LexEVSPickListDefinitionServices
  • Resolve supplied ValueSetDefinition object: In 5.0, this method is defined under LexEVSValueDomainServices.
    Code Block
    public ResolvedValueDomainDefinition resolveValueDomain(URI valueDomainURI, 
           AbsoluteCodingSchemeVersionReferenceList csVersionList, 
           String versionTag) throws LBException;
    
    In 6.0, the method is under LexEVSValueSetDefinitionServices. It is represented as follows:
    Code Block
    public ResolvedValueSetDefinition resolveValueSetDefinition(URI valueSetDefinitionURI, 
           String valueSetDefinitionRevisionId, 
           AbsoluteCodingSchemeVersionReferenceList csVersionList, 
           String versionTag, SortOptionList sortOptionList) throws LBException;
    
    Beside Besides the return type change, two new input arguments have been added. valueSetDefinitionRevisionId which holds the information of the version of the value set definition and sortOptionList which represents the 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 an argument exception. Available algorithms can be retrieved through the LexBIGService getSortExtensions method after being defined to the LexBIGServiceManager extension registry. For example:
    Code Block
    AbsoluteCodingSchemeVersionReferenceList acsvList = null;
    Util.displayMessage("Now select Code System to use to resolve Value Set Definition");
    CodingSchemeSummary css = Util.promptForCodeSystem();
    if (css != null)
    {
     acsvList = new AbsoluteCodingSchemeVersionReferenceList();
     acsvList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference(css.getCodingSchemeURI(), 
                                                      css.getRepresentsVersion()));
    }
    
    LexEVSValueSetDefinitionServices vsdServ = LexEVSValueSetDefinitionServicesImpl.defaultInstance();
    ResolvedValueSetDefinition rVSD = null;
    try {
     rVSD = vsdServ.resolveValueSetDefinition(new URI("myUri"), null, acsvList, null, null);
    } catch (URISyntaxException e) {
     e.printStackTrace();
    }
    

...

Code Block
AbsoluteCodingSchemeVersionReferenceList incsvrl = new AbsoluteCodingSchemeVersionReferenceList();
incsvrl.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference("urn:oid:11.11.0.1", "1.1"));
	
ResolvedPickListEntryList pls = _pickListService.resolvePickList("SRITEST:FA:MicrobialStructureOntologyMinusMCell", 1, incsvrl, "production");
  • Beside Besides the two methods above, LexEVSPickListServices also adds two new methods resolvePickList and resolvePickListForTerm as follows:
  • *The new resolvePickList method can be passed in a PickListDefinition object instead of pickListId.
    Code Block
    public ResolvedPickListEntryList resolvePickList(PickListDefinition pickList, boolean sortByText, 
            AbsoluteCodingSchemeVersionReferenceList csVersionList, 
            String versionTag) throws LBException;
    
    Code Block
    public ResolvedPickListEntryList resolvePickListForTerm(String pickListId, String term, String matchAlgorithm,
            String language, String[] context, boolean sortByText,A
            bsoluteCodingSchemeVersionReferenceList csVersionList, String versionTag) throws LBException;
    
  • *More restriction arguments have been added to the new resolvePickListForTerm method, such as: 'term', 'matchAlgorithm', 'languange', and 'context'. The argument 'term' is required. An example is shown below:
    Code Block
    ResolvedPickListEntryList pickLists = getPickListService().resolvePickListForTerm("SRITEST:AUTO:AllDomesticButGM", 
           "Jaguar", MatchAlgorithms.exactMatch.name(), 
           "english", null, false, null, null);
    
  • In 6.0 you also can resolve a pick list by revision. The code below is the new method:
    Code Block
    public PickListDefinition resolvePickListByRevision(String pickListId,
           String revisionId, Integer sortOrder) throws LBRevisionException;
    
    Note: the return type of this method is PickListDefinition instead of ResolvedPickListEntryList.

...