/// <summary> /// Initializes a new instance of the <see cref="GainShortScreenerScore" /> class. /// </summary> /// <param name="internalDisorder">The internal disorder.</param> /// <param name="externalDisorder">The external disorder.</param> /// <param name="substanceDisorder">The substance disorder.</param> /// <param name="criminalViolenceDisorder">The criminal violence disorder.</param> public GainShortScreenerScore( GainGroupScore internalDisorder, GainGroupScore externalDisorder, GainGroupScore substanceDisorder, GainGroupScore criminalViolenceDisorder) { InternalDisorder = internalDisorder; ExternalDisorder = externalDisorder; SubstanceDisorder = substanceDisorder; CriminalViolenceDisorder = criminalViolenceDisorder; TotalDisorder = new GainGroupScore( internalDisorder.PastMonth + externalDisorder.PastMonth + substanceDisorder.PastMonth + criminalViolenceDisorder.PastMonth, internalDisorder.Past90Days + externalDisorder.Past90Days + substanceDisorder.Past90Days + criminalViolenceDisorder.Past90Days, internalDisorder.PastYear + externalDisorder.PastYear + substanceDisorder.PastYear + criminalViolenceDisorder.PastYear, internalDisorder.Lifetime + externalDisorder.Lifetime + substanceDisorder.Lifetime + criminalViolenceDisorder.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); }