Esempio n. 1
0
        public static String GenerateDataProfile(long surveysResultId, List<SurveysAnswerContent> surveysAnswerContents)
        {
            using (var conclusionRepository = new BaseRepository<Conclusion>())
            {
                SurveysResult surveysResult =
                    conclusionRepository.Context.SurveysResults.FirstOrDefault(x => x.Id == surveysResultId);
                if (surveysResult == null)
                {
                    throw new SurveysResultDoesNotExistException();
                }

                String answerStr = String.Empty;

                Test test = conclusionRepository.Context.Tests.FirstOrDefault(x => x.Id == surveysResult.MethodsId);
                Person person = conclusionRepository.Context.Persons.FirstOrDefault(x => x.Id == surveysResult.Person.Id);

                // for KOT
                //if (String.Equals(test.CodeName, Constraints.KKotCodeName))
                //{
                //    // Get answer str from SurveyShellResult.Answer
                //    SurveysShellResult shellResult =
                //        conclusionRepository.Context.SurveysShellResults.FirstOrDefault(
                //            x => x.SurveyResultId == surveysResultId);
                //    if (shellResult != null)
                //    {
                //        answerStr = shellResult.Answer;
                //    }
                //}
                //else
                //{
                    answerStr = ResultConverter.GenerateAnswerString(test.CodeName, surveysAnswerContents);
                //}

                // Form profile string
                String profile = String.Empty;
                switch (test.CodeName)
                {
                    case Constraints.KKettel16ACodeName:
                    case Constraints.KKettel16BCodeName:
                        KettelMethod kettel = new KettelMethod(person.Gender, person.BirthDate.Value, answerStr);
                        kettel.CreateProfile();
                        KettelOutput kettelOutput = new KettelOutput();
                        kettelOutput.CreateOutputJson(kettel);
                        profile = JsonHelper.JsonSerializer<KettelOutput>(kettelOutput);
                        break;

                    case Constraints.KSelfAppraisalCodeName:
                        SelfAppraisalMethod selfAppraisal = new SelfAppraisalMethod(answerStr);
                        selfAppraisal.CreateProfile();
                        SelfAppraisalOutput selfAppraisalOutput = new SelfAppraisalOutput();
                        selfAppraisalOutput.CreateOutputJson(selfAppraisal);
                        profile = JsonHelper.JsonSerializer<SelfAppraisalOutput>(selfAppraisalOutput);
                        break;

                    case Constraints.KSondiCodeName:
                        SondiMethod sondi = new SondiMethod(answerStr);
                        sondi.CreateProfile();
                        sondi.CreateFormulaAffection();
                        sondi.CreateDMFactor();
                        sondi.CreateSocialityFactor();
                        SondiOutput sondiOutput = new SondiOutput();
                        sondiOutput.CreateOutputJson(sondi);
                        profile = JsonHelper.JsonSerializer<SondiOutput>(sondiOutput);
                        break;

                    case Constraints.KKotCodeName:
                        KotMethod kot = new KotMethod(answerStr);
                        kot.CreateProfile();
                        KotOutput kotOutput = new KotOutput();
                        kotOutput.CreateOutputJson(kot);
                        profile = JsonHelper.JsonSerializer<KotOutput>(kotOutput);
                        break;

                    case Constraints.KShutzCodeName:
                        ShutzMethod shutz = new ShutzMethod(answerStr);
                        shutz.CreateProfile();
                        ShutzOutput shutzOutput = new ShutzOutput();
                        shutzOutput.CreateOutputJson(shutz);
                        profile = JsonHelper.JsonSerializer<ShutzOutput>(shutzOutput);
                        break;

                    case Constraints.KLusherPairCodeName:
                        profile = LusherPairMethod.GetColorString(answerStr);
                        break;

                    case Constraints.KMmpiCodeName:
                        MmpiMethod mmpi = new MmpiMethod(answerStr, person.Gender);
                        mmpi.CreateProfile();
                        profile = mmpi.CutProfileStr;
                        break;

                    default:
                        break;
                }

                // Save profile in Conclusion.Data
                Service service =
                    conclusionRepository.Context.Services.FirstOrDefault(
                        x =>
                        x.MethodsId == surveysResult.MethodsId &&
                        String.Equals(x.MethodsType, surveysResult.MethodsType) &&
                        String.Equals(x.ConclusionType.Code, Constraints.KConclusionTypeProfile));

                if (service != null)
                {
                    Conclusion conclusion =
                        conclusionRepository.GetAllItems.FirstOrDefault(
                            x => x.SurveysResult.Id == surveysResultId && x.Service.Id == service.Id);
                    conclusion.Data = profile;
                    if (!conclusionRepository.Update(conclusion).Status)
                    {
                        throw new UpdateException();
                    }
                }
                return profile;
            }
        }
Esempio n. 2
0
        public Object GenerateProfile(Guid resultId)
        {
            using (var resultRepo = new BaseRepository<Result>())
            {
                var result = resultRepo.GetAllItems.FirstOrDefault(x => x.Id == resultId);
                if (result == null)
                {
                    throw new ResultDoesNotExistException();
                }

                var user = _resultRepository.GetUserByResult(resultId);
                var test = _resultRepository.GetTestByResult(resultId);
                var resultItems = _resultRepository.GetResultItemsByResult(resultId);
                var shellResult = _resultRepository.GetShellResultByResult(resultId);

                #region not need now

                var profileFounded = resultRepo.Context.Profiles.FirstOrDefault(x => x.Id == resultId);
                if (profileFounded == null)
                {
                    //String profileStr = @"<p>КОММУНИКАТИВНАЯ СФЕРА</p><p>Преимущественное открытое, дружеское общение с окружающими, навыки общения развиты достаточно. Стремление к активности, доминированию среди сверстников. Настойчивость в достижении поставленной цели. Уверенность в своей правоте. В значимых для себя ситуациях возможно проявление упрямства. Стремление к популярности в окружении. Достаточная высокая самоуверенность.</p><p>ЭМОЦИОНАЛЬНО-ВОЛЕВАЯ СФЕРА</p><p>Воображение недостаточно развито, мышление в основном конкретное, возможны трудности в ситуациях требующих абстрактного мышления. Возможны проявления капризности, непостоянства в значимых для себя ситуациях. Стремление уклониться от трудностей. Недостаточное постоянство в отношениях и интересах. Действия могут опережать их продуманность. Наивность, затруднения в планировании своего поведения в сочетании со стремлением уклониться от повседневных проблем и трудностей создают картину психического инфантилизма. Зависимость от сверстников, поспешность в решениях. Возможна излишняя сентиментальность. Некоторое сужение поля восприятия. Уверенность в правильности своих действий, снижение процессов рефлексии, ослабление процессов целеполагания, трудности в формировании мотивации обучения. Неудовлетворенность своим положением в группе сверстников, сочетаясь с ощущением давления со стороны семейного круга создает предиспозицию для отклонений в поведении.</p>";
                    String profileStr = @"<p>Идет интерпретация</p>";

                    //==============================

                    //Create Folder and txt info file
                    var directoryName = user.Id + "_" + test.CodeName + "_" + result.TestDate.ToString("dd.MM.yyyy_HH.mm.ss");
                    var directory = Constraints.KInterpretationDirectoryPath + directoryName;
                    try
                    {
                        // Determine whether the directory not exists.
                        if (!Directory.Exists(directory))
                        {
                            // Try to create the directory.
                            Directory.CreateDirectory(directory);
                        }
                    }
                    catch (Exception)
                    {
                        throw new DirectoryNotFoundException();
                    }

                    try
                    {
                        // Create txt file info
                        var fileName = @"\info.txt";
                        var fileInfo = new FileInfo(directory + fileName);

                        if (!fileInfo.Exists)
                        {
                            //Create a file to write to.
                            using (var streamWriter = fileInfo.CreateText())
                            {
                                streamWriter.WriteLine("===========================");
                                streamWriter.WriteLine("ResultId: " + resultId);
                                streamWriter.WriteLine("===========================");
                                streamWriter.Write(user.ToString());
                                streamWriter.WriteLine();
                                streamWriter.WriteLine("===========================");
                                streamWriter.Write(test.ToString());
                                streamWriter.WriteLine("===========================");
                                streamWriter.WriteLine(result.TestDate.ToString());
                                streamWriter.WriteLine("===========================");

                                //var shellResult = resultRepo.Context.ShellResults.FirstOrDefault(x => x.ResultId == resultId);

                                //if (shellResult == null)
                                //{
                                //    throw new ResultDoesNotExistException();
                                //}
                                streamWriter.WriteLine("Method_ID in consul: " + shellResult.MethodId);
                                streamWriter.WriteLine("===========================");
                                streamWriter.WriteLine(shellResult.Answer);
                                streamWriter.WriteLine("===========================");
                                streamWriter.WriteLine(shellResult.Answer.Replace(" ", null));

                                streamWriter.Close();
                            }
                        }
                    }
                    catch (Exception)
                    {
                        throw new FileWriteException();
                    }

                    // Create OldUser and Result in ConsulDB
                    //WriteUserResultInConsul(result, OldUser, test, shellResult);

                    // Create profile in DB
                    var profile = new Profile
                    {
                        Body = profileStr,
                        Id = resultId,
                        ImageDirectory = directoryName,

                    };
                    result.Profile = profile;

                    if (!resultRepo.Update(result).Status)
                    {
                        throw new UpdateException();
                    }
                }

                #endregion

                // Form profile
                Object body = new object();
                switch (test.CodeName)
                {
                    case Constraints.KKettel16ACodeName:
                    case Constraints.KKettel16BCodeName:
                        KettelMethod kettel = new KettelMethod();
                        kettel.CreateProfile();
                        KettelOutput kettelOutput = new KettelOutput();
                        body = kettelOutput.CreateOutputJson(kettel);
                        break;

                    case Constraints.KSelfAppraisalCodeName:
                        SelfAppraisalMethod selfAppraisal = new SelfAppraisalMethod(shellResult.Answer);
                        selfAppraisal.CreateProfile();
                        SelfAppraisalOutput selfAppraisalOutput = new SelfAppraisalOutput();
                        body = selfAppraisalOutput.CreateOutputJson(selfAppraisal);
                        break;

                    case Constraints.KSondiCodeName:
                        // Convert to 1 2 3 4 5 6 7 8 ... answer str
                        ResultConverter converter = new ResultConverter(user, test, resultItems);
                        var answers = converter.FormAnswers(false);
                        SondiMethod sondi = new SondiMethod(answers);
                        sondi.CreateProfile();
                        sondi.CreateFormulaAffection();
                        sondi.CreateDMFactor();
                        sondi.CreateSocialityFactor();
                        SondiOutput sondiOutput = new SondiOutput();
                        body = sondiOutput.CreateOutputJson(sondi);
                        break;

                    case Constraints.KKotCodeName:
                        KotMethod kot = new KotMethod(shellResult.Answer);
                        kot.CreateProfile();
                        KotOutput kotOutput = new KotOutput();
                        body = kotOutput.CreateOutputJson(kot);
                        break;
                    default:
                        break;

                    case Constraints.KShutzCodeName:
                        ShutzMethod shutz = new ShutzMethod(shellResult.Answer);
                        shutz.CreateProfile();
                        ShutzOutput shutzOutput = new ShutzOutput();
                        body = shutzOutput.CreateOutputJson(shutz);
                        break;

                    case Constraints.KMmpiCodeName:
                        MmpiMethod mmpi = new MmpiMethod(shellResult.Answer, false);
                        mmpi.CreateProfile();
                        body = mmpi.CutProfileStr;
                        break;

                }

                GeneralProfile generalProfile = new GeneralProfile
                                          {
                                              Id = resultId,
                                              PersonId = user.Id,
                                              TestId = test.Id,
                                              TestDate = result.TestDate,
                                              Body = body
                                          };
                return generalProfile;

            }
            return null;
        }
Esempio n. 3
0
        // MIGRATION OLD DATA!!!
        public static bool MigrateOldData(long fromId, long toId)
        {
            using (var surveysRepository = new BaseRepository<SurveysShellResult>())
            {
                List<SurveysShellResult> surveysShellResults =
                    surveysRepository.GetAllItems.Where(x => x.SurveyResultId >= fromId && x.SurveyResultId <= toId).
                        ToList();
                if (surveysShellResults == null)
                {
                    return false;
                }
                if (surveysShellResults.Count == 0)
                {
                    return false;
                }

                foreach (var surveysShellResult in surveysShellResults)
                {

                    Person person =
                        surveysRepository.Context.Persons.FirstOrDefault(x => x.Id == surveysShellResult.PersonId);
                    if (person == null)
                    {
                        continue;
                    }

                    Test test = surveysRepository.Context.Tests.FirstOrDefault(x => x.Id == surveysShellResult.MethodsId);
                    if (test == null)
                    {
                        continue;
                    }
                    String answerStr = surveysShellResult.Answer;

                    // Form profile string
                    String profile = String.Empty;
                    switch (test.CodeName)
                    {
                        case Constraints.KKettel16ACodeName:
                        case Constraints.KKettel16BCodeName:
                            KettelMethod kettel = new KettelMethod(person.Gender, person.BirthDate.Value, answerStr);
                            kettel.CreateProfile();
                            KettelOutput kettelOutput = new KettelOutput();
                            kettelOutput.CreateOutputJson(kettel);
                            profile = JsonHelper.JsonSerializer<KettelOutput>(kettelOutput);
                            break;

                        case Constraints.KSelfAppraisalCodeName:
                            SelfAppraisalMethod selfAppraisal = new SelfAppraisalMethod(answerStr);
                            selfAppraisal.CreateProfile();
                            SelfAppraisalOutput selfAppraisalOutput = new SelfAppraisalOutput();
                            selfAppraisalOutput.CreateOutputJson(selfAppraisal);
                            profile = JsonHelper.JsonSerializer<SelfAppraisalOutput>(selfAppraisalOutput);
                            break;

                        case Constraints.KSondiCodeName:
                            List<SurveysAnswer> answerItems =
                                surveysRepository.Context.SurveysAnswers.Where(
                                    x => x.SurveysResult.Id == surveysShellResult.SurveyResultId).ToList();
                            answerStr = ResultConverter.GenerateSondiAnswerString(answerItems);
                            SondiMethod sondi = new SondiMethod(answerStr);
                            sondi.CreateProfile();
                            sondi.CreateFormulaAffection();
                            sondi.CreateDMFactor();
                            sondi.CreateSocialityFactor();
                            SondiOutput sondiOutput = new SondiOutput();
                            sondiOutput.CreateOutputJson(sondi);
                            profile = JsonHelper.JsonSerializer<SondiOutput>(sondiOutput);
                            break;

                        case Constraints.KKotCodeName:
                            KotMethod kot = new KotMethod(answerStr);
                            kot.CreateProfile();
                            KotOutput kotOutput = new KotOutput();
                            kotOutput.CreateOutputJson(kot);
                            profile = JsonHelper.JsonSerializer<KotOutput>(kotOutput);
                            break;

                        case Constraints.KShutzCodeName:
                            ShutzMethod shutz = new ShutzMethod(answerStr);
                            shutz.CreateProfile();
                            ShutzOutput shutzOutput = new ShutzOutput();
                            shutzOutput.CreateOutputJson(shutz);
                            profile = JsonHelper.JsonSerializer<ShutzOutput>(shutzOutput);
                            break;

                        case Constraints.KLusherPairCodeName:
                            profile = LusherPairMethod.GetColorString(answerStr);
                            break;

                        case Constraints.KMmpiCodeName:
                            MmpiMethod mmpi = new MmpiMethod(answerStr, person.Gender);
                            mmpi.CreateProfile();
                            profile = mmpi.CutProfileStr;
                            break;

                        default:
                            break;
                    }

                    // Save profile in Conclusion.Data
                    Service service =
                        surveysRepository.Context.Services.FirstOrDefault(
                            x =>
                            x.MethodsId == surveysShellResult.MethodsId &&
                            String.Equals(x.ConclusionType.Code, Constraints.KConclusionTypeProfile));

                    if (service != null)
                    {
                        Conclusion conclusion =
                            surveysRepository.Context.Conclusions.FirstOrDefault(
                                x => x.SurveysResult.Id == surveysShellResult.SurveyResultId && x.Service.Id == service.Id);
                        if (conclusion == null)
                        {
                            Console.WriteLine("no conclusion with surveys id = " + surveysShellResult.SurveyResultId);
                            continue;
                        }
                        conclusion.Data = profile;
                        surveysRepository.Context.Entry(conclusion).State = EntityState.Modified;
                    }

                }
                surveysRepository.Context.SaveChanges();
                return true;
            }
        }
Esempio n. 4
0
        private static void Main(string[] args)
        {
            //int[] iArrAnswers = new int[]{1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 3, 3, 3, 3, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 3, 1,
            //    1, 1, 3, 3, 1, 1, 3, 3, 3, 3, 1, 3, 1, 3, 1, 2, 2, 1, 3, 3, 3, 3, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 3, 1, 3, 1, 1, 1, 1, 3, 3, 3, 2, 3, 3, 3,
            //    3, 3, 3, 1, 3, 3, 3, 1, 1, 3, 3, 3, 1, 3, 1, 3, 1, 3, 3, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 3, 3, 3, 1, 3, 2, 3,
            //    3, 3, 3, 3, 3, 1, 1, 3, 1, 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 3, 1, 1, 3, 1, 3, 1, 3, 3, 1, 1, 1, 3, 3, 1, 1, 3, 1, 1, 1, 3,
            //    3, 3, 1, 3, 1, 1, 3, 3, 3, 1, 1, 1, 1 };

            //var answers =
            //    "1 1 1 1 3 1 3 1 3 3 3 1 1 1 3 3 3 3 1 1 3 1 3 2 1 3 2 2 3 1 2 3 1 1 3 2 3 3 3 3 1 1 2 2 2 1 3 2 1 3 3 1 2 3 1 3 2 3 3 1 3 3 1 1 1 1 3 1 2 3 3 2 1 3 2 3 3 2 3 3 3 3 1 3 3 2 2 3 2 3 3 1 2 3 3 1 2 3 3 1 1 3 2 1 1 1 1 2 1 1 1 1 3 1 1 1 2 1 1 1 3 1 3 2 3 1 3 2 3 2 1 3 3 2 1 1 1 1 1 1 2 1 3 1 3 2 3 3 2 3 3 1 3 3 1 2 1 1 1 1 3 1 3 1 1 2 1 3 3 3 1 3 1 3 1 1 1 2 2 3 1 3 2 2 1 2 1 ";

            //var answers2 =
            //    "1 1 3 1 3 1 3 3 1 1 3 2 1 3 1 1 3 3 2 2 3 1 3 1 3 3 3 2 1 1 1 3 1 2 3 1 3 2 2 1 1 3 1 2 3 3 2 2 3 1 3 1 2 2 1 2 2 2 3 1 2 3 1 3 3 1 1 1 1 1 3 3 1 2 1 3 3 3 3 3 3 3 1 3 3 2 3 1 1 3 3 2 3 3 3 2 2 2 3 1 1 2 2 3 1 1 2 1 2 1 1 1 1 1 3 3 1 2 1 1 3 3 3 3 2 2 3 2 3 1 1 2 3 3 1 1 2 1 3 2 1 3 3 3 3 1 3 3 2 3 1 1 3 3 1 3 3 2 1 3 2 2 1 1 2 3 1 2 3 3 2 3 1 2 3 1 1 2 2 1 3 2 1 3 1 1 1 ";

            //// Female 0 - 18
            //var user = new OldUser {Gender = false, BirthDate = DateTime.Now.AddYears(-13)};

            //KettelMethod kettel = new KettelMethod(user, answers);
            //kettel.CreateProfile();

            ////var str = kettel.FormProfileString();
            ////Console.WriteLine(str);

            //var str2 =
            //    "A:10, B:10, C:10, E:7, F:1, G:6, H:8, I:6, L:3, M:6, N:6, O:5, Q1:7, Q2:4, Q3:8, Q4:4, F1:2, F2:7, F3:4, F4:4.";
            //var ketteFromStr = KettelMethod.FormKettelFormAMethodFromString(str2);

            //foreach (var arrAnswer in kettel.dictAnswers)
            //{
            //    Console.Write(arrAnswer.Key + ":" + arrAnswer.Value + " ");
            //}
            //Console.WriteLine();
            //Console.WriteLine("============================");
            //foreach (var arrAnswer in kettel.dictAnswerPoints)
            //{
            //    Console.WriteLine(arrAnswer.Key + ":" + arrAnswer.Value + " ");
            //}
            //Console.WriteLine();
            //Console.WriteLine("============================");
            //foreach (var arrAnswer in kettel.dictAnswerFinalPoints)
            //{
            //    Console.WriteLine(arrAnswer.Key + ":" + arrAnswer.Value + " ");
            //}
            //Console.WriteLine();
            //Console.WriteLine("============================");
            //foreach (var arrAnswer in kettel.dictAnswerSecondaryFactorPoints)
            //{
            //    Console.WriteLine(arrAnswer.Key + ":" + arrAnswer.Value + " ");
            //}

            // SelfAppraisal

            //var sfAnswers = "10 6 6 3 7 3 1 1 1 8 3 3 4 10 5 10 ";
            //SelfAppraisalMethod sfAppr = new SelfAppraisalMethod(sfAnswers);
            //sfAppr.CreateProfile();
            //Console.WriteLine(sfAnswers);

            //foreach (var i in sfAppr.dictAnswerFinalPoints)
            //{
            //    Console.WriteLine(i.Key + ":" + i.Value);
            //}

            // Sondi

            var snAnswers =
                "1 5 8 4 7 6 3 2 " +
                "7 5 4 3 6 1 8 2 " +
                "1 7 4 6 5 3 8 7 " +
                "6 2 8 3 5 1 4 7 " +
                "8 1 3 4 6 5 7 2 " +
                "2 1 3 4 6 5 8 7 ";

            //  "1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 ";
            // SondiMethod sondi = new SondiMethod(snAnswers);
            //var arrAnswers = sondi.ConvertAnswersString();
            //foreach (var arrAnswer in arrAnswers)
            //{
            //    Console.Write(arrAnswer + " ");
            //}
            // sondi.Initialize();
            //sondi.ConvertAnswersString();
            // sondi.CreateProfile();
            //foreach (var arrFrontAnswer in sondi.ArrFrontAnswers)
            //{
            //    Console.Write(arrFrontAnswer + " ");
            //}
            //Console.WriteLine();
            //Console.WriteLine();
            //foreach (var arrBackAnswer in sondi.ArrBackAnswers)
            //{
            //    Console.Write(arrBackAnswer + " ");
            //}
            //Console.WriteLine(sondi.FrontTable);
            //Console.WriteLine();
            //Console.WriteLine();
            //Console.WriteLine(sondi.BackTable);
            //Console.WriteLine();
            //sondi.CreateFormulaAffection();
            //sondi.CreateDMFactor();
            //sondi.CreateSocialityFactor();
            //Console.WriteLine("D : M = " + sondi.DFactor + " : " + sondi.MFactor);
            //Console.WriteLine("SOC+ : SOC- = " + sondi.SocPlFactor + " : " + sondi.SocMnFactor);
            //Console.WriteLine("SOC% = " + sondi.SocPctFactor);
            //Console.ReadLine();

            //String s = "'3:2;4' '10:WW' '11:2' '13:3' ";
            //String[] arr = s.Split(new char[]{'\'',' '});
            //foreach (var item in arr)
            //{
            //    if (item.Trim() != "")
            //    {
            //        Console.WriteLine(item);
            //    }
            //}

            //String s2 = "0.89";
            //s2 = s2.Replace('.', ',');
            //Console.WriteLine(s2);

            // Kot
            //String kotAnswer =
            //    "'1:3' '2:3' '3:2;4' '4:1' '5:4' '6:2' '7:4' '8:1' '9:5' '10:40' '11:3' '12:270' '13:4' '14:3' '15:5' '16:4' '17:4' '18:4' '19:3' '20:2' '21:3;5' '22:31' '23:2' '24:1' '25:1500' '26:1' '27:1' '28:1' '29:5' '30:3' '31:1600' '32:1;2;4' '33:18' '34:3' '35:1' '36:1' '37:0,48' '38:1' '39:20' '40:1/8' '41:3' '42:14' '43:1' '44:800' '45:1/10' '46:280' '47:4;5' '48:1' '49:3' '50:17'";
            //KotMethod kotMethod = new KotMethod(kotAnswer);
            //kotMethod.CreateProfile();

            //foreach (var dictSkillPoint in kotMethod.DictSkillPoints)
            //{
            //    Console.WriteLine(dictSkillPoint.Key + " " + dictSkillPoint.Value);
            //}
            //Console.WriteLine();

            //// Shutz
            //String shutzAnswer =
            //    " 3  4  5  6  3  2  4  5  1  1  1  1  2  3  4  4  4  5  5  6  4  5  3  2  1  3  4  5  6  6  6  5  5  5  4  4  3  3  2  3  2  3  5  4  1  2  2  2  3  3  4  5  5  5 ";
            //ShutzMethod shutzMethod = new ShutzMethod(shutzAnswer);
            //shutzMethod.CreateProfile();

            //foreach (var dictKeyPoint in shutzMethod.DictKeyPoints)
            //{
            //    Console.WriteLine(dictKeyPoint.Key + " " + dictKeyPoint.Value);
            //}
            int counter = 1;
            //for (int i = 0; i < 8; i++)
            //{
            //    int k = i + 1;
            //    while (k < 8)
            //    {
            //        Console.WriteLine("{0} : {1} - {2}", counter++, i, k++);
            //    }
            //}

            //LusherPair
            String lusherPairAnswerStr =
                "3,1,1 " +
                "1,2,2 " +
                "0,4,0 " +
                "4,5,4 " +
                "6,5,6 " +
                "6,2,6 " +
                "3,5,3 " +
                "7,2,7 " +
                "1,5,5 " +
                "3,7,3 " +
                "5,0,0 " +
                "1,6,6 " +
                "2,4,4 " +
                "0,3,3 " +
                "0,2,0 " +
                "4,6,4 " +
                "6,0,0 " +
                "5,2,5 " +
                "7,1,1 " +
                "1,0,0 " +
                "1,4,4 " +
                "2,3,3 " +
                "4,7,4 " +
                "6,3,3 " +
                "7,5,5 " +
                "0,7,7 " +
                "6,7,7 " +
                "4,3,3 " +
                "6,5,7,5";               // special

            //List<int> lusherPairNumbers = LusherPairMethod.CheckAnswers(lusherPairAnswerStr);
            //if (lusherPairNumbers != null)
            //{
            //    foreach (var lusherPairNumber in lusherPairNumbers)
            //    {
            //        Console.Write(lusherPairNumber + "\t");
            //    }
            //}

            //Console.WriteLine();
            //Console.WriteLine(LusherPairMethod.GetColorString(lusherPairAnswerStr));

            // MIGRATION!!!!!!!!!!!!!!!!

            //Console.WriteLine("SurveysResult Result Id from = ");
            //long fromId = Convert.ToInt64(Console.ReadLine());
            //Console.WriteLine("SurveysResult Result Id to = ");
            //long toId = Convert.ToInt64(Console.ReadLine());

            //Console.WriteLine("Begin...");
            //try
            //{
            //    if (ConclusionRepository.MigrateOldData(fromId, toId))
            //    {
            //        Console.WriteLine("Migrated");
            //    }
            //    else
            //    {
            //        Console.WriteLine("Not migrated");
            //    }
            //}
            //catch (Exception exception)
            //{

            //    Console.WriteLine(exception.Message);
            //    Console.WriteLine(exception.StackTrace);
            //}

            //MMPI

            String mmpiAnswer =

                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " + // 100

                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " + // 200

                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " + // 300

                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 " +
                "1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 2 2 1 1 2";//377

            MmpiMethod mmpiMethod = new MmpiMethod(mmpiAnswer, true);
            mmpiMethod.CreateProfile();

            foreach (var keyPoint in mmpiMethod.DictKeyPoints)
            {
                Console.WriteLine("{0} : {1}",keyPoint.Key, keyPoint.Value);
            }
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine();
            foreach (var keyPoint in mmpiMethod.DictFinalPoints)
            {
                Console.WriteLine("{0} : {1}", keyPoint.Key, keyPoint.Value);
            }
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine(mmpiMethod.ProfileStr);
            Console.WriteLine(mmpiMethod.CutProfileStr);
        }