[DDI-SRG] complete handling of edited code schemes

Wendy Thomas wlt at pop.umn.edu
Sun Jan 27 22:29:30 EST 2008


Editing CodingSchemes without replicating base items
This includes the need to identify which are the "new" codes and which are 
from the original scheme


   1 - adding items to non-hierachies
   2 - adding items and levels to extremes and encapsulating
   3 - adding items and levels within exisiting structure
   4 - adding subset of items

Examples:

1 - Adding additional missing data categories to a CodeScheme
     This is accomplished with current structure by importing established 
CodeScheme and adding additional codes

2 - Adding a total which changes a non-hierarchy to a hierarchy or adding 
a level to a hierarchy
In the first case level numbers would need to be added to exisiting Codes 
thereby editing the original structure

     Exisiting:
     Male (discrete)
     Female (discrete)

     New:
     Total level=1
        Male level=2  (discrete)     ADD LEVEL
        Female level=2  (discrete)   ADD LEVEL

Add a new encapsulating level that does not change the level numbers (as 
these are identifiers only not inidicative of order) but there is no way 
to import a CodeScheme within a Code OR to define the levels in such a way 
as to define inclusion of either levels themselves or specific codes 
within a defined code other than through hierarchy

     Exisiting:
        Iron level=1
          Bar Iron level = 2 (discrete)
          Cast Iron level = 2  (discrete)
          Pig Iron  level = 2 (discrete)
          Iron not elsewhere classified level = 2  (discrete)
        Steele level=1
          ... level=2 (discrete)

     New:
     Total level=0         NEED TO DEFINE THIS LEVEL AS PARENT OF LEVEL 1 
(Level 1 and level 2 relationship defined by nesting)
        Iron level=1
          Bar Iron level = 2 (discrete)
          Cast Iron level = 2  (discrete)
          Pig Iron  level = 2 (discrete)
          Iron not elsewhere classified level = 2  (discrete)
        Steele level=1
          ... level=2 (discrete)

3 - Creating a new sub-level to provide for a new sub-total

     Exisiting:
        Iron level=1
          Bar Iron level = 2 (discrete)
          Cast Iron level = 2  (discrete)
          Pig Iron  level = 2 (discrete)
          Iron not elsewhere classified level = 2  (discrete)

     New:
        Iron level=1
           Bar and Cast Iron level = 2             NEW ITEM
              Bar Iron level=3 (discrete)          LEVEL SHIFT
              Cast Iron level=3  (discrete)        LEVEL SHIFT
           Pig Iron  level = 2 (discrete)
           Iron not elsewhere classified  level = 2 (discrete)



4 - Adding new detail to an existing set

     Exisiting:
        Iron level=1
          Bar and Cast Iron level = 2 (discrete)
          Pig Iron  level = 2 (discrete)
          Iron not elsewhere classified level = 2  (discrete)

     New:
        Iron level=1
           Bar and Cast Iron level = 2             NO LONGER DISCRETE
              Bar Iron level=3 (discrete)          NEW ITEM NEW LEVEL
              Cast Iron level=3  (discrete)        NEW ITEM NEW LEVEL
           Pig Iron  level = 2 (discrete)
           Iron not elsewhere classified  level = 2 (discrete)


First we have to acknowledge that we are paying the price here of making 
the decision to rely on nesting to reflect containership in code schemes. 
Ok...now to the problem

We need to be able to

a) import a full scheme as content of another code (create a total level)

b) assign a level to a full codescheme so that non-hierarchical 
codeSchemes can be inserted into a hierarchy such as total

c) describe level relationships in some other way than nesting

d) "insert" new codes in specific locations and identify existing codes 
that become children of that insert and/or become the parent

e) clearly differentiate between those elements incorporated from the 
included scheme and those that are added


Current Structure of CodeScheme:

"CodeSchemeType"
    "Identifier" type="r:MaintainableIDType"
    "r:Label" minOccurs="0" maxOccurs="unbounded"
    "r:Description" minOccurs="0" maxOccurs="unbounded"
    "CodeSchemeReference" minOccurs="0" maxOccurs="unbounded"
    "CategorySchemeReference" minOccurs="0"
    "HierarchyType" minOccurs="0"
    "Level" minOccurs="0" maxOccurs="unbounded" ATTRIBUTE "levelNumber"
       "Name" type="xs:string"
       "r:Description" minOccurs="0" maxOccurs="unbounded"
       "RelationshipType" minOccurs="0"
       "Interval" minOccurs="0"
          "Anchor" type="xs:string"
          "Increment" type="xs:string"
    "Code" minOccurs="0" maxOccurs="unbounded"  ATTRIBUTES "isDiscrete" 
"levelNumber"
       "CategoryReference" type="r:ReferenceType"
       "Value" type="xs:string"
       "Code" minOccurs="0" maxOccurs="unbounded"



ADD TO Code: optional insertBefore attribute which provides the CodeValue 
of the Code that will immediately follow it. If no value is provided it is 
assumed that the new code will be added to the end of the imported code 
scheme in the order they appear.

ADD TO Level: optional attribute parentLevel:

ADD EXTENSION to CodeSchemeReference:
       add optional attribute levelNumber to assign a level number to all 
members of a non-hierachical CodeScheme so that it can be imported at a 
specified level (to make subordinate to a total)

       <EditsForCurrentUse>   0..1
           <CodeValue attributes: newLevelNumber (0..1) newIsDiscrete 
(0..1)>        1..n








Wendy L. Thomas                          Phone: +1 612.624.4389
Data Access Core Director		 Fax:   +1 612.626.8375
Minnesota Population Center              Email: wlt at pop.umn.edu
University of Minnesota
50 Willey Hall
225 19th Avenue South
Minneapolis, MN 55455


More information about the DDI-SRG mailing list