Esempio n. 1
0
        private static void CreateAgencyAddressConfig()
        {
            AutoMapperSetup.CreateMapToEditableDto <Staff, StaffPhoneNumbersDto> ();
            AutoMapperSetup.CreateMapToEditableDto <StaffPhone, StaffPhoneNumberDto> ()
            .ForMember(dest => dest.PhoneNumber, opt => opt.MapFrom(src => src.Phone.PhoneNumber))
            .ForMember(dest => dest.PhoneExtensionNumber, opt => opt.MapFrom(src => src.Phone.PhoneExtensionNumber));

            AutoMapperSetup.CreateMapToEditableDto <Staff, StaffAddressesDto> ();
            AutoMapperSetup.CreateMapToEditableDto <StaffAddress, StaffAddressDto> ()
            .ForMember(dest => dest.FirstStreetAddress, opt => opt.MapFrom(src => src.Address.FirstStreetAddress))
            .ForMember(dest => dest.SecondStreetAddress, opt => opt.MapFrom(src => src.Address.SecondStreetAddress))
            .ForMember(dest => dest.CityName, opt => opt.MapFrom(src => src.Address.CityName))
            .ForMember(dest => dest.CountyArea, opt => opt.MapFrom(src => src.Address.CountyArea))
            .ForMember(dest => dest.StateProvince, opt => opt.MapFrom(src => src.Address.StateProvince))
            .ForMember(dest => dest.PostalCode, opt => opt.MapFrom(src => src.Address.PostalCode.Code));

            AutoMapperSetup.CreateMapToAbstractDto <Agency, AgencyAddressesAndPhonesDto> ()
            .ForMember(dest => dest.AddressesAndPhones, opt => opt.MapFrom(src => src.AddressesAndPhones));

            AutoMapperSetup.CreateMapToEditableDto <AgencyAddressAndPhone, AgencyAddressAndPhoneDto> ()
            .ForMember(dest => dest.AgencyAddressType, opt => opt.MapFrom(src => src.AgencyAddress.AgencyAddressType))
            .ForMember(dest => dest.FirstStreetAddress, opt => opt.MapFrom(src => src.AgencyAddress.Address.FirstStreetAddress))
            .ForMember(dest => dest.SecondStreetAddress, opt => opt.MapFrom(src => src.AgencyAddress.Address.SecondStreetAddress))
            .ForMember(dest => dest.CityName, opt => opt.MapFrom(src => src.AgencyAddress.Address.CityName))
            .ForMember(dest => dest.CountyArea, opt => opt.MapFrom(src => src.AgencyAddress.Address.CountyArea))
            .ForMember(dest => dest.StateProvince, opt => opt.MapFrom(src => src.AgencyAddress.Address.StateProvince))
            .ForMember(dest => dest.Country, opt => opt.MapFrom(src => src.AgencyAddress.Address.Country))
            .ForMember(dest => dest.PostalCode, opt => opt.MapFrom(src => src.AgencyAddress.Address.PostalCode.Code));
        }
Esempio n. 2
0
        private static void SetupBillingOffice()
        {
            AutoMapperSetup.CreateMapToAbstractDto <BillingOffice, BillingOfficeAddressesDto> ();
            AutoMapperSetup.CreateMapToEditableDto <BillingOfficeAddress, BillingOfficeAddressDto> ()
            .ForMember(dest => dest.FirstStreetAddress, opt => opt.MapFrom(src => src.Address.FirstStreetAddress))
            .ForMember(dest => dest.SecondStreetAddress, opt => opt.MapFrom(src => src.Address.SecondStreetAddress))
            .ForMember(dest => dest.CityName, opt => opt.MapFrom(src => src.Address.CityName))
            .ForMember(dest => dest.StateProvince, opt => opt.MapFrom(src => src.Address.StateProvince))
            .ForMember(dest => dest.PostalCode, opt => opt.MapFrom(src => src.Address.PostalCode.Code))
            .ForMember(dest => dest.Country, opt => opt.MapFrom(src => src.Address.Country))
            .ForMember(dest => dest.CountyArea, opt => opt.MapFrom(src => src.Address.CountyArea));

            AutoMapperSetup.CreateMapToAbstractDto <BillingOffice, BillingOfficePhonesDto> ();
            AutoMapperSetup.CreateMapToEditableDto <BillingOfficePhone, BillingOfficePhoneDto> ()
            .ForMember(dest => dest.PhoneNumber, opt => opt.MapFrom(src => src.Phone.PhoneNumber))
            .ForMember(dest => dest.Extension, opt => opt.MapFrom(src => src.Phone.PhoneExtensionNumber));

            AutoMapperSetup.CreateMapToEditableDto <BillingOffice, BillingOfficeProfileDto> ()
            .ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.Profile.Name))
            .ForMember(dest => dest.EffectiveDate, opt => opt.MapFrom(src => src.Profile.EffectiveDateRange.StartDate))
            .ForMember(dest => dest.EndDate, opt => opt.MapFrom(src => src.Profile.EffectiveDateRange.EndDate))
            .ForMember(dest => dest.EmailAddress, opt => opt.MapFrom(src => src.Profile.EmailAddress.Address));

            AutoMapperSetup.CreateMapToAbstractDto <BillingOffice, BillingOfficeDto> ()
            .ForMember(dest => dest.Profile, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.Addresses, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.PhoneNumbers, opt => opt.MapFrom(src => src));

            AutoMapperSetup.CreateMapToAbstractDto <BillingOffice, BillingOfficeSummaryDto> ()
            .ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.Profile.Name));
        }
Esempio n. 3
0
        private static void CreateStaffCredentialsDto()
        {
            AutoMapperSetup.CreateMapToEditableDto <Staff, StaffCredentialsDto> ();

            AutoMapperSetup.CreateMapToEditableDto <StaffCollegeDegree, StaffCollegeDegreeDto> ();
            AutoMapperSetup.CreateMapToEditableDto <StaffLicense, StaffLicenseDto> ()
            .ForMember(
                dest => dest.StartDate,
                opt =>
                opt.MapFrom(
                    src => src.EffectiveDateRange != null ? src.EffectiveDateRange.StartDate : null))
            .ForMember(
                dest => dest.EndDate,
                opt =>
                opt.MapFrom(src => src.EffectiveDateRange != null ? src.EffectiveDateRange.EndDate : null));
            AutoMapperSetup.CreateMapToEditableDto <StaffTrainingCourse, StaffTrainingCourseDto> ();
            AutoMapperSetup.CreateMapToEditableDto <StaffCertification, StaffCertificationDto> ()
            .ForMember(
                dest => dest.StartDate,
                opt =>
                opt.MapFrom(
                    src => src.EffectiveDateRange != null ? src.EffectiveDateRange.StartDate : null))
            .ForMember(
                dest => dest.EndDate,
                opt =>
                opt.MapFrom(src => src.EffectiveDateRange != null ? src.EffectiveDateRange.EndDate : null));
        }
Esempio n. 4
0
 private static void CreateAgencyPhoneConfig()
 {
     AutoMapperSetup.CreateMapToEditableDto <AgencyPhone, AgencyPhoneDto> ()
     .ForMember(dest => dest.PhoneNumber, opt => opt.MapFrom(src => src.Phone.PhoneNumber))
     .ForMember(dest => dest.PhoneExtensionNumber, opt => opt.MapFrom(src => src.Phone.PhoneExtensionNumber))
     .ForMember(dest => dest.AgencyPhoneType, opt => opt.MapFrom(src => src.AgencyPhoneType));
 }
Esempio n. 5
0
 private static void CreateAgencyIdentifierConfig()
 {
     AutoMapperSetup.CreateMapToEditableDto <Staff, StaffIdentifiersDto> ();
     AutoMapperSetup.CreateMapToEditableDto <StaffIdentifier, StaffIdentifierDto> ()
     .ForMember(
         dest => dest.StartDate,
         opt =>
         opt.MapFrom(
             src => src.EffectiveDateRange != null ? src.EffectiveDateRange.StartDate : null))
     .ForMember(
         dest => dest.EndDate,
         opt =>
         opt.MapFrom(src => src.EffectiveDateRange != null ? src.EffectiveDateRange.EndDate : null));
     AutoMapperSetup.CreateMapToAbstractDto <Agency, AgencyIdentifiersDto> ();
     AutoMapperSetup.CreateMapToEditableDto <AgencyIdentifier, AgencyIdentifierDto> ()
     .ForMember(
         dest => dest.StartDate,
         opt =>
         opt.MapFrom(
             src => src.EffectiveDateRange != null ? src.EffectiveDateRange.StartDate : null))
     .ForMember(
         dest => dest.EndDate,
         opt =>
         opt.MapFrom(src => src.EffectiveDateRange != null ? src.EffectiveDateRange.EndDate : null));
 }
Esempio n. 6
0
 /// <summary>
 /// Creates the map to gpra dto.
 /// </summary>
 /// <typeparam name="TSource">The type of the source.</typeparam>
 /// <typeparam name="TDestination">The type of the destination.</typeparam>
 /// <returns>A <see cref="AutoMapper.IMappingExpression&lt;TSource,TDestination&gt;"/></returns>
 public static IMappingExpression <TSource, TDestination> CreateMapToGpraDto <TSource, TDestination> ()
     where TSource : GpraInterviewSectionBase
     where TDestination : GpraDtoBase
 {
     return(AutoMapperSetup.CreateMapToEditableDto <TSource, TDestination> ()
            .ForMember(dest => dest.GpraInterviewKey, opt => opt.Ignore())
            .ForMember(dest => dest.Key, opt => opt.Ignore())
            .ForMember(dest => dest.GpraNonResponseFilters, opt => opt.MapFrom(src => src.GetFiltersDictionary())));
 }
Esempio n. 7
0
 private static void CreateProgramsDtoConfig()
 {
     AutoMapperSetup.CreateMapToEditableDto <Program, ProgramDto> ();
     AutoMapperSetup.CreateMapToEditableDto <Program, ProgramDto> ()
     .ForMember(dest => dest.AgeGroup, opt => opt.MapFrom(src => src.ProgramCharacteristics.AgeGroup))
     .ForMember(dest => dest.GenderSpecification, opt => opt.MapFrom(src => src.ProgramCharacteristics.GenderSpecification))
     .ForMember(dest => dest.TreatmentApproach, opt => opt.MapFrom(src => src.ProgramCharacteristics.TreatmentApproach))
     .ForMember(dest => dest.ProgramCategory, opt => opt.MapFrom(src => src.ProgramCharacteristics.ProgramCategory));
     AutoMapperSetup.CreateMapToAbstractDto <Program, ProgramSummaryDto> ();
     AutoMapperSetup.CreateMapToAbstractDto <Program, ProgramDisplayNameDto> ();
 }
Esempio n. 8
0
 /// <summary>
 /// Creates the map to activity dto without results.
 /// </summary>
 /// <typeparam name="TSource">The type of the source.</typeparam>
 /// <typeparam name="TDestination">The type of the destination.</typeparam>
 /// <returns>A <see cref="AutoMapper.IMappingExpression&lt;TSource,TDestination&gt;"/></returns>
 public static IMappingExpression <TSource, TDestination> CreateMapToActivityDtoWithoutResults <TSource, TDestination>()
     where TSource : Activity
     where TDestination : ActivityDto
 {
     return(AutoMapperSetup.CreateMapToEditableDto <TSource, TDestination> ()
            .ForMember(dest => dest.VisitKey, opt => opt.MapFrom(vs => vs.Visit.Key))
            .ForMember(dest => dest.ClinicianKey, opt => opt.MapFrom(vs => vs.Visit.Staff.Key))
            .ForMember(dest => dest.PatientKey, opt => opt.MapFrom(vs => vs.ClinicalCase.Patient.Key))
            .ForMember(dest => dest.ActivityStartDateTime, opt => opt.MapFrom(vs => vs.ActivityDateTimeRange.StartDateTime))
            .ForMember(dest => dest.ActivityEndDateTime, opt => opt.MapFrom(vs => vs.ActivityDateTimeRange.EndDateTime))
            .ForMember(dest => dest.AppointmentStartDateTime, opt => opt.MapFrom(vs => vs.Visit.AppointmentDateTimeRange.StartDateTime))
            .ForMember(dest => dest.VisitTemplateName, opt => opt.MapFrom(src => src.Visit.Name))
            .ForMember(dest => dest.VisitStatusWellKnownName, opt => opt.MapFrom(src => src.Visit.VisitStatus.WellKnownName))
            .ForMember(dest => dest.ProvenanceKey, opt => opt.MapFrom(src => src.Provenance.Key))
            .ForMember(dest => dest.ClinicalCaseKey, opt => opt.MapFrom(src => src.ClinicalCase.Key))
            .ForMember(
                dest => dest.ProvenanceAssigningAuthorityName,
                opt => opt.MapFrom(src => src.Provenance.TaggedDataElement.AssigningAuthorityName)));
 }
Esempio n. 9
0
        private static void CreateAgencyProfileConfig()
        {
            AutoMapperSetup.CreateMapToEditableDto <AgencyEmailAddress, AgencyEmailAddressDto> ()
            .ForMember(dest => dest.EmailAddress, opt => opt.MapFrom(src => src.EmailAddress == null ? null : src.EmailAddress.Address));

            AutoMapperSetup.CreateMapToEditableDto <AgencyAlias, AgencyAliasDto> ();

            AutoMapperSetup.CreateMapToEditableDto <Agency, AgencyProfileDto> ()
            .ForMember(
                dest => dest.StartDate,
                opt => opt.MapFrom(src => src.AgencyProfile.EffectiveDateRange != null ? src.AgencyProfile.EffectiveDateRange.StartDate : null))
            .ForMember(
                dest => dest.EndDate,
                opt => opt.MapFrom(src => src.AgencyProfile.EffectiveDateRange != null ? src.AgencyProfile.EffectiveDateRange.EndDate : null))
            .ForMember(dest => dest.LegalName, opt => opt.MapFrom(src => src.AgencyProfile.AgencyName.LegalName))
            .ForMember(dest => dest.DisplayName, opt => opt.MapFrom(src => src.AgencyProfile.AgencyName.DisplayName))
            .ForMember(dest => dest.DoingBusinessAsName, opt => opt.MapFrom(src => src.AgencyProfile.AgencyName.DoingBusinessAsName))
            .ForMember(dest => dest.AgencyType, opt => opt.MapFrom(src => src.AgencyProfile.AgencyType))
            .ForMember(dest => dest.GeographicalRegion, opt => opt.MapFrom(src => src.AgencyProfile.GeographicalRegion))
            .ForMember(dest => dest.WebsiteUrlName, opt => opt.MapFrom(src => src.AgencyProfile.WebsiteUrlName));
        }
Esempio n. 10
0
        private static void SetupPayor()
        {
            AutoMapperSetup.CreateMapToAbstractDto <PayorTypeMember, PayorTypeDto> ()
            .ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.PayorType.Name))
            .ForMember(dest => dest.Key, opt => opt.MapFrom(src => src.PayorType.Key))
            .ForMember(dest => dest.BillingForm, opt => opt.MapFrom(src => src.PayorType.BillingForm))
            .ForMember(dest => dest.SubmitterIdentifier, opt => opt.MapFrom(src => src.PayorType.SubmitterIdentifier))
            .ForMember(dest => dest.BillingOfficeKey, opt => opt.MapFrom(src => src.PayorType.BillingOffice.Key))
            .ForMember(dest => dest.CityName, opt => opt.MapFrom(src => src.PayorType.BillingAddress.CityName))
            .ForMember(dest => dest.Country, opt => opt.MapFrom(src => src.PayorType.BillingAddress.Country))
            .ForMember(dest => dest.CountyArea, opt => opt.MapFrom(src => src.PayorType.BillingAddress.CountyArea))
            .ForMember(dest => dest.FirstStreetAddress, opt => opt.MapFrom(src => src.PayorType.BillingAddress.FirstStreetAddress))
            .ForMember(dest => dest.PostalCode, opt => opt.MapFrom(src => src.PayorType.BillingAddress.PostalCode.Code))
            .ForMember(dest => dest.SecondStreetAddress, opt => opt.MapFrom(src => src.PayorType.BillingAddress.SecondStreetAddress))
            .ForMember(dest => dest.StateProvince, opt => opt.MapFrom(src => src.PayorType.BillingAddress.StateProvince))
            .ForMember(dest => dest.PhoneNumber, opt => opt.MapFrom(src => src.PayorType.BillingPhone.PhoneNumber))
            .ForMember(dest => dest.PhoneExtensionNumber, opt => opt.MapFrom(src => src.PayorType.BillingPhone.PhoneExtensionNumber))
            .ForMember(dest => dest.FtpAddress, opt => opt.MapFrom(src => src.PayorType.BillingFtp.HostValue))
            .ForMember(
                dest => dest.InterchangeReceiverNumber,
                opt => opt.MapFrom(src => src.PayorType.HealthCareClaim837Setup.InterchangeReceiverNumber))
            .ForMember(
                dest => dest.InterchangeSenderNumber, opt => opt.MapFrom(src => src.PayorType.HealthCareClaim837Setup.InterchangeSenderNumber))
            .ForMember(
                dest => dest.CompositeDelimiter,
                opt => opt.MapFrom(src => src.PayorType.HealthCareClaim837Setup.X12Delimiters.CompositeDelimiter))
            .ForMember(
                dest => dest.ElementDelimiter, opt => opt.MapFrom(src => src.PayorType.HealthCareClaim837Setup.X12Delimiters.ElementDelimiter))
            .ForMember(
                dest => dest.SegmentDelimiter, opt => opt.MapFrom(src => src.PayorType.HealthCareClaim837Setup.X12Delimiters.SegmentDelimiter))
            .ForMember(
                dest => dest.RepetitionDelimiter,
                opt => opt.MapFrom(src => src.PayorType.HealthCareClaim837Setup.X12Delimiters.RepetitionDelimiter));

            AutoMapperSetup.CreateMapToEditableDto <Payor, PayorProfileDto> ()
            .ForMember(dest => dest.BillingOfficeKey, opt => opt.MapFrom(src => src.BillingOffice.Key))
            .ForMember(dest => dest.EffectiveDate, opt => opt.MapFrom(src => src.EffectiveDateRange.StartDate))
            .ForMember(dest => dest.EndDate, opt => opt.MapFrom(src => src.EffectiveDateRange.EndDate))
            .ForMember(dest => dest.EmailAddress, opt => opt.MapFrom(src => src.EmailAddress.Address))
            .ForMember(dest => dest.PayorTypes, opt => opt.MapFrom(src => src.PayorTypeMembers))
            .ForMember(dest => dest.PrimaryPayorType, opt => opt.MapFrom(src => src.PrimaryPayorTypeMember));

            AutoMapperSetup.CreateMapToEditableDto <Payor, PayorAddressesDto> ();
            AutoMapperSetup.CreateMapToEditableDto <PayorAddress, PayorAddressDto> ()
            .ForMember(dest => dest.FirstStreetAddress, opt => opt.MapFrom(src => src.Address.FirstStreetAddress))
            .ForMember(dest => dest.SecondStreetAddress, opt => opt.MapFrom(src => src.Address.SecondStreetAddress))
            .ForMember(dest => dest.CityName, opt => opt.MapFrom(src => src.Address.CityName))
            .ForMember(dest => dest.StateProvince, opt => opt.MapFrom(src => src.Address.StateProvince))
            .ForMember(dest => dest.PostalCode, opt => opt.MapFrom(src => src.Address.PostalCode.Code))
            .ForMember(dest => dest.Country, opt => opt.MapFrom(src => src.Address.Country))
            .ForMember(dest => dest.CountyArea, opt => opt.MapFrom(src => src.Address.CountyArea));

            AutoMapperSetup.CreateMapToEditableDto <Payor, PayorPhoneNumbersDto> ();
            AutoMapperSetup.CreateMapToEditableDto <PayorPhone, PayorPhoneDto> ()
            .ForMember(dest => dest.PhoneNumber, opt => opt.MapFrom(src => src.Phone.PhoneNumber))
            .ForMember(dest => dest.PhoneExtensionNumber, opt => opt.MapFrom(src => src.Phone.PhoneExtensionNumber));

            AutoMapperSetup.CreateMapToAbstractDto <Payor, PayorDto> ()
            .ForMember(dest => dest.Profile, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.Addresses, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.PhoneNumbers, opt => opt.MapFrom(src => src));

            AutoMapperSetup.CreateMapToEditableDto <PayorType, PayorTypeDto> ()
            .ForMember(dest => dest.BillingOfficeKey, opt => opt.MapFrom(src => src.BillingOffice.Key))
            .ForMember(dest => dest.CityName, opt => opt.MapFrom(src => src.BillingAddress.CityName))
            .ForMember(dest => dest.Country, opt => opt.MapFrom(src => src.BillingAddress.Country))
            .ForMember(dest => dest.CountyArea, opt => opt.MapFrom(src => src.BillingAddress.CountyArea))
            .ForMember(dest => dest.FirstStreetAddress, opt => opt.MapFrom(src => src.BillingAddress.FirstStreetAddress))
            .ForMember(dest => dest.PostalCode, opt => opt.MapFrom(src => src.BillingAddress.PostalCode.Code))
            .ForMember(dest => dest.SecondStreetAddress, opt => opt.MapFrom(src => src.BillingAddress.SecondStreetAddress))
            .ForMember(dest => dest.StateProvince, opt => opt.MapFrom(src => src.BillingAddress.StateProvince))
            .ForMember(dest => dest.PhoneNumber, opt => opt.MapFrom(src => src.BillingPhone.PhoneNumber))
            .ForMember(dest => dest.PhoneExtensionNumber, opt => opt.MapFrom(src => src.BillingPhone.PhoneExtensionNumber))
            .ForMember(dest => dest.FtpAddress, opt => opt.MapFrom(src => src.BillingFtp.HostValue))
            .ForMember(
                dest => dest.InterchangeReceiverNumber, opt => opt.MapFrom(src => src.HealthCareClaim837Setup.InterchangeReceiverNumber))
            .ForMember(dest => dest.InterchangeSenderNumber, opt => opt.MapFrom(src => src.HealthCareClaim837Setup.InterchangeSenderNumber))
            .ForMember(
                dest => dest.CompositeDelimiter, opt => opt.MapFrom(src => src.HealthCareClaim837Setup.X12Delimiters.CompositeDelimiter))
            .ForMember(dest => dest.ElementDelimiter, opt => opt.MapFrom(src => src.HealthCareClaim837Setup.X12Delimiters.ElementDelimiter))
            .ForMember(dest => dest.SegmentDelimiter, opt => opt.MapFrom(src => src.HealthCareClaim837Setup.X12Delimiters.SegmentDelimiter))
            .ForMember(
                dest => dest.RepetitionDelimiter, opt => opt.MapFrom(src => src.HealthCareClaim837Setup.X12Delimiters.RepetitionDelimiter));
        }
Esempio n. 11
0
        private static void CreateStaffDtoConfig()
        {
            AutoMapperSetup.CreateMapToEditableDto <StaffLanguage, StaffLanguageDto> ();
            AutoMapperSetup.CreateMapToEditableDto <StaffPhoto, StaffPhotoDto> ();

            AutoMapperSetup.CreateMapToEditableDto <StaffEvent, StaffEventDto> ();
            AutoMapperSetup.CreateMapToEditableDto <StaffChecklistItem, StaffChecklistItemDto> ();
            AutoMapperSetup.CreateMapToEditableDto <Staff, StaffHRDto> ()
            .ForMember(dest => dest.EmploymentType, opt => opt.MapFrom(src => src.StaffHr.EmploymentType))
            .ForMember(dest => dest.TitleName, opt => opt.MapFrom(src => src.StaffHr.TitleName))
            .ForMember(dest => dest.SupervisorStaff, opt => opt.MapFrom(src => src.StaffHr.SupervisorStaff))
            .ForMember(dest => dest.ConfidentialNote, opt => opt.MapFrom(src => src.StaffHr.ConfidentialNote))
            .ForMember(dest => dest.SupervisorStaff, opt => opt.MapFrom(src => src.StaffHr.SupervisorStaff));

            AutoMapperSetup.CreateMapToEditableDto <StaffLocationAssignment, StaffApprovedLocationDto> ();

            AutoMapperSetup.CreateMapToEditableDto <Staff, StaffLocationAssignmentDto> ()
            .ForMember(dest => dest.PrimaryLocation, opt => opt.Ignore())
            .ForMember(dest => dest.Locations, opt => opt.MapFrom(src => src.StaffLocationAssignments));

            AutoMapperSetup.CreateMapToEditableDto <Staff, StaffProfileDto> ()
            .ForMember(dest => dest.PrefixName, opt => opt.MapFrom(src => src.StaffProfile.StaffName.Prefix))
            .ForMember(dest => dest.FirstName, opt => opt.MapFrom(src => src.StaffProfile.StaffName.First))
            .ForMember(dest => dest.MiddleName, opt => opt.MapFrom(src => src.StaffProfile.StaffName.Middle))
            .ForMember(dest => dest.LastName, opt => opt.MapFrom(src => src.StaffProfile.StaffName.Last))
            .ForMember(dest => dest.SuffixName, opt => opt.MapFrom(src => src.StaffProfile.StaffName.Suffix))
            .ForMember(dest => dest.Gender, opt => opt.MapFrom(src => src.StaffProfile.Gender))
            .ForMember(dest => dest.BirthDate, opt => opt.MapFrom(src => src.StaffProfile.BirthDate))
            .ForMember(dest => dest.SocialSecurityNumber, opt => opt.MapFrom(src => src.StaffProfile.SocialSecurityNumber))
            .ForMember(dest => dest.StaffType, opt => opt.MapFrom(src => src.StaffProfile.StaffType))
            .ForMember(dest => dest.ProfessionalCredentialNote, opt => opt.MapFrom(src => src.StaffProfile.ProfessionalCredentialNote))
            .ForMember(
                dest => dest.EmailAddress,
                opt => opt.MapFrom(src => src.StaffProfile.EmailAddress == null ? null : src.StaffProfile.EmailAddress.Address))
            .ForMember(
                dest => dest.StartDate,
                opt => opt.MapFrom(src => src.StaffProfile.EmploymentDateRange != null ? src.StaffProfile.EmploymentDateRange.StartDate : null))
            .ForMember(
                dest => dest.EndDate,
                opt => opt.MapFrom(src => src.StaffProfile.EmploymentDateRange != null ? src.StaffProfile.EmploymentDateRange.EndDate : null))
            .ForMember(dest => dest.Note, opt => opt.MapFrom(src => src.StaffProfile.Note));

            AutoMapperSetup.CreateMapToAbstractDto <SystemRolePermission, SystemPermissionDto> ()
            .ForMember(dest => dest.Key, opt => opt.MapFrom(src => src.SystemPermission.Key))
            .ForMember(dest => dest.DisplayName, opt => opt.MapFrom(src => src.SystemPermission.DisplayName))
            .ForMember(dest => dest.WellKnownName, opt => opt.MapFrom(src => src.SystemPermission.WellKnownName))
            .ForMember(dest => dest.Description, opt => opt.MapFrom(src => src.SystemPermission.Description));

            AutoMapperSetup.CreateMapToAbstractDto <SystemPermission, SystemPermissionDto> ();

            AutoMapperSetup.CreateMapToAbstractDto <SystemRole, SystemRoleDto> ()
            .ForMember(dest => dest.GrantedSystemRoles, opt => opt.MapFrom(src => src.GrantedSystemRoleRelationships));

            AutoMapperSetup.CreateMapToAbstractDto <SystemRoleRelationship, SystemRoleDto> ()
            .ForMember(dest => dest.Key, opt => opt.MapFrom(src => src.GrantedSystemRole.Key))
            .ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.GrantedSystemRole.Name))
            .ForMember(dest => dest.Description, opt => opt.MapFrom(src => src.GrantedSystemRole.Description))
            .ForMember(dest => dest.SystemRoleType, opt => opt.MapFrom(src => src.GrantedSystemRole.SystemRoleType))
            .ForMember(dest => dest.GrantedSystemPermissions, opt => opt.MapFrom(src => src.GrantedSystemRole.GrantedSystemPermissions))
            .ForMember(dest => dest.GrantedSystemRoles, opt => opt.Ignore());

            AutoMapperSetup.CreateMapToAbstractDto <StaffSystemRole, StaffSystemRoleDto> ();

            AutoMapperSetup.CreateMapToAbstractDto <SystemAccount, SystemAccountDto> ()
            .ForMember(dest => dest.EmailAddress, opt => opt.MapFrom(src => src.EmailAddress.Address))
            .ForMember(dest => dest.Username, opt => opt.Ignore());

            AutoMapperSetup.CreateMapToAbstractDto <Staff, StaffDto> ()
            .ForMember(dest => dest.StaffProfile, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.Addresses, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.Identifiers, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.PhoneNumbers, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.HumanResource, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.LocationAssignment, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.Credentials, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.SystemAccount, opt => opt.MapFrom(src => src.SystemAccount))
            .ForMember(dest => dest.SystemRoles, opt => opt.Ignore());
        }
Esempio n. 12
0
 private static void CreateProgramOfferingConfig()
 {
     AutoMapperSetup.CreateMapToAbstractDto <ProgramOffering, ProgramOfferingDto> ()
     .ForMember(dest => dest.Profile, opt => opt.MapFrom(src => src));
     AutoMapperSetup.CreateMapToEditableDto <ProgramOffering, ProgramOfferingProfileDto> ();
 }
Esempio n. 13
0
        private static void CreateLocationDtoConfig()
        {
            AutoMapperSetup.CreateMapToEditableDto <Location, LocationProfileDto> ()
            .ForMember(
                dest => dest.StartDate,
                opt =>
                opt.MapFrom(
                    src => src.LocationProfile.EffectiveDateRange != null ? src.LocationProfile.EffectiveDateRange.StartDate : null))
            .ForMember(
                dest => dest.EndDate,
                opt =>
                opt.MapFrom(src => src.LocationProfile.EffectiveDateRange != null ? src.LocationProfile.EffectiveDateRange.EndDate : null))
            .ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.LocationProfile.LocationName.Name))
            .ForMember(dest => dest.DisplayName, opt => opt.MapFrom(src => src.LocationProfile.LocationName.DisplayName))
            .ForMember(dest => dest.WebsiteUrlName, opt => opt.MapFrom(src => src.LocationProfile.WebsiteUrlName))
            .ForMember(dest => dest.GeographicalRegion, opt => opt.MapFrom(src => src.LocationProfile.GeographicalRegion));

            AutoMapperSetup.CreateMapToAbstractDto <Location, LocationContactsDto> ();
            AutoMapperSetup.CreateMapToAbstractDto <Location, LocationIdentifiersDto> ();
            AutoMapperSetup.CreateMapToAbstractDto <Location, LocationOperationSchedulesDto> ();
            AutoMapperSetup.CreateMapToAbstractDto <Location, LocationDto> ()
            .ForMember(dest => dest.LocationProfile, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.LocationAddressesAndPhones, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.LocationIdentifiers, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.LocationContacts, opt => opt.MapFrom(src => src))
            .ForMember(dest => dest.LocationOperationSchedules, opt => opt.MapFrom(src => src));
            AutoMapperSetup.CreateMapToEditableDto <LocationEmailAddress, LocationEmailAddressDto> ()
            .ForMember(dest => dest.EmailAddress, opt => opt.MapFrom(src => src.EmailAddress == null ? null : src.EmailAddress.Address));

            AutoMapperSetup.CreateMapToEditableDto <LocationAddressAndPhone, LocationAddressAndPhoneDto> ()
            .ForMember(dest => dest.ConfidentialIndicator, opt => opt.MapFrom(src => src.LocationAddress.ConfidentialIndicator))
            .ForMember(dest => dest.LocationAddressType, opt => opt.MapFrom(src => src.LocationAddress.LocationAddressType))
            .ForMember(dest => dest.FirstStreetAddress, opt => opt.MapFrom(src => src.LocationAddress.Address.FirstStreetAddress))
            .ForMember(dest => dest.SecondStreetAddress, opt => opt.MapFrom(src => src.LocationAddress.Address.SecondStreetAddress))
            .ForMember(dest => dest.CityName, opt => opt.MapFrom(src => src.LocationAddress.Address.CityName))
            .ForMember(dest => dest.CountyArea, opt => opt.MapFrom(src => src.LocationAddress.Address.CountyArea))
            .ForMember(dest => dest.StateProvince, opt => opt.MapFrom(src => src.LocationAddress.Address.StateProvince))
            .ForMember(dest => dest.Country, opt => opt.MapFrom(src => src.LocationAddress.Address.Country))
            .ForMember(dest => dest.PostalCode, opt => opt.MapFrom(src => src.LocationAddress.Address.PostalCode.Code));

            AutoMapperSetup.CreateMapToAbstractDto <Location, LocationAddressesAndPhonesDto> ();

            AutoMapperSetup.CreateMapToEditableDto <LocationPhone, LocationPhoneDto> ()
            .ForMember(dest => dest.PhoneNumber, opt => opt.MapFrom(src => src.Phone.PhoneNumber))
            .ForMember(dest => dest.PhoneExtensionNumber, opt => opt.MapFrom(src => src.Phone.PhoneExtensionNumber));

            AutoMapperSetup.CreateMapToEditableDto <LocationOperationSchedule, LocationOperationScheduleDto> ();
            AutoMapperSetup.CreateMapToEditableDto <LocationIdentifier, LocationIdentifierDto> ()
            .ForMember(
                dest => dest.StartDate,
                opt =>
                opt.MapFrom(
                    src => src.EffectiveDateRange != null ? src.EffectiveDateRange.StartDate : null))
            .ForMember(
                dest => dest.EndDate,
                opt =>
                opt.MapFrom(src => src.EffectiveDateRange != null ? src.EffectiveDateRange.EndDate : null));
            AutoMapperSetup.CreateMapToEditableDto <LocationContact, LocationContactDto> ()
            .ForMember(
                dest => dest.EffectiveStartDate,
                opt =>
                opt.MapFrom(
                    src => src.EffectiveDateRange != null ? src.EffectiveDateRange.StartDate : null))
            .ForMember(
                dest => dest.EffectiveEndDate,
                opt =>
                opt.MapFrom(src => src.EffectiveDateRange != null ? src.EffectiveDateRange.EndDate : null));
            AutoMapperSetup.CreateMapToEditableDto <LocationWorkHour, LocationWorkHourDto> ()
            .ForMember(
                dest => dest.StartTime, opt => opt.MapFrom(src => src.WorkHourTimeRange != null ? src.WorkHourTimeRange.StartTime : null))
            .ForMember(
                dest => dest.EndTime, opt => opt.MapFrom(src => src.WorkHourTimeRange != null ? src.WorkHourTimeRange.EndTime : null));
        }
Esempio n. 14
0
 private static void CreateAgencyFrequentlyAskedQuestionsConfig()
 {
     AutoMapperSetup.CreateMapToAbstractDto <Agency, AgencyFaqsDto> ().ForMember(
         dest => dest.AgencyFaqs, opt => opt.MapFrom(src => src.AgencyFrequentlyAskedQuestions));
     AutoMapperSetup.CreateMapToEditableDto <AgencyFrequentlyAskedQuestion, AgencyFaqDto> ();
 }
Esempio n. 15
0
 private static void CreateAgencyContactConfig()
 {
     AutoMapperSetup.CreateMapToAbstractDto <Agency, AgencyContactsDto> ();
     AutoMapperSetup.CreateMapToEditableDto <AgencyContact, AgencyContactDto> ();
 }