/// <summary> /// 更新会诊记录 /// </summary> /// <param name="consultation"></param> /// <returns></returns> public int UpdateConsultation(Neusoft.HISFC.Models.Order.Consultation consultation) { string strSql = ""; if (this.Sql.GetSql("Order.Consultation.UpdateItem.1", ref strSql) == -1) { this.Err = this.Sql.Err; return(-1); } return(this.ExecNoQuery(strSql, consultation.ID, consultation.InpatientNo, consultation.PatientNo, consultation.Dept.ID, consultation.NurseStation.ID, consultation.Doctor.ID, consultation.Doctor.Name, consultation.ApplyTime.ToString(), consultation.ConsultationTime.ToString(), consultation.Type.GetHashCode().ToString(), consultation.IsEmergency.GetHashCode().ToString(), consultation.DeptConsultation.ID, consultation.DoctorConsultation.ID, consultation.Name, consultation.BeginTime.ToString(), consultation.EndTime.ToString(), consultation.ConsultationTime.ToString(), consultation.Result, consultation.DoctorConfirm.ID, consultation.State.ToString(), this.Operator.ID, consultation.HosConsultation.Name, //医院名称 consultation.EmergencyMemo, //紧急说明 consultation.User01, consultation.User02, consultation.User03, consultation.Memo, //患者备注 consultation.BedNO, consultation.IsCreateOrder.GetHashCode().ToString() //能否开立医嘱 )); }
int Neusoft.FrameWork.WinForms.Forms.IMaintenanceControlable.Delete() { try { if (this.neuSpread1.Sheets[0].ActiveRow == null) { return(-1); } Neusoft.HISFC.Models.Order.Consultation permission = this.neuSpread1.Sheets[0].ActiveRow.Tag as Neusoft.HISFC.Models.Order.Consultation; if (permission == null) { return(-1); } if (MessageBox.Show("确实要删除该授权吗?\n该操作不能撤销!", "警告", MessageBoxButtons.OKCancel) == DialogResult.Cancel) { return(0); } //Neusoft.FrameWork.Management.Transaction t = new Neusoft.FrameWork.Management.Transaction(manager.Connection); //t.BeginTransaction(); Neusoft.FrameWork.Management.PublicTrans.BeginTransaction(); manager.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans); if (this.manager.DeletePermission(permission.ID) == -1) { Neusoft.FrameWork.Management.PublicTrans.RollBack();; MessageBox.Show(manager.Err); return(-1); } Neusoft.FrameWork.Management.PublicTrans.Commit(); this.Retrieve(); } catch { } return(0); //throw new Exception("The method or operation is not implemented."); }
//public int Del() //{ // try // { // if (this.neuSpread1.Sheets[0].ActiveRow == null) return -1; // Neusoft.HISFC.Models.Order.Consultation permission = this.neuSpread1.Sheets[0].ActiveRow.Tag as Neusoft.HISFC.Models.Order.Consultation; // if (permission == null) return -1; // if (MessageBox.Show("确实要删除该授权吗?\n该操作不能撤销!", "警告", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return 0; // Neusoft.FrameWork.Management.Transaction t = new Neusoft.FrameWork.Management.Transaction(manager.Connection); // t.BeginTransaction(); // manager.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans); // if (this.manager.DeletePermission(permission.ID) == -1) // { // Neusoft.FrameWork.Management.PublicTrans.RollBack();; // MessageBox.Show(manager.Err); // return -1; // } // Neusoft.FrameWork.Management.PublicTrans.Commit(); // this.Retrieve(); // } // catch { } // return 0; //} //public int MyAdd() //{ // try // { // if (this.inpatientno == "") return -1; // ucPermissionInput u = new ucPermissionInput(); // Neusoft.HISFC.Models.Order.Consultation permission = new Neusoft.HISFC.Models.Order.Consultation(); // permission.InpatientNo = this.inpatientno; // if (this.inpatientno == null || this.inpatientno == "") // { // MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("请输入住院号")); // return -1; // } // if (this.ucPatient1.PatientInfo.PVisit.PatientLocation.Dept.ID != ((Neusoft.HISFC.Models.Base.Employee)this.manager.Operator).Dept.ID) // { // MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("非本科患者不能授权")); // return -1; // } // permission.BeginTime = manager.GetDateTimeFromSysDateTime(); // permission.EndTime = permission.BeginTime; // u.Permission = permission; // Neusoft.FrameWork.WinForms.Classes.Function.PopForm.Text = "授权"; // Neusoft.FrameWork.WinForms.Classes.Function.PopForm.MaximizeBox = false; // Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(u); // this.Retrieve(); // } // catch { } // return 0; //} //public int Copy() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int Cut() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int Delete() //{ // return this.Del(); // //throw new Exception("The method or operation is not implemented."); //} //public int Export() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int Import() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int Init() //{ // this.init(); // return 0; // //throw new Exception("The method or operation is not implemented."); //} //private bool isDirty = false; //public bool IsDirty //{ // get // { // return this.isDirty; // //throw new Exception("The method or operation is not implemented."); // } // set // { // this.isDirty = value; // //throw new Exception("The method or operation is not implemented."); // } //} //public int Modify() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int NextRow() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int Paste() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int PreRow() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int Print() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int PrintConfig() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int PrintPreview() //{ // return 0; // //throw new Exception("The method or operation is not implemented."); //} //public int Query() //{ // return this.Retrieve(); // //throw new Exception("The method or operation is not implemented."); //} //Neusoft.FrameWork.WinForms.Forms.IMaintenanceForm queryForm; //public Neusoft.FrameWork.WinForms.Forms.IMaintenanceForm QueryForm //{ // get // { // return this.queryForm; // //throw new Exception("The method or operation is not implemented."); // } // set // { // this.queryForm = value; // //throw new Exception("The method or operation is not implemented."); // } //} //public int Save() //{ // return 0; // //return this.Add(); // //throw new Exception("The method or operation is not implemented."); //} //public int Add() //{ // //return this.MyAdd(); // //throw new Exception("The method or operation is not implemented."); // try // { // if (this.inpatientno == "") return -1; // ucPermissionInput u = new ucPermissionInput(); // Neusoft.HISFC.Models.Order.Consultation permission = new Neusoft.HISFC.Models.Order.Consultation(); // permission.InpatientNo = this.inpatientno; // if (this.inpatientno == null || this.inpatientno == "") // { // MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("请输入住院号")); // return -1; // } // if (this.ucPatient1.PatientInfo.PVisit.PatientLocation.Dept.ID != ((Neusoft.HISFC.Models.Base.Employee)this.manager.Operator).Dept.ID) // { // MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("非本科患者不能授权")); // return -1; // } // permission.BeginTime = manager.GetDateTimeFromSysDateTime(); // permission.EndTime = permission.BeginTime; // u.Permission = permission; // Neusoft.FrameWork.WinForms.Classes.Function.PopForm.Text = "授权"; // Neusoft.FrameWork.WinForms.Classes.Function.PopForm.MaximizeBox = false; // Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(u); // this.Retrieve(); // } // catch { } // return 0; //} #endregion #region IMaintenanceControlable 成员 int Neusoft.FrameWork.WinForms.Forms.IMaintenanceControlable.Add() { try { if (/*this.inpatientno == null ||*/ this.ucQueryInpatientNo1.Text == "") { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("请输入住院号")); return(-1); } //if (this.inpatientno == "") return -1; this.inpatientno = this.ucPatient1.PatientInfo.ID; ucPermissionInput u = new ucPermissionInput(); Neusoft.HISFC.Models.Order.Consultation permission = new Neusoft.HISFC.Models.Order.Consultation(); permission.PatientNo = ucPatient1.PatientInfo.PID.PatientNO; permission.InpatientNo = this.inpatientno; if (this.ucPatient1.PatientInfo.PVisit.PatientLocation.Dept.ID != ((Neusoft.HISFC.Models.Base.Employee) this.manager.Operator).Dept.ID) { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("非本科患者不能授权")); return(-1); } permission.BeginTime = manager.GetDateTimeFromSysDateTime(); permission.EndTime = permission.BeginTime; u.Permission = permission; Neusoft.FrameWork.WinForms.Classes.Function.PopForm.Text = "授权"; Neusoft.FrameWork.WinForms.Classes.Function.PopForm.MaximizeBox = false; Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(u); this.Retrieve(); } catch { } return(0); }
/// <summary> /// /// </summary> /// <param name="sql"></param> /// <returns></returns> protected ArrayList myGetList(string sql) { ArrayList al = new ArrayList(); if (this.ExecQuery(sql) == -1) { return(null); } while (this.Reader.Read()) { Neusoft.HISFC.Models.Order.Consultation obj = new Neusoft.HISFC.Models.Order.Consultation(); try { obj.ID = this.Reader[0].ToString(); obj.InpatientNo = this.Reader[1].ToString(); obj.PatientNo = this.Reader[2].ToString(); obj.Dept.ID = this.Reader[3].ToString(); obj.NurseStation.ID = this.Reader[4].ToString(); obj.Doctor.ID = this.Reader[5].ToString(); obj.Doctor.Name = this.Reader[6].ToString(); obj.ApplyTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[7].ToString()); obj.PreConsultationTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[8].ToString()); obj.IsEmergency = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[9].ToString()); obj.DeptConsultation.ID = this.Reader[10].ToString(); obj.DoctorConsultation.ID = this.Reader[11].ToString(); obj.Name = this.Reader[12].ToString(); obj.BeginTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[13].ToString()); obj.EndTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[14].ToString()); obj.ConsultationTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[15].ToString()); obj.Result = this.Reader[16].ToString(); obj.DoctorConfirm.ID = this.Reader[17].ToString(); obj.State = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[18].ToString()); obj.Doctor.User01 = this.Reader[19].ToString(); obj.Doctor.User02 = this.Reader[20].ToString(); obj.HosConsultation.Name = this.Reader[21].ToString(); //医院名称 obj.EmergencyMemo = this.Reader[22].ToString(); //紧急说明 obj.User01 = this.Reader[23].ToString(); obj.User02 = this.Reader[24].ToString(); obj.User03 = this.Reader[25].ToString(); obj.Memo = this.Reader[26].ToString(); //患者备注 obj.BedNO = this.Reader[27].ToString(); //患者床位 obj.IsCreateOrder = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[28].ToString()); //可否开立医嘱 } catch { this.WriteErr(); return(null); } al.Add(obj); } this.Reader.Close(); return(al); }
public int Retrieve() { this.inpatientno = this.ucPatient1.PatientInfo.ID; if (this.inpatientno == "") { return(-1); } ArrayList al = manager.QueryPermission(this.inpatientno); if (al == null) { MessageBox.Show(manager.Err); return(-1); } this.neuSpread1_Sheet1.RowCount = al.Count; for (int i = 0; i < al.Count; i++) { Neusoft.HISFC.Models.Order.Consultation permission = al[i] as Neusoft.HISFC.Models.Order.Consultation; if (permission == null) { MessageBox.Show("错误!"); return(-1); } //Neusoft.HISFC.Models.Base.Department dept = helper.GetObjectFromID(permission.DeptConsultation.ID) as Neusoft.HISFC.Models.Base.Department; //if (dept == null) //{ // MessageBox.Show("没找到"+permission.DeptConsultation.ID +"的科室."); // return -1; //} this.neuSpread1.Sheets[0].Cells[i, 0].Value = helper.GetObjectFromID(permission.DeptConsultation.ID); this.neuSpread1.Sheets[0].Cells[i, 1].Value = permission.DoctorConsultation.Name; this.neuSpread1.Sheets[0].Cells[i, 2].Value = permission.BeginTime; this.neuSpread1.Sheets[0].Cells[i, 3].Value = permission.EndTime; this.neuSpread1.Sheets[0].Cells[i, 4].Value = permission.Name; this.neuSpread1.Sheets[0].Cells[i, 5].Value = permission.User01; this.neuSpread1.Sheets[0].Cells[i, 6].Value = permission.User02; this.neuSpread1.Sheets[0].Rows[i].Tag = permission; } return(0); }
/// <summary> /// 更新会诊记录和会诊意见 /// </summary> /// <param name="consultation"></param> /// <returns></returns> public int UpdateConsulationRecord(Neusoft.HISFC.Models.Order.Consultation consultation) { string strSql = ""; if (this.Sql.GetSql("Order.Consultation.UpdateCnsl", ref strSql) == -1) { this.Err = "没有找到Order.Consultation.UpdateCnsl字段"; return(-1); } //try //{ // strSql = string.Format(strSql,consultation.ID,consultation.Record,consultation.Suggestion); //} //catch (Exception ex) //{ // this.Err = ex.Message; // this.WriteErr(); // return -1; //} return(this.ExecNoQuery(strSql, consultation.ID, consultation.Record, consultation.Suggestion)); }
/// <summary> /// 新建立一个 /// </summary> protected virtual void NewOne() { if (this.neuButton2.Text == "修改(&M)") { this.neuButton2.Text = "保存(&S)"; } Neusoft.HISFC.Models.RADT.PatientInfo p = inpatientManager.GetPatientInfomation(this.inpatientNo); if (p == null) { return; } consultation = new Neusoft.HISFC.Models.Order.Consultation(); consultation.PatientNo = p.PID.PatientNO; consultation.InpatientNo = p.ID; //会诊默认申请科室和申请医师 consultation.Dept = p.PVisit.PatientLocation.Dept.Clone(); consultation.Doctor.ID = Neusoft.FrameWork.Management.Connection.Operator.ID; consultation.NurseStation = p.PVisit.PatientLocation.NurseCell.Clone(); consultation.State = 1;//申请 this.dtPreConsultation.Value = manager.GetDateTimeFromSysDateTime(); this.dtBegin.Value = this.dtPreConsultation.Value; //默认值 this.dtEnd.Value = this.dtBegin.Value; //默认值 this.chkOuthos.Checked = false; this.chkCreateOrder.Checked = false; //新加的初始化设置 this.cmbAppDept.Text = ((Neusoft.HISFC.Models.Base.Employee)(Neusoft.FrameWork.Management.Connection.Operator)).Dept.Name; this.lblDoc.Text = Neusoft.FrameWork.Management.Connection.Operator.Name; if (this.IsSave == false) { this.rtbResult.Text = ""; this.rtbSource.Text = ""; this.cmbDept.Tag = ""; this.cmbDept.Text = ""; this.cmbDoctor.Tag = ""; this.cmbDoctor.Text = ""; } }
int Neusoft.FrameWork.WinForms.Forms.IMaintenanceControlable.Query() { this.inpatientno = this.ucQueryInpatientNo1.InpatientNo; if (this.inpatientno == "") { return(-1); } ArrayList al = manager.QueryPermission(this.inpatientno); if (al == null) { MessageBox.Show(manager.Err); return(-1); } this.neuSpread1_Sheet1.RowCount = al.Count; for (int i = 0; i < al.Count; i++) { Neusoft.HISFC.Models.Order.Consultation permission = al[i] as Neusoft.HISFC.Models.Order.Consultation; if (permission == null) { MessageBox.Show("错误!"); return(-1); } // 这个可能有问题,如果需要,可以自己写个函数,将permission.DeptConsultation.ID作为参数 // 取得cmbDept里的memo就是科室的全称 this.neuSpread1.Sheets[0].Cells[i, 0].Value = helper.GetName(permission.DeptConsultation.ID); this.neuSpread1.Sheets[0].Cells[i, 1].Value = permission.DoctorConsultation.Name; this.neuSpread1.Sheets[0].Cells[i, 2].Value = permission.BeginTime; this.neuSpread1.Sheets[0].Cells[i, 3].Value = permission.EndTime; this.neuSpread1.Sheets[0].Cells[i, 4].Value = permission.Name; this.neuSpread1.Sheets[0].Cells[i, 5].Value = userHelper.GetName(permission.User01); this.neuSpread1.Sheets[0].Cells[i, 6].Value = permission.User02; this.neuSpread1.Sheets[0].Rows[i].Tag = permission; } return(0); //throw new Exception("The method or operation is not implemented."); }
/// <summary> /// 更新权限记录 /// </summary> /// <param name="consultation"></param> /// <returns></returns> public int UpdatePermission(Neusoft.HISFC.Models.Order.Consultation consultation) { #region "接口" // , --流水号 // , --住院流水号 // , --授权科室代码 // , --授权医师代号 // , --授权医师姓名 // , --医嘱权限 // , --处方起始日 // , --处方结束日 // , --备注 // , --用户代码 // ); --授权时间 #endregion string strSql = ""; if (this.Sql.GetSql("Order.Permission.UpdateItem.1", ref strSql) == -1) { this.Err = this.Sql.Err; return(-1); } try { strSql = string.Format(strSql, consultation.ID, consultation.InpatientNo, consultation.DeptConsultation.ID, consultation.DoctorConsultation.ID, consultation.DoctorConsultation.Name, consultation.Name, consultation.BeginTime.ToString(), consultation.EndTime.ToString() , consultation.Memo, this.Operator.ID); } catch (Exception ex) { this.Err = ex.Message; this.ErrCode = ex.Message; this.WriteErr(); return(-1); } return(this.ExecNoQuery(strSql)); }
private void SetValue() { if (this.fpSpread1_Sheet1.ActiveRow.Tag == null) { return; } this.DisplayPatientInfo(this.patient); consultation = this.fpSpread1_Sheet1.ActiveRow.Tag as Neusoft.HISFC.Models.Order.Consultation; if (this.consultation.Type == Neusoft.HISFC.Models.Order.EnumConsultationType.Hos) { #region 院外会诊 //frmConsultationOuthos f = new frmConsultationOuthos(); //f.Init(consultation); //f.ShowDialog(); //this.init(); #endregion } else { #region 院内会诊 this.bIsApply = this.bisApply; this.rtbSource.Text = consultation.Name; this.rtbResult.Text = consultation.Result; this.dtConsultation.Value = consultation.ConsultationTime; this.dtBegin.Value = consultation.BeginTime; this.dtEnd.Value = consultation.EndTime; this.dtPreConsultation.Value = consultation.PreConsultationTime; this.cmbDept.Tag = consultation.DeptConsultation.ID; #region 2009-07-22 当会诊申请没有指定会诊医生时,填写会诊意见的医生默认为会诊医生 {53F962A7-44DC-4607-A240-5B21A1AC6E14} By Chenfan if (consultation.DoctorConsultation.ID == null || consultation.DoctorConsultation.ID == string.Empty) { this.cmbDoctor.Tag = Neusoft.FrameWork.Management.Connection.Operator.ID; } else { this.cmbDoctor.Tag = consultation.DoctorConsultation.ID; } #endregion this.cmbAppDept.Tag = consultation.Dept.ID; this.lblDoc.Text = consultation.Doctor.Name; if (consultation.IsCreateOrder) { this.chkCreateOrder.Checked = true; this.chkOuthos.Checked = false; } else { this.chkCreateOrder.Checked = false; } if (consultation.IsEmergency) { this.chkEmergency.Checked = true; this.chkCommon.Checked = false; } else { this.chkEmergency.Checked = false; this.chkCommon.Checked = true; } if (this.bIsApply) { } else { //this.cmbApplyDoctor.Text = consultation.DoctorConfirm.Name; } this.neuButton2.Text = "修改(&M)"; #endregion } }
/// <summary> /// 新建申请单时,判断有没有有效的申请单保存 /// </summary> public void Save() { ArrayList al = null; try { al = manager.QueryConsulation(this.inpatientNo);//获得列表 } catch (Exception ex) { MessageBox.Show(ex.Message); return; } if (Valid() == -1) { return; } //if (this.dtEnd.Value <= manager.GetDateTimeFromSysDateTime()) //{ // MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存失败!该申请单已经失效!"), "提示"); // return; //} if (this.bIsApply) { if (al != null || al.Count != 0) { for (int i = 0; i < al.Count; i++) { Neusoft.HISFC.Models.Order.Consultation obj = al[i] as Neusoft.HISFC.Models.Order.Consultation; //检索有无已经存在的有效的申请单信息,有,保存失败/无,保存成功 if ((obj.PatientNo == this.inpatientNo.Substring(4, 10)) && (obj.Doctor.ID == Neusoft.FrameWork.Management.Connection.Operator.ID) && (obj.DoctorConsultation.ID == this.cmbDoctor.Tag.ToString()) && (this.dtPreConsultation.Value < obj.EndTime) && (obj.EndTime >= manager.GetDateTimeFromSysDateTime())) { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存失败!已经存在有效的会诊申请单,\n不能重复发送!"), "提示"); return; } } } consultation.State = 1; consultation.Doctor.ID = Neusoft.FrameWork.Management.Connection.Operator.ID; consultation.Doctor.Name = Neusoft.FrameWork.Management.Connection.Operator.Name; } else { //if (al != null || al.Count != 0) //{ // for (int i = 0; i < al.Count; i++) // { // Neusoft.HISFC.Models.Order.Consultation obj = al[i] as Neusoft.HISFC.Models.Order.Consultation; // if ((obj.PatientNo == this.inpatientNo.Substring(4, 10)) && (obj.Doctor.ID == Neusoft.FrameWork.Management.Connection.Operator.ID) && // (obj.DoctorConsultation.ID == this.cmbDoctor.Tag.ToString()) && // (this.dtPreConsultation.Value < obj.EndTime) && (obj.EndTime >= manager.GetDateTimeFromSysDateTime())) // { // MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存失败!请选择您要审核的申请单!"), "提示"); // return; // } // } //} if (this.cmbDoctor.Tag.ToString() != "")//{A27C2DED-2C6C-4e30-857D-27E46B485B84} { if (this.cmbDoctor.Tag.ToString() != Neusoft.FrameWork.Management.Connection.Operator.ID) { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存失败!您无权修改该会诊信息"), "提示"); return; } } consultation.State = 2; consultation.DoctorConfirm.ID = Neusoft.FrameWork.Management.Connection.Operator.ID; consultation.DoctorConfirm.Name = Neusoft.FrameWork.Management.Connection.Operator.Name; } consultation.Name = this.rtbSource.Text; consultation.Result = this.rtbResult.Text; consultation.ConsultationTime = this.dtConsultation.Value; consultation.BeginTime = this.dtBegin.Value.Date; consultation.EndTime = new DateTime(this.dtEnd.Value.Year, this.dtEnd.Value.Month, this.dtEnd.Value.Day, 23, 59, 59); consultation.PreConsultationTime = this.dtPreConsultation.Value; consultation.DeptConsultation.ID = this.cmbDept.Tag.ToString(); if (this.cmbDoctor.Tag.ToString() != "")//{A27C2DED-2C6C-4e30-857D-27E46B485B84} { consultation.DoctorConsultation.ID = this.cmbDoctor.Tag.ToString(); } else { consultation.DoctorConsultation.ID = Neusoft.FrameWork.Management.Connection.Operator.ID; } consultation.ApplyTime = this.dtPreConsultation.Value; if (this.chkCreateOrder.Checked) { consultation.IsCreateOrder = true; } else { consultation.IsCreateOrder = false; } if (this.chkEmergency.Checked) { consultation.IsEmergency = true; } else { consultation.IsEmergency = false; } Neusoft.FrameWork.Management.PublicTrans.BeginTransaction(); //Neusoft.FrameWork.Management.Transaction t = new Neusoft.FrameWork.Management.Transaction(manager.Connection); //t.BeginTransaction(); manager.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans); if (consultation.ID == "") { if (manager.InsertConsultation(consultation) == -1) { Neusoft.FrameWork.Management.PublicTrans.RollBack();; MessageBox.Show(manager.Err); } else { Neusoft.FrameWork.Management.PublicTrans.Commit(); this.IsSave = true; init(); MessageBox.Show("保存成功!"); this.Clear();//保存完进行清空操作 if (bSaveAndClose) { this.FindForm().Close(); } } } else { if (manager.UpdateConsultation(consultation) == -1) { Neusoft.FrameWork.Management.PublicTrans.RollBack();; MessageBox.Show(manager.Err); } else { Neusoft.FrameWork.Management.PublicTrans.Commit(); this.IsSave = true; init(); MessageBox.Show("保存成功!"); this.Clear(); if (bSaveAndClose) { this.FindForm().Close(); } } } this.RefreshList(); }
/// <summary> /// 获得医疗会诊权限列表 /// </summary> /// <param name="inpatientNo"></param> /// <returns></returns> public ArrayList QueryPermission(string inpatientNo) { ArrayList al = new ArrayList(); string strSql = ""; //Order.Permission.Select.1 //传入:0 InpatientNo //传出: 0 , --流水号 // 1 , --住院流水号 // 2 , --授权科室代码 // 3 , --授权医师代号 // 4 , --授权医师姓名 // 5 , --医嘱权限 // 6 , --处方起始日 // 7, --处方结束日 // 8 , --备注 // 9 , --用户代码 // 10 ); --授权时间 if (this.Sql.GetSql("Order.Permission.Select.1", ref strSql) == 0) { try { strSql = string.Format(strSql, inpatientNo); } catch (Exception ex) { this.Err = ex.Message; this.ErrCode = ex.Message; this.WriteErr(); return(null); } if (this.ExecQuery(strSql) == -1) { return(null); } while (this.Reader.Read()) { Neusoft.HISFC.Models.Order.Consultation obj = new Neusoft.HISFC.Models.Order.Consultation(); try { obj.ID = this.Reader[0].ToString(); obj.InpatientNo = this.Reader[1].ToString(); obj.DeptConsultation.ID = this.Reader[2].ToString(); obj.DoctorConsultation.ID = this.Reader[3].ToString(); obj.DoctorConsultation.Name = this.Reader[4].ToString(); obj.Name = this.Reader[5].ToString(); obj.BeginTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[6].ToString()); obj.EndTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[7].ToString()); obj.Memo = this.Reader[8].ToString(); obj.User01 = this.Reader[9].ToString(); obj.User02 = this.Reader[10].ToString(); } catch {} al.Add(obj); } this.Reader.Close(); } else { return(null); } return(al); }
private int GetValue() { if (this.cmbDept.Tag == null || this.cmbDept.Text == "") { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("请输入授权科室")); return(-1); } if (this.cmbDoctor.Tag == null || this.cmbDoctor.Text == "") { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("请输入授权医生")); return(-1); } System.Collections.ArrayList list = this.manager.QueryPermission(this.permission.InpatientNo); if (list == null) { MessageBox.Show("获取授权信息失败" + this.manager.Err); return(-1); } Neusoft.HISFC.Models.RADT.PatientInfo patientObj = radtMgr.GetPatientInfomation(this.permission.InpatientNo); if (patientObj == null) { MessageBox.Show("获取病人信息失败" + this.radtMgr.Err); return(-1); } if (cmbDoctor.Tag.ToString() == patientObj.PVisit.AdmittingDoctor.ID) { MessageBox.Show(cmbDoctor.Text + " 是分管医生 ,不需要再分配"); return(-1); } if (list.Count > 0) { foreach (Neusoft.HISFC.Models.Order.Consultation tem in list) { if (tem.DoctorConsultation.ID == cmbDoctor.Tag.ToString() && tem.ID != permission.ID) { if (MessageBox.Show(cmbDoctor.Text + " 在" + tem.BeginTime.ToString() + " - " + tem.EndTime.ToString() + "期间已经有权限" + ",需要重新分配", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.OK) { return(-1); } } } } if (this.permission == null) { this.permission = new Neusoft.HISFC.Models.Order.Consultation(); } this.permission.DeptConsultation.ID = this.cmbDept.Tag.ToString(); this.permission.DoctorConsultation.ID = this.cmbDoctor.Tag.ToString(); this.permission.DoctorConsultation.Name = this.cmbDoctor.Text; this.permission.BeginTime = this.dtBegin.Value; this.permission.EndTime = DateTime.Parse(this.dtEnd.Value.ToShortDateString() + " 23:59:59"); if (this.permission.BeginTime > this.permission.EndTime) { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("处方授权开始时间不能大于结束时间")); return(-1); } string memo = this.txtMemo.Text.Trim(); if (Neusoft.FrameWork.Public.String.ValidMaxLengh(memo, 20) == false) { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("授权说明不能超过10个汉字!")); return(-1); } this.permission.Name = memo; return(0); }
private void toolStrip1_ItemClicked_1(object sender, ToolStripItemClickedEventArgs e) { if (e.ClickedItem == this.tbAddOrder) { /// <summary> /// [功能描述: 开立医嘱]<br></br> /// [创 建 者: ]<br></br> /// [创建时间: ]<br></br> /// <修改记录 /// 修改人='张琦' /// 修改时间='2007-8-25' /// 修改目的='对会诊医师能否开立医嘱进行控制' /// 修改描述='判断会诊患者有无开立医嘱的权限' /// /> /// </summary> //选择子节点 if (this.tvNursePatientList1.SelectedNode.Parent != null && this.tvNursePatientList1.SelectedNode.Parent.Tag != null) { int count = 0; count = this.tvNursePatientList1.SelectedNode.Parent.GetNodeCount(false); //判断所选节点父节点如果为会诊患者,则判断有无开立医嘱的权限/如果不是会诊患者则不需要进行判断,都可以进行开立医嘱 if (this.tvNursePatientList1.SelectedNode.Parent.Text == ("会诊患者" + "(" + count.ToString() + ")")) { patient = this.tvNursePatientList1.SelectedNode.Tag as Neusoft.HISFC.Models.RADT.PatientInfo; this.Text = "您正在操作的患者为 住院号:" + patient.ID + "姓名:" + patient.Name + "性别:" + patient.Sex.Name + " 床号:" + patient.PVisit.PatientLocation.Bed.ID; inpatientNo = patient.ID; co = consultation.QueryConsulation(this.inpatientNo); if (co != null || co.Count != 0) { for (int i = 0; i < co.Count; i++) { Neusoft.HISFC.Models.Order.Consultation obj = co[i] as Neusoft.HISFC.Models.Order.Consultation; //根据会诊患者有效的会诊单信息,判断医生是否有对该会诊患者开立医嘱权限 if ((Neusoft.FrameWork.Management.Connection.Operator.ID == obj.DoctorConsultation.ID) && (obj.EndTime >= consultation.GetDateTimeFromSysDateTime()) && (obj.IsCreateOrder)) { if (this.ucOrder1.Add() == 0) { this.initButton(true); } } else { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("对不起,您没有对该患者开立医嘱的权限!"), "提示"); return; } } } } else { Neusoft.HISFC.Models.RADT.PatientInfo patient1 = this.tvNursePatientList1.SelectedNode.Tag as Neusoft.HISFC.Models.RADT.PatientInfo; this.Text = "您正在操作的患者为 住院号:" + patient1.ID + "姓名:" + patient1.Name + " 性别:" + patient1.Sex.Name + " 床号:" + patient1.PVisit.PatientLocation.Bed.ID; if (this.ucOrder1.Add() == 0) { this.initButton(true); } } } } else if (e.ClickedItem == this.tbCheck) { this.ucOrder1.AddTest(); } else if (e.ClickedItem == this.tbRefresh) { //刷新 this.tvNursePatientList1.Refresh(); } else if (e.ClickedItem == this.tbGroup) { if (this.tbGroup.CheckState == CheckState.Checked) { this.tbGroup.CheckState = CheckState.Unchecked; } else { this.tbGroup.CheckState = CheckState.Checked; } if (this.tbGroup.CheckState == CheckState.Checked) { this.ucOrder1.SetEditGroup(true); this.ucOrder1.SetPatient(null); this.initButtonGroup(true); } else { this.ucOrder1.SetEditGroup(false); this.initButtonGroup(false); } } else if (e.ClickedItem == this.tbOperation) { //Neusoft.HISFC.Models.RADT.PatientInfo pi = (Neusoft.HISFC.Models.RADT.PatientInfo)this.tvDoctorPatientList1.SelectedNode.Tag; //frmOperation frmOpt = new frmOperation(pi); //frmOpt.ShowDialog(); //ucOperation operation = new ucOperation(pi); //operation.Show(); //operation.Show(); //UFC.Operation.ucApplicationForm appForm = new UFC.Operation.ucApplicationForm(); //appForm.PatientInfo = pi; //Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(appForm); //appForm.Show(); //UFC.Operation.ucApplication ucApply = new UFC.Operation.ucApplication(pi, pi); Neusoft.HISFC.Models.RADT.PatientInfo pi = (Neusoft.HISFC.Models.RADT.PatientInfo) this.tvNursePatientList1.SelectedNode.Tag; frmOperation frmOpt = new frmOperation(pi); frmOpt.ShowDialog(); } else if (e.ClickedItem == this.tbAssayCure) { this.ucOrder1.AddAssayCure(); } else if (e.ClickedItem == this.tbDelOrder) { this.ucOrder1.Delete(); } else if (e.ClickedItem == this.tbQueryOrder) { try { this.ucOrder1.Query(this.tvNursePatientList1.SelectedNode, this.tvNursePatientList1.SelectedNode.Tag); } catch { } } else if (e.ClickedItem == this.tbPrintOrder) { if (CurrentControl != null) { try { Neusoft.FrameWork.WinForms.Controls.ucBaseControl control = CurrentControl as Neusoft.FrameWork.WinForms.Controls.ucBaseControl; if (control != null) { control.Print(null, null); } } catch { } } } else if (e.ClickedItem == this.tbComboOrder) { this.ucOrder1.ComboOrder(); } else if (e.ClickedItem == this.tbCancelOrder) { this.ucOrder1.CancelCombo(); } else if (e.ClickedItem == this.tbExitOrder) { if (this.isEditGroup) { if (this.tbGroup.CheckState == CheckState.Checked) { this.tbGroup.CheckState = CheckState.Unchecked; } else { this.tbGroup.CheckState = CheckState.Checked; } this.ucOrder1.SetEditGroup(false); this.initButtonGroup(false); } else { if (this.ucOrder1.ExitOrder() == 0) { this.initButton(false); } tvNursePatientList1.Refresh(); } } else if (e.ClickedItem == this.tbInValid) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.Invalid); } else if (e.ClickedItem == this.tbValid) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.Valid); } else if (e.ClickedItem == this.tbAll) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.All); } else if (e.ClickedItem == this.tbToday) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.Today); } else if (e.ClickedItem == this.tbNew) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.New); } else if (e.ClickedItem == this.tbSaveOrder) { // if (isEditGroup) { SaveGroup(); } else { if (this.ucOrder1.Save() == -1) { } else { this.initButton(false); tvNursePatientList1.Refresh(); } } } else if (e.ClickedItem == this.tsbHerbal) { this.ucOrder1.HerbalOrder(); } else if (e.ClickedItem == this.tbChooseDoct)//{D5517722-7128-4d0c-BBC4-1A5558A39A03} { this.ucOrder1.ChooseDoctor(); } else if (e.ClickedItem == this.tb1Exit) { if (this.ucOrder1.IsDesignMode) //是在开立状态 { DialogResult result = MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("医嘱目前处于开立模式,是否保存?"), "提示", MessageBoxButtons.YesNoCancel); if (result == DialogResult.Yes) { if (this.ucOrder1.Save() == 0) { this.Close(); } } else if (result == DialogResult.Cancel) { return; } else { this.Close(); } } else { this.Close(); } } ///{FB86E7D8-A148-4147-B729-FD0348A3D670} 增加医嘱重整按钮 else if (e.ClickedItem == this.tbRetidyOrder) { if (this.ucOrder1.IsDesignMode == false) { this.ucOrder1.ReTidyOrder(); } else { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("非开立状态下才允许进行医嘱重整"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } }
public int Insert(Neusoft.HISFC.Models.Order.Consultation consultation) { return(this.InsertConsultation(consultation)); }
private void RefreshList() { ArrayList al = null; try { al = manager.QueryConsulation(this.inpatientNo);//获得列表 } catch (Exception ex) { MessageBox.Show(ex.Message); return; } this.fpSpread1_Sheet1.OperationMode = FarPoint.Win.Spread.OperationMode.SingleSelect; this.fpSpread1_Sheet1.RowCount = 0; if (al == null || al.Count == 0) { return; } for (int i = 0; i < al.Count; i++) { Neusoft.HISFC.Models.Order.Consultation obj = al[i] as Neusoft.HISFC.Models.Order.Consultation; this.fpSpread1_Sheet1.Rows.Add(0, 1); this.fpSpread1_Sheet1.Cells[0, 0].Value = deptHelper.GetName(obj.DeptConsultation.ID); //科室 try { this.fpSpread1_Sheet1.Cells[0, 1].Value = personHelper.GetName(obj.DoctorConsultation.ID); //人员 } catch { } if (this.fpSpread1_Sheet1.Cells[0, 0].Text == "") //科室没找到 { this.fpSpread1_Sheet1.Cells[0, 0].Value = obj.DeptConsultation.ID; //科室 } if (this.fpSpread1_Sheet1.Cells[0, 1].Text == "") //人员没找到 { this.fpSpread1_Sheet1.Cells[0, 1].Value = obj.DoctorConsultation.ID; //人员 } this.fpSpread1_Sheet1.Cells[0, 2].Value = obj.Doctor.Name; //personHelper.GetName(obj.Doctor.ID);//申请人 fpSpread1_Sheet1.Cells[0, 3].Value = obj.ApplyTime; //申请日期 this.fpSpread1_Sheet1.Cells[0, 4].Value = obj.Name; //原因 this.fpSpread1_Sheet1.Cells[0, 5].Value = obj.Result; //结果 if (obj.State == 1) { this.fpSpread1_Sheet1.Cells[0, 6].Value = "申请"; //状态 } else if (obj.State == 2) { this.fpSpread1_Sheet1.Cells[0, 6].Value = "确认"; //状态 this.fpSpread1_Sheet1.Rows[0].BackColor = Color.FromArgb(255, 225, 225); //确认状态 } else { this.fpSpread1_Sheet1.Cells[0, 6].Value = "未知" + obj.State.ToString(); //状态 } if (obj.IsCreateOrder) { this.fpSpread1_Sheet1.Cells[0, 7].Value = "允许开医嘱"; } else { this.fpSpread1_Sheet1.Cells[0, 7].Value = "不允许开医嘱"; } if (obj.Type == Neusoft.HISFC.Models.Order.EnumConsultationType.Hos) //院外会诊 { this.fpSpread1_Sheet1.Rows[0].BackColor = Color.FromArgb(255, 200, 200); //院外会诊 } this.fpSpread1_Sheet1.Cells[0, 8].Value = personHelper.GetName(obj.DoctorConfirm.ID); //审核人 this.fpSpread1_Sheet1.Rows[0].Tag = obj; } for (int i = 0; i < this.fpSpread1_Sheet1.Rows.Count; i++) { this.fpSpread1_Sheet1.RowHeader.Rows[i].Label = "会诊" + (i + 1).ToString(); } }
/// <summary> /// 插入会诊记录 /// </summary> /// <param name="consultation"></param> /// <returns></returns> public int InsertConsultation(Neusoft.HISFC.Models.Order.Consultation consultation) { #region "接口" // --住院流水号 // , --住院病历号 // , --住院科室代码 // , --护理站代码 // , --医嘱医师代号 // , --医嘱医师姓名 // , --填写申请日期 // , --预约会诊日期 // , --会诊类型,0科室/1医生,2医院 // , --加急会诊,1是/0否 // , --会诊科室 // , --会诊医师 // , --会诊说明 // , --处方起始日 // , --处方结束日 // , --实际会诊日 // , --会诊结果 // , --确认医生代码 // , --会诊状态,1申请/2确认 // , --用户代码 // , --医院名称 // , --紧急说明,1,2,3,备注,床位 #endregion string strSql = ""; if (this.Sql.GetSql("Order.Consultation.InsertItem.1", ref strSql) == -1) { this.Err = this.Sql.Err; return(-1); } //try //{ // strSql = string.Format(strSql,consultation.InpatientNo ,consultation.PatientNo ,consultation.Dept.ID, // consultation.NurseStation.ID,consultation.Doctor.ID,consultation.Doctor.Name,consultation.ApplyTime .ToString(), // consultation.PreConsultationTime.ToString(),consultation.Type.GetHashCode().ToString(), // consultation.IsEmergency.GetHashCode().ToString(),consultation.DeptConsultation.ID, // consultation.DoctorConsultation.ID,consultation.Name,consultation.BeginTime.ToString(), // consultation.EndTime.ToString(),consultation.ConsultationTime.ToString(),consultation.Result, // consultation.DoctorConfirm.ID,consultation.State.ToString(),this.Operator.ID, // consultation.HosConsultation.Name,//医院名称 // consultation.EmergencyMemo,//紧急说明 // consultation.User01, // consultation.User02, // consultation.User03, // consultation.Memo,//患者备注 // consultation.BedNO);//患者床位 //} //catch(Exception ex) //{ // this.Err=ex.Message; // this.ErrCode=ex.Message; // this.WriteErr(); // return -1; //} return(this.ExecNoQuery(strSql, consultation.InpatientNo, consultation.PatientNo, consultation.Dept.ID, consultation.NurseStation.ID, consultation.Doctor.ID, consultation.Doctor.Name, consultation.ApplyTime.ToString(), consultation.PreConsultationTime.ToString(), consultation.Type.GetHashCode().ToString(), consultation.IsEmergency.GetHashCode().ToString(), consultation.DeptConsultation.ID, consultation.DoctorConsultation.ID, consultation.Name, consultation.BeginTime.ToString(), consultation.EndTime.ToString(), consultation.ConsultationTime.ToString(), consultation.Result, consultation.DoctorConfirm.ID, consultation.State.ToString(), this.Operator.ID, consultation.HosConsultation.Name, //医院名称 consultation.EmergencyMemo, //紧急说明 consultation.User01, consultation.User02, consultation.User03, consultation.Memo, //患者备注 consultation.BedNO, consultation.IsCreateOrder.GetHashCode().ToString() //能否开立医嘱 )); }
private void toolStrip1_ItemClicked_1(object sender, ToolStripItemClickedEventArgs e) { if (e.ClickedItem == this.tbAddOrder) { /// <summary> /// [功能描述: 开立医嘱]<br></br> /// [创 建 者: ]<br></br> /// [创建时间: ]<br></br> /// <修改记录 /// 修改人='张琦' /// 修改时间='2007-8-25' /// 修改目的='对会诊医师能否开立医嘱进行控制' /// 修改描述='判断会诊患者有无开立医嘱的权限' /// /> /// </summary> //选择子节点 if (this.tvDoctorPatientList1.SelectedNode.Parent != null && this.tvDoctorPatientList1.SelectedNode.Parent.Tag != null) { int count = 0; count = this.tvDoctorPatientList1.SelectedNode.Parent.GetNodeCount(false); //判断所选节点父节点如果为会诊患者,则判断有无开立医嘱的权限/如果不是会诊患者则不需要进行判断,都可以进行开立医嘱 if (this.tvDoctorPatientList1.SelectedNode.Parent.Text == ("会诊患者" + "(" + count.ToString() + ")")) { patient = this.tvDoctorPatientList1.SelectedNode.Tag as Neusoft.HISFC.Models.RADT.PatientInfo; //处理床位号截位 string bedNO = patient.PVisit.PatientLocation.Bed.ID; if (bedNO.Length > 4) { bedNO = bedNO.Substring(4); } //处理住院号显示 string patientNO = patient.PID.PatientNO; if (string.IsNullOrEmpty(patientNO) == true) { patientNO = patient.ID; } this.Text = "您正在操作的患者为 住院号:" + patientNO + "姓名:" + patient.Name + "性别:" + patient.Sex.Name + "年龄:" + consultation.GetAge(this.patient.Birthday) + " 床号:" + bedNO; inpatientNo = patient.ID; co = consultation.QueryConsulation(this.inpatientNo); if (co != null || co.Count != 0) { for (int i = 0; i < co.Count; i++) { Neusoft.HISFC.Models.Order.Consultation obj = co[i] as Neusoft.HISFC.Models.Order.Consultation; //根据会诊患者有效的会诊单信息,判断医生是否有对该会诊患者开立医嘱权限 if ((Neusoft.FrameWork.Management.Connection.Operator.ID == obj.DoctorConsultation.ID) && (obj.EndTime >= consultation.GetDateTimeFromSysDateTime()) && (obj.IsCreateOrder)) { if (this.ucOrder1.Add() == 0) { this.initButton(true); } break;//{3541798B-AF9C-415c-AFAA-8BD22A34A808} } else { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("对不起,您没有对该患者开立医嘱的权限!"), "提示"); return; } } } } else { Neusoft.HISFC.Models.RADT.PatientInfo patient1 = this.tvDoctorPatientList1.SelectedNode.Tag as Neusoft.HISFC.Models.RADT.PatientInfo; //处理床位号截位 string bedNO = patient1.PVisit.PatientLocation.Bed.ID; if (bedNO.Length > 4) { bedNO = bedNO.Substring(4); } //处理住院号显示 string patientNO = patient1.PID.PatientNO; if (string.IsNullOrEmpty(patientNO) == true) { patientNO = patient1.ID; } this.Text = "您正在操作的患者为 住院号:" + patientNO + "姓名:" + patient1.Name + " 性别:" + patient1.Sex.Name + "年龄:" + consultation.GetAge(patient1.Birthday) + " 床号:" + bedNO; //{FBBE8298-886C-4b33-8CF6-69134BE95422} 判断是否请假患者 20100507 yangw if (patient1.PVisit.PatientLocation.Bed != null && patient1.PVisit.PatientLocation.Bed.Status.ID.ToString() == Neusoft.HISFC.Models.Base.EnumBedStatus.R.ToString()) {//请假患者不能开医嘱,须先销假,主要为防止请假后开立长嘱下次执行时间不对,这个bug有点2 MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("患者请假中,如需开立医嘱请先销假")); return; } if (this.ucOrder1.Add() == 0) { this.initButton(true); } } } } else if (e.ClickedItem == this.tbCheck) { this.ucOrder1.AddTest(); } else if (e.ClickedItem == this.tbRefresh) { //刷新 this.tvDoctorPatientList1.RefreshInfo(); } else if (e.ClickedItem == this.tbGroup) { if (this.tbGroup.CheckState == CheckState.Checked) { this.tbGroup.CheckState = CheckState.Unchecked; } else { this.tbGroup.CheckState = CheckState.Checked; } if (this.tbGroup.CheckState == CheckState.Checked) { this.ucOrder1.SetEditGroup(true); this.ucOrder1.SetPatient(null); this.initButtonGroup(true); } else { this.ucOrder1.SetEditGroup(false); this.initButtonGroup(false); } } else if (e.ClickedItem == this.tbOperation) { //Neusoft.HISFC.Models.RADT.PatientInfo pi = (Neusoft.HISFC.Models.RADT.PatientInfo)this.tvDoctorPatientList1.SelectedNode.Tag; //frmOperation frmOpt = new frmOperation(pi); //frmOpt.ShowDialog(); //ucOperation operation = new ucOperation(pi); //operation.Show(); //operation.Show(); //UFC.Operation.ucApplicationForm appForm = new UFC.Operation.ucApplicationForm(); //appForm.PatientInfo = pi; //Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(appForm); //appForm.Show(); //UFC.Operation.ucApplication ucApply = new UFC.Operation.ucApplication(pi, pi); Neusoft.HISFC.Models.RADT.PatientInfo pi = (Neusoft.HISFC.Models.RADT.PatientInfo) this.tvDoctorPatientList1.SelectedNode.Tag; frmOperation frmOpt = new frmOperation(pi); frmOpt.ShowDialog(); } else if (e.ClickedItem == this.tbAssayCure) { this.ucOrder1.AddAssayCure(); } else if (e.ClickedItem == this.tbDelOrder) { this.ucOrder1.Delete(); } else if (e.ClickedItem == this.tbQueryOrder) { try { this.ucOrder1.Query(this.tvDoctorPatientList1.SelectedNode, this.tvDoctorPatientList1.SelectedNode.Tag); } catch { } } else if (e.ClickedItem == this.tbPrintOrder) { if (CurrentControl != null) { try { Neusoft.FrameWork.WinForms.Controls.ucBaseControl control = CurrentControl as Neusoft.FrameWork.WinForms.Controls.ucBaseControl; if (control != null) { control.Print(null, null); } } catch { } } } else if (e.ClickedItem == this.tbComboOrder) { this.ucOrder1.ComboOrder(); } else if (e.ClickedItem == this.tbCancelOrder) { this.ucOrder1.CancelCombo(); } else if (e.ClickedItem == this.tbExitOrder) { if (this.isEditGroup) { if (this.tbGroup.CheckState == CheckState.Checked) { this.tbGroup.CheckState = CheckState.Unchecked; } else { this.tbGroup.CheckState = CheckState.Checked; } this.ucOrder1.SetEditGroup(false); //this.initButtonGroup(false);//{64E07B94-39F0-439a-BB53-6C3D8DB7EFE4}退出医嘱,患者树不失去焦点 } else { if (this.ucOrder1.ExitOrder() == 0) { this.initButton(false); } tvDoctorPatientList1.RefreshInfo(); } } else if (e.ClickedItem == this.tbInValid) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.Invalid); } else if (e.ClickedItem == this.tbValid) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.Valid); } else if (e.ClickedItem == this.tbAll) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.All); } else if (e.ClickedItem == this.tbToday) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.Today); } else if (e.ClickedItem == this.tbNew) { this.ucOrder1.Filter(Neusoft.HISFC.Components.Order.Controls.EnumFilterList.New); } else if (e.ClickedItem == this.tbSaveOrder) { // if (isEditGroup) { SaveGroup(); } else { if (this.ucOrder1.Save() == -1) { } else { this.initButton(false); //tvDoctorPatientList1.RefreshInfo();//{64E07B94-39F0-439a-BB53-6C3D8DB7EFE4}保存医嘱,患者树不失去焦点 } } } else if (e.ClickedItem == this.tsbHerbal) { this.ucOrder1.HerbalOrder(); } else if (e.ClickedItem == this.tbChooseDoct)//{D5517722-7128-4d0c-BBC4-1A5558A39A03} { this.ucOrder1.ChooseDoctor(); } else if (e.ClickedItem == this.tb1Exit) { if (this.ucOrder1.IsDesignMode) //是在开立状态 { DialogResult result = MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("医嘱目前处于开立模式,是否保存?"), "提示", MessageBoxButtons.YesNoCancel); if (result == DialogResult.Yes) { if (this.ucOrder1.Save() == 0) { this.Close(); } } else if (result == DialogResult.Cancel) { return; } else { this.Close(); } } else { this.Close(); } } ///{FB86E7D8-A148-4147-B729-FD0348A3D670} 增加医嘱重整按钮 else if (e.ClickedItem == this.tbRetidyOrder) { if (this.ucOrder1.IsDesignMode == false) { this.ucOrder1.ReTidyOrder(); } else { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("非开立状态下才允许进行医嘱重整"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } else if (e.ClickedItem == this.tbDiseaseReport) // {E53A21A7-2B74-4b48-A9F4-9E05F8FA11A2} 传染病报告卡 { if (this.dcpInstance == null) { this.dcpInstance = Neusoft.FrameWork.WinForms.Classes.UtilInterface.CreateObject(this.GetType(), typeof(Neusoft.HISFC.BizProcess.Interface.DCP.IDCP)) as Neusoft.HISFC.BizProcess.Interface.DCP.IDCP; } if (this.dcpInstance != null) { Neusoft.HISFC.Models.RADT.PatientInfo patientInfo = this.tvDoctorPatientList1.SelectedNode.Tag as Neusoft.HISFC.Models.RADT.PatientInfo; this.dcpInstance.RegisterDiseaseReport(patientInfo, Neusoft.HISFC.Models.Base.ServiceTypes.I); } } else if (e.ClickedItem == this.tbLisResultPrint)//{17CC6DF8-1883-4d3c-8D24-2E08C93F047F},Lis结果打印,shangxw 2009-11-10 { patient = this.tvDoctorPatientList1.SelectedNode.Tag as Neusoft.HISFC.Models.RADT.PatientInfo; if (this.patient == null || this.patient.PID.ID == "" || this.patient.PID.ID == null) { MessageBox.Show("请选择一个患者!"); return; } try { #region 郑大修改---{15C4A9D2-34AF-484b-B65B-BBD3CACABA5C} rm_barprinter_common.In_rm_barprinter_common mobj = new rm_barprinter_common.COClass_n_rm_barprinter_commonClass(); if (!string.IsNullOrEmpty(patient.ID)) { mobj.uf_lis_result(patient.ID, "3"); } else { MessageBox.Show("Lis调用失败"); return; } //string s = "LisResult"; //System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName(s); //if (proc.Length > 0) //{ // for (int i = 0; i < proc.Length; i++) // { // proc[i].Kill(); // } //} //System.Diagnostics.Process p = new System.Diagnostics.Process(); //p.StartInfo.FileName = Application.StartupPath + @"\LisBin\LisResult.exe"; //需要启动的程序名 //#region 取配置参数 //ArrayList defaultValue = Neusoft.FrameWork.WinForms.Classes.Function.GetDefaultValue("lis"); //if ((defaultValue == null) || (defaultValue.Count == 0)) //{ // p.StartInfo.Arguments = " '" + this.patient.PID.ID + "' " + "住院" + "";// +" " + "'住院'";//启动参数 //} //else //{ // p.StartInfo.Arguments = " '" + defaultValue[1].ToString() + "' " + "住院" + "";// +" " + "'住院'";//启动参数 //} //#endregion //p.Start();//启动 #endregion } catch (Exception ex) { MessageBox.Show(ex.Message); } } else if (e.ClickedItem == this.tbPacsResultPrint)//{17CC6DF8-1883-4d3c-8D24-2E08C93F047F},Lis结果打印,shangxw 2009-11-10 { patient = this.tvDoctorPatientList1.SelectedNode.Tag as Neusoft.HISFC.Models.RADT.PatientInfo; if (this.patient == null || this.patient.PID.ID == "" || this.patient.PID.ID == null) { MessageBox.Show("请选择一个患者!"); return; } try { string patientNo = patient.ID; this.ucOrder1.ShowPacsResultByPatient(patientNo); } catch (Exception ex) { MessageBox.Show(ex.Message); } } else if (e.ClickedItem == this.tbChooseDrugDept) { #region 进入医嘱窗口选择药房 {CD0DD444-07D0-4e80-9D26-0DB79BA9A177} wbo 2010-10-26 this.ChooseDrugDept(true); #endregion } }