示例#1
0
        /// <summary>
        /// 对传入的申请数据打印门诊标签
        /// </summary>
        /// <param name="alOutData">申请数据</param>
        /// <returns>成功返回1 出错返回-1</returns>
        internal static int PrintLabelForOutpatient(ArrayList alOutData)
        {
            if (Function.IDrugPrint == null)
            {
                System.Windows.Forms.MessageBox.Show("未正确设置摆药单打印接口.");
                return(-1);
            }
            if (alOutData.Count <= 0)
            {
                return(1);
            }

            string strPID = "";

            ArrayList al = new ArrayList( );

            Neusoft.HISFC.Models.Registration.Register patiRegister = new Neusoft.HISFC.Models.Registration.Register( );
            Neusoft.HISFC.Models.RADT.PatientInfo      patiPerson   = new Neusoft.HISFC.Models.RADT.PatientInfo( );

            Neusoft.HISFC.BizProcess.Integrate.RADT     radtManager = new Neusoft.HISFC.BizProcess.Integrate.RADT( );
            Neusoft.FrameWork.Management.DataBaseManger dataManager = new Neusoft.FrameWork.Management.DataBaseManger( );

            foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut temp in alOutData)
            {
                temp.User01 = "";
                if (temp.PatientNO == strPID)
                {
                    al.Add(temp);
                }
                else
                {
                    if (al.Count > 0)
                    {
                        #region 标签打印赋值
                        patiPerson          = radtManager.GetPatientInfomation(strPID);
                        patiRegister.Name   = patiPerson.Name;
                        patiRegister.Sex    = patiPerson.Sex;
                        patiRegister.Age    = dataManager.GetAge(patiPerson.Birthday);
                        patiRegister.User02 = al.Count.ToString( );

                        Function.IDrugPrint.OutpatientInfo = patiRegister;
                        Function.IDrugPrint.LabelTotNum    = al.Count;
                        Function.IDrugPrint.DrugTotNum     = al.Count;

                        string privCombo = "";

                        ArrayList alCombo = new ArrayList( );

                        foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut info in al)
                        {
                            if (privCombo == "-1" || (privCombo == info.CombNO && info.CombNO != ""))
                            {
                                alCombo.Add(info);
                                privCombo = info.CombNO;
                                continue;
                            }
                            else                        //不同处方号
                            {
                                if (alCombo.Count > 0)
                                {
                                    if (alCombo.Count == 1)
                                    {
                                        Function.IDrugPrint.AddSingle(alCombo[0] as Neusoft.HISFC.Models.Pharmacy.ApplyOut);
                                    }
                                    else
                                    {
                                        Function.IDrugPrint.AddCombo(alCombo);
                                    }
                                    Function.IDrugPrint.Print( );
                                }

                                privCombo = info.CombNO;
                                alCombo   = new ArrayList( );

                                alCombo.Add(info);
                            }
                        }
                        if (alCombo.Count == 0)
                        {
                            return(1);
                        }
                        if (alCombo.Count > 1)
                        {
                            Function.IDrugPrint.AddCombo(alCombo);
                        }
                        else
                        {
                            Function.IDrugPrint.AddSingle(alCombo[0] as Neusoft.HISFC.Models.Pharmacy.ApplyOut);
                        }

                        Function.IDrugPrint.Print( );

                        #endregion
                    }

                    al = new ArrayList( );
                    al.Add(temp);
                    strPID = temp.PatientNO;
                }
            }

            if (al.Count > 0)
            {
                #region 标签打印赋值
                patiPerson          = radtManager.GetPatientInfomation(strPID);
                patiRegister.Name   = patiPerson.Name;
                patiRegister.Sex    = patiPerson.Sex;
                patiRegister.Age    = dataManager.GetAge(patiPerson.Birthday);
                patiRegister.User02 = al.Count.ToString( );

                Function.IDrugPrint.OutpatientInfo = patiRegister;
                Function.IDrugPrint.LabelTotNum    = al.Count;
                Function.IDrugPrint.DrugTotNum     = al.Count;

                string privCombo = "-1";

                ArrayList alCombo = new ArrayList( );

                foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut info in al)
                {
                    if (privCombo == "-1" || (privCombo == info.CombNO && info.CombNO != ""))
                    {
                        alCombo.Add(info);
                        privCombo = info.CombNO;
                        continue;
                    }
                    else                        //不同处方号
                    {
                        if (alCombo.Count == 1)
                        {
                            Function.IDrugPrint.AddSingle(alCombo[0] as Neusoft.HISFC.Models.Pharmacy.ApplyOut);
                        }
                        else
                        {
                            Function.IDrugPrint.AddCombo(alCombo);
                        }
                        Function.IDrugPrint.Print( );

                        privCombo = info.CombNO;
                        alCombo   = new ArrayList( );

                        alCombo.Add(info);
                    }
                }
                if (alCombo.Count == 0)
                {
                    return(1);
                }
                if (alCombo.Count > 1)
                {
                    Function.IDrugPrint.AddCombo(alCombo);
                }
                else
                {
                    Function.IDrugPrint.AddSingle(alCombo[0] as Neusoft.HISFC.Models.Pharmacy.ApplyOut);
                }

                Function.IDrugPrint.Print( );

                #endregion
            }

            return(1);
        }
示例#2
0
        /// <summary>
        /// 患者信息显示
        /// </summary>
        protected virtual void ShowPatientInfo(Neusoft.HISFC.Models.Pharmacy.DrugRecipe drugRecipe)
        {
            try
            {
                if (this.IPatientShow != null)
                {
                    this.IPatientShow.ShowInfo(drugRecipe);
                    return;
                }

                //该处方的发票号,诊卡号,病人姓名(加粗放大),性别,年龄,收费员工号,医生姓名,收费时间
                string strBase = "";
                string strFee  = "";

                #region 设置显示信息初始字符串

                string strDrugSend = "  配药时间:{0} 配药人:{1} 配药台:{2} 发药时间:{3} 发药人:{4} 发药台:{5}";

                if (this.isPatientDetail)
                {
                    strBase = " 发 票 号:{0}  门 诊 号:{1}  姓 名:{2}  性 别:{3}  年 龄:{4}  联系方式:{5}  家庭住址:{6}";
                    strFee  = " 挂号日期:{0} 收费人:{1} 收费时间:{2} 看诊科室:{3} 医 生:{4} 诊断:{5}";
                }
                else
                {
                    strBase = " 发 票 号:{0}  门诊号:{1}  姓名:{2}  性别:{3}  年龄:{4}";
                    strFee  = " 挂号日期:{0} 收费人:{1} 收费时间:{2} 看诊科室:{3} 医 生:{4}";
                }

                #endregion

                Neusoft.FrameWork.Management.DataBaseManger dataBase = new Neusoft.FrameWork.Management.DataBaseManger();
                string strAge = dataBase.GetAge(drugRecipe.Age);
                if (drugRecipe.RecipeNO != "" && drugRecipe.RecipeNO != null)
                {
                    drugRecipe.Doct.Name     = this.personHelper.GetName(drugRecipe.Doct.ID);
                    drugRecipe.DoctDept.Name = this.deptHelper.GetName(drugRecipe.PatientDept.ID);

                    drugRecipe.DrugTerminal.Name = this.terminalHelper.GetName(drugRecipe.DrugTerminal.ID);
                    drugRecipe.SendTerminal.Name = this.terminalHelper.GetName(drugRecipe.SendTerminal.ID);

                    if (this.isPatientDetail)
                    {
                        #region 显示患者明细信息  涉及挂号/病案业务层的 暂时先不写

                        //neusoft.HISFC.Management.Registration.Register regMgr = new neusoft.HISFC.Management.Registration.Register();
                        //neusoft.HISFC.Object.Registration.Register register = regMgr.QueryByClinic(drugRecipe.ClinicCode);
                        //if (register != null)
                        //    this.lbBasePatientInfo.Text = string.Format(strBase, drugRecipe.InvoiceNo, drugRecipe.CardNo, drugRecipe.PatientName, drugRecipe.Sex.Name, strAge, register.Phone, register.Address);
                        //else
                        //    this.lbBasePatientInfo.Text = string.Format(strBase, drugRecipe.InvoiceNo, drugRecipe.CardNo, drugRecipe.PatientName, drugRecipe.Sex.Name, strAge);

                        //neusoft.HISFC.Management.Case.Diagnose diagnoseMgr = new neusoft.HISFC.Management.Case.Diagnose();
                        //ArrayList alDiagnose = diagnoseMgr.QueryCaseDiagnoseForClinic(drugRecipe.ClinicCode, neusoft.HISFC.Management.Case.frmTypes.DOC);
                        //string diagnose = "";
                        //if (alDiagnose != null && alDiagnose.Count > 0)
                        //{
                        //    neusoft.HISFC.Object.Case.Diagnose diagnoseObj = alDiagnose[0] as neusoft.HISFC.Object.Case.Diagnose;
                        //    diagnose = diagnoseObj.DiagInfo.ICD10.Name;
                        //}
                        //this.lblPatientInfo.Text = string.Format(strFee, drugRecipe.RegDate.ToString(), drugRecipe.FeeOper, drugRecipe.FeeDate.ToString(), drugRecipe.DoctDept.Name, drugRecipe.Doct.Name, diagnose);

                        #endregion
                    }
                    else
                    {
                        this.lbBasePatientInfo.Text = string.Format(strBase, drugRecipe.InvoiceNO, drugRecipe.CardNO, drugRecipe.PatientName, drugRecipe.Sex.Name, strAge);
                        this.lblPatientInfo.Text    = string.Format(strFee, drugRecipe.RegTime.ToString(), this.personHelper.GetName(drugRecipe.FeeOper.ID), drugRecipe.FeeOper.OperTime.ToString(), drugRecipe.DoctDept.Name, drugRecipe.Doct.Name);
                    }

                    this.lbDrugSendInfo.Text = string.Format(strDrugSend, drugRecipe.DrugedOper.OperTime.ToString(),
                                                             this.personHelper.GetName(drugRecipe.DrugedOper.ID),
                                                             drugRecipe.DrugTerminal.Name, drugRecipe.SendOper.OperTime.ToString(),
                                                             this.personHelper.GetName(drugRecipe.SendOper.ID), drugRecipe.SendTerminal.Name);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }