Example #1
0
        private void OabResult_Load(object sender, EventArgs e)
        {
            try
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.Oab);

                //如果本地问卷记录为空,则从数据库取数据
                if (questionnaireUserDetail == null)
                {
                    questionnaireUserDetail = screenWebapiClient.GetQuestionnaireUserDetailById(Properties.Settings.Default.QuestionnaireRecodId);
                    if (questionnaireUserDetail != null)
                    {
                        questionnaireUserDetail.Questions = screenWebapiClient.GetQuestionnaireResultDetails(questionnaireUserDetail.QuestionnaireRecodId);
                    }
                }

                //问卷答题时间
                answerTime = questionnaireUserDetail != null ? questionnaireUserDetail.AnswerTime : DateTime.Now;

                //将游客的结果保存为xml
                if (LoginInfo.GetInstance().Name.Equals(""))
                {
                    if (questionnaireUserDetail != null && questionnaireUserDetail.Questions != null &&
                        questionnaireUserDetail.Questions.Any())
                    {
                        string number = Properties.Settings.Default.ScreenNumber.ToString();
                        switch (number.Length)
                        {
                        case 1:
                            number = "000" + number;
                            break;

                        case 2:
                            number = "00" + number;
                            break;

                        case 3:
                            number = "0" + number;
                            break;
                        }
                        SaveXml saveXml = new SaveXml();
                        saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                        //显示游客编号
                        lblVisitor.Text   += number;
                        lblVisitor.Visible = true;
                    }
                }

                //将登录人与活动关联
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new CottageActivityManager().AddPToCActivity();
                }

                //计算得分(1-5题不记分数)
                //总分
                decimal score = 0;
                //尿急得分
                decimal eightScore = 0;

                //第六题
                string answer6 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Oab, QuestionnaireCode.Oab + ".6");
                if (answer6.Contains("B"))
                {
                    score += 1;
                }
                if (answer6.Contains("C"))
                {
                    score += 2;
                }

                //第七题
                string answer7 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Oab, QuestionnaireCode.Oab + ".7");
                if (answer7.Contains("B"))
                {
                    score += 1;
                }
                if (answer7.Contains("C"))
                {
                    score += 2;
                }
                if (answer7.Contains("D"))
                {
                    score += 3;
                }

                //第八题
                string answer8 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Oab, QuestionnaireCode.Oab + ".8");
                if (answer8.Contains("A"))
                {
                    score      += 1;
                    eightScore += 1;
                }
                if (answer8.Contains("B"))
                {
                    score      += 2;
                    eightScore += 2;
                }
                if (answer8.Contains("C"))
                {
                    score      += 3;
                    eightScore += 3;
                }
                if (answer8.Contains("D"))
                {
                    score      += 4;
                    eightScore += 4;
                }
                if (answer8.Contains("E"))
                {
                    score      += 5;
                    eightScore += 5;
                }

                //第九题
                string answer9 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Oab, QuestionnaireCode.Oab + ".9");
                if (answer9.Contains("A"))
                {
                    score += 1;
                }
                if (answer9.Contains("B"))
                {
                    score += 2;
                }
                if (answer9.Contains("C"))
                {
                    score += 3;
                }
                if (answer9.Contains("D"))
                {
                    score += 4;
                }
                if (answer9.Contains("E"))
                {
                    score += 5;
                }

                lblResult.Text = "本次筛查得分:" + score;

                printScore = "本次筛查得分:" + score;

                //将本次问卷的得分更新
                if (questionnaireUserDetail != null && !string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaireUserDetail, score, new List <int>
                    {
                        int.Parse(ConfigHelper.GetAppsettings("OabLight")),
                        int.Parse(ConfigHelper.GetAppsettings("OabModerate")),
                        int.Parse(ConfigHelper.GetAppsettings("OabSerious"))
                    });
                }

                //各分数区间结果
                //0<=总分<=3 或 尿急得分在2分或以下,正常
                if ((score >= 0 && score <= 3) || eightScore <= 2)
                {
                    //lblResult.Text += ",正常";

                    lblSuggest.Text = "暂未发现您有膀胱过度活动症的相关症状,如有疑问,请到专业医疗机构进行详细检查。";

                    printResult = @"筛查结果:暂未发现您有膀胱过度活动
症的相关症状,如有疑问,请到专业医
疗机构进行详细检查。";
                }
                //3<总得分≤5(且尿急的得分在3分或以上),轻度
                if (score > 3 && score <= 5 && eightScore >= 3)
                {
                    //lblResult.Text += ",轻度";

                    lblSuggest.Text = "初步筛查您的情况为轻度的膀胱过度活动症,你对病症仍有所疑虑,可以考虑应用排尿日记记录您的日常排尿状况,并到专业医疗机构进行复查。";

                    printResult = @"筛查结果:初步筛查您的情况为轻度的
膀胱过度活动症,你对病症仍有所疑虑
,可以考虑应用排尿日记记录您的日常
排尿状况,并到专业医疗机构进行复查
。";

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1903, "膀胱过度活动症筛查轻度");
                    }
                }
                //6≤总得分≤11(且尿急的得分在3分或以上),中度
                if (score >= 6 && score <= 11 && eightScore >= 3)
                {
                    //lblResult.Text += ",中度";

                    lblSuggest.Text = "初步筛查您的情况为中度的膀胱过度活动症,建议进一步复查确诊,在复查前记录排尿日记以供医生作为确诊依据,并到专业机构选用选择合适的治疗手段(药物治疗,行为治疗等),防止OAB膀胱过度活动症对病人生活质量带来的困扰。";

                    printResult = @"筛查结果:初步筛查您的情况为中度的
膀胱过度活动症,建议进一步复查确诊
,在复查前记录排尿日记以供医生作为
确诊依据,并到专业机构选用选择合适
的治疗手段(药物治疗,行为治疗等),
防止OAB膀胱过度活动症对病人生活质
量带来的困扰。";

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1904, "膀胱过度活动症筛查中度");
                    }
                }
                //总得分≥12(且尿急的得分在3分或以上),重度
                if (score >= 12 && eightScore >= 3)
                {
                    //lblResult.Text += ",重度";

                    lblSuggest.Text = "初步筛查您的情况为重度的膀胱过度活动症,建议进一步复查确诊,在复查前记录排尿日记以供医生作为确诊依据,并到专业机构选用选择合适的治疗手段(药物治疗,行为治疗等),防止病变引起的并发症。";

                    printResult = @"筛查结果:初步筛查您的情况为重度的
膀胱过度活动症,建议进一步复查确诊
,在复查前记录排尿日记以供医生作为
确诊依据,并到专业机构选用选择合适
的治疗手段(药物治疗,行为治疗等),
防止病变引起的并发症。";

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1905, "膀胱过度活动症筛查重度");
                    }
                }
            }
            catch (Exception ex)
            {
                screenWebapiClient.AddErrorLog(new M_LogForAtm {
                    Title = "筛查机客户端错误", Content = ex.ToString(), Description = "膀胱过度活动症筛查问卷"
                });
            }
        }
Example #2
0
        private void RuxianResult_Load(object sender, EventArgs e)
        {
            //问卷答题时间
            answerTime = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiRuXianAi).AnswerTime;
            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiRuXianAi);

                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                //游客编号
                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }
            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }

            int    num       = 1;
            string answerA07 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                          QuestionnaireCode.ZaoAiRuXianAi + ".A07"); //选项为1.未婚 结合个人信息中的性别“女”年龄≥35岁
            string answerA08 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                          QuestionnaireCode.ZaoAiRuXianAi + ".A08");

            if (answerA07.Contains("A") && answerA08.Contains("A"))
            {
                lblResult.Text += "女性高龄未婚 \r";
                num++;
            }
            string answerA09 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                          QuestionnaireCode.ZaoAiRuXianAi + ".A09");

            if (answerA09.Contains("A"))
            {
                string answerA091 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                               QuestionnaireCode.ZaoAiRuXianAi + ".A09.1");
                if (answerA091.Length > 0)
                {
                    lblResult.Text += "从事过接触有害致癌物质的职业 \r";
                    num++;
                }
            }

            string answerA10 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                          QuestionnaireCode.ZaoAiRuXianAi + ".A10");

            if (answerA10.Contains("A"))
            {
                lblResult.Text += "年轻时多次暴露于射线 \r";
            }
            num++;

            string answerB14 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                          QuestionnaireCode.ZaoAiRuXianAi + ".B01.4");

            if (answerB14.Contains("A"))
            {
                lblResult.Text += "高脂饮食 \r";
            }
            num++;

            string answerC3 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".C03");

            if (answerC3.Contains("B"))
            {
                string answerC31 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                              QuestionnaireCode.ZaoAiRuXianAi + ".C03.1");
                string answerC32 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                              QuestionnaireCode.ZaoAiRuXianAi + ".C03.2");
                string c31Result = "";
                string c32Result = "";
                if (answerC31.Contains("A"))
                {
                    c31Result += "1-5支/天,";
                }
                else if (answerC31.Contains("B"))
                {
                    c31Result += "5-10支/天,";
                }
                else if (answerC31.Contains("C"))
                {
                    c31Result += "10-20支/天,";
                }
                else
                {
                    c31Result += "20支以上/天,";
                }

                if (answerC32.Contains("A"))
                {
                    c32Result += "1-3年,";
                }
                else if (answerC32.Contains("B"))
                {
                    c32Result += "3-5年,";
                }
                else if (answerC32.Contains("C"))
                {
                    c32Result += "5-10年,";
                }
                else
                {
                    c32Result += "10年以上,";
                }
                lblResult.Text += "吸烟(" + c31Result + c32Result.Substring(0, c32Result.Length - 1) + ") \r";
                num++;
            }
            else if (answerC3.Contains("C"))
            {
                string answerC33 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                              QuestionnaireCode.ZaoAiRuXianAi + ".C03.3");
                if (answerC33.Contains("A"))
                {
                    lblResult.Text += "有吸烟史,戒烟少于15年 \r";
                    num++;
                }
            }

            string answerC4 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".C04");

            if (answerC4.Contains("B"))
            {
                lblResult.Text += "长期被动吸烟 \r";
                num++;
            }
            string answerC5 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".C05");

            if (answerC5.Contains("B"))
            {
                string answerC51 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                              QuestionnaireCode.ZaoAiRuXianAi + ".C05.1");
                if (double.Parse(answerC51) > 24)
                {
                    lblResult.Text += "酒精日摄入量>24克 \r";
                    num++;
                }
            }

            string answerD01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                          QuestionnaireCode.ZaoAiRuXianAi + ".D01");

            if (answerD01.Contains("A"))
            {
                lblResult.Text += "有较大精神创伤史 \r";
            }
            num++;

            string answerD02 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                          QuestionnaireCode.ZaoAiRuXianAi + ".D02");

            if (answerD02.Contains("A"))
            {
                lblResult.Text += "长期精神抑郁 \r";
            }
            num++;
            string answerE01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                          QuestionnaireCode.ZaoAiRuXianAi + ".E01");

            if (answerE01.Contains("A"))
            {
                string answerE011 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                               QuestionnaireCode.ZaoAiRuXianAi + ".E01.1");
                if (num >= 10)
                {
                    lblResultApped.Text += "有" + answerE011 + "癌病史 \r"; num++;
                }
                else
                {
                    lblResult.Text += "有" + answerE011 + "癌病史 \r"; num++;
                }
            }

            string answeW03 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".W03");

            if (answeW03.Contains("A"))
            {
                string answerW031 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                               QuestionnaireCode.ZaoAiRuXianAi + ".W03.1");//03选项是1且 W03.1>54岁
                if (int.Parse(answerW031) > 54)
                {
                    if (num >= 10)
                    {
                        lblResultApped.Text += "停经年龄≥54岁 \r"; num++;
                    }
                    else
                    {
                        lblResult.Text += "停经年龄≥54岁 \r"; num++;
                    }
                }
            }

            string answeW04 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".W04");//如果W04选项是0且年龄>35岁则结论是

            if (answeW04.Contains("B"))
            {
                //判断年龄是否大于35
                string ageAnswerA08 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi, QuestionnaireCode.ZaoAiRuXianAi + ".A08");
                if (ageAnswerA08.Contains("A"))
                {
                    if (num >= 10)
                    {
                        lblResultApped.Text += "大于35岁未生育 \r"; num++;
                    }
                    else
                    {
                        lblResult.Text += "大于35岁未生育 \r"; num++;
                    }
                }
                //           string answeW041 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                //QuestionnaireCode.ZaoAiRuXianAi + ".W04.1");//如果W04选项是0且年龄>35岁则结论是
                //           if (answeW041.Contains("B"))
                //           {
                //               if (num >= 10)
                //               {
                //                   lblResultApped.Text += "大于35岁未生育 \r"; num++;
                //               }
                //               else
                //               {
                //                   lblResult.Text += "大于35岁未生育 \r"; num++;
                //               }

                //           }
            }

            string answeW06 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".W06");//如果W04选项是0且年龄>35岁则结论是

            if (answeW06.Contains("A"))
            {
                if (num >= 10)
                {
                    lblResultApped.Text += "曾患良性乳腺疾病 \r"; num++;
                }
                else
                {
                    lblResult.Text += "曾患良性乳腺疾病 \r"; num++;
                }
            }

            string answeW08 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".W08");

            if (answeW08.Contains("A"))
            {
                string answeW081 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                              QuestionnaireCode.ZaoAiRuXianAi + ".W08.1");
                if (answeW081.Contains("A"))
                {
                    if (num >= 10)
                    {
                        lblResultApped.Text += "有乳腺癌家族史 (二级内血缘亲属)\r"; num++;
                    }
                    else
                    {
                        lblResult.Text += "有乳腺癌家族史 (二级内血缘亲属)\r"; num++;
                    }
                }
                string answeW082 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                              QuestionnaireCode.ZaoAiRuXianAi + ".W08.2");
                if (answeW082.Contains("A"))
                {
                    if (num >= 10)
                    {
                        lblResultApped.Text += "一级血缘亲属50岁前患乳腺癌 \r"; num++;
                    }
                    else
                    {
                        lblResult.Text += "一级血缘亲属50岁前患乳腺癌 \r"; num++;
                    }
                }
            }


            string answeW10 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".W10");

            if (answeW10.Contains("A"))
            {
                if (num >= 10)
                {
                    lblResultApped.Text += "多次流产史 \r"; num++;
                }
                else
                {
                    lblResult.Text += "多次流产史 \r"; num++;
                }
            }

            string answeW11 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".W11");

            if (answeW11.Contains("A"))
            {
                if (num >= 10)
                {
                    lblResultApped.Text += "长期服用含雌激素的保健品 \r"; num++;
                }
                else
                {
                    lblResult.Text += "长期服用含雌激素的保健品 \r"; num++;
                }
            }

            string answeW12 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".W12");

            if (answeW12.Contains("A"))
            {
                if (num >= 10)
                {
                    lblResultApped.Text += "长期服用避孕药 \r"; num++;
                }
                else
                {
                    lblResult.Text += "长期服用避孕药 \r"; num++;
                }
            }

            string answeW13 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".W13");

            if (answeW13.Contains("A"))
            {
                lblResult.Text += "雌激素替代治疗 \r";
            }
            num++;

            string answeW14 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiRuXianAi,
                                                         QuestionnaireCode.ZaoAiRuXianAi + ".W14");

            if (answeW14.Contains("A"))
            {
                if (num >= 10)
                {
                    lblResultApped.Text += "人工受孕史 \r"; num++;
                }
                else
                {
                    lblResult.Text += "人工受孕史 \r"; num++;
                }
            }

            if (string.IsNullOrEmpty(lblResult.Text) && string.IsNullOrEmpty(lblResultApped.Text))
            {
                this.lblResult.Text = @"恭喜您,您是乳腺癌的低风险人群。风险低的人群,不能完全排除患癌症的可能性,建议定期做全面体检,以及时了解身体健康状况。并继续保持良好的生活方式。";
                panel1.Visible      = false;
            }
        }
Example #3
0
        private void GanaiResult_Load(object sender, EventArgs e)
        {
            //问卷答题时间
            answerTime = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiGanAi).AnswerTime;
            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiGanAi);

                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                //游客编号
                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }

            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }

            string answerC05 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                          QuestionnaireCode.ZaoAiGanAi + ".C05");

            if (answerC05.Contains("B"))
            {
                lblResult.Text += "酗酒 \r";

                strResultPrint += "酗酒 \r";
            }

            string answerE02 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                          QuestionnaireCode.ZaoAiGanAi + ".E02");

            if (answerE02.Contains("A"))
            {
                string answerE021 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                               QuestionnaireCode.ZaoAiGanAi + ".E02.1");
                if (answerE021.Contains("B"))
                {
                    lblResult.Text += "乙肝表面抗原(HBsAg)阳性 \r";

                    strResultPrint += "乙肝表面抗原(HBsAg)阳性 \r";
                }
            }

            string answerE03 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                          QuestionnaireCode.ZaoAiGanAi + ".E03");

            if (answerE03.Contains("A"))
            {
                string answerE031 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                               QuestionnaireCode.ZaoAiGanAi + ".E03.1");
                if (answerE031.Contains("B"))
                {
                    lblResult.Text += "丙肝(HCV)阳性 \r";

                    strResultPrint += "丙肝(HCV)阳性 \r";
                }
            }

            string answerE071 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                           QuestionnaireCode.ZaoAiGanAi + ".E07.1");

            if (answerE071.Contains("A"))
            {
                string answerE0711 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                                QuestionnaireCode.ZaoAiGanAi + ".E07.1.1");
                if (answerE0711.Contains("A"))
                {
                    lblResult.Text += "慢性乙型肝炎病史5年以上 \r";

                    strResultPrint += "慢性乙型肝炎病史5年以上 \r";
                }
            }

            string answerE072 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                           QuestionnaireCode.ZaoAiGanAi + ".E07.2");

            if (answerE072.Contains("A"))
            {
                string answerE0721 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                                QuestionnaireCode.ZaoAiGanAi + ".E07.2.1");
                if (answerE0721.Contains("A"))
                {
                    lblResult.Text += "慢性丙型肝炎病史5年以上 \r";

                    strResultPrint += "慢性丙型肝炎病史5年以上 \r";
                }
            }

            string answerE073 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                           QuestionnaireCode.ZaoAiGanAi + ".E07.3");

            if (answerE073.Contains("A"))
            {
                string answerE0731 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiGanAi,
                                                                QuestionnaireCode.ZaoAiGanAi + ".E07.3.1");
                if (answerE0731.Contains("A"))
                {
                    lblResult.Text += "肝硬化病史5年以上 \r";

                    strResultPrint += "肝硬化病史5年以上 \r";
                }
            }

            if (string.IsNullOrEmpty(lblResult.Text))
            {
                this.lblResult.Text = @"恭喜您,您是肝癌的低风险人群。风险低的人群,不能完全排除患癌症的可能性,建议定期做全面体检,以及时了解身体健康状况。并继续保持良好的生活方式。";

                strResultPrint += @"恭喜您,您是肝癌的低风险人群。风险
低的人群,不能完全排除患癌症的可能
性,建议定期做全面体检,以及时了解
身体健康状况。并继续保持良好的生活
方式。";

                panel1.Visible = false;
            }
        }
Example #4
0
        private void Result_Load(object sender, EventArgs e)
        {
            M_QuestionnaireUserDetail questionnaire = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.KangFuLunYi);

            //问卷答题时间
            answerTime = questionnaire.AnswerTime;

            IList <M_QuestionnaireResultDetail> questions = questionnaire.Questions;

            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }

            int score = 0;

            #region 计算每题得分
            //评分标准:第1题和第6题AB选项各记5分,CD选项各记0分;其他每题是记0分,否记10分。

            if (questions != null && questions.Count > 0)
            {
                for (int i = 0; i < questions.Count; i++)
                {
                    M_QuestionnaireResultDetail result = questions[i];

                    string answer = result.QuestionResult;

                    if ((result.QuestionCode == QuestionnaireCode.KangFuLunYi + ".1") || (result.QuestionCode == QuestionnaireCode.KangFuLunYi + ".6"))
                    {
                        if (answer.Contains("A") || answer.Contains("B"))
                        {
                            score += 5;
                        }
                    }
                    else
                    {
                        if (answer.Contains("B"))
                        {
                            score += 10;
                        }
                    }
                } // end for
            }     // end  if (questions != null && questions.Count > 0)

            //更新本次问卷总分
            M_QuestionnaireUserDetail userDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.KangFuLunYi);
            if (userDetail != null && !string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
            {
                ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(userDetail, score, new List <int>
                {
                    int.Parse(ConfigHelper.GetAppsettings("WheelchairMaybeInappropriate")),
                    int.Parse(ConfigHelper.GetAppsettings("WheelchairInappropriate"))
                });
            }

            if (score >= 80)
            {
                lblResult.Text += "您的轮椅基本合适。\r\n";
            }

            if (score >= 70 && score < 80)
            {
                lblResult.Text += "您的轮椅可能不合适。\r\n";

                //给用户打标签
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new PatientRecordsManager().UpdatePatientAllRecords(1727, "轮椅可能不合适");
                }
            }

            if (score < 70)
            {
                lblResult.Text += "您的轮椅基本不合适。\r\n";

                //给用户打标签
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new PatientRecordsManager().UpdatePatientAllRecords(1728, "轮椅基本不合适");
                }
            }

            lblResult.Text += "本次得分:" + score;

            #endregion ;

            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questions);

                //游客编号
                lblVisitor.Text  += number;
                lblResult.Visible = true;
            }
        }
Example #5
0
        private void GetResult()
        {
            try
            {
                var questionnaire = ClientInfo.GetQuestionnaireByCode(Code);

                //如果本地问卷记录为空,则从数据库取数据
                if (questionnaire == null)
                {
                    questionnaire = _screenWebapiClient.GetQuestionnaireUserDetailById(Properties.Settings.Default.QuestionnaireRecodId);
                    if (questionnaire != null)
                    {
                        questionnaire.Questions = _screenWebapiClient.GetQuestionnaireResultDetails(questionnaire.QuestionnaireRecodId);
                    }
                }
                //问卷答题时间
                _answerTime = questionnaire != null ? questionnaire.AnswerTime : DateTime.Now;

                var questions = questionnaire != null? questionnaire.Questions:null;
                var score     = CalculateScore(questions);
                //将登录人与活动关联
                if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    new CottageActivityManager().AddPToCActivity();
                }

                //更新问卷
                if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name) && questionnaire != null)
                {
                    ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaire, score, new List <int>
                    {
                        int.Parse(ConfigHelper.GetAppsettings("AnkleModerate")),
                        int.Parse(ConfigHelper.GetAppsettings("AnkleSerious"))
                    });
                }

                if (score <= 15)
                {
                    lblResult.Text = @"恭喜您,暂无明显足部功能障碍,请注意日常足部保健,预防足踝疾病的发生。如若
出现足踝部不适等问题,还请引起重视,及早就医,谢谢。";
                    _score         = @"恭喜您,暂无明显足部功能障碍,
请注意日常足部保健,预防足踝疾病的
发生。如若出现足踝部不适等问题,还
请引起重视,及早就医,谢谢。" + "\r\n";

                    //判断是否有轻微异常
                    string strResult = AnalysisLightUnusual(questions);
                    lblResult.Text += strResult;
                    _score         += printResult;
                }
                else if (score > 15 && score <= 30)
                {
                    lblResult.Text = @"可能异常。建议复查进一步确诊治疗,并多关注足踝部健康,注意选用合适的鞋袜,加强足踝部
肌群的锻炼,以及到专业机构选用适合的矫正器具,在专业医生的指导下进行正规的康复训练等,
防止病变继续发展而引起身体其他部位异常改变。";
                    _score         = @"可能异常。建议复查进一步确诊治疗,并
多关注足踝部健康,注意选用合适的鞋袜
,加强足踝部肌群的锻炼,以及到专业机
构选用适合的矫正器具,在专业医生的指
导下进行正规的康复训练等,防止病变继
续发展而引起身体其他部位异常改变。";
                    TagUser(1732, "足踝筛查中危");
                }
                else
                {
                    lblResult.Text = @"异常。建议复查进一步确诊治疗,并多关注足踝部健康,注意选用合适的鞋袜,加强足踝部
肌群的锻炼,以及到专业机构选用选择合适的治疗手段(物理治疗、配置矫形鞋垫、矫形鞋或手
术治疗等),并在专业医生的指导下进行正规的康复训练,尽早进行干预,防止病变继续发展而
引起身体其他部位异常改变。";
                    _score         = @"异常。建议复查进一步确诊治疗,并多关
注足踝部健康,注意选用合适的鞋袜,加
强足踝部肌群的锻炼,以及到专业机构选
用选择合适的治疗手段(物理治疗、配置
矫形鞋垫、矫形鞋或手术治疗等),并在
专业医生的指导下进行正规的康复训练,
尽早进行干预,防止病变继续发展而引起
身体其他部位异常改变。";
                    TagUser(1733, "足踝筛查高危");
                }

                _score = string.Format("本次筛查得分:{0}\r\n\r\n筛查结果:\r\n{1}", score, _score);

                lblResult.Text = string.Format("本次筛查得分:{0}\r\n筛查结果:{1}", score, lblResult.Text);

                if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    return;
                }
                var number  = string.Format("{0:d4}", Settings.Default.ScreenNumber);
                var saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questions);

                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }
            catch (Exception ex)
            {
                _screenWebapiClient.AddErrorLog(new M_LogForAtm {
                    Title = "筛查机客户端错误", Content = ex.ToString(), Description = "足踝筛查问卷"
                });
            }
        }
Example #6
0
        //加载
        private void Result_Load(object sender, EventArgs e)
        {
            M_QuestionnaireUserDetail questionnaire = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.KangFuShouShangZhi);

            //问卷答题时间
            answerTime = questionnaire.AnswerTime;

            IList <M_QuestionnaireResultDetail> questions = questionnaire.Questions;

            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }

            //得分
            double score = 0;
            //总和
            double tempScore = 0;

            //计算得分
            if (questions != null && questions.Count > 0)
            {
                for (int i = 0; i < questions.Count; i++)
                {
                    M_QuestionnaireResultDetail result = questions[i];

                    string answer = result.QuestionResult;

                    if (answer.Contains("A"))
                    {
                        tempScore += 1;
                    }
                    if (answer.Contains("B"))
                    {
                        tempScore += 2;
                    }
                    if (answer.Contains("C"))
                    {
                        tempScore += 3;
                    }
                    if (answer.Contains("D"))
                    {
                        tempScore += 4;
                    }
                    if (answer.Contains("E"))
                    {
                        tempScore += 5;
                    }
                }
            }

            score = (tempScore - 30) / 1.20;


            lblResult.Text = "本次得分:" + Math.Round(score, 2) + "。";
            strResultPrint = "本次得分:" + Math.Round(score, 2) + "。\r\n";

            if (score <= 2.5)
            {
                lblResult.Text += @"恭喜您,基本正常。";
                strResultPrint += @"恭喜您,基本正常。";
            }
            else if (score > 2.5 && score <= 12.5)
            {
                lblResult.Text += @"轻度,您有轻度的手上肢活动障碍问题,建议日常多进行手上肢活动训练,预防手上肢病变,例如关节性疾病风湿、关节炎等。早期手上肢功能的康复训练有重要意义,日常生活和职业动作中很多是手的精细动作,所以通过日常动作的锻炼,对恢复手功能效果明显。";

                strResultPrint += @"轻度,您有轻度的手上肢活动障碍问题,
建议日常多进行手上肢活动训练,预防
手上肢病变,例如关节性疾病风湿、关
节炎等。早期手上肢功能的康复训练有
重要意义,日常生活和职业动作中很多
是手的精细动作,所以通过日常动作的
锻炼,对恢复手功能效果明显。";

                //给用户打标签
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new PatientRecordsManager().UpdatePatientAllRecords(1729, "上肢轻度障碍");
                }
            }
            else if (score > 12.5 && score <= 25)
            {
                lblResult.Text += @"中度,您有中度的手上肢活动障碍问题,可能无法很好使用上肢完成日常生活活动和工作,还请及早接受系统康复治疗。早期手功能的康复训练有重要意义,日常生活和职业动作中很多是手的精细动作。假如3个月以后再训练手功能,将有96%左右患者不能恢复功能,所以早期切勿忽略患手的训练。";

                strResultPrint += @"中度,您有中度的手上肢活动障碍问题,
可能无法很好使用上肢完成日常生活活
动和工作,还请及早接受系统康复治疗。
早期手功能的康复训练有重要意义,日
常生活和职业动作中很多是手的精细动
作。假如3个月以后再训练手功能,将
有96%左右患者不能恢复功能,所以早
期切勿忽略患手的训练。";

                //给用户打标签
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new PatientRecordsManager().UpdatePatientAllRecords(1730, "上肢中度障碍");
                }
            }
            // >25
            else
            {
                lblResult.Text += @"重度,您手上肢关节活动度、感觉、灵活性差,已经完全影响您的日常生活活动和工作,还请尽快到相关医院进行就医检查,接受针对性的系统治疗。";

                strResultPrint += @"重度,您手上肢关节活动度、感觉、灵
活性差,已经完全影响您的日常生活活
动和工作,还请尽快到相关医院进行就
医检查,接受针对性的系统治疗。";

                //给用户打标签
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new PatientRecordsManager().UpdatePatientAllRecords(1731, "上肢重度障碍");
                }
            }

            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questions);

                //游客编号
                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }
        }
Example #7
0
        private void ResultForm_Load(object sender, EventArgs e)
        {
            //计算得分:

            M_QuestionnaireUserDetail questionnaire = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.KangFuZuHuai);

            //问卷答题时间
            answerTime = questionnaire.AnswerTime;

            IList <M_QuestionnaireResultDetail> questions = questionnaire.Questions;

            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }

            int score = 0;

            #region 计算每题得分
            if (questions != null && questions.Count > 0)
            {
                for (int i = 0; i < questions.Count; i++)
                {
                    M_QuestionnaireResultDetail result = questions[i];

                    int tempScore = 0;

                    string answer = result.QuestionResult;

                    //第一题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".1")
                    {
                        if (answer.Contains("A") || (answer.Contains("B")) || answer.Contains("C") || answer.Contains("D"))
                        {
                            score += 15;
                        }
                        else if (answer.Contains("E"))
                        {
                            score += 5;
                        }
                    }// end 第一题

                    //第二题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".2")
                    {
                        if (answer.Contains("A"))
                        {
                            tempScore += 3;
                        }
                        if (answer.Contains("B"))
                        {
                            tempScore += 2;
                        }
                        if (answer.Contains("C"))
                        {
                            tempScore += 5;
                        }

                        if (tempScore > 5)
                        {
                            tempScore = 5;
                        }

                        score += tempScore;
                    }//end 第二题

                    //第三题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".3")
                    {
                        if (answer.Contains("A"))
                        {
                            score += 5;
                        }
                    }

                    //第四题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".4")
                    {
                        if (answer.Contains("A") || answer.Contains("B") || answer.Contains("C"))
                        {
                            score += 15;
                        }
                    }

                    //第五题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".5")
                    {
                        if (answer.Contains("A") || answer.Contains("B"))
                        {
                            score += 5;
                        }
                    }

                    //第六题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".6")
                    {
                        if (answer.Contains("A") || answer.Contains("B") || answer.Contains("C"))
                        {
                            score += 10;
                        }
                    }

                    //第七题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".7")
                    {
                        tempScore = 0;
                        if (answer.Contains("A"))
                        {
                            tempScore += 5;
                        }
                        if (answer.Contains("B"))
                        {
                            tempScore += 5;
                        }
                        if (answer.Contains("C"))
                        {
                            tempScore += 5;
                        }
                        if (answer.Contains("D"))
                        {
                            tempScore += 5;
                        }
                        if (tempScore > 10)
                        {
                            tempScore = 10;
                        }

                        score += tempScore;
                    }

                    //第八题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".8")
                    {
                        tempScore = 0;
                        if (answer.Contains("A"))
                        {
                            tempScore += 5;
                        }
                        if (answer.Contains("B"))
                        {
                            tempScore += 3;
                        }
                        if (answer.Contains("C"))
                        {
                            tempScore += 3;
                        }
                        if (answer.Contains("D"))
                        {
                            tempScore += 2;
                        }
                        if (answer.Contains("E"))
                        {
                            tempScore += 2;
                        }
                        if (tempScore > 10)
                        {
                            tempScore = 10;
                        }

                        score += tempScore;
                    }

                    //第九题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".9")
                    {
                        if (answer.Contains("A"))
                        {
                            score += 5;
                        }
                        if (answer.Contains("B"))
                        {
                            score += 3;
                        }
                    }

                    //第10题
                    if (result.QuestionCode.Trim() == QuestionnaireCode.KangFuZuHuai + ".10")
                    {
                        if (answer.Contains("B"))
                        {
                            score += 5;
                        }
                        if (answer.Contains("C"))
                        {
                            score += 10;
                        }
                        if (answer.Contains("D"))
                        {
                            score += 15;
                        }
                    }
                } // end for
            }     // end  if (questions != null && questions.Count > 0)
            #endregion ;

            ShowResult(score);

            //更新本次问卷得分
            M_QuestionnaireUserDetail userDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.KangFuZuHuai);
            if (userDetail != null && !string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
            {
                int result = screenWebapiClient.UpdateQuestionUserScoreStatus(userDetail.QuestionnaireRecodId, score, 1);
            }

            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questions);

                //游客编号
                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }
        }// end  private void ResultForm_Load(object sender, EventArgs e)
Example #8
0
        //加载
        private void CopdResult_Load(object sender, EventArgs e)
        {
            try
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.Copd);

                //如果本地问卷记录为空,则从数据库取数据
                if (questionnaireUserDetail == null)
                {
                    questionnaireUserDetail = screenWebapiClient.GetQuestionnaireUserDetailById(Properties.Settings.Default.QuestionnaireRecodId);
                    if (questionnaireUserDetail != null)
                    {
                        questionnaireUserDetail.Questions = screenWebapiClient.GetQuestionnaireResultDetails(questionnaireUserDetail.QuestionnaireRecodId);
                    }
                }

                //问卷答题时间
                answerTime = questionnaireUserDetail != null ? questionnaireUserDetail.AnswerTime : DateTime.Now;

                //将游客的结果保存为xml
                if (LoginInfo.GetInstance().Name.Equals(""))
                {
                    if (questionnaireUserDetail != null && questionnaireUserDetail.Questions != null &&
                        questionnaireUserDetail.Questions.Any())
                    {
                        string number = Properties.Settings.Default.ScreenNumber.ToString();
                        switch (number.Length)
                        {
                        case 1:
                            number = "000" + number;
                            break;

                        case 2:
                            number = "00" + number;
                            break;

                        case 3:
                            number = "0" + number;
                            break;
                        }
                        SaveXml saveXml = new SaveXml();
                        saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                        //显示游客编号
                        lblVisitor.Text   += number;
                        lblVisitor.Visible = true;
                    }
                }

                //将登录人与活动关联
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new CottageActivityManager().AddPToCActivity();
                }

                //统计结果
                //总分
                decimal score = 0;

                string answer1 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Copd, QuestionnaireCode.Copd + ".1");
                if (answer1.Contains("A"))
                {
                    score += 20;
                }

                string answer2 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Copd, QuestionnaireCode.Copd + ".2");
                if (answer2.Contains("A"))
                {
                    score += 20;
                }

                string answer3 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Copd, QuestionnaireCode.Copd + ".3");
                if (answer3.Contains("A"))
                {
                    score += 20;
                }

                string answer4 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Copd, QuestionnaireCode.Copd + ".4");
                if (answer4.Contains("A"))
                {
                    score += 20;
                }

                string answer5 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Copd, QuestionnaireCode.Copd + ".5");
                if (answer5.Contains("A"))
                {
                    score += 20;
                }

                //将本次问卷的得分更新
                if (questionnaireUserDetail != null && !string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaireUserDetail, score, new List <int>
                    {
                        int.Parse(ConfigHelper.GetAppsettings("CopdUnusual"))
                    });
                }

                //正常(是 <= 2,总分 <= 40)
                if (score <= 40)
                {
                    lblResult.Text  = "您本次筛查结果为“正常”。";
                    lblSuggest.Text = "恭喜您,您呼吸功能暂无明显问题。";

                    printScore  = @"您本次筛查结果为“正常”。";
                    printResult = @"恭喜您,您呼吸功能暂无明显问题。";
                }
                //异常
                else
                {
                    lblResult.Text  = "您本次筛查结果为“异常”。";
                    lblSuggest.Text = "经过初步筛查,您有呼吸功能不全的高风险,可能患上慢阻肺(COPD),建议您马上进行肺功能检查,以排除相关疾病的可能,祝您健康!";

                    printScore  = @"您本次筛查结果为“异常”。";
                    printResult = @"经过初步筛查,您有呼吸功能不全的高
风险,可能患上慢阻肺(COPD),建
议您马上进行肺功能检查,以排除相关
疾病的可能,祝您健康!";

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1918, "慢阻肺异常");
                    }
                }
            }
            catch (Exception ex)
            {
                screenWebapiClient.AddErrorLog(new M_LogForAtm {
                    Title = "筛查机客户端错误", Content = ex.ToString(), Description = "慢阻肺筛查问卷"
                });
            }
        }
Example #9
0
        private void WeiAiResultForm_Load(object sender, EventArgs e)
        {
            //问卷答题时间
            answerTime = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiWeiAi).AnswerTime;
            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiWeiAi);

                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                //游客编号
                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }

            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }


            int    num       = 1;
            string answerA03 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".A03");

            if (answerA03.Contains("A"))
            {
                lblResult.Text += "有不明原因消瘦 \r";
                strResultPrint.Append(@"有不明原因消瘦" + "\r");
            }
            num++;

            string answerA09 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".A09");

            if (answerA09.Contains("A"))
            {
                string answerA091 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".A09.1");
                if (answerA091.Length > 0)
                {
                    lblResult.Text += "从事过接触有害致癌物质的职业 \r";
                    strResultPrint.Append(@"从事过接触有害致癌物质的职业" + "\r");
                    num++;
                }
            }

            string answerB13 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".B01.3");
            string answerB15 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".B01.5");
            string answerB16 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".B01.6");
            string answerB17 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".B01.7");
            string answerB19 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".B01.9");
            string answerB110 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                           QuestionnaireCode.ZaoAiWeiAi + ".B01.10");

            if (answerB13.Contains("A"))
            {
                lblResult.Text += "高盐饮食 \r";
                strResultPrint.Append(@"高盐饮食" + "\r");
                num++;
            }
            if (answerB15.Contains("C"))
            {
                lblResult.Text += "喜食腌制、熏制食品 \r";
                strResultPrint.Append(@"喜食腌制、熏制食品" + "\r");
                num++;
            }
            if (answerB16.Contains("C"))
            {
                lblResult.Text += "过多进食霉变食物 \r";
                strResultPrint.Append(@"过多进食霉变食物" + "\r");
                num++;
            }
            if (answerB17.Contains("C"))
            {
                lblResult.Text += "少食新鲜蔬菜 \r";
                strResultPrint.Append(@"少食新鲜蔬菜" + "\r");
                num++;
            }
            if (answerB19.Contains("C"))
            {
                lblResult.Text += "进餐速度快 \r";
                strResultPrint.Append(@"进餐速度快" + "\r");
                num++;
            }
            if (answerB110.Contains("C"))
            {
                lblResult.Text += "饮食不规律 \r";
                strResultPrint.Append(@"饮食不规律" + "\r");
                num++;
            }


            string answerC3 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                         QuestionnaireCode.ZaoAiWeiAi + ".C03");

            if (answerC3.Contains("B"))
            {
                string answerC31 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                              QuestionnaireCode.ZaoAiWeiAi + ".C03.1");
                string answerC32 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                              QuestionnaireCode.ZaoAiWeiAi + ".C03.2");
                string c31Result = "";
                string c32Result = "";
                if (answerC31.Contains("A"))
                {
                    c31Result += "1-5支/天,";
                }
                else if (answerC31.Contains("B"))
                {
                    c31Result += "5-10支/天,";
                }
                else if (answerC31.Contains("C"))
                {
                    c31Result += "10-20支/天,";
                }
                else
                {
                    c31Result += "20支以上/天,";
                }

                if (answerC32.Contains("A"))
                {
                    c32Result += "1-3年,";
                }
                else if (answerC32.Contains("B"))
                {
                    c32Result += "3-5年,";
                }
                else if (answerC32.Contains("C"))
                {
                    c32Result += "5-10年,";
                }
                else
                {
                    c32Result += "10年以上,";
                }
                lblResult.Text += "吸烟(" + c31Result + c32Result.Substring(0, c32Result.Length - 1) + ") \r";
                strResultPrint.Append(@"吸烟(" + c31Result + c32Result.Substring(0, c32Result.Length - 1) + ") \r");
                num++;
            }
            else if (answerC3.Contains("C"))
            {
                string answerC33 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                              QuestionnaireCode.ZaoAiWeiAi + ".C03.3");
                if (answerC33.Contains("A"))
                {
                    lblResult.Text += "有吸烟史,戒烟少于15年 \r";
                    strResultPrint.Append(@"有吸烟史,戒烟少于15年" + "\r");
                    num++;
                }
            }


            string answerC4 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                         QuestionnaireCode.ZaoAiWeiAi + ".C04");

            if (answerC4.Contains("B"))
            {
                if (num >= 10)
                {
                    lblResultAppend.Text += "长期被动吸烟 \r";
                    strResultPrintAppend.Append(@"长期被动吸烟" + "\r");
                    num++;
                }
                else
                {
                    lblResult.Text += "长期被动吸烟 \r";
                    strResultPrint.Append(@"长期被动吸烟" + "\r");
                    num++;
                }
            }

            string answerC5 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                         QuestionnaireCode.ZaoAiWeiAi + ".C05");

            if (answerC5.Contains("B"))
            {
                if (num >= 10)
                {
                    lblResultAppend.Text += "长期酗酒 \r";
                    strResultPrintAppend.Append(@"长期酗酒" + "\r");
                    num++;
                }
                else
                {
                    lblResult.Text += "长期酗酒 \r";
                    strResultPrint.Append("长期酗酒" + "\r");
                    num++;
                }
            }

            string answerE01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".E01");

            if (answerE01.Contains("A"))
            {
                string answerE011 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E01.1");
                if (num >= 10)
                {
                    lblResultAppend.Text += "有" + answerE011 + "癌病史 \r";
                    strResultPrintAppend.Append(@"有" + answerE011 + "癌病史 \r");
                    num++;
                }
                else
                {
                    lblResult.Text += "有" + answerE011 + "癌病史 \r";
                    strResultPrint.Append(@"有" + answerE011 + "癌病史 \r");
                    num++;
                }
            }

            string answerE04 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".E04");

            if (answerE04.Contains("A"))
            {
                string answerE041 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E04.1");
                if (answerE041.Contains("B"))
                {
                    if (num >= 10)
                    {
                        lblResultAppend.Text += "便潜血阳性,有上消化道出血可能 \r";
                        strResultPrintAppend.Append(@"便潜血阳性,有上消化道出血可能" + "\r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "便潜血阳性,有上消化道出血可能 \r";
                        strResultPrint.Append(@"便潜血阳性,有上消化道出血可能" + "\r");
                        num++;
                    }
                }
            }

            ////E06及E06.1-E06.8组合条件判断
            ////E06及E06.1-E06.8任意一个或多个问题选择选项1“是”,则结论均为:有上消化系统疾病病史(病名1、病名2)
            string answerE06 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".E06");

            if (answerE06.Contains("A"))
            {
                string answerE061 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E06.1");
                string answerE062 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E06.2");
                string answerE063 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E06.3");
                string answerE064 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E06.4");
                string answerE065 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E06.5");
                string answerE066 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E06.6");
                string answerE067 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E06.7");
                string answerE068 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".E06.8");
                string result = "";
                //用于打印
                string resultTempPrint = "";

                if (answerE061.Contains("A"))
                {
                    result          += "反流性食管炎,";
                    resultTempPrint += @"反流性食管炎," + "\r";
                }
                if (answerE062.Contains("A"))
                {
                    result          += "浅表性胃炎,";
                    resultTempPrint += @"浅表性胃炎," + "\r";
                }
                if (answerE063.Contains("A"))
                {
                    result          += "萎缩性胃炎,";
                    resultTempPrint += @"萎缩性胃炎," + "\r";
                }
                if (answerE064.Contains("A"))
                {
                    result          += "胃溃疡,";
                    resultTempPrint += @"胃溃疡," + "\r";
                }
                if (answerE065.Contains("A"))
                {
                    result          += "十二指肠溃疡,";
                    resultTempPrint += @"十二指肠溃疡," + "\r";
                }
                if (answerE066.Contains("A"))
                {
                    result          += "胃息肉病,";
                    resultTempPrint += @"胃息肉病," + "\r";
                }
                if (answerE067.Contains("A"))
                {
                    result          += "胃切除手术史,";
                    resultTempPrint += @"胃切除手术史," + "\r";
                }
                if (answerE068.Contains("A"))
                {
                    result          += "消化道出血史,";
                    resultTempPrint += @"消化道出血史," + "\r";
                }
                if (!string.IsNullOrEmpty(result))
                {
                    if (num >= 10)
                    {
                        lblResultAppend.Text += "有上消化系统疾病病史(" + result + ") \r";
                        strResultPrintAppend.Append("有上消化系统疾病病史(\r" + resultTempPrint + ") \r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有上消化系统疾病病史(" + result + ") \r";
                        strResultPrint.Append("有上消化系统疾病病史(\r" + resultTempPrint + ") \r");
                        num++;
                    }
                }
            }
            string answerE095 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                           QuestionnaireCode.ZaoAiWeiAi + ".E09.5");
            string answerE096 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                           QuestionnaireCode.ZaoAiWeiAi + ".E09.6");

            if (answerE095.Contains("A"))
            {
                if (num >= 10)
                {
                    lblResultAppend.Text += "有缺铁性贫血病史 \r";
                    strResultPrintAppend.Append(@"有缺铁性贫血病史" + "\r");
                    num++;
                }
                else
                {
                    lblResult.Text += "有缺铁性贫血病史 \r";
                    strResultPrint.Append(@"有缺铁性贫血病史" + "\r");
                    num++;
                }
            }
            if (answerE096.Contains("A"))
            {
                if (num >= 10)
                {
                    lblResultAppend.Text += "胃幽门螺旋杆菌感染病史 \r";
                    strResultPrintAppend.Append(@"胃幽门螺旋杆菌感染病史" + "\r");
                    num++;
                }
                else
                {
                    lblResult.Text += "胃幽门螺旋杆菌感染病史 \r";
                    strResultPrint.Append(@"胃幽门螺旋杆菌感染病史" + "\r");
                    num++;
                }
            }
            string answerF01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                          QuestionnaireCode.ZaoAiWeiAi + ".F01");

            if (answerF01.Contains("A"))
            {
                string answerF012 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".F01.2");
                if (answerF012.Contains("A"))
                {
                    string answerF0121 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                                    QuestionnaireCode.ZaoAiWeiAi + ".F01.2.1");
                    string result = string.Empty;
                    //用于打印
                    string resultTempPrint = string.Empty;

                    if (answerF0121.Contains("A"))
                    {
                        result          += "母亲、";
                        resultTempPrint += @"母亲、";
                    }
                    if (answerF0121.Contains("B"))
                    {
                        result          += "父亲、";
                        resultTempPrint += @"父亲、";
                    }
                    if (answerF0121.Contains("C"))
                    {
                        result          += "姐妹、";
                        resultTempPrint += @"姐妹、";
                    }
                    if (answerF0121.Contains("D"))
                    {
                        result          += "兄弟、";
                        resultTempPrint += @"兄弟、";
                    }
                    if (answerF0121.Contains("E"))
                    {
                        result          += "祖父母、";
                        resultTempPrint += @"祖父母、";
                    }
                    if (answerF0121.Contains("F"))
                    {
                        result          += "外祖父母、";
                        resultTempPrint += @"外祖父母、";
                    }
                    if (answerF0121.Contains("G"))
                    {
                        result          += "叔姑、";
                        resultTempPrint += @"叔姑、";
                    }
                    if (answerF0121.Contains("H"))
                    {
                        result          += "舅姨、";
                        resultTempPrint += @"舅姨、";
                    }
                    if (answerF0121.Contains("I"))
                    {
                        result          += "堂兄弟姐妹、";
                        resultTempPrint += @"堂兄弟姐妹、";
                    }
                    if (answerF0121.Contains("J"))
                    {
                        result          += "表兄弟姐妹、";
                        resultTempPrint += @"表兄弟姐妹、";
                    }
                    if (answerF0121.Contains("K"))
                    {
                        result          += "其他、";
                        resultTempPrint += @"其他、";
                    }
                    if (num >= 10)
                    {
                        lblResultAppend.Text += "有食管癌家族史(" + result + ") \r";
                        strResultPrintAppend.Append(@"有食管癌家族史");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有食管癌家族史(" + result + ") \r";
                        strResultPrint.Append(@"有食管癌家族史");
                        num++;
                    }
                }

                string answerF013 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                               QuestionnaireCode.ZaoAiWeiAi + ".F01.3");

                if (answerF013.Contains("A"))
                {
                    string answerF0131 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiWeiAi,
                                                                    QuestionnaireCode.ZaoAiWeiAi + ".F01.3.1");
                    string result = string.Empty;
                    //用于打印
                    string resultTempPrint = string.Empty;

                    if (answerF0131.Contains("A"))
                    {
                        result          += "母亲、";
                        resultTempPrint += @"母亲、";
                    }
                    if (answerF0131.Contains("B"))
                    {
                        result          += "父亲、";
                        resultTempPrint += @"父亲、";
                    }
                    if (answerF0131.Contains("C"))
                    {
                        result          += "姐妹、";
                        resultTempPrint += @"姐妹、";
                    }
                    if (answerF0131.Contains("D"))
                    {
                        result          += "兄弟、";
                        resultTempPrint += @"兄弟、";
                    }
                    if (answerF0131.Contains("E"))
                    {
                        result          += "祖父母、";
                        resultTempPrint += @"祖父母、";
                    }
                    if (answerF0131.Contains("F"))
                    {
                        result          += "外祖父母、";
                        resultTempPrint += @"外祖父母、";
                    }
                    if (answerF0131.Contains("G"))
                    {
                        result          += "叔姑、";
                        resultTempPrint += @"叔姑、";
                    }
                    if (answerF0131.Contains("H"))
                    {
                        result          += "舅姨、";
                        resultTempPrint += @"舅姨、";
                    }
                    if (answerF0131.Contains("I"))
                    {
                        result          += "堂兄弟姐妹、";
                        resultTempPrint += @"堂兄弟姐妹、";
                    }
                    if (answerF0131.Contains("J"))
                    {
                        result          += "表兄弟姐妹、";
                        resultTempPrint += @"表兄弟姐妹、";
                    }
                    if (answerF0131.Contains("K"))
                    {
                        result          += "其他、";
                        resultTempPrint += @"其他、";
                    }
                    if (num >= 10)
                    {
                        lblResultAppend.Text += "有胃癌家族史(" + result + ") \r";
                        strResultPrintAppend.Append(@"有胃癌家族史");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有胃癌家族史(" + result + ") \r";
                        strResultPrint.Append(@"有胃癌家族史");
                        num++;
                    }
                }
            }

            if (string.IsNullOrEmpty(lblResult.Text) && string.IsNullOrEmpty(lblResultAppend.Text))
            {
                lblResult.Text = @"恭喜您,您是胃癌的低风险人群。风险低的人群,不能完全排除患癌症的可能性,建议定期做全面体检,以及时了解身体健康状况。并继续保持良好的生活方式。";
                strResultPrint.Append(@"恭喜您,您是胃癌的低风险人群。风险
低的人群,不能完全排除患癌症的可能
性,建议定期做全面体检,以及时了解
身体健康状况。并继续保持良好的生活
方式。");
                panel1.Visible = false;
            }
        }
Example #10
0
        //加载
        private void ThahResult_Load(object sender, EventArgs e)
        {
            try
            {
                M_QuestionnaireUserDetail questionnaireUserDetail =
                    ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.Thah);

                //如果本地问卷记录为空,则从数据库取数据
                if (questionnaireUserDetail == null)
                {
                    questionnaireUserDetail = screenWebapiClient.GetQuestionnaireUserDetailById(Properties.Settings.Default.QuestionnaireRecodId);
                    if (questionnaireUserDetail != null)
                    {
                        questionnaireUserDetail.Questions = screenWebapiClient.GetQuestionnaireResultDetails(questionnaireUserDetail.QuestionnaireRecodId);
                    }
                }

                //问卷答题时间
                answerTime = questionnaireUserDetail != null ? questionnaireUserDetail.AnswerTime : DateTime.Now;

                //将游客的结果保存为xml
                if (LoginInfo.GetInstance().Name.Equals(""))
                {
                    if (questionnaireUserDetail != null && questionnaireUserDetail.Questions != null &&
                        questionnaireUserDetail.Questions.Any())
                    {
                        string number = Properties.Settings.Default.ScreenNumber.ToString();
                        switch (number.Length)
                        {
                        case 1:
                            number = "000" + number;
                            break;

                        case 2:
                            number = "00" + number;
                            break;

                        case 3:
                            number = "0" + number;
                            break;
                        }
                        SaveXml saveXml = new SaveXml();
                        saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                        //显示游客编号
                        lblVisitor.Text   += number;
                        lblVisitor.Visible = true;
                    }
                }

                //将登录人与活动关联
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new CottageActivityManager().AddPToCActivity();
                }

                //将本次问卷的得分更新
                if (questionnaireUserDetail != null && !string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaireUserDetail, 0, new List <int>
                    {
                        int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedPrehypertension")),
                        int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedFirstStageHypertension")),
                        int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedSecondStageHypertension")),
                        int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedPrediabetes")),
                        int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedDiabetes")),
                        int.Parse(ConfigHelper.GetAppsettings("ThahHigherBloodSugar"))
                    });
                }

                //分析结果
                //***************************************血压结果***********************************************
                int?  sex    = null;
                int?  age    = null;
                short?height = null;
                //收缩压
                int?sbpValue = null;
                //舒张压
                int?dbpValue = null;
                //第1题的性别:0 男、 1 女
                string answer1 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Thah, QuestionnaireCode.Thah + ".1");
                if (answer1.Contains("A"))
                {
                    //男
                    sex = 0;
                }
                if (answer1.Contains("B"))
                {
                    //女
                    sex = 1;
                }

                //第2题的年龄
                string answer2 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Thah, QuestionnaireCode.Thah + ".2");
                if (!string.IsNullOrEmpty(answer2))
                {
                    age = int.Parse(answer2.Substring(0, answer2.Length - 1));
                }

                //第3题的身高
                string answer3 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Thah, QuestionnaireCode.Thah + ".3");
                if (!string.IsNullOrEmpty(answer3))
                {
                    height = short.Parse(answer3.Substring(0, answer3.Length - 1));
                }

                //第六题,收缩压和舒张压
                string answer6 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Thah, QuestionnaireCode.Thah + ".6");
                if (!string.IsNullOrEmpty(answer6))
                {
                    string[] strs6 = answer6.Substring(0, answer6.Length - 1).Split(',');
                    if (!string.IsNullOrEmpty(strs6[0]))
                    {
                        sbpValue = int.Parse(strs6[0]);
                    }
                    if (!string.IsNullOrEmpty(strs6[1]))
                    {
                        dbpValue = int.Parse(strs6[1]);
                    }
                }

                //分析结果
                if (sex.HasValue && age.HasValue && height.HasValue && sbpValue.HasValue && dbpValue.HasValue)
                {
                    BloodPressureState bloodPressureState = screenWebapiClient.GetBloodPressureResult(sex.Value, age.Value,
                                                                                                      height.Value, sbpValue.Value,
                                                                                                      dbpValue.Value);
                    //血压状态正常
                    if (bloodPressureState == BloodPressureState.Normal)
                    {
                        lblResult.Text += "您本次测定的血压为:" + sbpValue + "/" + dbpValue + " mmHg,<P90th 初步定义为正常血压。(收缩压:" +
                                          sbpValue + "和舒张压:" + dbpValue + "小于P90th)\r\n";

                        printResult = "您本次测定的血压为:" + sbpValue + "/" + dbpValue + " mmHg,<\r\n" +
                                      "P90th。初步定义为正常血压。(收缩压\r\n" +
                                      ":" + sbpValue + "和舒张压:" + dbpValue + "小于P90th)\r\n";

                        lblAppraise.Text = "您目前血压正常,配合良好的睡眠、健康的饮食和适当的体育锻炼有助于维持健康血压水平。\r\n";
                        printAppraise.Append(@"您目前血压正常,配合良好的睡眠、健康
的饮食和适当的体育锻炼有助于维持健康
血压水平。" + "\r\n");
                    }
                    //疑似高血压前期
                    else if (bloodPressureState == BloodPressureState.EarlyStage)
                    {
                        lblResult.Text += "您本次测定的血压为:" + sbpValue + "/" + dbpValue +
                                          " mmHg,≥ P90th 且 <P95th疑似高血压前期,需进一步确诊。(收缩压:" + sbpValue + "或舒张压" + dbpValue +
                                          "≥ P90th,且收缩压:" + sbpValue + "和舒张压" + dbpValue + "<P95th)\r\n";

                        printResult = "您本次测定的血压为:" + sbpValue + "/" + dbpValue + " mmHg,≥\r\n" +
                                      "P90th 且 <P95th疑似高血压前期,需进\r\n" +
                                      "一步确诊。(收缩压:" + sbpValue + "或舒张压" + dbpValue + "≥\r\n" +
                                      "P90th,且收缩压:" + sbpValue + "和舒张压" + dbpValue + "<\r\nP95th)\r\n";

                        lblAppraise.Text =
                            "青少年高血压前期可通过非药物治疗的健康管理方式进行调节,如不及早进行干预,易进一步转化。建议您咨询专科医生,并在医院作进一步检查,提早预知疾病风险并及时进行健康管理。\r\n";

                        printAppraise.Append(@"青少年高血压前期可通过非药物治疗的健
康管理方式进行调节,如不及早进行干预
,易进一步转化。建议您咨询专科医生,
并在医院作进一步检查,提早预知疾病风
险并及时进行健康管理。" + "\r\n");

                        //给用户打标签
                        if (!LoginInfo.GetInstance().Name.Equals(""))
                        {
                            new PatientRecordsManager().UpdatePatientAllRecords(
                                int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedPrehypertension")), "疑似高血压前期");
                        }
                    }
                    //疑似一级高血压
                    else if (bloodPressureState == BloodPressureState.Primary)
                    {
                        lblResult.Text += "您本次测定的血压为:" + sbpValue + "/" + dbpValue +
                                          " mmHg,≥ P95th 且 <P99th+5 mmHg 疑似一级高血压,需进一步确诊。(收缩压:" + sbpValue + "或舒张压:" +
                                          dbpValue + "≥ P95th,且收缩压:" + sbpValue + "和舒张压" + dbpValue + "< P99th+5 mmHg)\r\n";
                        printResult = "您本次测定的血压为:" + sbpValue + "/" + dbpValue + " mmHg,≥\r\n" +
                                      "P95th 且 <P99th+5 mmHg 疑似一级高血\r\n压," +
                                      "需进一步确诊。(收缩压:" + sbpValue + "或舒张\r\n压:" +
                                      "" + dbpValue + "≥ P95th,且收缩压:" + sbpValue + "和舒张压" + dbpValue + "\r\n" +
                                      "< P99th+5 mmHg)\r\n";

                        lblAppraise.Text =
                            "青少年一级高血压可通过非药物治疗的健康管理方式进行调节,如不及早进行干预,易进一步转化。建议您咨询专科医生,并在医院作进一步检查,提早预知疾病风险并及时进行健康管理。\r\n";

                        printAppraise.Append(@"青少年一级高血压可通过非药物治疗的健
康管理方式进行调节,如不及早进行干预
,易进一步转化。建议您咨询专科医生,
并在医院作进一步检查,提早预知疾病风
险并及时进行健康管理。" + "\r\n");

                        //给用户打标签
                        if (!LoginInfo.GetInstance().Name.Equals(""))
                        {
                            new PatientRecordsManager().UpdatePatientAllRecords(
                                int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedFirstStageHypertension")), "疑似一级高血压");
                        }
                    }
                    //疑似二级高血压
                    else if (bloodPressureState == BloodPressureState.TwoStage)
                    {
                        lblResult.Text += "您本次测定的血压为:" + sbpValue + "/" + dbpValue +
                                          " mmHg,≥ P99th+5 mmHg 疑似二级高血压,需进一步确诊。(收缩压:" + sbpValue + "或舒张压:" + dbpValue +
                                          "≥ P99th+5 mmHg)\r\n";

                        printResult = "您本次测定的血压为:" + sbpValue + "/" + dbpValue + " mmHg,≥\r\n" +
                                      "P99th+5 mmHg 疑似二级高血压,需进一步\r\n" +
                                      "确诊。(收缩压:" + sbpValue + "或舒张压:" + dbpValue + "≥\r\n" +
                                      "P99th+5 mmHg)\r\n";

                        lblAppraise.Text = "您血压的初步筛查结果为二级高血压,建议您及早咨询专科医生,并在医院作进一步检查。必要时需采用药物治疗并配合健康管理方式进行血压控制。" + "\r\n";

                        printAppraise.Append(@"您血压的初步筛查结果为二级高血压,建
议您及早咨询专科医生,并在医院作进一
步检查。必要时需采用药物治疗并配合健
康管理方式进行血压控制。" + "\r\n");

                        //给用户打标签
                        if (!LoginInfo.GetInstance().Name.Equals(""))
                        {
                            new PatientRecordsManager().UpdatePatientAllRecords(
                                int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedSecondStageHypertension")),
                                "疑似二级高血压");
                        }
                    }

                    //***************************************血糖结果***********************************************

                    //第七题
                    int?   envir        = null;
                    double?bloodGlucose = null;
                    string answer7      = ClientInfo.GetAnswerByCode(QuestionnaireCode.Thah, QuestionnaireCode.Thah + ".7");
                    if (!string.IsNullOrEmpty(answer7))
                    {
                        string[] strs = answer7.Substring(0, answer7.Length - 1).Split(',');

                        //空腹
                        if (strs[0].Contains("A"))
                        {
                            envir = (int)BloodSugarEnvir.Kongfu;
                        }
                        //餐后2小时
                        if (strs[0].Contains("B"))
                        {
                            envir = (int)BloodSugarEnvir.Canhou;
                        }
                        //随机血糖
                        if (strs[0].Contains("C"))
                        {
                            envir = (int)BloodSugarEnvir.Suiji;
                        }

                        //填写的数值
                        if (!string.IsNullOrEmpty(strs[1]))
                        {
                            bloodGlucose = double.Parse(strs[1]);
                        }

                        if (envir.HasValue && bloodGlucose.HasValue)
                        {
                            BloodSugarState bloodSugarState = screenWebapiClient.GetBloodSugarState(envir.Value,
                                                                                                    bloodGlucose.Value);
                            if (strs[0].Contains("A"))
                            {
                                //正常血糖值
                                if (bloodSugarState == BloodSugarState.Normal)
                                {
                                    lblResult.Text += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,<5.6 mmol/L 初步定义为正常血糖值。\r\n";
                                    printResult    += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,<\r\n" +
                                                      "5.6 mmol/L 初步定义为正常血糖值。\r\n";

                                    lblAppraise.Text += "您目前血糖正常,配合良好的睡眠、健康的饮食和适当的体育锻炼有助于维持健康血糖水平。\r\n";
                                    printAppraise.Append(@"您目前血糖正常,配合良好的睡眠、健康
的饮食和适当的体育锻炼有助于维持健康
血糖水平。" + "\r\n");
                                }
                                //疑似糖尿病前期
                                else if (bloodSugarState == BloodSugarState.EarlyStage)
                                {
                                    lblResult.Text += "您本次测量的血糖值为:" + bloodGlucose +
                                                      " mmol/L,≥5.6 mmol/L 且<7 mmol/L,疑似糖尿病前期,需进一步确诊。\r\n";
                                    printResult += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,≥\r\n" +
                                                   "5.6 mmol/L 且<7 mmol/L,疑似糖尿病\r\n" +
                                                   "前期,需进一步确诊。\r\n";

                                    lblAppraise.Text +=
                                        "您疑似糖尿病前期,为从正常过渡到糖尿病的过渡阶段,必要时采用药物治疗并配合健康管理方式进行血糖控制,有可能使血糖恢复正常。建议您及早咨询专科医生,并在医院作进一步检查。\r\n";

                                    printAppraise.Append(@"您疑似糖尿病前期,为从正常过渡到糖尿
病的过渡阶段,必要时采用药物治疗并配
合健康管理方式进行血糖控制,有可能使
血糖恢复正常。建议您及早咨询专科医生
,并在医院作进一步检查。" + "\r\n");

                                    //给用户打标签
                                    if (!LoginInfo.GetInstance().Name.Equals(""))
                                    {
                                        new PatientRecordsManager().UpdatePatientAllRecords(
                                            int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedPrediabetes")), "疑似糖尿病前期");
                                    }
                                }
                                //疑似糖尿病
                                else if (bloodSugarState == BloodSugarState.SuspectedDiabetes)
                                {
                                    lblResult.Text += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,≥7 mmol/L,疑似糖尿病,需进一步确诊。\r\n";
                                    printResult    += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,≥\r\n" +
                                                      "7 mmol/L,疑似糖尿病,需进一步确\r\n" +
                                                      "诊。\r\n";

                                    lblAppraise.Text +=
                                        "依据您的血糖水平,疑似为糖尿病,建议您及早咨询专科医生,并在医院作进一步检查。必要时需采用药物治疗并配合健康管理方式进行血糖控制。\r\n";

                                    printAppraise.Append(@"依据您的血糖水平,疑似为糖尿病,建议
您及早咨询专科医生,并在医院作进一步
检查。必要时需采用药物治疗并配合健康
管理方式进行血糖控制。" + "\r\n");

                                    //给用户打标签
                                    if (!LoginInfo.GetInstance().Name.Equals(""))
                                    {
                                        new PatientRecordsManager().UpdatePatientAllRecords(
                                            int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedDiabetes")), "疑似糖尿病");
                                    }
                                }
                            }
                            else if (strs[0].Contains("B"))
                            {
                                if (bloodSugarState == BloodSugarState.Normal)
                                {
                                    lblResult.Text += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,<7.8 mmol/L 初步定义为正常血糖值。\r\n";
                                    printResult    += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,<\r\n" +
                                                      "7.8 mmol/L 初步定义为正常血糖\r\n" +
                                                      "值。\r\n";

                                    lblAppraise.Text += "您目前血糖正常,配合良好的睡眠、健康的饮食和适当的体育锻炼有助于维持健康血糖水平。\r\n";
                                    printAppraise.Append(@"您目前血糖正常,配合良好的睡眠、健康
的饮食和适当的体育锻炼有助于维持健康
血糖水平。" + "\r\n");
                                }
                                //疑似糖尿病前期
                                else if (bloodSugarState == BloodSugarState.EarlyStage)
                                {
                                    lblResult.Text += "您本次测量的血糖值为:" + bloodGlucose +
                                                      " mmol/L,≥7.8 mmol/L 且<11.1 mmol/L,疑似糖尿病前期,需进一步确诊。\r\n";
                                    printResult += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,≥\r\n" +
                                                   "7.8 mmol/L 且<11.1 mmol/L,疑似糖\r\n" +
                                                   "尿病前期,需进一步确诊。\r\n";

                                    lblAppraise.Text +=
                                        "您疑似糖尿病前期,为从正常过渡到糖尿病的过渡阶段,必要时采用药物治疗并配合健康管理方式进行血糖控制,有可能使血糖恢复正常。建议您及早咨询专科医生,并在医院作进一步检查。\r\n";
                                    printAppraise.Append(@"您疑似糖尿病前期,为从正常过渡到糖尿
病的过渡阶段,必要时采用药物治疗并配
合健康管理方式进行血糖控制,有可能使
血糖恢复正常。建议您及早咨询专科医生
,并在医院作进一步检查。" + "\r\n");

                                    //给用户打标签
                                    if (!LoginInfo.GetInstance().Name.Equals(""))
                                    {
                                        new PatientRecordsManager().UpdatePatientAllRecords(
                                            int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedPrediabetes")), "疑似糖尿病前期");
                                    }
                                }
                                //疑似糖尿病
                                else if (bloodSugarState == BloodSugarState.SuspectedDiabetes)
                                {
                                    lblResult.Text += "您本次测量的血糖值为:" + bloodGlucose +
                                                      " mmol/L,≥11.1 mmol/L,疑似糖尿病,需进一步确诊。\r\n";
                                    printResult += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,≥\r\n" +
                                                   "11.1 mmol/L,疑似糖尿病,需进一步确\r\n" +
                                                   "诊。\r\n";

                                    lblAppraise.Text +=
                                        "依据您的血糖水平,疑似为糖尿病,建议您及早咨询专科医生,并在医院作进一步检查。必要时需采用药物治疗并配合健康管理方式进行血糖控制。\r\n";
                                    printAppraise.Append(@"依据您的血糖水平,疑似为糖尿病,建议
您及早咨询专科医生,并在医院作进一步
检查。必要时需采用药物治疗并配合健康
管理方式进行血糖控制。" + "\r\n");

                                    //给用户打标签
                                    if (!LoginInfo.GetInstance().Name.Equals(""))
                                    {
                                        new PatientRecordsManager().UpdatePatientAllRecords(
                                            int.Parse(ConfigHelper.GetAppsettings("ThahSuspectedDiabetes")), "疑似糖尿病");
                                    }
                                }
                            }
                            else if (strs[0].Contains("C"))
                            {
                                //正常随机血糖
                                if (bloodSugarState == BloodSugarState.NormalSuijiBloodSugar)
                                {
                                    lblResult.Text += "您本次测量的血糖值为:" + bloodGlucose +
                                                      " mmol/L,<10 mmol/L 初步定义为正常随机血糖值,需进一步确诊。\r\n";
                                    printResult += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,<\r\n" +
                                                   "10 mmol/L 初步定义为正常随机血糖值\r\n" +
                                                   ",需进一步确诊。\r\n";

                                    lblAppraise.Text += "由于您所测量为随机血糖值,初步定义为正常血糖值,但仍需进一步确诊,建议您再次进行“空腹”或“餐后2小时”的血糖测量。\r\n";
                                    printAppraise.Append(@"由于您所测量为随机血糖值,初步定义为
正常血糖值,但仍需进一步确诊,建议您
再次进行“空腹”或“餐后2小时”的血糖测
量。" + "\r\n");
                                }
                                //血糖值偏高
                                else if (bloodSugarState == BloodSugarState.High)
                                {
                                    lblResult.Text += "您本次测量的血糖值为:" + bloodGlucose +
                                                      " mmol/L,≥10 mmol/L 初步定义为血糖值偏高,需进一步确诊。\r\n";
                                    printResult += "您本次测量的血糖值为:" + bloodGlucose + " mmol/L,≥\r\n" +
                                                   "10 mmol/L 初步定义为血糖值偏高,需\r\n" +
                                                   "进一步确诊。\r\n";

                                    lblAppraise.Text += "由于您所测量为随机血糖值,初步定义为血糖值偏高,但仍需进一步确诊,建议您再次进行“空腹”或“餐后2小时”的血糖测量。\r\n";
                                    printAppraise.Append(@"由于您所测量为随机血糖值,初步定义为
血糖值偏高,但仍需进一步确诊,建议您
再次进行“空腹”或“餐后2小时”的血糖测
量。" + "\r\n");
                                    //给用户打标签
                                    if (!LoginInfo.GetInstance().Name.Equals(""))
                                    {
                                        new PatientRecordsManager().UpdatePatientAllRecords(
                                            int.Parse(ConfigHelper.GetAppsettings("ThahHigherBloodSugar")), "血糖值偏高");
                                    }
                                }
                            }
                        }
                    }

                    //***************************************高危因素结果***********************************************
                    //第八题及第九题,≥1个,选择了B、C、D
                    StringBuilder sb      = new StringBuilder();
                    StringBuilder sbText  = new StringBuilder();
                    string        answer8 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Thah, QuestionnaireCode.Thah + ".8");
                    string        answer9 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Thah, QuestionnaireCode.Thah + ".9");
                    if (answer8.Contains("B") || answer8.Contains("C") || answer8.Contains("D") || answer9.Contains("B") ||
                        answer9.Contains("C") || answer9.Contains("D"))
                    {
                        sb.Append("\r\n高危因素" + "\r\n");
                    }
                    if (answer8.Contains("B") || answer8.Contains("C") || answer8.Contains("D"))
                    {
                        sb.Append("高血压家族史" + "\r\n");
                        sbText.Append("高血压家族史" + "\r\n");
                    }
                    if (answer9.Contains("B") || answer9.Contains("C") || answer9.Contains("D"))
                    {
                        sb.Append("糖尿病家族史" + "\r\n");
                        sbText.Append("糖尿病家族史" + "\r\n");
                    }

                    //第五题,bmi
                    decimal?bmi     = null;
                    string  answer5 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Thah, QuestionnaireCode.Thah + ".5");
                    if (!string.IsNullOrEmpty(answer5))
                    {
                        bmi = decimal.Parse(answer5.Substring(0, answer5.Length - 1));
                    }

                    if (sex.HasValue && age.HasValue && bmi.HasValue)
                    {
                        //获取bmi结果
                        WeightStandardState weightStandardState = screenWebapiClient.GetBmiResult(sex.Value, age.Value,
                                                                                                  bmi.Value);
                        if (weightStandardState == WeightStandardState.Overweight)
                        {
                            if (!sb.ToString().Contains("高危因素"))
                            {
                                sb.Insert(0, "\r\n高危因素" + "\r\n");
                            }
                            sb.Append("超重" + "\r\n");
                            sbText.Append("超重" + "\r\n");
                        }
                        else if (weightStandardState == WeightStandardState.Obesity)
                        {
                            if (!sb.ToString().Contains("高危因素"))
                            {
                                sb.Insert(0, "\r\n高危因素" + "\r\n");
                            }
                            sb.Append("肥胖" + "\r\n");
                            sbText.Append("肥胖" + "\r\n");
                        }
                    }
                    if (string.IsNullOrEmpty(sbText.ToString()))
                    {
                        sbText.Append("无" + "\r\n");
                    }

                    if (!string.IsNullOrEmpty(sb.ToString()))
                    {
                        printResult += sb.ToString();
                    }
                    lblDangerReason.Text = sbText.ToString();
                }
            }
            catch (Exception ex)
            {
                screenWebapiClient.AddErrorLog(new M_LogForAtm {
                    Title = "筛查机客户端错误", Content = ex.ToString(), Description = "青少年二高筛查问卷"
                });
            }
        }
Example #11
0
        private void GetResult()
        {
            try
            {
                var questionnaire = ClientInfo.GetQuestionnaireByCode(Code);

                //如果本地问卷记录为空,则从数据库取数据
                if (questionnaire == null)
                {
                    questionnaire = _screenWebapiClient.GetQuestionnaireUserDetailById(Properties.Settings.Default.QuestionnaireRecodId);
                    if (questionnaire != null)
                    {
                        questionnaire.Questions = _screenWebapiClient.GetQuestionnaireResultDetails(questionnaire.QuestionnaireRecodId);
                    }
                }
                //问卷答题时间
                _answerTime = questionnaire != null ? questionnaire.AnswerTime : DateTime.Now;

                var questions = questionnaire != null? questionnaire.Questions:null;
                var score     = CalculateScore(questions);
                //将登录人与活动关联
                if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    new CottageActivityManager().AddPToCActivity();
                }

                //取出第6.1题用来判断
                var question6_1 = questions.Where(p => p.QuestionCode.Equals(Code + ".6.1")).FirstOrDefault();

                if (score < 25)
                {
                    //高危(只要选了该选项,分数为33)
                    if (question6_1 != null && question6_1.QuestionResult.Contains("A"))
                    {
                        score = 33;
                    }
                    //中危(只要选了该选项,分数为25)
                    else if (question6_1 != null && question6_1.QuestionResult.Contains("B"))
                    {
                        score = 25;
                    }
                    else
                    {
                        lblResult.Text = @"应该不用担心患有糖尿病。
健康的生活习惯和适量的运动可以预防糖尿病。
合理控制饮食也至关重要,饮食要清淡,控制糖分的摄入,多吃新鲜的蔬菜等。";
                        _score         = @"应该不用担心患有糖尿病。健康的生活习
惯和适量的运动可以预防糖尿病。合理控
制饮食也至关重要,饮食要清淡,控制糖
分的摄入,多吃新鲜的蔬菜等。";

                        //更新问卷
                        if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name) && questionnaire != null)
                        {
                            ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaire, score, new List <int>
                            {
                                int.Parse(ConfigHelper.GetAppsettings("DiabetesMediumRisk")),
                                int.Parse(ConfigHelper.GetAppsettings("DiabetesHighRisk"))
                            });
                        }
                    }
                }
                if (score >= 25 && score < 33)
                {
                    //高危(只要选了该选项,分数为33)
                    if (question6_1 != null && question6_1.QuestionResult.Contains("A"))
                    {
                        score = 33;
                    }
                    else
                    {
                        lblResult.Text = @"您本次糖尿病筛查的结果为中危,存在患有糖尿病风险。
请平衡饮食以及控制体重,保持适量的运动。
建议您咨询专科医生,在医院作进一步检查,预防并发症的发生。
祝您健康!";
                        _score         = @"您本次糖尿病筛查的结果为中危,存在患
有糖尿病风险。请平衡饮食以及控制体重
,保持适量的运动。建议您咨询专科医生
,在医院作进一步检查,预防并发症的发
生。祝您健康!";
                        //更新问卷
                        if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name) && questionnaire != null)
                        {
                            ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaire, score, new List <int>
                            {
                                int.Parse(ConfigHelper.GetAppsettings("DiabetesMediumRisk")),
                                int.Parse(ConfigHelper.GetAppsettings("DiabetesHighRisk"))
                            });
                        }
                        TagUser(1909, "糖尿病中危");
                    }
                }
                if (score >= 33)
                {
                    lblResult.Text = @"您本次糖尿病筛查的结果为高危,存在患有糖尿病风险。
建议您咨询专科医生,在医院作进一步检查,预防并发症的发生,
必要时在医生指导下使用降糖药物治疗。
祝您健康!";
                    _score         = @"您本次糖尿病筛查的结果为高危,存在患
有糖尿病风险。建议您咨询专科医生,在
医院作进一步检查,预防并发症的发生,
必要时在医生指导下使用降糖药物治疗。
祝您健康!";
                    //更新问卷
                    if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name) && questionnaire != null)
                    {
                        ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaire, score, new List <int>
                        {
                            int.Parse(ConfigHelper.GetAppsettings("DiabetesMediumRisk")),
                            int.Parse(ConfigHelper.GetAppsettings("DiabetesHighRisk"))
                        });
                    }
                    TagUser(1910, "糖尿病高危");
                }

                _score = @"本次筛查得分:" + score + "\r\n" + "筛查结果:\r\n" + _score;

                lblResult.Text = @"本次筛查得分:" + score + "\r\n" + "筛查结果:\r\n" + lblResult.Text;

                if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    return;
                }
                var number  = string.Format("{0:d4}", Settings.Default.ScreenNumber);
                var saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questions);

                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }
            catch (Exception ex)
            {
                _screenWebapiClient.AddErrorLog(new M_LogForAtm {
                    Title = "筛查机客户端错误", Content = ex.ToString(), Description = "糖尿病筛查问卷"
                });
            }
        }
Example #12
0
        private void DaChangResult_Load(object sender, EventArgs e)
        {
            //问卷答题时间
            answerTime = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiDaChangAi).AnswerTime;

            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiDaChangAi);

                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                //游客编号
                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }

            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }


            int    num       = 1;
            string answerA03 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".A03");

            if (answerA03.Contains("A"))
            {
                lblResult.Text += "有不明原因消瘦 \r";
                strResultPrint.Append("有不明原因消瘦 \r");
            }
            num++;

            string answerA09 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".A09");

            if (answerA09.Contains("A"))
            {
                string answerA091 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                               QuestionnaireCode.ZaoAiDaChangAi + ".A09.1");
                if (answerA091.Length > 0)
                {
                    lblResult.Text += "从事过接触有害致癌物质的职业 \r";
                    strResultPrint.Append("从事过接触有害致癌物质的职业 \r");
                    num++;
                }
            }

            string answerB14 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".B01.4");
            string answerB15 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".B01.5");
            string answerB16 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".B01.6");
            string answerB17 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".B01.7");
            string answerB18 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".B01.8");

            if (answerB14.Contains("A"))
            {
                lblResult.Text += "高脂饮食 \r";
                strResultPrint.Append("高脂饮食 \r");
                num++;
            }
            if (answerB15.Contains("C"))
            {
                lblResult.Text += "喜食腌制、熏制食品 \r";
                strResultPrint.Append("喜食腌制、熏制食品 \r");
                num++;
            }
            if (answerB16.Contains("C"))
            {
                lblResult.Text += "过多进食霉变食物 \r";
                strResultPrint.Append("过多进食霉变食物 \r");
                num++;
            }
            if (answerB17.Contains("C"))
            {
                lblResult.Text += "少食新鲜蔬菜 \r";
                strResultPrint.Append("少食新鲜蔬菜 \r");
                num++;
            }
            if (answerB18.Contains("C"))
            {
                lblResult.Text += "低纤维饮食 \r";
                strResultPrint.Append("低纤维饮食 \r");
                num++;
            }

            string answerC3 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                         QuestionnaireCode.ZaoAiDaChangAi + ".C03");

            if (answerC3.Contains("B"))
            {
                string answerC31 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                              QuestionnaireCode.ZaoAiDaChangAi + ".C03.1");
                string answerC32 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                              QuestionnaireCode.ZaoAiDaChangAi + ".C03.2");
                string c31Result = "";
                string c32Result = "";
                if (answerC31.Contains("A"))
                {
                    c31Result += "1-5支/天,";
                }
                else if (answerC31.Contains("B"))
                {
                    c31Result += "5-10支/天,";
                }
                else if (answerC31.Contains("C"))
                {
                    c31Result += "10-20支/天,";
                }
                else if (answerC31.Contains("D"))
                {
                    c31Result += "20支以上/天,";
                }
                else
                {
                    c31Result = "";
                }

                if (answerC32.Contains("A"))
                {
                    c32Result += "1-3年,";
                }
                else if (answerC32.Contains("B"))
                {
                    c32Result += "3-5年,";
                }
                else if (answerC32.Contains("C"))
                {
                    c32Result += "5-10年,";
                }
                else if (answerC32.Contains("D"))
                {
                    c32Result += "10年以上,";
                }
                else
                {
                    c32Result = "";
                }
                //by 洪鹏
                if (!string.IsNullOrEmpty(c31Result) && !string.IsNullOrEmpty(c32Result))
                {
                    lblResult.Text += "吸烟(" + c31Result + c32Result.Substring(0, c32Result.Length - 1) + ") \r";
                    strResultPrint.Append("吸烟(" + c31Result + c32Result.Substring(0, c32Result.Length - 1) + ") \r");
                    num++;
                }
                else if (!string.IsNullOrEmpty(c31Result))
                {
                    lblResult.Text += "吸烟(" + c31Result + ") \r";
                    strResultPrint.Append("吸烟(" + c31Result + ") \r");
                    num++;
                }
                else if (!string.IsNullOrEmpty(c32Result))
                {
                    lblResult.Text += "吸烟(" + c32Result.Substring(0, c32Result.Length - 1) + ") \r";
                    strResultPrint.Append("吸烟(" + c32Result.Substring(0, c32Result.Length - 1) + ") \r");
                    num++;
                }
                //end

                //by 杨双
                //if (string.IsNullOrEmpty(c31Result) && !string.IsNullOrEmpty(c32Result))
                //{
                //    lblResult.Text += "吸烟(" +c32Result.Substring(0, c32Result.Length - 1) + ") \r";
                //    strResultPrint.Append("吸烟(" + c32Result.Substring(0, c32Result.Length - 1) + ") \r");
                //    num++;
                //}
                //if (string.IsNullOrEmpty(c32Result) && !string.IsNullOrEmpty(c31Result))
                //{
                //    lblResult.Text += "吸烟(" + c31Result + ") \r";
                //    strResultPrint.Append("吸烟(" + c31Result + ") \r");
                //    num++;
                //}
                //end

                if (string.IsNullOrEmpty(c31Result) && string.IsNullOrEmpty(c32Result))
                {
                    lblResult.Text += "目前仍在吸烟 \r";
                    strResultPrint.Append("目前仍在吸烟 \r");
                    num++;
                }
            }
            else if (answerC3.Contains("C"))
            {
                string answerC33 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                              QuestionnaireCode.ZaoAiDaChangAi + ".C03.3");
                if (answerC33.Contains("A"))
                {
                    lblResult.Text += "有吸烟史,戒烟少于15年 \r";
                    strResultPrint.Append("有吸烟史,戒烟少于15年 \r");
                    num++;
                }
            }

            string answerC4 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                         QuestionnaireCode.ZaoAiDaChangAi + ".C04");

            if (answerC4.Contains("B"))
            {
                lblResult.Text += "长期被动吸烟 \r";
                strResultPrint.Append("长期被动吸烟 \r");
                num++;
            }

            string answerD01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".D01");

            if (answerD01.Contains("A"))
            {
                lblResult.Text += "有较大精神创伤史 \r";
                strResultPrint.Append("有较大精神创伤史 \r");
                num++;
            }

            string answerD02 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".D02");

            if (answerD02.Contains("A"))
            {
                lblResult.Text += "长期精神抑郁 \r";
                strResultPrint.Append("长期精神抑郁 \r");
                num++;
            }

            string answerE01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".E01");

            if (answerE01.Contains("A"))
            {
                string answerE011 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                               QuestionnaireCode.ZaoAiDaChangAi + ".E01.1");
                lblResult.Text += "有" + answerE011 + "癌病史 \r";
                strResultPrint.Append("有" + answerE011 + "癌病史 \r");
                num++;
            }

            string answerE74 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".E07.4");
            string answerE78 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".E07.8");
            string answerE79 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".E07.9");

            if (answerE74.Contains("A"))
            {
                lblResult.Text += "有血吸虫感染病史 \r";
                strResultPrint.Append("有血吸虫感染病史 \r");
                num++;
            }

            if (answerE78.Contains("A"))
            {
                lblResult.Text += "有慢性胆道感染病史 \r";
                strResultPrint.Append("有慢性胆道感染病史 \r");
                num++;
            }

            if (answerE79.Contains("A"))
            {
                lblResult.Text += "有胆囊切除手术史 \r";
                strResultPrint.Append("有胆囊切除手术史 \r");
                num++;
            }

            string answerE08 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E08");

            if (answerE08.Contains("A"))
            {
                string answerE081 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E08.1");
                if (answerE081.Contains("A"))
                {
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "有肠息肉病史 \r";
                        strResultAppendPrint.Append("有肠息肉病史 \r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有肠息肉病史 \r";
                        strResultPrint.Append("有肠息肉病史 \r");
                        num++;
                    }
                }

                string answerE082 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E08.2");
                if (answerE082.Contains("A"))
                {
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "有炎症性肠病病史 \r";
                        strResultAppendPrint.Append("有炎症性肠病病史 \r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有炎症性肠病病史 \r";
                        strResultPrint.Append("有炎症性肠病病史 \r");
                        num++;
                    }
                }
                string answerE083 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E08.3");
                if (answerE083.Contains("A"))
                {
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "有慢性阑尾炎病史 \r";
                        strResultAppendPrint.Append("有慢性阑尾炎病史 \r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有慢性阑尾炎病史 \r";
                        strResultPrint.Append("有慢性阑尾炎病史 \r");
                        num++;
                    }
                }
                string answerE084 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E08.4");
                if (answerE084.Contains("A"))
                {
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "有排血便史 \r";
                        strResultAppendPrint.Append("有排血便史 \r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有排血便史 \r";
                        strResultPrint.Append("有排血便史 \r");
                        num++;
                    }
                }
                string answerE085 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E08.5");
                if (answerE085.Contains("A"))
                {
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "有慢性腹痛、腹泻史 \r";
                        strResultAppendPrint.Append("有慢性腹痛、腹泻史 \r");
                        num++;
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有慢性腹痛、腹泻史 \r";
                        strResultPrint.Append("有慢性腹痛、腹泻史 \r");
                        num++;
                    }
                }
                string answerE086 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E08.6");
                if (answerE086.Contains("A"))
                {
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "结肠息肉综合征史 \r";
                        strResultAppendPrint.Append("结肠息肉综合征史 \r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "结肠息肉综合征史 \r";
                        strResultPrint.Append("结肠息肉综合征史 \r");
                        num++;
                    }
                }
                string answerE087 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E08.7");
                if (answerE087.Contains("A"))
                {
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "有下消化系统疾病病史 \r";
                        strResultAppendPrint.Append("有下消化系统疾病病史 \r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有下消化系统疾病病史 \r";
                        strResultPrint.Append("有下消化系统疾病病史 \r");
                        num++;
                    }
                }
            }

            string answerE09 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E09");

            if (answerE09.Contains("A"))
            {
                string answerE091 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E09.1");
                string answerE092 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E09.2");
                string answerE093 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E09.3");
                string answerE094 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E09.4");
                string answerE095 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E09.5");
                if (answerE094.Contains("A"))
                {
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "有代谢综合征 \r";
                        strResultAppendPrint.Append("有代谢综合征 \r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有代谢综合征 \r";
                        strResultPrint.Append("有代谢综合征 \r");
                        num++;
                    }
                }
                else
                {
                    if (answerE091.Contains("A") && answerE092.Contains("A") && answerE093.Contains("A"))
                    {
                        if (num >= 15)
                        {
                            lblResultAppend.Text += "有代谢综合征可能 \r";
                            strResultAppendPrint.Append("有代谢综合征可能 \r");
                            num++;
                        }
                        else
                        {
                            lblResult.Text += "有代谢综合征可能 \r";
                            strResultPrint.Append("有代谢综合征可能 \r\n");
                            num++;
                        }
                    }
                }


                if (answerE095.Contains("A"))
                {
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "有缺铁性贫血病史 \r";
                        strResultAppendPrint.Append("有缺铁性贫血病史 \r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有缺铁性贫血病史 \r";
                        strResultPrint.Append("有缺铁性贫血病史 \r");
                        num++;
                    }
                }
            }
            string answerE10 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi, QuestionnaireCode.ZaoAiDaChangAi + ".E10");

            if (answerE10.Contains("A"))
            {
                if (num >= 15)
                {
                    lblResultAppend.Text += "有盆腔放疗史 \r";
                    strResultAppendPrint.Append("有盆腔放疗史 \r");
                    num++;
                }
                else
                {
                    lblResult.Text += "有盆腔放疗史 \r";
                    strResultPrint.Append("有盆腔放疗史 \r");
                    num++;
                }
            }

            string answerF01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                          QuestionnaireCode.ZaoAiDaChangAi + ".F01");

            if (answerF01.Contains("A"))
            {
                string answerF011 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                               QuestionnaireCode.ZaoAiDaChangAi + ".F01.1");
                if (answerF011.Contains("A"))
                {
                    string answerF012 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiDaChangAi,
                                                                   QuestionnaireCode.ZaoAiDaChangAi + ".F01.2");
                    string result = string.Empty;
                    if (answerF012.Contains("A"))
                    {
                        result += "母亲、";
                    }
                    if (answerF012.Contains("B"))
                    {
                        result += "父亲、";
                    }
                    if (answerF012.Contains("C"))
                    {
                        result += "姐妹、";
                    }
                    if (answerF012.Contains("D"))
                    {
                        result += "兄弟、";
                    }
                    if (answerF012.Contains("E"))
                    {
                        result += "祖父母、";
                    }
                    if (answerF012.Contains("F"))
                    {
                        result += "外祖父母、";
                    }
                    if (answerF012.Contains("G"))
                    {
                        result += "叔姑、";
                    }
                    if (answerF012.Contains("H"))
                    {
                        result += "舅姨、";
                    }
                    if (answerF012.Contains("I"))
                    {
                        result += "堂兄弟姐妹、";
                    }
                    if (answerF012.Contains("J"))
                    {
                        result += "表兄弟姐妹、";
                    }
                    if (answerF012.Contains("K"))
                    {
                        result += "其他、";
                    }
                    if (num >= 15)
                    {
                        lblResultAppend.Text += "有大肠癌家族史(" + result + ") \r";
                        strResultAppendPrint.Append("有大肠癌家族史\r");
                        num++;
                    }
                    else
                    {
                        lblResult.Text += "有大肠癌家族史(" + result + ") \r";
                        strResultPrint.Append("有大肠癌家族史\r");
                        num++;
                    }
                }
            }
            if (string.IsNullOrEmpty(lblResult.Text) && string.IsNullOrEmpty(lblResultAppend.Text))
            {
                lblResult.Text = "恭喜您,您是大肠癌的低风险人群。风险低的人群,不能完全排除患癌症的可能性,建议定期做全面体检,以及时了解身体健康状况。并继续保持良好的生活方式。";

                strResultPrint = new StringBuilder(@"恭喜您,您是大肠癌的低风险人群。风
险低的人群,不能完全排除患癌症的可
能性,建议定期做全面体检,以及时了
解身体健康状况。并继续保持良好的生
活方式。");

                panel1.Visible = false;
            }
        }
Example #13
0
        private void Result_Load(object sender, EventArgs e)
        {
            M_QuestionnaireUserDetail questionnaire = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.KangFuJiZhu);

            //问卷答题时间
            answerTime = questionnaire.AnswerTime;

            if (questionnaire == null)
            {
                return;
            }

            IList <M_QuestionnaireResultDetail> questions = questionnaire.Questions;

            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }

            int score = 0;

            #region 计算每题得分
            if (questions != null && questions.Count > 0)
            {
                for (int i = 0; i < questions.Count; i++)
                {
                    M_QuestionnaireResultDetail result = questions[i];

                    string answer = result.QuestionResult;

                    if (!string.IsNullOrEmpty(answer) && answer.Contains("A"))
                    {
                        score += 10;
                    }
                } // end for
            }     // end  if (questions != null && questions.Count > 0)

            if (score <= 10)
            {
                lblResult.Text = @"基本正常。";
            }

            if (score > 10 && score <= 20)
            {
                lblResult.Text = @"疑似脊柱侧弯。";

                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    //给用户打标签
                    List <M_MemberFeaturesRecord> array = new List <M_MemberFeaturesRecord>()
                    {
                        new M_MemberFeaturesRecord()
                        {
                            CreateID = Properties.Settings.Default.DoctorId, CreateTime = DateTime.Now, MFItemID = 1725, PatientID = LoginInfo.GetInstance().UserId
                        }
                    };

                    M_MemberFeaturesRecordLogExt recordLogExt = new M_MemberFeaturesRecordLogExt();
                    recordLogExt.DoctorID   = Properties.Settings.Default.DoctorId;
                    recordLogExt.DoctorName = Properties.Settings.Default.DoctorName;
                    recordLogExt.DrID       = Properties.Settings.Default.DoctorId;
                    recordLogExt.DrName     = Properties.Settings.Default.DoctorName;
                    recordLogExt.OpID       = Properties.Settings.Default.DoctorId;
                    recordLogExt.OpName     = Properties.Settings.Default.DoctorName;

                    int cARecordId = Properties.Settings.Default.SetIsCustomer
                        ? 0
                        : Properties.Settings.Default.CARecordID;

                    screenWebapiClient.UpdateMemberAllRecords(LoginInfo.GetInstance().UserId, array, recordLogExt, cARecordId, "脊柱筛查");
                }
            }

            if (score > 20)
            {
                lblResult.Text = @"确定您有脊柱侧弯,请前往医院就诊。";

                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    //给用户打标签
                    List <M_MemberFeaturesRecord> array = new List <M_MemberFeaturesRecord>()
                    {
                        new M_MemberFeaturesRecord()
                        {
                            CreateID = Properties.Settings.Default.DoctorId, CreateTime = DateTime.Now, MFItemID = 1726, PatientID = LoginInfo.GetInstance().UserId
                        }
                    };

                    M_MemberFeaturesRecordLogExt recordLogExt = new M_MemberFeaturesRecordLogExt();
                    recordLogExt.DoctorID   = Properties.Settings.Default.DoctorId;
                    recordLogExt.DoctorName = Properties.Settings.Default.DoctorName;
                    recordLogExt.DrID       = Properties.Settings.Default.DoctorId;
                    recordLogExt.DrName     = Properties.Settings.Default.DoctorName;
                    recordLogExt.OpID       = Properties.Settings.Default.DoctorId;
                    recordLogExt.OpName     = Properties.Settings.Default.DoctorName;

                    int cARecordId = Properties.Settings.Default.SetIsCustomer
                        ? 0
                        : Properties.Settings.Default.CARecordID;

                    screenWebapiClient.UpdateMemberAllRecords(LoginInfo.GetInstance().UserId, array, recordLogExt, cARecordId, "脊柱筛查");
                }
            }

            lblResult.Text += @"本次得分:" + score;

            //更新本次问卷得分
            M_QuestionnaireUserDetail userDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.KangFuJiZhu);
            if (userDetail != null && !string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
            {
                int result = screenWebapiClient.UpdateQuestionUserScoreStatus(userDetail.QuestionnaireRecodId, score, 1);
            }

            #endregion ;

            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questions);

                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }
        }
Example #14
0
        private void GetResult()
        {
            try
            {
                var questionnaire = ClientInfo.GetQuestionnaireByCode(Code);

                //如果本地问卷记录为空,则从数据库取数据
                if (questionnaire == null)
                {
                    questionnaire = _screenWebapiClient.GetQuestionnaireUserDetailById(Properties.Settings.Default.QuestionnaireRecodId);
                    if (questionnaire != null)
                    {
                        questionnaire.Questions = _screenWebapiClient.GetQuestionnaireResultDetails(questionnaire.QuestionnaireRecodId);
                    }
                }
                //问卷答题时间
                _answerTime = questionnaire != null ? questionnaire.AnswerTime : DateTime.Now;

                var questions = questionnaire != null? questionnaire.Questions:null;
                var score     = CalculateScore(questions);
                //将登录人与活动关联
                if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    new CottageActivityManager().AddPToCActivity();
                }
                //更新问卷
                if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name) && questionnaire != null)
                {
                    ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaire, score, new List <int>
                    {
                        int.Parse(ConfigHelper.GetAppsettings("SpineModerate")),
                        int.Parse(ConfigHelper.GetAppsettings("SpineSerious"))
                    });
                }
                if (score <= 30)
                {
                    lblResult.Text  = @"恭喜您,您的脊柱基本正常,平时请保持正确的坐姿以及站姿,加强肌肉锻炼,预防脊柱侧弯的发生。";
                    printResult     = @"恭喜您,您的脊柱基本正常,平时请保持
正确的坐姿以及站姿,加强肌肉锻炼,预
防脊柱侧弯的发生。" + "\r\n";
                    lblResult.Text += AnalysisLightUnusual(questions);
                }
                else if (score > 30 && score <= 50)
                {
                    lblResult.Text = @"可能脊柱异常。建议复查进一步确诊治疗,避免饮食过量以超重从而增加脊椎的重量,平时请保持正确的坐姿以及站姿,到专业机构在专业医生的指导下进行正规的康复训练等,防止病变继续发展而引起身体其他部位异常改变。";
                    printResult    = @"可能脊柱异常。建议复查进一步确诊治疗
,避免饮食过量以超重从而增加脊椎的重
量,平时请保持正确的坐姿以及站姿,到
专业机构在专业医生的指导下进行正规的
康复训练等,防止病变继续发展而引起身
体其他部位异常改变。" + "\r\n";

                    TagUser(1725, "可能脊柱异常");
                }
                else if (score > 50)
                {
                    lblResult.Text = @"脊柱异常。建议复查以进一步诊治,并多关注脊柱健康,加强肌肉的锻炼,以及到专业机构选用选择合适的治疗手段(物理治疗、配置脊柱矫形器、手术治疗等),并在专业医生的指导下进行正规的康复训练,尽早进行干预,防止病变继续发展而引起身体其他部位异常改变。";
                    printResult    = @"脊柱异常。建议复查以进一步诊治,并多
关注脊柱健康,加强肌肉的锻炼,以及到
专业机构选用选择合适的治疗手段(物理
治疗、配置脊柱矫形器、手术治疗等),
并在专业医生的指导下进行正规的康复训
练,尽早进行干预,防止病变继续发展而
引起身体其他部位异常改变。" + "\r\n";

                    TagUser(1726, "脊柱异常");
                }

                _score = @"本次筛查得分:" + score + "\r\n\r\n" + "筛查结果:\r\n" + printResult;

                //lblResult.Text += @"本次得分:" + score;
                lblResult.Text = string.Format("本次筛查得分:{0}\r\n筛查结果:{1}", score, lblResult.Text);


                if (!string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    return;
                }
                var number  = string.Format("{0:d4}", Properties.Settings.Default.ScreenNumber);
                var saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questions);

                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }
            catch (Exception ex)
            {
                _screenWebapiClient.AddErrorLog(new M_LogForAtm {
                    Title = "筛查机客户端错误", Content = ex.ToString(), Description = "脊柱筛查问卷"
                });
            }
        }
Example #15
0
        private void ResultFrm_Load(object sender, EventArgs e)
        {
            //问卷答题时间
            answerTime = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.NaoCuZhong).AnswerTime;

            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.NaoCuZhong);

                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                //游客编号
                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }

            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }


            string[] answer = { "", "", "", "", "", "", "", "", "", "" };
            answer[0] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".1");
            answer[1] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".2");
            answer[2] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".3");
            answer[3] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".4");
            answer[4] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".5");
            answer[5] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".6");
            answer[6] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".7");
            answer[7] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".8");
            answer[8] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".9");
            answer[9] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".10");

            string answer41 = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoCuZhong, QuestionnaireCode.NaoCuZhong + ".4.1");

            //判断高危中危

            /*
             * 前八项有任意三项“是”,或者后两项有任意一项“是”,则为高位人群。
             * 前八项有任意两项“是”,且患有高血压、糖尿病、瓣膜性心脏病中任意一项,则为中危人群。
             * 《=2项的,没有上述慢性病的为低位人群。*/
            int iForEightCount = 0;  //前八题回答是的个数

            for (int i = 0; i <= 7; i++)
            {
                if (answer[i].Contains("A"))
                {
                    iForEightCount++;
                }
            }

            int iLastTwoCount = 0; //后两题回答为是的个数

            if (answer[8].Contains("A"))
            {
                iLastTwoCount++;
            }
            if (answer[9].Contains("A"))
            {
                iLastTwoCount++;
            }

            //高血压风险因子
            bool hasPresure = false;

            //糖尿病风险因子
            bool hasSugar = false;

            bool hasHeart = false;

            if (answer[0].Contains("A"))
            {
                hasPresure = true;
            }
            if (answer[2].Contains("A"))
            {
                hasSugar = true;
            }
            if (answer41.Contains("C"))
            {
                hasHeart = true;
            }


            string        strSugestion          = "";
            StringBuilder strSugestionTempPrint = new StringBuilder();

            //高血压风险因子
            if (hasPresure)
            {
                strSugestion += "  少食或不吃高脂食物,多吃富含钙的食物,严格限盐(每日摄入量为7g-8g),多饮水,首选温开水和淡茶水,每日至少1200ml。\r\n";
                strSugestionTempPrint.Append(@"少食或不吃高脂食物,多吃富含钙的食
物,严格限盐(每日摄入量为7g-8g),
多饮水,首选温开水和淡茶水,每日至
少1200ml。" + "\r\n");
            }

            //糖尿病风险因子
            if (hasSugar)
            {
                strSugestion += "  少吃水果,每餐主食应控制在7、8分饱即可,适量吃粗杂粮。每日吃50-100g粗粮,每日可以吃适量鱼肉和畜禽肉,一般控制在2两左右为好。\r\n";
                strSugestionTempPrint.Append(@"少吃水果,每餐主食应控制在7、8分
饱即可,适量吃粗杂粮。每日吃50-100g
粗粮,每日可以吃适量鱼肉和畜禽肉,
一般控制在2两左右为好。" + "\r\n");
            }

            //血脂异常风险因子
            if (answer[1].Contains("A")) //血脂异常
            {
                strSugestion += "  每周蛋黄摄入不超过3个,尽量不吃的食物:猪蹄、五花肉、肥肉、动物内脏、腊肉、动物皮、蟹黄、鱼子等,多吃菌藻类食物,每周泡泡山楂茶2-3次,多吃粗杂粮等富含纤维素的食物。\r\n";
                strSugestionTempPrint.Append(@"每周蛋黄摄入不超过3个,尽量不吃的
食物:猪蹄、五花肉、肥肉、动物内脏、
腊肉、动物皮、蟹黄、鱼子等,多吃菌
藻类食物,每周泡泡山楂茶2-3次,多
吃粗杂粮等富含纤维素的食物。" + "\r\n");
            }

            //心脏病风险因子
            if (answer[3].Contains("A")) //心脏病
            {
                strSugestion += "  低脂低胆固醇饮食,低糖饮食:少吃甜食,多吃富含膳食纤维的食物:新鲜蔬菜、水果、菌藻、粗粮等。\r\n";
                strSugestionTempPrint.Append(@"低脂低胆固醇饮食,低糖饮食:少吃甜
食,多吃富含膳食纤维的食物:新鲜蔬
菜、水果、菌藻、粗粮等。" + "\r\n");
            }

            //吸烟因子
            if (answer[4].Contains("A"))
            {
                strSugestion += "  戒烟。\r\n";
                strSugestionTempPrint.Append(@"戒烟。" + "\r\n");
            }

            //肥胖风险因子
            if (answer[5].Contains("A"))
            {
                strSugestion += "  少吃肥肉、糕点甜品、动物油、动物内脏、油炸食品、各种加工零食、碳酸饮料,每日吃1-2两粗杂粮。进食宜慢不宜快,少食多餐控体重。\r\n";
                strSugestionTempPrint.Append(@"少吃肥肉、糕点甜品、动物油、动物内
脏、油炸食品、各种加工零食、碳酸饮
料,每日吃1-2两粗杂粮。进食宜慢不
宜快,少食多餐控体重。" + "\r\n");
            }

            //运动缺乏或轻体力劳动者
            if (answer[6].Contains("A"))
            {
                strSugestion += "  每周体育锻炼≥3次、每次≥30分钟,并坚持形成习惯。\r\n";
                strSugestionTempPrint.Append(@"每周体育锻炼≥3次、每次≥30分钟,并
坚持形成习惯。" + "\r\n");
            }


//            lblSuguestion.Text = strSugestion == "" ? "恭喜您,您属于脑卒中低危人群,请您继续保持合理饮食生活习惯!" : strSugestion;
//            //用于打印
//            strSugestionPrint.Append(strSugestionTempPrint.ToString() == "" ? @"恭喜您,您属于脑卒中低危人群,请您
//继续保持合理饮食生活习惯!" : strSugestionTempPrint.ToString());


            if (iForEightCount >= 3 || iLastTwoCount >= 1) //高危人群
            {
                string strResult    = @"您属于脑卒中高危人群,建议您前去医院检查以下项目:" + "\r\n";
                string strTempPrint = @"您属于脑卒中高危人群,建议您前去医
院检查以下项目:" + "\r\n";

                strResult    += "    颈部血管超声\r\n";
                strTempPrint += "颈部血管超声\r\n";

                strResult    += "    心电图\r\n";
                strTempPrint += "心电图\r\n";

                //高血压风险因子
                if (hasPresure)
                {
                    strResult    += "    同型半胱氨酸HCY\r\n";
                    strTempPrint += "同型半胱氨酸HCY\r\n";
                }

                //糖尿病风险因子
                if (hasSugar)
                {
                    strResult    += "    糖化血红蛋白HbA1c\r\n";
                    strTempPrint += "糖化血红蛋白HbA1c\r\n";
                }

                lblResult.Text = strResult;

                //用于打印
                strResultPrint.Append(strTempPrint);


                //结果建议
                lblSuguestion.Text = strSugestion == "" ? "您属于脑卒中高危人群,请检查以上项目!" : strSugestion;
                //用于打印
                strSugestionPrint.Append(strSugestionTempPrint.ToString() == "" ? @"您属于脑卒中高危人群,请检查以上项目!" : strSugestionTempPrint.ToString());

                //给用户打标签
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new PatientRecordsManager().UpdatePatientAllRecords(1734, "脑卒中高危");
                }

                return;
            }

            if (iForEightCount >= 2)
            {
                if (hasPresure || hasSugar || hasHeart)    //中危人群
                {
                    lblResult.Text = @"您属于脑卒中中危人群,请多注意饮食生活习惯。";
                    strResultPrint.Append(@"您属于脑卒中中危人群,请多注意饮食
生活习惯。");


                    //结果建议
                    lblSuguestion.Text = strSugestion == "" ? "您属于脑卒中中危人群,请多注意饮食生活习惯。" : strSugestion;
                    //用于打印
                    strSugestionPrint.Append(strSugestionTempPrint.ToString() == "" ? @"您属于脑卒中中危人群,请多注意饮食生活习惯。" : strSugestionTempPrint.ToString());

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1735, "脑卒中中危");
                    }

                    return;
                }
            }

            //低危人群
            lblResult.Text = @"您属于脑卒中低危人群,请继续保持合理的饮食生活习惯。";
            strResultPrint.Append(@"您属于脑卒中低危人群,请继续保持合
理的饮食生活习惯。");


            lblSuguestion.Text = strSugestion == "" ? "恭喜您,您属于脑卒中低危人群,请您继续保持合理饮食生活习惯!" : strSugestion;
            //用于打印
            strSugestionPrint.Append(strSugestionTempPrint.ToString() == "" ? @"恭喜您,您属于脑卒中低危人群,请您
继续保持合理饮食生活习惯!" : strSugestionTempPrint.ToString());
        }
Example #16
0
        private void Result_Load(object sender, EventArgs e)
        {
            try
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.NaoNianChiDai);

                //如果本地问卷记录为空,则从数据库取数据
                if (questionnaireUserDetail == null)
                {
                    questionnaireUserDetail = screenWebapiClient.GetQuestionnaireUserDetailById(Properties.Settings.Default.QuestionnaireRecodId);
                    if (questionnaireUserDetail != null)
                    {
                        questionnaireUserDetail.Questions = screenWebapiClient.GetQuestionnaireResultDetails(questionnaireUserDetail.QuestionnaireRecodId);
                    }
                }
                //问卷答题时间
                answerTime = questionnaireUserDetail != null? questionnaireUserDetail.AnswerTime:DateTime.Now;

                //将游客的结果保存为xml
                if (LoginInfo.GetInstance().Name.Equals(""))
                {
                    if (questionnaireUserDetail != null && questionnaireUserDetail.Questions != null && questionnaireUserDetail.Questions.Any())
                    {
                        string number = Properties.Settings.Default.ScreenNumber.ToString();
                        switch (number.Length)
                        {
                        case 1:
                            number = "000" + number;
                            break;

                        case 2:
                            number = "00" + number;
                            break;

                        case 3:
                            number = "0" + number;
                            break;
                        }
                        SaveXml saveXml = new SaveXml();
                        saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                        //显示游客编号
                        lblVisitor.Text   += number;
                        lblVisitor.Visible = true;
                    }
                }

                //将登录人与活动关联
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new CottageActivityManager().AddPToCActivity();
                }

                Single score = 0;

                #region 计算每题得分

                int tempScore = 0;

                DateTime dateNow = DateTime.Today;

                //第一题,每个1分,权重0.8:
                string answerWeek = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".1.1");

                //判断星期
                DayOfWeek week      = dateNow.DayOfWeek;
                string    todayWeek = week.ToString();

                switch (todayWeek)
                {
                case "Monday":
                    todayWeek = "星期一";
                    break;

                case "Tuesday":
                    todayWeek = "星期二";
                    break;

                case "Wednesday":
                    todayWeek = "星期三";
                    break;

                case "Thursday":
                    todayWeek = "星期四";
                    break;

                case "Friday":
                    todayWeek = "星期五";
                    break;

                case "Saturday":
                    todayWeek = "星期六";
                    break;

                case "Sunday":
                    todayWeek = "星期日";
                    break;
                }
                if (answerWeek == todayWeek)
                {
                    tempScore += 1;
                }

                //判断日期
                string answerDay1 = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".1.2");
                //string answerDay2 = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".1.3");

                int tempDay = 0;
                int.TryParse(answerDay1, out tempDay);

                if (tempDay == dateNow.Day)
                {
                    tempScore += 1;
                }

                //判断月份:
                string answerMonth = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".1.4");

                if (answerMonth.Trim() == dateNow.Month.ToString())
                {
                    tempScore += 1;
                }

                string strSeason = "";

                //判断季节:
                string answerSeason             = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".1.5");
                ChineseLunisolarCalendar season = new ChineseLunisolarCalendar();
                switch (season.GetMonth(dateNow))
                {
                case 1:
                case 2:
                case 3:
                    strSeason = "春";
                    break;

                case 4:
                case 5:
                case 6:
                    strSeason = "夏";
                    break;

                case 7:
                case 8:
                case 9:
                    strSeason = "秋";
                    break;

                case 10:
                case 11:
                case 12:
                    strSeason = "冬";
                    break;
                }

                if (answerSeason == strSeason)
                {
                    tempScore += 1;
                }

                //判断年
                string answerYear = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".1.6");
                if (dateNow.Year.ToString() == answerYear)
                {
                    tempScore += 1;
                }

                //第一题得分乘权重
                score += (Single)(tempScore * 0.8);

                //第二题,每答对一项记1分,共3分,权重2.0
                tempScore = 0;
                string answerTwo1 = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".2.1");

                string answerTwo2 = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".2.2");

                string answerTwo3 = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".2.3");

                if (answerTwo1.Contains("A"))
                {
                    tempScore += 1;
                }

                if (answerTwo2.Contains("A"))
                {
                    tempScore += 1;
                }

                if (answerTwo3.Contains("A"))
                {
                    tempScore += 1;
                }

                score += (Single)(tempScore * 2);

                //第三题,每答对一项记1分,共5分,权重1.8
                tempScore = 0;
                string answerThree = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".3");

                if (answerThree.Contains("A"))
                {
                    tempScore += 1;
                }

                if (answerThree.Contains("B"))
                {
                    tempScore += 1;
                }

                if (answerThree.Contains("C"))
                {
                    tempScore += 1;
                }

                if (answerThree.Contains("D"))
                {
                    tempScore += 1;
                }

                if (answerThree.Contains("E"))
                {
                    tempScore += 1;
                }

                score += (Single)(tempScore * 1.8);

                //第四题,根据准确度给分,共5分,权重2.0
                tempScore = 0;
                string answerFour = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".4");

                if (answerFour.Contains("A"))
                {
                    tempScore += 1;
                }

                string answerFourB = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".4.B");

                if (answerFourB.Contains("A"))
                {
                    tempScore += 1;
                }

                string answerFourC = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".4.C");

                if (answerFourC.Contains("A"))
                {
                    tempScore += 1;
                }
                if (answerFourC.Contains("B"))
                {
                    tempScore += 1;
                }
                if (answerFourC.Contains("C"))
                {
                    tempScore += 1;
                }

                score += (Single)(tempScore * 2);

                //第五题,每答对一项记1分,共2分,权重1.4
                tempScore = 0;
                string answerFive  = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".5.1");
                string answerFive2 = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".5.2");

                if (answerFive.Contains("A"))
                {
                    tempScore += 1;
                }

                if (answerFive2.Contains("A"))
                {
                    tempScore += 1;
                }

                score += (Single)(tempScore * 1.4);


                //第六题,选择(1)自己可以做,记1分;(2)有些困难,记2分;(3)需要帮助,记3分;(4)根本无法做,记4分,最高40分,权重-0.8
                tempScore = 0;
                string[] answer6 = { "", "", "", "", "", "", "", "", "", "" };
                answer6[0] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.1");
                answer6[1] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.2");
                answer6[2] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.3");
                answer6[3] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.4");
                answer6[4] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.5");
                answer6[5] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.6");
                answer6[6] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.7");
                answer6[7] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.8");
                answer6[8] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.9");
                answer6[9] = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".6.10");

                for (int i = 0; i <= 9; i++)
                {
                    if (answer6[i].Contains("A"))
                    {
                        tempScore += 1;
                    }
                    if (answer6[i].Contains("B"))
                    {
                        tempScore += 2;
                    }
                    if (answer6[i].Contains("C"))
                    {
                        tempScore += 3;
                    }
                    if (answer6[i].Contains("D"))
                    {
                        tempScore += 4;
                    }
                }

                score -= (Single)(tempScore * 0.8);

                //第七题,辨认1词记1分,共10分,权重1.4
                tempScore = 0;
                string answerSeven = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".7");

                if (answerSeven.Contains("A"))
                {
                    tempScore += 1;
                }
                if (answerSeven.Contains("B"))
                {
                    tempScore += 1;
                }
                if (answerSeven.Contains("C"))
                {
                    tempScore += 1;
                }
                if (answerSeven.Contains("D"))
                {
                    tempScore += 1;
                }
                if (answerSeven.Contains("E"))
                {
                    tempScore += 1;
                }
                if (answerSeven.Contains("F"))
                {
                    tempScore += 1;
                }
                if (answerSeven.Contains("G"))
                {
                    tempScore += 1;
                }
                if (answerSeven.Contains("H"))
                {
                    tempScore += 1;
                }
                if (answerSeven.Contains("I"))
                {
                    tempScore += 1;
                }
                if (answerSeven.Contains("J"))
                {
                    tempScore += 1;
                }

                score += (Single)(tempScore * 1.4);

                //第八题,辨认1词记1分,共10分,权重0.2
                tempScore = 0;
                string answerEight = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".8");

                if (answerEight.Contains("B"))
                {
                    tempScore += 1;
                }
                if (answerEight.Contains("D"))
                {
                    tempScore += 1;
                }
                if (answerEight.Contains("E"))
                {
                    tempScore += 1;
                }
                if (answerEight.Contains("H"))
                {
                    tempScore += 1;
                }
                if (answerEight.Contains("I"))
                {
                    tempScore += 1;
                }
                if (answerEight.Contains("K"))
                {
                    tempScore += 1;
                }
                if (answerEight.Contains("N"))
                {
                    tempScore += 1;
                }
                if (answerEight.Contains("O"))
                {
                    tempScore += 1;
                }
                if (answerEight.Contains("R"))
                {
                    tempScore += 1;
                }
                if (answerEight.Contains("T"))
                {
                    tempScore += 1;
                }

                score += (Single)(tempScore * 0.2);


                //第九题,辨认1词记1分,共10分,权重1.4

                tempScore = 0;
                string answerNine = ClientInfo.GetAnswerByCode(QuestionnaireCode.NaoNianChiDai, QuestionnaireCode.NaoNianChiDai + ".9");

                if (answerNine.Contains("A"))
                {
                    tempScore += 1;
                }
                if (answerNine.Contains("D"))
                {
                    tempScore += 1;
                }
                if (answerNine.Contains("E"))
                {
                    tempScore += 1;
                }
                if (answerNine.Contains("H"))
                {
                    tempScore += 1;
                }
                if (answerNine.Contains("J"))
                {
                    tempScore += 1;
                }
                if (answerNine.Contains("K"))
                {
                    tempScore += 1;
                }
                if (answerNine.Contains("N"))
                {
                    tempScore += 1;
                }
                if (answerNine.Contains("O"))
                {
                    tempScore += 1;
                }
                if (answerNine.Contains("Q"))
                {
                    tempScore += 1;
                }
                if (answerNine.Contains("T"))
                {
                    tempScore += 1;
                }

                score += (Single)(tempScore * 1.4);

                #endregion ;

                //如果总分为负分数,则改成0分
                if (score < 0)
                {
                    score = 0;
                }

                lblR.Text = "本次筛查得分:" + String.Format("{0:F2}", Convert.ToDecimal(score));

                //将本次问卷的得分更新
                if (questionnaireUserDetail != null && !LoginInfo.GetInstance().Name.Equals(""))
                {
                    ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaireUserDetail, Convert.ToDecimal(score), new List <int>
                    {
                        int.Parse(ConfigHelper.GetAppsettings("AdModerate")),
                        int.Parse(ConfigHelper.GetAppsettings("AdSerious"))
                    });
                }

                if (score > 41.3)
                {
                    //正常
                    lblResult3.Visible = true;
                }
                else if (score > 25.7 && score <= 41.3)
                {
                    //中危
                    lblResult2.Visible = true;

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1724, "老年痴呆筛查中危");
                    }
                }
                else if (score <= 25.7)
                {
                    //高危
                    lblResult1.Visible = true;

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1723, "老年痴呆筛查高危");
                    }
                }
            }
            catch (Exception ex)
            {
                screenWebapiClient.AddErrorLog(new M_LogForAtm {
                    Title = "筛查机客户端错误", Content = ex.ToString(), Description = "老年痴呆筛查问卷"
                });
            }
        }
Example #17
0
        private void FeiaiResult_Load(object sender, EventArgs e)
        {
            //问卷答题时间
            answerTime = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiFeiAi).AnswerTime;

            //将游客的结果保存为xml
            if (LoginInfo.GetInstance().Name.Equals(""))
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.ZaoAiFeiAi);

                string number = Properties.Settings.Default.ScreenNumber.ToString();
                switch (number.Length)
                {
                case 1:
                    number = "000" + number;
                    break;

                case 2:
                    number = "00" + number;
                    break;

                case 3:
                    number = "0" + number;
                    break;
                }
                SaveXml saveXml = new SaveXml();
                saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                //游客编号
                lblVisitor.Text   += number;
                lblVisitor.Visible = true;
            }

            //将登录人与活动关联
            if (!LoginInfo.GetInstance().Name.Equals(""))
            {
                new CottageActivityManager().AddPToCActivity();
            }


            string answerA03 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                          QuestionnaireCode.ZaoAiFeiAi + ".A03");

            if (answerA03.Contains("A"))
            {
                lblResult.Text += @"有不明原因消瘦" + "\r";
                strResultPrint.Append(@"有不明原因消瘦" + "\r");
            }

            string answerA09 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                          QuestionnaireCode.ZaoAiFeiAi + ".A09");

            if (answerA09.Contains("A"))
            {
                string answerA091 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".A09.1");
                if (answerA091.Length > 0)
                {
                    lblResult.Text += @"从事过接触有害致癌物质的职业" + "\r";
                    strResultPrint.Append(@"从事过接触有害致癌物质的职业" + "\r");
                }
            }

            string answerC01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                          QuestionnaireCode.ZaoAiFeiAi + ".C01");

            if (answerC01.Contains("A"))
            {
                lblResult.Text += @"长期居住有空气污染的生活环境中" + "\r";
                strResultPrint.Append(@"长期居住有空气污染的生活环境中" + "\r");
            }

            string answerC02 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                          QuestionnaireCode.ZaoAiFeiAi + ".C02");

            if (answerC02.Contains("C") || answerC02.Contains("D"))
            {
                lblResult.Text += @"长期接触厨房油烟" + "\r";
                strResultPrint.Append(@"长期接触厨房油烟" + "\r");
            }

            string answerC03 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                          QuestionnaireCode.ZaoAiFeiAi + ".C03");

            if (answerC03.Contains("B"))
            {
                string answerC031 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".C03.1");
                if (answerC031.Contains("A"))
                {
                    lblResult.Text += @"吸烟≥30包/年" + "\r";
                    strResultPrint.Append(@"吸烟≥30包/年" + "\r");
                }
            }
            if (answerC03.Contains("C"))
            {
                string answerC033 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".C03.3");
                if (answerC033.Contains("A"))
                {
                    lblResult.Text += @"有吸烟≥30包/年史,戒烟少于15年" + "\r";
                    strResultPrint.Append(@"有吸烟≥30包/年史,戒烟少于15年" + "\r");
                }
            }

            string answerC4 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                         QuestionnaireCode.ZaoAiFeiAi + ".C04");

            if (answerC4.Contains("A"))
            {
                string answerC41 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                              QuestionnaireCode.ZaoAiFeiAi + ".C04.1");
                if (!string.IsNullOrEmpty(answerC41))
                {
                    if (answerC41.Contains("A"))
                    {
                        lblResult.Text += @"长期被动吸烟 1-3年" + "\r";
                        strResultPrint.Append(@"长期被动吸烟 1-3年" + "\r");
                    }

                    if (answerC41.Contains("B"))
                    {
                        lblResult.Text += @"长期被动吸烟 3-5年" + "\r";
                        strResultPrint.Append(@"长期被动吸烟 3-5年" + "\r");
                    }

                    if (answerC41.Contains("C"))
                    {
                        lblResult.Text += @"长期被动吸烟 5-10年" + "\r";
                        strResultPrint.Append(@"长期被动吸烟 5-10年" + "\r");
                    }

                    if (answerC41.Contains("D"))
                    {
                        lblResult.Text += @"长期被动吸烟 10年以上" + "\r";
                        strResultPrint.Append(@"长期被动吸烟 10年以上" + "\r");
                    }
                }
                else
                {
                    lblResult.Text += @"长期被动吸烟" + "\r";
                    strResultPrint.Append(@"长期被动吸烟" + "\r");
                }
            }

            string answerE01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                          QuestionnaireCode.ZaoAiFeiAi + ".E01");

            if (answerE01.Contains("A"))
            {
                string answerE011 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".E01.1");
                lblResult.Text += @"有" + answerE011 + @"癌病史" + "\r";
                strResultPrint.Append(@"有" + answerE011 + @"癌病史" + "\r");
            }

            string answerE05 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                          QuestionnaireCode.ZaoAiFeiAi + ".E05");

            if (answerE05.Contains("A"))
            {
                string result = "";
                //用于打印
                string tempResultPrint = "";

                string answerE051 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".E05.1");
                string answerE052 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".E05.2");
                string answerE053 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".E05.3");
                string answerE054 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".E05.4");
                string answerE055 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".E05.5");
                string answerE056 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".E05.6");
                string answerE097 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".E09.7");
                if (answerE051.Contains("A"))
                {
                    result          += @"肺结核,";
                    tempResultPrint += @"肺结核," + "\r";
                }
                if (answerE052.Contains("A"))
                {
                    result          += @"慢性支气管炎,";
                    tempResultPrint += @"慢性支气管炎," + "\r";
                }
                if (answerE053.Contains("A"))
                {
                    result          += @"肺气肿,";
                    tempResultPrint += @"肺气肿," + "\r";
                }
                if (answerE054.Contains("A"))
                {
                    result          += @"哮喘支气管扩张,";
                    tempResultPrint += @"哮喘支气管扩张," + "\r";
                }
                if (answerE055.Contains("A"))
                {
                    result          += @"矽肺或尘肺,";
                    tempResultPrint += @"矽肺或尘肺," + "\r";
                }
                if (!string.IsNullOrEmpty(answerE056))
                {
                    result          += answerE056 + ",";
                    tempResultPrint += answerE056 + ",";
                }
                lblResult.Text += @"有慢性肺部疾病史(" + result + ")" + " \r";
                //用于打印
                strResultPrint.Append("有慢性肺部疾病史(\r" + tempResultPrint + ")" + " \r");

                if (answerE097.Contains("A"))
                {
                    lblResult.Text += @"有慢性咳嗽咳痰、咯血表现" + "\r";
                    strResultPrint.Append(@"有慢性咳嗽咳痰、咯血表现" + "\r");
                }
            }

            string answerF01 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                          QuestionnaireCode.ZaoAiFeiAi + ".F01");

            if (answerF01.Contains("A"))
            {
                string answerF011 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                               QuestionnaireCode.ZaoAiFeiAi + ".F01.1");
                if (answerF011.Contains("A"))
                {
                    string answerF012 = ClientInfo.GetAnswerByCode(QuestionnaireCode.ZaoAiFeiAi,
                                                                   QuestionnaireCode.ZaoAiFeiAi + ".F01.2");
                    string result = string.Empty;
                    //用于打印
                    string resultTempPrint = string.Empty;

                    if (answerF012.Contains("A"))
                    {
                        result          += @"母亲、";
                        resultTempPrint += @"母亲、";
                    }
                    if (answerF012.Contains("B"))
                    {
                        result          += "父亲、";
                        resultTempPrint += "父亲、";
                    }
                    if (answerF012.Contains("C"))
                    {
                        result          += "姐妹、";
                        resultTempPrint += "姐妹、";
                    }
                    if (answerF012.Contains("D"))
                    {
                        result          += "兄弟、";
                        resultTempPrint += "兄弟、";
                    }
                    if (answerF012.Contains("E"))
                    {
                        result          += "祖父母、";
                        resultTempPrint += "祖父母、";
                    }
                    if (answerF012.Contains("F"))
                    {
                        result          += "外祖父母、";
                        resultTempPrint += "外祖父母、";
                    }
                    if (answerF012.Contains("G"))
                    {
                        result          += "叔姑、";
                        resultTempPrint += "叔姑、";
                    }
                    if (answerF012.Contains("H"))
                    {
                        result          += "舅姨、";
                        resultTempPrint += "舅姨、";
                    }
                    if (answerF012.Contains("I"))
                    {
                        result          += "堂兄弟姐妹、";
                        resultTempPrint += "堂兄弟\r\n姐妹、";
                    }
                    if (answerF012.Contains("J"))
                    {
                        result          += "表兄弟姐妹、";
                        resultTempPrint += "表兄弟姐妹、";
                    }
                    if (answerF012.Contains("K"))
                    {
                        result          += "其他、";
                        resultTempPrint += "其他、";
                    }
                    lblResult.Text += @"有肺癌家族史(" + result + ")";
                    strResultPrint.Append(@"有肺癌家族史");
                }
            }

            if (string.IsNullOrEmpty(lblResult.Text))
            {
                this.lblResult.Text = @"恭喜您,您是肺癌的低风险人群。风险低的人群,不能完全排除患癌症的可能性,建议定期做全面体检,以及时了解身体健康状况。并继续保持良好的生活方式。";
                strResultPrint.Append(@"恭喜您,您是肺癌的低风险人群。风险
低的人群,不能完全排除患癌症的可能
性,建议定期做全面体检,以及时了解
身体健康状况。并继续保持良好的生活
方式。");
                panel1.Visible = false;
            }
        }
Example #18
0
        private void IpssResult_Load(object sender, EventArgs e)
        {
            try
            {
                M_QuestionnaireUserDetail questionnaireUserDetail = ClientInfo.GetQuestionnaireByCode(QuestionnaireCode.Ipss);

                //如果本地问卷记录为空,则从数据库取数据
                if (questionnaireUserDetail == null)
                {
                    questionnaireUserDetail = screenWebapiClient.GetQuestionnaireUserDetailById(Properties.Settings.Default.QuestionnaireRecodId);
                    if (questionnaireUserDetail != null)
                    {
                        questionnaireUserDetail.Questions = screenWebapiClient.GetQuestionnaireResultDetails(questionnaireUserDetail.QuestionnaireRecodId);
                    }
                }

                //问卷答题时间
                answerTime = questionnaireUserDetail != null ? questionnaireUserDetail.AnswerTime : DateTime.Now;

                //将游客的结果保存为xml
                if (LoginInfo.GetInstance().Name.Equals(""))
                {
                    if (questionnaireUserDetail != null && questionnaireUserDetail.Questions != null &&
                        questionnaireUserDetail.Questions.Any())
                    {
                        string number = Properties.Settings.Default.ScreenNumber.ToString();
                        switch (number.Length)
                        {
                        case 1:
                            number = "000" + number;
                            break;

                        case 2:
                            number = "00" + number;
                            break;

                        case 3:
                            number = "0" + number;
                            break;
                        }
                        SaveXml saveXml = new SaveXml();
                        saveXml.AddXmlElement(number, questionnaireUserDetail.Questions);

                        //显示游客编号
                        lblVisitor.Text   += number;
                        lblVisitor.Visible = true;
                    }
                }

                //将登录人与活动关联
                if (!LoginInfo.GetInstance().Name.Equals(""))
                {
                    new CottageActivityManager().AddPToCActivity();
                }

                //计算得分(1-5题不记分数,13题不计入总分)
                //总分
                decimal score = 0;

                //第六题
                string answer6 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Ipss, QuestionnaireCode.Ipss + ".6");
                if (answer6.Contains("B"))
                {
                    score += 1;
                }
                if (answer6.Contains("C"))
                {
                    score += 2;
                }
                if (answer6.Contains("D"))
                {
                    score += 3;
                }
                if (answer6.Contains("E"))
                {
                    score += 4;
                }
                if (answer6.Contains("F"))
                {
                    score += 5;
                }

                //第七题
                string answer7 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Ipss, QuestionnaireCode.Ipss + ".7");
                if (answer7.Contains("B"))
                {
                    score += 1;
                }
                if (answer7.Contains("C"))
                {
                    score += 2;
                }
                if (answer7.Contains("D"))
                {
                    score += 3;
                }
                if (answer7.Contains("E"))
                {
                    score += 4;
                }
                if (answer7.Contains("F"))
                {
                    score += 5;
                }

                //第八题
                string answer8 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Ipss, QuestionnaireCode.Ipss + ".8");
                if (answer8.Contains("B"))
                {
                    score += 1;
                }
                if (answer8.Contains("C"))
                {
                    score += 2;
                }
                if (answer8.Contains("D"))
                {
                    score += 3;
                }
                if (answer8.Contains("E"))
                {
                    score += 4;
                }
                if (answer8.Contains("F"))
                {
                    score += 5;
                }

                //第九题
                string answer9 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Ipss, QuestionnaireCode.Ipss + ".9");
                if (answer9.Contains("B"))
                {
                    score += 1;
                }
                if (answer9.Contains("C"))
                {
                    score += 2;
                }
                if (answer9.Contains("D"))
                {
                    score += 3;
                }
                if (answer9.Contains("E"))
                {
                    score += 4;
                }
                if (answer9.Contains("F"))
                {
                    score += 5;
                }

                //第十题
                string answer10 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Ipss, QuestionnaireCode.Ipss + ".10");
                if (answer10.Contains("B"))
                {
                    score += 1;
                }
                if (answer10.Contains("C"))
                {
                    score += 2;
                }
                if (answer10.Contains("D"))
                {
                    score += 3;
                }
                if (answer10.Contains("E"))
                {
                    score += 4;
                }
                if (answer10.Contains("F"))
                {
                    score += 5;
                }

                //第十一题
                string answer11 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Ipss, QuestionnaireCode.Ipss + ".11");
                if (answer11.Contains("B"))
                {
                    score += 1;
                }
                if (answer11.Contains("C"))
                {
                    score += 2;
                }
                if (answer11.Contains("D"))
                {
                    score += 3;
                }
                if (answer11.Contains("E"))
                {
                    score += 4;
                }
                if (answer11.Contains("F"))
                {
                    score += 5;
                }

                //第十二题
                string answer12 = ClientInfo.GetAnswerByCode(QuestionnaireCode.Ipss, QuestionnaireCode.Ipss + ".12");
                if (answer12.Contains("B"))
                {
                    score += 1;
                }
                if (answer12.Contains("C"))
                {
                    score += 2;
                }
                if (answer12.Contains("D"))
                {
                    score += 3;
                }
                if (answer12.Contains("E"))
                {
                    score += 4;
                }
                if (answer12.Contains("F"))
                {
                    score += 5;
                }

                lblResult.Text = "本次筛查得分:" + score;

                printScore = "本次筛查得分:" + score;

                //将本次问卷的得分更新
                if (questionnaireUserDetail != null && !string.IsNullOrEmpty(LoginInfo.GetInstance().Name))
                {
                    ClientInfo.UpdateQuestionnaireStatusScoreAndMemberFeatures(questionnaireUserDetail, score, new List <int>
                    {
                        int.Parse(ConfigHelper.GetAppsettings("BphLight")),
                        int.Parse(ConfigHelper.GetAppsettings("BphModerate")),
                        int.Parse(ConfigHelper.GetAppsettings("BphSerious"))
                    });
                }

                //各分数区间结果
                //h<=2,正常
                if (score <= 2)
                {
                    //lblResult.Text += ",正常";
                    lblSuggest.Text = "暂未发现您有良性前列腺增生,如有疑问,请到专业医疗机构进行详细检查。";
                    printResult     = @"筛查结果:暂未发现您有良性前列腺增
生,如有疑问,请到专业医疗机构进行
详细检查。";
                }
                //3<=h<=7,轻度
                if (score >= 3 && score <= 7)
                {
                    //lblResult.Text += ",轻度";
                    lblSuggest.Text = "初步筛查您的情况为轻度的良性前列腺增生,如果您对您的病症仍有所疑虑,可以考虑应用排尿日记记录您的日常排尿状况,并到专业医疗机构进行复查。";
                    printResult     = @"筛查结果:初步筛查您的情况为轻度的
良性前列腺增生,如果您对您的病症仍
有所疑虑,可以考虑应用排尿日记记录
您的日常排尿状况,并到专业医疗机构
进行复查。";

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1906, "良性前列腺增生筛查轻度");
                    }
                }
                //8=<h=<19,中度
                if (score >= 8 && score <= 19)
                {
                    //lblResult.Text += ",中度";
                    lblSuggest.Text = "初步筛查您的情况为中度的良性前列腺增生,建议进一步复查确诊,在复查前记录排尿日记以供医生作为确诊依据,以及到专业机构选用选择合适的治疗手段(药物治疗,行为治疗等),防止良性前列腺增生对病人生活质量带来的困扰。";
                    printResult     = @"筛查结果:初步筛查您的情况为中度的
良性前列腺增生,建议进一步复查确诊
,在复查前记录排尿日记以供医生作为
确诊依据,以及到专业机构选用选择合
适的治疗手段(药物治疗,行为治疗等)
,防止良性前列腺增生对病人生活质量
带来的困扰。";

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1907, "良性前列腺增生筛查中度");
                    }
                }
                //20=<h=<35,重度
                if (score >= 20 && score <= 35)
                {
                    //lblResult.Text += ",重度";
                    lblSuggest.Text = "初步筛查您的情况为重度的良性前列腺增生,建议进一步复查确诊,在复查前记录排尿日记以供医生作为确诊依据,以及到专业机构选用选择合适的治疗手段(药物治疗,行为治疗等),防止病变引起的并发症。";
                    printResult     = @"筛查结果:初步筛查您的情况为重度的
良性前列腺增生,建议进一步复查确诊
,在复查前记录排尿日记以供医生作为
确诊依据,以及到专业机构选用选择合
适的治疗手段(药物治疗,行为治疗等)
,防止病变引起的并发症。";

                    //给用户打标签
                    if (!LoginInfo.GetInstance().Name.Equals(""))
                    {
                        new PatientRecordsManager().UpdatePatientAllRecords(1908, "良性前列腺增生筛查重度");
                    }
                }
            }
            catch (Exception ex)
            {
                screenWebapiClient.AddErrorLog(new M_LogForAtm {
                    Title = "筛查机客户端错误", Content = ex.ToString(), Description = "良性前列腺增生筛查问卷"
                });
            }
        }