コード例 #1
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="densAsiPatientProfileDto">The dens asi patient profile dto.</param>
        /// <param name="densAsiPatientProfile">The dens asi patient profile.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(
            DensAsiPatientProfileDto densAsiPatientProfileDto, DensAsiPatientProfile densAsiPatientProfile)
        {
            var densAsiInterviewClass = _mappingHelper.MapLookupField <DensAsiInterviewClass> (densAsiPatientProfileDto.DensAsiInterviewClass);

            var densAsiPatietnProfileNew = new DensAsiPatientProfileSectionBuilder()
                                           .WithInterviewDate(densAsiPatientProfileDto.InterviewDate)
                                           .WithInterviewDateNote(densAsiPatientProfileDto.InterviewDateNote)
                                           .WithDensAsiInterviewClass(densAsiInterviewClass)
                                           .WithDensAsiInterviewClassNote(densAsiPatientProfileDto.DensAsiInterviewClassNote)
                                           .WithDensAsiInterviewContactType(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiInterviewContactType> (
                    densAsiPatientProfileDto.DensAsiInterviewContactType, _mappingHelper))
                                           .WithDensAsiInterviewContactTypeNote(densAsiPatientProfileDto.DensAsiInterviewContactTypeNote)
                                           .WithYearsAndMonthsAtCurrentAddressTimeSpan(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPatientProfileDto.YearsAndMonthsAtCurrentAddressTimeSpan, _mappingHelper))
                                           .WithYearsAndMonthsAtCurrentAddressTimeSpanNote(densAsiPatientProfileDto.YearsAndMonthsAtCurrentAddressTimeSpanNote)
                                           .WithResidenceOwnedByYouOrFamilyIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPatientProfileDto.ResidenceOwnedByYouOrFamilyIndicator, _mappingHelper))
                                           .WithResidenceOwnedByYouOrFamilyIndicatorNote(densAsiPatientProfileDto.ResidenceOwnedByYouOrFamilyIndicatorNote)
                                           .WithPreferredDensAsiReligion(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiReligion> (
                    densAsiPatientProfileDto.PreferredDensAsiReligion, _mappingHelper))
                                           .WithPreferredDensAsiReligionNote(densAsiPatientProfileDto.PreferredDensAsiReligionNote)
                                           .WithLastThirtyDaysDensAsiControlledEnvironment(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiControlledEnvironment> (
                    densAsiPatientProfileDto.LastThirtyDaysDensAsiControlledEnvironment, _mappingHelper))
                                           .WithLastThirtyDaysDensAsiControlledEnvironmentNote(densAsiPatientProfileDto.LastThirtyDaysDensAsiControlledEnvironmentNote)
                                           .WithLastThirtyDaysControlledEnvironmentDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPatientProfileDto.LastThirtyDaysControlledEnvironmentDayCount, _mappingHelper))
                                           .WithLastThirtyDaysControlledEnvironmentDayCountNote(densAsiPatientProfileDto.LastThirtyDaysControlledEnvironmentDayCountNote)
                                           .WithChristianReligionIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiPatientProfileDto.ChristianReligionIndicator, _mappingHelper))
                                           .WithChristianReligionIndicatorNote(densAsiPatientProfileDto.ChristianReligionIndicatorNote)
                                           .WithBuddhismReligionIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiPatientProfileDto.BuddhismReligionIndicator, _mappingHelper))
                                           .WithBuddhismReligionIndicatorNote(densAsiPatientProfileDto.BuddhismReligionIndicatorNote)
                                           .WithNoParticularReligiousSectIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPatientProfileDto.NoParticularReligiousSectIndicator, _mappingHelper))
                                           .WithNoParticularReligiousSectIndicatorNote(densAsiPatientProfileDto.NoParticularReligiousSectIndicatorNote)
                                           .Build();

            AggregateRoot.ReviseDensAsiPatientProfile(densAsiPatietnProfileNew);
            densAsiPatientProfileDto.Key = AggregateRoot.DensAsiPatientProfile.Key;

            return(true);
        }
コード例 #2
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="densAsiClosureDto">The dens asi closure dto.</param>
        /// <param name="densAsiClosure">The dens asi closure.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(DensAsiClosureDto densAsiClosureDto, DensAsiClosure densAsiClosure)
        {
            var mostAppropriateDensAsiTreatmentModality =
                _mappingHelper.MapLookupField <DensAsiTreatmentModality> (densAsiClosureDto.MostAppropriateDensAsiTreatmentModality);

            var densAsiClosureNew = new DensAsiClosureSectionBuilder()
                                    .WithMostAppropriateDensAsiTreatmentModality(mostAppropriateDensAsiTreatmentModality)
                                    .WithMostAppropriateDensAsiTreatmentModalityNote(densAsiClosureDto.MostAppropriateDensAsiTreatmentModalityNote)
                                    .WithDensAsiIncompleteInterviewReason(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiIncompleteInterviewReason> (
                    densAsiClosureDto.DensAsiIncompleteInterviewReason, _mappingHelper))
                                    .WithDensAsiIncompleteInterviewReasonNote(densAsiClosureDto.DensAsiIncompleteInterviewReasonNote)
                                    .Build();

            AggregateRoot.ReviseDensAsiClosure(densAsiClosureNew);

            densAsiClosureDto.Key = AggregateRoot.Key;

            return(true);
        }
コード例 #3
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="densAsiFamilySocialRelationshipsDto">The dens asi family social relationships dto.</param>
        /// <param name="densAsiFamilySocialRelationships">The dens asi family social relationships.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(
            DensAsiFamilySocialRelationshipsDto densAsiFamilySocialRelationshipsDto, DensAsiFamilySocialRelationships densAsiFamilySocialRelationships)
        {
            var patientFamilySocialCounselingDensAsiInterviewerRating =
                _mappingHelper.MapLookupField <DensAsiInterviewerRating> (
                    densAsiFamilySocialRelationshipsDto.PatientFamilySocialCounselingDensAsiInterviewerRating);
            var densAsiFamilySocialRelationshipsNew = new DensAsiFamilySocialRelationshipsSectionBuilder()
                                                      .WithDensAsiMaritalStatus(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiMaritalStatus> (
                    densAsiFamilySocialRelationshipsDto.DensAsiMaritalStatus, _mappingHelper))
                                                      .WithDensAsiMaritalStatusNote(densAsiFamilySocialRelationshipsDto.DensAsiMaritalStatusNote)
                                                      .WithYearsAndMonthsWithMaritalStatusTimeSpan(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.YearsAndMonthsWithMaritalStatusTimeSpan, _mappingHelper))
                                                      .WithYearsAndMonthsWithMaritalStatusTimeSpanNote(densAsiFamilySocialRelationshipsDto.YearsAndMonthsWithMaritalStatusTimeSpanNote)
                                                      .WithMaritalStatusSatisfactionIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiSatisfaction> (
                    densAsiFamilySocialRelationshipsDto.MaritalStatusDensAsiSatisfaction, _mappingHelper))
                                                      .WithMaritalStatusSatisfactionIndicatorNote(densAsiFamilySocialRelationshipsDto.MaritalStatusDensAsiSatisfactionNote)
                                                      .WithPastThreeYearsDensAsiLivingArrangementType(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiLivingArrangementType> (
                    densAsiFamilySocialRelationshipsDto.PastThreeYearsDensAsiLivingArrangementType, _mappingHelper))
                                                      .WithPastThreeYearsDensAsiLivingArrangementTypeNote(
                densAsiFamilySocialRelationshipsDto.PastThreeYearsDensAsiLivingArrangementTypeNote)
                                                      .WithYearsAndMonthsInLivingArrangementTypeTimeSpan(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.YearsAndMonthsInLivingArrangementTypeTimeSpan, _mappingHelper))
                                                      .WithYearsAndMonthsInLivingArrangementTypeTimeSpanNote(
                densAsiFamilySocialRelationshipsDto.YearsAndMonthsInLivingArrangementTypeTimeSpanNote)
                                                      .WithLivingArrangementTypeSatisfactionIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiSatisfaction> (
                    densAsiFamilySocialRelationshipsDto.LivingArrangementTypeDensAsiSatisfaction, _mappingHelper))
                                                      .WithLivingArrangementTypeSatisfactionIndicatorNote(
                densAsiFamilySocialRelationshipsDto.LivingArrangementTypeDensAsiSatisfactionNote)
                                                      .WithLivingWithAnyoneWhoHasAlcoholProblemIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.LivingWithAnyoneWhoHasAlcoholProblemIndicator, _mappingHelper))
                                                      .WithLivingWithAnyoneWhoHasAlcoholProblemIndicatorNote(
                densAsiFamilySocialRelationshipsDto.LivingWithAnyoneWhoHasAlcoholProblemIndicatorNote)
                                                      .WithLivingWithAnyoneWhoUsesNonPrescribedDrugsIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.LivingWithAnyoneWhoUsesNonPrescribedDrugsIndicator, _mappingHelper))
                                                      .WithLivingWithAnyoneWhoUsesNonPrescribedDrugsIndicatorNote(
                densAsiFamilySocialRelationshipsDto.LivingWithAnyoneWhoUsesNonPrescribedDrugsIndicatorNote)
                                                      .WithDensAsiFreeTimeSpentType(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiFreeTimeSpentType> (
                    densAsiFamilySocialRelationshipsDto.DensAsiFreeTimeSpentType, _mappingHelper))
                                                      .WithDensAsiFreeTimeSpentTypeNote(densAsiFamilySocialRelationshipsDto.DensAsiFreeTimeSpentTypeNote)
                                                      .WithFreeTimeSpentTypeSatisfactionIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiSatisfaction> (
                    densAsiFamilySocialRelationshipsDto.FreeTimeSpentTypeDensAsiSatisfaction, _mappingHelper))
                                                      .WithFreeTimeSpentTypeSatisfactionIndicatorNote(densAsiFamilySocialRelationshipsDto.FreeTimeSpentTypeDensAsiSatisfactionNote)
                                                      .WithCloseFriendsCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiFamilySocialRelationshipsDto.CloseFriendsCount, _mappingHelper))
                                                      .WithCloseFriendsCountNote(densAsiFamilySocialRelationshipsDto.CloseFriendsCountNote)
                                                      .WithReciprocalRelationshipMother(
                _mappingHelper.MapLookupField <DensAsiHasParentalRelationshipOption>(
                    densAsiFamilySocialRelationshipsDto.MotherDensAsiHasParentalRelationshipOption))
                                                      .WithReciprocalRelationshipMotherNote(densAsiFamilySocialRelationshipsDto.MotherDensAsiHasParentalRelationshipOptionNote)
                                                      .WithReciprocalRelationshipFather(
                _mappingHelper.MapLookupField <DensAsiHasParentalRelationshipOption>(
                    densAsiFamilySocialRelationshipsDto.FatherDensAsiHasParentalRelationshipOption))
                                                      .WithReciprocalRelationshipFatherNote(densAsiFamilySocialRelationshipsDto.FatherDensAsiHasParentalRelationshipOptionNote)
                                                      .WithReciprocalRelationshipBrotherSister(
                _mappingHelper.MapLookupField <DensAsiHasRelationshipOption>(
                    densAsiFamilySocialRelationshipsDto.BrotherSisterDensAsiHasRelationshipOption))
                                                      .WithReciprocalRelationshipBrotherSisterNote(
                densAsiFamilySocialRelationshipsDto.BrotherSisterDensAsiHasRelationshipOptionNote)
                                                      .WithReciprocalRelationshipSexualPartner(
                _mappingHelper.MapLookupField <DensAsiHasRelationshipOption>(
                    densAsiFamilySocialRelationshipsDto.SexualPartnerDensAsiHasRelationshipOption))
                                                      .WithReciprocalRelationshipSexualPartnerNote(
                densAsiFamilySocialRelationshipsDto.SexualPartnerDensAsiHasRelationshipOptionNote)
                                                      .WithReciprocalRelationshipChildren(
                _mappingHelper.MapLookupField <DensAsiHasRelationshipOption>(
                    densAsiFamilySocialRelationshipsDto.ChildrenDensAsiHasRelationshipOption))
                                                      .WithReciprocalRelationshipChildrenNote(densAsiFamilySocialRelationshipsDto.ChildrenDensAsiHasRelationshipOptionNote)
                                                      .WithReciprocalRelationshipFriends(
                _mappingHelper.MapLookupField <DensAsiHasRelationshipOption>(
                    densAsiFamilySocialRelationshipsDto.FriendsDensAsiHasRelationshipOption))
                                                      .WithReciprocalRelationshipFriendsNote(densAsiFamilySocialRelationshipsDto.FriendsDensAsiHasRelationshipOptionNote)
                                                      .WithProblemsMotherInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsMotherInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithProblemsMotherInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsMotherInLifetimeIndicator, _mappingHelper))
                                                      .WithProblemsMotherNote(densAsiFamilySocialRelationshipsDto.ProblemsMotherNote)
                                                      .WithProblemsFatherInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsFatherInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithProblemsFatherInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsFatherInLifetimeIndicator, _mappingHelper))
                                                      .WithProblemsFatherNote(densAsiFamilySocialRelationshipsDto.ProblemsFatherNote)
                                                      .WithProblemsBrotherSisterInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsBrotherSisterInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithProblemsBrotherSisterInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsBrotherSisterInLifetimeIndicator, _mappingHelper))
                                                      .WithProblemsBrotherSisterNote(densAsiFamilySocialRelationshipsDto.ProblemsBrotherSisterNote)
                                                      .WithProblemsSexualPartnerInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsSexualPartnerInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithProblemsSexualPartnerInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsSexualPartnerInLifetimeIndicator, _mappingHelper))
                                                      .WithProblemsSexualPartnerNote(densAsiFamilySocialRelationshipsDto.ProblemsSexualPartnerNote)
                                                      .WithProblemsChildrenInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsChildrenInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithProblemsChildrenInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsChildrenInLifetimeIndicator, _mappingHelper))
                                                      .WithProblemsChildrenNote(densAsiFamilySocialRelationshipsDto.ProblemsChildrenNote)
                                                      .WithProblemsOtherSignificantFamilyInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsOtherSignificantFamilyInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithProblemsOtherSignificantFamilyInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsOtherSignificantFamilyInLifetimeIndicator, _mappingHelper))
                                                      .WithProblemsOtherSignificantFamilyDescription(densAsiFamilySocialRelationshipsDto.ProblemsOtherSignificantFamilyDescription)
                                                      .WithProblemsOtherSignificantFamilyNote(densAsiFamilySocialRelationshipsDto.ProblemsOtherSignificantFamilyNote)
                                                      .WithProblemsCloseFriendsInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsCloseFriendsInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithProblemsCloseFriendsInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsCloseFriendsInLifetimeIndicator, _mappingHelper))
                                                      .WithProblemsCloseFriendsNote(densAsiFamilySocialRelationshipsDto.ProblemsCloseFriendsNote)
                                                      .WithProblemsNeighborsInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsNeighborsInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithProblemsNeighborsInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsNeighborsInLifetimeIndicator, _mappingHelper))
                                                      .WithProblemsNeighborsNote(densAsiFamilySocialRelationshipsDto.ProblemsNeighborsNote)
                                                      .WithProblemsCoworkersInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsCoworkersInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithProblemsCoworkersInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ProblemsCoworkersInLifetimeIndicator, _mappingHelper))
                                                      .WithProblemsCoworkersNote(densAsiFamilySocialRelationshipsDto.ProblemsCoworkersNote)
                                                      .WithAbusedEmotionallyInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.AbusedEmotionallyInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithAbusedEmotionallyInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.AbusedEmotionallyInLifetimeIndicator, _mappingHelper))
                                                      .WithAbusedEmotionallyNote(densAsiFamilySocialRelationshipsDto.AbusedEmotionallyNote)
                                                      .WithAbusedPhysicallyInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.AbusedPhysicallyInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithAbusedPhysicallyInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.AbusedPhysicallyInLifetimeIndicator, _mappingHelper))
                                                      .WithAbusedPhysicallyNote(densAsiFamilySocialRelationshipsDto.AbusedPhysicallyNote)
                                                      .WithAbusedSexuallyInLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.AbusedSexuallyInLastThirtyDaysIndicator, _mappingHelper))
                                                      .WithAbusedSexuallyInLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.AbusedSexuallyInLifetimeIndicator, _mappingHelper))
                                                      .WithAbusedSexuallyNote(densAsiFamilySocialRelationshipsDto.AbusedSexuallyNote)
                                                      .WithSeriousFamilyConflictsInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.SeriousFamilyConflictsInLastThirtyDaysDayCount, _mappingHelper))
                                                      .WithSeriousFamilyConflictsInLastThirtyDaysDayCountNote(
                densAsiFamilySocialRelationshipsDto.SeriousFamilyConflictsInLastThirtyDaysDayCountNote)
                                                      .WithTroubledByFamilyProblemsDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiFamilySocialRelationshipsDto.TroubledByFamilyProblemsDensAsiPatientRating, _mappingHelper))
                                                      .WithTroubledByFamilyProblemsDensAsiPatientRatingNote(
                densAsiFamilySocialRelationshipsDto.TroubledByFamilyProblemsDensAsiPatientRatingNote)
                                                      .WithImportanceOfFamilyProblemCounselingDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiFamilySocialRelationshipsDto.ImportanceOfFamilyProblemCounselingDensAsiPatientRating, _mappingHelper))
                                                      .WithImportanceOfFamilyProblemCounselingDensAsiPatientRatingNote(
                densAsiFamilySocialRelationshipsDto.ImportanceOfFamilyProblemCounselingDensAsiPatientRatingNote)
                                                      .WithConflictsWithOthersInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ConflictsWithOthersInLastThirtyDaysDayCount, _mappingHelper))
                                                      .WithConflictsWithOthersInLastThirtyDaysDayCountNote(
                densAsiFamilySocialRelationshipsDto.ConflictsWithOthersInLastThirtyDaysDayCountNote)
                                                      .WithTroubledBySocialProblemsDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiFamilySocialRelationshipsDto.TroubledBySocialProblemsDensAsiPatientRating, _mappingHelper))
                                                      .WithTroubledBySocialProblemsDensAsiPatientRatingNote(
                densAsiFamilySocialRelationshipsDto.TroubledBySocialProblemsDensAsiPatientRatingNote)
                                                      .WithImportanceOfSocialProblemCounselingDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiFamilySocialRelationshipsDto.ImportanceOfSocialProblemCounselingDensAsiPatientRating, _mappingHelper))
                                                      .WithImportanceOfSocialProblemCounselingDensAsiPatientRatingNote(
                densAsiFamilySocialRelationshipsDto.ImportanceOfSocialProblemCounselingDensAsiPatientRatingNote)
                                                      .WithPatientFamilySocialCounselingDensAsiInterviewerRating(patientFamilySocialCounselingDensAsiInterviewerRating)
                                                      .WithPatientFamilySocialCounselingDensAsiInterviewerRatingNote(
                densAsiFamilySocialRelationshipsDto.PatientFamilySocialCounselingDensAsiInterviewerRatingNote)
                                                      .WithConfidenceDistortedByPatientMisrepresentationIndicator(
                densAsiFamilySocialRelationshipsDto.ConfidenceDistortedByPatientMisrepresentationIndicator)
                                                      .WithConfidenceDistortedByPatientMisrepresentationIndicatorNote(
                densAsiFamilySocialRelationshipsDto.ConfidenceDistortedByPatientMisrepresentationIndicatorNote)
                                                      .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicator(
                densAsiFamilySocialRelationshipsDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicator)
                                                      .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote(
                densAsiFamilySocialRelationshipsDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote)
                                                      .WithSectionNote(densAsiFamilySocialRelationshipsDto.SectionNote)
                                                      .WithHomelessInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.HomelessInLastThirtyDaysDayCount, _mappingHelper))
                                                      .WithHomelessInLastThirtyDaysDayCountNote(densAsiFamilySocialRelationshipsDto.HomelessInLastThirtyDaysDayCountNote)
                                                      .WithShelterInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.ShelterInLastThirtyDaysDayCount, _mappingHelper))
                                                      .WithShelterInLastThirtyDaysDayCountNote(densAsiFamilySocialRelationshipsDto.ShelterInLastThirtyDaysDayCountNote)
                                                      .WithNotOwnedHouseInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.NotOwnedHouseInLastThirtyDaysDayCount, _mappingHelper))
                                                      .WithNotOwnedHouseInLastThirtyDaysDayCountNote(densAsiFamilySocialRelationshipsDto.NotOwnedHouseInLastThirtyDaysDayCountNote)
                                                      .WithHospitalJailInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiFamilySocialRelationshipsDto.HospitalJailInLastThirtyDaysDayCount, _mappingHelper))
                                                      .WithHospitalJailInLastThirtyDaysDayCountNote(densAsiFamilySocialRelationshipsDto.HospitalJailInLastThirtyDaysDayCountNote)
                                                      .Build();

            AggregateRoot.ReviseDensAsiFamilySocialRelationships(densAsiFamilySocialRelationshipsNew);

            densAsiFamilySocialRelationshipsDto.Key = AggregateRoot.DensAsiFamilySocialRelationships.Key;

            return(true);
        }
コード例 #4
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="densAsiMedicalStatusDto">The dens asi medical status dto.</param>
        /// <param name="densAsiMedicalStatus">The dens asi medical status.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(DensAsiMedicalStatusDto densAsiMedicalStatusDto, DensAsiMedicalStatus densAsiMedicalStatus)
        {
            var patientTreatmentDensAsiInterviewerRating =
                _mappingHelper.MapLookupField <DensAsiInterviewerRating> (densAsiMedicalStatusDto.PatientTreatmentDensAsiInterviewerRating);

            var densAsiMedicalStatusNew = new DensAsiMedicalStatusSectionBuilder()
                                          .WithHopitalizedForMedicalProblemsCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiMedicalStatusDto.HopitalizedForMedicalProblemsCount, _mappingHelper))
                                          .WithHopitalizedForMedicalProblemsCountNote(densAsiMedicalStatusDto.HopitalizedForMedicalProblemsCountNote)
                                          .WithYearsAndMonthsAfterLastHospitalizationForPhysicalProblemTimeSpan(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiMedicalStatusDto.YearsAndMonthsAfterLastHospitalizationForPhysicalProblemTimeSpan, _mappingHelper))
                                          .WithYearsAndMonthsAfterLastHospitalizationForPhysicalProblemTimeSpanNote(
                densAsiMedicalStatusDto.YearsAndMonthsAfterLastHospitalizationForPhysicalProblemTimeSpanNote)
                                          .WithChronicMedicalProblemThatInterferesWithLifeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiMedicalStatusDto.ChronicMedicalProblemThatInterferesWithLifeIndicator, _mappingHelper))
                                          .WithChronicMedicalProblemThatInterferesWithLifeDescription(
                densAsiMedicalStatusDto.ChronicMedicalProblemThatInterferesWithLifeDescription)
                                          .WithChronicMedicalProblemThatInterferesWithLifeNote(densAsiMedicalStatusDto.ChronicMedicalProblemThatInterferesWithLifeNote)
                                          .WithTakingPrescribedMedicationsForPhysicalProblemIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiMedicalStatusDto.TakingPrescribedMedicationsForPhysicalProblemIndicator, _mappingHelper))
                                          .WithTakingPrescribedMedicationsForPhysicalProblemDescription(
                densAsiMedicalStatusDto.TakingPrescribedMedicationsForPhysicalProblemDescription)
                                          .WithTakingPrescribedMedicationsForPhysicalProblemNote(densAsiMedicalStatusDto.TakingPrescribedMedicationsForPhysicalProblemNote)
                                          .WithReceivePensionForPhysicalDisabilityIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiMedicalStatusDto.ReceivePensionForPhysicalDisabilityIndicator, _mappingHelper))
                                          .WithReceivePensionForPhysicalDisabilityDescription(densAsiMedicalStatusDto.ReceivePensionForPhysicalDisabilityDescription)
                                          .WithReceivePensionForPhysicalDisabilityNote(densAsiMedicalStatusDto.ReceivePensionForPhysicalDisabilityNote)
                                          .WithMedicalProblemsDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiMedicalStatusDto.MedicalProblemsDayCount, _mappingHelper))
                                          .WithMedicalProblemsDayCountNote(densAsiMedicalStatusDto.MedicalProblemsDayCountNote)
                                          .WithTroubledByMedicalProblemsDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiMedicalStatusDto.TroubledByMedicalProblemsDensAsiPatientRating, _mappingHelper))
                                          .WithTroubledByMedicalProblemsDensAsiPatientRatingNote(densAsiMedicalStatusDto.TroubledByMedicalProblemsDensAsiPatientRatingNote)
                                          .WithImportanceOfMedicalProblemTreatmentDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiMedicalStatusDto.ImportanceOfMedicalProblemTreatmentDensAsiPatientRating, _mappingHelper))
                                          .WithImportanceOfMedicalProblemTreatmentDensAsiPatientRatingNote(
                densAsiMedicalStatusDto.ImportanceOfMedicalProblemTreatmentDensAsiPatientRatingNote)
                                          .WithPatientTreatmentDensAsiInterviewerRating(patientTreatmentDensAsiInterviewerRating)
                                          .WithPatientTreatmentDensAsiInterviewerRatingNote(densAsiMedicalStatusDto.PatientTreatmentDensAsiInterviewerRatingNote)
                                          .WithConfidenceRateDistortedByPatientMisrepresentationIndicator(
                densAsiMedicalStatusDto.ConfidenceRateDistortedByPatientMisrepresentationIndicator)
                                          .WithConfidenceRateDistortedByPatientMisrepresentationIndicatorNote(
                densAsiMedicalStatusDto.ConfidenceRateDistortedByPatientMisrepresentationIndicatorNote)
                                          .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicator(
                densAsiMedicalStatusDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicator)
                                          .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote(
                densAsiMedicalStatusDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote)
                                          .WithSectionNote(densAsiMedicalStatusDto.SectionNote)
                                          .Build();

            AggregateRoot.ReviseDensAsiMedicalStatus(densAsiMedicalStatusNew);
            densAsiMedicalStatusDto.Key = AggregateRoot.DensAsiMedicalStatus.Key;

            return(true);
        }
コード例 #5
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="densAsiPsychiatricStatusDto">The dens asi psychiatric status dto.</param>
        /// <param name="densAsiPsychiatricStatus">The dens asi psychiatric status.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(
            DensAsiPsychiatricStatusDto densAsiPsychiatricStatusDto, DensAsiPsychiatricStatus densAsiPsychiatricStatus)
        {
            var patientCounselingDensAsiInterviewerRating =
                _mappingHelper.MapLookupField <DensAsiInterviewerRating> (densAsiPsychiatricStatusDto.PatientCounselingDensAsiInterviewerRating);

            var densAsiPsychiatricStatusNew = new DensAsiPsychiatricStatusSectionBuilder()
                                              .WithPsychologicalTreatmentInHospitalCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.PsychologicalTreatmentInHospitalCount, _mappingHelper))
                                              .WithPsychologicalTreatmentInHospitalCountNote(densAsiPsychiatricStatusDto.PsychologicalTreatmentInHospitalCountNote)
                                              .WithPsychologicalTreatmentAsOutpatientCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.PsychologicalTreatmentAsOutpatientCount, _mappingHelper))
                                              .WithPsychologicalTreatmentAsOutpatientCountNote(densAsiPsychiatricStatusDto.PsychologicalTreatmentAsOutpatientCountNote)
                                              .WithPsychiatricDisabilityPensionIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.PsychiatricDisabilityPensionIndicator, _mappingHelper))
                                              .WithPsychiatricDisabilityPensionIndicatorNote(densAsiPsychiatricStatusDto.PsychiatricDisabilityPensionIndicatorNote)
                                              .WithDepressionLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.DepressionLastThirtyDaysIndicator, _mappingHelper))
                                              .WithDepressionLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.DepressionLifetimeIndicator, _mappingHelper))
                                              .WithDepressionNote(densAsiPsychiatricStatusDto.DepressionNote)
                                              .WithAnxietyLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.AnxietyLastThirtyDaysIndicator, _mappingHelper))
                                              .WithAnxietyLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiPsychiatricStatusDto.AnxietyLifetimeIndicator, _mappingHelper))
                                              .WithAnxietyNote(densAsiPsychiatricStatusDto.AnxietyNote)
                                              .WithHallucinationLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.HallucinationLastThirtyDaysIndicator, _mappingHelper))
                                              .WithHallucinationLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.HallucinationLifetimeIndicator, _mappingHelper))
                                              .WithHallucinationNote(densAsiPsychiatricStatusDto.HallucinationNote)
                                              .WithTroubleConcentratingLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.TroubleConcentratingLastThirtyDaysIndicator, _mappingHelper))
                                              .WithTroubleConcentratingLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.TroubleConcentratingLifetimeIndicator, _mappingHelper))
                                              .WithTroubleConcentratingNote(densAsiPsychiatricStatusDto.TroubleConcentratingNote)
                                              .WithTroubleControllingRageLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.TroubleControllingRageLastThirtyDaysIndicator, _mappingHelper))
                                              .WithTroubleControllingRageLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.TroubleControllingRageLifetimeIndicator, _mappingHelper))
                                              .WithTroubleControllingRageNote(densAsiPsychiatricStatusDto.TroubleControllingRageNote)
                                              .WithThoughtsOfSuicideLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.ThoughtsOfSuicideLastThirtyDaysIndicator, _mappingHelper))
                                              .WithThoughtsOfSuicideLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.ThoughtsOfSuicideLifetimeIndicator, _mappingHelper))
                                              .WithThoughtsOfSuicideNote(densAsiPsychiatricStatusDto.ThoughtsOfSuicideNote)
                                              .WithAttemptedSuicideLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.AttemptedSuicideLastThirtyDaysIndicator, _mappingHelper))
                                              .WithAttemptedSuicideLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.AttemptedSuicideLifetimeIndicator, _mappingHelper))
                                              .WithAttemptedSuicideNote(densAsiPsychiatricStatusDto.AttemptedSuicideNote)
                                              .WithPrescribedMedicationsLastThirtyDaysIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.PrescribedMedicationsLastThirtyDaysIndicator, _mappingHelper))
                                              .WithPrescribedMedicationsLifetimeIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.PrescribedMedicationsLifetimeIndicator, _mappingHelper))
                                              .WithPrescribedMedicationsNote(densAsiPsychiatricStatusDto.PrescribedMedicationsNote)
                                              .WithPsychologicalProblemsLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.PsychologicalProblemsLastThirtyDaysDayCount, _mappingHelper))
                                              .WithPsychologicalProblemsLastThirtyDaysDayCountNote(densAsiPsychiatricStatusDto.PsychologicalProblemsLastThirtyDaysDayCountNote)
                                              .WithTroubledByPsychologicalProblemsDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiPsychiatricStatusDto.TroubledByPsychologicalProblemsDensAsiPatientRating, _mappingHelper))
                                              .WithTroubledByPsychologicalProblemsDensAsiPatientRatingNote(
                densAsiPsychiatricStatusDto.TroubledByPsychologicalProblemsDensAsiPatientRatingNote)
                                              .WithImportanceOfPsychologicalProblemCounselingDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiPsychiatricStatusDto.ImportanceOfPsychologicalProblemCounselingDensAsiPatientRating, _mappingHelper))
                                              .WithImportanceOfPsychologicalProblemCounselingDensAsiPatientRatingNote(
                densAsiPsychiatricStatusDto.ImportanceOfPsychologicalProblemCounselingDensAsiPatientRatingNote)
                                              .WithPatientDepressedIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiPsychiatricStatusDto.PatientDepressedIndicator, _mappingHelper))
                                              .WithPatientDepressedIndicatorNote(densAsiPsychiatricStatusDto.PatientDepressedIndicatorNote)
                                              .WithPatientHostileIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiPsychiatricStatusDto.PatientHostileIndicator, _mappingHelper))
                                              .WithPatientHostileIndicatorNote(densAsiPsychiatricStatusDto.PatientHostileIndicatorNote)
                                              .WithPatientAnxiousIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiPsychiatricStatusDto.PatientAnxiousIndicator, _mappingHelper))
                                              .WithPatientAnxiousIndicatorNote(densAsiPsychiatricStatusDto.PatientAnxiousIndicatorNote)
                                              .WithPatientParanoidIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiPsychiatricStatusDto.PatientParanoidIndicator, _mappingHelper))
                                              .WithPatientParanoidIndicatorNote(densAsiPsychiatricStatusDto.PatientParanoidIndicatorNote)
                                              .WithPatientTroubleConcentratingIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.PatientTroubleConcentratingIndicator, _mappingHelper))
                                              .WithPatientTroubleConcentratingIndicatorNote(densAsiPsychiatricStatusDto.PatientTroubleConcentratingIndicatorNote)
                                              .WithPatientThoughtsOfSuicideIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.PatientThoughtsOfSuicideIndicator, _mappingHelper))
                                              .WithPatientThoughtsOfSuicideIndicatorNote(densAsiPsychiatricStatusDto.PatientThoughtsOfSuicideIndicatorNote)
                                              .WithPatientCounselingDensAsiInterviewerRating(patientCounselingDensAsiInterviewerRating)
                                              .WithPatientCounselingDensAsiInterviewerRatingNote(densAsiPsychiatricStatusDto.PatientCounselingDensAsiInterviewerRatingNote)
                                              .WithConfidenceDistortedByPatientMisrepresentationIndicator(
                densAsiPsychiatricStatusDto.ConfidenceDistortedByPatientMisrepresentationIndicator)
                                              .WithConfidenceDistortedByPatientMisrepresentationIndicatorNote(
                densAsiPsychiatricStatusDto.ConfidenceDistortedByPatientMisrepresentationIndicatorNote)
                                              .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicator(
                densAsiPsychiatricStatusDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicator)
                                              .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote(
                densAsiPsychiatricStatusDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote)
                                              .WithSectionNote(densAsiPsychiatricStatusDto.SectionNote)
                                              .WithHorribleExperiencesIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiPsychiatricStatusDto.HorribleExperiencesIndicator, _mappingHelper))
                                              .WithHorribleExperiencesIndicatorNote(densAsiPsychiatricStatusDto.HorribleExperiencesIndicatorNote)
                                              .WithNightmaresLastThirtyDaysDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiPsychiatricStatusDto.NightmaresLastThirtyDaysDensAsiPatientRating, _mappingHelper))
                                              .WithNightmaresLastThirtyDaysDensAsiPatientRatingNote(densAsiPsychiatricStatusDto.NightmaresLastThirtyDaysDensAsiPatientRatingNote)
                                              .WithTraumaticEventThoughtsLastThirtyDaysDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiPsychiatricStatusDto.TraumaticEventThoughtsLastThirtyDaysDensAsiPatientRating, _mappingHelper))
                                              .WithTraumaticEventThoughtsLastThirtyDaysDensAsiPatientRatingNote(
                densAsiPsychiatricStatusDto.TraumaticEventThoughtsLastThirtyDaysDensAsiPatientRatingNote)
                                              .WithOnGuardLastThirtyDaysDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiPsychiatricStatusDto.OnGuardLastThirtyDaysDensAsiPatientRating, _mappingHelper))
                                              .WithOnGuardLastThirtyDaysDensAsiPatientRatingNote(densAsiPsychiatricStatusDto.OnGuardLastThirtyDaysDensAsiPatientRatingNote)
                                              .WithFeltNumbLastThirtyDaysDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiPsychiatricStatusDto.FeltNumbLastThirtyDaysDensAsiPatientRating, _mappingHelper))
                                              .WithFeltNumbLastThirtyDaysDensAsiPatientRatingNote(densAsiPsychiatricStatusDto.FeltNumbLastThirtyDaysDensAsiPatientRatingNote)
                                              .Build();

            AggregateRoot.ReviseDensAsiPsychiatricStatus(densAsiPsychiatricStatusNew);

            densAsiPsychiatricStatusDto.Key = AggregateRoot.DensAsiPsychiatricStatus.Key;

            return(true);
        }
コード例 #6
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="densAsiDsmIvDto">The dens asi DSM iv dto.</param>
        /// <param name="densAsiDsmIv">The dens asi DSM iv.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(DensAsiDsmIvDto densAsiDsmIvDto, DensAsiDsmIv densAsiDsmIv)
        {
            var densiAsiDsmIvNew = new DensAsiDsmIvSectionBuilder()
                                   .WithAlcoholDependenceLessEffectIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDsmIvDto.AlcoholDependenceLessEffectIndicator, _mappingHelper))
                                   .WithDrugDependenceLessEffectIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDsmIvDto.DrugDependenceLessEffectIndicator, _mappingHelper))
                                   .WithLessEffectIndicatorNote(densAsiDsmIvDto.LessEffectIndicatorNote)
                                   .WithAlcoholDependencePhysicalDistressOnQuittingIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.AlcoholDependencePhysicalDistressOnQuittingIndicator, _mappingHelper))
                                   .WithDrugDependencePhysicalDistressOnQuittingIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.DrugDependencePhysicalDistressOnQuittingIndicator, _mappingHelper))
                                   .WithPhysicalDistressOnQuittingNote(densAsiDsmIvDto.PhysicalDistressOnQuittingNote)
                                   .WithAlcoholDependenceUsedMoreIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDsmIvDto.AlcoholDependenceUsedMoreIndicator, _mappingHelper))
                                   .WithDrugDependenceUsedMoreIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDsmIvDto.DrugDependenceUsedMoreIndicator, _mappingHelper))
                                   .WithUsedMoreIndicatorNote(densAsiDsmIvDto.UsedMoreIndicatorNote)
                                   .WithAlcoholDependenceWantedToCutDownIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.AlcoholDependenceWantedToCutDownIndicator, _mappingHelper))
                                   .WithDrugDependenceWantedToCutDownIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.DrugDependenceWantedToCutDownIndicator, _mappingHelper))
                                   .WithWantedToCutDownIndicatorNote(densAsiDsmIvDto.WantedToCutDownIndicatorNote)
                                   .WithAlcoholDependenceTimeSpentObtainingIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.AlcoholDependenceTimeSpentObtainingIndicator, _mappingHelper))
                                   .WithDrugDependenceTimeSpentObtainingIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.DrugDependenceTimeSpentObtainingIndicator, _mappingHelper))
                                   .WithTimeSpentObtainingIndicatorNote(densAsiDsmIvDto.TimeSpentObtainingIndicatorNote)
                                   .WithAlcoholDependenceGiveUpWorkFamilyActivitiesIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.AlcoholDependenceGiveUpWorkFamilyActivitiesIndicator, _mappingHelper))
                                   .WithDrugDependenceGiveUpWorkFamilyActivitiesIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.DrugDependenceGiveUpWorkFamilyActivitiesIndicator, _mappingHelper))
                                   .WithGiveUpWorkFamilyActivitiesIndicatorNote(densAsiDsmIvDto.GiveUpWorkFamilyActivitiesIndicatorNote)
                                   .WithAlcoholDependenceContinuedToUseIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.AlcoholDependenceContinuedToUseIndicator, _mappingHelper))
                                   .WithDrugDependenceContinuedToUseIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDsmIvDto.DrugDependenceContinuedToUseIndicator, _mappingHelper))
                                   .WithContinuedToUseIndicatorNote(densAsiDsmIvDto.ContinuedToUseIndicatorNote)
                                   .WithSectionNote(densAsiDsmIvDto.SectionNote)
                                   .WithAlcoholAbuseInabilityToMeetResponsibilitiesIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.AlcoholAbuseInabilityToMeetResponsibilitiesIndicator, _mappingHelper))
                                   .WithDrugAbuseInabilityToMeetResponsibilitiesIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.DrugAbuseInabilityToMeetResponsibilitiesIndicator, _mappingHelper))
                                   .WithInabilityToMeetResponsibilitiesIndicatorNote(densAsiDsmIvDto.InabilityToMeetResponsibilitiesIndicatorNote)
                                   .WithAlcoholAbuseVoluntaryPhysicalDangerIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.AlcoholAbuseVoluntaryPhysicalDangerIndicator, _mappingHelper))
                                   .WithDrugAbuseVoluntaryPhysicalDangerIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDsmIvDto.DrugAbuseVoluntaryPhysicalDangerIndicator, _mappingHelper))
                                   .WithVoluntaryPhysicalDangerIndicatorNote(densAsiDsmIvDto.VoluntaryPhysicalDangerIndicatorNote)
                                   .WithAlcoholAbuseLegalProblemsIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDsmIvDto.AlcoholAbuseLegalProblemsIndicator, _mappingHelper))
                                   .WithDrugAbuseLegalProblemsIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDsmIvDto.DrugAbuseLegalProblemsIndicator, _mappingHelper))
                                   .WithLegalProblemsIndicatorNote(densAsiDsmIvDto.LegalProblemsIndicatorNote)
                                   .WithAlcoholAbuseSocialProblemsIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDsmIvDto.AlcoholAbuseSocialProblemsIndicator, _mappingHelper))
                                   .WithDrugAbuseSocialProblemsIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDsmIvDto.DrugAbuseSocialProblemsIndicator, _mappingHelper))
                                   .WithSocialProblemsIndicatorNote(densAsiDsmIvDto.SocialProblemsIndicatorNote)
                                   .Build();

            AggregateRoot.ReviseDensAsiDsmIv(densiAsiDsmIvNew);

            densAsiDsmIvDto.Key = AggregateRoot.DensAsiDsmIv.Key;

            return(true);
        }
コード例 #7
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="densAsiEmploymentStatusDto">The dens asi employment status dto.</param>
        /// <param name="densAsiEmploymentStatus">The dens asi employment status.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(
            DensAsiEmploymentStatusDto densAsiEmploymentStatusDto, DensAsiEmploymentStatus densAsiEmploymentStatus)
        {
            var patientCounselingDensAsiInterviewerRating =
                _mappingHelper.MapLookupField <DensAsiInterviewerRating> (densAsiEmploymentStatusDto.PatientCounselingDensAsiInterviewerRating);

            var densiAsiEmploymentStatusNew = new DensAsiEmploymentStatusSectionBuilder()
                                              .WithYearsAndMonthsEducationCompletedTimeSpan(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.YearsAndMonthsEducationCompletedTimeSpan, _mappingHelper))
                                              .WithYearsAndMonthsEducationCompletedTimeSpanNote(densAsiEmploymentStatusDto.YearsAndMonthsEducationCompletedTimeSpanNote)
                                              .WithTechnicalEducationCompletedMonthCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.TechnicalEducationCompletedMonthCount, _mappingHelper))
                                              .WithTechnicalEducationCompletedMonthCountNote(densAsiEmploymentStatusDto.TechnicalEducationCompletedMonthCountNote)
                                              .WithProfessionTradeSkillIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.ProfessionTradeSkillIndicator, _mappingHelper))
                                              .WithProfessionTradeSkillDescription(densAsiEmploymentStatusDto.ProfessionTradeSkillDescription)
                                              .WithProfessionTradeSkillNote(densAsiEmploymentStatusDto.ProfessionTradeSkillNote)
                                              .WithValidDriversLicenseIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.ValidDriversLicenseIndicator, _mappingHelper))
                                              .WithValidDriversLicenseIndicatorNote(densAsiEmploymentStatusDto.ValidDriversLicenseIndicatorNote)
                                              .WithAutomobileAvailableforUseIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.AutomobileAvailableforUseIndicator, _mappingHelper))
                                              .WithAutomobileAvailableforUseIndicatorNote(densAsiEmploymentStatusDto.AutomobileAvailableforUseIndicatorNote)
                                              .WithYearsAndMonthsOfLongestFullTimeJobTimeSpan(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.YearsAndMonthsOfLongestFullTimeJobTimeSpan, _mappingHelper))
                                              .WithYearsAndMonthsOfLongestFullTimeJobTimeSpanNote(densAsiEmploymentStatusDto.YearsAndMonthsOfLongestFullTimeJobTimeSpanNote)
                                              .WithUsualOrLastDensAsiOccupationType(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiOccupationType> (
                    densAsiEmploymentStatusDto.UsualOrLastDensAsiOccupationType, _mappingHelper))
                                              .WithUsualOrLastOccupationDescription(densAsiEmploymentStatusDto.UsualOrLastOccupationDescription)
                                              .WithUsualOrLastOccupationNote(densAsiEmploymentStatusDto.UsualOrLastOccupationNote)
                                              .WithContributionOfSomeoneToSupportIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.ContributionOfSomeoneToSupportIndicator, _mappingHelper))
                                              .WithContributionOfSomeoneToSupportIndicatorNote(densAsiEmploymentStatusDto.ContributionOfSomeoneToSupportIndicatorNote)
                                              .WithContributionConstituteMajorityOfYourSupportIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.ContributionConstituteMajorityOfYourSupportIndicator, _mappingHelper))
                                              .WithContributionConstituteMajorityOfYourSupportIndicatorNote(
                densAsiEmploymentStatusDto.ContributionConstituteMajorityOfYourSupportIndicatorNote)
                                              .WithPastThreeYearsDensAsiEmploymentPattern(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiEmploymentPattern> (
                    densAsiEmploymentStatusDto.PastThreeYearsDensAsiEmploymentPattern, _mappingHelper))
                                              .WithPastThreeYearsDensAsiEmploymentPatternNote(densAsiEmploymentStatusDto.PastThreeYearsDensAsiEmploymentPatternNote)
                                              .WithWorkInLastThirtyDaysPaidDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.WorkInLastThirtyDaysPaidDayCount, _mappingHelper))
                                              .WithWorkInLastThirtyDaysPaidDayCountNote(densAsiEmploymentStatusDto.WorkInLastThirtyDaysPaidDayCountNote)
                                              .WithNetIncomeAmount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiEmploymentStatusDto.NetIncomeAmount, _mappingHelper))
                                              .WithNetIncomeAmountNote(densAsiEmploymentStatusDto.NetIncomeAmountNote)
                                              .WithUnemploymentCompensationAmount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.UnemploymentCompensationAmount, _mappingHelper))
                                              .WithUnemploymentCompensationAmountNote(densAsiEmploymentStatusDto.UnemploymentCompensationAmountNote)
                                              .WithWelfareAmount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiEmploymentStatusDto.WelfareAmount, _mappingHelper))
                                              .WithWelfareAmountNote(densAsiEmploymentStatusDto.WelfareAmountNote)
                                              .WithPensionBenefitsSocialSecurityAmount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiEmploymentStatusDto.PensionBenefitsSocialSecurityAmount, _mappingHelper))
                                              .WithPensionBenefitsSocialSecurityAmountNote(densAsiEmploymentStatusDto.PensionBenefitsSocialSecurityAmountNote)
                                              .WithMateFamilyFriendsAmount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiEmploymentStatusDto.MateFamilyFriendsAmount, _mappingHelper))
                                              .WithMateFamilyFriendsAmountNote(densAsiEmploymentStatusDto.MateFamilyFriendsAmountNote)
                                              .WithIllegalAmount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiEmploymentStatusDto.IllegalAmount, _mappingHelper))
                                              .WithIllegalAmountNote(densAsiEmploymentStatusDto.IllegalAmountNote)
                                              .WithDependentPeopleCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiEmploymentStatusDto.DependentPeopleCount, _mappingHelper))
                                              .WithDependentPeopleCountNote(densAsiEmploymentStatusDto.DependentPeopleCountNote)
                                              .WithEmploymentProblemsDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiEmploymentStatusDto.EmploymentProblemsDayCount, _mappingHelper))
                                              .WithEmploymentProblemsDayCountNote(densAsiEmploymentStatusDto.EmploymentProblemsDayCountNote)
                                              .WithTroubledByEmploymentProblemsDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiEmploymentStatusDto.TroubledByEmploymentProblemsDensAsiPatientRating, _mappingHelper))
                                              .WithTroubledByEmploymentProblemsDensAsiPatientRatingNote(
                densAsiEmploymentStatusDto.TroubledByEmploymentProblemsDensAsiPatientRatingNote)
                                              .WithImportanceOfEmployementProblemCounselingDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiEmploymentStatusDto.ImportanceOfEmploymentProblemCounselingDensAsiPatientRating, _mappingHelper))
                                              .WithImportanceOfEmployementProblemCounselingDensAsiPatientRatingNote(
                densAsiEmploymentStatusDto.ImportanceOfEmploymentProblemCounselingDensAsiPatientRatingNote)
                                              .WithPatientCounselingDensAsiInterviewerRating(patientCounselingDensAsiInterviewerRating)
                                              .WithPatientCounselingDensAsiInterviewerRatingNote(densAsiEmploymentStatusDto.PatientCounselingDensAsiInterviewerRatingNote)
                                              .WithConfidenceDistortedByPatientMisrepresentationIndicator(
                densAsiEmploymentStatusDto.ConfidenceDistortedByPatientMisrepresentationIndicator)
                                              .WithConfidenceDistortedByPatientMisrepresentationIndicatorNote(
                densAsiEmploymentStatusDto.ConfidenceDistortedByPatientMisrepresentationIndicatorNote)
                                              .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicator(
                densAsiEmploymentStatusDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicator)
                                              .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote(
                densAsiEmploymentStatusDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote)
                                              .WithSectionNote(densAsiEmploymentStatusDto.SectionNote)
                                              .Build();

            AggregateRoot.ReviseDensAsiEmploymentStatus(densiAsiEmploymentStatusNew);

            densAsiEmploymentStatusDto.Key = AggregateRoot.DensAsiEmploymentStatus.Key;

            return(true);
        }
コード例 #8
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="densAsiLegalStatusDto">The dens asi legal status dto.</param>
        /// <param name="densAsiLegalStatus">The dens asi legal status.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(DensAsiLegalStatusDto densAsiLegalStatusDto, DensAsiLegalStatus densAsiLegalStatus)
        {
            var patientCounselingDensAsiInterviewerRating =
                _mappingHelper.MapLookupField <DensAsiInterviewerRating> (densAsiLegalStatusDto.PatientCounselingDensAsiInterviewerRating);

            var densAsiLegalStatusNew = new DensAsiLegalStatusSectionBuilder()
                                        .WithAdmissionPromptedByCriminalJusticeSystemIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.AdmissionPromptedByCriminalJusticeSystemIndicator, _mappingHelper))
                                        .WithAdmissionPromptedByCriminalJusticeSystemIndicatorNote(
                densAsiLegalStatusDto.AdmissionPromptedByCriminalJusticeSystemIndicatorNote)
                                        .WithProbationOrParoleIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.ProbationOrParoleIndicator, _mappingHelper))
                                        .WithProbationOrParoleIndicatorNote(densAsiLegalStatusDto.ProbationOrParoleIndicatorNote)
                                        .WithArrestedChargedShopliftingCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.ArrestedChargedShopliftingCount, _mappingHelper))
                                        .WithArrestedChargedShopliftingCountNote(densAsiLegalStatusDto.ArrestedChargedShopliftingCountNote)
                                        .WithArrestedChargedProbationParoleViolationCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ArrestedChargedProbationParoleViolationCount, _mappingHelper))
                                        .WithArrestedChargedProbationParoleViolationCountNote(densAsiLegalStatusDto.ArrestedChargedProbationParoleViolationCountNote)
                                        .WithArrestedChargedDrugChargesCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.ArrestedChargedDrugChargesCount, _mappingHelper))
                                        .WithArrestedChargedDrugChargesCountNote(densAsiLegalStatusDto.ArrestedChargedDrugChargesCountNote)
                                        .WithArrestedChargedForgeryCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.ArrestedChargedForgeryCount, _mappingHelper))
                                        .WithArrestedChargedForgeryCountNote(densAsiLegalStatusDto.ArrestedChargedForgeryCountNote)
                                        .WithArrestedChargedWeaponsOffenseCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ArrestedChargedWeaponsOffenseCount, _mappingHelper))
                                        .WithArrestedChargedWeaponsOffenseCountNote(densAsiLegalStatusDto.ArrestedChargedWeaponsOffenseCountNote)
                                        .WithArrestedChargedBurglaryLarcencyCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ArrestedChargedBurglaryLarcencyCount, _mappingHelper))
                                        .WithArrestedChargedBurglaryLarcencyCountNote(densAsiLegalStatusDto.ArrestedChargedBurglaryLarcencyCountNote)
                                        .WithArrestedChargedRobberyCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.ArrestedChargedRobberyCount, _mappingHelper))
                                        .WithArrestedChargedRobberyCountNote(densAsiLegalStatusDto.ArrestedChargedRobberyCountNote)
                                        .WithArrestedChargedAssaultCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.ArrestedChargedAssaultCount, _mappingHelper))
                                        .WithArrestedChargedAssaultCountNote(densAsiLegalStatusDto.ArrestedChargedAssaultCountNote)
                                        .WithArrestedChargedArsonCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.ArrestedChargedArsonCount, _mappingHelper))
                                        .WithArrestedChargedArsonCountNote(densAsiLegalStatusDto.ArrestedChargedArsonCountNote)
                                        .WithArrestedChargedRapeCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.ArrestedChargedRapeCount, _mappingHelper))
                                        .WithArrestedChargedRapeCountNote(densAsiLegalStatusDto.ArrestedChargedRapeCountNote)
                                        .WithArrestedChargedHomicideManslaughterCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ArrestedChargedHomicideManslaughterCount, _mappingHelper))
                                        .WithArrestedChargedHomicideManslaughterCountNote(densAsiLegalStatusDto.ArrestedChargedHomicideManslaughterCountNote)
                                        .WithArrestedChargedProstitutionCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ArrestedChargedProstitutionCount, _mappingHelper))
                                        .WithArrestedChargedProstitutionCountNote(densAsiLegalStatusDto.ArrestedChargedProstitutionCountNote)
                                        .WithArrestedChargedContemptOfCountCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ArrestedChargedContemptOfCountCount, _mappingHelper))
                                        .WithArrestedChargedContemptOfCountCountNote(densAsiLegalStatusDto.ArrestedChargedContemptOfCountCountNote)
                                        .WithArrestedChargedOtherCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.ArrestedChargedOtherCount, _mappingHelper))
                                        .WithArrestedChargedOtherDescription(densAsiLegalStatusDto.ArrestedChargedOtherDescription)
                                        .WithArrestedChargedOtherNote(densAsiLegalStatusDto.ArrestedChargedOtherNote)
                                        .WithArrestChargesResultedInConvictionsCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ArrestChargesResultedInConvictionsCount, _mappingHelper))
                                        .WithArrestChargesResultedInConvictionsCountNote(densAsiLegalStatusDto.ArrestChargesResultedInConvictionsCountNote)
                                        .WithChargedWithDisorderlyConductCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ChargedWithDisorderlyConductCount, _mappingHelper))
                                        .WithChargedWithDisorderlyConductCountNote(densAsiLegalStatusDto.ChargedWithDisorderlyConductCountNote)
                                        .WithChargedWithDrivingWhileIntoxicatedCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ChargedWithDrivingWhileIntoxicatedCount, _mappingHelper))
                                        .WithChargedWithDrivingWhileIntoxicatedCountNote(densAsiLegalStatusDto.ChargedWithDrivingWhileIntoxicatedCountNote)
                                        .WithChargedWithMajorDrivingViolationsCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.ChargedWithMajorDrivingViolationsCount, _mappingHelper))
                                        .WithChargedWithMajorDrivingViolationsCountNote(densAsiLegalStatusDto.ChargedWithMajorDrivingViolationsCountNote)
                                        .WithIncarcerationInLifeMonthCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiLegalStatusDto.IncarcerationInLifeMonthCount, _mappingHelper))
                                        .WithIncarcerationInLifeMonthCountNote(densAsiLegalStatusDto.IncarcerationInLifeMonthCountNote)
                                        .WithLastIncarcerationLengthMonthCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.LastIncarcerationLengthMonthCount, _mappingHelper))
                                        .WithIncarcerationLengthMonthCountNote(densAsiLegalStatusDto.IncarcerationLengthMonthCountNote)
                                        .WithIncarcerationForDensAsiViolationType(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiViolationType> (
                    densAsiLegalStatusDto.IncarcerationForDensAsiViolationType, _mappingHelper))
                                        .WithIncarcerationForDensAsiViolationTypeNote(densAsiLegalStatusDto.IncarcerationForDensAsiViolationTypeNote)
                                        .WithPresentlyAwaitingChargesIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.PresentlyAwaitingChargesIndicator, _mappingHelper))
                                        .WithPresentlyAwaitingChargesIndicatorNote(densAsiLegalStatusDto.PresentlyAwaitingChargesIndicatorNote)
                                        .WithPresentlyAwaitingChargesForDensAsiViolationType(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiViolationType> (
                    densAsiLegalStatusDto.PresentlyAwaitingChargesForDensAsiViolationType, _mappingHelper))
                                        .WithPresentlyAwaitingChargesForNote(densAsiLegalStatusDto.PresentlyAwaitingChargesForNote)
                                        .WithIncarceratedInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.IncarceratedInLastThirtyDaysDayCount, _mappingHelper))
                                        .WithIncarceratedInLastThirtyDaysDayCountNote(densAsiLegalStatusDto.IncarceratedInLastThirtyDaysDayCountNote)
                                        .WithIllegalActivityInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.IllegalActivityInLastThirtyDaysDayCount, _mappingHelper))
                                        .WithIllegalActivityInLastThirtyDaysDayCountNote(densAsiLegalStatusDto.IllegalActivityInLastThirtyDaysDayCountNote)
                                        .WithSeriousnessOfLegalProblemsDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiLegalStatusDto.SeriousnessOfLegalProblemsDensAsiPatientRating, _mappingHelper))
                                        .WithSeriousnessOfLegalProblemsDensAsiPatientRatingNote(densAsiLegalStatusDto.SeriousnessOfLegalProblemsDensAsiPatientRatingNote)
                                        .WithImportanceOfLegalProblemCounselingDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiLegalStatusDto.ImportanceOfLegalProblemCounselingDensAsiPatientRating, _mappingHelper))
                                        .WithImportanceOfLegalProblemCounselingDensAsiPatientRatingNote(
                densAsiLegalStatusDto.ImportanceOfLegalProblemCounselingDensAsiPatientRatingNote)
                                        .WithPatientCounselingDensAsiInterviewerRating(patientCounselingDensAsiInterviewerRating)
                                        .WithPatientCounselingDensAsiInterviewerRatingNote(densAsiLegalStatusDto.PatientCounselingDensAsiInterviewerRatingNote)
                                        .WithConfidenceDistortedByPatientMisrepresentationIndicator(
                densAsiLegalStatusDto.ConfidenceDistortedByPatientMisrepresentationIndicator)
                                        .WithConfidenceDistortedByPatientMisrepresentationIndicatorNote(
                densAsiLegalStatusDto.ConfidenceDistortedByPatientMisrepresentationIndicatorNote)
                                        .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicator(
                densAsiLegalStatusDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicator)
                                        .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote(
                densAsiLegalStatusDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote)
                                        .WithSectionNote(densAsiLegalStatusDto.SectionNote)
                                        .WithTreatmentMandatoryForCriminalJusticeSystemIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.TreatmentMandatoryForCriminalJusticeSystemIndicator, _mappingHelper))
                                        .WithTreatmentMandatoryForCriminalJusticeSystemIndicatorNote(
                densAsiLegalStatusDto.TreatmentMandatoryForCriminalJusticeSystemIndicatorNote)
                                        .WithTreatmentInsteadOfIncarcerationInPrisonIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiLegalStatusDto.TreatmentInsteadOfIncarcerationInPrisonIndicator, _mappingHelper))
                                        .WithTreatmentInsteadOfIncarcerationInPrisonIndicatorNote(
                densAsiLegalStatusDto.TreatmentInsteadOfIncarcerationInPrisonIndicatorNote)
                                        .Build();

            AggregateRoot.ReviseDensAsiLegalStatus(densAsiLegalStatusNew);

            densAsiLegalStatusDto.Key = AggregateRoot.DensAsiLegalStatus.Key;

            return(true);
        }
コード例 #9
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="densAsiDrugAlcoholUseDto">The dens asi drug alcohol use dto.</param>
        /// <param name="densAsiDrugAlcoholUse">The dens asi drug alcohol use.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(
            DensAsiDrugAlcoholUseDto densAsiDrugAlcoholUseDto, DensAsiDrugAlcoholUse densAsiDrugAlcoholUse)
        {
            var patientAlcoholTreatmentDensAsiInterviewerRating =
                _mappingHelper.MapLookupField <DensAsiInterviewerRating> (densAsiDrugAlcoholUseDto.PatientAlcoholTreatmentDensAsiInterviewerRating);
            var patientDrugTreatmentDensAsiInterviewerRating =
                _mappingHelper.MapLookupField <DensAsiInterviewerRating> (densAsiDrugAlcoholUseDto.PatientAlcoholTreatmentDensAsiInterviewerRating);

            var densAsiDrugAlcoholUseNew = new DensAsiDrugAlcoholUseSectionBuilder()
                                           .WithAnyAlcoholUseInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.AnyAlcoholUseInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithAnyAlcoholUseInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.AnyAlcoholUseInLifetimeYearCount, _mappingHelper))
                                           .WithAnyAlcoholDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.AnyAlcoholDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithAnyAlcoholUseNote(densAsiDrugAlcoholUseDto.AnyAlcoholUseNote)
                                           .WithAlcoholIntoxicationInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.AlcoholIntoxicationInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithAlcoholIntoxicationUseInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.AlcoholIntoxicationUseInLifetimeYearCount, _mappingHelper))
                                           .WithAlcoholIntoxicationDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.AlcoholIntoxicationDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithAlcoholIntoxicationNote(densAsiDrugAlcoholUseDto.AlcoholIntoxicationNote)
                                           .WithHeroinInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.HeroinInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithHeroinInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.HeroinInLifetimeYearCount, _mappingHelper))
                                           .WithHeroinDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.HeroinDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithHeroinNote(densAsiDrugAlcoholUseDto.HeroinNote)
                                           .WithMethadoneInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.MethadoneInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithMethadoneInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.MethadoneInLifetimeYearCount, _mappingHelper))
                                           .WithMethadoneDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.MethadoneDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithMethadoneNote(densAsiDrugAlcoholUseDto.MethadoneNote)
                                           .WithOtherOpiatesInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OtherOpiatesInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithOtherOpiatesInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OtherOpiatesInLifetimeYearCount, _mappingHelper))
                                           .WithOtherOpiatesDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.OtherOpiatesDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithOtherOpiatesNote(densAsiDrugAlcoholUseDto.OtherOpiatesNote)
                                           .WithBarbituratesInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.BarbituratesInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithBarbituratesInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.BarbituratesInLifetimeYearCount, _mappingHelper))
                                           .WithBarbituratesDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.BarbituratesDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithBarbituratesNote(densAsiDrugAlcoholUseDto.BarbituratesNote)
                                           .WithOtherSedativesInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OtherSedativesInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithOtherSedativesInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OtherSedativesInLifetimeYearCount, _mappingHelper))
                                           .WithOtherSedativesDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.OtherSedativesDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithOtherSedativesNote(densAsiDrugAlcoholUseDto.OtherSedativesNote)
                                           .WithCocaineInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.CocaineInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithCocaineInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.CocaineInLifetimeYearCount, _mappingHelper))
                                           .WithCocaineDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.CocaineDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithCocaineNote(densAsiDrugAlcoholUseDto.CocaineNote)
                                           .WithAmphetaminesInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.AmphetaminesInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithAmphetaminesInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.AmphetaminesInLifetimeYearCount, _mappingHelper))
                                           .WithAmphetaminesDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.AmphetaminesDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithAmphetaminesNote(densAsiDrugAlcoholUseDto.AmphetaminesNote)
                                           .WithCannabisInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.CannabisInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithCannabisInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.CannabisInLifetimeYearCount, _mappingHelper))
                                           .WithCannabisDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.CannabisDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithCannabisNote(densAsiDrugAlcoholUseDto.CannabisNote)
                                           .WithHallucinogensInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.HallucinogensInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithHallucinogensInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.HallucinogensInLifetimeYearCount, _mappingHelper))
                                           .WithHallucinogensDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.HallucinogensDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithHallucinogensNote(densAsiDrugAlcoholUseDto.HallucinogensNote)
                                           .WithInhalantsInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.InhalantsInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithInhalantsInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.InhalantsInLifetimeYearCount, _mappingHelper))
                                           .WithInhalantsDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.InhalantsDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithInhalantsNote(densAsiDrugAlcoholUseDto.InhalantsNote)
                                           .WithMoreThanOneSubstancePerDayInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.MoreThanOneSubstancePerDayInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithMoreThanOneSubstancePerDayInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.MoreThanOneSubstancePerDayInLifetimeYearCount, _mappingHelper))
                                           .WithMoreThanOneSubstancePerDayNote(densAsiDrugAlcoholUseDto.MoreThanOneSubstancePerDayNote)
                                           .WithMajorDensAsiProblematicSubstance(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiProblematicSubstance> (
                    densAsiDrugAlcoholUseDto.MajorDensAsiProblematicSubstance, _mappingHelper))
                                           .WithMajorDensAsiProblematicSubstanceNote(densAsiDrugAlcoholUseDto.MajorDensAsiProblematicSubstanceNote)
                                           .WithVoluntaryAbstinenceFromProblematicSubstanceMonthCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.VoluntaryAbstinenceFromProblematicSubstanceMonthCount, _mappingHelper))
                                           .WithVoluntaryAbstinenceFromProblematicSubstanceMonthCountNote(
                densAsiDrugAlcoholUseDto.VoluntaryAbstinenceFromProblematicSubstanceMonthCountNote)
                                           .WithEndOfProblematicSubstanceAbstinenceMonthCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.EndOfProblematicSubstanceAbstinenceMonthCount, _mappingHelper))
                                           .WithEndOfProblematicSubstanceAbstinenceMonthCountNote(densAsiDrugAlcoholUseDto.EndOfProblematicSubstanceAbstinenceMonthCountNote)
                                           .WithAlcoholDtCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.AlcoholDtCount, _mappingHelper))
                                           .WithAlcoholDtCountNote(densAsiDrugAlcoholUseDto.AlcoholDtCountNote)
                                           .WithOverdosedOnDrugsCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.OverdosedOnDrugsCount, _mappingHelper))
                                           .WithOverdosedOnDrugsCountNote(densAsiDrugAlcoholUseDto.OverdosedOnDrugsCountNote)
                                           .WithAlcoholAbuseTreatmentCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.AlcoholAbuseTreatmentCount, _mappingHelper))
                                           .WithAlcoholAbuseTreatmentCountNote(densAsiDrugAlcoholUseDto.AlcoholAbuseTreatmentCountNote)
                                           .WithAlcoholDetoxTreatmentOnlyCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.AlcoholDetoxTreatmentOnlyCount, _mappingHelper))
                                           .WithAlcoholDetoxTreatmentOnlyCountNote(densAsiDrugAlcoholUseDto.AlcoholDetoxTreatmentOnlyCountNote)
                                           .WithMoneySpentOnAlcoholInLastThirtyDaysAmount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.MoneySpentOnAlcoholInLastThirtyDaysAmount, _mappingHelper))
                                           .WithMoneySpentOnAlcoholInLastThirtyDaysAmountNote(densAsiDrugAlcoholUseDto.MoneySpentOnAlcoholInLastThirtyDaysAmountNote)
                                           .WithDrugAbuseTreatmentCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.DrugAbuseTreatmentCount, _mappingHelper))
                                           .WithDrugAbuseTreatmentCountNote(densAsiDrugAlcoholUseDto.DrugAbuseTreatmentCountNote)
                                           .WithDrugDetoxTreatmentOnlyCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.DrugDetoxTreatmentOnlyCount, _mappingHelper))
                                           .WithDrugDetoxTreatmentOnlyCountNote(densAsiDrugAlcoholUseDto.DrugDetoxTreatmentOnlyCountNote)
                                           .WithMoneySpentOnDrugsInLastThirtyDaysAmount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.MoneySpentOnDrugsInLastThirtyDaysAmount, _mappingHelper))
                                           .WithMoneySpentOnDrugsInLastThirtyDaysAmountNote(densAsiDrugAlcoholUseDto.MoneySpentOnDrugsInLastThirtyDaysAmountNote)
                                           .WithOutpatientTreatmentInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OutpatientTreatmentInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithOutpatientTreatmentInLastThirtyDaysDayCountNote(densAsiDrugAlcoholUseDto.OutpatientTreatmentInLastThirtyDaysDayCountNote)
                                           .WithAlcoholProblemInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.AlcoholProblemInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithAlcoholProblemInLastThirtyDaysDayCountNote(densAsiDrugAlcoholUseDto.AlcoholProblemInLastThirtyDaysDayCountNote)
                                           .WithTroubledByAlcoholProblemsDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiDrugAlcoholUseDto.TroubledByAlcoholProblemsDensAsiPatientRating, _mappingHelper))
                                           .WithTroubledByAlcoholProblemsDensAsiPatientRatingNote(densAsiDrugAlcoholUseDto.TroubledByAlcoholProblemsDensAsiPatientRatingNote)
                                           .WithImportanceOfAlcoholProblemTreatmentDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiDrugAlcoholUseDto.ImportanceOfAlcoholProblemTreatmentDensAsiPatientRating, _mappingHelper))
                                           .WithImportanceOfAlcoholProblemTreatmentDensAsiPatientRatingNote(
                densAsiDrugAlcoholUseDto.ImportanceOfAlcoholProblemTreatmentDensAsiPatientRatingNote)
                                           .WithDrugProblemInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.DrugProblemInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithDrugProblemInLastThirtyDaysDayCountNote(densAsiDrugAlcoholUseDto.DrugProblemInLastThirtyDaysDayCountNote)
                                           .WithTroubledByDrugProblemsDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiDrugAlcoholUseDto.TroubledByDrugProblemsDensAsiPatientRating, _mappingHelper))
                                           .WithTroubledByDrugProblemsDensAsiPatientRatingNote(densAsiDrugAlcoholUseDto.TroubledByDrugProblemsDensAsiPatientRatingNote)
                                           .WithImportanceOfDrugProblemTreatmentDensAsiPatientRating(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiPatientRating> (
                    densAsiDrugAlcoholUseDto.ImportanceOfDrugProblemTreatmentDensAsiPatientRating, _mappingHelper))
                                           .WithImportanceOfDrugProblemTreatmentDensAsiPatientRatingNote(
                densAsiDrugAlcoholUseDto.ImportanceOfDrugProblemTreatmentDensAsiPatientRatingNote)
                                           .WithPatientAlcoholTreatmentDensAsiInterviewerRating(patientAlcoholTreatmentDensAsiInterviewerRating)
                                           .WithPatientAlcoholTreatmentDensAsiInterviewerRatingNote(
                densAsiDrugAlcoholUseDto.PatientAlcoholTreatmentDensAsiInterviewerRatingNote)
                                           .WithPatientDrugTreatmentDensAsiInterviewerRating(patientDrugTreatmentDensAsiInterviewerRating)
                                           .WithPatientDrugTreatmentDensAsiInterviewerRatingNote(densAsiDrugAlcoholUseDto.PatientDrugTreatmentDensAsiInterviewerRatingNote)
                                           .WithConfidenceDistortedByPatientMisrepresentationIndicator(
                densAsiDrugAlcoholUseDto.ConfidenceDistortedByPatientMisrepresentationIndicator)
                                           .WithConfidenceDistortedByPatientMisrepresentationIndicatorNote(
                densAsiDrugAlcoholUseDto.ConfidenceDistortedByPatientMisrepresentationIndicatorNote)
                                           .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicator(
                densAsiDrugAlcoholUseDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicator)
                                           .WithConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote(
                densAsiDrugAlcoholUseDto.ConfidenceRateDistortedByPatientInabilityToUnderstandIndicatorNote)
                                           .WithHydromorphoneInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.HydromorphoneInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithHydromorphoneInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.HydromorphoneInLifetimeYearCount, _mappingHelper))
                                           .WithHydromorphoneDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.HydromorphoneDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithHydromorphoneNote(densAsiDrugAlcoholUseDto.HydromorphoneNote)
                                           .WithOxycodoneInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OxycodoneInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithOxycodoneInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.OxycodoneInLifetimeYearCount, _mappingHelper))
                                           .WithOxycodoneDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.OxycodoneDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithOxycodoneNote(densAsiDrugAlcoholUseDto.OxycodoneNote)
                                           .WithHydrocodoneInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.HydrocodoneInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithHydrocodoneInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.HydrocodoneInLifetimeYearCount, _mappingHelper))
                                           .WithHydrocodoneDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.HydrocodoneDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithHydrocodoneNote(densAsiDrugAlcoholUseDto.HydrocodoneNote)
                                           .WithBuprenorphineInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.BuprenorphineInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithBuprenorphineInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.BuprenorphineInLifetimeYearCount, _mappingHelper))
                                           .WithBuprenorphineDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.BuprenorphineDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithBuprenorphineNote(densAsiDrugAlcoholUseDto.BuprenorphineNote)
                                           .WithOxyContinInLastThirtyDaysDayCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OxyContinInLastThirtyDaysDayCount, _mappingHelper))
                                           .WithOxyContinInLifetimeYearCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(densAsiDrugAlcoholUseDto.OxyContinInLifetimeYearCount, _mappingHelper))
                                           .WithOxyContinDensAsiDrugAlcoholAdministrationRoute(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType <DensAsiDrugAlcoholAdministrationRoute> (
                    densAsiDrugAlcoholUseDto.OxyContinDensAsiDrugAlcoholAdministrationRoute, _mappingHelper))
                                           .WithOxyContinNote(densAsiDrugAlcoholUseDto.OxyContinNote)
                                           .WithOxyContinPrescribedForMedicalReasonIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OxyContinPrescribedForMedicalReasonIndicator, _mappingHelper))
                                           .WithOxyContinPrescribedForMedicalReasonIndicatorNote(densAsiDrugAlcoholUseDto.OxyContinPrescribedForMedicalReasonIndicatorNote)
                                           .WithOxyContinUseToGetHighIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OxyContinUseToGetHighIndicator, _mappingHelper))
                                           .WithOxyContinUseToGetHighIndicatorNote(densAsiDrugAlcoholUseDto.OxyContinUseToGetHighIndicatorNote)
                                           .WithOxyContinTakenWithOtherOpiatesIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OxyContinTakenWithOtherOpiatesIndicator, _mappingHelper))
                                           .WithOxyContinTakenWithOtherOpiatesIndicatorNote(densAsiDrugAlcoholUseDto.OxyContinTakenWithOtherOpiatesIndicatorNote)
                                           .WithAfterOxyContinFirstUseMonthCount(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.AfterOxyContinFirstUseMonthCount, _mappingHelper))
                                           .WithAfterOxyContinFirstUseMonthCountNote(densAsiDrugAlcoholUseDto.AfterOxyContinFirstUseMonthCountNote)
                                           .WithOxyContinFromFriendFamilyStreetIndicator(
                DensAsiNonResponseTypeMapper.MapToDensAsiNonResponseType(
                    densAsiDrugAlcoholUseDto.OxyContinFromFriendFamilyStreetIndicator, _mappingHelper))
                                           .WithOxyContinFromFriendFamilyStreetIndicatorNote(densAsiDrugAlcoholUseDto.OxyContinFromFriendFamilyStreetIndicatorNote)
                                           .WithSectionNote(densAsiDrugAlcoholUseDto.SectionNote)
                                           .Build();

            AggregateRoot.ReviseDensAsiDrugAlcoholUse(densAsiDrugAlcoholUseNew);

            densAsiDrugAlcoholUseDto.Key = AggregateRoot.DensAsiDrugAlcoholUse.Key;

            return(true);
        }