NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

Description:

Creates a new value set definition and loads into repository.

Input:

  • java.net.URI valueSetURI - (Mandatory) URI of value set definition.
  • java.lang.String valueSetName - (Mandatory) Name of value set definition.
  • java.lang.String defaultCodeSystem - (Optional) local name of default code system.
  • java.lang.String conceptDomainId - (Optional) local name of concept domain this value set is binded to.
  • _java.util.List<org.LexGrid.commonTypes.Source> sourceList _ - (Optional)Source list for this value set.
  • java.util.List<java.lang.String> usageContextList - (Optional) list of local name of usage context of this value set.
  • org.LexGrid.commonTypes.Properties properties - (Optional) list of value set properties.
  • java.util.List<org.LexGrid.valuesets.DefinitionEntry> ruleSetList - (Optional) list of definition entries (rule sets).
  • org.LexGrid.commonTypes.Versionable versionable - (Optional) Versionable entries of a value set(status, isActive, effective date etc).
  • org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc.

Output:

java.net.URI - value set definition URI if created successfully

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Sample Call:

  • Step 1: Instantiate ValueSetAuthoringOperation if it is not done yet:
    Code Block
    org.lexevs.cts2.author.ValueSetAuthoringOperation vsAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getValueSetAuthoringOperation();
    
  • Step 2: Populate RevisionInfo object:
    Code Block
    RevisionInfo revInfo = new RevisionInfo();
    revInfo.setChangeAgent("change Agent Name");
    revInfo.setChangeInstruction("here goes the change Instructions");
    revInfo.setDescription("description of the resource");
    revInfo.setEditOrder(1L);
    revInfo.setRevisionDate(new Date());
    revInfo.setRevisionId(UUID.randomUUID().toString());
    
  • Step 3: Populate a properties to be added:
    Code Block
    Property prop = new Property();
    prop.setPropertyId("propertyId1");
    prop.setPropertyName("propertyName");
    prop.setIsActive(false);
    prop.setLanguage("en");
    prop.setOwner("owner");
    prop.setPropertyType(PropertyTypes.PROPERTY.name());
    Text text = new Text();
    text.setContent("content");
    text.setDataType("Text datatype");
    prop.setValue(text);
    
    Properties props = new Properties();
    
    props.addProperty(prop);
    
  • Step 4: call create Value Set method:
    Code Block
     ''URI vsdURI = vsAuthOp.createValueSet(new URI("VSD:AUTHORING:JUNIT:TEST1"), 
    
    				"Authoring create vsd junit test1",
    				"Automobiles", "Autos", null, null, 
    				props, null, null, revInfo);'' 
    

...

Description:

Update existing definition entry (rule set) of a value set definition.

Input:

  • java.net.URI valueSetURI - (Mandatory) URI of value set definition that contains the definition entry.
  • org.LexGrid.valueSetDefinitionEntry changedDefinitionEntry - (Mandatory) modified definition entry object.
  • org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc.

Output:

boolean - True; if update was success

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Sample Call:

  • Step 1: Instantiate ValueSetAuthoringOperation if it is not done yet:
    Code Block
    org.lexevs.cts2.author.ValueSetAuthoringOperation vsAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getValueSetAuthoringOperation();
    
  • Step 2: Populate RevisionInfo object:
    Code Block
    RevisionInfo revInfo = new RevisionInfo();
    revInfo.setChangeAgent("change Agent Name");
    revInfo.setChangeInstruction("here goes the change Instructions");
    revInfo.setDescription("description of the resource");
    revInfo.setEditOrder(1L);
    revInfo.setRevisionDate(new Date());
    revInfo.setRevisionId(UUID.randomUUID().toString());
    
  • Step 3: Populate a modified Definition Entry object:
    Code Block
    DefinitionEntry changedDefinitionEntry = new DefinitionEntry();
    changedDefinitionEntry.setRuleOrder(0L);
    changedDefinitionEntry.setOperator(DefinitionOperator.OR);
    EntityReference er = new EntityReference();
    er.setEntityCode("GM");
    er.setEntityCodeNamespace("Automobiles");
    // change leafOnly to true and association type to "CHD"_
    er.setLeafOnly(true);
    er.setReferenceAssociation("CHD");
    
  • Step 4: call update definition entry method by passing the value set information and the modified definition entry object:
    Code Block
    boolean updated = vsAuthOp.updateDefinitionEntry(new URI("VSD:AUTHORING:JUNIT:TEST2"), changedDefinitionEntry, revInfo); 
    

...

Description:

Updates existing property of a value set definition.

Input:

  • java.net.URI valueSetURI - (Mandatory) URI of value set definition that contains the property.
  • org.LexGrid.commonTypes.Property property - (Mandatory) Modified property.
  • org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc.

Output:

boolean - True; if update was success

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Sample Call:

  • Step 1: Instantiate ValueSetAuthoringOperation if it is not done yet:
    Code Block
    org.lexevs.cts2.author.ValueSetAuthoringOperation vsAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getValueSetAuthoringOperation();
    
  • Step 2: Populate RevisionInfo object:
    Code Block
    RevisionInfo revInfo = new RevisionInfo();
    revInfo.setChangeAgent("change Agent Name");
    revInfo.setChangeInstruction("here goes the change Instructions");
    revInfo.setDescription("description of the resource");
    revInfo.setEditOrder(1L);
    revInfo.setRevisionDate(new Date());
    revInfo.setRevisionId(UUID.randomUUID().toString());
    
  • Step 3: Populate a modified property. Just modified isActive to 'true' and language to 'eng' in property 'propertyId1':
    Code Block
    Property prop = new Property();
    prop.setPropertyId("propertyId1");
    prop.setPropertyName("propertyName");
    prop.setIsActive(true);
    prop.setLanguage("eng");
    
  • Step 4: call update property method by passing the value set information and the modified property:
    Code Block
    boolean updated = vsAuthOp.updateValueSetProperty(new URI("VSD:AUTHORING:JUNIT:TEST1"), prop, revInfo); 
    

...