예제 #1
0
 public M3Risk AddM3Risk(DataConnection pclsCache, string PatientId, M3RiskInput M3RiskInput, int RecordDate, int RecordTime, string piUserId, string piTerminalName, string piTerminalIP, int piDeviceType)
 {
     M3Risk M3Risk = new M3Risk();
     int ret = 0;
     ret = new RiskInfoMethod().SetM3RiskInput(pclsCache, PatientId, M3RiskInput, RecordDate, RecordTime, piUserId, piTerminalName, piTerminalIP, piDeviceType);
     if (ret == 1)
     {
         M3Risk = new RiskInfoRepository().GetM3Risk(pclsCache, PatientId);
     }
     return M3Risk;
 }
예제 #2
0
        /// <summary>
        /// 获取心衰风险评估结果 SYF 2015-11-17
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public M3Risk GetM3Risk(DataConnection pclsCache, string UserId)
        {
            M3RiskInput Input = new M3RiskInput();
            M3Risk Output = new M3Risk();
            Input = new RiskInfoRepository().GetM3RiskInput(pclsCache, UserId);
            if (Input != null)
            {
                
                int RiskScore = 0;
                #region//左心室射血分数影响
                if (Input.EF >= 40)
                {
                    RiskScore = RiskScore + 0;
                }
                else if (Input.EF >= 35 && Input.EF <= 39)
                {
                    RiskScore = RiskScore + 2;
                }
                else if (Input.EF >= 30 && Input.EF <= 34)
                {
                    RiskScore = RiskScore + 3;
                }
                else if (Input.EF >= 25 && Input.EF <= 29)
                {
                    RiskScore = RiskScore + 5;
                }
                else if (Input.EF >= 20 && Input.EF <= 24)
                {
                    RiskScore = RiskScore + 6;
                }
                else if (Input.EF >= 0 && Input.EF < 20)
                {
                    RiskScore = RiskScore + 7;
                }
                #endregion

                #region//年龄与左心室射血分数叠加影响
                if ((Input.Age >= 56) && (Input.Age <= 59))
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 1;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 2;
                    }
                    else if (Input.EF >= 40)
                    {
                        RiskScore = RiskScore + 3;
                    }
                }
                else if ((Input.Age >= 60) && (Input.Age <= 64))
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 2;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 4;
                    }
                    else if (Input.EF >= 40)
                    {
                        RiskScore = RiskScore + 5;
                    }
                }
                else if ((Input.Age >= 65) && (Input.Age <= 69))
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 4;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 6;
                    }
                    else if (Input.EF >= 40)
                    {
                        RiskScore = RiskScore + 7;
                    }
                }
                else if ((Input.Age >= 70) && (Input.Age <= 74))
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 6;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 8;
                    }
                    else if (Input.EF >= 40)
                    {
                        RiskScore = RiskScore + 9;
                    }
                }
                else if ((Input.Age >= 75) && (Input.Age <= 79))
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 8;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 10;
                    }
                    else if (Input.EF >= 40)
                    {
                        RiskScore = RiskScore + 12;
                    }
                }
                else if (Input.Age >= 80)
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 10;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 13;
                    }
                    else if (Input.EF >= 40)
                    {
                        RiskScore = RiskScore + 15;
                    }
                }
                #endregion

                #region//收缩压与左心室射血分数叠加影响
                if (Input.SBP < 110)
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 5;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 3;
                    }
                    else if (Input.EF >= 40)
                    {
                        RiskScore = RiskScore + 2;
                    }
                }
                else if ((Input.SBP >= 110) && (Input.SBP <= 119))
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 4;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 2;
                    }
                    else if (Input.EF >= 40)
                    {
                        RiskScore = RiskScore + 1;
                    }
                }
                else if ((Input.SBP >= 120) && (Input.SBP <= 129))
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 3;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 1;
                    }
                    else if (Input.EF >= 40)
                    {
                        RiskScore = RiskScore + 1;
                    }
                }
                else if ((Input.SBP >= 130) && (Input.SBP <= 139))
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 2;
                    }
                    else if ((Input.EF >= 30) && (Input.EF <= 39))
                    {
                        RiskScore = RiskScore + 1;
                    }
                }
                else if ((Input.SBP >= 140) && (Input.SBP <= 149))
                {
                    if (Input.EF < 30)
                    {
                        RiskScore = RiskScore + 1;
                    }
                }
                #endregion

                #region//BMI的影响
                if (Input.BMI < 15)
                {
                    RiskScore = RiskScore + 6;
                }
                else if ((Input.BMI >= 15) && (Input.BMI < 20))
                {
                    RiskScore = RiskScore + 5;
                }
                else if ((Input.BMI >= 20) && (Input.BMI < 25))
                {
                    RiskScore = RiskScore + 3;
                }
                else if ((Input.BMI >= 25) && (Input.BMI < 30))
                {
                    RiskScore = RiskScore + 2;
                }
                #endregion

                #region//肌酐的影响
                if ((Input.Creatinine >= 90) && (Input.Creatinine < 110))
                {
                    RiskScore = RiskScore + 1;
                }
                else if ((Input.Creatinine >= 110) && (Input.Creatinine < 130))
                {
                    RiskScore = RiskScore + 2;
                }
                else if ((Input.Creatinine >= 130) && (Input.Creatinine < 150))
                {
                    RiskScore = RiskScore + 3;
                }
                else if ((Input.Creatinine >= 150) && (Input.Creatinine < 170))
                {
                    RiskScore = RiskScore + 4;
                }
                else if ((Input.Creatinine >= 170) && (Input.Creatinine < 210))
                {
                    RiskScore = RiskScore + 5;
                }
                else if ((Input.Creatinine >= 210) && (Input.Creatinine < 250))
                {
                    RiskScore = RiskScore + 6;
                }
                else if (Input.Creatinine >= 250)
                {
                    RiskScore = RiskScore + 8;
                }
                #endregion

                #region//心衰等级分类影响
                if (Input.NYHA == 2)
                {
                    RiskScore = RiskScore + 2;
                }
                else if (Input.NYHA == 3)
                {
                    RiskScore = RiskScore + 6;
                }
                else if (Input.NYHA == 4)
                {
                    RiskScore = RiskScore + 8;
                }
                #endregion

                #region//其他因素影响
                if (Input.Gender == 1)
                {
                    RiskScore = RiskScore + 1;
                }
                if (Input.Smoke == 1)
                {
                    RiskScore = RiskScore + 1;
                }
                if (Input.Diabetes == 1)
                {
                    RiskScore = RiskScore + 3;
                }
                if (Input.Lung == 1)
                {
                    RiskScore = RiskScore + 2;
                }
                if (Input.HF18 == 1)
                {
                    RiskScore = RiskScore + 2;
                }
                if (Input.Beta == 2)
                {
                    RiskScore = RiskScore + 3;
                }
                if (Input.AA == 2)
                {
                    RiskScore = RiskScore + 1;
                }
                #endregion

                double[] OneYear = new double[] { 0.015, 0.016, 0.018, 0.020, 0.022, 0.024, 0.027, 0.029, 0.032, 0.036, 0.039, 0.043, 0.048, 0.052, 0.058, 0.063, 0.070, 0.077, 0.084, 0.093, 0.102, 0.111, 0.122, 0.134, 0.147, 0.060, 0.175, 0.191, 0.209, 0.227, 0.248, 0.269, 0.292, 0.316, 0.342, 0.369, 0.398, 0.427, 0.458, 0.490, 0.523, 0.557, 0.591, 0.625, 0.659, 0.692, 0.725, 0.757, 0.787, 0.816, 0.842 };
                double[] ThreeYear = new double[] { 0.039, 0.043, 0.048, 0.052, 0.058, 0.063, 0.070, 0.077, 0.084, 0.092, 0.102, 0.111, 0.122, 0.134, 0.146, 0.160, 0.175, 0.191, 0.209, 0.227, 0.247, 0.269, 0.292, 0.316, 0.342, 0.369, 0.397, 0.427, 0.458, 0.490, 0.523, 0.556, 0.590, 0.625, 0.658, 0.692, 0.725, 0.756, 0.787, 0.815, 0.842, 0.866, 0.889, 0.908, 0.926, 0.941, 0.953, 0.964, 0.973, 0.980, 0.985 };
                Output.One = OneYear[RiskScore] * 100;
                Output.Three = ThreeYear[RiskScore] * 100;
            }
            else
            {
                return null;
            }
            return Output;
        }