Ejemplo n.º 1
0
        /// <summary>
        /// 初始化控件
        /// </summary>
        public void Init()
        {
            try
            {
                this.cmbPackUnit.AddItems(constant.GetList("WZPACKUNIT"));
                this.cmbUnit.AddItems(constant.GetList("WZUNIT"));
                this.cmbFeeKind.AddItems(constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.MINFEE));
                this.cmbFactory.AddItems(comCompany.QueryCompany("0", "A"));
                this.cmbCompany.AddItems(comCompany.QueryCompany("1", "A"));
                this.cmbKind.AddItems(baseInfo.QueryKind());
                this.btnSave.Visible = true;

                Neusoft.HISFC.BizProcess.Integrate.Fee      feeIntegrate      = new Neusoft.HISFC.BizProcess.Integrate.Fee();
                List <Neusoft.HISFC.Models.Fee.Item.Undrug> feeItemCollection = feeIntegrate.QueryAllItemsList();
                Neusoft.HISFC.Models.Fee.Item.Undrug        info = new Neusoft.HISFC.Models.Fee.Item.Undrug();
                info.ID   = "None";
                info.Name = "取消对照";
                feeItemCollection.Insert(0, info);

                this.cmbUnDrug.AddItems(new ArrayList(feeItemCollection.ToArray()));
            }
            catch (Exception ex)
            {
                MessageBox.Show("初始化物资项目维护窗口失败:" + ex.Message);
                return;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 增加一行数据到调价窗口
        /// </summary>
        private void AddDataInfo()
        {
            try
            {
                if (this.neuSpread1_Sheet1.RowCount < 1)
                {
                    return; //如果没有数据返回空
                }
                ArrayList alInfo = new ArrayList();
                Neusoft.HISFC.Models.Fee.Item.Undrug info = new Neusoft.HISFC.Models.Fee.Item.Undrug();
                //从数据库获取要修改的信息
                alInfo = item.Query(this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, GetColumnKey("编码")].Text, "all");
                if (info == null)
                {
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("获取非药品信息出错"));
                    return;
                }
                if (alInfo == null)
                {
                    return;
                }
                info.ID           = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).ID;
                info.Name         = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).Name;
                info.Price        = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).Price;
                info.ChildPrice   = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).ChildPrice;
                info.SpecialPrice = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).SpecialPrice;

                //定义查找
                object[] keys    = new object[] { info.ID };
                DataRow  tempRow = AdjustTable.Rows.Find(keys);
                if (tempRow != null)
                {
                    MessageBox.Show(info.Name + "已经在调价信息表中了");
                    return;
                }

                Neusoft.HISFC.Models.Fee.Item.AdjustPrice tail = new Neusoft.HISFC.Models.Fee.Item.AdjustPrice();
                tail.OrgItem.ID           = info.ID;           //非药品编码
                tail.OrgItem.Name         = info.Name;         //非药品名称
                tail.OrgItem.Price        = info.Price;        //默认价
                tail.OrgItem.ChildPrice   = info.ChildPrice;   //儿童价
                tail.OrgItem.SpecialPrice = info.SpecialPrice; //特诊价
                tail.NewItem.Price        = info.Price;
                tail.NewItem.ChildPrice   = info.ChildPrice;
                tail.NewItem.SpecialPrice = info.SpecialPrice;
                //增加
                DataRow row = AdjustTable.NewRow();
                //填充数据
                SetAdjustRow(tail, row);
                //增加到表中
                AdjustTable.Rows.Add(row);
                //保存更改
                UndrugTable.AcceptChanges();
                LockfpSpread2();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        //public int BeginHorizontalBlankWidth
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //}

        //public int BeginVerticalBlankHeight
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //}

        //public ArrayList Components
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //}

        //public Size ControlSize
        //{
        //    get { throw new Exception("The method or operation is not implemented."); }
        //}

        //public object ControlValue
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        Neusoft.FrameWork.Public.ObjectHelper NoonListHelper = new Neusoft.FrameWork.Public.ObjectHelper();
        //        Neusoft.HISFC.BizProcess.Integrate.Manager managerMgr = new Neusoft.HISFC.BizProcess.Integrate.Manager();
        //        ArrayList NoonList = managerMgr.GetConstantList("NOON");
        //        NoonListHelper.ArrayObject = NoonList;
        //        //Neusoft.HISFC.BizLogic.Manager.Department dept = new Neusoft.HISFC.BizLogic.Manager.Department();
        //        Neusoft.HISFC.BizProcess.Integrate.Fee undrugztMgr = new Neusoft.HISFC.BizProcess.Integrate.Fee();
        //        //Neusoft.HISFC.BizLogic.Manager.Person ps = new Neusoft.HISFC.BizLogic.Manager.Person();
        //        //Neusoft.HISFC.Models.Base.Employee dd = managerMgr.GetPersonByID(terminalMgr.Operator.ID);
        //        //Neusoft.HISFC.Models.Base.Department dep = managerMgr.GetDeptmentById(dd.Dept.ID);
        //        Neusoft.HISFC.Models.Terminal.MedTechBookApply objRegister = value as Neusoft.HISFC.Models.Terminal.MedTechBookApply;
        //        label4.Text = objRegister.MedTechBookInfo.BookID;// 预约单号
        //        label8.Text = objRegister.ItemList.Name; //姓名
        //        label10.Text = objRegister.MedTechBookInfo.BookTime.Year + "年" + objRegister.MedTechBookInfo.BookTime.Month + "月" + objRegister.MedTechBookInfo.BookTime.Day + "日" + NoonListHelper.GetName(objRegister.Noon.ID); //执行时间
        //        label12.Text = objRegister.ItemList.ExecOper.Dept.Name;//执行地点
        //        label18.Text = "项目:" + objRegister.ItemList.Item.Name.PadLeft(20, ' '); //检查项目

        //        #region  查询信息的注意事项
        //        Neusoft.HISFC.Models.Fee.Item.Undrug itemObj = undrugztMgr.GetUndrugByCode(objRegister.ItemList.Item.ID);
        //        if (itemObj != null && itemObj.Notice != "")
        //        {
        //            objRegister.Memo = itemObj.Notice;
        //        }

        //        #endregion

        //        richTextBox1.Text = objRegister.Memo;
        //        label11.Text = objRegister.ItemList.Patient.PID.CardNO;
        //    }
        //}

        //public int HorizontalBlankWidth
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //}

        //public int HorizontalNum
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //}

        //public bool IsCanExtend
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //}

        //public bool IsShowGrid
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //}

        //public int VerticalBlankHeight
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //}

        //public int VerticalNum
        //{
        //    get
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //    set
        //    {
        //        throw new Exception("The method or operation is not implemented.");
        //    }
        //}

        #endregion

        #region IBookingPring 成员

        /// <summary>
        ///
        /// </summary>
        /// <param name="obj"></param>
        void IBookingPrint.SetValue(Neusoft.HISFC.Models.Terminal.MedTechBookApply obj)
        {
            Neusoft.FrameWork.Public.ObjectHelper      NoonListHelper = new Neusoft.FrameWork.Public.ObjectHelper();
            Neusoft.HISFC.BizProcess.Integrate.Manager managerMgr     = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            ArrayList NoonList = managerMgr.GetConstantList("NOON");

            NoonListHelper.ArrayObject = NoonList;
            Neusoft.HISFC.BizProcess.Integrate.Fee         undrugztMgr = new Neusoft.HISFC.BizProcess.Integrate.Fee();
            Neusoft.HISFC.Models.Terminal.MedTechBookApply objRegister = obj as Neusoft.HISFC.Models.Terminal.MedTechBookApply;
            label4.Text  = objRegister.MedTechBookInfo.BookID;                                                                                                                                                                // 预约单号
            label8.Text  = objRegister.ItemList.Patient.Name;                                                                                                                                                                 //姓名
            label10.Text = objRegister.MedTechBookInfo.BookTime.Year + "年" + objRegister.MedTechBookInfo.BookTime.Month + "月" + objRegister.MedTechBookInfo.BookTime.Day + "日" + NoonListHelper.GetName(objRegister.Noon.ID); //执行时间
            label12.Text = objRegister.ItemList.ExecOper.Dept.Name;                                                                                                                                                           //执行地点
            label18.Text = "项目:" + objRegister.ItemList.Item.Name.PadLeft(20, ' ');                                                                                                                                           //检查项目

            #region  查询信息的注意事项
            Neusoft.HISFC.Models.Fee.Item.Undrug itemObj = undrugztMgr.GetUndrugByCode(objRegister.ItemList.Item.ID);
            if (itemObj != null && itemObj.Notice != "")
            {
                objRegister.Memo = itemObj.Notice;
            }

            #endregion

            richTextBox1.Text = objRegister.Memo;
            label11.Text      = objRegister.ItemList.Patient.PID.CardNO;
        }
Ejemplo n.º 4
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (this.ValidateInputString() == -1)
            {
                return;
            }

            Neusoft.HISFC.Models.Fee.Item.Undrug undrug = CreateUndrugItem();

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

            //Neusoft.FrameWork.Management.Transaction t = new Neusoft.FrameWork.Management.Transaction(Neusoft.FrameWork.Management.Connection.Instance);
            //t.BeginTransaction();

            this.item.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);

            if (this.bNew)
            {
                if (this.item.InsertUndrugItem(undrug) == -1)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();;
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存数据失败!"), "消息");
                    return;
                }
            }
            else
            {
                if (this.item.UpdateUndrugItem(undrug) <= 0)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();;
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存数据失败!"), "消息");
                    return;
                }
            }

            Neusoft.FrameWork.Management.PublicTrans.Commit();;
            MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存数据成功!"), "消息");

            if (this.bNew)
            {
                if (InsertSuccessed != null)
                {
                    InsertSuccessed(undrug);
                }
            }
            else
            {
                if (SaveSuccessed != null)
                {
                    SaveSuccessed(undrug);
                }
            }

            this.ClearForm();
            //if (!this.chkSeries.Checked)
            //{
            //    this.FindForm().Close();
            //}
            this.FindForm().Close();
        }
        /// <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);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 检查开立医嘱项目(组合项目)有效性
        /// </summary>
        /// <param name="patient"></param>
        /// <param name="feeDetails"></param>
        /// <returns></returns>
        public int CheckOrderInpatientZT(Neusoft.HISFC.Models.RADT.PatientInfo patient, Neusoft.HISFC.Models.Base.Item item)
        {
            string ownFeeItem   = "";
            string limitItem    = "";
            string unCenterItem = "";

            System.Collections.ArrayList al = this.undrugpkg.QueryUndrugPackagesBypackageCode(item.ID);
            if (al != null && al.Count > 0)
            {
                foreach (Neusoft.HISFC.Models.Fee.Item.Undrug pkgDetail in al)
                {
                    Neusoft.HISFC.Models.Fee.Item.Undrug objTmp = this.itemManager.GetValidItemByUndrugCode(pkgDetail.ID);

                    if (objTmp != null)
                    {
                        if (patient.Pact.PayKind.ID == "02")
                        {
                            Neusoft.HISFC.Models.SIInterface.Compare obj = new Neusoft.HISFC.Models.SIInterface.Compare();
                            if (this.interfaceMar.GetCompareSingleItemJN("2", objTmp.ID, ref obj) == 0)
                            {
                                if (obj.CenterItem.Rate == 100)
                                {
                                    ownFeeItem += ownFeeItem + "\n";
                                }
                                else if (obj.CenterItem.Memo.Contains("限"))
                                {
                                    limitItem += limitItem + "\n";
                                }
                            }
                            else
                            {
                                unCenterItem += unCenterItem + "\n";
                            }
                        }
                    }
                }

                if (!string.IsNullOrEmpty(ownFeeItem))
                {
                    this.errMsg = "复合项目【" + item.Name + "】中的明细项目" + ownFeeItem + "为医保目录内项目,自付比例为100%,请让患者签订自费协议书!";
                    return(0);
                }
                if (!string.IsNullOrEmpty(limitItem))
                {
                    this.errMsg = "复合项目【" + item.Name + "】中的明细项目" + limitItem + "为医保目录内限制性项目,请让患者签订知情同意书!";
                    return(0);
                }
                if (!string.IsNullOrEmpty(unCenterItem))
                {
                    this.errMsg = "复合项目【" + item.Name + "】中的明细项目" + unCenterItem + "为医保目录外项目,医保患者不允许开立!";

                    return(-1);
                }
            }

            return(1);
        }
Ejemplo n.º 7
0
        private void fsDrug_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
        {
            Neusoft.HISFC.Models.Fee.Item.Undrug item = this.fsDrug_Sheet1.Rows[this.fsDrug_Sheet1.ActiveRowIndex].Tag as Neusoft.HISFC.Models.Fee.Item.Undrug;

            if (this.ShowPrescriptionEvent != null)
            {
                this.ShowPrescriptionEvent(item, System.EventArgs.Empty);
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 根据住院号和项目名称得到处方号和处方项目流水号
        /// </summary>
        /// <param name="ClinicNo"></param>
        /// <param name="ItemName"></param>
        /// <returns></returns>
        public ArrayList GetItemListByClinicAndFeeName(string ClinicNo, string ItemName)
        {
            ArrayList List = null;

            try
            {
                //select recipe_no,sequence_no ,drug_name , own_cost from fin_ipb_medicinelist where inpatient_no ='{0}' and parent_code ='[父级编码]' and current_code ='[本级编码]' union select recipe_no , sequence_no , item_name, own_cost  from fin_ipb_itemlist  where inpatient_no ='{0}' and parent_code ='[父级编码]' and current_code ='[本级编码]'

                string strSql = "";
                if (this.Sql.GetSql("Management.Fee.GetItemListByClinicAndFeeName", ref strSql) == -1)
                {
                    return(null);
                }
                List = new ArrayList();
                Neusoft.HISFC.Models.Fee.Item.Undrug ItemInfo = null;
                strSql = string.Format(strSql, ClinicNo, ItemName);
                this.ExecQuery(strSql);
                while (this.Reader.Read())
                {
                    //
                    ItemInfo = new Neusoft.HISFC.Models.Fee.Item.Undrug();
                    if (Reader[0] != null)
                    {
                        //处方号
                        ItemInfo.ID = Reader[0].ToString();
                    }
                    if (Reader[1] != null)
                    {
                        //处方内流水号
                        ItemInfo.GBCode = Convert.ToString(Reader[1]);
                    }
                    if (Reader[2] != null)
                    {
                        //药品/非药品名称
                        ItemInfo.Name = Reader[2].ToString();
                    }
                    if (Reader[3] != null)
                    {
                        //自付金额
                        ItemInfo.Price = Convert.ToDecimal(Reader[3]);
                    }
                    else
                    {
                        ItemInfo.Price = 0;
                    }
                    List.Add(ItemInfo);
                    ItemInfo = null;
                }
                this.Reader.Close();
            }
            catch (Exception ee)
            {
                this.Err = ee.Message;
            }
            return(List);
        }
        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);
        }
Ejemplo n.º 10
0
 /// <summary>
 /// 填充信息
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="row"></param>
 private void SetRow(Neusoft.HISFC.Models.Fee.Item.Undrug obj, DataRow row)
 {
     row["编码"]  = obj.ID;           //0
     row["名称"]  = obj.Name;         //1
     row["拼音码"] = obj.SpellCode;    //2
     row["五笔"]  = obj.WBCode;       //3
     row["输入码"] = obj.UserCode;     //4
     row["默认价"] = obj.Price;        //2
     row["儿童价"] = obj.ChildPrice;   //3
     row["特诊价"] = obj.SpecialPrice; //4
 }
Ejemplo n.º 11
0
        /// <summary>
        /// 添加处方明细信息
        /// </summary>
        /// <param name="item"></param>
        public int AddItemDetail(Neusoft.HISFC.Models.Fee.Item.Undrug item)
        {
            int i = this.fsMaterial_Sheet1.ActiveRowIndex;

            this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColMaterialID].Text    = item.ID;
            this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColMaterialName].Text  = item.Name;
            this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColMaterialSpecs].Text = item.Specs;
            this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColPrice].Text         = item.Price.ToString();
            this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColUnit].Text          = item.PriceUnit;

            this.fsMaterial_Sheet1.Rows[i].Tag = item;

            return(1);
        }
Ejemplo n.º 12
0
        public List <Neusoft.HISFC.Models.Preparation.PrescriptionBase> GetMaterial()
        {
            Neusoft.HISFC.Models.Preparation.DisinfectPrescription info = null;

            List <Neusoft.HISFC.Models.Preparation.PrescriptionBase> prescriptionList = new List <Neusoft.HISFC.Models.Preparation.PrescriptionBase>();
            DateTime sysTime = this.preparationManager.GetDateTimeFromSysDateTime();

            Neusoft.HISFC.Models.Fee.Item.Undrug unDrug = this.feeManager.GetItem(this.operProduct.ID);
            if (unDrug == null)
            {
                MessageBox.Show(this.feeManager.Err);
                return(null);
            }

            for (int i = 0; i < this.fsMaterial_Sheet1.Rows.Count; i++)
            {
                if (this.fsMaterial_Sheet1.Cells[i, 0].Text == "")
                {
                    continue;
                }

                info = new Neusoft.HISFC.Models.Preparation.DisinfectPrescription();

                info.Material = this.fsMaterial_Sheet1.Rows[i].Tag as Neusoft.FrameWork.Models.NeuObject;
                if (info.Material == null)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show("类型转换错误");
                    return(null);
                }

                info.Drug = unDrug;

                info.Specs         = this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColMaterialSpecs].Text;
                info.Price         = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColPrice].Text);
                info.NormativeUnit = this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColUnit].Text;

                info.MaterialType     = Neusoft.HISFC.Models.Preparation.EnumMaterialType.Material;
                info.NormativeQty     = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColQty].Text);
                info.Memo             = this.fsMaterial_Sheet1.Cells[i, (int)MaterialColumnSet.ColMemo].Text;
                info.OperEnv.ID       = this.preparationManager.Operator.ID;
                info.OperEnv.OperTime = sysTime;

                prescriptionList.Add(info);
            }

            return(prescriptionList);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 添充床位等级所包含内容
        /// </summary>
        /// <param name="feeCodeStat"></param>
        /// <param name="row"></param>
        private void SetValue(Neusoft.HISFC.Models.Fee.BedFeeItem bedFeeItem, int row)
        {
            //{21267B78-C198-43ed-8C52-5364C6F70FDA}
            Neusoft.HISFC.Models.Fee.Item.Undrug item = this.itemManager.GetUndrugByCode(bedFeeItem.ID);

            if (item.ValidState == "0")
            {
                this.neuSpread1_Sheet1.RowHeader.Cells[row, 0].Text      = "帐页停用";
                this.neuSpread1_Sheet1.RowHeader.Cells[row, 0].ForeColor = Color.Red;
            }

            if (item.ValidState == "2")
            {
                this.neuSpread1_Sheet1.RowHeader.Cells[row, 0].Text      = "帐页废弃";
                this.neuSpread1_Sheet1.RowHeader.Cells[row, 0].ForeColor = Color.Red;
            }

            if (item.ValidState == "1")
            {
                this.neuSpread1_Sheet1.RowHeader.Cells[row, 0].Text      = string.Empty;
                this.neuSpread1_Sheet1.RowHeader.Cells[row, 0].ForeColor = this.neuSpread1_Sheet1.ColumnHeader.Cells[0, 0].ForeColor;
            }

            this.neuSpread1_Sheet1.SetValue(row, 0, bedFeeItem.PrimaryKey);
            this.neuSpread1_Sheet1.SetValue(row, 1, bedFeeItem.ID);
            this.neuSpread1_Sheet1.SetValue(row, 2, bedFeeItem.Name);
            this.neuSpread1_Sheet1.SetValue(row, 3, bedFeeItem.Qty);
            // {88D26424-49FC-4b64-A0C3-6569CD196970}

            //this.neuSpread1_Sheet1.SetValue(row, 4, itemManager.GetValidItemByUndrugCode(bedFeeItem.ID).Price.ToString());
            this.neuSpread1_Sheet1.SetValue(row, 4, itemManager.GetUndrugByCode(bedFeeItem.ID).Price.ToString());
            this.neuSpread1_Sheet1.SetValue(row, 5, bedFeeItem.BeginTime.Date == new DateTime(1, 1, 1).Date?string.Empty:bedFeeItem.BeginTime.Date.ToString("yyyy-MM-dd"));

            this.neuSpread1_Sheet1.SetValue(row, 6, bedFeeItem.EndTime.Date == new DateTime(1, 1, 1).Date?string.Empty:bedFeeItem.EndTime.Date.ToString("yyyy-MM-dd"));
            this.neuSpread1_Sheet1.SetValue(row, 7, bedFeeItem.IsBabyRelation);
            this.neuSpread1_Sheet1.SetValue(row, 8, bedFeeItem.IsTimeRelation);
            this.neuSpread1_Sheet1.SetValue(row, 9, GetValidName(bedFeeItem.ValidState));
            this.neuSpread1_Sheet1.SetValue(row, 10, bedFeeItem.SortID);

            this.neuSpread1_Sheet1.Rows[row].Tag = bedFeeItem;
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 添加成品信息到Fp内
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        protected int AddDrugToFp(Neusoft.HISFC.Models.Fee.Item.Undrug item)
        {
            try
            {
                int rowCount = this.fsDrug_Sheet1.Rows.Count;
                this.fsDrug_Sheet1.Rows.Add(rowCount, 1);

                this.fsDrug_Sheet1.Cells[rowCount, (int)DrugColumnSet.ColUndrugID].Text  = item.ID;
                this.fsDrug_Sheet1.Cells[rowCount, (int)DrugColumnSet.ColTradeName].Text = item.Name;
                this.fsDrug_Sheet1.Cells[rowCount, (int)DrugColumnSet.ColPrice].Text     = item.Price.ToString();

                this.fsDrug_Sheet1.Rows[rowCount].Tag = item;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return(-1);
            }

            return(1);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 返回选择项
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public int GetItem(ref Neusoft.HISFC.Models.Fee.Item.Undrug item)
        {
            int row = fpSpread1_Sheet1.ActiveRowIndex;

            if (row < 0 || fpSpread1_Sheet1.RowCount == 0)
            {
                item = null;
                return(-1);
            }
            string itemCode = fpSpread1_Sheet1.GetText(row, 8);//项目代码

            foreach (Neusoft.HISFC.Models.Fee.Item.Undrug undrug in al)
            {
                if (undrug.ID == itemCode)
                {
                    item = undrug;
                    return(0);
                }
            }

            item = null;
            return(-1);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 如果是立即生效 先保存非药品信息 ,再保存调价信息
        /// </summary>
        private bool UpdateUndrug(ArrayList list)
        {
            bool Result = true;

            if (list == null)
            {
                return(true);
            }
            Neusoft.HISFC.Models.Fee.Item.Undrug temItem = null;
            foreach (Neusoft.HISFC.Models.Fee.Item.AdjustPrice info in list)
            {
                //先转化成ITEM然后执行更新操作
                temItem = new Neusoft.HISFC.Models.Fee.Item.Undrug();
                //药品编码
                temItem.ID = info.OrgItem.ID;
                //默认价
                temItem.Price = info.NewItem.Price;
                //儿童价
                temItem.ChildPrice = info.NewItem.ChildPrice;
                //特诊价
                temItem.SpecialPrice = info.NewItem.SpecialPrice;
            }
            return(Result);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 添加制剂新成品
        /// </summary>
        /// <returns>成功返回1 失败返回-1</returns>
        public int AddNewDrug()
        {
            Neusoft.HISFC.Models.Fee.Item.Undrug item = this.SelectUnDrug();
            if (item == null)
            {
                return(-1);
            }

            if (this.hsPrescription.ContainsKey(item.ID))
            {
                MessageBox.Show(Language.Msg("该药品已维护了配制处方"), "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(-1);
            }

            this.hsPrescription.Add(item.ID, null);

            this.AddDrugToFp(item);

            this.fsDrug_Sheet1.ActiveRowIndex = this.fsDrug_Sheet1.Rows.Count - 1;
            this.fsDrug_Sheet1.AddSelection(this.fsDrug_Sheet1.Rows.Count - 1, 0, 1, -1);
            this.fsDrug_SelectionChanged(null, null);

            return(1);
        }
Ejemplo n.º 18
0
        private void AddConstsToTable(ArrayList list, DataTable table)
        {
            if (table.Rows.Count > 0)
            {
                table.Rows.Clear();
            }
            #region {85F71883-49E9-4a10-BDA9-203F3700343B}
            string strDate = this.dt1.DayOfWeek + "," + this.dt1.ToShortDateString();

            #region donggq--2010.10.05--{5A2283DE-279D-4433-AB2F-77B072EEE1D8}

            //string strDate2 = this.dtpBeginTime.Value.ToString("yy-MM-dd") + "至" + this.dtpEndTime.Value.ToString("yy-MM-dd");

            string strDate2 = this.start.ToString("MM.dd HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo) + "-" + this.end.ToString("MM.dd HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo);

            #endregion


            //暂时借用user03存储药品性质,age存储查询时间段
            #endregion
            foreach (Neusoft.HISFC.Models.Order.ExecOrder objExc in list)
            {
                //if (!objExc.Order.Item.IsPharmacy)
                if (objExc.Order.Item.ItemType != Neusoft.HISFC.Models.Base.EnumItemType.Drug)
                {
                    objExc.Order.DoseOnce = 0;
                    objExc.Order.DoseUnit = "";
                }

                try
                {
                    //if (objExc.Order.Item.IsPharmacy == false)
                    if (objExc.Order.Item.ItemType != Neusoft.HISFC.Models.Base.EnumItemType.Drug)
                    {
                        if (objExc.Order.OrderType.Type == Neusoft.HISFC.Models.Order.EnumType.SHORT)
                        {
                            if (objExc.Order.IsEmergency == true)
                            {
                                if (objExc.Order.Note != "")
                                {
                                    objExc.Memo = "加急[" + objExc.Order.Note + "]";
                                }
                                else
                                {
                                    objExc.Memo = "加急";
                                }
                            }
                            else
                            {
                                if (objExc.Order.Note != "")
                                {
                                    objExc.Memo = objExc.Order.Note;
                                }
                                else
                                {
                                    objExc.Memo += "";
                                }
                            }
                        }
                        else
                        {
                            objExc.Order.DoseOnce = objExc.Order.Qty;
                            objExc.Order.DoseUnit = objExc.Order.Unit;
                            objExc.Memo          += objExc.Order.Note;
                        }

                        if (objExc.Order.Memo == objExc.Memo)
                        {
                            objExc.Memo = "";
                        }

                        if (objExc.Order.OrderType.ID == "BL")//补录医嘱,备注显示补录字样。
                        {
                            objExc.Order.Memo = objExc.Order.Memo + "[补录]";
                        }
                        Neusoft.HISFC.Models.Fee.Item.Undrug objAssets = objExc.Order.Item as Neusoft.HISFC.Models.Fee.Item.Undrug;
                        table.Rows.Add(new Object[] { objExc.Order.Patient.PID.PatientNO,
                                                      objExc.Order.Patient.Name,
                                                      (objExc.Order.Patient.PVisit.PatientLocation.Bed.ID),
                                                      objExc.Order.Patient.PVisit.PatientLocation.Bed.Memo,
                                                      objExc.Order.OrderType.ID,
                                                      Neusoft.FrameWork.Function.NConvert.ToInt32(objExc.Order.OrderType.IsDecompose),
                                                      objExc.Order.Item.ID,
                                                      objExc.Order.Item.Name,
                                                      objExc.Order.DoseOnce,
                                                      objExc.Order.DoseUnit,
                                                      objExc.Order.Usage.Name,
                                                      objExc.Order.Combo.Memo,
                                                      strDate,
                                                      objExc.Order.Frequency.ID,
                                                      objExc.Order.Qty,
                                                      objExc.Order.Unit,
                                                      objExc.Order.Combo.ID,
                                                      Neusoft.FrameWork.Function.NConvert.ToInt32(objExc.Order.Combo.IsMainDrug),
                                                      Neusoft.FrameWork.Function.NConvert.ToInt32(objExc.Order.OrderType.IsCharge),
                                                      objExc.Order.ReciptNO,
                                                      objExc.Order.BeginTime,
                                                      "",                                                      //收费标志
                                                      objExc.Order.Memo.TrimStart(),                           //备注
                                                      objExc.Memo.TrimStart(),
                                                      "",
                                                      "",
                                                      Neusoft.FrameWork.Function.NConvert.ToInt32(objExc.IsCharge)
                                                      , ""                            //execorderid
                                                      , ""                            //itemtype
                                                      , objExc.Order.Patient.Sex.Name //sex
                                                      , strDate2                      //objExc.Order.Patient.Age//age
                                                                                      //,8m
                                                      , Neusoft.FrameWork.Public.String.FormatNumber(
                                                          Neusoft.FrameWork.Function.NConvert.ToDecimal(
                                                              objAssets.Qty * (objAssets.Price)
                                                              ),
                                                          4
                                                          )     //tot_cost
                                       });
                    }
                    else
                    {
                        if (objExc.Order.OrderType.Type == Neusoft.HISFC.Models.Order.EnumType.SHORT)
                        {
                            if (objExc.Order.Note != "")
                            {
                                objExc.Memo = objExc.Order.Note;
                            }
                            else
                            {
                                objExc.Memo += "";
                            }
                        }
                        else
                        {
                            objExc.Memo += objExc.Order.Note;
                        }

                        if (objExc.Order.Memo == objExc.Memo)
                        {
                            objExc.Memo = "";
                        }
                        if (objExc.Order.Memo != "" && objExc.Order.Memo.IndexOf("需皮试") != -1)
                        {
                            try
                            {
                                //int hypotest = this.Order.QueryOrderHypotest(objExc.Order.ID);
                                //switch (hypotest)
                                //{
                                //    case 2:
                                //        objExc.Order.Memo = "需皮试";
                                //        break;
                                //    case 3:
                                //        objExc.Order.Memo = "阳性";
                                //        break;
                                //    case 4:
                                //        objExc.Order.Memo = "阴性";
                                //        break;
                                //    default:
                                //        objExc.Order.Memo = "需皮试";
                                //        break;
                                //}
                            }
                            catch
                            {
                                MessageBox.Show("获得皮试信息出错!", "Note");
                            }
                        }
                        if (objExc.Order.OrderType.ID == "BL")//补录医嘱,备注显示补录字样。
                        {
                            objExc.Order.Memo = objExc.Order.Memo + "[补录]";
                        }
                        Neusoft.HISFC.Models.Pharmacy.Item objPharmacy = objExc.Order.Item as Neusoft.HISFC.Models.Pharmacy.Item;
                        table.Rows.Add(new Object[] { objExc.Order.Patient.PID.PatientNO,
                                                      objExc.Order.Patient.Name,
                                                      (objExc.Order.Patient.PVisit.PatientLocation.Bed.ID),
                                                      objExc.Order.Patient.PVisit.PatientLocation.Bed.Memo,
                                                      objExc.Order.OrderType.ID,
                                                      Neusoft.FrameWork.Function.NConvert.ToInt32(objExc.Order.OrderType.IsDecompose),
                                                      objExc.Order.Item.ID,
                                                      objExc.Order.Item.Name,
                                                      objExc.Order.DoseOnce,
                                                      objExc.Order.DoseUnit,
                                                      objExc.Order.Usage.Name,
                                                      objExc.Order.Combo.Memo,
                                                      strDate,
                                                      objExc.Order.Frequency.ID,
                                                      objExc.Order.Qty,
                                                      objExc.Order.Unit,
                                                      objExc.Order.Combo.ID,
                                                      Neusoft.FrameWork.Function.NConvert.ToInt32(objExc.Order.Combo.IsMainDrug),
                                                      Neusoft.FrameWork.Function.NConvert.ToInt32(objExc.Order.OrderType.IsCharge),
                                                      objExc.Order.ReciptNO,
                                                      objExc.Order.BeginTime,
                                                      "",                                                      //收费标志
                                                      objExc.Order.Memo.TrimStart(),                           //备注
                                                      objExc.Memo.TrimStart(),
                                                      "【" + objExc.Order.Item.Specs + "】",
                                                      objPharmacy.Quality.ID,
                                                      Neusoft.FrameWork.Function.NConvert.ToInt32(objExc.IsCharge)
                                                      , ""                            //execorderid
                                                      , ""                            //itemtype
                                                      , objExc.Order.Patient.Sex.Name //sex
                                                      , strDate2                      //objExc.Order.Patient.Age//age
                                                                                      //,8m
                                                      , Neusoft.FrameWork.Public.String.FormatNumber(
                                                          Neusoft.FrameWork.Function.NConvert.ToDecimal(
                                                              objPharmacy.Qty * (objPharmacy.Price / objPharmacy.PackQty)
                                                              ),
                                                          4
                                                          )     //tot_cost
                                       });
                    }
                }
                catch (Exception ex) { MessageBox.Show(ex.Message); }
            }
        }
Ejemplo n.º 19
0
        private void SaveInfo()
        {
            try
            {
                this.neuSpread1.StopCellEditing();
                Neusoft.HISFC.BizLogic.Manager.AdjustPrice price = new Neusoft.HISFC.BizLogic.Manager.AdjustPrice();
                //获取调价单流水号
                string SequenceNo = price.GetAdjustPriceSequence();

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

                //Neusoft.FrameWork.Management.Transaction Addtrans = new Neusoft.FrameWork.Management.Transaction(price.Connection);
                //Addtrans.BeginTransaction();

                price.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);

                #region 判断时间是否有效
                if (!ckbImmediate.Checked)  //定时生效
                {
                    if (this.dtpImmediate.Value < System.DateTime.Now)
                    {
                        this.dtpImmediate.Focus();
                        Neusoft.FrameWork.Management.PublicTrans.RollBack();
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("生效的时间不能小于当前时间"));
                        return;
                    }
                }
                #endregion
                //获取要调价的信息
                ArrayList list = GetInfo(SequenceNo);
                if (list == null)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("获取调价信息出错"));
                    return;
                }

                #region  调价头表和明细表 保存调价信息
                foreach (Neusoft.HISFC.Models.Fee.Item.AdjustPrice info in list)
                {
                    //如果有以前调价还没有生效的 ,跟这次调价有冲突的 ,作废以前的调价记录
                    int temp = price.UpdateAdjustPriceDetail(info.OrgItem.ID);
                }
                //插入调价头表
                //插入调价明细表
                bool PriceHead = false;
                bool Result    = true;
                foreach (Neusoft.HISFC.Models.Fee.Item.AdjustPrice info in list)
                {
                    if (!PriceHead)
                    {
                        //向调价头表中插入一条新的记录 fin_com_adjustundrugpricehead
                        if (price.InsertAdjustPrice(info) <= 0)
                        {
                            Result = false;
                            break;
                        }
                        else
                        {
                            PriceHead = true;
                        }
                    }
                    //向调价明细中插入新的记录 fin_com_adjustundrugpricedetai
                    if (price.InsertAdjustPriceDetail(info) <= 0)
                    {
                        Result = false;
                        break;
                    }
                }
                if (Result)
                {
                    //提交数据
                    Neusoft.FrameWork.Management.PublicTrans.Commit();
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存成功"));
                    if (AdjustTable != null)
                    {
                        AdjustTable.Clear();
                    }
                }
                else
                {
                    //回退信息
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存调价信息失败"));
                }
                #endregion

                #region 如果是立即生效 保存非药品 价格
                if (ckbImmediate.Checked) //立即生效
                {
                    Neusoft.HISFC.BizLogic.Fee.Item manItem = new Neusoft.HISFC.BizLogic.Fee.Item();
                    manItem.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);
                    Neusoft.HISFC.Models.Fee.Item.Undrug temItem = null;
                    foreach (Neusoft.HISFC.Models.Fee.Item.AdjustPrice info in list)
                    {
                        //先转化成ITEM然后执行更新操作
                        temItem = new Neusoft.HISFC.Models.Fee.Item.Undrug();
                        //药品编码
                        temItem.ID = info.OrgItem.ID;
                        //默认价
                        temItem.Price = info.NewItem.Price;
                        //儿童价
                        temItem.ChildPrice = info.NewItem.ChildPrice;
                        //特诊价
                        temItem.SpecialPrice = info.NewItem.SpecialPrice;
                        //执行更新操作。
                        if (manItem.AdjustPrice(temItem) < 1)
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg(manItem.Err));
                            return;
                        }
                        //{6DF09817-9532-4129-BE60-DED731C7E5B9} 更新所有含有该项目的复合项目价格

                        //manItem.QueryZTListByDetailItem(temItem);
                    }
                }
                #endregion
            }
            catch (Exception ex)
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg(ex.Message));
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 上传医院项目信息
        /// </summary>
        public void UpLoadHisItem()
        {
            string[] blocks      = CailiaoCode.Split(',');
            bool     isCailiao   = false;
            Compare  objCom      = new Compare();
            string   feeStatCode = "";

            Neusoft.HISFC.BizLogic.Pharmacy.Item phaManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            if (this.proManager.Connect() < 0)
            {
                MessageBox.Show("连接医保数据库失败! " + this.proManager.ErrMsg);
                return;
            }
            if (isDrug)
            {
                string drugType = string.Empty;
                string itemType = string.Empty;
                Neusoft.HISFC.Models.Pharmacy.Item objHis = new Neusoft.HISFC.Models.Pharmacy.Item();
                for (int i = 0; i < this.fpHisItem_Sheet1.Rows.Count; i++)
                {
                    if (this.fpHisItem_Sheet1.Cells[i, 0].Value.ToString() == "True")
                    {
                        drugType = fpHisItem_Sheet1.Cells[i, 11].Text.Trim();
                        //if (drugType.ToString() == "西药" || drugType.ToString() == "草药" || drugType.ToString() == "中成药")
                        //{
                        itemType = "1";//药品
                        //}
                        //else
                        //{
                        //    itemType = "2";//一次性材料
                        //}

                        objHis.ID = this.fpHisItem_Sheet1.Cells[i, 1].Text.Trim();

                        objHis.Name = this.fpHisItem_Sheet1.Cells[i, 2].Text.Trim();

                        objHis.Specs = this.fpHisItem_Sheet1.Cells[i, 5].Text.Trim();

                        objHis.Price = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.fpHisItem_Sheet1.Cells[i, 7].Text.Trim());

                        objHis.MinUnit = this.fpHisItem_Sheet1.Cells[i, 10].Text.Trim();

                        objHis.PackQty = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.fpHisItem_Sheet1.Cells[i, 9].Text.Trim());

                        objHis.PackUnit = this.fpHisItem_Sheet1.Cells[i, 8].Text.Trim();

                        objHis.Product.Name = this.fpHisItem_Sheet1.Cells[i, 13].Text.Trim();

                        decimal price = objHis.Price / objHis.PackQty;

                        objHis.MinFee.ID = this.fpHisItem_Sheet1.Cells[i, 15].Text.Trim().ToString();
                        if (!string.IsNullOrEmpty(objHis.MinFee.ID))
                        {
                            feeStatCode = this.localManager.QueryFeeStatCodeByMinFeeCode(objHis.MinFee.ID);
                        }
                        else
                        {
                            MessageBox.Show("项目【" + objHis.Name + "】的最小费用代码为空,请检查数据的准确性!");

                            return;
                        }
                        if (string.IsNullOrEmpty(feeStatCode))
                        {
                            feeStatCode = this.localManager.QueryFeeStatCodeByMinFeeCodeMZ(objHis.MinFee.ID);
                            if (string.IsNullOrEmpty(feeStatCode))
                            {
                                Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();

                                MessageBox.Show("获取结算项目编号失败,没有找到最小费用【" + objHis.MinFee.ID + "】对应的医保费用类别" + this.localManager.Err);

                                return;
                            }
                        }

                        int returnValue = this.seiInterfaceProxy.add_yyxm_info_all(objHis.ID, objHis.Name, itemType, (double)price, objHis.MinUnit, (double)objHis.PackQty, "", "", objHis.Product.Name, objHis.PackUnit, "", "", "", "", feeStatCode, feeStatCode, "", 0, "");
                        if (returnValue != 0)
                        {
                            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
                            MessageBox.Show("上传药品信息出错: \n错误代码:" + returnValue + "\n错误内容:" + this.seiInterfaceProxy.get_errtext());
                            return;
                        }
                    }
                }
            }
            else
            {
                Neusoft.HISFC.Models.Fee.Item.Undrug obj = new Neusoft.HISFC.Models.Fee.Item.Undrug();
                for (int i = 0; i < this.fpHisItem_Sheet1.Rows.Count; i++)
                {
                    if (this.fpHisItem_Sheet1.Cells[i, 0].Value.ToString() == "True")
                    {
                        obj.ID = this.fpHisItem_Sheet1.Cells[i, 1].Text.Trim();

                        obj.Name = this.fpHisItem_Sheet1.Cells[i, 2].Text.Trim();

                        obj.Price = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.fpHisItem_Sheet1.Cells[i, 5].Text.Trim());

                        obj.PriceUnit = this.fpHisItem_Sheet1.Cells[i, 7].Text.Trim();

                        obj.PackQty = 1;

                        obj.MinFee.ID = this.fpHisItem_Sheet1.Cells[i, 8].Text.Trim();

                        int returnValue = 0;
                        isCailiao = false;
                        for (int k = 0; k < blocks.Length; k++)
                        {
                            if (blocks[k].ToString() == obj.MinFee.ID)
                            {
                                isCailiao = true;
                                break;
                            }
                        }

                        if (!string.IsNullOrEmpty(obj.MinFee.ID))
                        {
                            feeStatCode = this.localManager.QueryFeeStatCodeByMinFeeCode(obj.MinFee.ID);
                        }
                        if (string.IsNullOrEmpty(feeStatCode))
                        {
                            feeStatCode = this.localManager.QueryFeeStatCodeByMinFeeCodeMZ(obj.MinFee.ID);
                            if (string.IsNullOrEmpty(feeStatCode))
                            {
                                Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();

                                MessageBox.Show("获取结算项目编号失败,没有找到最小费用【" + obj.MinFee.ID + "】对应的医保结算类别" + this.localManager.Err);

                                return;
                            }
                        }

                        if (isCailiao)
                        {
                            returnValue = this.seiInterfaceProxy.add_yyxm_info_all(obj.ID, obj.Name, "2", (double)obj.Price, obj.PriceUnit, 1, "", "", "", obj.PriceUnit, "", "", "", "", feeStatCode, feeStatCode, "", 0, "");
                        }
                        else
                        {
                            returnValue = this.seiInterfaceProxy.add_yyxm_info_all(obj.ID, obj.Name, "0", (double)obj.Price, obj.PriceUnit, 1, "", "", "", obj.PriceUnit, "", "", "", "", feeStatCode, feeStatCode, "", 0, "");
                        }
                        if (returnValue != 0)
                        {
                            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
                            MessageBox.Show("上传诊疗项目信息出错: \n错误代码:" + returnValue + "\n错误内容" + this.seiInterfaceProxy.get_errtext());
                            return;
                        }
                    }
                }
            }

            MessageBox.Show("上传本地项目成功!");
        }
Ejemplo n.º 21
0
        /// <summary>
        /// 设置医嘱
        /// </summary>
        protected void SetOrder()
        {
            dirty = true;
            try
            {
                //药品
                //if (this.myorder.Item.IsPharmacy)
                if (this.myorder.Item.ItemType == EnumItemType.Drug)
                {
                    //草药
                    if (this.myorder.Item.SysClass.ID.ToString() == "PCC")
                    {
                        if (this.GetVisiblePanel() != 2)
                        {
                            this.SetPanelVisible(2);
                        }
                        if (this.myorder.HerbalQty > 0)
                        {
                            this.txtFu.Text       = this.myorder.HerbalQty.ToString();
                            this.myorder.DoseOnce = this.myorder.Item.Qty / this.myorder.HerbalQty;
                        }
                        else
                        {
                            this.myorder.HerbalQty = 1;
                            this.txtFu.Text        = this.myorder.HerbalQty.ToString();
                            this.myorder.DoseOnce  = this.myorder.Item.Qty;
                        }
                        this.cmbMemo2.Text = this.myorder.Memo;
                    }
                    else//西药,中成药
                    {
                        if (this.GetVisiblePanel() != 1)
                        {
                            this.SetPanelVisible(1);
                        }
                        if (this.IsNew)
                        {
                            if ((this.myorder.Item as Neusoft.HISFC.Models.Pharmacy.Item).OnceDose == 0M)//一次剂量为零,默认显示基本剂量
                            {
                                this.txtDoseOnce.Text = (this.myorder.Item as Neusoft.HISFC.Models.Pharmacy.Item).BaseDose.ToString();
                            }
                            else
                            {
                                this.txtDoseOnce.Text = (this.myorder.Item as Neusoft.HISFC.Models.Pharmacy.Item).OnceDose.ToString();
                            }

                            this.txtMinUnit.Text  = (this.myorder.Item as Neusoft.HISFC.Models.Pharmacy.Item).DoseUnit;
                            this.myorder.DoseOnce = decimal.Parse(this.txtDoseOnce.Text);
                        }
                        else
                        {
                            this.txtDoseOnce.Text = this.myorder.DoseOnce.ToString();
                            this.txtMinUnit.Text  = (this.myorder.Item as Neusoft.HISFC.Models.Pharmacy.Item).DoseUnit;
                        }
                        //可不可以编辑每次用量单位
                        if (this.myorder.Item.ID == "999")
                        {
                            this.txtMinUnit.Enabled = true;
                        }
                        else
                        {
                            this.txtMinUnit.Enabled = false;
                        }
                        this.cmbMemo1.Text         = this.myorder.Memo;
                        this.chkDrugEmerce.Checked = this.myorder.IsEmergency;
                    }
                }
                else//非药品-描述医嘱
                {
                    if (this.GetVisiblePanel() != 3)
                    {
                        this.SetPanelVisible(3);
                    }

                    this.panelFrequency.Visible = false;//门诊医嘱,就是不用显示非药品频次

                    //执行科室
                    if (myorder.ExeDept.ID != null && myorder.ExeDept.ID != "")
                    {
                        this.cmbExeDept.Tag = this.myorder.ExeDept.ID;

                        #region donggq--{380D9416-8C99-46f1-A7AE-8DF2F49578F6}
                        this.cmbExeDept.Text = this.myorder.ExeDept.Name;
                        #endregion
                    }
                    else
                    {
                        if (myorder.Item.GetType() == typeof(Neusoft.HISFC.Models.Fee.Item.Undrug))
                        {
                            Neusoft.HISFC.Models.Fee.Item.Undrug undrug = myorder.Item as Neusoft.HISFC.Models.Fee.Item.Undrug;
                            this.cmbExeDept.Tag = undrug.ExecDept;
                        }
                    }

                    #region {0A4BC81A-2F2B-4dae-A8E6-C8DC1F87AA32}
                    if (this.myorder.Item.SysClass.ID.ToString() == "UL")
                    {
                        this.txtSample.ClearItems();
                        this.txtSample.AddItems(HISFC.Components.Order.Classes.Function.HelperSample.ArrayObject);
                        this.neuLabel9.Text = "样本:";
                        this.txtSample.Text = this.myorder.Sample.Name;
                    }
                    else
                    {
                        this.txtSample.ClearItems();
                        this.txtSample.AddItems(HISFC.Components.Order.Classes.Function.HelperCheckPart.ArrayObject);
                        this.neuLabel9.Text = "部位:";
                        if (string.IsNullOrEmpty(this.myorder.CheckPartRecord))
                        {
                            this.txtSample.Text = this.myorder.Sample.Name;
                        }
                        else
                        {
                            this.txtSample.Text = this.myorder.CheckPartRecord;
                        }
                    }
                    #endregion

                    this.cmbMemo3.Text     = this.myorder.Memo;
                    this.chkEmerce.Checked = this.myorder.IsEmergency;
                    //this.txtSample.Text = this.myorder.Sample.Name;
                }
            }
            catch { };

            if (this.myorder.Frequency.ID != "")
            {
                this.cmbFrequency.Tag = this.myorder.Frequency.ID;

                if (myorder.Frequency.Name.Length > 10)
                {
                    this.txtFrequency.Text = this.myorder.Frequency.Name.Substring(0, 10);
                }
                else
                {
                    this.txtFrequency.Text = this.myorder.Frequency.Name;
                }
                this.toolTip1.SetToolTip(this.txtFrequency, this.myorder.Frequency.Name);
                if (this.myorder.Frequency.Time == "25:00")
                {
                    this.myorder.Frequency.Time = ((Neusoft.HISFC.Models.Order.Frequency) this.cmbFrequency.SelectedItem).Time;
                }

                this.lnkTime.Text = this.myorder.Frequency.Time;
            }
            this.cmbUsage1.Tag = this.myorder.Usage.ID;
            this.cmbUsage2.Tag = this.myorder.Usage.ID;

            dirty = false;
        }
Ejemplo n.º 22
0
        public int ShowProduct(Neusoft.FrameWork.Models.NeuObject product)
        {
            Neusoft.HISFC.Models.Fee.Item.Undrug item = this.undrugHelper.GetObjectFromID(product.ID) as Neusoft.HISFC.Models.Fee.Item.Undrug;

            return(this.AddDrugToFp(item));
        }
        /// <summary>
        /// 读取医嘱信息-控制控件显示状态
        /// </summary>
        /// <param name="myOrder"></param>
        public virtual int ReadOrder(Neusoft.HISFC.Models.Order.Order myOrder)
        {
            if (myOrder == null)
            {
                return(0);
            }
            //项目
            if (myOrder.Item.GetType() == typeof(Neusoft.HISFC.Models.Pharmacy.Item))//药品
            {
                Neusoft.HISFC.Models.Pharmacy.Item item = ((Neusoft.HISFC.Models.Pharmacy.Item)myOrder.Item);
                if (myOrder.Frequency.ID == null || myOrder.Frequency.ID == "")
                {
                    myOrder.Frequency.ID = "PRN";          //门诊医嘱默认为需要时执行
                }
                this.txtQTY.Text = myOrder.Qty.ToString(); //总量
                this.cmbUnit.Items.Clear();

                if (myOrder.Item.ID != "999") //自定义药品
                {
                    if (item.PackQty == 0)    //检查包装数量
                    {
                        MessageBox.Show("该药品的包装数量为零!");
                        return(-1);
                    }
                    if (item.BaseDose == 0)//检查基本剂量
                    {
                        MessageBox.Show("该药品的基本剂量为零!");
                        return(-1);
                    }
                    if (item.DosageForm.ID == "")//检查剂型
                    {
                        MessageBox.Show("该药品的剂型为空!");
                        return(-1);
                    }
                }
                //单位
                if ((myOrder.Item as Neusoft.HISFC.Models.Pharmacy.Item).PackUnit != "" && (myOrder.Item as Neusoft.HISFC.Models.Pharmacy.Item).PackUnit != null)//包装单位不为空
                {
                    try
                    {
                        this.cmbUnit.Items.Add((this.ucInputItem1.FeeItem as Neusoft.HISFC.Models.Pharmacy.Item).MinUnit);  //min单位
                        this.cmbUnit.Items.Add((this.ucInputItem1.FeeItem as Neusoft.HISFC.Models.Pharmacy.Item).PackUnit); //pack单位

                        this.cmbUnit.Enabled = true;
                    }
                    catch { }
                }
                else
                {
                    if (myOrder.Unit == null || myOrder.Unit == "")
                    {
                    }
                    else
                    {
                        this.cmbUnit.Items.Add(myOrder.Unit);
                    }
                }
                if (myOrder.Item.ID == "999")
                {
                    this.cmbUnit.DropDownStyle = ComboBoxStyle.DropDown;//可以更改
                    this.cmbUnit.Enabled       = this.txtQTY.Enabled;
                }
                else
                {
                    this.cmbUnit.DropDownStyle = ComboBoxStyle.DropDownList;//只能选择
                    this.cmbUnit.Enabled       = true;
                }

                if (myOrder.StockDept.ID == null || myOrder.StockDept.ID == "")
                {
                    myOrder.StockDept.ID   = item.User02; //扣库科室,可能要变需要注意
                    myOrder.StockDept.Name = item.User03; //扣库科室
                }

                if (myOrder.Unit == null || myOrder.Unit.Trim() == "")
                {
                    if (this.cmbUnit.Items.Count > 0)
                    {
                        #region 包装单位显示 --donggq----{BC5E1C12-B63E-4efb-BA52-2BF30AA5FFF4}

                        if (this.cmbUnit.Items.Count > 1)
                        {
                            this.cmbUnit.SelectedIndex = 1;  myOrder.NurseStation.User03 = "0";
                        }
                        else
                        {
                            this.cmbUnit.SelectedIndex = 0;  myOrder.NurseStation.User03 = "1";
                        }

                        #endregion

                        myOrder.Unit = this.cmbUnit.Text;
                    }
                }
                else
                {
                    this.cmbUnit.Text = myOrder.Unit;
                }
            }
            else if (myOrder.Item.GetType() == typeof(Neusoft.HISFC.Models.Fee.Item.Undrug))//非药品
            {
                Neusoft.HISFC.Models.Fee.Item.Undrug item = ((Neusoft.HISFC.Models.Fee.Item.Undrug)myOrder.Item);

                //如果执行科室为空--付给本科科室
                if (myOrder.ExeDept.ID == "")
                {
                    if (item.ExecDept == "")
                    {
                        myOrder.ExeDept = myOrder.Patient.PVisit.PatientLocation.Dept.Clone();////执行科室?????可能需要修改
                    }
                    else if (item.ExecDepts != null && item.ExecDepts.Count > 0)
                    {
                        try
                        {
                            myOrder.ExeDept.ID = ((Neusoft.HISFC.Models.Fee.Item.Undrug)myOrder.Item).ExecDepts[0].ToString();
                        }
                        catch { }
                    }
                }
                if (myOrder.CheckPartRecord == "" && myOrder.Item.SysClass.ID.ToString() == "UC") //检查检体部位
                {
                    myOrder.CheckPartRecord = item.CheckBody;
                }
                if (myOrder.Sample.Name == "" && myOrder.Item.SysClass.ID.ToString() == "UL") //检查检体部位
                {
                    myOrder.Sample.Name = item.CheckBody;
                }
                if (myOrder.Frequency.ID == null || myOrder.Frequency.ID == "")
                {
                    myOrder.Frequency.ID = "QD";//门诊医嘱默认QD
                }
                //this.ShowTotal(true);

                this.cmbUnit.Items.Clear();

                if (myOrder.Unit == null || myOrder.Unit.Trim() == "")
                {
                    string unit = ((Neusoft.HISFC.Models.Fee.Item.Undrug)myOrder.Item).PriceUnit;
                    if (unit == null || unit == "")
                    {
                        unit = "次";
                    }
                    this.cmbUnit.Items.Add(unit);
                    if (this.cmbUnit.Items.Count > 0)
                    {
                        this.cmbUnit.SelectedIndex = 0;
                        myOrder.Unit = this.cmbUnit.Text;
                    }
                }
                else
                {
                    this.cmbUnit.Items.Add(myOrder.Unit);
                    this.cmbUnit.Text = myOrder.Unit;
                }
                if (myOrder.Qty == 0)
                {
                    this.txtQTY.ValueChanged -= new System.EventHandler(this.txtQTY_ValueChanged);
                    this.txtQTY.Text          = "1.00"; //总量
                    this.txtQTY.ValueChanged += new System.EventHandler(this.txtQTY_ValueChanged);
                    myOrder.Qty = 1;
                }
                else
                {
                    this.txtQTY.Text = myOrder.Qty.ToString();
                }
            }
            else
            {
                MessageBox.Show("无法识别的类型!");
                return(-1);
            }


            return(0);
        }
Ejemplo n.º 24
0
        private int FillFpDetails(string pcode, string pname)
        {
            if (this.fpDetails.Rows.Count > 0)
            {
                this.fpDetails.Rows.Remove(0, this.fpDetails.Rows.Count);
            }

            List <Neusoft.HISFC.Models.Fee.Item.UndrugComb> lstzt = new List <Neusoft.HISFC.Models.Fee.Item.UndrugComb>();

            if (this.ztManager.QueryUnDrugztDetail(pcode, ref lstzt) == -1)
            {
                return(-1);
            }



            if (lstzt.Count == 0)
            {
                return(-1);
            }



            for (int i = 0, j = lstzt.Count; i < j; i++)
            {
                this.fpDetails.Rows.Add(i, 1);
                //{21267B78-C198-43ed-8C52-5364C6F70FDA}
                Neusoft.HISFC.Models.Fee.Item.Undrug item = this.itemManager.GetUndrugByCode(lstzt[i].ID);

                if (item == null)
                {
                    continue;
                }


                if (item.ValidState == "0")
                {
                    this.fpDetails.RowHeader.Cells[i, 0].Text      = "帐页停用";
                    this.fpDetails.RowHeader.Cells[i, 0].ForeColor = Color.Red;
                }

                if (item.ValidState == "2")
                {
                    this.fpDetails.RowHeader.Cells[i, 0].Text      = "帐页废弃";
                    this.fpDetails.RowHeader.Cells[i, 0].ForeColor = Color.Red;
                }

                if (item.ValidState == "1")
                {
                    this.fpDetails.RowHeader.Cells[i, 0].Text      = "";
                    this.fpDetails.RowHeader.Cells[i, 0].ForeColor = this.fpDetails.ColumnHeader.Cells[0, 0].ForeColor;
                }

                this.fpDetails.SetText(i, 0, lstzt[i].Package.ID);
                this.fpDetails.SetText(i, 1, lstzt[i].Package.Name);
                this.fpDetails.SetText(i, 2, lstzt[i].ID);
                this.fpDetails.SetText(i, 3, lstzt[i].Name);
                this.fpDetails.SetText(i, 4, lstzt[i].SortID.ToString());
                this.fpDetails.SetText(i, 5, lstzt[i].Qty.ToString());
                this.fpDetails.SetText(i, 6, lstzt[i].ValidState);
                this.fpDetails.SetText(i, 7, lstzt[i].SpellCode);
                this.fpDetails.SetText(i, 8, lstzt[i].WBCode);
                this.fpDetails.SetText(i, 9, lstzt[i].UserCode);

                this.fpDetails.SetText(i, 10, lstzt[i].Memo);//标志位,如果有值则为更新,否则为插入
                this.fpDetails.SetText(i, 11, lstzt[i].Price.ToString());
                this.fpDetails.SetText(i, 12, lstzt[i].ChildPrice.ToString());
                this.fpDetails.SetText(i, 13, lstzt[i].SpecialPrice.ToString());
            }
            return(1);
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 所有有效的组套信息
        /// </summary>
        /// <param name="lstUndrugzt">返回的数据集</param>
        /// <returns>1,成功; -1,失败</returns>
        public int QueryAllValidItemzt(ref List <Neusoft.HISFC.Models.Fee.Item.Undrug> lstUndrugzt)
        {
            string strsql = "";

            if (this.Sql.GetSql("Fee.Itemzt.Info", ref strsql) == -1)
            {
                return(-1);
            }

            //执行当前Sql语句
            if (this.ExecQuery(strsql) == -1)
            {
                this.Err = this.Sql.Err;

                return(-1);
            }

            try
            {
                //循环读取数据
                while (this.Reader.Read())
                {
                    Neusoft.HISFC.Models.Fee.Item.Undrug item = new Neusoft.HISFC.Models.Fee.Item.Undrug();

                    item.ID                  = this.Reader[0].ToString();                                                 //非药品编码
                    item.Name                = this.Reader[1].ToString();                                                 //非药品名称
                    item.SysClass.ID         = this.Reader[2].ToString();                                                 //系统类别
                    item.MinFee.ID           = this.Reader[3].ToString();                                                 //最小费用代码
                    item.UserCode            = this.Reader[4].ToString();                                                 //输入码
                    item.SpellCode           = this.Reader[5].ToString();                                                 //拼音码
                    item.WBCode              = this.Reader[6].ToString();                                                 //五笔码
                    item.GBCode              = this.Reader[7].ToString();                                                 //国家编码
                    item.NationCode          = this.Reader[8].ToString();                                                 //国际编码
                    item.Price               = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[9].ToString());  //三甲价
                    item.PriceUnit           = this.Reader[10].ToString();                                                //计价单位
                    item.FTRate.EMCRate      = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[11].ToString()); // 急诊加成比例
                    item.IsFamilyPlanning    = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[12].ToString()); // 计划生育标记
                    item.User01              = this.Reader[13].ToString();                                                //特定诊疗项目
                    item.Grade               = this.Reader[14].ToString();                                                //甲乙类标志
                    item.IsNeedConfirm       = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[15].ToString()); //确认标志 1 需要确认 0 不需要确认
                    item.ValidState          = this.Reader[16].ToString();                                                //有效性标识 在用 1 停用 0 废弃 2
                    item.Specs               = this.Reader[17].ToString();                                                //规格
                    item.ExecDept            = this.Reader[18].ToString();                                                //执行科室
                    item.MachineNO           = this.Reader[19].ToString();                                                //设备编号 用 | 区分
                    item.CheckBody           = this.Reader[20].ToString();                                                //默认检查部位或标本
                    item.OperationInfo.ID    = this.Reader[21].ToString();                                                // 手术编码
                    item.OperationType.ID    = this.Reader[22].ToString();                                                // 手术分类
                    item.OperationScale.ID   = this.Reader[23].ToString();                                                //手术规模
                    item.IsCompareToMaterial = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[24].ToString()); //是否有物资项目与之对照(1有,0没有)
                    item.Memo                = this.Reader[25].ToString();                                                //备注
                    item.ChildPrice          = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[26].ToString()); //儿童价
                    item.SpecialPrice        = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[27].ToString()); //特诊价
                    item.SpecialFlag         = this.Reader[28].ToString();                                                //省限制
                    item.SpecialFlag1        = this.Reader[29].ToString();                                                //市限制
                    item.SpecialFlag2        = this.Reader[30].ToString();                                                //自费项目
                    item.SpecialFlag3        = this.Reader[31].ToString();                                                // 特殊检查
                    item.SpecialFlag4        = this.Reader[32].ToString();                                                // 备用
                    item.DiseaseType.ID      = this.Reader[35].ToString();                                                //疾病分类
                    item.SpecialDept.ID      = this.Reader[36].ToString();                                                //专科名称
                    item.MedicalRecord       = this.Reader[37].ToString();                                                //  --病史及检查
                    item.CheckRequest        = this.Reader[38].ToString();                                                //--检查要求
                    item.Notice              = this.Reader[39].ToString();                                                //--  注意事项
                    item.IsConsent           = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[40].ToString());
                    item.CheckApplyDept      = this.Reader[41].ToString();                                                //检查申请单名称
                    item.IsNeedBespeak       = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[42].ToString()); //是否需要预约
                    item.ItemArea            = this.Reader[43].ToString();                                                //项目范围
                    item.ItemException       = this.Reader[44].ToString();                                                //项目约束

                    //单位标识(0,明细; 1,组套)[2007/01/01  xuweizhe]
                    item.UnitFlag = this.Reader.IsDBNull(45) ? "" : this.Reader.GetString(45);

                    lstUndrugzt.Add(item);
                }//循环结束

                //关闭Reader
                this.Reader.Close();
            }
            catch (Exception ex)
            {
                this.Err = ex.Message;
                this.Reader.Close();
                return(-1);
            }
            return(1);
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 住院检查
        /// </summary>
        /// <param name="patient"></param>
        /// <param name="orderList"></param>
        public void ControlValue(Neusoft.HISFC.Models.RADT.Patient patient, List <Neusoft.HISFC.Models.Order.Inpatient.Order> orderList)
        {
            this.neuSpread1_Sheet1.Cells[0, 0].Value = this.mgrIntegrate.GetHospitalName() + orderList[0].Item.Name.ToString() + "检查申请单";

            if (orderList[0].IsEmergency)
            {
                this.neuSpread1_Sheet1.Cells[0, 9].Value         = "加  急";//加急
                this.neuSpread1_Sheet1.Cells.Get(0, 9).ForeColor = System.Drawing.Color.Red;
            }
            if (orderList[0].BeginTime != null)
            {
                this.neuSpread1_Sheet1.Cells[2, 1].Value = orderList[0].BeginTime.ToString();//申请日期
            }
            if (patient.PID.PatientNO != null)
            {
                this.neuSpread1_Sheet1.Cells[2, 5].Value = patient.PID.PatientNO.ToString();//住院号
            }
            if (patient.Pact.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[2, 9].Value = patient.Pact.Name.ToString();//费用类别
            }
            if (patient.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 1].Value = patient.Name.ToString();//姓名
            }
            if (patient.Sex != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 3].Value = patient.Sex.ToString();//性别
            }
            if (patient.Age != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 5].Value = patient.Age.ToString();//年龄
            }
            if (orderList[0].NurseStation.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 7].Value = orderList[0].NurseStation.Name.ToString();//病区
            }
            if (orderList[0].Patient.PVisit.PatientLocation.Bed.ID != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 9].Value = orderList[0].Patient.PVisit.PatientLocation.Bed.ID.ToString();//床号
            }
            Neusoft.HISFC.Models.Fee.Item.Undrug undrug = new Neusoft.HISFC.Models.Fee.Item.Undrug();

            Neusoft.HISFC.BizLogic.Fee.Item item = new Neusoft.HISFC.BizLogic.Fee.Item();

            undrug = item.GetValidItemByUndrugCode(orderList[0].Item.ID.ToString());

            if (undrug.CheckRequest != null)
            {
                this.neuSpread1_Sheet1.Cells[4, 1].Value = undrug.CheckRequest.ToString();//检查部位/要求
            }
            #region  诊断(代码摘自ucDiagnosis FillList())
            Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBaseMC diagnoseMgrMc = new Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBaseMC();
            Neusoft.HISFC.BizProcess.Integrate.Manager managerIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Manager();

            Neusoft.HISFC.Models.HealthRecord.Diagnose diagns = null;
            Neusoft.HISFC.Models.Base.Spell            dsType = null;
            Neusoft.HISFC.Models.Base.Employee         emp    = null;

            //ArrayList diagnoseList = diagnoseMgrMc.QueryDiagnoseBoth(orderList[0].Patient.PVisit.PatientLocation.Bed.InpatientNO.ToString());
            ArrayList diagnoseList = diagnoseMgrMc.QueryDiagnoseBoth(orderList[0].Patient.ID);
            ArrayList dsTypeList   = Neusoft.HISFC.Models.HealthRecord.DiagnoseType.SpellList();
            ArrayList drList       = managerIntegrate.QueryEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.D);
            String    strDsType    = "";
            String    strDrName    = "";
            string    diag         = string.Empty;
            if (diagnoseList != null)
            {
                for (int i = 0; i < diagnoseList.Count; i++)
                {
                    diagns = (Neusoft.HISFC.Models.HealthRecord.Diagnose)diagnoseList[i];
                    for (int j = 0; j < dsTypeList.Count; j++)
                    {
                        dsType = (Neusoft.HISFC.Models.Base.Spell)dsTypeList[j];
                        if (dsType.ID.ToString() == diagns.DiagInfo.DiagType.ID)
                        {
                            strDsType = dsType.Name;//诊断类型
                            break;
                        }
                    }
                    //填入诊断医生姓名
                    for (int j = 0; j < drList.Count; j++)
                    {
                        emp = (Neusoft.HISFC.Models.Base.Employee)drList[j];
                        if (emp.ID.ToString() == diagns.DiagInfo.Doctor.ID)
                        {
                            strDrName = emp.Name;
                            break;
                        }
                    }
                    if (i == 0)
                    {
                        diag = "[" + strDsType + "-" + diagns.DiagInfo.ICD10.Name.ToString() + "-" + strDrName + "]";
                    }
                    else
                    {
                        diag = diag + "[" + strDsType + "-" + diagns.DiagInfo.ICD10.Name.ToString() + "-" + strDrName + "]";
                    }
                }
            }
            this.neuSpread1_Sheet1.Cells[9, 1].Value = diag;
            #endregion

            if (orderList[0].ReciptDoctor.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[19, 1].Value = orderList[0].Memo.ToString();//备注
            }
            if (orderList[0].Memo != null)
            {
                this.neuSpread1_Sheet1.Cells[25, 9].Value = orderList[0].ReciptDoctor.Name.ToString();//医师
            }
            if (undrug.Notice != null)
            {
                this.neuSpread1_Sheet1.Cells[22, 1].Value = undrug.Notice.ToString();//注意事项
            }
        }
Ejemplo n.º 27
0
        public void UpdateUndrugItems(Neusoft.HISFC.Models.Fee.Item.Undrug undrug)
        {
            #region
            // oper_code='{26}' ,
            // oper_date =sysdate,
            // UNIT_PRICE1 ={27},
            // UNIT_PRICE2 ={28},
            // SPECIAL_FLAG ='{29}',
            // SPECIAL_FLAG1='{30}' ,
            // SPECIAL_FLAG2='{31}' ,
            // SPECIAL_FLAG3 ='{32}',
            // SPECIAL_FLAG4 ='{33}',
            // UNIT_PRICE3={34},
            // UNIT_PRICE4={35},
            // DISEASE_CLASS=  '{36}',
            // SPECIAL_DEPT  ='{37}',
            // CONSENT_FLAG = '{38}',
            // MARK1 = '{39}' ,
            // MARK2 = '{40}' ,
            // MARK3 = '{41}' ,
            // MARK4 = '{42}' ,   --  检查申请单名称
            // needbespeak  = '{43}' ,-- 是否需要预约
            // ITEM_AREA = '{44}' , -- 项目范围
            // ITEM_NOAREA = '{45}' --项目例外
            // WHERE PARENT_CODE = fun_get_parentcode  AND CURRENT_CODE= fun_get_currentcode  AND item_code   ='{0}'
            #endregion

            this.tbItemCode.Text     = undrug.ID;            //0
            this.tbItemName.Text     = undrug.Name;          //1
            this.tbItemRestrict.Text = undrug.ItemException; //45
            this.tbNotice.Text       = undrug.Notice;        //41
            this.tbItemArea.Text     = undrug.ItemArea;      //44

            this.cbClassType.Text = undrug.SysClass.Name;    //2
            this.cbExecDept.Text  = undrug.ExecDept;         //== "" ? "" : this.htExecDept[undrug.ExecDept].ToString();//18
            this.cbMinFee.Text    = undrug.MinFee.Name;      //3----------
            this.cbValid.Text     = undrug.ValidState;       //16
            #region
            // unit_price='{9}',
            // stock_unit='{10}',
            // emerg_scale='{11}',
            // family_plane='{12}',
            // special_item='{13}',
            // item_grade  ='{14}',
            // confirm_flag='{15}',
            // valid_state='{16}',
            // specs='{17}',
            // facility_no='{19}',
            // default_sample='{20}',
            // operate_code='{21}',
            // operate_kind='{22}',
            // operate_type='{23}',
            // collate_flag='{24}',
            // mark='{25}',
            #endregion

            this.tbUnitPrice.NumericValue    = undrug.Price;          //9
            this.tbChildPrice.NumericValue   = undrug.ChildPrice;     //27
            this.tbSpecialPrice.NumericValue = undrug.SpecialPrice;   //28
            this.tbEmergePrice.NumericValue  = undrug.FTRate.EMCRate; //11
            this.tbOtherPrice1.NumericValue  = 0;                     //34
            this.tbOtherPrice2.NumericValue  = 0;                     //35

            this.tbCheck.Text       = undrug.CheckRequest;            //40
            this.tbSample.Text      = undrug.CheckBody;               //20
            this.tbUnit.Text        = undrug.PriceUnit;               //10
            this.tbSpec.Text        = undrug.Specs;                   //17
            this.tbApplyName.Text   = undrug.CheckApplyDept;          //42
            this.tbIllSort.Text     = undrug.DiseaseType.ID;          //36
            this.tbOprCode.Text     = undrug.OperationInfo.ID;        //21
            this.tbOprSort.Text     = undrug.OperationType.ID;        //22
            this.tbOprScale.Text    = undrug.OperationScale.ID;       //23
            this.tbAcademyName.Text = undrug.SpecialDept.ID;          //37
            this.tbMachineNO.Text   = undrug.MachineNO;               //19

            #region
            //fee_code ='{3}',
            #endregion

            this.tbUserCode.Text          = undrug.UserCode;      //4
            this.tbSpellCode.Text         = undrug.SpellCode;     //5
            this.tbWbCode.Text            = undrug.WBCode;        //6
            this.tbNationCode.Text        = undrug.GBCode;        //7
            this.tbIntCode.Text           = undrug.NationCode;    //8
            this.tbMedical.Text           = undrug.MedicalRecord; //39
            this.tbMemo.Text              = undrug.Memo;          //25
            this.cmbApplicabilityArea.Tag = undrug.ApplicabilityArea;
            if (undrug.SpecialFlag /*省限制*/ == "1")                //29
            {
                this.chkProvince.Checked = true;
            }
            if (undrug.SpecialFlag1 /*市限制*/ == "1")//30
            {
                this.chkTown.Checked = true;
            }
            if (undrug.SpecialFlag2 /*自费项目*/ == "1")//31
            {
                this.chkSelf.Checked = true;
            }
            this.chkConfirm.Checked     = undrug.IsNeedConfirm /*终端确认*/;      //15
            this.chkPrecontract.Checked = undrug.IsNeedBespeak /*是否需要预约*/;    //43
            this.chkFamilyPlane.Checked = undrug.IsFamilyPlanning /*计划生育标记*/; //12

            if (undrug.SpecialFlag3 /*特定治疗项目*/ == "1")                        //32
            {
                this.chkSpecialItem.Checked = true;
            }
            undrug.SpecialFlag4     = "1" /*中山一使用,是否强制出单*/;              //33
            this.chkConsent.Checked = undrug.IsConsent /*知情同意书*/;        //38
            this.chkCollate.Checked = undrug.IsCompareToMaterial /*对照*/; //24

            switch (undrug.Grade.Trim())
            {
            case "甲":
                this.chkFirst.Checked = true;
                break;

            case "乙":
                this.chkSecond.Checked = true;
                break;

            case "丙":
                this.chkThird.Checked = true;
                break;

            default: break;
            }

            //单位标识(0,明细; 1,组套)[2007/01/01  xuweizhe]
            this.chkUnitFlag.Checked = undrug.UnitFlag.Trim().Equals("1") ? true : false;
        }
Ejemplo n.º 28
0
        private Neusoft.HISFC.Models.Fee.Item.Undrug CreateUndrugItem()
        {
            Neusoft.HISFC.Models.Fee.Item.Undrug undrug = new Neusoft.HISFC.Models.Fee.Item.Undrug();
            #region
            // oper_code='{26}' ,
            // oper_date =sysdate,
            // UNIT_PRICE1 ={27},
            // UNIT_PRICE2 ={28},
            // SPECIAL_FLAG ='{29}',
            // SPECIAL_FLAG1='{30}' ,
            // SPECIAL_FLAG2='{31}' ,
            // SPECIAL_FLAG3 ='{32}',
            // SPECIAL_FLAG4 ='{33}',
            // UNIT_PRICE3={34},
            // UNIT_PRICE4={35},
            // DISEASE_CLASS=  '{36}',
            // SPECIAL_DEPT  ='{37}',
            // CONSENT_FLAG = '{38}',
            // MARK1 = '{39}' ,
            // MARK2 = '{40}' ,
            // MARK3 = '{41}' ,
            // MARK4 = '{42}' ,   --  检查申请单名称
            // needbespeak  = '{43}' ,-- 是否需要预约
            // ITEM_AREA = '{44}' , -- 项目范围
            // ITEM_NOAREA = '{45}' --项目例外
            // WHERE PARENT_CODE = fun_get_parentcode  AND CURRENT_CODE= fun_get_currentcode  AND item_code   ='{0}'
            #endregion
            undrug.ID   = this.tbItemCode.Text; //0
            undrug.Name = this.tbItemName.Text; //1

            switch (this.cbValid.Text.Trim())   //16
            {
            case "在用":
                undrug.ValidState = "1";
                break;

            case "停用":
                undrug.ValidState = "0";
                break;

            case "废弃":
                undrug.ValidState = "2";
                break;

            default:
                undrug.ValidState = "1";
                break;
            }

            undrug.SysClass.ID = this.cbClassType.Text == "" ? "" : GetKeyByValue(this.htSysType, this.cbClassType.Text); //2
            undrug.ExecDept    = this.cbExecDept.Text == "" ? "" : GetKeyByValue(this.htExecDept, this.cbExecDept.Text);  //18
            undrug.MinFee.ID   = this.cbMinFee.Text == "" ? "" : GetKeyByValue(this.htFeeType, this.cbMinFee.Text);       //3----------

            undrug.ItemException = this.tbItemRestrict.Text;                                                              //45
            undrug.Notice        = this.tbNotice.Text;                                                                    //41
            undrug.ItemArea      = this.tbItemArea.Text;                                                                  //44

            #region
            // unit_price='{9}',
            // stock_unit='{10}',
            // emerg_scale='{11}',
            // family_plane='{12}',
            // special_item='{13}',
            // item_grade  ='{14}',
            // confirm_flag='{15}',
            // valid_state='{16}',
            // specs='{17}',
            // facility_no='{19}',
            // default_sample='{20}',
            // operate_code='{21}',
            // operate_kind='{22}',
            // operate_type='{23}',
            // collate_flag='{24}',
            // mark='{25}',
            #endregion

            undrug.CheckRequest = this.tbCheck.Text;                           //40
            undrug.CheckBody    = this.tbSample.Text;                          //20

            undrug.Price          = (decimal)this.tbUnitPrice.NumericValue;    //9
            undrug.ChildPrice     = (decimal)this.tbChildPrice.NumericValue;   //27
            undrug.SpecialPrice   = (decimal)this.tbSpecialPrice.NumericValue; //28
            undrug.FTRate.EMCRate = (decimal)this.tbEmergePrice.NumericValue;  //11

            //其他价1
            //其他价2

            undrug.PriceUnit         = this.tbUnit.Text;        //10
            undrug.Specs             = this.tbSpec.Text;        //17
            undrug.CheckApplyDept    = this.tbApplyName.Text;   //42
            undrug.DiseaseType.ID    = this.tbIllSort.Text;     //36
            undrug.OperationInfo.ID  = this.tbOprCode.Text;     //21
            undrug.OperationType.ID  = this.tbOprSort.Text;     //22
            undrug.OperationScale.ID = this.tbOprScale.Text;    //23
            undrug.SpecialDept.ID    = this.tbAcademyName.Text; //37
            undrug.MachineNO         = this.tbMachineNO.Text;   //19

            #region
            //fee_code ='{3}',
            #endregion

            //三种码,[2006/12/15, xuweizhe]改,可能有问题
            undrug.UserCode  = this.tbUserCode.Text;       //4
            undrug.SpellCode = this.tbSpellCode.Text;      //5
            undrug.WBCode    = this.tbWbCode.Text;         //6

            undrug.GBCode        = this.tbNationCode.Text; //7
            undrug.NationCode    = this.tbIntCode.Text;    //8
            undrug.MedicalRecord = this.tbMedical.Text;    //39
            undrug.Memo          = this.tbMemo.Text;       //25
            if (cmbApplicabilityArea.Tag != null)
            {
                undrug.ApplicabilityArea = cmbApplicabilityArea.Tag.ToString();
            }
            undrug.SpecialFlag      = this.chkProvince.Checked ? "1" : "0";       //29
            undrug.SpecialFlag1     = this.chkTown.Checked ? "1" : "0";           //30
            undrug.SpecialFlag2     = this.chkSelf.Checked ? "1" : "0";           //31
            undrug.IsNeedConfirm    = this.chkConfirm.Checked;                    //15
            undrug.IsNeedBespeak    = this.chkPrecontract.Checked /*是否需要预约*/;     //43
            undrug.IsFamilyPlanning = this.chkFamilyPlane.Checked /*计划生育标记*/;     //12

            undrug.SpecialFlag3        = this.chkSpecialItem.Checked ? "1" : "0"; //32
            undrug.SpecialFlag4        = "1" /*中山一使用,是否强制出单*/;                    //33
            undrug.IsConsent           = this.chkConsent.Checked /*知情同意书*/;       //38
            undrug.IsCompareToMaterial = this.chkCollate.Checked /*对照*/;          //24

            undrug.Grade = "";
            if (this.chkFirst.Checked)
            {
                undrug.Grade = "1";
            }
            if (this.chkSecond.Checked)
            {
                undrug.Grade = "2";
            }
            if (this.chkThird.Checked)
            {
                undrug.Grade = "3";
            }

            //单位标识(0,明细; 1,组套)[2007/01/01 ]
            undrug.UnitFlag = this.chkUnitFlag.Checked ? "1" : "0";
            //操作员
            undrug.Oper.ID = item.Operator.ID;
            return(undrug);
        }
Ejemplo n.º 29
0
        //私有函数,查询医嘱信息
        private ArrayList myOrderQuery(string SQLPatient)
        {
            ArrayList al = new ArrayList();

            if (this.ExecQuery(SQLPatient) == -1)
            {
                return(null);
            }
            try
            {
                while (this.Reader.Read())
                {
                    Neusoft.HISFC.Models.Order.Inpatient.Order objOrder = new Neusoft.HISFC.Models.Order.Inpatient.Order();
                    #region "患者信息"
                    //患者信息——
                    //			1 住院流水号   2住院病历号     3患者科室id      4患者护理id
                    try
                    {
                        objOrder.Patient.ID            = this.Reader[1].ToString();
                        objOrder.Patient.PID.PatientNO = this.Reader[2].ToString();
                        objOrder.Patient.PVisit.PatientLocation.Dept.ID = this.Reader[3].ToString();
                        objOrder.InDept.ID = this.Reader[3].ToString();
                        objOrder.Patient.PVisit.PatientLocation.NurseCell.ID = this.Reader[4].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = "获得患者基本信息出错!" + ex.Message;
                        this.WriteErr();
                        return(null);
                    }
                    #endregion
                    #region "项目信息"
                    //医嘱辅助信息
                    // ——项目信息
                    //	       5项目类别      6项目编码       7项目名称      8项目输入码,    9项目拼音码
                    //	       10项目类别代码 11项目类别名称  12药品规格     13药品基本剂量  14剂量单位
                    //         15最小单位     16包装数量,     17剂型代码     18药品类别  ,   19药品性质
                    //         20零售价       21用法代码      22用法名称     23用法英文缩写  24频次代码
                    //         25频次名称     26每次剂量      27项目总量     28计价单位      29使用天数
                    // 判断药品/非药品
                    //         25频次名称     26每次剂量      27项目总量     28计价单位      29使用天数
                    // 73 样本类型 名称
                    if (this.Reader[5].ToString() == "1")//药品
                    {
                        Neusoft.HISFC.Models.Pharmacy.Item objPharmacy = new Neusoft.HISFC.Models.Pharmacy.Item();
                        try
                        {
                            objPharmacy.ID          = this.Reader[6].ToString();
                            objPharmacy.Name        = this.Reader[7].ToString();
                            objPharmacy.UserCode    = this.Reader[8].ToString();
                            objPharmacy.SpellCode   = this.Reader[9].ToString();
                            objPharmacy.SysClass.ID = this.Reader[10].ToString();
                            //objPharmacy.SysClass.Name = this.Reader[11].ToString();
                            objPharmacy.Specs = this.Reader[12].ToString();
                            //							try
                            //							{
                            if (!this.Reader.IsDBNull(13))
                            {
                                objPharmacy.BaseDose = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[13].ToString());
                            }
                            //}
                            //							catch{}
                            objPharmacy.DoseUnit = this.Reader[14].ToString();
                            objPharmacy.MinUnit  = this.Reader[15].ToString();
                            //try
                            //{
                            if (!this.Reader.IsDBNull(16))
                            {
                                objPharmacy.PackQty = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[16].ToString());
                            }
                            //}
                            //catch{}
                            objPharmacy.DosageForm.ID = this.Reader[17].ToString();
                            objPharmacy.Type.ID       = this.Reader[18].ToString();
                            objPharmacy.Quality.ID    = this.Reader[19].ToString();
                            //try
                            //{
                            if (!this.Reader.IsDBNull(20))
                            {
                                objPharmacy.PriceCollection.RetailPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[20].ToString());
                            }
                            //}
                            //catch{}
                            objOrder.Usage.ID   = this.Reader[21].ToString();
                            objOrder.Usage.Name = this.Reader[22].ToString();
                            objOrder.Usage.Memo = this.Reader[23].ToString();
                        }
                        catch (Exception ex)
                        {
                            this.Err = "获得医嘱项目信息出错!" + ex.Message;
                            this.WriteErr();
                            return(null);
                        }
                        objOrder.Item = objPharmacy;
                    }
                    else if (this.Reader[5].ToString() == "2")//非药品
                    {
                        Neusoft.HISFC.Models.Fee.Item.Undrug objAssets = new Neusoft.HISFC.Models.Fee.Item.Undrug();
                        try
                        {
                            objAssets.ID          = this.Reader[6].ToString();
                            objAssets.Name        = this.Reader[7].ToString();
                            objAssets.UserCode    = this.Reader[8].ToString();
                            objAssets.SpellCode   = this.Reader[9].ToString();
                            objAssets.SysClass.ID = this.Reader[10].ToString();
                            //objAssets.SysClass.Name = this.Reader[11].ToString();
                            objAssets.Specs = this.Reader[12].ToString();
                            //							try
                            //							{
                            if (!this.Reader.IsDBNull(20))
                            {
                                objAssets.Price = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[20].ToString());
                            }
                            //}
                            //							catch{}
                            objAssets.PriceUnit = this.Reader[28].ToString();
                            //样本类型名称
                            objOrder.Sample.Name = this.Reader[73].ToString();
                        }
                        catch (Exception ex)
                        {
                            this.Err = "获得医嘱项目信息出错!" + ex.Message;
                            this.WriteErr();
                            return(null);
                        }
                        objOrder.Item = objAssets;
                    }


                    objOrder.Frequency.ID   = this.Reader[24].ToString();
                    objOrder.Frequency.Name = this.Reader[25].ToString();
                    //try
                    //{
                    if (!this.Reader.IsDBNull(26))
                    {
                        objOrder.DoseOnce = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[26].ToString());                           //}
                    }
                    //catch{}
                    //try
                    //{
                    if (!this.Reader.IsDBNull(27))
                    {
                        objOrder.Qty = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[27].ToString());                           //}
                    }
                    //catch{}
                    objOrder.Unit = this.Reader[28].ToString();
                    //try
                    //{
                    if (!this.Reader.IsDBNull(29))
                    {
                        objOrder.HerbalQty = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[29].ToString());                           //}
                    }
                    //catch{}

                    #endregion
                    #region "医嘱属性"
                    // ——医嘱属性
                    //		   30医嘱类别代码 31医嘱类别名称  32医嘱是否分解:1长期/2临时     33是否计费
                    //		   34药房是否配药 35打印执行单    36是否需要确认
                    try
                    {
                        objOrder.ID             = this.Reader[0].ToString();
                        objOrder.ExtendFlag1    = this.Reader[78].ToString();//临时医嘱执行时间--自定义
                        objOrder.OrderType.ID   = this.Reader[30].ToString();
                        objOrder.OrderType.Name = this.Reader[31].ToString();
                        //try
                        //{
                        if (!this.Reader.IsDBNull(32))
                        {
                            objOrder.OrderType.IsDecompose = System.Convert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[32].ToString()));                           //}
                        }
                        //catch{}
                        //try
                        //{
                        if (!this.Reader.IsDBNull(33))
                        {
                            objOrder.OrderType.IsCharge = System.Convert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[33].ToString()));                           //}
                        }
                        //catch{}
                        //try
                        //{
                        if (!this.Reader.IsDBNull(34))
                        {
                            objOrder.OrderType.IsNeedPharmacy = System.Convert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[34].ToString()));                           //}
                        }
                        //catch{}
                        //try
                        //{
                        if (!this.Reader.IsDBNull(35))
                        {
                            objOrder.OrderType.IsPrint = System.Convert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[35].ToString()));                           //}
                        }
                        //是否打印过医嘱单
                        if (!this.Reader.IsDBNull(84))
                        {
                            objOrder.User03 = this.Reader[84].ToString();                           //}
                        }
                        //catch{}
                        //try
                        //{
                        if (!this.Reader.IsDBNull(36))
                        {
                            objOrder.OrderType.IsConfirm = System.Convert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[36].ToString()));                           //}
                        }
                        //catch{}
                    }
                    catch (Exception ex)
                    {
                        this.Err = "获得医嘱属性信息出错!" + ex.Message;
                        this.WriteErr();
                        return(null);
                    }
                    #endregion
                    #region "执行情况"
                    // ——执行情况
                    //		   37开立医师Id   38开立医师name  39开始时间      40结束时间     41开立科室
                    //		   42开立时间     43录入人员代码  44录入人员姓名  45审核人ID     46审核时间
                    //		   47DC原因代码   48DC原因名称    49DC医师代码    50DC医师姓名   51Dc时间
                    //         52执行人员代码 53执行时间      54执行科室代码  55执行科室名称
                    //		   56本次分解时间 57下次分解时间
                    try
                    {
                        objOrder.ReciptDoctor.ID   = this.Reader[37].ToString();
                        objOrder.ReciptDoctor.Name = this.Reader[38].ToString();
                        //try{
                        if (!this.Reader.IsDBNull(39))
                        {
                            objOrder.BeginTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[39].ToString());
                        }
                        //}
                        //catch{}
                        //try{
                        if (!this.Reader.IsDBNull(40))
                        {
                            objOrder.EndTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[40].ToString());
                        }
                        //}
                        //catch{}
                        objOrder.ReciptDept.ID = this.Reader[41].ToString();//InDept.ID
                        //try{
                        if (!this.Reader.IsDBNull(42))
                        {
                            objOrder.MOTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[42].ToString());
                        }
                        //}
                        //catch{}
                        objOrder.Oper.ID   = this.Reader[43].ToString();
                        objOrder.Oper.Name = this.Reader[44].ToString();
                        objOrder.Nurse.ID  = this.Reader[45].ToString();
                        //try{
                        if (!this.Reader.IsDBNull(46))
                        {
                            objOrder.ConfirmTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[46].ToString());
                        }
                        //}
                        //catch{}
                        objOrder.DcReason.ID   = this.Reader[47].ToString();
                        objOrder.DcReason.Name = this.Reader[48].ToString();
                        objOrder.DCOper.ID     = this.Reader[49].ToString();
                        objOrder.DCOper.Name   = this.Reader[50].ToString();
                        //try{
                        if (!this.Reader.IsDBNull(51))
                        {
                            objOrder.DCOper.OperTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[51].ToString());
                        }
                        //}
                        //catch{}
                        objOrder.ExecOper.ID = this.Reader[52].ToString();
                        //try{
                        if (!this.Reader.IsDBNull(53))
                        {
                            objOrder.ExecOper.OperTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[53].ToString());
                        }

                        objOrder.ExeDept.ID   = this.Reader[54].ToString();
                        objOrder.ExeDept.Name = this.Reader[55].ToString();

                        objOrder.ExecOper.Dept.ID   = this.Reader[54].ToString();
                        objOrder.ExecOper.Dept.Name = this.Reader[55].ToString();

                        if (!this.Reader.IsDBNull(56))
                        {
                            objOrder.CurMOTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[56].ToString());
                        }

                        if (!this.Reader.IsDBNull(57))
                        {
                            objOrder.NextMOTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[57].ToString());
                        }
                    }
                    catch (Exception ex)
                    {
                        this.Err = "获得医嘱执行情况信息出错!" + ex.Message;
                        this.WriteErr();
                        return(null);
                    }
                    #endregion
                    #region "医嘱类型"
                    // ——医嘱类型
                    //		   58是否婴儿(1是/2否)          59发生序号      60组合序号     61主药标记
                    //		   62是否附材'1'  63是否包含附材  64医嘱状态      65扣库标记     66执行标记1未执行/2已执行/3DC执行
                    //		   67医嘱说明                     68加急标记:1普通/2加急         69排列序号
                    //         70 批注       ,       71检查部位备注    ,72 整档标记,74 取药药房编码 81 是否皮试
                    try
                    {
                        if (!this.Reader.IsDBNull(58))
                        {
                            objOrder.IsBaby = Neusoft.FrameWork.Function.NConvert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[58].ToString()));
                        }

                        if (!this.Reader.IsDBNull(59))
                        {
                            objOrder.BabyNO = this.Reader[59].ToString();
                        }

                        objOrder.Combo.ID = this.Reader[60].ToString();

                        if (!this.Reader.IsDBNull(61))
                        {
                            objOrder.Combo.IsMainDrug = Neusoft.FrameWork.Function.NConvert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[61].ToString()));
                        }

                        if (!this.Reader.IsDBNull(62))
                        {
                            objOrder.IsSubtbl = Neusoft.FrameWork.Function.NConvert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[62].ToString()));
                        }

                        if (!this.Reader.IsDBNull(63))
                        {
                            objOrder.IsHaveSubtbl = Neusoft.FrameWork.Function.NConvert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[63].ToString()));
                        }

                        if (!this.Reader.IsDBNull(64))
                        {
                            objOrder.Status = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[64].ToString());
                        }

                        if (!this.Reader.IsDBNull(65))
                        {
                            objOrder.IsStock = Neusoft.FrameWork.Function.NConvert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[65].ToString()));
                        }


                        if (!this.Reader.IsDBNull(66))
                        {
                            objOrder.ExecStatus = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[66].ToString());
                        }

                        objOrder.Note = this.Reader[67].ToString();

                        if (!this.Reader.IsDBNull(68))
                        {
                            objOrder.IsEmergency = Neusoft.FrameWork.Function.NConvert.ToBoolean(Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[68].ToString()));
                        }

                        if (!this.Reader.IsDBNull(69))
                        {
                            objOrder.SortID = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[69]);
                        }

                        objOrder.Memo            = this.Reader[70].ToString();
                        objOrder.CheckPartRecord = this.Reader[71].ToString();
                        objOrder.Reorder         = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[72].ToString());
                        objOrder.StockDept.ID    = this.Reader[74].ToString();//取药药房编码
                        try
                        {
                            if (!this.Reader.IsDBNull(75))
                            {
                                objOrder.IsPermission = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[75]);                           //患者用药知情
                            }
                        }
                        catch { }
                        objOrder.Package.ID   = this.Reader[76].ToString();
                        objOrder.Package.Name = this.Reader[77].ToString();
                        objOrder.ExtendFlag2  = this.Reader[79].ToString();
                        objOrder.ExtendFlag3  = this.Reader[80].ToString();
                        try
                        {
                            if (!this.Reader.IsDBNull(81))
                            {
                                objOrder.HypoTest = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[81].ToString());//1 不需皮试 2 需皮试 3 阳 4 阴
                            }
                        }
                        catch
                        {
                            objOrder.HypoTest = 1;
                        }

                        objOrder.Frequency.Time = this.Reader[82].ToString(); //执行时间
                        objOrder.ExecDose       = this.Reader[83].ToString(); //特殊频次剂量
                    }
                    catch (Exception ex)
                    {
                        this.Err = "获得医嘱类型信息出错!" + ex.Message;
                        this.WriteErr();
                        return(null);
                    }
                    #endregion
                    al.Add(objOrder);
                }
            }
            catch (Exception ex)
            {
                this.Err     = "获得医嘱信息出错!" + ex.Message;
                this.ErrCode = "-1";
                this.WriteErr();
                return(null);
            }
            this.Reader.Close();
            return(al);
        }
        /// <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);
        }