Пример #1
0
        public void AddBackFeeItem(int iIndex, Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList infoItem)
        {
            //this.Clear();
            Neusoft.HISFC.BizLogic.Pharmacy.Item con  = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            Neusoft.HISFC.Models.Pharmacy.Item   item = con.GetItem(infoItem.Item.ID);
            this.GetRecipeLabelItem(infoItem.FeeOper.Dept.ID, infoItem.Item.ID, ref item);
            //设置患者信息显示、发药信息
            this.SetPatiAndSendInfo(infoItem);
            if (infoItem.Item.Qty < 0)
            {
                this.neuLabel1.Text = "无锡市妇幼保健院退药清单";
            }
            //退改药标志
            this.fpSpread1_Sheet1.AddRows(iIndex * 2, 2);
            this.fpSpread1_Sheet1.Rows[this.fpSpread1_Sheet1.Rows.Count - 1].Font     = new System.Drawing.Font("宋体", 9.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 0].Text = item.NameCollection.RegularName;
            this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 1, 0].Text = "     [" + item.Name + "]";
            this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 1].Text = item.Specs;
            this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 1, 1].Text = " ";
            this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 2].Text = infoItem.Item.Qty + infoItem.Item.PriceUnit;

            this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 3].Text = " ";

            this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 4].Text = infoItem.Item.Price.ToString();
            this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 5].Text = "80%";
            TotCost += infoItem.Item.Qty * infoItem.Item.Price;
            this.lblTotCost.Text = TotCost.ToString();
        }
Пример #2
0
        /// <summary>
        /// 设置单条项目信息
        /// </summary>
        /// <param name="f">项目信息</param>
        public void SetSingleFeeItemInfomation(Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList f)
        {
            string  siType = string.Empty;
            decimal siRate = 0;

            if (f.Compare == null)
            {
                siType = "自费";
                siRate = 100;
            }
            else
            {
                if (f.Compare.CenterItem.ItemGrade == "1")
                {
                    siType = "甲类";
                    siRate = 0;
                }
                if (f.Compare.CenterItem.ItemGrade == "2")
                {
                    siType = "乙类";
                    siRate = f.Compare.CenterItem.Rate * 100;
                }
                if (f.Compare.CenterItem.ItemGrade == "3")
                {
                    siType = "自费";
                    siRate = 100;
                }
                if (f.Compare.CenterItem.ID.Length <= 0)
                {
                    siType = "自费";
                    siRate = 100;
                }
            }
            //if (f.Item.IsPharmacy)
            if (f.Item.ItemType == Neusoft.HISFC.Models.Base.EnumItemType.Drug)
            {
                string  itemCode = f.Item.ID;
                DataRow findRow;

                DataRow[] rowFinds = this.dsItem.Tables[0].Select("ITEM_CODE = " + "'" + itemCode + "'");

                if (rowFinds == null || rowFinds.Length == 0)
                {
                    MessageBox.Show(Language.Msg("编码为: [") + itemCode + Language.Msg(" ] 的项目查找失败!"));

                    return;
                }
                findRow = rowFinds[0];

                this.lbItemInfo.Text = "医保类别: " + siType + " 比例:" + siRate.ToString() + "%" + "\n"
                                       + "通用名:" + findRow["cus_name"].ToString() + " 英文名:" + findRow["en_name"].ToString().ToLower() + "\n" +
                                       "别名:" + findRow["OTHER_NAME"].ToString() + "\n" +
                                       "规格:" + f.Item.Specs;
            }
            else
            {
                this.lbItemInfo.Text = "医保类别: " + siType + " 比例:" + siRate.ToString() + "%";
            }
        }
Пример #3
0
 /// <summary>
 /// 设置患者信息B
 /// </summary>
 protected void SetPatiAndSendInfo(Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList iteminfo)
 {
     //设置条码
     // this.lbBarCode.Text = "*" + applyOut.RecipeNO + "*";
     //设置患者信息、发药信息
     if (this.patientInfo != null)
     {
         //姓名
         this.lblPatientName.Text = this.patientInfo.Name;
         this.lblPatientId.Text   = this.patientInfo.ID;
         this.lblInvoiceNo.Text   = this.patientInfo.InvoiceNO;//发票号
         this.lblPactName.Text    = this.patientInfo.Pact.Name;
         this.lblSex.Text         = this.patientInfo.Sex.Name;
         this.lblAge.Text         = this.patientInfo.Age;
         this.lblDeptName.Text    = this.patientInfo.DoctorInfo.Templet.Dept.Name;
         this.lblDignoseName.Text = this.patientInfo.ClinicDiagnose;
         this.lblDrug.Text        = "";
         this.lblDoct.Text        = this.patientInfo.DoctorInfo.Templet.Doct.Name;
         this.lblSendWindow.Text  = "退药窗口";
     }
 }
Пример #4
0
        public void AddBackFeeItem(int iIndex, Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList infoItem)
        {
            //this.lbPatiInfo.Text = string.Format("姓名:{0}  科室:{1}",infoItem.Patient.Name,infoItem.RecipeOper.Dept.ID);
            //this.lbRegInfo.Text = string.Format("发票:{0}", infoItem.Invoice.ID);

            this.neuSpread1_Sheet1.Rows.Add(iIndex, 1);

            this.lbPatiInfo.Text = "                 退药单";
            this.lbPatiInfo.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));

            this.lbRegInfo.Text = string.Format("病例号:{0}   姓名:{1}  发票号:{2}", this.outPatient.PID.CardNO, this.outPatient.Name, infoItem.Invoice.ID);

            this.neuSpread1_Sheet1.Cells[iIndex, 0].Text = string.Format("{0}[{1}]", infoItem.Item.Name, infoItem.Item.Specs); //药品名,规格

            if (infoItem.FeePack == "1")
            {
                this.neuSpread1_Sheet1.Cells[iIndex, 1].Text = (infoItem.Item.Qty / infoItem.Item.PackQty).ToString() + infoItem.Item.PriceUnit;//数量
            }
            else
            {
                this.neuSpread1_Sheet1.Cells[iIndex, 1].Text = infoItem.Item.Qty.ToString() + infoItem.Item.PriceUnit; //数量
            }
            this.neuSpread1_Sheet1.Cells[iIndex, 2].Text = infoItem.FT.TotCost.ToString();                             //金额
        }
Пример #5
0
 public int UploadFeeDetailOutpatient(Neusoft.HISFC.Models.Registration.Register r, Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList f)
 {
     return(1);
 }
Пример #6
0
        private bool SetFeeInfo(string invoiceNO)
        {
            ArrayList alFee = outPatientManager.QueryFeeItemListsByInvoiceNO(invoiceNO);

            if (alFee == null)
            {
                MessageBox.Show("查询费用明细失败!" + outPatientManager.Err);
                return(false);
            }
            if (alFee.Count == 0)
            {
                MessageBox.Show("该发票号不存在,请重新输入!");
                this.txtInvoiceNO.Focus();
                this.txtInvoiceNO.SelectAll();
                return(false);
            }
            int     count = 0;
            decimal cost  = 0;

            Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList tempf = null;
            foreach (Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList f in alFee)
            {
                string  priceUnit = string.Empty;
                decimal price = 0m, qty = 0m;
                if (f.PayType == PayTypes.Balanced && f.CancelType == CancelTypes.Valid)
                {
                    price     = f.Item.Price;
                    priceUnit = f.Item.PriceUnit;
                    qty       = f.Item.Qty;
                    if (f.Item.ItemType == EnumItemType.Drug)
                    {
                        Neusoft.HISFC.Models.Pharmacy.Item item = phaManager.GetItem(f.Item.ID);
                        if (item == null)
                        {
                            MessageBox.Show("查询药品信息失败!" + phaManager.Err);
                            return(false);
                        }
                        if (item.SplitType == "0")
                        {
                            if (f.Item.PriceUnit != item.PackUnit)
                            {
                                price = Neusoft.FrameWork.Public.String.FormatNumber(f.Item.Price / f.Item.PackQty, 2);
                            }
                            else
                            {
                                qty       = qty / item.PackQty;
                                priceUnit = item.PackUnit;
                            }
                        }
                        else
                        {
                            qty       = Neusoft.FrameWork.Public.String.FormatNumber(f.Item.Qty / f.Item.PackQty, 2);
                            priceUnit = item.PackUnit;
                        }
                    }

                    count = this.neuSpread1_Sheet1.Rows.Count;
                    this.neuSpread1_Sheet1.Rows.Add(count, 1);
                    this.neuSpread1_Sheet1.Cells[count, 0].Text = f.Item.ID;
                    this.neuSpread1_Sheet1.Cells[count, 1].Text = f.Item.Name;
                    this.neuSpread1_Sheet1.Cells[count, 2].Text = f.Item.Specs;
                    this.neuSpread1_Sheet1.Cells[count, 3].Text = Neusoft.FrameWork.Public.String.FormatNumber(price, 2).ToString();
                    this.neuSpread1_Sheet1.Cells[count, 4].Text = priceUnit;
                    this.neuSpread1_Sheet1.Cells[count, 5].Text = Neusoft.FrameWork.Public.String.FormatNumber(qty, 2).ToString();
                    this.neuSpread1_Sheet1.Cells[count, 6].Text = (f.FT.OwnCost + f.FT.PubCost + f.FT.PayCost).ToString();
                    cost += f.FT.OwnCost + f.FT.PubCost + f.FT.PayCost;
                    if (tempf == null)
                    {
                        tempf = f;
                    }
                }
            }
            count = this.neuSpread1_Sheet1.Rows.Count;
            this.neuSpread1_Sheet1.Rows.Add(count, 1);
            this.neuSpread1_Sheet1.Cells[count, 0].Text = "合计";
            this.neuSpread1_Sheet1.Cells[count, 6].Text = cost.ToString();

            FrameWork.Models.NeuObject obj = perManager.GetPersonByID(tempf.RecipeOper.ID);
            if (obj != null)
            {
                lblDoct.Text = obj.Name;
            }

            obj = deptManager.GetDeptmentById(tempf.RecipeOper.Dept.ID);
            if (obj != null)
            {
                lblDept.Text = obj.Name;
            }

            return(true);
        }
Пример #7
0
 public int ModifyUploadedFeeDetailOutpatient(Neusoft.HISFC.Models.Registration.Register r, Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList f)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Пример #8
0
        /// <summary>
        /// 保存审核信息
        /// </summary>
        /// <returns></returns>
        protected override int Save()
        {
            int infoCounts = 0;

            foreach (FarPoint.Win.Spread.SheetView sv in this.fpSpread2.Sheets)
            {
                for (int i = 0; i < sv.RowCount; i++)
                {
                    if (sv.Rows[i].Tag is ReturnApply)
                    {
                        infoCounts++;
                    }
                }
            }

            if (infoCounts == 0)
            {
                MessageBox.Show("没有需要审核的费用!");

                return(-1);
            }

            DateTime nowTime = this.outpatientManager.GetDateTimeFromSysDateTime();

            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();

            this.outpatientManager.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);
            this.pharmacyIntegrate.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);
            this.returnApplyManager.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);

            int       returnValue   = 0;
            ArrayList alBackFeeList = new ArrayList();

            foreach (FarPoint.Win.Spread.SheetView sv in this.fpSpread2.Sheets)
            {
                for (int i = 0; i < sv.RowCount; i++)
                {
                    if (sv.Rows[i].Tag is ReturnApply)
                    {
                        ReturnApply tempInsert = sv.Rows[i].Tag as ReturnApply;

                        ReturnApply tempExist = this.returnApplyManager.GetReturnApplyByApplySequence(tempInsert.Patient.ID, tempInsert.ID);
                        //找到已经存在数据库的退费申请信息
                        if (tempExist != null)
                        {
                            //if (tempExist.CancelType != Neusoft.HISFC.Models.Base.CancelTypes.Valid)
                            //{
                            //    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            //    MessageBox.Show(tempExist.Item.Name + "已经被确认或者作废,请刷新");

                            //    return -1;
                            //}
                            if (tempExist.IsConfirmed)
                            {
                                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                                MessageBox.Show(tempExist.Item.Name + "已经被确认或者作废,请刷新");

                                return(-1);
                            }
                        }

                        returnValue = this.returnApplyManager.DeleteReturnApply(tempInsert.ID);
                        if (returnValue == -1)
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show(tempExist.Item.Name + "删除失败!" + this.returnApplyManager.Err);

                            return(-1);
                        }

                        tempInsert.ID          = this.returnApplyManager.GetReturnApplySequence();
                        tempInsert.IsConfirmed = false;//将true改为false,药品审核后为 未确认 未退费 状态 modified by xizf 20110301
                        tempInsert.CancelType  = Neusoft.HISFC.Models.Base.CancelTypes.Canceled;

                        returnValue = this.returnApplyManager.InsertReturnApply(tempInsert);

                        if (returnValue == -1)
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show(tempInsert.Item.Name + "审核失败!" + this.returnApplyManager.Err);

                            return(-1);
                        }

                        Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList feeItemList = this.outpatientManager.GetFeeItemListBalanced(tempInsert.RecipeNO, tempInsert.SequenceNO);
                        if (feeItemList == null)
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show(tempInsert.Item.Name + "获得项目失败!" + this.outpatientManager.Err);

                            return(-1);
                        }

                        if (feeItemList.Item.Qty < feeItemList.NoBackQty + tempInsert.Item.Qty)
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show("其他的操作员可能已经审核了" + feeItemList.Item.Name + "请刷新!");

                            return(-1);
                        }

                        //更新可退数量和确认数量
                        returnValue = this.outpatientManager.UpdateConfirmFlag(tempInsert.RecipeNO, tempInsert.SequenceNO, "1", feeItemList.ConfirmOper.ID, feeItemList.ConfirmOper.Dept.ID, feeItemList.ConfirmOper.OperTime, feeItemList.NoBackQty + tempInsert.Item.Qty,
                                                                               feeItemList.ConfirmedQty - tempInsert.Item.Qty);
                        if (returnValue <= 0)
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show("更新项目:" + feeItemList.Item.Name + "失败!" + this.outpatientManager.Err);

                            return(-1);
                        }

                        //if (tempInsert.Item.IsPharmacy)
                        if (tempInsert.Item.ItemType == Neusoft.HISFC.Models.Base.EnumItemType.Drug)
                        {
                            feeItemList.Item.Qty = tempInsert.Item.Qty;

                            returnValue = this.pharmacyIntegrate.OutputReturn(feeItemList, this.outpatientManager.Operator.ID, nowTime);
                            if (returnValue < 0)
                            {
                                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                                MessageBox.Show("药品退库失败!" + this.pharmacyIntegrate.Err);

                                return(-1);
                            }

                            alBackFeeList.Add(feeItemList);
                        }
                    }
                }
            }

            Neusoft.FrameWork.Management.PublicTrans.Commit();

            MessageBox.Show("审核成功!");

            base.GetItemList();

            if (alBackFeeList.Count > 0)
            {
                if (this.IBackFeePrint == null)
                {
                    this.IBackFeePrint = Neusoft.FrameWork.WinForms.Classes.UtilInterface.CreateObject(this.GetType(), typeof(Neusoft.HISFC.BizProcess.Interface.FeeInterface.IBackFeeRecipePrint)) as Neusoft.HISFC.BizProcess.Interface.FeeInterface.IBackFeeRecipePrint;
                }

                if (this.IBackFeePrint != null)
                {
                    this.IBackFeePrint.Patient = this.patient;

                    this.IBackFeePrint.SetData(alBackFeeList);

                    //this.IBackFeePrint.Print();
                }
            }
            return(1);
        }
        /// <summary>
        /// 单条处理患者适应症费用

        /// </summary>
        /// <param name="registerObj"></param>
        /// <param name="outFeeDetail"></param>
        /// <returns></returns>
        public int ProcessOutPatientFeeDetail(Neusoft.HISFC.Models.Registration.Register registerObj, ref Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList outFeeDetail)
        {
            //从适应症表中提取维护标志


            string practicableSymptomText = "";
            int    returnValue            = this.QueryItem(registerObj, outFeeDetail, ref practicableSymptomText);

            switch (returnValue)
            {
            case 0:     //没有维护
            {
                //不处理


                break;
            }

            case 1:     //有维护
            {
                DialogResult d = System.Windows.Forms.MessageBox.Show("该项目在适应症中有维护:\n" + practicableSymptomText + "\n" + "是否选择按照适应症收费", "提示", MessageBoxButtons.YesNoCancel);
                if (d == DialogResult.Cancel)
                {
                    return(1);
                }
                else if (d == DialogResult.Yes)
                {
                    //是否适应症置为1 借用outFeeDetail.Item.Memo
                    outFeeDetail.Item.Memo = "1";
                    return(1);
                }
                else
                {
                    outFeeDetail.Item.Memo = "0";
                    //不处理
                }
                break;
            }

            case -1:     //出错
            {
                break;
            }

            default:
                break;
            }
            return(1);
        }
        //}

        #endregion

        #region 私有方法
        /// <summary>
        /// 从适应症表中查找维护的项目
        /// </summary>
        /// <param name="?"></param>
        /// <returns> -1 报错 0 没有维护 1 有维护 </returns>
        private int QueryItem(Neusoft.HISFC.Models.Registration.Register registerObj, Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList feeitemlist, ref string practicableSymptomText)
        {
            Neusoft.HISFC.BizLogic.Fee.Interface     myInterface = new Neusoft.HISFC.BizLogic.Fee.Interface();
            Neusoft.HISFC.Models.SIInterface.Compare myCompare   = new Neusoft.HISFC.Models.SIInterface.Compare();

            if (registerObj != null || registerObj.ID != "")
            {
                myInterface.GetCompareSingleItem(registerObj.Pact.ID, feeitemlist.Item.ID, ref myCompare);
                if (myCompare.Ispracticablesymptom)
                {
                    practicableSymptomText = myCompare.Practicablesymptomdepiction;
                    return(1);
                }
                else
                {
                    return(0);
                }
            }
            if (feeitemlist.Item.Memo != "1")
            {
                //从维护表中对照项目
            }
            return(0);
        }
Пример #11
0
        /// <summary>
        /// 修改单条门诊已上传明细
        /// </summary>
        /// <param name="r">挂号信息</param>
        /// <param name="f">要修改的费用实体明细</param>
        /// <returns>-1 失败 0 没有记录 >=1 成功</returns>
        public int ModifyUploadedFeeDetailOutpatient(Neusoft.HISFC.Models.Registration.Register r, Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList f)
        {
            try
            {
                if (!this.IsValid(r))
                {
                    return(-1);
                }

                int returnValue = this.medcaredInterface.ModifyUploadedFeeDetailOutpatient(r, f);
                if (returnValue <= 0)
                {
                    this.errMsg = this.medcaredInterface.ErrMsg;
                }
                return(returnValue);
            }
            catch (Exception e)
            {
                this.errMsg = e.Message;

                return(-1);
            }
        }