private void cmbQueue_SelectedIndexChanged(object sender, EventArgs e) { Neusoft.FrameWork.Models.NeuObject obj = this.cmbQueue.SelectedItem; if (obj == null) { return; } if (obj.GetType() == typeof(Neusoft.HISFC.Models.Nurse.Queue)) { this.txtRoom.Text = (obj as Neusoft.HISFC.Models.Nurse.Queue).SRoom.Name; } else { this.txtRoom.Text = obj.User03; } }
/// <summary> /// 添加项目列表 /// </summary> /// <param name="Items"></param> /// <returns></returns> public int AddItems(ArrayList Items) { base.Items.Clear(); alItems = Items; dsItems.Tables["items"].Rows.Clear(); Neusoft.FrameWork.Models.NeuObject objItem; Neusoft.HISFC.Models.Base.ISpell objspell; try { for (int i = 0; i < alItems.Count; i++) { objItem = new Neusoft.FrameWork.Models.NeuObject(); objItem = (Neusoft.FrameWork.Models.NeuObject)alItems[i]; if (objItem.GetType().GetInterface("ISpell", true) != null) { objspell = (Neusoft.HISFC.Models.Base.ISpell)objItem; base.Items.Add(objItem.ID + ". " + objItem.Name); dsItems.Tables["items"].Rows.Add(new object[] { objItem.ID, objItem.Name, objspell.SpellCode, objspell.UserCode, objspell.WBCode }); } else { base.Items.Add(objItem.ID + ". " + objItem.Name); dsItems.Tables["items"].Rows.Add(new object[] { objItem.ID, objItem.Name, objItem.ID, objItem.Name, objItem.ID }); } } } catch (Exception error) { MessageBox.Show("添加项目列表出错!" + error.Message, "ListBox"); return(-1); } return(1); }
private void neuButton1_Click(object sender, EventArgs e) { Neusoft.FrameWork.Models.NeuObject obj = this.cmbQueue.SelectedItem; if (obj == null) { MessageBox.Show("请选择分诊队列!", "提示"); this.cmbQueue.Focus(); return; } Neusoft.HISFC.BizProcess.Integrate.Manager deptMgr = new Neusoft.HISFC.BizProcess.Integrate.Manager(); Neusoft.HISFC.Models.Nurse.Assign assgin = new Neusoft.HISFC.Models.Nurse.Assign(); Neusoft.HISFC.Models.Nurse.Queue queueinfo = new Neusoft.HISFC.Models.Nurse.Queue(); queueinfo = (Neusoft.HISFC.Models.Nurse.Queue) this.cmbQueue.SelectedItem; if (this.Register.DoctorInfo.Templet.Dept.ID != queueinfo.AssignDept.ID) { } #region 实体赋值 assgin.Register = this.Register; if (obj.GetType() == typeof(Neusoft.HISFC.Models.Nurse.Queue))//队列 { assgin.Queue = (Neusoft.HISFC.Models.Nurse.Queue)obj; //if (this.Regdoc_id != null && this.Regdoc_id != "") //{ if (assgin.Queue.ExpertFlag == "1" && assgin.Register.DoctorInfo.Templet.RegLevel.IsExpert == false) { if (MessageBox.Show("普通号进诊专家队列" + "是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No) { return; } } if (Neusoft.FrameWork.Function.NConvert.ToBoolean(assgin.Queue.ExpertFlag) == assgin.Register.DoctorInfo.Templet.RegLevel.IsExpert && assgin.Queue.Doctor.ID != this.Regdoc_id) { if (MessageBox.Show("选择医师与挂号医师不一致,是否继续", " ", MessageBoxButtons.OKCancel) == DialogResult.Cancel) { return; } } //} //if (this.Regdoc_id == null || this.Regdoc_id == "") //{ if (assgin.Queue.ExpertFlag == "0" && assgin.Register.DoctorInfo.Templet.RegLevel.IsExpert == true) { if (MessageBox.Show("专家挂号进诊普通队列" + "是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No) { return; } } //} } else { Neusoft.HISFC.Models.Registration.DoctSchema doct = this.GetDoctor(obj.ID); //add by niuxy if (this.Regdoc_id != null && this.Regdoc_id != "") { if (doct.ID != this.Regdoc_id) { if (MessageBox.Show("专家挂号进诊普通队列" + "是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No) { return; } } { if (MessageBox.Show("选择医师与挂号医师不一致,是否继续", " ", MessageBoxButtons.OKCancel) == DialogResult.Cancel) { return; } } } if (this.Regdoc_id == null || this.Regdoc_id == "") { if (assgin.Queue.ExpertFlag == "1") { if (MessageBox.Show("普通号进诊专家队列" + "是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No) { return; } } } assgin.Queue.ID = obj.ID; assgin.Queue.Name = obj.Name; assgin.Queue.Dept.ID = doct.Dept; assgin.Queue.Doctor = doct.Doctor; assgin.Queue.SRoom = doct.Room; } Neusoft.HISFC.BizLogic.Nurse.Assign a = new Neusoft.HISFC.BizLogic.Nurse.Assign(); assgin.TriageStatus = Neusoft.HISFC.Models.Nurse.EnuTriageStatus.Triage; //assgin.TriageDept = ((Neusoft.HISFC.Models.Base.Employee)Neusoft.FrameWork.Management.Connection.Operator).Nurse.ID; assgin.TriageDept = ((Neusoft.HISFC.Models.Base.Employee)Neusoft.FrameWork.Management.Connection.Operator).Dept.ID; assgin.TirageTime = a.GetDateTimeFromSysDateTime(); // deptMgr.GetDateTimeFromSysDateTime(); assgin.Oper.OperTime = assgin.TirageTime; assgin.Oper.ID = Neusoft.FrameWork.Management.Connection.Operator.ID; // var.User.ID; assgin.Queue.Dept = assgin.Register.DoctorInfo.Templet.Dept; #endregion Neusoft.FrameWork.Management.PublicTrans.BeginTransaction(); //Neusoft.FrameWork.Management.Transaction t = new Neusoft.FrameWork.Management.Transaction(Neusoft.FrameWork.Management.Connection.Instance); //t.BeginTransaction(); string error = ""; if (Function.Triage(assgin, "1", ref error) == -1) { Neusoft.FrameWork.Management.PublicTrans.RollBack(); #region {9EB5D321-AA03-435f-8581-F64F852D2656} MessageBox.Show("无法保存分诊信息,请刷新后重新分诊!", "提示"); //MessageBox.Show(error, "提示"); #endregion return; } Neusoft.FrameWork.Management.PublicTrans.Commit(); if (this.OK != null) { this.OK(assgin); } this.FindForm().Close(); }