private void GetSubstanceDisorderScreenerScore(GainShortScreener gainShortScreener, out int pastMonth, out int past90Days, out int pastYear, out int lifetime)
        {
            var substanceDisorderGroup = gainShortScreener.TotalDisorderScreenerGroup.SubstanceDisorderScreenerGroup;
            var values = new List <LastTimeFrequency>
            {
                substanceDisorderGroup.KeptUsingAlcoholOrDrugsCausingSocialProblems,
                substanceDisorderGroup.SpentTimeGettingAlcoholOrOtherDrugs,
                substanceDisorderGroup.UsedAlcoholOrOtherDrugsWeekly,
                substanceDisorderGroup.YouHadWithdrawalProblemsFromAlcoholOrOtherDrugs,
                substanceDisorderGroup.YourUseOfAlcoholOrDrugsCauseYouToGiveUp
            };

            GetScores(values, out pastMonth, out past90Days, out pastYear, out lifetime);
        }
        private void GetCriminalViolenceScreenerScore(GainShortScreener gainShortScreener, out int pastMonth, out int past90Days, out int pastYear, out int lifetime)
        {
            var criminalViolenceGroup = gainShortScreener.TotalDisorderScreenerGroup.CrimeViolenceScreenerGroup;
            var values = new List <LastTimeFrequency>
            {
                criminalViolenceGroup.DroveUnderTheInfluenceOfAlcoholOrIllegalDrugs,
                criminalViolenceGroup.HadADisagreement,
                criminalViolenceGroup.PurposelyDamagedPropertyThatDidNotBelongToYou,
                criminalViolenceGroup.SoldDistributedOrHelpedToMakeIllegalDrugs,
                criminalViolenceGroup.TookSomethingFromAStoreWithoutPaying
            };

            GetScores(values, out pastMonth, out past90Days, out pastYear, out lifetime);
        }
        private void GetInternalDisorderScreenerScore(GainShortScreener gainShortScreener, out int pastMonth, out int past90Days, out int pastYear, out int lifetime)
        {
            var internalDisorderScreenerGroup = gainShortScreener.TotalDisorderScreenerGroup.InternalizingDisorderScreenerGroup;
            var values = new List <LastTimeFrequency>
            {
                internalDisorderScreenerGroup.BecomingVeryDistresstedAndUpsetAboutPast,
                internalDisorderScreenerGroup.FeelingVeryAnxiousNervousTenseScaredPanicked,
                internalDisorderScreenerGroup.FeelingVeryTrappedLonelySadBlueDepressedHopelessAboutFuture,
                internalDisorderScreenerGroup.SeeingOrHearingThingsNoOneElseCouldSeeOrHear,
                internalDisorderScreenerGroup.SleepTrouble,
                internalDisorderScreenerGroup.ThinkingAboutEndingYourLife
            };

            GetScores(values, out pastMonth, out past90Days, out pastYear, out lifetime);
        }
        private void GetExternalDisorderScreenerScore(GainShortScreener gainShortScreener, out int pastMonth, out int past90Days, out int pastYear, out int lifetime)
        {
            var externalDisorderScreenerGroup = gainShortScreener.TotalDisorderScreenerGroup.ExternalizingDisorderScreenerGroup;
            var values = new List <LastTimeFrequency>
            {
                externalDisorderScreenerGroup.HardTimeListening,
                externalDisorderScreenerGroup.HardTimePayingAttention,
                externalDisorderScreenerGroup.HardTimeWaitingForYourTurn,
                externalDisorderScreenerGroup.LiedOrConned,
                externalDisorderScreenerGroup.StartedPhysicalFights,
                externalDisorderScreenerGroup.TriedToWinBackGamblingLosses,
                externalDisorderScreenerGroup.WereABullyOrThreatendedOtherPeople
            };

            GetScores(values, out pastMonth, out past90Days, out pastYear, out lifetime);
        }
        /// <summary>
        ///     Calculates the score.
        /// </summary>
        /// <param name="assessment">The assessment.</param>
        public void CalculateScore(AssessmentInstance assessment)
        {
            var gainShortScreener = new GainShortScreener(assessment);
            int pastMonth, past90Days, pastYear, lifetime;

            GetInternalDisorderScreenerScore(gainShortScreener, out pastMonth, out past90Days, out pastYear, out lifetime);
            var internalizingDisorderScore = new GainGroupScore(pastMonth, past90Days, pastYear, lifetime);

            GetExternalDisorderScreenerScore(gainShortScreener, out pastMonth, out past90Days, out pastYear, out lifetime);
            var externalizingDisorderScore = new GainGroupScore(pastMonth, past90Days, pastYear, lifetime);

            GetSubstanceDisorderScreenerScore(gainShortScreener, out pastMonth, out past90Days, out pastYear, out lifetime);
            var substanceDisorderScore = new GainGroupScore(pastMonth, past90Days, pastYear, lifetime);

            GetCriminalViolenceScreenerScore(gainShortScreener, out pastMonth, out past90Days, out pastYear, out lifetime);
            var criminalViolenceScore    = new GainGroupScore(pastMonth, past90Days, pastYear, lifetime);
            var gainShortScreenerScoring = new GainShortScreenerScore(internalizingDisorderScore, externalizingDisorderScore, substanceDisorderScore, criminalViolenceScore);

            assessment.ScoreComplete(
                new CodedConcept(CodeSystems.Obhita, string.Empty, string.Empty),
                gainShortScreenerScoring,
                true);
        }