Exemple #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();
        }
        private void neuSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            string strCode = this.fpDrugList.Cells[e.Row, 0].Text;

            Neusoft.HISFC.BizLogic.Pharmacy.Item Pitem = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            Neusoft.HISFC.Models.Pharmacy.Item   al    = new Neusoft.HISFC.Models.Pharmacy.Item();
            al = Pitem.GetItem(strCode);
            this.neutext.Text = al.Product.Manual;
        }
        public int GetItemExtendInfo(string ItemID, ref string ExtendInfoTxt, ref System.Collections.ArrayList AlExtendInfo)
        {
            string    txtReturn = string.Empty;
            ArrayList al        = new ArrayList();

            Neusoft.HISFC.BizLogic.Fee.Item          itemMgr      = new Neusoft.HISFC.BizLogic.Fee.Item();
            Neusoft.HISFC.BizLogic.Fee.UndrugPackAge undrugPkgMgr = new Neusoft.HISFC.BizLogic.Fee.UndrugPackAge();
            Neusoft.HISFC.BizLogic.Pharmacy.Item     phaMgr       = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            //{A79FEAFD-BD92-4bff-A74B-A41055D8D15F}
            Neusoft.HISFC.BizLogic.Fee.Interface feeInterface = new Neusoft.HISFC.BizLogic.Fee.Interface();
            if (this.itemType == Neusoft.HISFC.Models.Base.EnumItemType.Drug)
            {
                Neusoft.HISFC.Models.Pharmacy.Item drug = null;
                #region addby xuewj 2010-9-15 {A79FEAFD-BD92-4bff-A74B-A41055D8D15F}
                drug = phaMgr.GetItem(ItemID);
                #region addby xuewj 2010-10-1 {EA10BA8E-CBF4-4348-8BCE-9AD0D193CAE1}
                string rtnindication = feeInterface.ShowItemIndicationByPactAndItemCode(this.pactInfo.ID, ItemID);
                #endregion
                string baseDrugInfo = drug.ExtendData2;
                string rtn          = feeInterface.ShowItemGradeByPactAndItemCode(this.pactInfo.ID, ItemID);
                txtReturn = "药品编码:" + drug.ID + "\r\n" + "药品名称:" + drug.Name + "\r\n" + "自负比例:" + rtn + "\r\n" +
                            "国家基本药物编码:" + baseDrugInfo + "\r\n" +
                            "适应症:" + rtnindication + "\r\n" + "使用限制等级:" + "" + "\r\n" +//{EA10BA8E-CBF4-4348-8BCE-9AD0D193CAE1}
                            "说明书:" + drug.Product.Manual + "\r\n";
                #endregion
            }

            if (this.itemType == Neusoft.HISFC.Models.Base.EnumItemType.UnDrug)
            {
                Neusoft.HISFC.Models.Fee.Item.Undrug undrug = null;

                undrug = itemMgr.GetValidItemByUndrugCode(ItemID);

                #region {A79FEAFD-BD92-4bff-A74B-A41055D8D15F}
                //if (undrug != null && undrug.UnitFlag == "1")
                //{
                //    al = undrugPkgMgr.QueryUndrugPackagesBypackageCode(undrug.ID);
                //}
                if (undrug != null)
                {
                    #region addby xuewj 2010-10-1 {EA10BA8E-CBF4-4348-8BCE-9AD0D193CAE1}
                    string rtnindication = feeInterface.ShowItemIndicationByPactAndItemCode(this.pactInfo.ID, ItemID);
                    #endregion
                    string rtn = feeInterface.ShowItemGradeByPactAndItemCode(this.pactInfo.ID, ItemID);
                    txtReturn = "非药品编码:" + undrug.ID.Trim() + "  " + "非药品名称:" + undrug.Name.Trim() + "  " + "自负比例:" + rtn + "  "
                                + "适应症:" + rtnindication.Trim();
                }
                #endregion
            }

            ExtendInfoTxt = txtReturn;
            AlExtendInfo  = al;

            return(1);
        }
Exemple #4
0
        private void neuSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            string strCode = this.fpDrugList.Cells[e.Row, 0].Text;

            Neusoft.HISFC.BizLogic.Pharmacy.Item Pitem = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            Neusoft.HISFC.Models.Pharmacy.Item   item  = new Neusoft.HISFC.Models.Pharmacy.Item();
            item = Pitem.GetItem(strCode);

            this.tpDescription.Text = item.Name + " [ " + item.Specs + " ] 药品详细信息";

            this.neutext.Text = item.Product.Manual;
        }
 /// <summary>
 /// 获取指定行的Item实体
 /// </summary>
 /// <param name="rowIndex">指定行索引</param>
 /// <returns>成功返回Item实体 失败返回null</returns>
 protected Item GetItem(int rowIndex)
 {
     try
     {
         Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
         return(itemManager.GetItem(this.neuSpread1_Sheet1.Cells[rowIndex, 0].Text));
     }
     catch (Exception ex)
     {
         MessageBox.Show("由FarPoint读取实体信息进行赋值时发生异常\n" + ex.Message);
         return(null);
     }
 }
        private void ucDrugList1_ChooseDataEvent(FarPoint.Win.Spread.SheetView sv, int activeRow)
        {
            if (sv != null && activeRow >= 0)
            {
                string drugID;
                drugID = sv.Cells[activeRow, 0].Value.ToString();
                //取药品字典信息
                Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
                this.item = itemManager.GetItem(drugID);
                if (this.item != null)
                {
                    //{E49F9CEA-2E6D-4b2e-919F-99145BEE3E68}  协定处方校验 对于未维护明细的协定处方,不能进行入库操作
                    if (this.item.IsNostrum == true)
                    {
                        List <Neusoft.HISFC.Models.Pharmacy.Nostrum> nostrumList = itemManager.QueryNostrumDetail(this.item.ID);
                        if (nostrumList == null || nostrumList.Count <= 0)
                        {
                            MessageBox.Show(this.item.Name + " 为协定处方,但尚未进行明细内容维护,不能进行入库操作");
                            return;
                        }
                    }
                    this.Clear(true);
                    //标志是否已新加的药品
                    this.item.User01 = "1";

                    if (Function.SetPrice(this.privDept.ID, this.item.ID, ref this.item) == -1)
                    {
                        return;
                    }

                    //添加数据
                    this.SetItem(this.item);

                    this.ntbInQty.Focus();

                    //{9E7FB328-89B3-4f43-A417-2EC3ACFC7093}
                    //双击清空键值
                    if (this.ClearPriKey != null)
                    {
                        Neusoft.FrameWork.Models.NeuObject obj = new Neusoft.FrameWork.Models.NeuObject();
                        this.ClearPriKey(ref obj);
                    }
                }
                else
                {
                    MessageBox.Show(Language.Msg("检索药品基本信息失败"));
                    this.ucDrugList1.SetFocusSelect();
                }
            }
        }
        /// <summary>
        /// 根据药品编码加入数据
        /// </summary>
        /// <param name="drugNO">药品编码</param>
        /// <param name="outBillNO">出库流水号</param>
        /// <returns></returns>
        private int AddDrugData(string drugNO, string outBillNO, decimal applyQty)
        {
            //取药品字典信息
            Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            Neusoft.HISFC.Models.Pharmacy.Item   item        = itemManager.GetItem(drugNO);
            if (item == null)
            {
                MessageBox.Show(Language.Msg("检索药品基本信息失败"));
                return(-1);
            }

            Neusoft.HISFC.Models.Pharmacy.ApplyOut applyOut = new Neusoft.HISFC.Models.Pharmacy.ApplyOut();

            applyOut.Item = item;

            if (outBillNO != null)
            {
                applyOut.OutBillNO = outBillNO;
            }

            if (this.hsApplyData.Contains(this.GetKey(applyOut)))
            {
                MessageBox.Show(Language.Msg("该药品已添加"));
                return(0);
            }

            applyOut.Days       = 1;
            applyOut.ApplyDept  = this.phaInManager.DeptInfo;       //申请科室
            applyOut.StockDept  = this.phaInManager.TargetDept;     //库存科室 (目标科室)
            applyOut.State      = "0";                              //状态 申请
            applyOut.SystemType = this.phaInManager.PrivType.Memo;
            applyOut.PrivType   = this.phaInManager.PrivType.ID;

            if (applyQty != -1)
            {
                applyOut.Operation.ApplyQty = applyQty;
            }

            if (this.AddDataToTable(applyOut, "1") == 1)
            {
                this.hsApplyData.Add(this.GetKey(applyOut), applyOut);

                this.SetFormat();

                this.SetFocusSelect();
            }

            return(1);
        }
        private void ucDrugList1_ChooseDataEvent(FarPoint.Win.Spread.SheetView sv, int activeRow)
        {
            string drugCode = sv.Cells[activeRow, 0].Text;

            Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            Neusoft.HISFC.Models.Pharmacy.Item   item        = itemManager.GetItem(drugCode);

            if (item == null)
            {
                MessageBox.Show(Language.Msg("获取药品信息失败") + itemManager.Err);
            }

            this.AddItem(item);

            this.SetFocus(true);
        }
Exemple #9
0
        /// <summary>
        /// 增加申请数据
        /// </summary>
        /// <param name="listCode">申请单号</param>
        /// <param name="state">状态</param>
        /// <returns>成功返回1 </失败返回-1returns>
        protected virtual int AddApplyData(string listCode, string state)
        {
            Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            ArrayList al = itemManager.QueryApplyIn(this.phaInManager.DeptInfo.ID, listCode, "0");

            if (al == null)
            {
                System.Windows.Forms.MessageBox.Show(Language.Msg("未正确获取外部入库申请信息" + itemManager.Err));
                return(-1);
            }

            this.Clear();

            Neusoft.FrameWork.Models.NeuObject applyCompany = new Neusoft.FrameWork.Models.NeuObject();

            foreach (Neusoft.HISFC.Models.Pharmacy.Input input in al)
            {
                Neusoft.HISFC.Models.Pharmacy.Item tempItem = itemManager.GetItem(input.Item.ID);

                input.Item     = tempItem;                           //药品实体信息
                input.Quantity = input.Operation.ApplyQty;

                if (this.AddDataToTable(input) == 1)
                {
                    this.hsInputData.Add(input.Item.ID + input.BatchNO, input);
                }

                applyCompany = input.Company;
            }

            Neusoft.HISFC.BizLogic.Pharmacy.Constant consManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
            Neusoft.HISFC.Models.Pharmacy.Company    compay      = consManager.QueryCompanyByCompanyID(applyCompany.ID);
            applyCompany.Name = compay.Name;
            applyCompany.Memo = "1";

            this.phaInManager.TargetDept = applyCompany;

            this.CompuateSum();

            this.SetFormat();

            return(1);
        }
Exemple #10
0
 /// <summary>
 /// 获取剂型
 /// </summary>
 /// <param name="drugCode"></param>
 /// <returns></returns>
 public static string GetStaticDosage(string drugCode)
 {
     if (hsDosage.ContainsKey(drugCode))
     {
         if (hsDosage[drugCode] != null)
         {
             return(hsDosage[drugCode].ToString());
         }
         else
         {
             return("");
         }
     }
     else
     {
         if (dosageHelper == null)
         {
             InitData();
         }
         Neusoft.HISFC.Models.Pharmacy.Item item = itemManager.GetItem(drugCode);
         hsDosage.Add(drugCode, dosageHelper.GetName(item.DosageForm.ID));
         return(dosageHelper.GetName(item.DosageForm.ID));
     }
 }
Exemple #11
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);
        }
Exemple #12
0
        /// <summary>
        /// 设置患者的医嘱信息
        /// </summary>
        /// <param name="inPatientNo"></param>
        public void SetPatientOrderListToCheck(string inPatientNo, ref ArrayList orderList)
        {
            orderList = this.orderManagement.QueryOrder(inPatientNo);
            if (orderList == null)
            {
                MessageBox.Show("获取【" + inPatientNo + "】的医嘱信息失败 " + this.orderManagement.Err);
                return;
            }

            int i = 0;

            foreach (object obj in orderList)
            {
                Neusoft.HISFC.Models.Order.Inpatient.Order order = obj as Neusoft.HISFC.Models.Order.Inpatient.Order;

                if (order == null)
                {
                    continue;
                }

                if (order.Status == 3)          //不显示作废/停止医嘱
                {
                    continue;
                }
                this.fpMedicine_Sheet1.Rows.Add(i, 1);

                #region 医嘱名称

                if (order.Item.Specs == null || order.Item.Specs.Trim() == "")
                {
                    this.fpMedicine_Sheet1.Cells[i, 2].Value = order.Item.Name;
                }
                else
                {
                    //加入商品名称  {fff989e6-8b66-4375-953b-d727ece2bd71} added by guoly
                    if (order.Item.GetType() == typeof(Neusoft.HISFC.Models.Pharmacy.Item))
                    {
                        Neusoft.HISFC.Models.Pharmacy.Item objitem = itemManager.GetItem(order.Item.ID);
                        this.fpMedicine_Sheet1.Cells[i, 2].Value = order.Item.Name + (string.IsNullOrEmpty(objitem.NameCollection.RegularName) == true ? "" : "(" + objitem.NameCollection.RegularName + ")") + "[" + order.Item.Specs + "]";
                    }
                    else
                    {
                        this.fpMedicine_Sheet1.Cells[i, 2].Value = order.Item.Name + "[" + order.Item.Specs + "]";
                    }
                }
                //医保用药
                if (order.IsPermission)
                {
                    this.fpMedicine_Sheet1.Cells[i, 2].Value = "√" + this.fpMedicine_Sheet1.Cells[i, 2].Value;
                }
                #endregion

                #region 医嘱类型
                this.fpMedicine_Sheet1.Cells[i, 1].Value = order.OrderType.Name;
                #endregion

                #region 每次量、单位、付数
                if (order.Item.GetType() == typeof(Neusoft.HISFC.Models.Pharmacy.Item))
                {
                    Neusoft.HISFC.Models.Pharmacy.Item objItem = order.Item as Neusoft.HISFC.Models.Pharmacy.Item;
                    this.fpMedicine_Sheet1.Cells[i, 7].Value = order.DoseOnce.ToString();
                    this.fpMedicine_Sheet1.Cells[i, 8].Value = objItem.DoseUnit;
                    this.fpMedicine_Sheet1.Cells[i, 9].Value = order.HerbalQty;
                    //row["主药"] = System.Convert.ToInt16(order.Combo.IsMainDrug);	//6
                }
                #endregion

                #region 其他
                this.fpMedicine_Sheet1.Cells[i, 5].Value = order.Qty;


                this.fpMedicine_Sheet1.Cells[i, 6].Value  = order.Unit;
                this.fpMedicine_Sheet1.Cells[i, 10].Value = order.Frequency.ID;
                this.fpMedicine_Sheet1.Cells[i, 11].Value = order.Frequency.Name;
                //row["用法编码"] = order.Usage.ID;
                this.fpMedicine_Sheet1.Cells[i, 12].Value = order.Usage.Name;
                this.fpMedicine_Sheet1.Cells[i, 13].Value = order.Item.SysClass.Name;
                this.fpMedicine_Sheet1.Cells[i, 14].Value = order.BeginTime;
                this.fpMedicine_Sheet1.Cells[i, 17].Value = order.ExeDept.Name;

                this.fpMedicine_Sheet1.Cells[i, 19].Value = order.CheckPartRecord;
                this.fpMedicine_Sheet1.Cells[i, 20].Value = order.Sample;
                //row["扣库科室编码"] = order.StockDept.ID;
                this.fpMedicine_Sheet1.Cells[i, 21].Value = deptHelper.GetName(order.StockDept.ID);

                this.fpMedicine_Sheet1.Cells[i, 4].Value = order.Memo;
                //row["录入人编码"] = order.Oper.ID;

                this.fpMedicine_Sheet1.Cells[i, 22].Value = order.Oper.Name;
                //if (order.ReciptDept.Name == "" && order.ReciptDept.ID != "") order.ReciptDept.Name = this.GetDeptName(order.ReciptDept);
                this.fpMedicine_Sheet1.Cells[i, 16].Value = order.ReciptDoctor.Name;
                this.fpMedicine_Sheet1.Cells[i, 23].Value = order.ReciptDept.Name;
                this.fpMedicine_Sheet1.Cells[i, 24].Value = order.MOTime.ToString();

                if (!order.EndTime.ToString().Contains("0001"))
                {
                    this.fpMedicine_Sheet1.Cells[i, 15].Value = order.EndTime;
                }

                this.fpMedicine_Sheet1.Cells[i, 25].Value = order.DCOper.Name;

                this.fpMedicine_Sheet1.Cells[i, 0].Value  = order.SortID;
                this.fpMedicine_Sheet1.Cells[i, 26].Value = order.HypoTest;



                //row["期效"] = System.Convert.ToInt16(order.OrderType.Type);			//0

                this.fpMedicine_Sheet1.Cells[i, 3].Value  = order.ID;           //3
                this.fpMedicine_Sheet1.Cells[i, 4].Value  = order.Status;       //12 新开立,审核,执行
                this.fpMedicine_Sheet1.Cells[i, 18].Value = order.Combo.ID;     //5
                #endregion
            }
        }
        /// <summary>
        /// 打印
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="neuObject"></param>
        /// <returns></returns>
        protected override int OnPrint(object sender, object neuObject)
        {
            //this.neuPanel7.Dock = DockStyle.Top;
            //int iHeight = 200;
            //DialogResult dr = MessageBox.Show("是否只打印选择的数据,选“否”则打印全部!", "打印提示", MessageBoxButtons.YesNoCancel);
            //if (dr == DialogResult.Yes)
            //{
            //    for (int i = 0; i < this.fpDrugList.RowCount; i++)
            //    {
            //        if (this.fpDrugList.IsSelected(i, 0) == false)
            //        {
            //            this.fpDrugList.Rows[i].Visible = false;
            //        }
            //        iHeight = iHeight + 20;
            //    }
            //}
            //else if (dr == DialogResult.No)
            //{
            //    for (int i = 0; i < this.fpDrugList.RowCount; i++)
            //    {
            //        iHeight = iHeight + 20;
            //    }
            //}
            //else
            //{
            //    return 1;
            //}

            //this.neuPanel7.Height = iHeight;
            //Neusoft.FrameWork.WinForms.Classes.Print printObj = new Neusoft.FrameWork.WinForms.Classes.Print();
            //Neusoft.HISFC.Models.Base.PageSize ps = new Neusoft.HISFC.Models.Base.PageSize("", this.neuPanel7.Width, iHeight);
            //printObj.SetPageSize(ps);
            //printObj.IsDataAutoExtend = false;
            //printObj.PrintPreview(10, 10, this.neuPanel7);
            //this.neuPanel7.Dock = DockStyle.Fill;
            //return base.OnPrint(sender, neuObject);
            //if (this.lbTitle.Text == "明细")
            //{

            #region donggq--20101123--{CA546AEB-3968-48ea-9CAE-D03832216326}

            if (string.IsNullOrEmpty(this.txtCaseNO.Text) && string.IsNullOrEmpty(this.txtFilter.Text))
            {
                if (this.printInterface == null)
                {
                    InitPrintInterface();
                }
                ArrayList drugList = null;
                this.billClass.User01 = "NurseType"; //{31607136-EF3D-46af-A2F9-EE96F6F9209C}
                if (this.rbRetail.Checked)           //{CC985758-A2AE-41da-9394-34AFCEB0E30E}
                {
                    drugList = this.drugItem.QueryApplyOutListDetailByBillClassCode(this.tvSelectType.SelectedNode.Tag.ToString(),
                                                                                    this.tvSelectType.SelectedNode.Parent.Tag.ToString(), this.dtpStartDate.Value.Date.ToString(), this.dtpEndDate.Value.Date.AddDays(1).ToString(), "2");
                    this.billClass.PrintType.ID = "D";
                }
                else if (this.rbTotal.Checked)
                {
                    drugList = this.drugItem.QueryApplyOutListTotByBillClassCode(this.tvSelectType.SelectedNode.Tag.ToString(),
                                                                                 this.tvSelectType.SelectedNode.Parent.Tag.ToString(), this.dtpStartDate.Value.Date.ToString(), this.dtpEndDate.Value.Date.AddDays(1).ToString(), "2");
                    this.billClass.PrintType.ID = "T";
                }

                if (drugList != null)
                {
                    foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut outObj in drugList)
                    {
                        Neusoft.HISFC.Models.Pharmacy.Storage storage = drugItem.GetStockInfoByDrugCode(outObj.StockDept.Name, outObj.Item.ID);
                        Neusoft.HISFC.Models.Pharmacy.Item    itemObj = drugItem.GetItem(outObj.Item.ID);
                        outObj.PlaceNO       = storage.PlaceNO;
                        outObj.Item.UserCode = itemObj.UserCode;
                    }
                    if (this.printInterface != null)
                    {
                        this.printInterface.AddAllData(drugList, this.billClass);
                        this.printInterface.Preview();
                    }
                }
            }
            else
            {
                Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();

                p.PrintPage(0, 30, this.neuPanel7);
            }

            #endregion
            //}
            return(1);
        }
        /// <summary>
        /// 设置患者的医嘱信息
        /// </summary>
        /// <param name="inPatientNo"></param>
        public void SetPatientOrderListToCheck(string inPatientNo, ref ArrayList orderList)
        {
            orderList = this.orderManagement.QueryOrder(inPatientNo);
            if (orderList == null)
            {
                MessageBox.Show("获取【" + inPatientNo + "】的医嘱信息失败 " + this.orderManagement.Err);
                return;
            }

            int j = 1;

            foreach (object obj in orderList)
            {
                Neusoft.HISFC.Models.Order.Inpatient.Order order = obj as Neusoft.HISFC.Models.Order.Inpatient.Order;

                if (order == null)
                {
                    continue;
                }

                if (order.Status != 3 && order.Status != 2)             //显示作废/停止/执行医嘱
                {
                    continue;
                }
                DataRow dr = dt.NewRow();

                #region 显示医嘱内容
                dr["序号"] = j++;
                #region 医嘱名称

                if (order.Item.Specs == null || order.Item.Specs.Trim() == "")
                {
                    dr["内容"] = order.Item.Name;
                }
                else
                {
                    //加入商品名称  {fff989e6-8b66-4375-953b-d727ece2bd71} added by guoly
                    if (order.Item.GetType() == typeof(Neusoft.HISFC.Models.Pharmacy.Item))
                    {
                        Neusoft.HISFC.Models.Pharmacy.Item objitem = itemManager.GetItem(order.Item.ID);
                        dr["内容"] = order.Item.Name + (string.IsNullOrEmpty(objitem.NameCollection.RegularName) == true ? "" : "(" + objitem.NameCollection.RegularName + ")") + "[" + order.Item.Specs + "]";
                    }
                    else
                    {
                        dr["内容"] = order.Item.Name + "[" + order.Item.Specs + "]";
                    }
                }
                //医保用药
                if (order.IsPermission)
                {
                    dr["内容"] = "√" + dr["内容"];
                }
                #endregion
                dr["医嘱类型"] = order.OrderType.Name;
                dr["流水号"]  = order.ID;
                dr["医嘱组号"] = order.Combo.ID;
                dr["医师编码"] = order.ReciptDoctor.ID;
                dr["医师姓名"] = order.ReciptDoctor.Name;
                if (order.Status == 3)
                {
                    dr["终止医师编码"] = order.DCOper.ID;
                    dr["终止医师姓名"] = order.DCOper.Name;
                    dr["终止日期"]   = order.DCOper.OperTime.ToLongDateString();
                }
                dr["起始日期"] = order.BeginTime.ToLongDateString();
                dr["科室编码"] = order.ExeDept.ID;
                dr["科室名称"] = order.ExeDept.Name;
                //床位为空
                //上传日期为空
                dr["发生时间"] = order.MOTime.ToLongDateString();
                #endregion
                dt.Rows.Add(dr);
            }
            dataGridView1.DataSource = dt;
            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                if (!string.IsNullOrEmpty(dataGridView1.Rows[i].Cells["终止医师编码"].Value.ToString()))
                {
                    dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Red;
                }
            }
        }