<?xml version="1.0" encoding="utf-8"?>
<html>
Template:Menu LexEVS 6.0 CTS2
LexEVS CTS2 Code System Authoring API provides capability to author Code System and its contents.
Here are the authoring functions that can be performed on code system and its contents:
*Create - This function provides capability to create: |
*Edit - This function provides capability to update: |
*Remove - This function provides capability to remove: |
*Status Change - This function provides capability to update Status attributes: |
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>
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthOp = new org.lexevs.cts2.LexEvsCTS2Impl().getAuthoringOperation().getCodeSystemAuthoringOperation();
</source>
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. |
Following sections contains detailed functions provided by CodeSystemAuthoringOperation interface.
Create Operation provides capability to create Code System, Concept, AssociationType, Property and Code System Suppliment. For every entry that gets created, a unique revision(version) identifier will be assigned to that entry. This helps in retrieving snapshots of an entry based on its revision(version) identifier. This unique id can be passed in using the RevisionInfo object described above.
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: * |
org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc. |
*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 :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Populate new code system meta data:
String codingSchemeURI = "urn:oid:11.11.0.99"; |
String codingSchemeName = "New Coding Scheme"; |
org.LexGrid.commonTypes.Source source = new org.LexGrid.commonTypes.Source(); |
Text copyright = new Text(); |
org.LexGrid.naming.SupportedLanguage supportedLang = new org.LexGrid.naming.SupportedLanguage();
supportedLang.setLocalId("en"); |
mappings.addSupportedLanguage(supportedLang); |
Step 4: call create method to create the code system:
CodingScheme codeScheme = csAuthOp.createCodeSystem(revInfo, codingSchemeName, codingSchemeURI, formalName, defaultLanguage, approxNumConcepts, representsVersion, localNameList, sourceList, copyright, mappings); | |
This function provides capability to add new properties to Code System.
*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. |
*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 :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Populate properties to add:
Properties properties = new Properties(); |
Presentation prop = new Presentation(); |
properties.addProperty(prop); |
Presentation prop2 = new Presentation(); |
properties.addProperty(prop2); |
Step 4: call add properties method by passing the code system information and new set of properties:
CodingScheme codeScheme = csAuthOp.addCodeSystemProperties (revInfo, "New Coding Scheme", "urn:oid:11.11.0.99", "1.0", properties); | |
This function creates a new Code System Supplement as a container of a set of concepts and concept properties to be appended to a target code system. This function does not add the concepts and properties.
*Description: * |
Creates a new Code System Supplement as a container of a set of concepts and concept properties to be appended to a target code system. |
*Input: * |
org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference parent - (Mandatory) Target Code System Version. |
*Output: * |
None | |
*Exception: * |
org.lexevs.cts2.exception.author.InvalidCodeSystemSupplementException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate target code system version reference:
org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference parent = new org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference() |
Step 3: Populate new suppliment code system version reference:
org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference suppliment = new org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference() |
Step 4: Call create suppliment method by passing the parent and suppliment code system version:
csAuthOp.createCodeSystemSuppliment(parent, suppliment); | |
This function creates a concept to be included in a Code System. The new concept is defined by the set of meta-data properties that describe it.
*Description: * |
Creates new concept in a code system. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) URI of Code System that will contain this new concept. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: call create concept method by passing code system version and concept information:
csAuthOp.createConcept("NCIT", "10.0", "C12345", "NCIT", revInfo); | |
This function provides capability to add a new property to a concept.
*Description: * |
Adds a new property to a concept. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) URI of a Code System that contains the concept. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Populate a property to be added:
Property prop = new Property(); |
Step 4: call add property method by passing the code system information, concept information and a new property:
csAuthOp.addNewConceptProperty("urn:oid:11.11.0.99", "1.0", "C12345", "NCIT", prop, revInfo); | |
This function provides capability to create a new association type, an instance of which may be used to link two concepts.
*Description: * |
Creates new association type. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) URI of a Code System that contains the new association type. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: call create association type method by passing the code system, concept and new association type information:
csAuthOp.createAssociationType("urn:oid:11.11.0.99", "1.0", "SCT-ICD9Mapping", "SameAs", "SameAs", "SameAs", true, true, revInfo); | |
The edit operation provides the capability to modify existing code system resources like code system metadata, property, concept, association type etc. For every entry that gets modified, a unique revision(version) identifier will be assigned to that entry. This helps in retrieving snapshots of an entry based on its revision(version) identifier. This unique id can be passed in using the RevisionInfo object described above.
This function provides capability to modify the meta-data that describes the Code System. This method takes in any changes to the meta-data as a form of input parameters. If 'null' no changes will be performed on that particular attribute.
*Description: * |
Modify the meta-data that describes the Code System. |
*Input: * |
org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc. |
*Output: * |
org.LexGrid.codingSchemes.CodingScheme - Modified Code System | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Populate modified code system meta data:
String codingSchemeURI = "urn:oid:11.11.0.99"; |
String codingSchemeName = "New Coding Scheme"; |
org.LexGrid.commonTypes.Source source = new org.LexGrid.commonTypes.Source(); |
Text copyright = new Text(); |
org.LexGrid.naming.SupportedLanguage supportedLang = new org.LexGrid.naming.SupportedLanguage();
supportedLang.setLocalId("eng"); |
mappings.addSupportedLanguage(supportedLang); |
Step 4: call update method to modify the code system:
CodingScheme codeScheme = csAuthOp.updateCodeSystem(revInfo, codingSchemeName, codingSchemeURI, formalName, defaultLanguage, approxNumConcepts, representsVersion, localNameList, sourceList, copyright, mappings); | |
This function provides capability to update properties of a Code System.
*Description: * |
Updates properties of a code system. |
*Input: * |
org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc. |
*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 :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Populate properties to modify. Just modifying langauge and setting isActive to true for property 'propertyId1':
Properties properties = new Properties(); |
Presentation prop = new Presentation(); |
properties.addProperty(prop); |
Step 4: call modify properties method by passing the code system information and modified set of properties:
CodingScheme codeScheme = csAuthOp.updateCodeSystemProperties(revInfo, "New Coding Scheme", "urn:oid:11.11.0.99", "1.0", properties); | |
This function provides capability to modify existing concept in a Code System.
*Description: * |
Modified an existing concept in a code system. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) URI of Code System that contains the concept. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Populate Entity with modified concept:
Entity entityToUpdate = new Entity(); |
Step 4: call modify concept method by passing code system version and concept information:
csAuthOp.updateConcept("NCIT", "10.0", entityToUpdate, revInfo); | |
This function provides capability to modify existing property of a concept.
*Description: * |
Modifies existing property of a concept. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) URI of a Code System that contains the concept. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Populate a modified property. Just modified isActive to 'true' and language to 'eng' in property 'propertyId1':
Property prop = new Property(); |
Step 4: call update property method by passing the code system information, concept information and the modified property:
csAuthOp.updateConceptProperty("urn:oid:11.11.0.99", "1.0", "C12345", "NCIT", prop, revInfo); | |
This function provides capability to modify existing association type.
*Description: * |
Modifies existing association type. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) URI of a Code System that contains the association type. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Populate a modified association type. Just modified isActive to 'true' and forwardName to 'newForwardName' for associationType 'SameAS':
AssociationEntity associationEntity = new AssociationEntity(); |
Step 4: call update association type method by passing the code system information and the modified association type:
csAuthOp.updateAssociationType("urn:oid:11.11.0.99", "1.0", associationEntity, revInfo); | |
Remove operation provides capability to remove code system and its contents.
This function provides capability to remove entire code system from terminology service.
*Description: * |
Remove entire code system from terminology service. |
*Input: * |
org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc. |
*Output: * |
boolean - True means deletion was success, otherwise false. | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: call remove code system method by passing the code system information:
csAuthOp.removeCodeSystem(revInfo, "urn:oid:11.11.0.99", "1.0"); | |
This function provides capability to remove property of a Code System.
*Description: * |
Removes a property of a Code System |
*Input: * |
org.lexevs.cts2.core.update.RevisionInfo revision - (Mandatory) Contains revision information like unique RevisionId, change description, author information etc. |
*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 :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Call remove property method by passing the code system information and the property identifier:
CodingScheme codeScheme = csAuthOp.removeCodeSystemProperty(revInfo, "urn:oid:11.11.0.99", "1.0", "propertId1"); | |
This function provides capability to remove a concept from code system.
*Description: * |
Removes a concept from code system. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) URI of a Code System that contains the concept to be removed. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: call remove concept method by passing the code system and concept information:
csAuthOp.deleteConcept("urn:oid:11.11.0.99", "1.0, "C1234", 'NCIT", revInfo); | |
This function provides capability to remove property of a concept.
*Description: * |
Removes a property of a concept. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) Code System URI that contains the concept. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 3: Populate property that needs to be removed:
Property propertyToRemove = new Property(); |
Step 2: Call remove property method by passing the code system, concept and property information:
csAuthOp.deleteConceptProperty("urn:oid:11.11.0.99", "1.0", "C1234", "NCIT", propertyToRemove, revInfo); | |
Status Change operations provides the capability to change the status a code system or a concept. Status could anything like : isActive, retired, published, pending etc. There is also a flag called 'isActive' that is associated with both code system and concept meta-data that can be changed using this function as well.
'isActive' flag : True means that this resource is searchable and browsable if the temporal context of the operation falls between effectiveDate and expirationDate. False means that this resource is only accessible if requested by id or by a search that specifies that inactive retrievals are allowed. Default: True
This function modifies the status of a code system.
*Description: * |
Modifies the status of a code system. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) Code System URI. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 2: Call status change method by passing the code system and status information:
csAuthOp.updateCodeSystemVersionStatus("urn:oid:11.11.0.99", "1.0", "Active", true, revInfo); | |
This function modifies the status of a concept.
*Description: * |
Modifies the status of a concept. |
*Input: * |
java.lang.String codingSchemeURI - (Mandatory) Code System URI that contains the concept. |
*Output: * |
None | |
*Exception: * |
org.LexGrid.LexBIG.Exceptions.LBException | |
*Sample Call: * |
Step 1: Instantiate CodeSystemAuthoringOperation if it is not done yet :
org.lexevs.cts2.author.CodeSystemAuthoringOperation csAuthorOp = LexEvsCTS2Impl.defaultInstance().getAuthoringOperation().getCodeSystemAuthoringOperation(); |
Step 2: Populate RevisionInfo object:
RevisionInfo revInfo = new RevisionInfo(); |
Step 2: Call status change method by passing the code system, concept and status information:
csAuthOp.updateCodeSystemVersionStatus("urn:oid:11.11.0.99", "1.0", "C1234", "NCIT", "Active", true, revInfo); | |
</html>