예제 #1
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}
        }
예제 #2
0
        /// <summary>
        /// 设置护士、手术台列表位置
        /// </summary>
        /// <returns></returns>
        //private int SetLocation()
        //{
        //    Control _cell = fpSpread1.EditingControl;
        //    if (_cell == null) return 0;

        //    //助手、主麻
        //    if (fpSpread1_Sheet1.ActiveColumnIndex == (int)Cols.anaeDoct ||
        //        fpSpread1_Sheet1.ActiveColumnIndex == (int)Cols.anaeHelper)
        //    {
        //        lbDoctor.Location = new Point( _cell.Location.X,
        //            _cell.Location.Y + _cell.Height + SystemInformation.Border3DSize.Height * 2);
        //        lbDoctor.Size = new Size(110, 150);
        //    }
        //    else if (fpSpread1_Sheet1.ActiveColumnIndex == (int)Cols.anaeType)
        //    {
        //        lbAnaetype.Location = new Point(_cell.Location.X,
        //            _cell.Location.Y + _cell.Height + SystemInformation.Border3DSize.Height * 2);
        //        lbAnaetype.Size = new Size(110, 150);
        //    }
        //    return 0;
        //}
        /// <summary>
        /// 选择医生
        /// </summary>
        /// <param name="Column"></param>
        /// <returns></returns>
        //private int SelectDoctor(int Column)
        //{
        //    int CurrentRow = fpSpread1_Sheet1.ActiveRowIndex;
        //    if (CurrentRow < 0) return 0;

        //    fpSpread1.StopCellEditing();
        //    NeuObject item = null;
        //    item = lbDoctor.GetSelectedItem();

        //    if (item == null) return -1;

        //    fpSpread1_Sheet1.Cells[CurrentRow, Column].Tag = item;
        //    fpSpread1_Sheet1.SetValue(CurrentRow, Column, item.Name, false);

        //    lbDoctor.Visible = false;

        //    return 0;
        //}

        /// <summary>
        /// 选择麻醉类型
        /// </summary>
        /// <returns></returns>
        //private int SelectType()
        //{
        //    int CurrentRow = fpSpread1_Sheet1.ActiveRowIndex;
        //    if (CurrentRow < 0) return 0;

        //    fpSpread1.StopCellEditing();
        //    NeuObject item = null;
        //    item = lbAnaetype.GetSelectedItem();

        //    if (item == null) return -1;

        //    fpSpread1_Sheet1.Cells[CurrentRow, (int)Cols.anaeType].Tag= item;
        //    fpSpread1_Sheet1.SetValue(CurrentRow, (int)Cols.anaeType, item.Name, false);

        //    lbAnaetype.Visible = false;

        //    return 0;
        //}
        /// <summary>
        /// 添加手术申请信息
        /// </summary>
        /// <param name="apply"></param>
        /// <returns></returns>
        public int AddOperationApplication(Neusoft.HISFC.Models.Operation.OperationAppllication apply)
        {
            this.fpSpread1_Sheet1.Rows.Add(fpSpread1_Sheet1.RowCount, 1);
            int row = fpSpread1_Sheet1.RowCount - 1;

            FarPoint.Win.Spread.CellType.TextCellType txtType = new FarPoint.Win.Spread.CellType.TextCellType();
            txtType.StringTrim             = System.Drawing.StringTrimming.EllipsisWord;
            txtType.ReadOnly               = true;
            fpSpread1_Sheet1.Rows[row].Tag = apply;
            //护士站
            Department dept = Environment.IntegrateManager.GetDepartment(apply.PatientInfo.PVisit.PatientLocation.Dept.ID);

            if (dept != null)
            {
                fpSpread1_Sheet1.SetValue(row, (int)Cols.nurseID, dept.Name, false);
            }
            //床号
            fpSpread1_Sheet1.SetValue(row, (int)Cols.bedID, apply.PatientInfo.PVisit.PatientLocation.Bed.ID, false);
            //患者姓名
            fpSpread1_Sheet1.SetValue(row, (int)Cols.Name, apply.PatientInfo.Name, false);
            //是否已安排
            if (apply.IsAnesth)
            {
                fpSpread1_Sheet1.Cells[row, (int)Cols.Name].Note = "已安排";
            }
            else
            {
                fpSpread1_Sheet1.Cells[row, (int)Cols.Name].Note = "";
            }
            //性别
            fpSpread1_Sheet1.SetValue(row, (int)Cols.Sex, apply.PatientInfo.Sex.Name, false);
            //年龄
            //int interval = DateTime.Now.Year - apply.PatientInfo.Birthday.Year;
            string age = Neusoft.HISFC.BizProcess.Integrate.Function.GetAge(apply.PatientInfo.Birthday);//interval + "岁";

            //if (interval == 0)
            //{
            //    interval = DateTime.Now.Month - apply.PatientInfo.Birthday.Month;
            //    age = interval + "月";
            //}
            //if (interval == 0)
            //{
            //    interval = DateTime.Now.Day - apply.PatientInfo.Birthday.Day;
            //    age = interval + "天";
            //}
            fpSpread1_Sheet1.SetValue(row, (int)Cols.age, age, false);
            //术前诊断
            if (apply.DiagnoseAl != null && apply.DiagnoseAl.Count > 0)
            {
                // TODO: 添加术前诊断

                fpSpread1_Sheet1.SetValue(row, (int)Cols.Diagnose, (apply.DiagnoseAl[0] as Neusoft.HISFC.Models.HealthRecord.DiagnoseBase).ICD10.Name, false);
            }
            else
            {
                fpSpread1_Sheet1.SetValue(row, (int)Cols.Diagnose, "", false);
            }
            //主手术名称
            string opName = "";

            if (apply.OperationInfos != null && apply.OperationInfos.Count > 0)
            {
                foreach (OperationInfo item in apply.OperationInfos)
                {
                    if (item.IsMainFlag)
                    {
                        opName = item.OperationItem.Name;
                        break;
                    }
                }
                if (opName == "")
                {
                    opName = (apply.OperationInfos[0] as OperationInfo).OperationItem.Name;
                }
            }
            fpSpread1_Sheet1.SetValue(row, (int)Cols.opItemName, opName, false);

            //手术医生
            fpSpread1_Sheet1.SetValue(row, (int)Cols.opDoc, apply.OperationDoctor.Name, false);
            //合并疾病
            fpSpread1_Sheet1.SetValue(row, (int)Cols.anaeNote, apply.AneNote, false);


            //麻醉方式
            if (apply.AnesType.ID != null && apply.AnesType.ID != "")
            {
                NeuObject obj = Environment.GetAnes(apply.AnesType.ID.ToString());

                if (obj != null)
                {
                    fpSpread1_Sheet1.SetValue(row, (int)Cols.anaeType, obj.Name, false);
                    fpSpread1_Sheet1.SetTag(row, (int)Cols.anaeType, obj);
                }
            }



            //是否急诊
            if (apply.OperateKind == "2")
            {
                fpSpread1_Sheet1.RowHeader.Cells[row, 0].BackColor = Color.Red;
                fpSpread1_Sheet1.RowHeader.Cells[row, 0].Text      = "急";
            }
            fpSpread1_Sheet1.Cells[row, 0, row, 8].CellType = txtType;

            if (apply.RoleAl != null && apply.RoleAl.Count != 0)
            {
                foreach (ArrangeRole role in apply.RoleAl)
                {
                    if (role.RoleType.ID.ToString() == EnumOperationRole.Anaesthetist.ToString())//主麻
                    {
                        string name = role.Name;
                        if (role.RoleOperKind.ID != null)
                        {
                            //直落
                            if (role.RoleOperKind.ID.ToString() == EnumRoleOperKind.ZL.ToString())
                            {
                                name = name + "|▲";
                            }
                            //接班
                            else if (role.RoleOperKind.ID.ToString() == EnumRoleOperKind.JB.ToString())
                            {
                                name = name + "|△";
                            }
                        }
                        fpSpread1_Sheet1.SetValue(row, (int)Cols.anaeDoct, name, false);
                        NeuObject obj = (NeuObject)role;
                        obj.Memo = role.RoleOperKind.ID.ToString();
                        fpSpread1_Sheet1.Cells[row, (int)Cols.anaeDoct].Tag = obj;
                    }
                    else if (role.RoleType.ID.ToString() == EnumOperationRole.AnaesthesiaHelper.ToString())//助手
                    {
                        string name = role.Name;
                        if (role.RoleOperKind.ID != null)
                        {
                            //直落
                            if (role.RoleOperKind.ID.ToString() == EnumRoleOperKind.ZL.ToString())
                            {
                                name = name + "|▲";
                            }
                            //接班
                            else if (role.RoleOperKind.ID.ToString() == EnumRoleOperKind.JB.ToString())
                            {
                                name = name + "|△";
                            }
                        }
                        fpSpread1_Sheet1.SetValue(row, (int)Cols.anaeHelper, name, false);
                        NeuObject obj = (NeuObject)role;
                        obj.Memo = role.RoleOperKind.ID.ToString();
                        fpSpread1_Sheet1.Cells[row, (int)Cols.anaeHelper].Tag = obj;
                    }
                    else if (role.RoleType.ID.ToString() == EnumOperationRole.AnaeTmpHelper1.ToString())
                    {
                        fpSpread1_Sheet1.SetValue(row, (int)Cols.anaeTmpHelper1, role.Name, false);
                    }
                    else if (role.RoleType.ID.ToString() == EnumOperationRole.AnaeTmpHelper2.ToString())
                    {
                        fpSpread1_Sheet1.SetValue(row, (int)Cols.anaeTmpHelper2, role.Name, false);
                    }
                }
            }
            //手术台
            if (apply.OpsTable != null)
            {
                fpSpread1_Sheet1.SetValue(row, (int)Cols.TableID, apply.OpsTable.Name, false);
                NeuObject obj = new NeuObject();
                obj.ID   = apply.OpsTable.ID;
                obj.Name = apply.OpsTable.Name;
                fpSpread1_Sheet1.Cells[row, (int)Cols.TableID].Tag = obj;
            }

            //{B9DDCC10-3380-4212-99E5-BB909643F11B}
            fpSpread1_Sheet1.Cells[row, (int)Cols.anaeWay].CellType = txtType;
            fpSpread1_Sheet1.SetValue(row, (int)Cols.anaeWay, this.anneObjectHelper.GetName(apply.AnesWay));
            fpSpread1_Sheet1.Cells[row, (int)Cols.TableID].CellType = txtType;

            return(0);
        }
예제 #3
0
        /// <summary>
        /// 添加申请单
        /// </summary>
        /// <param name="appliction"></param>
        public void AddAppliction(Neusoft.HISFC.Models.Operation.OperationAppllication appliction)
        {
            if (appliction == null)
            {
                return;
            }

            this.neuSpread1_Sheet1.RowCount += 1;
            int i = this.neuSpread1_Sheet1.RowCount - 1;

            this.neuSpread1_Sheet1.Rows[i].Height              = 30;
            this.neuSpread1_Sheet1.Rows[i].VerticalAlignment   = FarPoint.Win.Spread.CellVerticalAlignment.Center;
            this.neuSpread1_Sheet1.Rows[i].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;

            this.neuSpread1_Sheet1.Cells[i, 0].Text = appliction.PatientInfo.PVisit.PatientLocation.Dept.Name;
            this.neuSpread1_Sheet1.Cells[i, 1].Text = appliction.PatientInfo.PVisit.PatientLocation.Bed.ID;
            this.neuSpread1_Sheet1.Cells[i, 2].Text = appliction.PatientInfo.Name;
            this.neuSpread1_Sheet1.Cells[i, 3].Text = appliction.PatientInfo.Sex.Name;
            this.neuSpread1_Sheet1.Cells[i, 4].Text = appliction.PatientInfo.Age;
            //术前诊断
            if (appliction.DiagnoseAl.Count > 0)
            {
                this.neuSpread1_Sheet1.Cells[i, 5].Text = (appliction.DiagnoseAl[0] as NeuObject).Name;
            }
            //手术名称
            this.neuSpread1_Sheet1.Cells[i, 6].Text = appliction.MainOperationName;

            if (this.arrangeType == Neusoft.HISFC.BizProcess.Interface.Operation.EnumArrangeType.Operation)
            {
                this.neuSpread1_Sheet1.Cells[i, 7].Text = appliction.OperationDoctor.Name;
                this.neuSpread1_Sheet1.Cells[i, 8].Text = appliction.OpsTable.ID;
                //洗手护士
                string nurse = string.Empty;
                foreach (ArrangeRole role in appliction.RoleAl)
                {
                    if (role.RoleType.ID.ToString() == EnumOperationRole.WashingHandNurse.ToString())
                    {
                        nurse += role.Name + "\n";
                    }
                }
                this.neuSpread1_Sheet1.Cells[i, 9].Text = nurse;
                //巡回护士
                nurse = string.Empty;
                foreach (ArrangeRole role in appliction.RoleAl)
                {
                    if (role.RoleType.ID.ToString() == EnumOperationRole.ItinerantNurse.ToString())
                    {
                        nurse += role.Name + "\n";
                    }
                }
                this.neuSpread1_Sheet1.Cells[i, 10].Text = nurse;
            }
            else
            {
                //麻醉类型
                this.neuSpread1_Sheet1.Cells[i, 11].Text = appliction.AnesType.Name;
                //主麻
                string nurse = string.Empty;
                foreach (ArrangeRole role in appliction.RoleAl)
                {
                    if (role.RoleType.ID.ToString() == EnumOperationRole.Anaesthetist.ToString())
                    {
                        nurse += role.Name + "\n";
                    }
                }
                this.neuSpread1_Sheet1.Cells[i, 12].Text = nurse;
                this.neuSpread1_Sheet1.Cells[i, 13].Text = appliction.OpsTable.Name;
            }
        }
예제 #4
0
 public AnaeRecord(OperationAppllication operationApplication)
 {
     this.operationApplication = operationApplication;
 }
예제 #5
0
        /// <summary>
        ///
        /// </summary>
        private void ucQueryInpatientNo1_myEvent()
        {
            if (ucQueryInpatientNo1.InpatientNo == "")
            {
                MessageBox.Show("没有该患者信息!", "提示");
                ucQueryInpatientNo1.Focus();
                return;
            }
            try
            {
                //手术申请实体类
                Neusoft.HISFC.Models.Operation.OperationAppllication apply = new Neusoft.HISFC.Models.Operation.OperationAppllication();
                //获取该患者手术信息


                frmSelectOps sel = new frmSelectOps(ucQueryInpatientNo1.InpatientNo);
                if (sel.ShowDialog() == DialogResult.OK)
                {
                    //if (sel.IsReg) //处理已经等过记的患者---费用补录
                    //{
                    //    if (!string.IsNullOrEmpty(sel.OpNo))
                    //    {
                    //        string operationNo = sel.OpNo; //Environment.OperationManager.GetMaxByPatient(ucQueryInpatientNo1.InpatientNo);
                    //        if (operationNo == null || operationNo == "")
                    //        {
                    //            MessageBox.Show("该患者没有进行手术!", "提示");
                    //            ucQueryInpatientNo1.Focus();
                    //            return;
                    //        }
                    //        else
                    //        {
                    //            //根据手术序号获得手术实体
                    //            apply = Environment.OperationManager.GetOpsApp(operationNo);
                    //            //this.lblOpName.Text = string.Format("手术:{0}",apply.o
                    //        }
                    //        if (apply == null) return;
                    //        //读取手术项目信息
                    //        ucFeeForm1.OperationAppllication = apply;
                    //    }
                    //}
                    //else   //处理没有登记的
                    //{


                    //}

                    if (!string.IsNullOrEmpty(sel.OpNo))
                    {
                        string operationNo = sel.OpNo; //Environment.OperationManager.GetMaxByPatient(ucQueryInpatientNo1.InpatientNo);
                        if (operationNo == null || operationNo == "")
                        {
                            MessageBox.Show("该患者没有进行手术排班,请先进行手术排班!", "提示");
                            ucQueryInpatientNo1.Focus();
                            return;
                        }
                        else
                        {
                            //根据手术序号获得手术实体
                            apply = Environment.OperationManager.GetOpsApp(operationNo);
                            //this.lblOpName.Text = string.Format("手术:{0}",apply.o
                        }
                        if (apply == null)
                        {
                            return;
                        }
                        //读取手术项目信息
                        ucFeeForm1.IsReg = sel.IsReg;
                        ucFeeForm1.OperationAppllication = apply;
                    }
                }
                else
                {
                }
                //neusoft.HISFC.Management.Operator.Operator opMgr = new neusoft.HISFC.Management.Operator.Operator();
            }
            catch (Exception e)
            {
                MessageBox.Show("获取患者手术信息时出错!" + e.Message, "提示");
                ucQueryInpatientNo1.Focus();
                return;
            }
        }