示例#1
0
        /// <summary>
        /// 打印
        /// </summary>
        public virtual void Print()
        {
            List <Neusoft.HISFC.Models.Pharmacy.ApplyOut> alData = this.GetData();

            //根据不同功能组调用不同方法实现
            switch (this.funModle)
            {
            case OutpatientFun.Drug:
                if (this.isPrintListing && ListingPrint != null)                 //打印发药清单
                {
                    ListingPrint.AddAllData(new ArrayList(alData.ToArray()), this.tempDrugRecipe);
                    ListingPrint.Print();
                }
                break;

            case OutpatientFun.Send:
                if (this.isPrintRecipe && RecipePrint != null)                   //打印处方
                {
                    RecipePrint.AddAllData(new ArrayList(alData.ToArray()), this.tempDrugRecipe);
                    RecipePrint.Print();
                }
                break;

            case OutpatientFun.DirectSend:
                if (this.isPrintRecipe && RecipePrint != null)                   //打印处方
                {
                    RecipePrint.AddAllData(new ArrayList(alData.ToArray()), this.tempDrugRecipe);
                    RecipePrint.Print();
                }
                break;
            }
        }
示例#2
0
        /// <summary>
        /// 保存
        /// </summary>
        public virtual int Save()
        {
            if (this.OperInfo == null || this.OperInfo.ID == "")
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("请设置操作员"));
                return(-1);
            }
            if (this.OperDept == null || this.OperDept.ID == "")
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("请设置操作科室"));
                return(-1);
            }

            if (this.BeginSave != null)
            {
                this.BeginSave(null, System.EventArgs.Empty);
            }

            List <Neusoft.HISFC.Models.Pharmacy.ApplyOut> alData = this.GetData();

            if (alData == null || alData.Count <= 0)
            {
                return(-1);
            }

            int parm = 1;

            //根据不同功能组调用不同方法实现
            switch (this.funModle)
            {
            case OutpatientFun.Drug:
                //配药 标签自动打印 更新状态不扣库
                parm = Function.OutpatientDrug(alData, this.terminal, this.ApproveDept, this.OperInfo, this.isAdjustInDrug);
                if (parm == 1)
                {
                    if (this.isPrintListing && ListingPrint != null)                //打印发药清单
                    {
                        ListingPrint.AddAllData(new ArrayList(alData.ToArray()), this.tempDrugRecipe);
                        ListingPrint.Print();
                    }
                }
                break;

            case OutpatientFun.Send:                    //保存扣库
                //判断是否已进行过发药处理
                if (alData != null && alData.Count > 0)
                {
                    Neusoft.HISFC.Models.Pharmacy.ApplyOut applyOut = alData[0] as Neusoft.HISFC.Models.Pharmacy.ApplyOut;
                    if (applyOut.State == "2")
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("该药品已发药 不需保存"));
                        return(-1);
                    }
                }
                try
                {
                    //{60453BF5-EFFA-4cd5-832F-D63FD1B91CD2} 核准科室赋值  根据西安项目反馈修改
                    foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut applyOut in alData)
                    {
                        applyOut.Operation.ApproveOper.Dept = this.ApproveDept;
                    }

                    parm = Function.OutpatientSend(alData, this.terminal, this.ApproveDept, this.OperInfo, false, !this.isAdjustInDrug);
                    if (parm == 1)
                    {
                        if (this.isPrintRecipe && RecipePrint != null)                  //打印处方
                        {
                            RecipePrint.AddAllData(new ArrayList(alData.ToArray()), this.tempDrugRecipe);
                            RecipePrint.Print();
                        }
                    }
                }
                catch (Exception ee)
                {
                    MessageBox.Show(ee.Message);
                }
                break;

            case OutpatientFun.DirectSend:              //直接保存 标签自动打印完成后 保存扣库  不需判断调剂参数 每次都更新
                //判断是否已进行过发药处理
                if (alData != null && alData.Count > 0)
                {
                    Neusoft.HISFC.Models.Pharmacy.ApplyOut applyOut = alData[0] as Neusoft.HISFC.Models.Pharmacy.ApplyOut;
                    if (applyOut.State == "2")
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("该药品已发药 不需保存"));
                        return(-1);
                    }
                }
                //{60453BF5-EFFA-4cd5-832F-D63FD1B91CD2} 核准科室赋值  根据西安项目反馈修改
                foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut applyOut in alData)
                {
                    applyOut.Operation.ApproveOper.Dept = this.ApproveDept;
                }

                parm = Function.OutpatientSend(alData, this.terminal, this.ApproveDept, this.OperInfo, true, true);
                if (parm == 1)
                {
                    if (this.isPrintRecipe && RecipePrint != null)                  //打印处方
                    {
                        RecipePrint.AddAllData(new ArrayList(alData.ToArray()), this.tempDrugRecipe);
                        RecipePrint.Print();
                    }
                }
                break;

            case OutpatientFun.Back:
                parm = Function.OutpatientBack(alData, this.OperInfo);
                break;
            }

            this.JudgeWarnStore();

            if (parm == 1)
            {
                this.Clear();
            }
            else
            {
                return(-1);
            }

            if (this.EndSave != null)
            {
                this.EndSave(null, System.EventArgs.Empty);
            }

            return(1);
        }