/// <summary> /// Gets the summary. /// </summary> /// <param name="gainShortScreenerScore">The gain short screener score.</param> /// <param name="patient">The patient.</param> /// <returns> /// Returns an html string for the Summary text based on the severity of each sub screener. /// </returns> private string GetSummary(GainShortScreenerScore gainShortScreenerScore, Patient patient) { var recommend = string.Empty; var returnSummary = "During the past year " + patient.Name.FirstName + " was in the " + GetScreenerSubScoreSeverity(gainShortScreenerScore.InternalDisorder.PastYear).CodedConcept.Name + " severity range on internalizing disorders; " + "the " + GetScreenerSubScoreSeverity(gainShortScreenerScore.ExternalDisorder.PastYear).CodedConcept.Name + " severity range on externalizing disorders; " + "the " + GetScreenerSubScoreSeverity(gainShortScreenerScore.SubstanceDisorder.PastYear).CodedConcept.Name + " severity range for substance use disorders; " + "and the " + GetScreenerSubScoreSeverity(gainShortScreenerScore.CriminalViolenceDisorder.PastYear).CodedConcept.Name + " severity range on the crime/violence sub-screeners. "; if (GetScreenerSubScoreSeverity(gainShortScreenerScore.InternalDisorder.PastYear).CodedConcept.Name == DiagnosisLevel.High.CodedConcept.Name || GetScreenerSubScoreSeverity(gainShortScreenerScore.ExternalDisorder.PastYear).CodedConcept.Name == DiagnosisLevel.High.CodedConcept.Name) { recommend += "<li>referral for evaluation by a mental health service provider</li>"; } if (GetScreenerSubScoreSeverity(gainShortScreenerScore.SubstanceDisorder.PastYear).CodedConcept.Name == DiagnosisLevel.High.CodedConcept.Name) { recommend += "<li>referral for evaluation by a substance abuse service provider</li>"; } if (GetScreenerSubScoreSeverity(gainShortScreenerScore.CriminalViolenceDisorder.PastYear).CodedConcept.Name == DiagnosisLevel.High.CodedConcept.Name) { recommend += "<li>referral for anger management or legal services</li>"; } if (!string.IsNullOrWhiteSpace(recommend)) { recommend = "Given " + patient.Name.FirstName + "'s self-reported information the following is recommended: <br><br><br><ul>" + recommend + "</ul>"; } return(returnSummary + recommend); }
/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="GainShortScreenerReportData" /> class. /// </summary> /// <param name="gainShortScreenerScore">The gain short screener score.</param> /// <param name="summaryReportInfo">The summary report information.</param> public GainShortScreenerReportData(GainShortScreenerScore gainShortScreenerScore, SummaryReportInfo summaryReportInfo) { InternalizingDisorder = gainShortScreenerScore.InternalDisorder; ExternalizingDisorder = gainShortScreenerScore.ExternalDisorder; SubstanceDisorder = gainShortScreenerScore.SubstanceDisorder; CriminalViolenceDisorder = gainShortScreenerScore.CriminalViolenceDisorder; TotalDisorder = gainShortScreenerScore.TotalDisorder; SummaryReportInfo = summaryReportInfo; Lifetime = new List <int> (); ((List <int>)Lifetime).AddRange( new[] { gainShortScreenerScore.InternalDisorder.Lifetime, gainShortScreenerScore.ExternalDisorder.Lifetime, gainShortScreenerScore.SubstanceDisorder.Lifetime, gainShortScreenerScore.CriminalViolenceDisorder.Lifetime }); PastMonth = new List <int> (); ((List <int>)PastMonth).AddRange( new[] { gainShortScreenerScore.InternalDisorder.PastMonth, gainShortScreenerScore.ExternalDisorder.PastMonth, gainShortScreenerScore.SubstanceDisorder.PastMonth, gainShortScreenerScore.CriminalViolenceDisorder.PastMonth }); TwoToThreeMonths = new List <int> (); ((List <int>)TwoToThreeMonths).AddRange( new[] { gainShortScreenerScore.InternalDisorder.Past90Days - gainShortScreenerScore.InternalDisorder.PastMonth, gainShortScreenerScore.ExternalDisorder.Past90Days - gainShortScreenerScore.ExternalDisorder.PastMonth, gainShortScreenerScore.SubstanceDisorder.Past90Days - gainShortScreenerScore.SubstanceDisorder.PastMonth, gainShortScreenerScore.CriminalViolenceDisorder.Past90Days - gainShortScreenerScore.CriminalViolenceDisorder.PastMonth }); FourToTwelveMonths = new List <int> (); ((List <int>)FourToTwelveMonths).AddRange( new[] { gainShortScreenerScore.InternalDisorder.PastYear - gainShortScreenerScore.InternalDisorder.Past90Days, gainShortScreenerScore.ExternalDisorder.PastYear - gainShortScreenerScore.ExternalDisorder.Past90Days, gainShortScreenerScore.SubstanceDisorder.PastYear - gainShortScreenerScore.SubstanceDisorder.Past90Days, gainShortScreenerScore.CriminalViolenceDisorder.PastYear - gainShortScreenerScore.CriminalViolenceDisorder.Past90Days }); MoreThenOneYear = new List <int> (); ((List <int>)MoreThenOneYear).AddRange( new[] { gainShortScreenerScore.InternalDisorder.Lifetime - gainShortScreenerScore.InternalDisorder.PastYear, gainShortScreenerScore.ExternalDisorder.Lifetime - gainShortScreenerScore.ExternalDisorder.PastYear, gainShortScreenerScore.SubstanceDisorder.Lifetime - gainShortScreenerScore.SubstanceDisorder.PastYear, gainShortScreenerScore.CriminalViolenceDisorder.Lifetime - gainShortScreenerScore.CriminalViolenceDisorder.PastYear }); TotalLifetime = new List <int> { gainShortScreenerScore.TotalDisorder.Lifetime }; TotalPastMonth = new List <int> { gainShortScreenerScore.TotalDisorder.PastMonth }; TotalTwoToThreeMonths = new List <int> { gainShortScreenerScore.TotalDisorder.Past90Days - gainShortScreenerScore.TotalDisorder.PastMonth }; TotalFourToTwelveMonths = new List <int> { gainShortScreenerScore.TotalDisorder.PastYear - gainShortScreenerScore.TotalDisorder.Past90Days }; TotalMoreThenOneYear = new List <int> { gainShortScreenerScore.TotalDisorder.Lifetime - gainShortScreenerScore.TotalDisorder.PastYear }; }