コード例 #1
0
 /// <summary>
 /// 获取修改或新增的信息
 /// </summary>
 private void GetICDinfo()
 {
     try
     {
         if (editType == EditTypes.Add)
         {
             newICD.User01          = textSeqNO.Text;                                                              //副诊断码
             newICD.ID              = this.textICDid.Text;                                                         //ICD编码
             newICD.Name            = this.textICDName.Text;                                                       //ICD名称
             newICD.SpellCode       = this.textSpellCode.Text;                                                     //拼音码
             newICD.WBCode          = this.WBCode.Text;                                                            //五笔码
             newICD.UserCode        = this.textUserCode.Text;                                                      //统计码
             newICD.Is30Illness     = Neusoft.FrameWork.Function.NConvert.ToInt32(Is30Illness.Checked).ToString(); //是否是30种疾病
             newICD.IsInfection     = Neusoft.FrameWork.Function.NConvert.ToInt32(IsInfection.Checked).ToString(); //是否是传染病
             newICD.IsTumour        = Neusoft.FrameWork.Function.NConvert.ToInt32(IsTumour.Checked).ToString();    //;            //是否是肿瘤
             newICD.IsValid         = true;
             newICD.SexType.ID      = this.SexComBox.Tag.ToString();                                               //适用性别
             newICD.SexType.Name    = this.SexComBox.Text;
             newICD.TraditionalDiag = cbTraditional.Checked;
         }
         if (editType == EditTypes.Modify)
         {
             newICD                 = orgICD.Clone();
             newICD.User01          = textSeqNO.Text;                                                              //副诊断码
             newICD.Name            = this.textICDName.Text;                                                       //ICD名称
             newICD.SpellCode       = this.textSpellCode.Text;                                                     //拼音码
             newICD.WBCode          = this.WBCode.Text;                                                            //五笔码
             newICD.UserCode        = this.textUserCode.Text;                                                      //统计码
             newICD.Is30Illness     = Neusoft.FrameWork.Function.NConvert.ToInt32(Is30Illness.Checked).ToString(); //是否是30种疾病
             newICD.IsInfection     = Neusoft.FrameWork.Function.NConvert.ToInt32(IsInfection.Checked).ToString(); //是否是传染病
             newICD.IsTumour        = Neusoft.FrameWork.Function.NConvert.ToInt32(IsTumour.Checked).ToString();    //;            //是否是肿瘤
             newICD.IsValid         = this.IsValid.Checked;                                                        //有效性
             newICD.SexType.ID      = this.SexComBox.Tag.ToString();                                               //适用性别
             newICD.SexType.Name    = this.SexComBox.Text;
             newICD.TraditionalDiag = cbTraditional.Checked;
         }
         #region 取操作员 和操作时间
         //这个地方不是很准,只是暂时给前台显示用。
         Neusoft.HISFC.BizLogic.HealthRecord.ICD icd = new Neusoft.HISFC.BizLogic.HealthRecord.ICD();
         //操作员 编码 姓名
         newICD.OperInfo.ID   = icd.Operator.ID;
         newICD.OperInfo.Name = icd.Operator.Name;
         //操作时间
         newICD.OperInfo.OperTime = icd.GetDateTimeFromSysDateTime();
         #endregion
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #2
0
        /// <summary>
        /// ICD对照
        /// </summary>
        private void CompareICD()
        {
            try
            {
                //数据验证失败
                if (!ISValid())
                {
                    return;
                }
                icdCompare = GetInfo();
                if (icdCompare == null)
                {
                    return;
                }
                //定义事务
                Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();

                //Neusoft.FrameWork.Management.Transaction t = new Neusoft.FrameWork.Management.Transaction(myICD.Connection);
                ////开始事务
                //t.BeginTransaction();
                myICD.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);
                //执行插入操作
                int iReturn = 0; //返回值
                iReturn = myICD.InsertCompare(icdCompare);
                if (iReturn > 0)
                {
                    //提交
                    Neusoft.FrameWork.Management.PublicTrans.Commit();
                    //显示刚刚增加的信息
                    this.tabControl1.SelectedIndex = 2;
                    //获取操作时间
                    icdCompare.OperInfo.OperTime = myICD.GetDateTimeFromSysDateTime();
                    //操作员信息
                    icdCompare.OperInfo.ID   = myICD.Operator.ID;
                    icdCompare.OperInfo.Name = myICD.Operator.Name;
                    //从ICD9 列表 中删除 对照完的行
                    DeleteICD9(icdCompare.ICD9);
                    //从在界面上 增加对照信息。
                    AddICDCompare();
                    icdCompare = null;
                    //准备下次输入
                    //清空数据
                    ClearICD();
                    MessageBox.Show("保存对照成功");
                    //					//指定显示界面
                    //					this.tabControl1.SelectedIndex = 1;
                    //					//指定光标位置
                    //					textSearchICD9.Focus();
                }
                else
                {
                    //回退
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show(myICD.Err + " 保存对照失败");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }