Ejemplo n.º 1
0
        private void ucArrangementSpread1_applictionSelected(object sender, OperationAppllication e)
        {
            if (e != null)
            {
                if (e.PatientSouce == "2")
                {
                    Neusoft.HISFC.Models.RADT.PatientInfo patientInfo = radtIntegrate.GetPatientInfomation(e.PatientInfo.ID);

                    if (patientInfo == null)
                    {
                        MessageBox.Show(radtIntegrate.Err);
                        this.ucArrangementInfo1.OperationApplication = new OperationAppllication();

                        return;
                    }



                    //if ((Neusoft.HISFC.Models.Base.EnumInState)this.patientInfo.PVisit.InState.ID == Neusoft.HISFC.Models.Base.EnumInState.N
                    //    || (Neusoft.HISFC.Models.Base.EnumInState)this.patientInfo.PVisit.InState.ID == Neusoft.HISFC.Models.Base.EnumInState.O)
                    if (patientInfo.PVisit.InState.ID.ToString() == Neusoft.HISFC.Models.Base.EnumInState.N.ToString() || patientInfo.PVisit.InState.ID.ToString() == Neusoft.HISFC.Models.Base.EnumInState.O.ToString())
                    {
                        Neusoft.FrameWork.WinForms.Classes.Function.Msg("该患者已经出院!", 111);
                        //this.ucArrangementInfo1.OperationApplication = new OperationAppllication();
                        return;
                    }
                }

                this.ucArrangementInfo1.OperationApplication = e;
            }
        }
Ejemplo n.º 2
0
 private void neuSpread1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Up)
     {
         if (this.neuSpread1_Sheet1.ActiveRowIndex > 0)
         {
             this.neuSpread1_Sheet1.ActiveRowIndex--;
             //this.neuSpread1_Sheet1.ActiveRow.ForeColor = Color.Bisque;
             this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, 0].ForeColor = Color.Bisque;
         }
     }
     if (e.KeyData == Keys.Down)
     {
         if (this.neuSpread1_Sheet1.ActiveRowIndex < this.neuSpread1_Sheet1.Rows.Count - 1)
         {
             this.neuSpread1_Sheet1.ActiveRowIndex++;
             this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, 0].ForeColor = Color.Red;
         }
     }
     if (e.KeyData == Keys.Enter)
     {
         OperationAppllication Record = this.neuSpread1_Sheet1.ActiveRow.Tag as OperationAppllication;
         this.SetRecord(Record);
         this.panel.Visible = false;
         this.neuTextBox1.Focus();
         this.neuTextBox1.SelectAll();
     }
 }
Ejemplo n.º 3
0
 private void ucAnaesthesiaSpread1_applictionSelected(object sender, OperationAppllication e)
 {
     if (e != null)
     {
         this.ucArrangementInfo1.OperationApplication = e;
     }
 }
Ejemplo n.º 4
0
        private void neuSpread1_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            OperationAppllication Record = this.neuSpread1_Sheet1.ActiveRow.Tag as OperationAppllication;

            this.SetRecord(Record);
            this.panel.Visible = false;
            this.neuTextBox1.Focus();
            this.neuTextBox1.SelectAll();
        }
        public ucRegistrationQuick()
        {
            InitializeComponent();

            record      = new OperationRecord();
            apply       = new OperationAppllication();
            opsTableMgr = new Neusoft.HISFC.BizLogic.Operation.OpsTableManage();

            InitControl();
        }
        /// <summary>
        /// 初始化麻醉人员信息
        /// </summary>
        /// <param name="myOpsApp"></param>
        public void InitAnaeDoct(OperationAppllication myOpsApp)
        {
            this.lvAnaeDoct.Items.Clear();
            this.lvAnaeHelper.Items.Clear();

            //添加麻醉角色显示
            foreach (ArrangeRole role in myOpsApp.RoleAl)
            {
                ListViewItem item = new ListViewItem();
                item.Tag        = role;
                item.ImageIndex = 0;
                item.Text       = role.Name;
                //人员状态:正班、直落、接班等
                try
                {
                    if (role.RoleOperKind.ID != null)
                    {
                        //直落
                        if (role.RoleOperKind.ID.ToString() == EnumRoleOperKind.ZL.ToString())
                        {
                            item.Text = item.Text + "|▲";
                        }
                        //接班
                        else if (role.RoleOperKind.ID.ToString() == EnumRoleOperKind.JB.ToString())
                        {
                            item.Text = item.Text + "|△";
                        }
                    }

                    //根据角色编码给不同listView中插入项
                    if (role.RoleType.ID.ToString() == EnumOperationRole.Anaesthetist.ToString())
                    {
                        this.lvAnaeDoct.Items.Add(item);
                        this.lvPersons.RemoveEmployee(role.ID);
                    }
                    else if (role.RoleType.ID.ToString() == EnumOperationRole.AnaesthesiaHelper.ToString())//麻醉助手
                    {
                        this.lvAnaeHelper.Items.Add(item);
                        this.lvPersons.RemoveEmployee(role.ID);
                    }
                    else if (role.RoleType.ID.ToString() == EnumOperationRole.AnaeTmpHelper1.ToString())
                    {
                        this.txtTmpHelper1.Text = role.Name;
                    }
                    else if (role.RoleType.ID.ToString() == EnumOperationRole.AnaeTmpHelper2.ToString())
                    {
                        this.txtTmpHelper2.Text = role.Name;
                    }
                }
                catch { }
            }
        }
Ejemplo n.º 7
0
        private void tvPatientList1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Node.Tag == null)
            {
                return;
            }

            //if (e.Node.Tag.GetType() == typeof(PatientInfo))
            //{
            //    PatientInfo patient = e.Node.Tag as PatientInfo;
            //    this.ucQueryInpatientNo1.Text = patient.PID.PatientNO;
            //    this.ucApplicationForm1.PatientInfo = patient;
            //}
            //else if (e.Node.Tag.GetType() == typeof(OperationAppllication))
            //{
            //    OperationAppllication application = e.Node.Tag as OperationAppllication;
            //    this.ucQueryInpatientNo1.Text = application.PatientInfo.PID.PatientNO;
            //    this.ucApplicationForm1.OperationApplication = application;

            //    this.currentNode = e.Node;
            //}
            if (e.Node.Tag.GetType() == typeof(PatientInfo))
            {
                PatientInfo patient = e.Node.Tag as PatientInfo;
                if (patient.PVisit.InState.ID.ToString() != "N" && patient.PVisit.InState.ID.ToString() != "O")
                {
                    this.ucApplicationForm1.PatientInfo = patient;
                    this.ucQueryInpatientNo1.Text       = patient.PID.PatientNO;
                }
                else
                {
                    MessageBox.Show("患者不是在院状态!");
                }
                //this.ucQueryInpatientNo1.Text = patient.PID.PatientNO;
                //this.ucApplicationForm1.PatientInfo = patient;
            }
            else if (e.Node.Tag.GetType() == typeof(OperationAppllication))
            {
                OperationAppllication application = e.Node.Tag as OperationAppllication;
                if (application.PatientInfo.PVisit.InState.ID.ToString() != "N" && application.PatientInfo.PVisit.InState.ID.ToString() != "O")
                {
                    this.ucQueryInpatientNo1.Text = application.PatientInfo.PID.PatientNO;
                    this.ucApplicationForm1.OperationApplication = application;
                    this.currentNode = e.Node;
                }
                else
                {
                    MessageBox.Show("患者不是在院状态!");
                }
            }//{757094AC-55CD-428c-8C81-BB1F3F76172D}
        }
Ejemplo n.º 8
0
        private void SetRecord(OperationAppllication Record)
        {
            //未登记
            this.ucRegistrationForm1.IsNew                = true;
            this.ucRegistrationForm1.IsCancled            = false;
            this.ucRegistrationForm1.OperationApplication = Record;

            ////已登记
            //if (Record.ExecStatus == "4")
            //{
            //    this.ucRecord1.IsNew = false;
            //    this.ucRecord1.IsCancled = false;
            //    this.ucRecord1.HandInput = false;
            //    this.ucRecord1.IsNew = false;
            //    this.ucRecord1.IsCancled = false;
            //    this.ucRecord1.OperationRecord = select.Tag as OperationRecord;
            //    this.ucRecord1.Focus();
            //}
        }
Ejemplo n.º 9
0
 //====================================================================
 //修改人:路志鹏 时间:2007-4-12
 //目的:增加通过住院号检索出手术申请单
 private void neuTextBox1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Enter)
     {
         this.neuTextBox1.Text = this.neuTextBox1.Text.Trim().PadLeft(10, '0');
         string    Patient_code = this.neuTextBox1.Text;
         ArrayList al           = Environment.OperationManager.GetOpsAppListByPatient(Environment.OperatorDeptID, Patient_code);
         if (al != null && al.Count > 0)
         {
             if (al.Count > 1)
             {
                 int count = this.neuSpread1_Sheet1.Rows.Count;
                 if (count > 0)
                 {
                     this.neuSpread1_Sheet1.Rows.Remove(0, count);
                 }
                 this.neuSpread1_Sheet1.Rows.Add(0, al.Count);
                 for (int i = 0; i < al.Count; i++)
                 {
                     OperationAppllication Record = al[i] as OperationAppllication;
                     this.neuSpread1_Sheet1.Cells[i, 0].Text = string.Concat("[",
                                                                             Environment.GetDept(Record.PatientInfo.PVisit.PatientLocation.Dept.ID) + "]",
                                                                             Record.PatientInfo.Name, "[" + Record.PreDate.ToString("yyyy-MM-dd") + "]");
                     this.neuSpread1_Sheet1.Rows[i].Tag = Record;
                 }
                 this.panel.Visible = true;
                 this.neuSpread1.Focus();
                 this.neuSpread1_Sheet1.ActiveRowIndex = 0;
             }
             else
             {
                 OperationAppllication Record = al[0] as OperationAppllication;
                 this.SetRecord(Record);
             }
         }
         else
         {
             this.ucRegistrationForm1.Clear();
             MessageBox.Show("该患者没有要登记的手术单,请核对住院号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
Ejemplo n.º 10
0
        //更新实体的安排标志
        //private int UpdateFlag(OpsApplication apply)
        //{
        //    for (int index = 0; index < alApplys.Count; index++)
        //    {
        //        neusoft.HISFC.Object.Operator.OpsApplication obj = alApplys[index] as neusoft.HISFC.Object.Operator.OpsApplication;
        //        if (obj.OperationNo == apply.OperationNo)
        //        {
        //            alApplys.Remove(obj);
        //            alApplys.Insert(index, apply);
        //            break;
        //        }
        //    }
        //    return 0;
        //}
        /// <summary>
        /// 更新数据
        /// </summary>
        private OperationAppllication UpdateData(int rowIndex)
        {
            //麻醉方式
            NeuObject type = fpSpread1_Sheet1.GetTag(rowIndex, (int)Cols.anaeType) as NeuObject;
            //没有录入麻醉方式,不处理
            //if (type == null || type.ID.Length == 0)
            //return null;
            //主麻
            //NeuObject anaeDoct = fpSpread1_Sheet1.GetTag(rowIndex, (int)Cols.anaeDoct) as NeuObject;
            //没有主麻,不处理
            //if (anaeDoct == null || anaeDoct.ID.Length == 0)
            //return null;

            //NeuObject tt = fpSpread1_Sheet1.GetTag(rowIndex, (int)Cols.anaeHelper) as NeuObject;
            //if (tt != null && tt.ID != "" && anaeDoct.ID == tt.ID)
            //{
            //    MessageBox.Show("主麻和助手不能是同一个人");
            //    return null;
            //}
            //手术申请实体
            OperationAppllication apply = fpSpread1_Sheet1.Rows[rowIndex].Tag as OperationAppllication;


            try
            {
                //添加麻醉方式到手术实体
                apply.AnesType = type;
                //添加主麻、助手
                this.AddRole(apply, rowIndex);
            }
            catch
            {
                return(null);
            }
            //更新界面显示
            fpSpread1_Sheet1.Rows[rowIndex].Tag = apply;

            return(apply);
        }
Ejemplo n.º 11
0
 private void ucRegistrationTree1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (e.Node.Tag.GetType() == typeof(OperationAppllication))
     {
         PatientInfo patient = (e.Node.Tag as OperationAppllication).PatientInfo;
         this.ucQueryInpatientNo1.Text         = patient.PID.PatientNO;
         this.ucFeeForm1.OperationAppllication = e.Node.Tag as OperationAppllication;
     }
     else if (e.Node.Tag.GetType() == typeof(OperationRecord))
     {
         OperationAppllication application = (e.Node.Tag as OperationRecord).OperationAppllication;
         this.ucQueryInpatientNo1.Text         = application.PatientInfo.PID.PatientNO;
         this.ucFeeForm1.OperationAppllication = application;
     }
     else if (e.Node.Tag.GetType() == typeof(AnaeRecord))
     {
         //OperationAppllication application = (e.Node.Tag as AnaeRecord).OperationAppllication;
         OperationAppllication application = (e.Node.Tag as AnaeRecord).OperationApplication;
         this.ucQueryInpatientNo1.Text         = application.PatientInfo.PID.PatientNO;
         this.ucFeeForm1.OperationAppllication = application;
     }
 }
Ejemplo n.º 12
0
        /// <summary>
        /// 添加主麻、助手
        /// </summary>
        /// <param name="apply"></param>
        /// <param name="row"></param>
        /// <returns></returns>
        private int AddRole(OperationAppllication apply, int row)
        {
            ArrayList roles = new ArrayList();

            //先清空主麻、助手
            for (int i = 0; i < apply.RoleAl.Count; i++)
            {
                ArrangeRole role = apply.RoleAl[i] as ArrangeRole;
                if (
                    role.RoleType.ID.ToString() != EnumOperationRole.Anaesthetist.ToString() &&
                    role.RoleType.ID.ToString() != EnumOperationRole.AnaesthesiaHelper.ToString() &&
                    role.RoleType.ID.ToString() != EnumOperationRole.AnaeTmpHelper1.ToString() &&
                    role.RoleType.ID.ToString() != EnumOperationRole.AnaeTmpHelper2.ToString()
                    )
                {
                    roles.Add(role.Clone());
                }
            }

            //添加主麻
            NeuObject obj = fpSpread1_Sheet1.GetTag(row, (int)Cols.anaeDoct) as NeuObject;

            if (obj != null)
            {
                ArrangeRole role = new ArrangeRole(obj);
                role.RoleType.ID = EnumOperationRole.Anaesthetist;//角色编码
                if (obj.Memo == "ZL")
                {
                    role.RoleOperKind.ID = EnumRoleOperKind.ZL;
                }
                else if (obj.Memo == "JB")
                {
                    role.RoleOperKind.ID = EnumRoleOperKind.JB;
                }

                role.OperationNo = apply.ID;
                role.ForeFlag    = "0"; //术前安排
                roles.Add(role);        //加入人员角色对象
            }
            //添加助手
            obj = fpSpread1_Sheet1.GetTag(row, (int)Cols.anaeHelper) as NeuObject;
            if (obj != null)
            {
                ArrangeRole role = new ArrangeRole(obj);

                role.RoleType.ID = EnumOperationRole.AnaesthesiaHelper;//角色编码
                if (obj.Memo == "ZL")
                {
                    role.RoleOperKind.ID = EnumRoleOperKind.ZL;
                }
                else if (obj.Memo == "JB")
                {
                    role.RoleOperKind.ID = EnumRoleOperKind.JB;
                }

                role.OperationNo = apply.ID;
                role.ForeFlag    = "0"; //术前安排
                roles.Add(role);        //加入人员角色对象
            }

            //添加临时麻醉助手1
            string tmpHelper1 = fpSpread1_Sheet1.GetText(row, (int)Cols.anaeTmpHelper1);

            if (tmpHelper1 != null && tmpHelper1 != "")
            {
                ArrangeRole role = new ArrangeRole();
                role.ID          = "777777";
                role.RoleType.ID = EnumOperationRole.AnaeTmpHelper1;//角色编码
                role.Name        = tmpHelper1;
                role.OperationNo = apply.ID;
                role.ForeFlag    = "0"; //术前安排
                roles.Add(role);        //加入人员角色对象
            }

            //添加临时麻醉助手2
            string tmpHelper2 = fpSpread1_Sheet1.GetText(row, (int)Cols.anaeTmpHelper2);

            if (tmpHelper2 != null && tmpHelper2 != "")
            {
                ArrangeRole role = new ArrangeRole();
                role.ID          = "777777";
                role.RoleType.ID = EnumOperationRole.AnaeTmpHelper2;//角色编码
                role.Name        = tmpHelper2;
                role.OperationNo = apply.ID;
                role.ForeFlag    = "0"; //术前安排
                roles.Add(role);        //加入人员角色对象
            }


            apply.RoleAl = roles;

            return(0);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        public int Save()
        {
            //数据库事务
            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();

            //Neusoft.FrameWork.Management.Transaction trans = new
            //    Neusoft.FrameWork.Management.Transaction(Neusoft.FrameWork.Management.Connection.Instance);
            //trans.BeginTransaction();

            List <int> succeed = new List <int>();        //成功安排的

            for (int i = 0; i < fpSpread1_Sheet1.RowCount; i++)
            {
                //麻醉方式
                NeuObject type = fpSpread1_Sheet1.GetTag(i, (int)Cols.anaeType) as NeuObject;
                //没有录入麻醉方式,不处理
                if (type == null || type.ID.Length == 0)
                {
                    continue;
                }
                //主麻
                NeuObject anaeDoct = fpSpread1_Sheet1.GetTag(i, (int)Cols.anaeDoct) as NeuObject;
                //没有主麻,不处理
                if (anaeDoct == null || anaeDoct.ID.Length == 0)
                {
                    continue;
                }

                NeuObject tt = fpSpread1_Sheet1.GetTag(i, (int)Cols.anaeHelper) as NeuObject;
                if (tt != null && tt.ID != "" && anaeDoct.ID == tt.ID)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show("主麻和助手不能是同一个人");
                    return(-1);
                }
                //手术申请实体
                //OperationAppllication apply = fpSpread1_Sheet1.Rows[i].Tag as OperationAppllication;
                //{3DC153BD-1E9B-40c4-AAFC-3C27607A8945}
                OperationAppllication applyOriginal = fpSpread1_Sheet1.Rows[i].Tag as OperationAppllication;
                if (applyOriginal == null)
                {
                    MessageBox.Show("实体转换出错!");
                    return(-1);
                }
                OperationAppllication apply = Environment.OperationManager.GetOpsApp(applyOriginal.ID);
                if (apply == null)
                {
                    MessageBox.Show("获取手术信息出错!");
                    return(-1);
                }
                if (apply.ID == "")
                {
                    continue;
                }

                //trans.BeginTransaction();
                Environment.OperationManager.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);

                try
                {
                    //添加麻醉方式到手术实体
                    apply.AnesType = type;
                    //添加主麻、助手
                    this.AddRole(apply, i);
                    //标志为已安排麻醉
                    //apply.bAnesth=true;

                    if (Environment.OperationManager.UpdateApplication(apply) == -1)
                    {
                        Neusoft.FrameWork.Management.PublicTrans.RollBack();
                        MessageBox.Show("保存麻醉(" + apply.ID + ")安排信息失败!\n请与系统管理员联系。" + Environment.OperationManager.Err, "提示",
                                        MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return(-1);
                    }
                    Neusoft.FrameWork.Management.PublicTrans.Commit();
                    succeed.Add(i);
                }
                catch (Exception e)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show("保存麻醉(" + apply.ID + ")安排信息出错!" + e.Message, "提示");
                    return(-1);
                }
                //更新界面显示
                fpSpread1_Sheet1.Rows[i].Tag = apply;
                //fpSpread1_Sheet1.Cells[i,(int)Cols.Name].Note="已安排";

                //////////////////////////////////////////////////////////////////////////
                // Robin认为下面这个函数没有用
                //this.UpdateFlag(apply);
                //////////////////////////////////////////////////////////////////////////
            }

            if (succeed.Count > 0)
            {
                string line = string.Empty;
                int    temp = 0;
                for (int i = 0; i < succeed.Count; i++)
                {
                    line += i.ToString() + ",";
                }
                line = line.Substring(0, line.Length - 1);
                //temp = Neusoft.FrameWork.Function.NConvert.ToInt32 (line) + 1;
                //MessageBox.Show(string.Format("第{0}行手术安排成功。", temp.ToString()), "提示");
                MessageBox.Show("麻醉安排成功", "提示");
                fpSpread1.Focus();
            }
            else
            {
                MessageBox.Show("没有可安排的手术申请!", "提示");
                fpSpread1.Focus();
            }

            return(0);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// {CB2F6DC4-F9C6-4756-A118-CEDB907C39EC}
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        private int ValidInstate(Neusoft.FrameWork.Models.NeuObject obj)
        {
            Neusoft.HISFC.BizProcess.Integrate.RADT radtIntegrate = new Neusoft.HISFC.BizProcess.Integrate.RADT();
            Neusoft.HISFC.Models.RADT.PatientInfo   patientInfo   = null;


            if (obj is OperationRecord)
            {
                OperationRecord tempObj = obj as OperationRecord;

                if (tempObj.OperationAppllication.PatientSouce == "2")
                {
                    patientInfo = radtIntegrate.GetPatientInfomation(tempObj.OperationAppllication.PatientInfo.ID);

                    if (patientInfo == null)
                    {
                        MessageBox.Show(radtIntegrate.Err);

                        return(-1);
                    }



                    //if ((Neusoft.HISFC.Models.Base.EnumInState)this.patientInfo.PVisit.InState.ID == Neusoft.HISFC.Models.Base.EnumInState.N
                    //    || (Neusoft.HISFC.Models.Base.EnumInState)this.patientInfo.PVisit.InState.ID == Neusoft.HISFC.Models.Base.EnumInState.O)
                    if (patientInfo.PVisit.InState.ID.ToString() == Neusoft.HISFC.Models.Base.EnumInState.N.ToString() || patientInfo.PVisit.InState.ID.ToString() == Neusoft.HISFC.Models.Base.EnumInState.O.ToString())
                    {
                        Neusoft.FrameWork.WinForms.Classes.Function.Msg("该患者已经出院!", 111);

                        return(-1);
                    }
                }
            }
            if (obj is OperationAppllication)
            {
                OperationAppllication tempOA = obj as OperationAppllication;

                if (tempOA.PatientSouce == "2")
                {
                    patientInfo = radtIntegrate.GetPatientInfomation(tempOA.PatientInfo.ID);

                    if (patientInfo == null)
                    {
                        MessageBox.Show(radtIntegrate.Err);

                        return(-1);
                    }



                    //if ((Neusoft.HISFC.Models.Base.EnumInState)this.patientInfo.PVisit.InState.ID == Neusoft.HISFC.Models.Base.EnumInState.N
                    //    || (Neusoft.HISFC.Models.Base.EnumInState)this.patientInfo.PVisit.InState.ID == Neusoft.HISFC.Models.Base.EnumInState.O)
                    if (patientInfo.PVisit.InState.ID.ToString() == Neusoft.HISFC.Models.Base.EnumInState.N.ToString() || patientInfo.PVisit.InState.ID.ToString() == Neusoft.HISFC.Models.Base.EnumInState.O.ToString())
                    {
                        Neusoft.FrameWork.WinForms.Classes.Function.Msg("该患者已经出院!", 111);

                        return(-1);
                    }
                }
            }

            return(1);
        }
Ejemplo n.º 15
0
        private void neuTreeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            TreeNode select = this.tvList.SelectedNode;

            this.ucRegistrationForm1.HandInput = false;
            if (select == null)
            {
                return;
            }
            if (select.Tag == null)
            {
                return;
            }

            TreeNode parent = select.Parent;

            if (parent == null)
            {
                //this.ucRegistrationForm1.OperationApplication = new OperationAppllication();
                this.ucRegistrationForm1.OperationRecord = new OperationRecord();
                return;
            }

            if (parent.Tag.ToString() == "NO_Register" || parent.Tag.ToString() == "Cancel")
            {
                //this.ucQueryInpatientNo1.txtInputCode.Text =
                //    (select.Tag as neusoft.HISFC.Object.Operator.OpsApplication).PatientInfo.PID.PatientNo;
                //by zlw 2006-5-24
                //this.ucRecord1.Dept = tvList.SelectedNode.Text.Substring(tvList.SelectedNode.Text.IndexOf('[') + 1, tvList.SelectedNode.Text.IndexOf(']') - 1);


                this.ucRegistrationForm1.HandInput = false;
                if (parent.Tag.ToString() == "NO_Register")
                {
                    this.ucRegistrationForm1.IsNew     = true;
                    this.ucRegistrationForm1.IsCancled = false;
                }
                else if (parent.Tag.ToString() == "Cancel")
                {
                    this.ucRegistrationForm1.IsCancled = true;
                    this.ucRegistrationForm1.IsNew     = false;
                }

                // {CB2F6DC4-F9C6-4756-A118-CEDB907C39EC}
                OperationAppllication operationAppllication = select.Tag as OperationAppllication;
                int returnValue = ValidInstate(select.Tag as OperationAppllication);

                if (returnValue < 0)
                {
                    //this.ucRegistrationForm1.OperationApplication = new OperationAppllication();
                    this.ucRegistrationForm1.Clear();
                    return;
                }
                //this.ucRegistrationForm1.OperationApplication = select.Tag as OperationAppllication;


                this.ucRegistrationForm1.OperationApplication = operationAppllication;


                this.ucRegistrationForm1.Focus();
            }
            else if (parent.Tag.ToString() == "Register")
            {
                //by zlw 2006-5-24
                //this.ucRecord1.Dept = tvList.SelectedNode.Text.Substring(tvList.SelectedNode.Text.IndexOf('[') + 1, tvList.SelectedNode.Text.IndexOf(']') - 1);

                //this.ucQueryInpatientNo1.txtInputCode.Text =
                //    (select.Tag as OperatorRecord).m_objOpsApp.PatientInfo.Patient.PID.PatientNo;
                this.ucRegistrationForm1.HandInput = false;
                this.ucRegistrationForm1.IsNew     = false;
                this.ucRegistrationForm1.IsCancled = false;
                // {CB2F6DC4-F9C6-4756-A118-CEDB907C39EC}
                //this.ucRegistrationForm1.OperationRecord = select.Tag as OperationRecord;
                OperationRecord operationRecord = select.Tag as OperationRecord;

                int returnValue = ValidInstate(select.Tag as OperationRecord);

                if (returnValue < 0)
                {
                    //this.ucRegistrationForm1.OperationRecord = new OperationRecord();
                    this.ucRegistrationForm1.Clear();
                    return;
                }
                this.ucRegistrationForm1.OperationRecord = operationRecord;


                this.ucRegistrationForm1.Focus();
            }
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 添加患者下的申请单列表
        /// </summary>
        /// <param name="dept"></param>
        /// <returns></returns>
        private int AddApply(NeuObject dept)
        {
            DateTime begin = DateTime.MinValue, end = DateTime.MinValue;

            if (this.GetDateTime(ref begin, ref end) == -1)
            {
                return(-1);
            }
            //申请单列表
            ArrayList al = Environment.OperationManager.GetOpsAppList(dept, begin, end);

            foreach (TreeNode node in this.tvApply.Nodes[0].Nodes)
            {
                PatientInfo patient = node.Tag as PatientInfo;

                for (int i = al.Count - 1; i >= 0; i--)
                {
                    OperationAppllication apply = (OperationAppllication)al[i];
                    if (apply.PatientInfo.ID == patient.ID)
                    {
                        TreeNode child = new TreeNode();
                        if (apply.OperateKind == "2")
                        {
                            child.Text      = "【急】";
                            child.ForeColor = System.Drawing.Color.Red;
                        }
                        else
                        {
                            child.ForeColor = System.Drawing.Color.Black;
                        }

                        if (apply.OperationInfos.Count > 0)
                        {
                            child.Text = child.Text + (apply.OperationInfos[0] as OperationInfo).OperationItem.Name;
                        }
                        if (apply.ExecStatus == "3")
                        {
                            child.Text = child.Text + "『已安排』";
                        }
                        if (apply.ExecStatus == "4")
                        {
                            child.Text = child.Text + "『已登记』";
                        }
                        if (apply.ExecStatus == "5")
                        {
                            child.Text = child.Text + "『已取消登记』";
                        }
                        if (apply.IsValid == false)
                        {
                            child.Text = child.Text + "『已取消申请』";
                        }
                        if (child.Text == "")
                        {
                            child.Text = apply.PreDate.ToString();
                        }

                        child.Tag                = apply;
                        child.ImageIndex         = 2;
                        child.SelectedImageIndex = 2;
                        node.Nodes.Add(child);
                    }
                }
                node.Expand();
            }

            return(0);
        }