Example #1
0
 /// <summary>
 /// 生成体温实体
 /// </summary>
 /// <returns></returns>
 private Neusoft.HISFC.Models.RADT.LifeCharacter SetLifeCharacter()
 {
     //体温实体
     Neusoft.HISFC.Models.RADT.LifeCharacter myLifeCharacter = new Neusoft.HISFC.Models.RADT.LifeCharacter();
     try
     {
         myLifeCharacter.ID                = this.patientInfo.ID;
         myLifeCharacter.Name              = this.patientInfo.Name;
         myLifeCharacter.Dept.ID           = oper.Dept.ID;
         myLifeCharacter.Dept.Name         = oper.Dept.Name;
         myLifeCharacter.NurseStation.ID   = oper.Nurse.ID;
         myLifeCharacter.NurseStation.Name = oper.Nurse.Name;
         myLifeCharacter.BedNO             = "";
         myLifeCharacter.PID.PatientNO     = this.patientInfo.PID.CardNO;
         //myLifeCharacter.InDate = DateTime.Now;
         myLifeCharacter.MeasureDate       = this.OrderManagement.GetDateTimeFromSysDateTime();
         myLifeCharacter.Breath            = Neusoft.FrameWork.Function.NConvert.ToInt32(this.txtBreath.Text);
         myLifeCharacter.Temperature       = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.txtTemperature.Text);
         myLifeCharacter.Pulse             = Neusoft.FrameWork.Function.NConvert.ToInt32(this.txtPulse.Text);
         myLifeCharacter.HighBloodPressure = Neusoft.FrameWork.Function.NConvert.ToInt32(this.txtHighBP.Text);
         myLifeCharacter.LowBloodPressure  = Neusoft.FrameWork.Function.NConvert.ToInt32(this.txtLowBP.Text);
         myLifeCharacter.Time = 0;
         myLifeCharacter.IsForceHypothermia = false;
         myLifeCharacter.TargetTemperature  = 0;
         myLifeCharacter.TemperatureType    = "腋温";
         myLifeCharacter.Memo = this.txtRemark.Text.ToString().Trim();
     }
     catch (Exception ex)
     {
         MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("体温信息实体附值失败!") + ex.Message);
         return(null);
     }
     return(myLifeCharacter);
 }
Example #2
0
 /// <summary>
 /// 获得SQL,传入参数
 /// </summary>
 /// <param name="sqlLifeCharacter"></param>
 /// <param name="lifeCharacter"></param>
 /// <returns></returns>
 private string GetLifeCharacterSql(string sqlLifeCharacter, Neusoft.HISFC.Models.RADT.LifeCharacter lifeCharacter)
 {
     try
     {
         System.Object[] s = { lifeCharacter.ID,
                               lifeCharacter.Name,
                               lifeCharacter.Dept.ID,
                               lifeCharacter.Dept.Name,
                               lifeCharacter.NurseStation.ID,
                               lifeCharacter.NurseStation.Name,
                               lifeCharacter.BedNO,
                               lifeCharacter.PID.PatientNO,
                               lifeCharacter.InDate.ToString("yyyyMMdd"),
                               lifeCharacter.MeasureDate.ToString("yyyyMMddHHmmss"),
                               lifeCharacter.Breath,
                               lifeCharacter.Temperature,
                               lifeCharacter.Pulse,
                               lifeCharacter.HighBloodPressure,
                               lifeCharacter.LowBloodPressure,
                               lifeCharacter.Time,
                               lifeCharacter.IsForceHypothermia == true ? 1 : 0,
                               lifeCharacter.TargetTemperature,
                               lifeCharacter.TemperatureType,
                               lifeCharacter.Memo,
                               lifeCharacter.Oper.ID };
         sqlLifeCharacter = string.Format(sqlLifeCharacter, s);
     }
     catch (Exception ex)
     {
         this.Err = "付数值时候出错!" + ex.Message;
         this.WriteErr();
         return(null);
     }
     return(sqlLifeCharacter);
 }
Example #3
0
 /// <summary>
 /// 更新一条
 /// </summary>
 /// <param name="lifeCharacter"></param>
 /// <returns></returns>
 public int UpdateLifeCharacter(Neusoft.HISFC.Models.RADT.LifeCharacter lifeCharacter)
 {
     if (this.DeleteLifeCharacter(lifeCharacter.ID, lifeCharacter.MeasureDate) < 0)
     {
         return(-1);
     }
     return(this.InsertLifeCharacter(lifeCharacter));
 }
Example #4
0
 /// <summary>
 /// 校验数据有效性
 /// </summary>
 /// <param name="lfch"></param>
 /// <returns></returns>
 private int CheckData(Neusoft.HISFC.Models.RADT.LifeCharacter lfch)
 {
     if (lfch.ID == "" || lfch.ID == null)
     {
         MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("非法的患者信息!"));
         return(-1);
     }
     if (!Neusoft.FrameWork.Public.String.ValidMaxLengh(this.txtRemark.Text.ToString().Trim(), 80))
     {
         MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("备注超长!"));
         return(-1);
     }
     return(0);
 }
Example #5
0
        /// <summary>
        /// 插入一条记录
        /// </summary>
        /// <param name="lifeCharacter"></param>
        /// <returns></returns>
        public int InsertLifeCharacter(Neusoft.HISFC.Models.RADT.LifeCharacter lifeCharacter)
        {
            string strSql = "";

            if (this.Sql.GetSql("RADT.InPatient.LifeCharacter.Insert.1", ref strSql) == -1)
            {
                this.Err = this.Sql.Err;
                return(-1);
            }
            strSql = this.GetLifeCharacterSql(strSql, lifeCharacter);
            if (strSql == null)
            {
                return(-1);
            }
            if (this.ExecNoQuery(strSql) <= 0)
            {
                return(-1);
            }
            return(1);
        }
Example #6
0
        /// <summary>
        /// 读取数据生成ArrayList
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        private ArrayList GetLifeCharacterAL(string sql)
        {
            if (this.ExecQuery(sql) == -1)
            {
                return(null);
            }
            ArrayList al = new ArrayList();

            while (this.Reader.Read())
            {
                Neusoft.HISFC.Models.RADT.LifeCharacter lfch = new Neusoft.HISFC.Models.RADT.LifeCharacter();
                lfch.ID                  = this.Reader[0].ToString();
                lfch.Name                = this.Reader[1].ToString();
                lfch.Dept.ID             = this.Reader[2].ToString();
                lfch.Dept.Name           = this.Reader[3].ToString();
                lfch.NurseStation.ID     = this.Reader[4].ToString();
                lfch.NurseStation.Name   = this.Reader[5].ToString();
                lfch.BedNO               = this.Reader[6].ToString();
                lfch.PID.PatientNO       = this.Reader[7].ToString();
                lfch.InDate              = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[8]);
                lfch.MeasureDate         = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[9]);
                lfch.Breath              = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[10]);
                lfch.Pulse               = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[11]);
                lfch.Temperature         = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[12]);
                lfch.HighBloodPressure   = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[13]);
                lfch.LowBloodPressure    = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[14]);
                lfch.Time                = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[15]);
                lfch.IsForceHypothermia  = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[16].ToString());
                lfch.ForceHypothermiaInt = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[16]);
                lfch.TargetTemperature   = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[17]);
                lfch.TemperatureType     = this.Reader[18].ToString();
                lfch.Memo                = this.Reader[19].ToString();
                lfch.Oper.ID             = this.Reader[20].ToString();

                al.Add(lfch);
            }
            this.Reader.Close();
            return(al);
        }
Example #7
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <returns></returns>
        private int SaveData()
        {
            Neusoft.HISFC.Models.RADT.LifeCharacter lfch = new Neusoft.HISFC.Models.RADT.LifeCharacter();
            lfch = this.SetLifeCharacter();
            if (this.CheckData(lfch) < 0)
            {
                return(-1);
            }
            //Neusoft.FrameWork.Management.Transaction t = new Neusoft.FrameWork.Management.Transaction(OrderManagement.Connection);
            //t.BeginTransaction();
            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
            lfchManagement.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans); //设置事务
            int iReturn = lfchManagement.InsertLifeCharacter(lfch);

            if (iReturn < 0)
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();;
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存失败!") + this.lfchManagement.Err);
                return(-1);
            }
            Neusoft.FrameWork.Management.PublicTrans.Commit();
            MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存成功!"));
            return(0);
        }