コード例 #1
0
        /// <summary>
        /// 检查开立医嘱项目有效性
        /// </summary>
        /// <param name="patient"></param>
        /// <param name="feeDetails"></param>
        /// <returns></returns>
        public int CheckOrderInpatient(Neusoft.HISFC.Models.RADT.PatientInfo patient, Neusoft.HISFC.Models.Base.Item item)
        {
            if (patient.Pact.PayKind.ID == "02")
            {
                Neusoft.HISFC.Models.SIInterface.Compare obj = new Neusoft.HISFC.Models.SIInterface.Compare();
                if (this.interfaceMar.GetCompareSingleItemJN("2", item.ID, ref obj) == 0)
                {
                    if (obj.CenterItem.Rate == 100)
                    {
                        this.errMsg = "药品【" + obj.Name + "】为医保目录内项目,自付比例为100%,请让患者签订自费协议书!";

                        return(0);
                    }
                    else if (obj.CenterItem.Memo.Contains("限"))
                    {
                        this.errMsg = "药品【" + obj.Name + "】为医保目录内项目,限制类项目,请让患者签订知情同意书!";
                        return(0);
                    }
                }
                else
                {
                    this.errMsg = "医保患者不允许开立目录外的药品!\n药品【" + item.Name + "】属于目录外或是未进行对照的项目。\n如有问题,请联系医保办。";

                    return(-1);
                }
            }

            return(1);
        }
コード例 #2
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);
        }
コード例 #3
0
ファイル: ucSIDataDownLoad.cs プロジェクト: chuJianNi/yb
 private void downLoadCompareInfo()
 {
     #region 对照信息目录下载
     string filePath = Application.StartupPath + "downloadfile\\dzml.txt";
     if (Functions.down_yyxm("379902", filePath, 1, false) != 0)
     {
         string err = Functions.get_errtext();
         MessageBox.Show("下载项目对照信息出错:" + err);
         this.typeCode = string.Empty;
         this.list.Clear();
         return;
     }
     #endregion
     #region 读取文件
     System.IO.StreamReader reader = new System.IO.StreamReader(filePath, Encoding.Default);
     try
     {
         //初始状态
         this.list.Clear();
         Neusoft.HISFC.Models.SIInterface.Compare objCom;
         int    n    = 0;
         string line = string.Empty;
         while (!reader.EndOfStream)
         {
             line = reader.ReadLine();
             if (line == "")
             {
                 continue;
             }
             string[] items = line.Split(new char[] { (char)',' });
             objCom = new Neusoft.HISFC.Models.SIInterface.Compare();
             //objCom.ID = items[0];
             objCom.HisCode             = items[0];                                                //医院项目编码
             objCom.Name                = items[1];                                                //医院项目名称
             objCom.CenterItem.ID       = items[4];                                                //中心项目编码
             objCom.CenterItem.DoseCode = items[8];                                                //剂型
             objCom.CenterItem.Specs    = items[5];                                                //规格
             objCom.CenterItem.Price    = Neusoft.FrameWork.Function.NConvert.ToDecimal(items[7]); //医保最高价
             objCom.CenterItem.Rate     = Neusoft.FrameWork.Function.NConvert.ToDecimal(items[2]); //自负比例
             objCom.CenterItem.Memo     = items[3];                                                //存放自负比例说明
             objCom.Memo                = "2";                                                     //标识医保合同单位
             //diease.User01 = items[0];
             this.list.Add(objCom);
         }
         //MessageBox.Show("共计:" + this.list.Count + "条记录", "提示");
     }
     catch (Exception exp)
     {
         MessageBox.Show("读取下载文件出错!\n" + exp.Message, "提示");
         this.typeCode = string.Empty;
         this.list.Clear();
         return;
     }
     #endregion
 }
コード例 #4
0
 private void SetValue()
 {
     if (this.isModify)
     {
         if (this.compare != null)
         {
             Neusoft.HISFC.Models.SIInterface.Compare com = new Neusoft.HISFC.Models.SIInterface.Compare();
             this.interfaceMgr.GetCompareSingleItem(this.pactCode, this.compare.HisCode, ref com);
             this.txtItemCode.Text = com.CenterItem.ID;
             this.txtName.Text     = com.CenterItem.Name;
             this.txtPrice.Text    = com.CenterItem.Price.ToString("0.00");
             this.txtRate.Text     = com.CenterItem.Rate.ToString("0.00");
             this.txtMemo.Text     = com.CenterItem.Memo;
         }
         else
         {
             MessageBox.Show("获取市离休编码为 " + this.itemCode + " 目录出错!");
         }
     }
 }
コード例 #5
0
        /// <summary>
        /// 从对照表中查找维护适应症的项目
        /// </summary>
        /// <param name="patientObj"></param>
        /// <param name="feeitemlist"></param>
        /// <param name="practicableSymptomText">适应症文本</param>
        /// <returns> -1 报错 0 没有维护 1 有维护</returns>
        private int QueryItem(Neusoft.HISFC.Models.RADT.PatientInfo patientObj, Neusoft.HISFC.Models.Fee.Inpatient.FeeItemList feeitemlist, ref string practicableSymptomText)
        {
            Neusoft.HISFC.BizLogic.Fee.Interface     myInterface = new Neusoft.HISFC.BizLogic.Fee.Interface();
            Neusoft.HISFC.Models.SIInterface.Compare myCompare   = new Neusoft.HISFC.Models.SIInterface.Compare();

            if (patientObj != null || patientObj.ID != "")
            {
                myInterface.GetCompareSingleItem(patientObj.Pact.ID, feeitemlist.Item.ID, ref myCompare);
                if (myCompare.Ispracticablesymptom)
                {
                    practicableSymptomText = myCompare.Practicablesymptomdepiction;
                    return(1);
                }
                else
                {
                    return(0);
                }
            }
            if (feeitemlist.Item.Memo != "1")
            {
                //从维护表中对照项目
            }
            return(0);
        }
コード例 #6
0
        /// <summary>
        /// 从对照表中查找维护适应症的项目
        /// </summary>
        /// <param name="patient"></param>
        /// <param name="order"></param>
        /// <param name="practicableSymptomText">适应症文本</param>
        /// <returns> -1 报错 0 没有维护 1 有维护</returns>
        private int QueryItemByOutpatOrder(Neusoft.HISFC.Models.Registration.Register patient, Neusoft.HISFC.Models.Order.OutPatient.Order order, ref string practicableSymptomText)
        {
            Neusoft.HISFC.BizLogic.Fee.Interface     myInterface = new Neusoft.HISFC.BizLogic.Fee.Interface();
            Neusoft.HISFC.Models.SIInterface.Compare myCompare   = new Neusoft.HISFC.Models.SIInterface.Compare();

            if (order != null || order.Patient.ID != "")
            {
                myInterface.GetCompareSingleItem(patient.Pact.ID, order.Item.ID, ref myCompare);
                if (myCompare.Ispracticablesymptom)
                {
                    practicableSymptomText = myCompare.Practicablesymptomdepiction;
                    return(1);
                }
                else
                {
                    return(0);
                }
            }
            if (order.Item.Memo != "1")
            {
                //从维护表中对照项目
            }
            return(0);
        }
コード例 #7
0
        /// <summary>
        /// 设置患者的非药品费用明细
        /// </summary>
        /// <param name="inPatientNo"></param>
        public void SetPatientItemListToChcek(string inPatientNo)
        {
            ArrayList itemList = this.localManager.QueryInpatientItemListToCheck(inPatientNo, this.patientInfo.Pact.ID);

            if (itemList == null)
            {
                MessageBox.Show("获取【" + inPatientNo + "】的非药品费用明细失败 " + this.localManager.Err);
                return;
            }

            int i = 0;

            foreach (Neusoft.HISFC.Models.Fee.Inpatient.FeeItemList item in itemList)
            {
                this.fpItem_Sheet1.Rows.Add(i, 1);
                this.fpItem_Sheet1.Rows[i].Tag = item;

                if (item.Item.SpecialFlag3 == "1")
                {
                    this.fpItem_Sheet1.Cells[i, 0].Value = true;
                    this.fpItem_Sheet1.Rows[i].ForeColor = Color.Black;
                }
                else
                {
                    this.fpItem_Sheet1.Cells[i, 0].Value = false;
                    this.fpItem_Sheet1.Rows[i].ForeColor = Color.Blue;
                }

                if (string.IsNullOrEmpty(item.Item.SpecialFlag1) && item.Item.SpecialFlag3 != "1")
                {
                    ArrayList rateList = this.localManager.QueryComparedItemCenterRate("2", item.Item.ID);
                    Neusoft.HISFC.Models.SIInterface.Compare compare = this.localManager.QueryComparedItemCenterRateBeforeCheck("2", item.Item.ID);
                    if (compare == null)
                    {
                        MessageBox.Show("从对照表取自付比例失败 " + this.localManager.Err);
                        return;
                    }

                    if (string.IsNullOrEmpty(compare.CenterItem.User01.ToString()))
                    {
                        item.Item.SpecialFlag1 = compare.CenterItem.User01.ToString();
                    }
                    else
                    {
                        item.Item.SpecialFlag1 = compare.CenterItem.Rate.ToString();
                    }
                    item.Item.SpecialFlag2 = compare.CenterItem.Memo;

                    if (rateList != null && rateList.Count == 1)
                    {
                        this.fpItem_Sheet1.Rows[i].ForeColor = Color.Black;
                        this.fpItem_Sheet1.Cells[i, 0].Value = true;
                    }
                }


                if (string.IsNullOrEmpty(item.Item.SpecialFlag1) && item.Item.SpecialFlag3 != "1")
                {
                    this.fpItem_Sheet1.Cells[i, 2].Text      = "目录外或是未对照";
                    this.fpItem_Sheet1.Cells[i, 2].ForeColor = Color.Red;
                }
                else if (string.IsNullOrEmpty(item.Item.SpecialFlag1) && item.Item.SpecialFlag1 == "1")
                {
                    this.fpItem_Sheet1.Cells[i, 2].Text      = "该项目已审核为空比例,不进行上传";
                    this.fpItem_Sheet1.Cells[i, 2].ForeColor = Color.Red;
                }
                else
                {
                    this.fpItem_Sheet1.Cells[i, 1].Text = item.Item.SpecialFlag1; //自付比例
                    this.fpItem_Sheet1.Cells[i, 2].Text = item.Item.SpecialFlag2; //自付比例说明
                }

                this.fpItem_Sheet1.Cells[i, 3].Text  = item.Item.Name;                   //药品名称
                this.fpItem_Sheet1.Cells[i, 4].Text  = item.Item.Specs;                  //规格
                this.fpItem_Sheet1.Cells[i, 5].Text  = item.Item.PriceUnit;              //计价单位
                this.fpItem_Sheet1.Cells[i, 6].Text  = item.Item.SpecialFlag;            //最小单位
                this.fpItem_Sheet1.Cells[i, 7].Text  = item.Item.Qty.ToString();         //开立数量
                this.fpItem_Sheet1.Cells[i, 8].Text  = item.Item.Price.ToString();       //单价
                this.fpItem_Sheet1.Cells[i, 9].Text  = item.FT.TotCost.ToString();       //金额
                this.fpItem_Sheet1.Cells[i, 10].Text = item.FeeOper.OperTime.ToString(); //收费时间
                this.fpItem_Sheet1.Cells[i, 11].Text = item.Item.SysClass.Name;          //类型
                this.fpItem_Sheet1.Cells[i, 12].Text = item.RecipeOper.Name;             //开立医师
                this.fpItem_Sheet1.Cells[i, 13].Text = item.RecipeOper.Dept.Name;        //开立科室
                this.fpItem_Sheet1.Cells[i, 14].Text = item.ExecOper.Dept.Name;          //执行科室
                this.fpItem_Sheet1.Cells[i, 15].Text = item.Item.ID;
            }

            //for (int j = 1; j < this.fpItem_Sheet1.Columns.Count; j++)
            //{
            //    this.fpItem_Sheet1.Columns[i].Locked = true;
            //}
        }
コード例 #8
0
ファイル: Functions.cs プロジェクト: ewin66/Management-System
        public int RecomputeFeeItemListInpatient(Neusoft.HISFC.Models.RADT.PatientInfo patient, Neusoft.HISFC.Models.Fee.Inpatient.FeeItemList f)
        {
            //Neusoft.HISFC.Models.Base.PactItemRate pRate = null;

            //if (this.trans != null)
            //{
            //    this.pactItemRate.SetTrans(this.trans);
            //    this.pactInfoManager.SetTrans(this.trans);
            //}

            //pRate = this.pactItemRate.GetOnepPactUnitItemRateByItem(patient.Pact.ID, f.Item.ID);
            //if (pRate == null)
            //{
            //    pRate = this.pactItemRate.GetOnePaceUnitItemRateByFeeCode(patient.Pact.ID, f.Item.MinFee.ID);
            //    if (pRate == null)
            //    {
            //        Neusoft.HISFC.Models.Base.PactInfo p = this.pactInfoManager.GetPactUnitInfoByPactCode(patient.Pact.ID);
            //        if (p == null)
            //        {
            //            this.errMsg = this.pactInfoManager.Err;

            //            return -1;
            //        }

            //        pRate = new Neusoft.HISFC.Models.Base.PactItemRate();

            //        pRate.Rate = p.Rate;
            //    }
            //}

            //decimal pubCost = 0;


            //f.FT.OwnCost = Neusoft.FrameWork.Public.String.FormatNumber(f.FT.TotCost * pRate.Rate.OwnRate, 2);

            //pubCost = f.FT.TotCost - f.FT.OwnCost;

            //f.FT.PayCost = Neusoft.FrameWork.Public.String.FormatNumber(pubCost * pRate.Rate.PayRate, 2);

            //f.FT.PubCost = pubCost - f.FT.PayCost;

            Neusoft.HISFC.Models.SIInterface.Compare compareObj = new Neusoft.HISFC.Models.SIInterface.Compare();
            int resultValue = interfaceManager.GetCompareSingleItem(comparePactCode, f.Item.ID, ref compareObj);

            if (resultValue == -1)
            {
                this.errMsg = "查询对照项目信息失败!" + interfaceManager.Err;
                return(-1);
            }
            if (resultValue == -2)
            {
                f.FT.OwnCost = f.FT.TotCost;
                f.FT.PubCost = 0;
                f.FT.PayCost = 0;
            }
            else
            {
                decimal payRate = compareObj.CenterItem.Rate;
                if (payRate == 1)
                {
                    f.FT.OwnCost = f.FT.TotCost;
                    f.FT.PubCost = 0;
                    f.FT.PayCost = 0;
                }
                else
                {
                    decimal pubPrice = f.Item.Price * (1 - compareObj.CenterItem.Rate);
                    if (pubPrice > compareObj.CenterItem.Price)
                    {
                        pubPrice = compareObj.CenterItem.Price;
                    }
                    if (f.Item.ItemType == Neusoft.HISFC.Models.Base.EnumItemType.Drug)
                    {
                        f.FT.PubCost = Neusoft.FrameWork.Public.String.FormatNumber(pubPrice * f.Item.Qty / f.Item.PackQty, 2);
                    }

                    f.FT.OwnCost = f.FT.TotCost - f.FT.PubCost;
                    f.FT.PayCost = 0m;
                }
            }


            return(1);
        }
コード例 #9
0
        /// <summary>
        /// 显示患者明细
        /// </summary>
        private void ShowFeeDetailsToFP()
        {
            if (this.patientInfo == null)
            {
                return;
            }

            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在搜索费用明细,请稍后...");
            Application.DoEvents();

            #region 查询明细
            //查找非药品明细
            ArrayList alItemDetailTemp = this.localManager.QueryFeeItemLists(this.patientInfo.ID, this.patientInfo.Pact.ID, new DateTime(1900, 1, 1),
                                                                             new DateTime(2100, 1, 1), "NO");

            //查找药品明细
            ArrayList alDrugDetailTemp = this.localManager.QueryMedItemLists(this.patientInfo.ID, this.patientInfo.Pact.ID, new DateTime(1900, 1, 1),
                                                                             new DateTime(2100, 1, 1), "NO");

            alItemDetail = new ArrayList();
            if (alItemDetailTemp != null && alItemDetailTemp.Count > 0)
            {
                alItemDetail.AddRange(alItemDetailTemp);
            }
            if (alDrugDetailTemp != null && alDrugDetailTemp.Count > 0)
            {
                alItemDetail.AddRange(alDrugDetailTemp);
            }
            if (alItemDetail.Count == 0)
            {
                MessageBox.Show("无费用信息!");
                return;
            }
            #endregion

            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在显示费用明细,请稍后...");

            #region 查询明细对应的医保信息 并显示到界面

            this.neuSpread1.Sheets[1].Reset();
            this.neuSpread1.Sheets[1].RowCount      = alItemDetail.Count + 1;
            this.neuSpread1.Sheets[1].Columns.Count = 18;
            int rowCount = 0;
            foreach (Neusoft.HISFC.Models.Fee.Inpatient.FeeItemList item in alItemDetail)
            {
                if (htCompare.Contains(item.Compare.CenterItem.ID))
                {
                    item.Compare = htCompare[item.Compare.CenterItem.ID] as Neusoft.HISFC.Models.SIInterface.Compare;
                }
                else
                {
                    Neusoft.HISFC.Models.SIInterface.Compare com = new Neusoft.HISFC.Models.SIInterface.Compare();
                    this.interfaceMgr.GetCompareSingleItem(this.patientInfo.Pact.ID, item.Item.ID, ref com);
                    if (string.IsNullOrEmpty(item.Compare.CenterItem.ID) == true)
                    {
                        //没有对照项目的处理
                    }
                    else
                    {
                        //已经对照的项目
                        item.Compare = com.Clone();
                        htCompare.Add(item.Compare.CenterItem.ID, item.Compare);
                    }
                }
                this.neuSpread1.Sheets[1].Cells[rowCount++, 0].Value  = this.patientInfo.IDCard;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 1].Value  = this.patientInfo.SIMainInfo.RegNo;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 2].Value  = rowCount.ToString();
                this.neuSpread1.Sheets[1].Cells[rowCount++, 3].Value  = item.Compare.CenterItem.ID;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 4].Value  = item.Compare.CenterItem.Name;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 5].Value  = item.Item.Name;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 6].Value  = item.Compare.CenterItem.SysClass;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 7].Value  = item.Compare.CenterItem.Specs;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 8].Value  = item.Compare.CenterItem.DoseCode;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 9].Value  = item.Item.Price.ToString("0.00");
                this.neuSpread1.Sheets[1].Cells[rowCount++, 10].Value = item.Item.Qty.ToString("0.00");
                decimal sum = item.Item.Price * item.Item.Qty;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 11].Value = sum.ToString("0.00");
                this.neuSpread1.Sheets[1].Cells[rowCount++, 12].Value = item.Compare.CenterItem.Rate;
                decimal ownFee = sum * item.Compare.CenterItem.Rate;
                this.neuSpread1.Sheets[1].Cells[rowCount++, 13].Value = ownFee.ToString("0.00");
                this.neuSpread1.Sheets[1].Cells[rowCount++, 14].Value = item.RecipeNO + item.SequenceNO.ToString().PadLeft(2, '0');
                this.neuSpread1.Sheets[1].Cells[rowCount++, 15].Value = item.FeeOper.OperTime.ToString("yyyy.MM.dd");
                this.neuSpread1.Sheets[1].Cells[rowCount++, 16].Value = "";
                this.neuSpread1.Sheets[1].Cells[rowCount++, 17].Value = item.FeeOper.OperTime.ToString("yyyyMMdd");

                Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm(rowCount, alItemDetail.Count);
                Application.DoEvents();
            }

            this.neuSpread1.ActiveSheetIndex = 1;

            #endregion

            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在显示汇总,请稍后...");
            Application.DoEvents();

            #region 显示汇总

            this.neuSpread1.Sheets[1].Cells[alItemDetail.Count, 0].Value    = "汇总:";
            this.neuSpread1.Sheets[1].Cells[alItemDetail.Count, 11].Formula = "sum(L1:L" + alItemDetail.Count.ToString() + ")";
            this.neuSpread1.Sheets[1].Cells[alItemDetail.Count, 13].Formula = "sum(N1:N" + alItemDetail.Count.ToString() + ")";

            #endregion

            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
        }
コード例 #10
0
 /// <summary>
 /// 审批结果查询
 /// </summary>
 /// <param name="compare"></param>
 /// <returns></returns>
 public int getMaintainResult(Neusoft.HISFC.Models.SIInterface.Compare compare)
 {
     return(1);
 }
コード例 #11
0
 /// <summary>
 /// 定点机构药品目录撤销维护(项目对照)
 /// </summary>
 /// <param name="pactCode"></param>
 /// <param name="drugCompareOld"></param>
 /// <returns></returns>
 public int deleteItemCompare(Neusoft.HISFC.Models.SIInterface.Compare compare)
 {
     return(1);
 }
コード例 #12
0
 /// <summary>
 /// 定点机构药品目录提交维护(药品对照)
 /// </summary>
 /// <param name="pactCode"></param>
 /// <param name="drugCompareOld"></param>
 /// <returns></returns>
 public int upLoadDrugCompare(Neusoft.HISFC.Models.SIInterface.Compare compare)
 {
     return(1);
 }