[DDI-SRG] Bug 117 additional material
Wendy Thomas
wlt at pop.umn.edu
Tue Jan 29 11:09:00 EST 2008
All of this is in Mantis:
Examples from original email with examples using suggested solution.
Suggested solution:
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)
add optional attribute parentLevel to assign a parent level number
to the top level of a hierachical CodeScheme so that it can be imported
at a specified level
<EditsForCurrentUse> 0..1
<CodeValue attributes: newLevelNumber (0..1) newIsDiscrete
(0..1)> 1..n
EXAMPLE 1:
where Cat_SEX_1 = Male
Cat_SEX_2 = Female
<l:CodeScheme>
<Identifier
type="r:MaintanableIDType"><r:ID>ORIG_SEX</r:ID></Identifier>
<r:Label>Sex</r:Label>
<r:Description>Original sex coding with no totals or missing
values</r:Description>
<l:CategorySchemeReference
type="r:ReferenceType"></r:ID>Cat_SEX</r:ID></l:CategorySchemeReference>
<l:Code isDiscrete="true">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_SEX_1</r:ID></l:CategoryReference>
<l:Value>1</l:Value>
</l:Code>
<l:Code isDiscrete="true">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_SEX_2</r:ID></l:CategoryReference>
<l:Value>2</l:Value>
</l:Code>
<l:CodeScheme>
<l:CodeScheme>
<Identifier
type="r:MaintanableIDType"><r:ID>MissingValueSex</r:ID></Identifier>
<r:Label>Sex</r:Label>
<r:Description>Recoded Sex adding missing value</r:Description>
<l:CategorySchemeReference
type="r:ReferenceType"></r:ID>Cat_MISS</r:ID></l:CategorySchemeReference>
<l:CodeSchemeReference
type="r:ReferenceType"></r:ID>ORIG_SEX</r:ID></l:CategorySchemeReference>
<l:Code isDiscrete="true">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MISS_1</r:ID></l:CategoryReference>
<l:Value>3</l:Value>
</l:Code>
<l:CodeScheme>
EXAMPLE 2A:
<l:CodeScheme>
<Identifier
type="r:MaintanableIDType"><r:ID>TotalSex</r:ID></Identifier>
<r:Label>Sex</r:Label>
<r:Description>Recoded Sex adding total</r:Description>
<l:CodeSchemeReference type="r:ReferenceType"
levelNumber="2"></r:ID>ORIG_SEX</r:ID></l:CodeSchemeReference>
<l:CategorySchemeReference
type="r:ReferenceType"></r:ID>Cat_TOTAL</r:ID></l:CategorySchemeReference>
<l:Hierarchy>Regular</l:Hierarchy>
<l:Level levelNumber="1">
<l:Name>Total</l:Name>
<l:Relationship>Nominal</l:Relationship>
</l:Level>
<l:Level levelNumber="2" parentLevel="1">
<l:Name>Level 1 Members</l:Name>
<l:Relationship>Nominal</l:Relationship>
</l:Level>
<l:Code isDiscrete="false" levelNumber="1" insertBefore="1">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_TOTAL_1</r:ID></l:CategoryReference>
<l:Value>3</l:Value>
</l:Code>
<l:CodeScheme>
EXAMPLE 2B:
where Cat_MET_1 = Iron
Cat_MET_2 = Bar Iron
Cat_MET_3 = Cast Iron
Cat_MET_4 = Pig Iron
Cat_MET_5 = Iron n.e.c.
Cat_MET_6 = Steele
Cat_MET_7 = Stainless Steele
Cat_MET_8 = Steele n.e.c.
<l:CodeScheme>
<Identifier
type="r:MaintanableIDType"><r:ID>ORIG_METAL</r:ID></Identifier>
<r:Label>Sex</r:Label>
<r:Description>Original Metal type coding with no missing categories or
totals</r:Description>
<l:CategorySchemeReference
type="r:ReferenceType"></r:ID>Cat_MET</r:ID></l:CategorySchemeReference>
<l:Hierarchy>Regular</l:Hierarchy>
<l:Level levelNumber="1">
<l:Name>Metal Class</l:Name>
<l:Relationship>Nominal</l:Relationship>
</l:Level>
<l:Level levelNumber="2" parentLevel="1">
<l:Name>Metal Types</l:Name>
<l:Relationship>Nominal</l:Relationship>
</l:Level>
<l:Code isDiscrete="false" levelNumber="1">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET_1</r:ID></l:CategoryReference>
<l:Value>1</l:Value>
<l:Code isDiscrete="true" levelNumber="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET_2</r:ID></l:CategoryReference>
<l:Value>2</l:Value>
</l:Code>
<l:Code isDiscrete="true" levelNumber="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET_3</r:ID></l:CategoryReference>
<l:Value>3</l:Value>
</l:Code>
<l:Code isDiscrete="true" levelNumber="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET_4</r:ID></l:CategoryReference>
<l:Value>4</l:Value>
</l:Code>
<l:Code isDiscrete="true" levelNumber="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET_5</r:ID></l:CategoryReference>
<l:Value>5</l:Value>
</l:Code>
</l:Code>
<l:Code isDiscrete="false" levelNumber="1">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET_6</r:ID></l:CategoryReference>
<l:Value>6</l:Value>
<l:Code isDiscrete="true" levelNumber="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET_7</r:ID></l:CategoryReference>
<l:Value>7</l:Value>
</l:Code>
<l:Code isDiscrete="true" levelNumber="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET_8</r:ID></l:CategoryReference>
<l:Value>8</l:Value>
</l:Code>
</l:Code>
<l:CodeScheme>
<l:CodeScheme>
<Identifier
type="r:MaintanableIDType"><r:ID>TotalMetal</r:ID></Identifier>
<r:Label>Sex</r:Label>
<r:Description>Recoded Metal adding total</r:Description>
<l:CodeSchemeReference type="r:ReferenceType"
parentLevel="3"></r:ID>ORIG_METAL</r:ID></l:CodeSchemeReference>
<l:CategorySchemeReference
type="r:ReferenceType"></r:ID>Cat_TOTAL</r:ID></l:CategorySchemeReference>
<l:Hierarchy>Regular</l:Hierarchy>
<l:Level levelNumber="3">
<l:Name>Total</l:Name>
<l:Relationship>Nominal</l:Relationship>
</l:Level>
<l:Code isDiscrete="false" levelNumber="3" insertBefore="1">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_TOTAL_1</r:ID></l:CategoryReference>
<l:Value>0</l:Value>
</l:Code>
<l:CodeScheme>
EXAMPLE 3:
where Cat_IRON_1 = Bar and Cast Iron
<l:CodeScheme>
<Identifier
type="r:MaintanableIDType"><r:ID>SubSetMetal</r:ID></Identifier>
<r:Label>Sex</r:Label>
<r:Description>Recoded Metal adding subset Bar and Cast
Iron</r:Description>
<l:CodeSchemeReference
type="r:ReferenceType"></r:ID>ORIG_METAL</r:ID></l:CodeSchemeReference>
<l:CategorySchemeReference
type="r:ReferenceType"></r:ID>Cat_IRON</r:ID></l:CategorySchemeReference>
<l:Hierarchy>Irregular</l:Hierarchy>
<l:Level levelNumber="3">
<l:Name>Additional Detail</l:Name>
<l:Relationship>Nominal</l:Relationship>
</l:Level>
<l:Code isDiscrete="false" levelNumber="2" insertBefore="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_IRON_1</r:ID></l:CategoryReference>
<l:Value>1_1</l:Value>
</l:Code>
<EditsForCurrentUse>
<CodeValue newLevelNumber="3">2</CodeValue>
<CodeValue newLevelNumber="3">3</CodeValue>
</EditsForCurrentUse>
<l:CodeScheme>
EXAMPLE 4:
where Cat_MET2_1 = Iron
Cat_MET2_2 = Bar and Cast Iron
Cat_MET2_3 = Pig Iron
Cat_MET2_4 = Iron n.e.c.
<l:CodeScheme>
<Identifier
type="r:MaintanableIDType"><r:ID>ORIG_METAL2</r:ID></Identifier>
<r:Label>Sex</r:Label>
<r:Description>Original Metal type coding with no missing categories or
totals</r:Description>
<l:CategorySchemeReference
type="r:ReferenceType"></r:ID>Cat_MET2</r:ID></l:CategorySchemeReference>
<l:Hierarchy>Regular</l:Hierarchy>
<l:Level levelNumber="1">
<l:Name>Metal Class</l:Name>
<l:Relationship>Nominal</l:Relationship>
</l:Level>
<l:Level levelNumber="2" parentLevel="1">
<l:Name>Metal Types</l:Name>
<l:Relationship>Nominal</l:Relationship>
</l:Level>
<l:Code isDiscrete="false" levelNumber="1">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET2_1</r:ID></l:CategoryReference>
<l:Value>1</l:Value>
<l:Code isDiscrete="true" levelNumber="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET2_2</r:ID></l:CategoryReference>
<l:Value>2</l:Value>
</l:Code>
<l:Code isDiscrete="true" levelNumber="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET2_3</r:ID></l:CategoryReference>
<l:Value>3</l:Value>
</l:Code>
<l:Code isDiscrete="true" levelNumber="2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_MET2_4</r:ID></l:CategoryReference>
<l:Value>4</l:Value>
</l:Code>
</l:Code>
<l:CodeScheme>
where Cat_IRON2_1 = Bar Iron
Cat_IRON2_2 = Cast Iron
<l:CodeScheme>
<Identifier
type="r:MaintanableIDType"><r:ID>AddDetailMetal</r:ID></Identifier>
<r:Label>Sex</r:Label>
<r:Description>Recoded Metal adding Bar Iron and Cast
Iron</r:Description>
<l:CodeSchemeReference
type="r:ReferenceType"></r:ID>ORIG_METAL2</r:ID></l:CodeSchemeReference>
<l:CategorySchemeReference
type="r:ReferenceType"></r:ID>Cat_IRON2</r:ID></l:CategorySchemeReference>
<l:Hierarchy>Irregular</l:Hierarchy>
<l:Level levelNumber="3" parentLevel="2">
<l:Name>Additional Detail</l:Name>
<l:Relationship>Nominal</l:Relationship>
</l:Level>
<l:Code isDiscrete="true" levelNumber="3" insertBefore="2_2">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_IRON2_1</r:ID></l:CategoryReference>
<l:Value>2_1</l:Value>
</l:Code>
<l:Code isDiscrete="true" levelNumber="3" insertBefore="3">
<l:CategoryReference
type="r:ReferenceType"><r:ID>Cat_IRON2_1</r:ID></l:CategoryReference>
<l:Value>2_2</l:Value>
</l:Code>
<EditsForCurrentUse>
<CodeValue newIsDiscrete="false">2</CodeValue>
</EditsForCurrentUse>
<l:CodeScheme>
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