コード例 #1
0
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="item">需添加的药品信息</param>
        /// <returns>成功返回1 失败返回-1</returns>
        private int AddData(Neusoft.HISFC.Models.Pharmacy.Item item)
        {
            try
            {
                string[] keys = new string[] { item.ID };
                if (this.dt.Rows.Find(keys) != null)
                {
                    MessageBox.Show(Language.Msg(item.Name + "已添加到模版内"));
                    this.SetFocus(false);
                    return(-1);
                }
                Neusoft.HISFC.Models.Pharmacy.DrugStencil drugStencil = new Neusoft.HISFC.Models.Pharmacy.DrugStencil();
                drugStencil.Dept        = this.privDept;
                drugStencil.OpenType.ID = this.stencilTypeID;
                drugStencil.Item        = item;

                this.dt.Rows.Add(this.GetDataRow(drugStencil));

                this.SetFocus(true);
            }
            catch (Exception ex)
            {
                MessageBox.Show(Language.Msg(ex.Message));
                return(-1);
            }

            return(1);
        }
コード例 #2
0
        /// <summary>
        /// 查询全部数据
        /// </summary>
        private void QueryAll()
        {
            this.dtOrderDrugLimit.Clear();
            this.alDrugLimit = this.specialLimitManager.QueryPharmacyLimit();
            if (alDrugLimit != null || this.alDrugLimit.Count > 0)
            {
                foreach (Neusoft.HISFC.Models.Order.PharmacyLimit obj in alDrugLimit)
                {
                    Neusoft.HISFC.Models.Pharmacy.Item item = null;
                    item = this.pharmacyManager.GetItem(obj.ID);

                    DataRow row = this.dtOrderDrugLimit.NewRow();
                    row["药品编码"]      = obj.ID;
                    row["药品名称"]      = item.Name;
                    row["是否需上级医生审核"] = obj.IsLeaderCheck;
                    row["是否需手工处方"]   = obj.IsNeedRecipe;
                    row["有效标记"]      = obj.IsValid;
                    row["备注"]        = obj.Remark;
                    row["操作员"]       = obj.Oper.ID;
                    row["操作时间"]      = obj.Oper.OperTime;

                    this.dtOrderDrugLimit.Rows.Add(row);
                }
            }
            this.dtOrderDrugLimit.AcceptChanges();
        }
コード例 #3
0
ファイル: ucSpeDrug.cs プロジェクト: ewin66/Management-System
        /// <summary>
        /// 项目信息加入
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public int AddItem(Neusoft.HISFC.Models.Pharmacy.Item item)
        {
            int iIndex = this.ActiveSv.Rows.Count;

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

            Neusoft.HISFC.Models.Pharmacy.DrugSpecial drugSpe = new Neusoft.HISFC.Models.Pharmacy.DrugSpecial();
            if (this.ActiveSv == this.fpDeptSheet)
            {
                drugSpe.SpeType = Neusoft.HISFC.Models.Pharmacy.EnumDrugSpecialType.Dept;
            }
            else
            {
                drugSpe.SpeType = Neusoft.HISFC.Models.Pharmacy.EnumDrugSpecialType.Doc;
            }

            drugSpe.Item = item;

            this.ActiveSv.Cells[iIndex, 0].Text = item.Name;
            this.ActiveSv.Cells[iIndex, 1].Text = item.Specs;
            this.ActiveSv.Cells[iIndex, 0].Tag  = "New";
            this.ActiveSv.Rows[iIndex].Tag      = drugSpe;

            return(1);
        }
コード例 #4
0
        /// <summary>
        /// 生成中草药处方
        /// </summary>
        /// <param name="alTmp"></param>
        private void SetPccRecipe(ArrayList alTmp)
        {
            view.RemoveRows(0, view.RowCount);
            view.AddRows(0, alTmp.Count);

            Neusoft.HISFC.Models.Order.OutPatient.Order orderInfo = null;
            decimal money = 0m;

            for (int row = 0, count = 0; count < alTmp.Count; row++, count += pccPerRowCount)
            {
                for (int perCol = 0; perCol < pccPerRowCount; perCol++)
                {
                    if (row * pccPerRowCount + perCol > alTmp.Count - 1)
                    {
                        break;
                    }
                    orderInfo = new Neusoft.HISFC.Models.Order.OutPatient.Order();
                    orderInfo = alTmp[row * pccPerRowCount + perCol] as Neusoft.HISFC.Models.Order.OutPatient.Order;

                    //不打印NULL和已经退费的
                    if (orderInfo == null || orderInfo.Qty == 0)
                    {
                        continue;
                    }


                    this.view.Cells[row, perCol * 11 + (int)Columns.drugName].Text   = orderInfo.Item.Name;
                    this.view.Cells[row, perCol * 11 + (int)Columns.specs].Text      = orderInfo.Item.Specs;
                    this.view.Cells[row, perCol * 11 + (int)Columns.comboNO].Text    = orderInfo.Combo.ID;
                    this.view.Cells[row, perCol * 11 + (int)Columns.hearbalQty].Text = orderInfo.HerbalQty.ToString();
                    this.view.Cells[row, perCol * 11 + (int)Columns.doseOnce].Text   = orderInfo.DoseOnce.ToString() + orderInfo.DoseUnit;
                    this.view.Cells[row, perCol * 11 + (int)Columns.frequence].Text  = orderInfo.Frequency.Name;
                    this.view.Cells[row, perCol * 11 + (int)Columns.usage].Text      = orderInfo.Usage.Name;
                    Neusoft.HISFC.Models.Pharmacy.Item phaItem = phaManagement.GetItem(orderInfo.Item.ID);
                    if (orderInfo.NurseStation.User03 == "1")
                    {
                        this.view.Cells[row, perCol * 11 + (int)Columns.totQty].Text = orderInfo.Qty.ToString() + orderInfo.Unit;
                    }
                    else
                    {
                        this.view.Cells[row, perCol * 11 + (int)Columns.totQty].Text = Convert.ToString(orderInfo.Qty * orderInfo.Item.PackQty) + phaItem.MinUnit;
                    }

                    this.view.Cells[row, perCol * 11 + (int)Columns.injectCount].Text = orderInfo.InjectCount.ToString();
                    this.view.Cells[row, perCol * 11 + (int)Columns.memo].Text        = orderInfo.Memo;

                    money += orderInfo.FT.OwnCost;
                }
            }

            if (orderInfo != null)
            {
                this.lblUsage.Text     = orderInfo.Usage.Name;
                this.lblFrequency.Text = orderInfo.Frequency.Name;
                this.lblTotQty.Text    = orderInfo.HerbalQty.ToString();
                this.lblIsProxy.Text   = orderInfo.Memo;
                this.lblSumMoney.Text  = money.ToString();
                this.lblRecipeNO.Text  = orderInfo.ReciptNO;
            }
        }
コード例 #5
0
        /// <summary>
        /// 向FarPoint内加入数据

        /// </summary>
        /// <param name="item">药品实体</param>
        public void AddData(Neusoft.HISFC.Models.Pharmacy.Item item)
        {
            if (item == null)
            {
                return;
            }
            int iRow = this.fpSpread1_Sheet1.Rows.Count;

            this.fpSpread1_Sheet1.Rows.Add(iRow, 1);
            this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColTradeName].Text = item.Name;
            this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColSpecs].Text     = item.Specs;
            if (item.PackQty == 0)
            {
                item.PackQty = 1;
            }
            if (item.Type.ID == "C")
            {
                this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColPrice].Text = System.Math.Round((item.PriceCollection.RetailPrice / item.PackQty), 4).ToString();
            }
            else
            {
                this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColPrice].Text = System.Math.Round((item.PriceCollection.RetailPrice / item.PackQty), 2).ToString();
            }
            this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColUnit].Text = item.MinUnit;
            this.fpSpread1_Sheet1.Rows[iRow].Tag = item;
        }
コード例 #6
0
        /// <summary>
        /// 计算总量
        /// </summary>
        public void Count()
        {
            decimal retailPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.ActiveRowIndex, (int)ColEnum.ColPrice].Text);
            decimal num         = 0;

            try
            {
                num = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.ActiveRowIndex, (int)ColEnum.ColNum].Text);
            }
            catch
            {
                this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.ActiveRowIndex, (int)ColEnum.ColNum].Text = "0";
                num = 0;
            }

            Neusoft.HISFC.Models.Pharmacy.Item item = this.fpSpread1_Sheet1.Rows[this.fpSpread1_Sheet1.ActiveRowIndex].Tag as Neusoft.HISFC.Models.Pharmacy.Item;

            if (item != null)
            {
                if (this.isClinic && item.SplitType.Equals(0))
                {
                    this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.ActiveRowIndex, (int)ColEnum.ColCost].Text = (num * retailPrice).ToString();
                }
                else
                {
                    //this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.ActiveRowIndex, (int)ColEnum.ColCost].Text = (num / item.PackQty * retailPrice).ToString();
                    this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.ActiveRowIndex, (int)ColEnum.ColCost].Text = (num * retailPrice).ToString();
                }
            }

            this.Sum();
        }
コード例 #7
0
        /// <summary>
        /// 计算总量
        /// </summary>
        /// <param name="order"></param>
        /// <returns>0 成功 -1失败</returns>
        public static int CalTotal(Neusoft.HISFC.Models.Order.Inpatient.Order order, int days)
        {
            Neusoft.HISFC.Models.Pharmacy.Item item = order.Item as Neusoft.HISFC.Models.Pharmacy.Item;
            #region 获得时间点
            if (order.Frequency.Usage.ID == "")
            {
                order.Frequency.Usage = order.Usage.Clone();
            }
            //***************获得频次时间点(每天多少次)******************
            if (days == 0)
            {
                days = 1;
            }
            #endregion
            if (item.OnceDose == 0M)//一次剂量为零,默认显示基本剂量
            {
                order.Qty = order.Frequency.Times.Length * days;
            }
            else
            {
                order.Qty = item.OnceDose / item.BaseDose * order.Frequency.Times.Length * days;
            }

            return(0);
        }
コード例 #8
0
        private void GetRecipeLabelItem(string drugDept, string drugCode, ref Neusoft.HISFC.Models.Pharmacy.Item item)
        {
            Neusoft.FrameWork.Management.DataBaseManger dataBaseMgr = new Neusoft.FrameWork.Management.DataBaseManger();
            string strSql = @"select t.trade_name,t.regular_name,t.formal_name,t.other_name,
       t.english_regular,t.english_other,t.english_name,t.caution,t.store_condition,t.base_dose,s.place_code,
	   t.custom_code
from   pha_com_baseinfo t,pha_com_stockinfo s
where  t.drug_code = s.drug_code
and    s.drug_dept_code = '{0}'
and    s.drug_code = '{1}'";

            strSql = string.Format(strSql, drugDept, drugCode);
            if (dataBaseMgr.ExecQuery(strSql) != -1)
            {
                if (dataBaseMgr.Reader.Read())
                {
                    item.Name = dataBaseMgr.Reader[0].ToString();
                    item.NameCollection.RegularName        = dataBaseMgr.Reader[1].ToString();
                    item.NameCollection.FormalName         = dataBaseMgr.Reader[2].ToString();
                    item.NameCollection.OtherName          = dataBaseMgr.Reader[3].ToString();
                    item.NameCollection.EnglishRegularName = dataBaseMgr.Reader[4].ToString();
                    item.NameCollection.EnglishOtherName   = dataBaseMgr.Reader[5].ToString();
                    item.NameCollection.EnglishName        = dataBaseMgr.Reader[6].ToString();
                    item.Product.Caution        = dataBaseMgr.Reader[7].ToString();
                    item.Product.StoreCondition = dataBaseMgr.Reader[8].ToString();
                    item.BaseDose = Neusoft.FrameWork.Function.NConvert.ToDecimal(dataBaseMgr.Reader[9].ToString());
                    item.User01   = dataBaseMgr.Reader[10].ToString();
                    item.NameCollection.UserCode = dataBaseMgr.Reader[11].ToString();
                }
            }
        }
コード例 #9
0
 /// <summary>
 /// 列表选择触发的事件
 /// </summary>
 /// <param name="sv">视图</param>
 /// <param name="activeRow">选择的行</param>
 private void ucDrugList1_ChooseDataEvent(FarPoint.Win.Spread.SheetView sv, int activeRow)
 {
     if (this.neuSpread1.ActiveSheetIndex != 0)
     {
         this.neuSpread1.ActiveSheetIndex = 0;
     }
     if (sv != null && activeRow >= 0)
     {
         this.currentView = sv;
         this.currentRow  = activeRow;
         string drugID;
         drugID = sv.Cells[activeRow, 0].Value.ToString();
         //取药品字典信息
         Neusoft.HISFC.Models.Pharmacy.Item drugItem = this.drugManager.GetItem(drugID);
         if (drugItem != null)
         {
             //添加数据
             this.AddRow(drugItem, 0);
         }
         else
         {
             MessageBox.Show(Language.Msg("检索药品基本信息失败"));
         }
     }
 }
コード例 #10
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();
        }
コード例 #11
0
 /// <summary>
 /// 打印单个药品
 /// </summary>
 /// <param name="applyOut"></param>
 public void AddSingle(Neusoft.HISFC.Models.Pharmacy.ApplyOut applyOut)
 {
     //this.Clear();
     Neusoft.HISFC.Models.Pharmacy.Item item = applyOut.Item;
     this.GetRecipeLabelItem(applyOut.StockDept.ID, applyOut.Item.ID, ref item);
     //设置患者信息显示、发药信息
     this.SetPatiAndSendInfo(applyOut);
     //退改药标志
     this.fpSpread1_Sheet1.AddRows(this.fpSpread1_Sheet1.Rows.Count, 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.Rows[this.fpSpread1_Sheet1.Rows.Count - 2].Font     = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, 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 = applyOut.Usage.Name.ToString();
     this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 2].Text = applyOut.Operation.ApplyQty.ToString() + applyOut.Item.MinUnit;
     if (applyOut.PlaceNO != null)
     {
         this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 3].Text = applyOut.PlaceNO.ToString();
     }
     this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 4].Text = applyOut.Item.Price.ToString();
     this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.Rows.Count - 2, 5].Text = "80%";
     TotCost += applyOut.Operation.ApplyQty * applyOut.Item.Price;
     this.lblTotCost.Text = TotCost.ToString();
 }
コード例 #12
0
        /// <summary>
        /// 协定处方明细数据显示
        /// </summary>
        /// <param name="rowIndex">当前行索引</param>
        /// <param name="selectNostrum">当前协定处方信息</param>
        protected void ShowNostrumDetail(int rowIndex, Neusoft.HISFC.Models.Pharmacy.Item selectNostrum)
        {
            List <Neusoft.HISFC.Models.Pharmacy.Nostrum> detailNostrumList = this.fpPackageList_Sheet1.Cells[rowIndex, (int)ColPackageList.ColDetail].Tag as List <Neusoft.HISFC.Models.Pharmacy.Nostrum>;

            if (detailNostrumList == null)
            {
                detailNostrumList = this.itemManager.QueryNostrumDetail(selectNostrum.ID);
            }

            this.lbNostrumInfo.Text = "协定处方";

            if (detailNostrumList != null)
            {
                int    index          = 1;
                string strDetailName  = "";
                string strDetail      = "";
                string strDisplayName = "协定处方:{0}  规格:{1}  处方构成明细:{2}";

                foreach (Neusoft.HISFC.Models.Pharmacy.Nostrum info in detailNostrumList)
                {
                    strDetail += index.ToString() + ")  ";

                    strDetailName += info.Item.Name + ",";

                    strDetail += info.Item.Name + " " + info.Item.Specs + " " + info.Qty.ToString() + "    ";

                    index++;
                }

                this.fpPackageList_Sheet1.Cells[rowIndex, (int)ColPackageList.ColDetail].Text = strDetailName;
                this.fpPackageList_Sheet1.Cells[rowIndex, (int)ColPackageList.ColDetail].Tag  = detailNostrumList;

                this.lbNostrumInfo.Text = string.Format(strDisplayName, selectNostrum.Name, selectNostrum.Specs, strDetail);
            }
        }
コード例 #13
0
        /// <summary>
        /// 打印单个药品
        /// </summary>
        /// <param name="applyOut"></param>
        public void AddSingle(Neusoft.HISFC.Models.Pharmacy.ApplyOut applyOut)
        {
            this.Clear();
            Neusoft.HISFC.Models.Pharmacy.Item item = applyOut.Item;
            this.GetRecipeLabelItem(applyOut.StockDept.ID, applyOut.Item.ID, ref item);
            //设置患者信息显示、发药信息
            this.SetPatiAndSendInfo(applyOut);
            //设置处方内发药药品信息
            this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin, 0].ColumnSpan = 3;
            //退改药标志
            if (applyOut.ValidState == Neusoft.HISFC.Models.Base.EnumValidState.Extend)
            {
                this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin, 0].Text = "[改] " + applyOut.Item.Name + "[" + applyOut.Item.Specs + "]"; //名称
            }
            else
            {
                this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin, 0].Text = applyOut.Item.Name + "[" + applyOut.Item.Specs + "]";           //名称
            }
            this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin, 3].Text     = applyOut.Operation.ApplyQty.ToString() + applyOut.Item.MinUnit; //申请量、单位
            this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 1, 0].Text = applyOut.Item.NameCollection.RegularName;                       //名称
            if (applyOut.ExecNO.ToString() != "" && applyOut.ExecNO.ToString() != "0")
            {
                this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 1, 2].Text = "院注" + applyOut.ExecNO.ToString() + "次";
            }

            this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 2, 0].Text = this.usageHelper.GetName(applyOut.Usage.ID);                                           //用法

            //屏蔽代码
            //			this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 2,1].Text = "每次" + applyOut.DoseOnce.ToString() + applyOut.Item.DoseUnit;	//每次量
            //			this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 2,2].Text = "  " + this.frequencyHelper.GetName(applyOut.Frequency.ID);		//频次

            this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 2, 1].Text = "  " + this.frequencyHelper.GetName(applyOut.Frequency.ID);            //频次
            //对注射剂每次量 显示剂量单位
            //string str = applyOut.Item.NameCollection.UserCode;
            //if (str != null && str.Length > 3 && (str.Substring(0, 3) == "002" || str.Substring(0, 3) == "003" || str.Substring(0, 3) == "004"))
            //    this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 2, 2].Text = "每次" + applyOut.DoseOnce.ToString() + applyOut.Item.DoseUnit;	//每次量
            //else
            //    this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 2, 2].Text = "每次" + this.DoseToMin(applyOut.DoseOnce, applyOut.Item.BaseDose).ToString() + applyOut.Item.MinUnit;	//每次量

            this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 2, 2].Text = "每次" + applyOut.DoseOnce.ToString() + applyOut.Item.DoseUnit;  //每次量

            //用法包含'适量'字样的药品不打印每次量
            if (this.usageHelper.GetObjectFromID(applyOut.Usage.ID) != null)
            {
                if (this.usageHelper.GetName(applyOut.Usage.ID).IndexOf("适量") != -1)
                {
                    this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 2, 2].Text = "";
                }
            }

            this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 3, 1].Text = applyOut.Item.Product.Caution;                                                         //注意事项
            //默认不显示存储
            //			if (applyOut.Item.StoreCondition == "")
            //				applyOut.Item.StoreCondition = "常温存储";
            //			this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 4,1].Text = applyOut.Item.StoreCondition;						//存储条件
            this.neuSpread1_Sheet1.Cells[(int)RowSet.RowDrugBegin + 4, 1].Text = "";

            this.labelNum = this.labelNum + 1;
        }
コード例 #14
0
        ///<summary>
        ///根据药品警戒线加入数据
        ///</summary>
        ///<param name="alterFlag">生成方式 0 警戒线 1 日消耗</param>
        ///<param name="deptCode">库房编码</param>
        ///<returns>成功返回0,失败返回-1</returns>
        public void FindByAlter(string alterFlag, string deptCode)
        {
            if (this.hsApplyData.Count > 0)
            {
                DialogResult result;
                result = MessageBox.Show("按警戒线生成将清除当前内容,是否继续", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1,
                                         MessageBoxOptions.RightAlign);
                if (result == DialogResult.No)
                {
                    return;
                }
            }

            try
            {
                this.Clear();

                ArrayList alDetail = new ArrayList();
                if (alterFlag == "1")
                {
                    #region 弹出窗口 设置日消耗参数 计算需申请信息
                    using (HISFC.Components.Pharmacy.ucPhaAlter uc = new ucPhaAlter())
                    {
                        uc.DeptCode = deptCode;
                        uc.SetData();
                        uc.Focus();
                        Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(uc);

                        if (uc.ApplyInfo != null)
                        {
                            alDetail = uc.ApplyInfo;
                        }
                    }
                    #endregion
                }
                else
                {
                    //{F4D82F23-CCDC-45a6-86A1-95D41EF856B8} 更改调用函数
                    alDetail = this.itemManager.QueryDrugListByNumAlter(deptCode);
                    if (alDetail == null)
                    {
                        MessageBox.Show(Language.Msg("按照数量警戒线执行信息计算未正确执行\n" + this.itemManager.Err));
                        return;
                    }
                }

                Neusoft.HISFC.Models.Pharmacy.Item item = new Neusoft.HISFC.Models.Pharmacy.Item();
                foreach (Neusoft.FrameWork.Models.NeuObject temp in alDetail)
                {
                    this.AddDrugData(temp.ID, null, NConvert.ToDecimal(temp.User03));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Language.Msg(ex.Message));
            }
        }
コード例 #15
0
        /// <summary>
        /// 添加明细到farpoint
        /// </summary>
        /// <param name="detail"></param>
        /// <returns></returns>
        private int AddDetailToFP(Neusoft.HISFC.Models.Fee.ComGroupTail detail)
        {
            neuSpread1_Sheet1.Rows.Add(neuSpread1_Sheet1.Rows.Count, 1);
            int row = neuSpread1_Sheet1.Rows.Count - 1;

            if (detail.drugFlag == "1")
            {
                //药品进销存管理类
                //Neusoft.HISFC.BizLogic.Pharmacy.Item drugManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
                //根据药品编码获得某一药品信息
                Neusoft.HISFC.Models.Pharmacy.Item drug = this.pharmacyIntegrate.GetItem(detail.itemCode);
                if (drug == null)//没找到
                {
                    drug      = new Neusoft.HISFC.Models.Pharmacy.Item();
                    drug.Name = "帐目表中无该项目";
                }
                //如果规格不为空
                if (drug.Specs != null && drug.Specs != "")
                {
                    drug.Name = drug.Name + "{" + drug.Specs + "}";
                }

                neuSpread1_Sheet1.SetValue(row, (int)Cols.ItemName, drug.Name, false);  //项目名称
                neuSpread1_Sheet1.SetValue(row, (int)Cols.Price, drug.Price, false);    //价格
                neuSpread1_Sheet1.SetValue(row, (int)Cols.Unit, drug.PriceUnit, false); //单位
            }
            else
            {
                //Neusoft.HISFC.BizLogic.Fee.Item undrugManager = new Neusoft.HISFC.BizLogic.Fee.Item();


                Neusoft.HISFC.Models.Fee.Item.Undrug undrug = this.feeIntegrate.GetUndrugByCode(detail.itemCode);
                if (undrug == null)
                {//没找到
                    undrug      = new Neusoft.HISFC.Models.Fee.Item.Undrug();
                    undrug.Name = "帐目表中无该项目";
                }
                neuSpread1_Sheet1.SetValue(row, (int)Cols.ItemName, undrug.Name, false);  //项目名称
                neuSpread1_Sheet1.SetValue(row, (int)Cols.Price, undrug.Price, false);    //价格
                neuSpread1_Sheet1.SetValue(row, (int)Cols.Unit, undrug.PriceUnit, false); //单位
            }

            //项目代码
            neuSpread1_Sheet1.SetTag(row, (int)Cols.ItemName, detail.itemCode);

            neuSpread1_Sheet1.SetValue(row, (int)Cols.Qty, detail.qty, false);                      //数量
            neuSpread1_Sheet1.SetValue(row, (int)Cols.Dept, detail.deptName, false);                //执行科室
            neuSpread1_Sheet1.SetTag(row, (int)Cols.Dept, detail.deptCode);                         //执行科室代码

            neuSpread1_Sheet1.SetValue(row, (int)Cols.Combo, detail.combNo, false);                 //组合号
            neuSpread1_Sheet1.SetValue(row, (int)Cols.Memo, detail.reMark, false);                  //备注
            neuSpread1_Sheet1.SetValue(row, (int)Cols.OperCode, detail.operCode, false);            //操作员
            neuSpread1_Sheet1.SetValue(row, (int)Cols.OperDate, detail.OperDate.ToString(), false); //操作时间
            neuSpread1_Sheet1.SetValue(row, (int)Cols.SortId, (decimal)detail.SortNum, false);      //序号
            neuSpread1_Sheet1.Rows[row].Tag = detail;
            return(0);
        }
コード例 #16
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;
     }
 }
コード例 #17
0
ファイル: ucProduct.cs プロジェクト: ewin66/Management-System
        private void fsDrug_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
        {
            Neusoft.HISFC.Models.Pharmacy.Item item = this.fsDrug_Sheet1.Rows[this.fsDrug_Sheet1.ActiveRowIndex].Tag as Neusoft.HISFC.Models.Pharmacy.Item;

            if (this.ShowPrescriptionEvent != null)
            {
                this.ShowPrescriptionEvent(item, System.EventArgs.Empty);
            }
        }
コード例 #18
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   al    = new Neusoft.HISFC.Models.Pharmacy.Item();
            al = Pitem.GetItem(strCode);
            this.neutext.Text = al.Product.Manual;
        }
コード例 #19
0
        private void fpPackageList_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
        {
            Neusoft.HISFC.Models.Pharmacy.Item selectNostrum = this.fpPackageList_Sheet1.Rows[this.fpPackageList_Sheet1.ActiveRowIndex].Tag as Neusoft.HISFC.Models.Pharmacy.Item;

            if (selectNostrum != null)
            {
                this.ShowNostrumDetail(this.fpPackageList_Sheet1.ActiveRowIndex, selectNostrum);
            }
        }
コード例 #20
0
 private int GetItemInfo()
 {
     if (this.neuTabControl1.SelectedTab == this.tabPage1)
     {
         Hashtable myhashtable = new Hashtable();
         for (int a = 0; a < this.neuSpread1_Sheet1.RowCount; a++)
         {
             if (Neusoft.FrameWork.Function.NConvert.ToBoolean(this.neuSpread1_Sheet1.Cells[a, 0].Value) == true)
             {
                 string strDrugStoreName = this.neuSpread1_Sheet1.Cells[a, 21].Text;
                 if (!myhashtable.ContainsKey(strDrugStoreName))
                 {
                     myhashtable.Add(strDrugStoreName, strDrugStoreName);
                 }
             }
         }
         if (myhashtable.Count > 1)
         {
             System.Windows.Forms.MessageBox.Show("您选择了多个药房的药品,请认真核对打印药方!");
             return(-1);
         }
         this.alExeOrder = new ArrayList();
         for (int i = 0; i < this.neuSpread1_Sheet1.RowCount; i++)
         {
             if (Neusoft.FrameWork.Function.NConvert.ToBoolean(this.neuSpread1_Sheet1.Cells[i, 0].Value) == true)
             {
                 if (this.neuSpread1_Sheet1.Cells[i, 2].Text == "长期医嘱")
                 {
                     System.Windows.Forms.MessageBox.Show("您在第【" + (i + 1).ToString() + " 】行选择了长期医嘱,请选择临时医嘱打印药方!");
                     return(-1);
                 }
                 if (this.neuSpread1_Sheet1.Cells[i, 21].Text == this.neuSpread1_Sheet1.Cells[i, 21].Text)
                 {
                 }
                 try
                 {
                     this.myExeOrder = new Neusoft.HISFC.Models.Order.ExecOrder();
                     Neusoft.HISFC.Models.Pharmacy.Item objPharmacy = new Neusoft.HISFC.Models.Pharmacy.Item();
                     objPharmacy.ID             = this.neuSpread1_Sheet1.Cells[i, 39].Text;                                                //药品编码
                     objPharmacy.Name           = this.neuSpread1_Sheet1.Cells[i, 5].Text;                                                 //药品名称
                     objPharmacy.Specs          = this.neuSpread1_Sheet1.Cells[i, 6].Text;                                                 //药品规格
                     objPharmacy.Memo           = this.neuSpread1_Sheet1.Cells[i, 21].Text;                                                //取药药房
                     this.myExeOrder.Order.Item = objPharmacy;                                                                             //执行档项目
                     this.myExeOrder.Order.Qty  = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[i, 7].Value); //药品数量
                     this.myExeOrder.Order.Unit = this.neuSpread1_Sheet1.Cells[i, 8].Text;                                                 //药品单位
                     this.alExeOrder.Add(this.myExeOrder);
                 }
                 catch (Exception ex)
                 {
                     return(-1);
                 }
             }
         }
     }
     return(1);
 }
コード例 #21
0
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="drugCode">需添加的药品编码</param>
        /// <returns>成功返回1 失败返回-1</returns>
        private int AddData(string drugNO)
        {
            Neusoft.HISFC.Models.Pharmacy.Item itemTemp = this.itemManager.GetItem(drugNO);
            if (itemTemp == null)
            {
                return(-1);
            }

            return(this.AddData(itemTemp));
        }
コード例 #22
0
        public void SetExecOrder(System.Collections.ArrayList alExecOrder)
        {
            this.neuSpread1_Sheet1.Rows.Count = 0;

            System.Collections.Hashtable hsPatientName      = new System.Collections.Hashtable();
            System.Collections.Hashtable hsPatientOrderItem = new System.Collections.Hashtable();
            foreach (Neusoft.HISFC.Models.Order.ExecOrder info in alExecOrder)
            {
                string patientName = "";
                if (hsPatientName.ContainsKey(info.Order.Patient.ID))
                {
                    patientName = hsPatientName[info.Order.Patient.ID] as string;
                }
                else
                {
                    Neusoft.HISFC.BizProcess.Integrate.RADT radtIntegrate = new Neusoft.HISFC.BizProcess.Integrate.RADT();
                    Neusoft.HISFC.Models.RADT.PatientInfo   p             = radtIntegrate.GetPatientInfoByPatientNO(info.Order.Patient.ID);

                    patientName = p.PVisit.PatientLocation.Bed.ID + p.Name;

                    hsPatientName.Add(p.ID, patientName);
                }

                if (hsPatientOrderItem.ContainsKey(info.Order.Patient.ID + info.Order.Item.ID))
                {
                    Neusoft.HISFC.Models.Order.ExecOrder execOrder = hsPatientOrderItem[info.Order.Patient.ID + info.Order.Item.ID] as Neusoft.HISFC.Models.Order.ExecOrder;

                    execOrder.Order.Qty = execOrder.Order.Qty + info.Order.Qty;
                }
                else
                {
                    Neusoft.HISFC.Models.Order.ExecOrder execOrder = info.Clone();
                    execOrder.Order.Patient.Name = patientName;

                    hsPatientOrderItem.Add(execOrder.Order.Patient.ID + info.Order.Item.ID, execOrder);
                }
            }

            int iRow = 0;

            foreach (Neusoft.HISFC.Models.Order.ExecOrder totalExecOrder in hsPatientOrderItem.Values)
            {
                this.neuSpread1_Sheet1.Rows.Add(iRow, 1);

                this.neuSpread1_Sheet1.Cells[iRow, 0].Text = totalExecOrder.Order.Patient.Name;

                Neusoft.HISFC.Models.Pharmacy.Item item = totalExecOrder.Order.Item as Neusoft.HISFC.Models.Pharmacy.Item;

                this.neuSpread1_Sheet1.Cells[iRow, 1].Text  = item.Name + "[" + item.Specs + "]";
                this.neuSpread1_Sheet1.Cells[iRow, 2].Text  = totalExecOrder.Order.Qty.ToString();
                this.neuSpread1_Sheet1.Cells[iRow, 3].Text  = totalExecOrder.Order.Unit;
                this.neuSpread1_Sheet1.Cells[iRow, 4].Value = item.PriceCollection.RetailPrice / item.PackQty;
                this.neuSpread1_Sheet1.Cells[iRow, 5].Value = totalExecOrder.Order.Qty * item.PriceCollection.RetailPrice / item.PackQty;
            }
        }
コード例 #23
0
        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);
        }
コード例 #24
0
 /// <summary>
 /// 根据传入的药品信息根据公式生成新零售价
 /// </summary>
 /// <param name="item">传入药品信息</param>
 /// <returns>成功返回新零售价 出错返回-1</returns>
 public decimal GetNewPrice(Neusoft.HISFC.Models.Pharmacy.Item item)
 {
     if (this.rbRetailFlag.Checked)
     {
         return(this.GetNewPrice(item.PriceCollection.RetailPrice));
     }
     else
     {
         return(this.GetNewPrice(item.PriceCollection.PurchasePrice));
     }
 }
コード例 #25
0
        private void ucDrugList1_ChooseDataEvent(FarPoint.Win.Spread.SheetView sv, int activeRow)
        {
            string drugCode = sv.Cells[activeRow, 0].Text;

            Neusoft.HISFC.Models.Pharmacy.Item item = this.myItem.GetItem(drugCode);

            this.AddData(item, ((Neusoft.HISFC.Models.Base.Employee)myItem.Operator).Dept.ID);

            this.fpSpread1.Focus();
            this.fpSpread1_Sheet1.ActiveColumnIndex = (int)ColEnum.ColNum;
            this.fpSpread1_Sheet1.ActiveRowIndex    = this.fpSpread1_Sheet1.Rows.Count - 1;
        }
コード例 #26
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;
        }
コード例 #27
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);
 }
コード例 #28
0
        /// <summary>
        /// 向FarPoint内加入数据

        /// 添加了货位好的显示

        /// add by zengft 2007-4-30
        /// </summary>
        /// <param name="item">药品实体</param>
        public void AddData(Neusoft.HISFC.Models.Pharmacy.Item item, string deptCode)
        {
            if (item == null)
            {
                return;
            }


            //add by zengft 2007-4-30
            Neusoft.HISFC.BizLogic.Pharmacy.Item  itm = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            Neusoft.HISFC.Models.Pharmacy.Storage s   = new Neusoft.HISFC.Models.Pharmacy.Storage();
            s = itm.GetStockInfoByDrugCode(deptCode, item.ID);
            //end add

            int iRow = this.fpSpread1_Sheet1.Rows.Count;

            this.fpSpread1_Sheet1.Rows.Add(iRow, 1);
            this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColTradeName].Text = item.Name;
            this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColSpecs].Text     = item.Specs;
            if (item.PackQty == 0)
            {
                item.PackQty = 1;
            }
            if (item.Type.ID == "C")
            {
                this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColPrice].Text = System.Math.Round((item.PriceCollection.RetailPrice / item.PackQty), 4).ToString();
            }
            else
            {
                this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColPrice].Text = System.Math.Round((item.PriceCollection.RetailPrice / item.PackQty), 2).ToString();
            }

            if (IsClinic)
            {
                if (item.SplitType.Equals(0))
                {
                    this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColUnit].Text = item.MinUnit;
                }
                else
                {
                    this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColUnit].Text = item.PackUnit;
                }
            }
            else
            {
                this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColUnit].Text = item.MinUnit;
            }

            this.fpSpread1_Sheet1.Rows[iRow].Tag = item;

            this.fpSpread1_Sheet1.Cells[iRow, (int)ColEnum.ColPlace].Text = s.PlaceNO;
        }
コード例 #29
0
        /// <summary>
        /// 将数据加入DataTable
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private void AddDataToTable(Neusoft.HISFC.Models.Pharmacy.Item item)
        {
            DataRow dr = this.dt.NewRow();

            dr["药品编码"] = item.ID;
            dr["商品名称"] = item.Name;
            dr["规格"]   = item.Specs;
            dr["拼音码"]  = item.NameCollection.SpellCode;
            dr["五笔码"]  = item.NameCollection.WBCode;
            dr["自定义码"] = item.NameCollection.UserCode;

            this.dt.Rows.Add(dr);
        }
コード例 #30
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <returns></returns>
        protected int AddNewNostrumDetail()
        {
            if (this.tvNostrumList.SelectedNode.Tag == null)
            {
                MessageBox.Show("请选择所要维护的项目!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(-1);
            }

            if (this.IsCanEdit() == false)          //不允许进行编辑
            {
                return(-1);
            }

            Neusoft.HISFC.Models.Pharmacy.Item selectItem = (Neusoft.HISFC.Models.Pharmacy.Item) this.tvNostrumList.SelectedNode.Tag;
            string pcode  = selectItem.ID;
            string pname  = selectItem.Name + "[" + selectItem.Specs + "]";
            string itemID = this.fsDrugListSheet.GetText(this.fsDrugListSheet.ActiveRowIndex, 3);

            //判断是否存在该药品
            if (this.IsNewLineExists(pcode, itemID))
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("组套明细已经存在改处方项目"));
                return(-1);
            }

            Neusoft.HISFC.Models.Pharmacy.Item detailItem = this.itemManager.GetItem(itemID);
            if (detailItem == null)
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("根据药品编码获取药品明细信息发生错误  ") + this.itemManager.Err);
                return(-1);
            }

            Neusoft.HISFC.Models.Pharmacy.Nostrum nostrum = new Neusoft.HISFC.Models.Pharmacy.Nostrum();
            nostrum.ID   = pcode;
            nostrum.Name = pname;

            nostrum.Item = detailItem;

            nostrum.Qty = NConvert.ToDecimal(1);

            nostrum.IsValid = true;
            nostrum.SortNO  = 1;

            //从药品列表添加到处方列表中
            CreateNewLineInFpDetails(nostrum);

            this.fsNostrumDetail.Focus();
            this.fsNostrumDetailSheet.ActiveColumnIndex = (int)NostrumDetailColumn.ColQty;

            return(1);
        }