Esempio n. 1
0
        public ClassicMasterAlias Translate(Master_Name_Alias alias)
        {
            if (alias == null)
            {
                return(new ClassicMasterAlias());
            }

            return(new ClassicMasterAlias
            {
                Age = ResolveCodeValue(alias.Age, SystemCodes.AGE),
                Address = LocationAdapter.Translate(
                    poBox: alias.PO_Box,
                    apartment: alias.Apartment,
                    city: alias.City,
                    state: alias.State,
                    address: alias.Address,
                    zip: alias.Zip),
                BusinessName = alias.Business_Name,
                DateBorn = alias.Date_Born,
                EntryType = alias.Entry_Type,
                FirstName = alias.Name_First,
                Juvenile = alias.Juvenile,
                LastName = alias.Name_Last,
                MasterAddressId = alias.Master_Address_Link,
                MasterNameAliasId = alias.Master_Name_Alias_Link,
                MasterName = alias.Master_Name,
                MasterPersonId = alias.Master_Name_Link,
                MiddleName = alias.Name_Middle,
                Moniker = alias.Moniker,
                Race = ResolveCodeValue(alias.Race, SystemCodes.RAC),
                RealName = alias.Real_Name,
                Sex = ResolveCodeValue(alias.Sex, SystemCodes.SEX),
                Ssn = alias.SSN,
                Suffix = alias.Name_Suffix,
                SoundexFirst = alias.soundex_first,
                SoundexMiddle = alias.soundex_middle,
                SoundexLast = alias.soundex_last
            });
        }
Esempio n. 2
0
        public ClassicMasterName Translate(Master_Name name)
        {
            if (name == null)
            {
                return(new ClassicMasterName());
            }

            return(new ClassicMasterName()
            {
                Age = ResolveCodeValue(name.Age, SystemCodes.AGE),
                Age2 = name.Age2.ParseShort(null),
                AgeAsOf = name.Age_As_Of,
                Alias = name.Alias,
                Address = LocationAdapter.Translate(
                    poBox: name.PO_Box,
                    apartment: name.Apartment,
                    city: name.City,
                    country: name.Country,
                    county: name.County,
                    state: name.State,
                    address: name.Address,
                    zip: name.Zip)
                ,

                Contact1 = ContactInfoAdapter.Translate("Phone", name.Phone1),
                Contact2 = ContactInfoAdapter.Translate("Phone", name.Phone2),
                Contact3 = ContactInfoAdapter.Translate("Cell", name.Cell_Phone),

                AttorneyName = new CodeValue(name.Attorney, name.Attorney),

                Build = ResolveCodeValue(name.Build, SystemCodes.BUI),
                BusinessName = name.Business_Name,
                DateOfBirth = name.Date_Born,
                OccupationOrganization = new OccupationOrganizationDetails()
                {
                    Name = name.Employer_Name,
                    Address = LocationAdapter.Translate(
                        poBox: name.Employer_PO_Box,
                        city: name.Employer_City,
                        state: name.Employer_State,
                        address: name.Employer_Address,
                        zip: name.Employer_Zip)
                    ,
                    Contact1 = ContactInfoAdapter.Translate("Phone", name.Employer_Phone),
                    OccupationCodeDescription = ResolveCodeValue(name.Occupation_Code, SystemCodes.OCC)
                },
                NearestRelativeRelationship = ResolveCodeValue(name.Relationship, SystemCodes.REL),
                NearestRelative = NearestRelativeDetailsAdapter.Translate(name.Nearest_Relative, LocationAdapter.Translate(
                                                                              address: name.Relative_Address,
                                                                              apartment: name.Relative_Apartment,
                                                                              city: name.Relative_City,
                                                                              poBox: name.Relative_PO_Box,
                                                                              state: name.Relative_State,
                                                                              zip: name.Relative_Zip
                                                                              ), ContactInfoAdapter.Translate("Phone", name.Relative_Phone)),

                EntryType = name.Entry_Type,
                Ethnicity = ResolveCodeValue(name.Ethnicity, SystemCodes.ETH),
                EyeColor = ResolveCodeValue(name.Eye_Color, SystemCodes.EYC),
                FacialHair = ResolveCodeValue(name.Facial_Hair, SystemCodes.FAH),
                FBINumber = name.FBI_Number,
                FirstName = name.Name_First,
                Glasses = name.Glasses == true?ResolveCodeValue("Glasses", SystemCodes.GLA) : null,
                              HairColor = ResolveCodeValue(name.Hair_Color, SystemCodes.HAC),
                              HairLength = ResolveCodeValue(name.Hair_Length, SystemCodes.HAL),
                              HairStyle = ResolveCodeValue(name.Hair_Style, SystemCodes.HAS),
                              Height = name.Height,
                              JcaNumber = name.JCA_Number,
                              Juvenile = name.Juvenile,
                              LastName = name.Name_Last,
                              LicenseNumber = name.License_Number,
                              LicenseState = ResolveCodeValue(name.License_State, SystemCodes.STT),
                              Localid = name.Local_id,
                              MaritalStatus = ResolveCodeValue(name.Marital_Status, SystemCodes.MAR),
                              MasterPersonId = name.Master_Name_Link,
                              MiddleName = name.Name_Middle,
                              MiscellaneousIdNumber = name.Misc_ID_Number,
                              MiscellaneousIdState = ResolveCodeValue(name.Misc_ID_State, SystemCodes.STT),
                              MiscellaneousIdType = ResolveCodeValue(name.Misc_ID_Type, SystemCodes.IDTYPE),
                              Moniker = name.Moniker,
                              PlaceOfBirth = ResolveCodeValue(name.Place_of_Birth, SystemCodes.BIRTHPL),
                              Race = ResolveCodeValue(name.Race, SystemCodes.RAC),
                              ResidentStatus = ResolveCodeValue(name.Resident_Status, SystemCodes.RNU),
                              SBINumber = name.SBI_Number,
                              Sex = ResolveCodeValue(name.Sex, SystemCodes.SEX),
                              Skin = ResolveCodeValue(name.Skin, SystemCodes.SKN),
                              SMTYesNo = name.SMT_Yes_No,
                              Ssn = name.SSN,
                              Suffix = name.Name_Suffix,
                              Weight = name.Weight
            });
        }