We are starting to build implementations that use the new federal race and ethnicity codes. All the states I have worked with map the codes into 6 boolean fields, 5 for race and one for Hispanic.
The only way I know to convert the RaceList to 5 booleans is to explicitly set the RaceList on the SIFDataObject. Are there any new mapping features that make this easier?
Mark
Mark,
I'm not aware of a way to do the mapping using boolean fields as you suggest. It sounds like a good idea, though. For awhile, we've been considering adding some sort of a "condition" property to a mapping, that if evaluated to true would cause the mapping to succeed and if false, would not do the mapping. That might work for this case. I will enter this into our system as a feature request
Andrew ElmhorstChief ArchitectEdustructures
I use the mappings below for exactly that. The RACE_* fields will be defined only for races present in the race list. In my code I use code like (boolean isNI = Race_NI.length > 0 ? true : false) to convert the field to a bool.
<field name="RACE_AI_AN" sifVersion="+2.0">Demographics/RaceList/Race/Code[.='0998']</field><field name="RACE_AI_AN" sifVersion="-1.5r1">Demographics/Ethnicity[@Code='I' or @Code='G']/@Code</field><field name="RACE_ASIAN" sifVersion="+2.0">Demographics/RaceList/Race/Code[.='0999']</field><field name="RACE_ASIAN" sifVersion="-1.5r1">Demographics/Ethnicity[@Code='A']/@Code</field><field name="RACE_BLACK" sifVersion="+2.0">Demographics/RaceList/Race/Code[.='1000']</field><field name="RACE_BLACK" sifVersion="-1.5r1">Demographics/Ethnicity[@Code='B']/@Code</field><field name="RACE_NH_PI" sifVersion="+2.0">Demographics/RaceList/Race/Code[.='1001']</field><field name="RACE_NH_PI" sifVersion="-1.5r1">Demographics/Ethnicity[@Code='J' or @Code='P']/@Code</field><field name="RACE_WHITE" sifVersion="+2.0">Demographics/RaceList/Race/Code[.='1002']</field><field name="RACE_WHITE" sifVersion="-1.5r1">Demographics/Ethnicity[@Code='C' or @Code='O']/@Code</field><field name="HISPANIC" sifVersion="+2.0">Demographics/HispanicLatino</field><field name="HISPANIC" sifVersion="-1.5r1">Demographics/Ethnicity[@Code='H']/@Code</field>