NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

Sample Coding Scheme Manifest for the NCI Thesaurus

Code Block
<nowiki>

 <CodingSchemeManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://LexGrid.org/schema/2009/01/LexOnt/CodingSchemeManifest http://LexGrid.org/schema/2009/01/LexOnt/CodingSchemeManifest.xsd" 
     xmlns:owldef="http://LexGrid.org/schema/2009/01/LexOnt/CodingSchemeManifest" 
     xmlns:lgNaming="http://LexGrid.org/schema/2009/01/LexGrid/naming"
     xmlns:lgRel="http://LexGrid.org/schema/2009/01/LexGrid/relations" 
     xmlns="http://LexGrid.org/schema/2009/01/LexOnt/CodingSchemeManifest"
     id="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#">
    <codingScheme toOverride="true">NCI_Thesaurus</codingScheme> 
    <entityDescription toOverride="true">NCI Thesaurus</entityDescription> 
    <formalName toOverride="true">NCI Thesaurus</formalName> 
    <codingSchemeURI>http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#</codingSchemeURI> 
    <defaultLanguage toOverride="true">en</defaultLanguage> 
    <representsVersion toOverride="true">09.06b</representsVersion> 
    <localName toAdd="true">NCI Thesaurus</localName> 
    <localName toAdd="true">NCI_Thesaurus</localName> 
    <owldef:mappings xmlns="http://LexGrid.org/schema/2009/01/LexGrid/codingSchemes">
        <lgNaming:supportedCodingScheme localId="NCI_Thesaurus" uri="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#" isImported="true" /> 
        <lgNaming:supportedRepresentationalForm localId="text_plain" uri="urn:oid:2.16.840.1.113883.6.10:text_plain" /> 
    </owldef:mappings>
      <owldef:associationDefinitions toUpdate="true">
        <assoc associationName="Has_Salt_Form" entityCode="A5" forwardName="Has_Salt_Form" reverseName="Has_Free_Acid_Or_Base_Form" /> 
    </owldef:associationDefinitions>
</CodingSchemeManifest>
</nowiki>

Dealing with Large Terminologies

...

This value can be adjusted by creating an XML file that resolves against this schema: http://LexGrid.org/schema/LexBIG/2009/01/Preferences/load/LoadPreferences

XMLMetadataFilePath

Any xml document can be assigned as metadata to a newly loaded coding scheme. The xml document is broken down into individual tags and values, which are then searchable through the LexBIG Service Metadata interface. This parameter indicates the path of xml metadata assigned during the current load operation. For most loaders, the given path serves strictly as an option to input user-specified data. For The NCI Metathesaurus loader, metadata is automatically generated and assigned to the coding scheme. In these cases, the generated xml will be output to the given file, overwriting any existing content.

...

This value can be adjusted by creating an XML file that resolves against this schema: http://LexGrid.org/schema/LexBIG/2009/01/Preferences/load/SemNetLoadPreferences

SemNetLoaderPreferences

The load parameter controls which inherited relationships are loaded and navigable within LexBIG. When selecting the option not to load inherited relationships, all associations are extracted from the source file SRSTR (stated relations). When loading all inherited relations, associations are extracted from the source file SRSTRE1 (classified relations).

...

For instance, the following revision defines a new association for the coding scheme AutomobilesAD. The AssociationTarget class is a Versionable type, but the AssociationSource is not. So the AssociationTarget revision is defined by an EntryState element with a changeType value "NEW".

Code Block
<nowiki>
<revision xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://LexGrid.org/schema/2010/01/LexGrid/versions http://LexGrid.org/schema/2010/01/LexGrid/versions.xsd"
    xmlns="http://LexGrid.org/schema/2010/01/LexGrid/versions"
    xmlns:lgBuiltin="http://LexGrid.org/schema/2010/01/LexGrid/builtins"
    xmlns:lgCommon="http://LexGrid.org/schema/2010/01/LexGrid/commonTypes"
    xmlns:lgCon="http://LexGrid.org/schema/2010/01/LexGrid/concepts"
    xmlns:lgRel="http://LexGrid.org/schema/2010/01/LexGrid/relations"
    xmlns:lgCS="http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes"
    xmlns:lgNaming="http://LexGrid.org/schema/2010/01/LexGrid/naming"
    xmlns:lgVD="http://LexGrid.org/schema/2010/01/LexGrid/valueDomains"
    xmlns:NCIHistory="http://LexGrid.org/schema/2010/01/LexGrid/NCIHistory" revisionId="testRelease2010Jan_testData">
    <changedEntry>
        <changedCodingSchemeEntry codingSchemeName="AutomobilesAD"
            codingSchemeURI="urn:oid:22.22.0.2" representsVersion="2.0">
            <lgCommon:entryState containingRevision="testRelease2010Jan_testData"
                relativeOrder="0" changeType="DEPENDENT"/>
            <lgCS:mappings/>
            <lgCS:relations containerName="rel">
                <lgCommon:entryState containingRevision="testRelease2010Jan_testData"
                    relativeOrder="0" changeType="DEPENDENT"/>
                <lgRel:associationPredicate associationName="sameAs">
                    <lgRel:source sourceEntityCode="005"
                        sourceEntityCodeNamespace="AutomobilesAD">
                        <lgRel:targetData associationInstanceId="inst00b" isActive="true"
                            status="high" isInferred="false" isDefining="false"
                            effectiveDate="2000-12-01T01:29:35"
                            expirationDate="2019-10-01T01:45:33">
                            <lgCommon:owner>BSI</lgCommon:owner>
                            <lgCommon:entryState
                                containingRevision="testRelease2010Jan_testData"
                                relativeOrder="0" changeType="NEW"/>
                            <lgRel:usageContext>contextText001</lgRel:usageContext>
                            <lgRel:associationQualification associationQualifier="qual001">
                                <lgRel:qualifierText>qualTextValue001</lgRel:qualifierText>
                            </lgRel:associationQualification>
                            <lgRel:associationDataText>testData001</lgRel:associationDataText>
                        </lgRel:targetData>
                    </lgRel:source>
                </lgRel:associationPredicate>
            </lgCS:relations>
        </changedCodingSchemeEntry>
    </changedEntry>
</revision>
</nowiki>

Notice that even though an AssociationSource contains a collection of targets, it is not a Versionable element itself, so the revision definition for an association is in the association target. A collection of sources is contained in another unversioned element the AssociationPredicate. The predicate's container, Relations is a Versionable element but it is already defined in the coding scheme so it is defined as a "DEPENDENT" revision. Similarly the containing CodingScheme itself is a Versionable element also defined as a "DEPENDENT" revision. Notice the revisionId attribute of the the top level Revision element and how it corresponds to the containingRevision attribute value on all the EntryState elements. This value must differ from the current revisionId of the coding scheme being revised.

...

Post Processor Example Code

Code Block
<nowiki>
                AbsoluteCodingSchemeVersionReference ref = new AbsoluteCodingSchemeVersionReference();
               	ref.setCodingSchemeURN("urn:oid:11.00.11.1");
		ref.setCodingSchemeVersion("1.0");
                LexBIGService lbs = lb_gui_.getLbs();
                
                try {
                    LoaderPostProcessor postProcessor = 
                        lbs.getServiceManager(null).getExtensionRegistry().
                        getGenericExtension("SupportedAttributePostProcessor", LoaderPostProcessor.class);
                    
                    LoaderPostProcessRunner loaderPostProcessRunner = new LoaderPostProcessRunner(postProcessor);
                    loaderPostProcessRunner.runProcess(ref, null));
</nowiki>

Post Processor Post Load Application in lbGUI

...

Original Coding Scheme Excerpt

Code Block
<nowiki>
<!--
    This file was created using LexGrid.  You can find out more about LexGrid at http://informatics.mayo.edu/ .
    Generated at: 12/14/06 3:38 PM
    Generated by: org.LexGrid.emf
-->
<codingScheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes  https://ncisvn.nci.nih.gov/svn/lexevs/base/v6/trunk/lexgrid_model/lgModel/master/codingSchemes.xsd" 
  xmlns="http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes"
  xmlns:lgBuiltin="http://LexGrid.org/schema/2010/01/LexGrid/builtins" 
  xmlns:lgCommon="http://LexGrid.org/schema/2010/01/LexGrid/commonTypes"
  xmlns:lgCon="http://LexGrid.org/schema/2010/01/LexGrid/concepts" 
  xmlns:lgRel="http://LexGrid.org/schema/2010/01/LexGrid/relations" 
  xmlns:lgCS="http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes" 
  xmlns:lgLDAP="http://LexGrid.org/schema/2010/01/LexGrid/ldap" 
  xmlns:lgNaming="http://LexGrid.org/schema/2010/01/LexGrid/naming" 
  xmlns:lgService="http://LexGrid.org/schema/2010/01/LexGrid/service" 
  xmlns:lgVD="http://LexGrid.org/schema/2010/01/LexGrid/valueDomains" 
  xmlns:lgVer="http://LexGrid.org/schema/2010/01/LexGrid/versions" 
  xmlns:NCIHistory="http://LexGrid.org/schema/2010/01/LexGrid/NCIHistory" 
  approxNumConcepts="5" codingSchemeName="Automobiles" defaultLanguage="en" formalName="autos" codingSchemeURI="urn:oid:11.11.0.1" representsVersion="1.0">
  <lgCommon:entityDescription>Automobiles</lgCommon:entityDescription>
  <localName>11.11.0.1</localName>
  <localName>Automobiles</localName>
  <localName>SomeOtherValue</localName>
  <copyright>Copyright by Mayo Clinic.</copyright>
  
  <mappings>
    <lgNaming:supportedAssociation localId="hasSubtype" uri="urn:oid:1.3.6.1.4.1.2114.108.1.8.1">hasSubtype</lgNaming:supportedAssociation>
    <lgNaming:supportedAssociation localId="uses" uri="urn:oid:11.11.0.1">uses</lgNaming:supportedAssociation>
    <lgNaming:supportedAssociation localId="A1" uri="http://A1.org" entityCode="AssocEntity" entityCodeNamespace="Automobiles" codingScheme="Automobiles">A1</lgNaming:supportedAssociation>
    <lgNaming:supportedAssociationQualifier localId="hasEngine" uri="www.something.com">hasEngine</lgNaming:supportedAssociationQualifier>
    <lgNaming:supportedAssociationQualifier localId="since" uri="www.since.com">since</lgNaming:supportedAssociationQualifier>
    <lgNaming:supportedAssociationQualifier localId="sold" uri="www.sold.com">sold</lgNaming:supportedAssociationQualifier>
    <lgNaming:supportedCodingScheme localId="Automobiles" uri="urn:oid:11.11.0.1">Automobiles</lgNaming:supportedCodingScheme>
    <lgNaming:supportedCodingScheme localId="ExpendableParts" uri="urn:oid:11.11.0.50">Expendable Parts</lgNaming:supportedCodingScheme>
    <lgNaming:supportedCodingScheme localId="GermanMadeParts" uri="urn:oid:11.11.0.2">German Made Parts</lgNaming:supportedCodingScheme>   
    <lgNaming:supportedContainerName localId="relations">relations</lgNaming:supportedContainerName>   
    <lgNaming:supportedDataType localId="testhtml">test/html</lgNaming:supportedDataType>
    <lgNaming:supportedDataType localId="textplain">text/plain</lgNaming:supportedDataType>    
    <lgNaming:supportedHierarchy localId="is_a" associationNames="hasSubtype" isForwardNavigable="true" rootCode="@">hasSubtype</lgNaming:supportedHierarchy>    
    <lgNaming:supportedLanguage localId="en" uri="www.en.org/orsomething">en</lgNaming:supportedLanguage>
    <lgNaming:supportedNamespace localId="Automobiles" uri="urn:oid:11.11.0.1" equivalentCodingScheme="Automobiles">Automobiles</lgNaming:supportedNamespace>
    <lgNaming:supportedNamespace localId="ExpendableParts" uri="urn:oid:11.11.0.50" equivalentCodingScheme="ExpendableParts">Expendable Parts</lgNaming:supportedNamespace>
    <lgNaming:supportedNamespace localId="GermanMadePartsNamespace" uri="urn:oid:11.11.0.2" equivalentCodingScheme="GermanMadeParts">German Made Parts</lgNaming:supportedNamespace>
    <lgNaming:supportedNamespace localId="TestForSameCodeNamespace" uri="urn:oid:11.11.0.99">TestForSameCodeNamespace</lgNaming:supportedNamespace>
    <lgNaming:supportedProperty localId="definition">definition</lgNaming:supportedProperty>
    <lgNaming:supportedProperty localId="textualPresentation" propertyType="presentation">textualPresentation</lgNaming:supportedProperty>
    <lgNaming:supportedProperty localId="genericProperty" >genericProperty</lgNaming:supportedProperty>
    <lgNaming:supportedSource localId="lexgrid.org">lexgrid.org</lgNaming:supportedSource>
    <lgNaming:supportedSource localId="_111101">11.11.0.1</lgNaming:supportedSource>
  </mappings>
  <properties>
    <lgCommon:property expirationDate="2001-12-17T09:30:47Z" language="en" propertyType="property" status="sampleStatus" propertyId="p1" effectiveDate="2001-12-17T09:30:47Z" isActive="true" propertyName="codingSchemeProp">
      <lgCommon:owner >sampleOwner</lgCommon:owner>
      <lgCommon:source role="sampleRole" subRef="sampleSubRef">lexgrid.org</lgCommon:source>
      <lgCommon:usageContext>sampleUsageContext</lgCommon:usageContext>
      <lgCommon:propertyQualifier propertyQualifierName="samplePropertyQualifier">
        <lgCommon:value>Property Qualifier Text</lgCommon:value>
      </lgCommon:propertyQualifier>
      <lgCommon:value>Property Text</lgCommon:value>
    </lgCommon:property>
</properties>
  <entities>
    <lgCon:entity entityCode="005" entityCodeNamespace="Automobiles" isActive="true">
      <lgCommon:entityDescription>Domestic Auto Makers</lgCommon:entityDescription>
      <lgCon:entityType>concept</lgCon:entityType>
      <lgCon:presentation propertyName="textualPresentation" propertyId="p1" isPreferred="true">
      	<lgCommon:source role="sampleSource" subRef="sampleSubRef1">lexgrid.org</lgCommon:source>
        <lgCommon:source role="sampleSource" subRef="sampleSubRef2">lexgrid.org</lgCommon:source>
        <lgCommon:value>Domestic Auto Makers</lgCommon:value>        
      </lgCon:presentation>
      <lgCon:presentation propertyName="textualPresentation" propertyId="p2" isPreferred="false">
        <lgCommon:value>American Car Companies</lgCommon:value>
      </lgCon:presentation>
    </lgCon:entity>
</nowiki>

Full Coding Scheme to be Loaded as Extension

Code Block
<nowiki>
<lgCS:codingScheme
    xmlns:lgBuiltin="http://LexGrid.org/schema/2010/01/LexGrid/builtins"
    xmlns:lgCommon="http://LexGrid.org/schema/2010/01/LexGrid/commonTypes"
    xmlns:lgCon="http://LexGrid.org/schema/2010/01/LexGrid/concepts"
    xmlns:lgCS="http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes"
    xmlns:lgNaming="http://LexGrid.org/schema/2010/01/LexGrid/naming"
    xmlns:lgRel="http://LexGrid.org/schema/2010/01/LexGrid/relations"
    xmlns:lgVD="http://LexGrid.org/schema/2010/01/LexGrid/valueSets"
    xmlns:lgVer="http://LexGrid.org/schema/2010/01/LexGrid/versions"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes  http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes.xsd"
    codingSchemeName="Automobiles_extension"
    codingSchemeURI="urn:oid:11.11.0.1.1-extension"
    formalName="Automobiles Extension" defaultLanguage="en"
    approxNumConcepts="1" representsVersion="1.0-extension">
    
    <lgCommon:entityDescription>Automobiles Extension</lgCommon:entityDescription>
    <lgCS:mappings>
    <lgNaming:supportedAssociation localId="hasSubtype"  entityCode="hasSubtype" entityCodeNamespace="Automobiles" codingScheme="Automobiles">hasSubtype</lgNaming:supportedAssociation>
    <lgNaming:supportedCodingScheme localId="Automobiles_extension" uri="urn:oid:11.11.0.1-extension">Automobiles</lgNaming:supportedCodingScheme>
    <lgNaming:supportedCodingScheme localId="Automobiles" uri="urn:oid:11.11.0.1">Automobiles</lgNaming:supportedCodingScheme>
    <lgNaming:supportedHierarchy localId="is_a" associationNames="hasSubtype" isForwardNavigable="true" rootCode="@">hasSubtype</lgNaming:supportedHierarchy>
    <lgNaming:supportedNamespace localId="Automobiles" uri="urn:oid:11.11.0.1" equivalentCodingScheme="Automobiles">Automobiles</lgNaming:supportedNamespace>
    <lgNaming:supportedNamespace localId="Automobiles_extension" uri="urn:oid:11.11.0.1.1" equivalentCodingScheme="Automobiles_extension">Automobiles_extension</lgNaming:supportedNamespace>
   
    
    </lgCS:mappings>
    
    <lgCS:properties/>
    <lgCS:entities>
        <lgCon:entity
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes  http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes.xsd"
            isActive="true" entityCode="Cadillac"
            entityCodeNamespace="Automobiles_extension" isAnonymous="false" isDefined="false" >
    
           <lgCommon:entityDescription>Cadillac</lgCommon:entityDescription>
           <lgCon:entityType>concept</lgCon:entityType>
           <lgCon:presentation propertyName="textualPresentation" propertyId="p1" isPreferred="true">
  				<lgCommon:source>Extension</lgCommon:source>
 			 	<lgCommon:value dataType="string">Cadillac</lgCommon:value>
           </lgCon:presentation>
        </lgCon:entity> 
        <lgCon:entity
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes  http://LexGrid.org/schema/2010/01/LexGrid/codingSchemes.xsd"
            isActive="true" entityCode="DeVille"
            entityCodeNamespace="Automobiles_extension" isAnonymous="false" isDefined="false" >
    
           <lgCommon:entityDescription>DeVille</lgCommon:entityDescription>
           <lgCon:entityType>concept</lgCon:entityType>
           <lgCon:presentation propertyName="textualPresentation" propertyId="p1" isPreferred="true">
  				<lgCommon:source>Extension</lgCommon:source>
 			 	<lgCommon:value dataType="string">DeVille</lgCommon:value>
           </lgCon:presentation>
        </lgCon:entity> 
    </lgCS:entities>
    
    <lgCS:relations containerName="relations">
        <lgRel:associationPredicate  associationName="hasSubtype">
  			<lgRel:source sourceEntityCodeNamespace="Automobiles" sourceEntityCode="GM">
          		<lgRel:target targetEntityCodeNamespace="Automobiles_extension" targetEntityCode="Cadillac"/>
            </lgRel:source>
            <lgRel:source sourceEntityCodeNamespace="Automobiles_extension" sourceEntityCode="Cadillac">
          		<lgRel:target targetEntityCodeNamespace="Automobiles_extension" targetEntityCode="DeVille"/>
            </lgRel:source>
 </lgRel:associationPredicate>
    </lgCS:relations>
</lgCS:codingScheme>  
</nowiki>

Extension Loading Scenario

...

  • This will be a child element of the AssociationSource.
  • Populate the targetEntityCodeNamespace with the supported namespace local Id of the target coding scheme.
  • Populate the targetEntityCode with the unique identifier (enityCode in LexGrid) of the concept in the target coding scheme.
Scrollbar
iconsiconsfalse