NIH | National Cancer Institute | NCI Wiki  

WIKI MAINTENANCE NOTICE

Please be advised that NCI Wiki will be undergoing maintenance Monday, July 22nd between 1700 ET and 1800 ET and will be unavailable during this period.
Please ensure all work is saved before said time.

If you have any questions or concerns, please contact the CBIIT Atlassian Management Team.

Versions Compared

Key

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

...

Here are the authoring functions that can be performed on code system and its contents:

...

  • Create - This function provides capability to create:
    • New Code System
    • Add new property to Code System
    • New Concept
    • Add new property to Concept
    • New AssociationType
    • New Code System Supplimentpanel *
  • Edit - This function provides capability to update:
    • Code System metadata
    • Property of a Code System
    • Concept metadata
    • Property of a Concept
    • AssociationTypepanel *
  • Remove - This function provides capability to remove:
    • Entire Code System
    • Property of a Code System
    • Concept
    • Property of a Conceptpanel *
  • Status Change - This function provides capability to update Status attributes:
    • Code System Status
    • Concept Status

...

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

Code Block

org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAuthoringOperation().getCodeSystemAuthoringOperation();

...


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 CodeSystemAuthoringOperation interface.

...

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

...

*Description: *

...

Creates new coding system.

...

*Input: *

...

Code Block

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

Description:

Creates new coding system.

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) Code System Name.
  • java.lang.String codingSchemeURI - (Mandatory) Code System URI.
  • java.lang.String formalName - (Optional) Formal name of a Code System.
  • java.lang.String defaultLanguage - (Optional) Default language of Code System.
  • long approxNumConcepts - (Optional) Approximate number of concepts this Code System may contain.
  • java.lang.String representsVersion - (Mandatory) Initial version of the Code System.
  • java.util.List<java.lang.String> localNameList - (Optional) Any local name(s)/reference(s) for this Code System used within the Code System.
  • java.util.List<org.LexGrid.commonTypes.Source> sourceList - (Optional) Source(s) of this Code System.
  • org.LexGrid.commonTypes.Text copyright - (Optional) Information about rights held in and over the Code System. Typically, copyright information includes a statement about various property rights associated with the 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 Code System.

...

*Output: *

...

org.LexGrid.codingSchemes.CodingScheme - Created Code System

...

*Exception: *

...

org.LexGrid.LexBIG.Exceptions.LBException

...

*Sample Call: *

  • Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet:

    ...

    • Code Block
      
      org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation();
      
    • 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 code system meta data:

        ...

        • Code Block
          
          String codingSchemeURI = "urn:oid:11.11.0.99";

        ...

        • 
          String representsVersion = "1.0";

        ...

        • \\
          \\
          String codingSchemeName = "New Coding Scheme";

        ...

        • 
          String formalName = "CTS 2 API Created 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 code system:

          ...

          • Code Block
            
            CodingScheme codeScheme = csAuthOp.createCodeSystem(revInfo, codingSchemeName, codingSchemeURI, formalName, defaultLanguage, approxNumConcepts, representsVersion, localNameList, sourceList, copyright, mappings);

          ...

          • 
            

          addCodeSystemProperties

          This function provides capability to add new properties to Code System.

          addCodeSystemProperties(RevisionInfo revision, String codingSchemeName, String codingSchemeURI, String representsVersion, Properties properties)

          *Description: *

          Adds new properties to code system.

          *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) Code System Name.
          • java.lang.String codingSchemeURI - (Mandatory) Code System URI.
          • java.lang.String representsVersion - (Mandatory) Initial version of the Code System.
          • org.LexGrid.commonTypes.Properties properties - (Mandatory) List of one or more properties.

          ...

          *Output: *

          ...

          org.LexGrid.codingSchemes.CodingScheme - Updated Code System

          ...

          *Exception: *

          ...

          org.LexGrid.LexBIG.Exceptions.LBException

          ...

          *Sample Call: *

          • Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :

            ...

            • Code Block
              
              org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation();
              
            • 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 properties to add:

                ...

                • Code Block
                  
                   Properties properties = new Properties();

                ...

                • \\
                  \\
                  Presentation prop = new Presentation();

                ...

                • 
                  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);

                ...

                • 
                  prop.setDegreeOfFidelity("degreeOfFidelity");

                ...

                • 
                  prop.setMatchIfNoContext(true);

                ...

                • 
                  prop.setRepresentationalForm("representationalForm");

                ...

                • =\\
                  \\
                  properties.addProperty(prop);

                ...

                • \\
                  \\		
                  Presentation prop2 = new Presentation();

                ...

                • 
                  prop2.setPropertyId("propertyId2");

                ...

                • 
                  prop2.setPropertyName("propertyName-2");

                ...

                • 
                  prop2.setIsActive(false);

                ...

                • 
                  prop2.setLanguage("english-2");

                ...

                • 
                  prop2.setOwner("owner-2");

                ...

                • 
                  prop2.setPropertyType(PropertyTypes.PROPERTY.name());

                ...

                • 
                  Text text2 = new Text();

                ...

                • 
                  text2.setContent("content-2");

                ...

                • 
                  text2.setDataType("Text datatype-2");

                ...

                • 
                  prop2.setValue(text2);

                ...

                • 
                  prop2.setDegreeOfFidelity("degreeOfFidelity-2");

                ...

                • 
                  prop2.setMatchIfNoContext(true);

                ...

                • 
                  prop2.setRepresentationalForm("representationalForm-2");

                ...