Ejemplo n.º 1
0
        /// <summary>
        /// 生成处方
        /// </summary>
        /// <param name="alOrder"></param>
        private void SetRecipe(ArrayList alOrder)
        {
            if (this.fpSpread1_Sheet1.Rows.Count > 0)
            {
                this.fpSpread1_Sheet1.Rows.Remove(0, this.fpSpread1_Sheet1.Rows.Count);
            }

            foreach (Neusoft.HISFC.Models.Order.OutPatient.Order ord in alOrder)
            {
                int count = this.fpSpread1_Sheet1.Rows.Count;

                this.fpSpread1_Sheet1.Rows.Add(count, 1);

                count = this.fpSpread1_Sheet1.Rows.Count;

                if (ord == alOrder[0])
                {
                    if (ord.Item.SysClass.ID.ToString() == "PCC")
                    {
                        this.fpSpread1_Sheet1.Columns[3].Visible = true;
                    }
                    else
                    {
                        this.fpSpread1_Sheet1.Columns[3].Visible = false;
                    }
                }
                this.fpSpread1_Sheet1.Cells[count - 1, 0].Text = ord.Item.Name;
                this.fpSpread1_Sheet1.Cells[count - 1, 1].Text = ord.Item.Specs;
                // this.fpSpread1_Sheet1.Cells[count - 1, 2].Text = ord.Combo.ID;
                //this.fpSpread1_Sheet1.Cells[count - 1, 3].Text = ord.HerbalQty.ToString();
                this.fpSpread1_Sheet1.Cells[count - 1, 5].Text = ord.DoseOnce.ToString() + ord.DoseUnit;
                this.fpSpread1_Sheet1.Cells[count - 1, 7].Text = ord.Frequency.Name;
                this.fpSpread1_Sheet1.Cells[count - 1, 6].Text = ord.Usage.Name;
                Neusoft.HISFC.Models.Pharmacy.Item phaItem = phaManagement.GetItem(ord.Item.ID);
                if (ord.NurseStation.User03 == "1")
                {
                    this.fpSpread1_Sheet1.Cells[count - 1, 8].Text = ord.Qty.ToString() + ord.Unit;
                }
                else
                {
                    this.fpSpread1_Sheet1.Cells[count - 1, 8].Text = Convert.ToString(ord.Qty * ord.Item.PackQty) + phaItem.MinUnit;
                }

                //this.fpSpread1_Sheet1.Cells[count - 1, 9].Text = ord.InjectCount.ToString();
                this.fpSpread1_Sheet1.Cells[count - 1, 10].Text = ord.Memo;

                Neusoft.HISFC.Components.Order.Classes.Function.DrawCombo(this.fpSpread1_Sheet1, 2, 4, 0);

                this.lblRecipeNO.Text = ord.ReciptNO;
            }
        }
Ejemplo n.º 2
0
 private void neuSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
 {
     Neusoft.HISFC.Models.Pharmacy.Item drugObj = phaIntergrate.GetItem(this.neuSpread1_Sheet1.Cells[e.Row, 0].Text);
     if (GetDrugList != null)
     {
         GetDrugList(drugObj);
         return;
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 生成处方
        /// </summary>
        /// <param name="alOrder"></param>
        private void SetRecipeByApplyOut(ArrayList alApplyOut)
        {
            if (this.fpSpread1_Sheet1.Rows.Count > 0)
            {
                this.fpSpread1_Sheet1.Rows.Remove(0, this.fpSpread1_Sheet1.Rows.Count);
            }

            foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut ord in alApplyOut)
            {
                int count = this.fpSpread1_Sheet1.Rows.Count;

                this.fpSpread1_Sheet1.Rows.Add(count, 1);

                count = this.fpSpread1_Sheet1.Rows.Count;

                if (ord == alApplyOut[0])
                {
                    if (ord.Item.SysClass.ID.ToString() == "PCC")
                    {
                        this.fpSpread1_Sheet1.Columns[3].Visible = true;
                    }
                    else
                    {
                        this.fpSpread1_Sheet1.Columns[3].Visible = false;
                    }
                }
                this.fpSpread1_Sheet1.Cells[count - 1, 0].Text = ord.Item.Name;
                this.fpSpread1_Sheet1.Cells[count - 1, 1].Text = ord.Item.Specs;
                this.fpSpread1_Sheet1.Cells[count - 1, 2].Text = "";
                this.fpSpread1_Sheet1.Cells[count - 1, 3].Text = "";
                this.fpSpread1_Sheet1.Cells[count - 1, 5].Text = ord.DoseOnce.ToString();
                this.fpSpread1_Sheet1.Cells[count - 1, 7].Text = ord.Frequency.Name;
                this.fpSpread1_Sheet1.Cells[count - 1, 6].Text = ord.Usage.Name;
                Neusoft.HISFC.Models.Pharmacy.Item phaItem = phaManagement.GetItem(ord.Item.ID);

                this.fpSpread1_Sheet1.Cells[count - 1, 9].Text  = "";
                this.fpSpread1_Sheet1.Cells[count - 1, 10].Text = "";

                //HISFC.Components.Order.Classes.Function.DrawCombo(this.fpSpread1_Sheet1, 2, 4, 0);
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 拆分记账费用
 /// </summary>
 /// <param name="r">患者挂号信息</param>
 /// <param name="FeeItemList">费用信息</param>
 /// <param name="nofeeList">记账费用</param>
 /// <param name="feeList">收费项目</param>
 /// <returns></returns>
 private bool SplitFeeItemList(Neusoft.HISFC.Models.Registration.Register r, ArrayList feeItemLists, ref string errText)
 {
     Neusoft.HISFC.Models.Base.PactItemRate pRate = null;
     foreach (FeeItemList f in feeItemLists)
     {
         //城镇医疗
         if (r.Pact.ID == "6" || r.Pact.ID == "7")
         {
             if (f.Item.ItemType == EnumItemType.Drug)
             {
                 Neusoft.HISFC.Models.Pharmacy.Item item = pharmarcyManager.GetItem(f.Item.ID);
                 if (item == null)
                 {
                     errText = "查询药品项目失败!" + pharmarcyManager.Err;
                     return(false);
                 }
                 if (item.SpecialFlag == "1")
                 {
                     pRate = pactItemRate.GetOnepPactUnitItemRateByItem(r.Pact.ID, f.Item.ID);
                     if (pRate != null && pRate.Rate.PubRate == 1)
                     {
                         f.FT.PayCost = 0;
                         f.FT.PubCost = f.FT.OwnCost;
                         f.FT.OwnCost = 0;
                         noFeeList.Add(f);
                     }
                     else
                     {
                         feeList.Add(f);
                     }
                 }
                 else
                 {
                     feeList.Add(f);
                 }
             }
             else
             {
                 feeList.Add(f);
             }
         }
         //美的全部记账
         if (r.Pact.ID == "8")
         {
             f.FT.PayCost = 0;
             f.FT.PubCost = f.FT.OwnCost;
             f.FT.OwnCost = 0;
             noFeeList.Add(f);
         }
     }
     return(true);
 }
Ejemplo n.º 5
0
        // private FarPoint.Win.Spread.SheetView view = new FarPoint.Win.Spread.SheetView();

        public void setPrintInfo(ArrayList alorder)
        {
            if (this.fpSpread1_Sheet1.Rows.Count > 0)
            {
                this.fpSpread1_Sheet1.Rows.Remove(0, this.fpSpread1_Sheet1.Rows.Count);
            }

            foreach (Neusoft.HISFC.Models.Order.OutPatient.Order ord in alorder)
            {
                int count = this.fpSpread1_Sheet1.Rows.Count;
                Neusoft.HISFC.BizProcess.Integrate.Pharmacy phaManagement = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy();
                this.fpSpread1_Sheet1.Rows.Add(count, 1);

                count = this.fpSpread1_Sheet1.Rows.Count;

                this.fpSpread1_Sheet1.Cells[count - 1, 0].Text = ord.Item.Name;
                this.fpSpread1_Sheet1.Cells[count - 1, 1].Text = ord.Item.Specs;
                this.fpSpread1_Sheet1.Cells[count - 1, 5].Text = ord.DoseOnce.ToString() + ord.DoseUnit;
                this.fpSpread1_Sheet1.Cells[count - 1, 7].Text = ord.Frequency.Name;
                this.fpSpread1_Sheet1.Cells[count - 1, 6].Text = ord.Usage.Name;
                Neusoft.HISFC.Models.Pharmacy.Item phaItem = phaManagement.GetItem(ord.Item.ID);
                if (ord.NurseStation.User03 == "1")
                {
                    this.fpSpread1_Sheet1.Cells[count - 1, 8].Text = ord.Qty.ToString() + ord.Unit;
                }
                else
                {
                    this.fpSpread1_Sheet1.Cells[count - 1, 8].Text = Convert.ToString(ord.Qty * ord.Item.PackQty) + phaItem.MinUnit;
                }

                this.fpSpread1_Sheet1.Cells[count - 1, 10].Text = ord.Memo;

                //Neusoft.HISFC.Components.Order.Classes.Function.DrawCombo(this.fpSpread1_Sheet1, 2, 4, 0);

                this.lblRecipeNO.Text = ord.ReciptNO;
            }
        }
Ejemplo n.º 6
0
 public bool ValidPactItemChoose(string pactCode, Neusoft.HISFC.Models.Base.Item baseItem, ref string errText)
 {
     //不是合作医疗目录中的药品,不进行维护
     if (pactCode == "6" || pactCode == "7")
     {
         if (baseItem.ItemType == Neusoft.HISFC.Models.Base.EnumItemType.UnDrug)
         {
             errText = "非药品不能维护优惠比例!";
             return(false);
         }
         Neusoft.HISFC.Models.Pharmacy.Item item = phaIntegrate.GetItem(baseItem.ID);
         if (item == null)
         {
             errText = "查询药品信息失败!" + phaIntegrate.Err;
             return(false);
         }
         if (item.SpecialFlag != "1")
         {
             errText = "不是合作医疗目录药品,不能维护优惠比例!";
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 7
0
        /// <summary>
        /// 打印函数
        /// </summary>
        /// <param name="al">打印数组</param>
        /// <param name="i">第几页</param>
        /// <param name="count">总页数</param>
        /// <param name="operCode">制单人</param>
        private void PrintStockplan(ArrayList al, int inow, int icount, string operCode)
        {
            if (al.Count <= 0)
            {
                MessageBox.Show("没有打印的数据!");
                return;
            }
            Neusoft.HISFC.BizLogic.Pharmacy.Constant    constant    = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
            Neusoft.HISFC.Models.Pharmacy.StockPlan     stockPlan   = (Neusoft.HISFC.Models.Pharmacy.StockPlan)al[0];
            Neusoft.HISFC.BizLogic.Manager.Constant     constantMgr = new Neusoft.HISFC.BizLogic.Manager.Constant();
            Neusoft.HISFC.BizLogic.Manager.Department   deptMgr     = new Neusoft.HISFC.BizLogic.Manager.Department();
            Neusoft.HISFC.BizProcess.Integrate.Pharmacy itemMgr     = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy();

            string strHos   = constantMgr.GetHospitalName();
            string dosageID = string.Empty; //剂型


            if (stockPlan.State == "2")
            {
                this.lbl0.Text = strHos + "药品采购审批单";
            }
            else
            {
                this.lbl0.Text = strHos + "药品采购计划单";
                //label2.Visible = false;
            }

            #region label赋值

            if (this.IsReprint)
            {
                this.lbl0.Text = this.lbl0.Text + "(补打)";
            }

            //DateTime sysTime = this.itemMgr.GetDateTimeFromSysDateTime();
            //this.lb11.Text = "计划科室  " + inPlan.Dept+this.deptMgr.get + " 计划人  " + inPlan.PlanOper.ID;
            this.lb11.Text   = " 计划人:  " + stockPlan.Oper.Name;
            this.lb12.Text   = "计划日期:" + this.itemMgr.GetDateTimeFromSysDateTime().ToString("yyyy-MM-dd");
            this.label2.Text = "采购日期:" + stockPlan.StockOper.OperTime.ToString("yyyy-MM-dd");
            this.lb36.Text   = "第" + inow.ToString() + "页/共" + icount.ToString() + "页";
            this.label1.Text = "单据号:" + stockPlan.BillNO;
            this.label3.Text = "科室:" + deptMgr.GetDeptmentById(stockPlan.Dept.ID);

            #endregion

            #region farpoint赋值

            decimal sumNum5 = 0;
            decimal sumNum8 = 0;
            decimal sumNum9 = 0;
            this.sheetView1.RowCount = 0;

            #region {1EC17564-2FAD-4a77-97AC-4C57076888B2}
            FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
            numberCellType1.DecimalPlaces       = 4;
            this.sheetView1.Columns[6].CellType = numberCellType1;
            this.sheetView1.Columns[7].CellType = numberCellType1;
            this.sheetView1.Columns[8].CellType = numberCellType1;
            #endregion
            for (int i = 0; i < al.Count; i++)
            {
                this.sheetView1.AddRows(i, 1);
                Neusoft.HISFC.Models.Pharmacy.StockPlan info = al[i] as Neusoft.HISFC.Models.Pharmacy.StockPlan;


                this.sheetView1.Cells[i, 0].Text = info.Item.ID;    // info.Item.NameCollection.UserCode;//药品自定义码
                this.sheetView1.Cells[i, 1].Text = info.Item.Name;  //药品名称
                this.sheetView1.Cells[i, 2].Text = info.Item.Specs; //规格
                if (info.Item.PackQty == 0)
                {
                    info.Item.PackQty = 1;
                }

                decimal count = 0, count2 = 0, count3 = 0;
                count  = info.StockApproveQty / info.Item.PackQty;
                count2 = (info.StockApproveQty / info.Item.PackQty) * (info.Item.PriceCollection.PurchasePrice);
                count3 = (info.StockApproveQty / info.Item.PackQty) * (info.Item.PriceCollection.RetailPrice);
                this.sheetView1.Cells[i, 3].Text = info.Item.PackUnit;//单位

                // Neusoft.HISFC.BizProcess.Integrate.Pharmacy itemMgr = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy();



                dosageID = ((Neusoft.HISFC.Models.Pharmacy.Item)itemMgr.GetItem(info.Item.ID)).DosageForm.ID;


                this.sheetView1.Cells[i, 4].Text = ((Neusoft.FrameWork.Models.NeuObject)constantMgr.GetConstant("DOSAGEFORM", dosageID)).Name; //info.Item.DosageForm.Name; //剂型
                this.sheetView1.Cells[i, 5].Text = (info.StockApproveQty / info.Item.PackQty).ToString();                                      //计划数量

                this.sheetView1.Cells[i, 6].Text = info.StockPrice.ToString();                                                                 //计划购入价      // info.Item.PackUnit;//
                this.sheetView1.Cells[i, 7].Text = info.Item.Price.ToString();                                                                 //参考零售价


                this.sheetView1.Cells[i, 8].Text = ((info.StockApproveQty / info.Item.PackQty) * (info.StockPrice)).ToString();                       //计划金额
                this.sheetView1.Cells[i, 9].Text = ((info.StockApproveQty / info.Item.PackQty) * (info.Item.PriceCollection.RetailPrice)).ToString(); //零售金额


                //if (info.Item.Product.Company.Name != "")
                //    this.sheetView1.Cells[i, 7].Text = info.Item.Product.Company.Name;         //供货公司;
                //else
                //    this.sheetView1.Cells[i, 7].Text = "未选择";

                if (info.Company.Name != "")
                {
                    this.sheetView1.Cells[i, 10].Text = info.Company.Name;         //供货公司;
                }
                else
                {
                    this.sheetView1.Cells[i, 10].Text = "未选择";
                }

                //if (info.Item.Product.Producer.Name != "")
                //    this.sheetView1.Cells[i, 8].Text = info.Item.Product.Producer.Name;        //生产厂家
                //else
                //    this.sheetView1.Cells[i, 8].Text = "未选择";

                sumNum5 = sumNum5 + count;
                sumNum8 = sumNum8 + count2;
                sumNum9 = sumNum9 + count3;
            }
            this.sheetView1.RowCount = al.Count + 1;
            this.sheetView1.Cells[al.Count, 0].Text = "合计";
            this.sheetView1.Cells[al.Count, 1].Text = "共" + al.Count + "行"; //行数;
            this.sheetView1.Cells[al.Count, 5].Text = sumNum5.ToString();   //购入数量合计
            this.sheetView1.Cells[al.Count, 8].Text = sumNum8.ToString();   //购入金额合计
            this.sheetView1.Cells[al.Count, 9].Text = sumNum9.ToString();   //零售金额合计

            //宽度
            //this.panel4.Width = this.Width - 3;
            this.fpSpread1.Width  = this.panel1.Width - 10;
            this.fpSpread1.Height = (int)this.sheetView1.RowHeader.Rows[0].Height +
                                    (int)(this.sheetView1.Rows[0].Height * (al.Count + 1)) + 10;

            #endregion

            #region 打印函数

            Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();

            Neusoft.HISFC.Components.Common.Classes.Function.GetPageSize("PhaInplan", ref p);

            p.PrintPage(5, 0, this.panel1);

            #endregion
        }
Ejemplo n.º 8
0
        public int DealSubjob(Neusoft.HISFC.Models.Registration.Register r, System.Collections.ArrayList alFee, ref string errText)
        {
            if (r.Pact.ID == "6" || r.Pact.ID == "7")
            {
                ArrayList NoFeeList = managerIntegrate.QueryConstantList("NOFEESUBJOB");
                if (NoFeeList == null)
                {
                    errText = "查询不收费辅材项目失败!" + managerIntegrate.Err;
                    return(-1);
                }

                //按照组合号分组
                Dictionary <string, List <FeeItemList> > feeList = new Dictionary <string, List <FeeItemList> >();
                foreach (Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList f in alFee)
                {
                    if (!string.IsNullOrEmpty(f.Order.Combo.ID))
                    {
                        if (feeList.ContainsKey(f.Order.Combo.ID))
                        {
                            feeList[f.Order.Combo.ID].Add(f);
                        }
                        else
                        {
                            List <FeeItemList> list = new List <FeeItemList>();
                            list.Add(f);
                            feeList.Add(f.Order.Combo.ID, list);
                        }
                    }
                }
                Neusoft.HISFC.Models.Base.PactItemRate pRate = null;
                foreach (string comboNO in feeList.Keys)
                {
                    List <FeeItemList> list = feeList[comboNO];
                    bool isNofeeSubjob      = true;
                    foreach (FeeItemList f in list)
                    {
                        if (f.Item.ItemType == Neusoft.HISFC.Models.Base.EnumItemType.Drug)
                        {
                            Neusoft.HISFC.Models.Pharmacy.Item item = phaIntegrate.GetItem(f.Item.ID);
                            if (item == null)
                            {
                                errText = "查询药品信息失败!" + phaIntegrate.Err;
                                return(-1);
                            }
                            pRate = pactItemRate.GetOnepPactUnitItemRateByItem(r.Pact.ID, f.Item.ID);
                            //合作医疗药品收取注射费  非合作医疗 不收费注射费
                            if (item.SpecialFlag == "1" && pRate != null && pRate.Rate.PubRate == 1)
                            {
                                isNofeeSubjob = false;
                                break;
                            }
                        }
                    }
                    if (isNofeeSubjob)
                    {
                        foreach (Neusoft.FrameWork.Models.NeuObject obj in NoFeeList)
                        {
                            foreach (FeeItemList f in list)
                            {
                                if (obj.ID == f.Item.ID)
                                {
                                    alFee.Remove(f);
                                }
                            }
                        }
                    }
                }
            }
            return(1);
        }
        /// <summary>
        /// 设置新医嘱
        /// </summary>
        public virtual void SetOrder()
        {
            if (this.DesignMode)
            {
                return;
            }
            //定义个新医嘱对象
            this.order = new Neusoft.HISFC.Models.Order.OutPatient.Order();//重新设置医嘱

            dirty = false;
            try
            {
                if (this.ucInputItem1.FeeItem.ID == "999")//自己录的项目
                {
                    this.order.Item = this.ucInputItem1.FeeItem as Neusoft.HISFC.Models.Base.Item;
                }
                else
                {
                    //药品
                    if (this.ucInputItem1.FeeItem.GetType() == typeof(Neusoft.HISFC.Models.Pharmacy.Item))
                    {
                        if (pharmacyManager == null)
                        {
                            pharmacyManager = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy();
                        }
                        this.order.Item        = pharmacyManager.GetItem(this.ucInputItem1.FeeItem.ID);
                        this.order.Item.User01 = this.ucInputItem1.FeeItem.User01;
                        this.order.Item.User02 = this.ucInputItem1.FeeItem.User02;//传递取药药房
                        this.order.Item.User03 = this.ucInputItem1.FeeItem.User03;
                    }
                    else//非药品
                    {
                        try
                        {
                            if (((Neusoft.HISFC.Models.Base.Item) this.ucInputItem1.FeeItem).PriceUnit != "[复合项]")
                            {
                                Neusoft.HISFC.Models.Fee.Item.Undrug itemTemp = null;
                                itemTemp = itemManager.GetItem(this.ucInputItem1.FeeItem.ID);

                                this.order.Item = itemTemp;

                                //执行科室赋值 开立项目同时赋值执行科室
                                //----Edit By liangjz 07-03
                                if (itemTemp.ExecDept != null && itemTemp.ExecDept != "")
                                {
                                    this.order.ExeDept.ID = itemTemp.ExecDept;
                                }
                                else
                                {
                                    this.order.ExeDept = this.order.Patient.PVisit.PatientLocation.Dept.Clone();
                                }
                                //-----

                                //检查要求是否为空 暂时由此判断该项目为检查还是检验
                                if (itemTemp.SysClass.ID.ToString() == "UL")
                                {
                                    //设置复合项目明细所属大项编码、样本类型/检查部位
                                    this.order.Sample.Name = itemTemp.CheckBody;
                                }
                                else
                                {
                                    this.order.CheckPartRecord = itemTemp.CheckBody;
                                }
                            }
                            else
                            {
                                Neusoft.HISFC.Models.Fee.Item.Undrug itemTemp = null;
                                itemTemp        = (Neusoft.HISFC.Models.Fee.Item.Undrug) this.ucInputItem1.FeeItem;
                                this.order.Item = itemTemp;
                                //检查要求是否为空 暂时由此判断该项目为检查还是检验
                                if (itemTemp.SysClass.ID.ToString() == "UL")
                                {
                                    //设置复合项目明细所属大项编码、样本类型/检查部位
                                    this.order.Sample.Name = itemTemp.CheckBody;
                                }
                                else
                                {
                                    this.order.CheckPartRecord = itemTemp.CheckBody;
                                }
                                this.order.Item.MinFee.ID = "fh";
                            }
                        }
                        catch { MessageBox.Show("转换出错!", "ucItemSelect"); }
                    }
                }
            }
            catch { return; }


            //显示给界面
            if (ReadOrder(this.order) == -1)
            {
                return;
            }

            //设置医嘱开立时间
            Neusoft.FrameWork.Management.DataBaseManger manager = new Neusoft.FrameWork.Management.DataBaseManger();
            DateTime dtNow = manager.GetDateTimeFromSysDateTime();

            this.order.MOTime         = dtNow; //开立时间
            this.order.BeginTime      = dtNow; //开始时间
            this.order.Item.PriceUnit = this.cmbUnit.Text;
            this.order.Unit           = this.cmbUnit.Text;

            this.order.ReciptDept = ((Neusoft.HISFC.Models.Base.Employee)Neusoft.FrameWork.Management.Connection.Operator).Dept.Clone(); //开立科室
            this.order.Oper.ID    = Neusoft.FrameWork.Management.Connection.Operator.ID;                                                 //录入人
            this.order.Oper.Name  = Neusoft.FrameWork.Management.Connection.Operator.Name;

            //医嘱类型
            //this.order.OrderType = this.cmbOrderType1.alItems[this.cmbOrderType1.SelectedIndex] as Neusoft.HISFC.Models.Order.OrderType;


            if (this.txtQTY.Enabled)
            {
                this.txtQTY.Focus();//focus
                this.txtQTY.Select(0, this.txtQTY.Value.ToString().Length);
            }
            else
            {
                this.ucOrderInputByType1.Focus();
            }
            if (this.cmbUnit.Items.Count > 0)
            {
                this.cmbUnit.SelectedIndex = 0;    //默认选择第一个。
            }
            this.ucOrderInputByType1.IsNew = true; //新的

            //初始化新项目信息 设置医嘱频次用法

            if (this.order.Item.GetType() == typeof(Neusoft.HISFC.Models.Pharmacy.Item))
            {
                //this.order.Frequency.ID = "PRN";
                this.order.Usage.ID   = (this.order.Item as Neusoft.HISFC.Models.Pharmacy.Item).Usage.ID;
                this.order.Usage.Name = Order.Classes.Function.HelperUsage.GetName(this.order.Usage.ID);
            }
            else
            {
                //this.order.Frequency.ID = "QD";
            }

            if (this.order.HerbalQty == 0)
            {
                this.order.HerbalQty = 1;                //更新草药付数
            }
            this.ucOrderInputByType1.Order = this.order; //传递给选择类型
            dirty = true;
            this.myOrderChanged(this.order, EnumOrderFieldList.Item);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 判断试敏
        /// </summary>
        /// <param name="feeItemLists">费用明细实体</param>
        /// <returns>成功 true 失败 false 错误信息包含在Err属性内</returns>
        protected virtual bool IsAllergyValid(ArrayList feeItemLists)
        {
            this.errText = string.Empty;

            //需要验证过敏结果的药品集合
            List <Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList> pharmarcys = new List <Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList>();

            //药品业务层
            Neusoft.HISFC.BizProcess.Integrate.Pharmacy pharmacyIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy();
            //医嘱业务层
            Neusoft.HISFC.BizProcess.Integrate.Order orderIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Order();
            //不合法项目列表
            ArrayList unValidList = new ArrayList();

            foreach (Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList f in feeItemLists)
            {
                //如果是药品,并且需要试敏,那么加入以下试敏列表pharmarcys
                if (f.Item.ItemType == Neusoft.HISFC.Models.Base.EnumItemType.Drug)
                {
                    Neusoft.HISFC.Models.Pharmacy.Item itemTemp = pharmacyIntegrate.GetItem(f.Item.ID);
                    if (itemTemp == null)
                    {
                        this.errText = "获得药品基本信息出错!" + pharmacyIntegrate.Err;

                        return(false);
                    }
                    //如果需要试敏,那么加入列表
                    if (itemTemp.IsAllergy)
                    {
                        pharmarcys.Add(f);
                    }
                }
            }

            //如果药品条目为0, 就不用判断试敏
            if (pharmarcys.Count == 0)
            {
                return(true);
            }

            //在医嘱表,判断试敏标记是否已经有值,没有试敏,或者试敏阳性,不能收费!
            foreach (Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList f in pharmarcys)
            {
                //如果没有医嘱号,说明不是医生站开出的医嘱,不判断试敏.
                if (string.IsNullOrEmpty(f.Order.ID))
                {
                    continue;
                }

                Neusoft.HISFC.Models.Order.OutPatient.Order orderTemp = orderIntegrate.GetOneOrder(f.Order.ID);
                //如果没有取出医嘱信息,那么不判断试敏,因为某些从门诊直接披费的项目,也有MoOrder号;
                if (orderTemp == null)
                {
                    continue;
                }

                //需要皮试,但是还没有皮试结果
                if (orderTemp.HypoTest == 2)
                {
                    this.errText += "[ " + f.Item.Name + " ]" + "应该皮试,没有皮试结果!" + "\n";

                    unValidList.Add(f);
                }
                if (orderTemp.HypoTest == 3)
                {
                    this.errText += "[ " + f.Item.Name + " ]" + "皮试结果为阳性!" + "\n";

                    unValidList.Add(f);
                }
            }

            if (unValidList.Count > 0)
            {
                return(false);
            }

            return(true);
        }