Example #1
0
        /// <summary>
        /// 结果录入绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvOrderTest_RowDataBound(object sender, ExtAspNet.GridRowEventArgs e)
        {
            //实体接收数据
            Ordertest row = e.DataItem as Ordertest;

            if (row != null)
            {
                string entranceYear = row.IsexceptionToBool;
                if (entranceYear == "异常")
                {
                    highlightRows.Text += e.RowIndex.ToString() + ",";
                }
            }
        }
Example #2
0
        //获舒张压高低值判断
        private string GetDBPlflag(Ordertest paraResult)
        {
            double nResult = TypeParse.StrToDouble(paraResult.Testresult, 0);

            if (nResult < 60)
            {
                return("偏低");
            }
            else if (nResult >= 60 && nResult <= 89)
            {
                return("正常");
            }
            else
            {
                return("偏高");
            }
        }
Example #3
0
        //获收缩压高低值判断
        private string GetSBPlflag(Ordertest paraResult)
        {
            double nResult = TypeParse.StrToDouble(paraResult.Testresult, 0);
            string strbp   = string.Empty;//描述

            if (nResult < 90)
            {
                return("偏低");
            }
            else if (nResult >= 90 && nResult <= 139)
            {
                return("正常");
            }
            else
            {
                return("偏高");
            }
        }
Example #4
0
 /// <summary>
 /// 结果录入编辑
 /// </summary>
 /// <param name="rerundate"></param>
 /// <returns></returns>
 public bool UpdateOrdertestResult(Ordertest orderTest)
 {
     return(this.update("Order.UpdateOrdertestResult", orderTest) > 0);
 }
Example #5
0
        //获取体重指数
        private void GetBMLHlflag(List <Ordertest> orderTestLst)
        {
            //如果有体重相关检查项,则计算体重指数

            Ordertest weight = orderTestLst.Find(c => c.Testname == "体重" && !string.IsNullOrEmpty(c.Testresult));
            Ordertest height = orderTestLst.Find(c => c.Testname == "身高" && !string.IsNullOrEmpty(c.Testresult));


            if (weight != null && height != null)
            {
                Ordertest bml = orderTestLst.Find(c => c.Testname == "体重指数");
                //为空时不处理
                if (bml == null)
                {
                    return;
                }
                //体重指数
                double bmlValue = 0;
                try
                {
                    if (double.Parse(weight.Testresult) == 0 || double.Parse(height.Testresult) == 0)
                    {
                        MessageBoxShow("身高或者体重不能为0", MessageBoxIcon.Warning);
                        return;
                    }
                    bmlValue = Math.Round(double.Parse(weight.Testresult) / Math.Pow(double.Parse(height.Testresult), 2), 3);
                }
                catch (Exception ex)
                {
                    MessageBoxShow("身高或者体重必须为数字", MessageBoxIcon.Warning);
                    return;
                }
                bml.Testresult  = bmlValue.ToString();
                bml.Isexception = "1";
                if (bmlValue < 18.5)
                {
                    bml.Hlhint = "消瘦";
                }
                else if (bmlValue >= 18.5 && bmlValue < 24)
                {
                    bml.Hlhint      = "正常";
                    bml.Isexception = "0";
                }
                else if (bmlValue >= 24 && bmlValue < 28)
                {
                    bml.Hlhint = "超重";
                }
                else
                {
                    bml.Hlhint = "肥胖";
                }
                try
                {
                    orderTestService.UpdateOrdertestResult(bml);
                }
                catch (Exception ex)
                {
                    MessageBoxShow("体重指数计算出错,错误:" + ex.Message, MessageBoxIcon.Error);
                }

                //写日志
                new BaseService().AddOperationLog(bml.Ordernum, "", "检查结果录入", "对[" + bml.Ordernum + "]自动计算体重指数", "修改留痕", "");
            }
        }