public static void UpdateSisCScores(IFormsRepository formsRepo, int formResultId, int ageInYears)
        {
            def_Forms frm = formsRepo.GetFormByIdentifier("SIS-C");

            SharedScoring.UpdateSisScoresNoSave
            (
                formsRepo, frm, formResultId,
                getSisCSubscaleCatagories(),
                (int totalRawScore, double avgRawScore, SubscaleCatagory cat) => { return(GetSisCSubscaleStandardScore(avgRawScore, cat, ageInYears)); },
                (int totalRawScore, double avgRawScore, SubscaleCatagory cat) => { return(GetSisCSubscalePercentile(avgRawScore, cat, ageInYears)); }
            );

            def_ResponseVariables rv = formsRepo.GetResponseVariablesByFormResultIdentifier(formResultId, "scr_total_rating");
            double totalRating       = Convert.ToDouble(rv.rspValue);
            double meanRating        = Math.Round(totalRating / 7, 2); //usd only for SIS-C reports

            //save standard scores to database
            double compositeIndex      = GetSisCSupportNeedsIndex(meanRating, ageInYears);
            double compositePercentile = GetSisCSupportNeedsPercentile(meanRating, ageInYears);

            SharedScoring.UpdateScoreResponseNoSave(formsRepo, formResultId, "scr_support_needs_index", compositeIndex);
            SharedScoring.UpdateScoreResponseNoSave(formsRepo, formResultId, "scr_sni_percentile_rank", compositePercentile);

            formsRepo.Save();
        }
示例#2
0
        public static void UpdateSisAScores(IFormsRepository formsRepo, int formResultId)
        {
            try
            {
                def_Forms frm = formsRepo.GetFormByIdentifier("SIS-A");
                int       standardScoreTotal = SharedScoring.UpdateSisScoresNoSave
                                               (
                    formsRepo, frm, formResultId,
                    getSisASubscaleCatagories(),
                    (int totalRawScore, double avgRawScore, SubscaleCatagory cat) => { return(GetSisASubscaleStandardScore(totalRawScore, cat)); },
                    (int totalRawScore, double avgRawScore, SubscaleCatagory cat) => { return(GetSisASubscalePercentile(totalRawScore, cat)); }
                                               );

                //save standard scores to database
                int compositeIndex      = GetSisASupportNeedsIndex(standardScoreTotal);
                int compositePercentile = GetSisASupportNeedsPercentile(standardScoreTotal);
                SharedScoring.UpdateScoreResponseNoSave(formsRepo, formResultId, "scr_support_needs_index", compositeIndex);
                SharedScoring.UpdateScoreResponseNoSave(formsRepo, formResultId, "scr_sni_percentile_rank", compositePercentile);
                formsRepo.Save();
            }
            catch (Exception xcptn)
            {
                Debug.WriteLine("UpdateSisAScores exception: " + xcptn.Message);
            }
        }
示例#3
0
        override public void BuildReport()
        {
            int ageInYears = SharedScoring.ComputeClientAgeInYears(formsRepo, formResultId);

            PrintProfilePage(output, ageInYears);

            foreach (def_FormParts fp in formResults.def_Forms.def_FormParts)
            {
                output.appendPageBreak();
                AppendPartHeader(output, fp.def_Parts.identifier);
                foreach (def_Sections sct in formsRepo.GetSectionsInPart(fp.def_Parts))
                {
                    //skip the profile section
                    if (sct.identifier.Equals("Profile"))
                    {
                        continue;
                    }

                    PrintGenericSection(output, sct, 1);
                }
            }
        }
示例#4
0
        override public void BuildReport()
        {
            int ageInYears = SharedScoring.ComputeClientAgeInYears(formsRepo, formResultId);

            PrintProfilePage(output, ageInYears);
            output.appendPageBreak();

            PrintSupportNeedsGraph(output, ageInYears);
            output.appendPageBreak();

            PrintIntroPage(output);
            output.appendPageBreak();

            output.drawY -= PdfOutput.itemSpacing;
            PrintSupplementalProtectionAndAdvocacyScale(output);
            output.appendPageBreak();

            PrintExceptionalMedicalNeeds(output);
            output.appendPageBreak();

            PrintSupplementalQuestions(output);
        }