コード例 #1
0
        private void toolBar1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (e.ClickedItem == this.tbRefresh)
            {
                this.tvNurseCellPatientList1.Refresh();
            }
            else if (e.ClickedItem.Text == "Lis接口")
            {
                #region {C9B369B5-37FA-44f9-924A-63B6ABDBCBDB} 增加的LIS接口,单击事件

                try
                {
                    rm_barprinter_common.In_rm_barprinter_common mobj;
                    mobj = new rm_barprinter_common.COClass_n_rm_barprinter_commonClass();

                    Neusoft.HISFC.BizLogic.Manager.Department deptMgr = new Neusoft.HISFC.BizLogic.Manager.Department();

                    string oper = ((Neusoft.HISFC.Models.Base.Employee)Neusoft.FrameWork.Management.Connection.Operator).ID;

                    string bqcode = string.Empty;
                    string kscode = string.Empty;

                    ArrayList alist = deptMgr.GetNurseStationFromDept(((Neusoft.HISFC.Models.Base.Employee)Neusoft.FrameWork.Management.Connection.Operator).Dept, "01");
                    if (alist != null && alist.Count > 0)
                    {
                        bqcode = ((Neusoft.FrameWork.Models.NeuObject)alist[0]).ID.ToString(); // ((Neusoft.HISFC.Models.Base.Employee)Neusoft.FrameWork.Management.Connection.Operator).Dept.ID;
                        kscode = string.Empty;
                    }

                    if (!string.IsNullOrEmpty(bqcode))
                    {
                        mobj.uf_lisbarcode(kscode, bqcode, oper);

                        #region donggq--2010.09.21--{7F844EEB-63F5-4f0f-B5EC-473B3BAFC8FA}

                        System.Runtime.InteropServices.Marshal.ReleaseComObject(mobj);
                        #endregion

                        //MessageBox.Show("from lis");
                    }
                    else
                    {
                        return;
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }

                #endregion
            }
        }
コード例 #2
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.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
            }
        }