/// <summary> /// 添加手术人员 /// </summary> /// <param name="id">人员ID</param> /// <param name="name">人员姓名</param> /// <param name="foreFlag">录入标记</param> /// <param name="operationRole">人员角色</param> /// Robin 2006-12-14 public void AddRole(string id, string name, string foreFlag, EnumOperationRole operationRole) { ArrangeRole role = new ArrangeRole(); role.OperationNo = this.ID;//申请号 role.ID = id; role.Name = name; role.RoleType.ID = operationRole;//角色编码 role.ForeFlag = foreFlag; this.RoleAl.Add(role); }
private void lvAnaeDoct_DragDrop(object sender, DragEventArgs e) { ListViewItem item = e.Data.GetData(typeof(ListViewItem)) as ListViewItem; if (sender == this.lvAnaeDoct) { //对象属性赋值 ArrangeRole myRole = new ArrangeRole(item.Tag as NeuObject); //角色对象 myRole.RoleType.ID = EnumOperationRole.Anaesthetist; //角色编码 myRole.OperationNo = this.anaeRecord.OperationApplication.ID; myRole.ForeFlag = "1"; //术后录入 item.Tag = myRole; this.anaeRecord.OperationApplication.RoleAl.Add(myRole); //加入人员角色对象 this.anaeRecord.OperationApplication.User = Neusoft.FrameWork.Management.Connection.Operator as Employee; //操作员 } else if (sender == this.lvAnaeHelper) { //对象属性赋值 ArrangeRole myRole = new ArrangeRole(item.Tag as NeuObject); //角色对象 myRole.RoleType.ID = EnumOperationRole.AnaesthesiaHelper; //角色编码 myRole.OperationNo = this.anaeRecord.OperationApplication.ID; myRole.ForeFlag = "1"; //术后录入 item.Tag = myRole; this.anaeRecord.OperationApplication.RoleAl.Add(myRole); //加入人员角色对象 this.anaeRecord.OperationApplication.User = Neusoft.FrameWork.Management.Connection.Operator as Employee; //操作员 } else if (sender == this.lvPersons) { EnumOperationRole role; if (item.ListView == this.lvAnaeDoct) { role = EnumOperationRole.Anaesthetist; } else { role = EnumOperationRole.AnaesthesiaHelper; } this.anaeRecord.OperationApplication.RemoveRole((item.Tag as NeuObject).ID, role); } item.ListView.Items.Remove(item); (sender as ListView).Items.Add(item); }
/// <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); }
/// <summary> /// 将界面中显示的信息传入到m_objAnaeRec成员对象中 /// </summary> /// <return>0 success -1 fail</return> private int GetCtrlInfo() { try { if (this.txtPatient.Text.Trim() == "") { MessageBox.Show("请输入手术患者住院号或门诊号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); this.txtPatient.Focus(); return(-1); } //是否记帐 if (this.cmbCharge.Tag.ToString() != "") { this.anaeRecord.IsCharged = Neusoft.FrameWork.Function.NConvert.ToBoolean(int.Parse(this.cmbCharge.Tag.ToString())); } //麻醉方式 this.anaeRecord.OperationApplication.AnesType.ID = this.cmbAnaeType.Tag.ToString(); this.anaeRecord.OperationApplication.AnesType.Name = this.cmbAnaeType.Text; //麻醉时间 this.anaeRecord.AnaeDate = this.dtpAnaeDate.Value; //麻醉效果 this.anaeRecord.AnaeResult.ID = this.cmbAnaeResult.Tag.ToString(); this.anaeRecord.AnaeResult.Name = this.cmbAnaeResult.Text; //麻醉医师 ArrayList alRole = new ArrayList(); foreach (ListViewItem lviAnae in this.lvAnaeDoct.Items) { ArrangeRole role = lviAnae.Tag as ArrangeRole; alRole.Add(lviAnae.Tag); } //麻醉助手 foreach (ListViewItem lviAnaeHelper in this.lvAnaeHelper.Items) { ArrangeRole role = lviAnaeHelper.Tag as ArrangeRole; alRole.Add(lviAnaeHelper.Tag); } //添加临时麻醉助手1 string tmpHelper1 = this.txtTmpHelper1.Text; if (tmpHelper1 != null && tmpHelper1 != "") { ArrangeRole role = new ArrangeRole(); role.ID = "777777"; role.RoleType.ID = EnumOperationRole.AnaeTmpHelper1;//角色编码 role.Name = tmpHelper1; role.OperationNo = this.anaeRecord.OperationApplication.ID; role.ForeFlag = "0"; //术前安排 alRole.Add(role); //加入人员角色对象 } //添加临时麻醉助手2 string tmpHelper2 = this.txtTmpHelper2.Text; if (tmpHelper2 != null && tmpHelper2 != "") { ArrangeRole role = new ArrangeRole(); role.ID = "777777"; role.RoleType.ID = EnumOperationRole.AnaeTmpHelper2;//角色编码 role.Name = tmpHelper2; role.OperationNo = this.anaeRecord.OperationApplication.ID; role.ForeFlag = "0"; //术前安排 alRole.Add(role); //加入人员角色对象 } ArrayList al = new ArrayList(); //先清空主麻、助手 for (int i = 0; i < this.anaeRecord.OperationApplication.RoleAl.Count; i++) { ArrangeRole role = this.anaeRecord.OperationApplication.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() ) { al.Add(role.Clone()); } } al.AddRange(alRole); this.anaeRecord.OperationApplication.RoleAl = al; //是否入PACU this.anaeRecord.IsPACU = this.cbxIsPacu.Checked; //判断出入PACU室时间的合理性: if (this.dtpInPacuDate.Value > this.dtpOutPacuDate.Value) { MessageBox.Show("出PACU室时间 不应小于 进PACU室时间", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); this.dtpOutPacuDate.Focus(); return(-1); } //入室时间 this.anaeRecord.InPacuDate = this.dtpInPacuDate.Value; //出室时间 this.anaeRecord.OutPacuDate = this.dtpOutPacuDate.Value; //入室状态 this.anaeRecord.InPacuStatus.ID = this.cmbInStatus.Tag.ToString(); this.anaeRecord.InPacuStatus.Name = this.cmbInStatus.Text; //出室状态 this.anaeRecord.OutPacuStatus.ID = this.cmbOutStatus.Tag.ToString(); this.anaeRecord.OutPacuStatus.Name = this.cmbOutStatus.Text; //是否镇痛 this.anaeRecord.IsDemulcent = this.cbxIsDemulcent.Checked; //镇痛方式 this.anaeRecord.DemulcentType.ID = this.cmbDemuKind.Tag.ToString(); this.anaeRecord.DemulcentType.Name = this.cmbDemuKind.Text; //泵型 this.anaeRecord.DemulcentModel.ID = this.cmbDemuModel.Tag.ToString(); this.anaeRecord.DemulcentModel.Name = this.cmbDemuModel.Text; //镇痛天数 if (this.txtDemuDays.Text != "") { this.anaeRecord.DemulcentDays = int.Parse(this.txtDemuDays.Text); } //拔管时间 this.anaeRecord.PullOutDate = this.dtpPullOutDate.Value; //拔管人 if (this.txtPullOutOpcd.Tag != null) { this.anaeRecord.PullOutOperator.ID = this.txtPullOutOpcd.Tag.ToString(); this.anaeRecord.PullOutOperator.Name = this.txtPullOutOpcd.Text; } //镇痛效果 this.anaeRecord.DemulcentEffect.ID = this.cmbDemuResult.Tag.ToString(); this.anaeRecord.DemulcentEffect.Name = this.cmbDemuResult.Text; //备注 this.anaeRecord.Memo = this.txtRemark.Text; } catch { return(-1); } return(0); }
/// <summary> /// 实体赋值 /// </summary> /// <returns></returns> private int GetValue() { //this.record.OperationAppllication.ID = Environment.OperationManager.GetNewOperationNo(); this.record.OpsDate = this.dtBeginDate.Value; //开始时间 this.record.OutDate = this.dtEndDate.Value; //结束时间 this.record.OperationAppllication.OperationDoctor.Dept = Environment.IntegrateManager.GetEmployeeInfo(cmbDoctor.Tag.ToString()).Dept; this.record.OperationAppllication.OperationDoctor.Dept.ID = this.comDept.Tag.ToString(); ArrayList roleArrayList = new ArrayList(); for (int i = 0; i < this.record.OperationAppllication.RoleAl.Count; i++) { ArrangeRole tmprole = this.record.OperationAppllication.RoleAl[i] as ArrangeRole; #region {3D5AAF4F-8EA3-46b7-8E5C-FFA6EBA20527} if ( tmprole.RoleType.ID.ToString() != EnumOperationRole.Operator.ToString() && tmprole.RoleType.ID.ToString() != EnumOperationRole.Helper1.ToString() && tmprole.RoleType.ID.ToString() != EnumOperationRole.Helper2.ToString() && tmprole.RoleType.ID.ToString() != EnumOperationRole.WashingHandNurse.ToString() && tmprole.RoleType.ID.ToString() != EnumOperationRole.ItinerantNurse.ToString() && tmprole.RoleType.ID.ToString() != EnumOperationRole.TmpHelper1.ToString() && tmprole.RoleType.ID.ToString() != EnumOperationRole.TmpHelper2.ToString() && tmprole.RoleType.ID.ToString() != EnumOperationRole.TmpStudent1.ToString() && tmprole.RoleType.ID.ToString() != EnumOperationRole.TmpStudent2.ToString() ) { roleArrayList.Add(tmprole); } #endregion } this.record.OperationAppllication.RoleAl.Clear(); #region 手术医生 ArrangeRole role = new ArrangeRole(); role.OperationNo = this.record.OperationAppllication.ID; //申请号 role.ID = this.cmbDoctor.Tag.ToString(); //人员代码 role.Name = this.cmbDoctor.Text; role.RoleType.ID = EnumOperationRole.Operator; //角色编码 role.ForeFlag = "1"; //术后录入 roleArrayList.Add(role); this.record.OperationAppllication.OperationDoctor.ID = role.ID; this.record.OperationAppllication.OperationDoctor.Name = role.Name; #endregion //第一诊断 if (this.record.OperationAppllication.DiagnoseAl.Count > 0) { this.record.BloodPressureIn = (record.OperationAppllication.DiagnoseAl[0] as Neusoft.HISFC.Models.HealthRecord.DiagnoseBase).ICD10.Name;//诊断 } #region 助手 //一助 role = new ArrangeRole(); role.OperationNo = this.record.OperationAppllication.ID; //申请号 role.ID = this.cmbHelper1.Tag.ToString(); //人员代码 role.Name = this.cmbHelper1.Text; role.RoleType.ID = EnumOperationRole.Helper1; //角色编码 role.ForeFlag = "1"; //术后录入 roleArrayList.Add(role); this.record.OperationAppllication.HelperAl.Clear(); this.record.OperationAppllication.HelperAl.Add(role); //二助 if (this.cmbHelper2.Tag != null && this.cmbHelper2.Tag.ToString() != "") { role = new ArrangeRole(); role.OperationNo = this.record.OperationAppllication.ID; //申请号 role.ID = this.cmbHelper2.Tag.ToString(); //人员代码 role.Name = this.cmbHelper2.Text; role.RoleType.ID = EnumOperationRole.Helper2; //角色编码 role.ForeFlag = "1"; //术后录入 roleArrayList.Add(role); this.record.OperationAppllication.HelperAl.Add(role); } if (!string.IsNullOrEmpty(txtTmpHelper1.Text)) { role = new ArrangeRole(); role.OperationNo = this.record.OperationAppllication.ID; //申请号 role.ID = "888888"; //人员代码 role.Name = this.txtTmpHelper1.Text; role.RoleType.ID = EnumOperationRole.TmpHelper1.ToString(); //角色编码 role.ForeFlag = "1"; //术后录入 roleArrayList.Add(role); } if (!string.IsNullOrEmpty(txtTmpHelper2.Text)) { role = new ArrangeRole(); role.OperationNo = this.record.OperationAppllication.ID; //申请号 role.ID = "888888"; //人员代码 role.Name = this.txtTmpHelper2.Text; role.RoleType.ID = EnumOperationRole.TmpHelper2.ToString(); //角色编码 role.ForeFlag = "1"; //术后录入 roleArrayList.Add(role); } #region {3D5AAF4F-8EA3-46b7-8E5C-FFA6EBA20527} if (!string.IsNullOrEmpty(txtTmpStudent1.Text)) { role = new ArrangeRole(); role.OperationNo = this.record.OperationAppllication.ID; //申请号 role.ID = "888888"; //人员代码 role.Name = this.txtTmpStudent1.Text; role.RoleType.ID = EnumOperationRole.TmpStudent1.ToString(); //角色编码 role.ForeFlag = "1"; //术后录入 //this.operationRecord.OperationAppllication.RoleAl.Add(role); //this.operationRecord.OperationAppllication.HelperAl.Add(role); roleArrayList.Add(role); } if (!string.IsNullOrEmpty(txtTmpStudent2.Text)) { role = new ArrangeRole(); role.OperationNo = this.record.OperationAppllication.ID; //申请号 role.ID = "888888"; //人员代码 role.Name = this.txtTmpStudent2.Text; role.RoleType.ID = EnumOperationRole.TmpStudent2.ToString(); //角色编码 role.ForeFlag = "1"; //术后录入 //this.operationRecord.OperationAppllication.RoleAl.Add(role); //this.operationRecord.OperationAppllication.HelperAl.Add(role); roleArrayList.Add(role); } #endregion #endregion #region 巡回护士 if (this.cmbXH1.Tag != null && this.cmbXH1.Tag.ToString() != "") { this.record.OperationAppllication.AddRole(this.cmbXH1.Tag.ToString(), this.cmbXH1.Text, "1", EnumOperationRole.ItinerantNurse); } if (this.cmbXH2.Tag != null && this.cmbXH2.Tag.ToString() != "") { this.record.OperationAppllication.AddRole(this.cmbXH2.Tag.ToString(), this.cmbXH2.Text, "1", EnumOperationRole.ItinerantNurse); } #endregion #region 洗手护士 if (this.cmbWash1.Tag != null && this.cmbWash1.Tag.ToString() != "") { this.record.OperationAppllication.AddRole(this.cmbWash1.Tag.ToString(), this.cmbWash1.Text, "1", EnumOperationRole.WashingHandNurse); } if (this.cmbWash2.Tag != null && this.cmbWash2.Tag.ToString() != "") { this.record.OperationAppllication.AddRole(this.cmbWash2.Tag.ToString(), this.cmbWash2.Text, "1", EnumOperationRole.WashingHandNurse); } #endregion this.record.OperationAppllication.RoleAl.AddRange(roleArrayList); //手术规模 this.record.OperationAppllication.OperationType.ID = this.cmbOpType.Tag.ToString(); //手术分类 this.record.OperationAppllication.OperateKind = System.Convert.ToString(this.cmbOperKind.SelectedItem.ID); //切口类型 this.record.OperationAppllication.InciType.ID = this.cmbIncityep.Tag.ToString(); //是否感染 this.record.IsInfected = this.cbxInfect.Checked; //是否有菌 this.record.OperationAppllication.IsGermCarrying = this.cbxGerm.Checked; this.record.OperationAppllication.IsFinished = true; this.record.OperationAppllication.PatientInfo.Weight = "0"; //体重 this.record.OperationAppllication.ExecStatus = "4"; //登记完成 return(0); }