コード例 #1
0
ファイル: PatientInfoController.cs プロジェクト: cerila/CDMIS
        //健康参数-获取某生理参数图的推荐阈值
        public JsonResult GetBasicAlert(string ItemCode)
        {
            var res = new JsonResult();

            //string temp = DateTime.Now.ToString("yyyyMMdd");
            //int today = Convert.ToInt32(DateTime.Now.ToString("yyyyMMdd"));

            WnMstAlert WnMstAlert = _ServicesSoapClient.GetWnMstBasicAlert(ItemCode);

            //WnMstAlert来自webservice类,Min、Max、Units、Remarks

            res.Data = WnMstAlert;
            res.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            return(res);
        }
コード例 #2
0
        //set参数图的生理数据
        public JsonResult AddVitalSign(string UserId, string ItemCode, string Value, string Unit, string CompoundTime)
        {
            var user = Session["CurrentUser"] as UserAndRole;
            var res  = new JsonResult();

            string[] s        = ItemCode.Split(new char[] { '_' });
            string   ItemType = s[0];

            string CompoundTime1 = CompoundTime.Replace("时", "");
            string CompoundTime2 = CompoundTime1.Replace("-", "");  //时间字符串处理

            string CompoundTime3 = CompoundTime2.Replace(" ", "");
            int    RecordDate    = Convert.ToInt32(CompoundTime3.Substring(0, 8)); //日期
            int    RecordTime    = Convert.ToInt32(CompoundTime3.Substring(8, 2)); //时(两位)

            bool flag = _ServicesSoapClient.SetPatientVitalSigns(UserId, RecordDate, RecordTime, ItemType, ItemCode, Value, Unit, user.UserId, user.TerminalName, user.TerminalIP, user.DeviceType);

            int        AlertType    = 5;
            WnMstAlert NowThreshold = _ServicesSoapClient.GetWnMstAlert(UserId, ItemCode, RecordDate);

            if (Convert.ToDecimal(Value) <= Convert.ToDecimal(NowThreshold.Min))
            {
                AlertType = 2;  //低于下限
            }
            if (Convert.ToDecimal(Value) >= Convert.ToDecimal(NowThreshold.Max))
            {
                AlertType = 1;  //超越上限
            }
            DateTime AlertDateTime = Convert.ToDateTime(CompoundTime1 + ":00");

            flag = _ServicesSoapClient.SetTrnAlertRecord(UserId, ItemCode, AlertDateTime, AlertType, 3, 1, user.UserId, user.TerminalName, user.TerminalIP, user.DeviceType);

            int AlertNumber = -1;

            AlertNumber             = _ServicesSoapClient.GetUntreatedAlertAmount(UserId); //获取警报数
            res.Data                = AlertNumber;
            res.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            return(res);
        }