///<summary>Gets a list of PatRaces that correspond to a PatientRaceOld enum.</summary> public static List<PatRace> GetPatRacesFromPatientRaceOld(PatientRaceOld raceOld) { List<PatRace> retVal=new List<PatRace>(); switch(raceOld) { case PatientRaceOld.Unknown: //Do nothing. No entry means "Unknown", the old default. break; case PatientRaceOld.Multiracial: retVal.Add(PatRace.Multiracial); break; case PatientRaceOld.HispanicLatino: retVal.Add(PatRace.White); retVal.Add(PatRace.Hispanic); break; case PatientRaceOld.AfricanAmerican: retVal.Add(PatRace.AfricanAmerican); break; case PatientRaceOld.White: retVal.Add(PatRace.White); break; case PatientRaceOld.HawaiiOrPacIsland: retVal.Add(PatRace.HawaiiOrPacIsland); break; case PatientRaceOld.AmericanIndian: retVal.Add(PatRace.AmericanIndian); break; case PatientRaceOld.Asian: retVal.Add(PatRace.Asian); break; case PatientRaceOld.Other: retVal.Add(PatRace.Other); break; case PatientRaceOld.Aboriginal: retVal.Add(PatRace.Aboriginal); break; case PatientRaceOld.BlackHispanic: retVal.Add(PatRace.AfricanAmerican); retVal.Add(PatRace.Hispanic); break; } return retVal; }
///<summary>Uses deprecated PatientRaceOld enum which should be converted from PatientRace entries before this function is called.</summary> private string ConvertEthnicGroup(PatientRaceOld race) { switch(race) { case PatientRaceOld.HispanicLatino: return "H^Hispanic or Latino^HL70189"; default: return "N^Not Hispanic or Latino^HL70189"; } }
//======================================================================================================================================= //DO NOT ALTER any of these Convert... methods for use with any other HL7 bridge. //Each bridge tends to have slightly different implementation. //No bridge can share any of these. //Instead, copy them into other classes. //This set of methods is ONLY for ECW, and will have to be renamed and grouped if any other DFT bridge is built. //======================================================================================================================================= ///<summary>Convert the patient race entries to the deprecated PatientRaceOld enum before calling this method.</summary> private string ConvertRace(PatientRaceOld race) { switch(race) { case PatientRaceOld.AmericanIndian: return "American Indian Or Alaska Native"; case PatientRaceOld.Asian: return "Asian"; case PatientRaceOld.HawaiiOrPacIsland: return "Native Hawaiian or Other Pacific"; case PatientRaceOld.AfricanAmerican: return "Black or African American"; case PatientRaceOld.White: return "White"; case PatientRaceOld.HispanicLatino: return "Hispanic"; case PatientRaceOld.Other: return "Other Race"; default: return "Other Race"; } }
///<summary>Uses deprecated PatientRaceOld enum which should be converted from PatientRace entries before this function is called.</summary> private string ConvertRace(PatientRaceOld race) { switch(race) { case PatientRaceOld.AmericanIndian: return "1002-5^American Indian Or Alaska Native^HL70005"; case PatientRaceOld.Asian: return "2028-9^Asian^HL70005"; case PatientRaceOld.AfricanAmerican: return "2054-5^Black or African American^HL70005"; case PatientRaceOld.HawaiiOrPacIsland: return "2076-8^Native Hawaiian or Other Pacific Islander^HL70005"; case PatientRaceOld.White: return "2106-3^White^HL70005"; case PatientRaceOld.Other: return "2131-1^Other Race^HL70005"; default://including hispanic return "2131-1^Other Race^HL70005"; } }