/// <summary> /// Processes the single aggregate. /// </summary> /// <param name="dto">The dto to process.</param> /// <param name="aggregateRoot">The aggregate root.</param> /// <returns>A <see cref="System.Boolean"/></returns> protected override bool ProcessSingleAggregate(GainShortScreenerDto dto, Domain.Clinical.GainShortScreenerModule.GainShortScreener aggregateRoot) { var gainShortScreenerInternalizingDisorder = new GainShortScreenerInternalizingDisorder( dto.ProblemFeelingDepressedNumber, dto.ProblemSleepingNumber, dto.ProblemFeelingAnxiousNumber, dto.ProblemBecomingDistressedNumber, dto.ProblemCommittingSuicideNumber); var gainShortScreenerExternalizingDisorder = new GainShortScreenerExternalizingDisorder( dto.TwoOrMoreLiedNumber, dto.TwoOrMoreHardTimePayingAttentionNumber, dto.TwoOrMoreHardTimeListeningNumber, dto.TwoOrMoreThreatenedOthersNumber, dto.TwoOrMoreStartedFightNumber); var gainShortScreenerSubstanceDisorder = new GainShortScreenerSubstanceDisorder( dto.LastTimeUsedAlcoholDrugsNumber, dto.LastTimeSpentALotOfTimeGettingAlcoholNumber, dto.LastTimeKeptUsingAlcoholNumber, dto.LastTimeUseAlcoholCauseYouToGiveUpNumber, dto.LastTimeHadWithdrawProblemsNumber); var gainShortScreenerCrimeViolence = new GainShortScreenerCrimeViolence( dto.LastTimeYouHadDisagreementNumber, dto.LastTimeYouTookSomethingNumber, dto.LastTimeYouSoldIllegalDrugsNumber, dto.LastTimeYouDroveUnderTheInfluenceNumber, dto.LastTimeYouPurposelyDamagedPropertyNumber, dto.SignificantProblemsSeekingTreatmentIndicator, dto.SignificantProblemsSeekingTreatmentNote); aggregateRoot.ReviseAndCalculateScores( gainShortScreenerInternalizingDisorder, gainShortScreenerExternalizingDisorder, gainShortScreenerSubstanceDisorder, gainShortScreenerCrimeViolence); return(true); }
/// <summary> /// Accepts the questionnaire's constituent sectional value types and calculates total scores. /// </summary> /// <param name="gainShortScreenerInternalizingDisorder">The gain short screener internalizing disorder.</param> /// <param name="gainShortScreenerExternalizingDisorder">The gain short screener externalizing disorder.</param> /// <param name="gainShortScreenerSubstanceDisorder">The gain short screener substance disorder.</param> /// <param name="gainShortScreenerCrimeViolence">The gain short screener crime violence.</param> public virtual void ReviseAndCalculateScores( GainShortScreenerInternalizingDisorder gainShortScreenerInternalizingDisorder, GainShortScreenerExternalizingDisorder gainShortScreenerExternalizingDisorder, GainShortScreenerSubstanceDisorder gainShortScreenerSubstanceDisorder, GainShortScreenerCrimeViolence gainShortScreenerCrimeViolence ) { _gainShortScreenerInternalizingDisorder = gainShortScreenerInternalizingDisorder; _gainShortScreenerExternalizingDisorder = gainShortScreenerExternalizingDisorder; _gainShortScreenerSubstanceDisorder = gainShortScreenerSubstanceDisorder; _gainShortScreenerCrimeViolence = gainShortScreenerCrimeViolence; // Calculate total scores. TotalScreenerPastMonthScore = _gainShortScreenerInternalizingDisorder.InternalizingDisorderScreenerPastMonthScore + _gainShortScreenerExternalizingDisorder.ExternalizingDisorderScreenerPastMonthScore + _gainShortScreenerSubstanceDisorder.SubstanceDisorderScreenerPastMonthScore + _gainShortScreenerCrimeViolence.CrimeViolenceScreenerPastMonthScore; TotalScreenerPastYearScore = _gainShortScreenerInternalizingDisorder.InternalizingDisorderScreenerPastYearScore + _gainShortScreenerExternalizingDisorder.ExternalizingDisorderScreenerPastYearScore + _gainShortScreenerSubstanceDisorder.SubstanceDisorderScreenerPastYearScore + _gainShortScreenerCrimeViolence.CrimeViolenceScreenerPastYearScore; TotalScreenerLifetimeScore = _gainShortScreenerInternalizingDisorder.InternalizingDisorderScreenerLifetimeScore + _gainShortScreenerExternalizingDisorder.ExternalizingDisorderScreenerLifetimeScore + _gainShortScreenerSubstanceDisorder.SubstanceDisorderScreenerLifetimeScore + _gainShortScreenerCrimeViolence.CrimeViolenceScreenerLifetimeScore; }