NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

Versions Compared

Key

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

...

org.lexevs.cts2.author.ConceptDomainAuthoringOperation is the main interface for all the authoring operations against Concept Domain. This interface can be accessed using main LexEVSCTS2 interface, like:<source>

Code Block

org.lexevs.cts2.author.ConceptDomainAuthoringOperation cdAuthOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAuthoringOperation().getConceptDomainAuthoringOperation();

...


Revision Information

All the authoring functions described here requires information about the author and revision/version id to be assigned to entities for each of these operations. These is done passing object org.lexevs.cts2.core.update.RevisionInfo. RevisionInfo object has following attributes:

  • java.lang.String changeAgent - (Optional) The source that participated in this particular change.
  • java.lang.String changeInstruction - (Optional) A human or machine readable set of instructions on how to apply this change.
  • java.lang.String revisionId - (Mandatory) The unique identifier of this revision.
  • java.lang.Long editOrder - (Optional) The relative order that this revision is to be applied if in a systemRelease.
  • java.util.Date revisionDate - (Optional) The end date for which this version is operative (considered commited).
  • java.lang.String description - (Optional) The description of the resource/change.
  • java.lang.String systemReleaseURI - (Optional) The official URI of this release

Authoring Functions

Following sections contains detailed functions provided by ConceptDomainAuthoringOperation interface.

...

This function provides capability to create a new Code System to contain a set of Concept Domains. The Code System is created by defining the set of meta-data properties that describe it. At this point there is no concept domain added.

createConceptDomainCodeSystem(RevisionInfo revision, String codeSystemName, String codeSystemURI, String formalName, String defaultLanguage, long approxNumConcepts, String representsVersion, List<String> localNameList, List<org.LexGrid.commonTypes.Source> sourceList, Text copyright, Mappings mappings)

*Description: *

Creates new code system to hold concept domains.

*Input: *

  • org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc.
  • java.lang.String codingSchemeName - (Mandatory) Concept Domain Code System Name.
  • java.lang.String codingSchemeURI - (Mandatory) Concept Domain Code System URI.
  • java.lang.String formalName - (Optional) Formal name of a Concept Domain Code System.
  • java.lang.String defaultLanguage - (Optional) Default language of Concept Domain Code System.
  • long approxNumConcepts - (Optional) Approximate number of concept domains this Concept Domain Code System may contain.
  • java.lang.String representsVersion - (Mandatory) Initial version of the Concept Domain Code System.
  • java.util.List<java.lang.String> localNameList - (Optional) Any local name(s)/reference(s) for this Concept Domain Code System used within the Code System.
  • java.util.List<org.LexGrid.commonTypes.Source> sourceList - (Optional) Source(s) of this Concept Domain Code System.
  • org.LexGrid.commonTypes.Text copyright - (Optional) Information about rights held in and over the Concept Domain Code System. Typically, copyright information includes a statement about various property rights associated with the Concept Domain Code System, including intellectual property rights.
  • org.LexGrid.naming.Mappings mappings - (Mandatory) A list of all of the local identifiers and defining URI's that are used in the Concept Domain Code System.

...

*Output: *

org.LexGrid.codingSchemes.CodingScheme - Created Concept Domain Code System

...

*Exception: *

org.LexGrid.LexBIG.Exceptions.LBException

...

*Sample Call: *

  • Step 1: Instantiate ConceptDomainAuthoringOperation if it is not done yet:
    Code Block
    
    org.lexevs.cts2.author.ConceptDomainAuthoringOperation cdAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getConceptDomainAuthoringOperation();
    
  • 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 new concept domain code system meta data:
    Code Block
    
    String codingSchemeURI = "urn:oid:11.11.22.999";

...

  • 
    String representsVersion = "1.0";

...

  • 
    
    String codingSchemeName = "Concept Domain Coding Scheme";

...

  • 
    String formalName = "CTS 2 API Created Concept Domain Code System";

...

  • 
    String defaultLanguage = "en";

...

  • 
    Long approxNumConcepts = new Long(1);

...

  • 
    List<String> localNameList = Arrays.asList();

...

  • 
    
    org.LexGrid.commonTypes.Source source = new org.LexGrid.commonTypes.Source();

...

  • 
    source.setContent("source");

...

  • 
    List<org.LexGrid.commonTypes.Source> sourceList = Arrays.asList(source);

...

  • 
    
    Text copyright = new Text();

...

  • 
    org.LexGrid.naming.Mappings mappings = new org.LexGrid.naming.Mappings();

...

  • 
    
    org.LexGrid.naming.SupportedLanguage supportedLang = new org.LexGrid.naming.SupportedLanguage();

...

  • 
    
    supportedLang.setLocalId("en");

...

  • _
    supportedLang.setUri("URI_for_lang_en");

...

  • _
    
    mappings.addSupportedLanguage(supportedLang);
    
  • Step 4: call create method to create the concept domain code system:
    Code Block
    
    CodingScheme codeScheme = cdAuthorOp.createConceptDomainCodeSystem(revInfo, codingSchemeName, codingSchemeURI, formalName, defaultLanguage, approxNumConcepts, representsVersion, localNameList, sourceList, copyright, mappings);

...

  • 
    

createConceptDomain

This function creates a concept domain to be included in a Code System. The new concept domain is defined by the set of meta-data properties that describe it.

createConceptDomain(String conceptDomainId, String conceptDomainName, String namespace, RevisionInfo revisionInfo, String description, String status, boolean isActive, Properties properties, String codeSystemNameOrURI, String codeSystemVersion)

Description: *Description: *

Creates new concept domain in a code system.

*Input: *

  • java.lang.String conceptDomainId - (Mandatory) ID of a new concept domain.
  • java.lang.String conceptDomainName - (Mandatory) Name of a new concept domain.
  • java.lang.String namespace - (Mandatory) Namespace of a new concept domain.
  • org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc.
  • java.lang.String description - (Mandatory) Description of a new concept domain.
  • java.lang.String status - (Optional) Status of new Concept Domain.
  • boolean isActive - (Optional) Status of new Concept Domain.
  • org.LexGrid.commonTypes.Properties - (Optional) List of properties for the new Concept Domain.
  • java.lang.String codeSystemNameOrURI - (Mandatory) Name or URI of a Code System that will hold this new Concept Domain.
  • java.lang.String codeSystemVersion - (Mandatory) Version of a Code System that will hold this new Concept Domain.

...

*Output: *

java.lang.String - concept domain id if created successfully

...

*Exception: *

org.LexGrid.LexBIG.Exceptions.LBException

...

*Sample Call: *

  • Step 1: Instantiate ConceptDomainAuthoringOperation if it is not done yet:
    Code Block
    
    org.lexevs.cts2.author.ConceptDomainAuthoringOperation cdAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getConceptDomainAuthoringOperation();
    
  • 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 3: call create concept domain method by passing code system version and concept domain information:
    Code Block
    
    String conceptDomainId = cdAuthOp.createConceptDomain("CD00A", "Automobiles-CD", "Automobiles", revInfo, "Concept Domain for automobiles", "pending", false, props, "Automobile", "1.0",);

...

  • 
    

addConceptDomainProperty

This function provides capability to add a new property to a concept domain.

addConceptDomainProperty(String conceptDomainId, String namespace, Property newProperty, String codeSystemNameOrURI, String codeSystemVersion, RevisionInfo revisionInfo)

Description: *Description: *

Add new property for a concept domain.

*Input: *

  • java.lang.String conceptDomainId - (Mandatory) Identifier of a Concept Domain to which a new property will be added.
  • java.lang.String namespace - (Mandatory) Namespace of a Concept Domain to which a new property will be added.
  • org.LexGrid.commonTypes.Property newProperty - (Mandatory) New property that will be added to the concept domain.
  • java.lang.String codeSystemNameOrURI - (Mandatory) Name or URI of a Code System that contains the concept domain.
  • java.lang.String codeSystemVersion - (Mandatory) Version of a Code System that contains the concept domain.
  • org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc.

...

*Output: *

boolean - True; if addition of new property was success

...

*Exception: *

org.LexGrid.LexBIG.Exceptions.LBException

...

*Sample Call: *

  • Step 1: Instantiate ConceptDomainAuthoringOperation if it is not done yet:
    Code Block
    
    org.lexevs.cts2.author.ConceptDomainAuthoringOperation cdAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getConceptDomainAuthoringOperation();
    
  • 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 property 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);
    
  1. Step 4: call add property method by passing the code system information, concept domain information and a new property:
    Code Block
    
    boolean added = cdAuthOp.addNewConceptDomainProperty("CD00A", "Automobiles-CD", prop, "Automobiles", "1.0", revInfo);

...

  1. 
    

addConceptDomainToValueSetBinding

This function provides capability to create a value set to concept domain binding.

addConceptDomainToValueSetBinding(String conceptDomainId, String namespace, String codeSystemNameOrURI, String codeSystemVersion, URI valueSetURI, RevisionInfo revisionInfo)

*Description: *

Create a value set to concept domain binding.

*Input: *

...