示例#1
0
        /// <summary>
        /// 生成日结实体
        /// </summary>
        private void SetReport()
        {
            for (int i = 0; i < this.objDayReport.Details.Count; i++)
            {
                Neusoft.HISFC.Object.Registration.DayDetail detail = this.objDayReport.Details[i];
                detail.OrderNO = i.ToString();

                this.objDayReport.SumCount += detail.Count;
                if (detail.Status == Neusoft.HISFC.Object.Base.EnumRegisterStatus.Cancel)
                {
                    continue;
                }

                this.objDayReport.SumRegFee  += detail.RegFee;
                this.objDayReport.SumChkFee  += detail.ChkFee;
                this.objDayReport.SumDigFee  += detail.DigFee;
                this.objDayReport.SumOthFee  += detail.OthFee;
                this.objDayReport.SumOwnCost += detail.OwnCost;
                this.objDayReport.SumPayCost += detail.PayCost;
                this.objDayReport.SumPubCost += detail.PubCost;
            }
        }
示例#2
0
        /// <summary>
        /// 生成日结明细实体
        /// </summary>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        /// <param name="operID"></param>
        /// <param name="operName"></param>
        private void SetReportDetail(DateTime begin, DateTime end, string operID, string operName)
        {
            DateTime current = this.regMgr.GetDateTimeFromSysDateTime();

            this.objDayReport               = new Neusoft.HISFC.Object.Registration.DayReport();
            this.objDayReport.BeginDate     = begin;
            this.objDayReport.EndDate       = end;
            this.objDayReport.Oper.ID       = operID;
            this.objDayReport.Oper.Name     = operName;
            this.objDayReport.Oper.OperTime = current;

            Neusoft.HISFC.Object.Registration.DayDetail detail = new Neusoft.HISFC.Object.Registration.DayDetail();
            detail.EndRecipeNo = "-1";

            //生成日报实体,原则:连续处方、处方状态一致的合为一条日结明细
            for (int i = 0; i < this.dsRegInfo.Tables[0].Rows.Count; i++)
            {
                DataRow row = this.dsRegInfo.Tables[0].Rows[i];


                ///
                ///挂号状态为退号、日结人不是作废人、未日结,此种情况为别人退该操作员号,此号有效
                ///
                if (row[8].ToString() == "0" && operID != row[9].ToString())
                {
                    row[8] = "1";//置为有效
                }


                if (long.Parse(row[0].ToString()) - 1 != long.Parse(detail.EndRecipeNo) || //处方不连续
                    int.Parse(row[8].ToString()) != (int)detail.Status)                    //状态改变
                {
                    //生成新的日结明细
                    if (i != 0)//第一条不处理
                    {
                        this.objDayReport.Details.Add(detail);
                    }

                    //重新生成新的明细
                    detail = new Neusoft.HISFC.Object.Registration.DayDetail();
                    detail.BeginRecipeNo = row[0].ToString();    //开始号
                    detail.EndRecipeNo   = detail.BeginRecipeNo; //Convert.ToString(long.Parse(row[0].ToString()) -1) ;
                    detail.Status        = (Neusoft.HISFC.Object.Base.EnumRegisterStatus) int.Parse(row[8].ToString());
                }

                detail.EndRecipeNo = row[0].ToString();
                detail.Count++;
                detail.RegFee  += decimal.Parse(row[1].ToString());
                detail.ChkFee  += decimal.Parse(row[2].ToString());
                detail.DigFee  += decimal.Parse(row[3].ToString());
                detail.OthFee  += decimal.Parse(row[4].ToString());
                detail.OwnCost += decimal.Parse(row[5].ToString());
                detail.PayCost += decimal.Parse(row[6].ToString());
                detail.PubCost += decimal.Parse(row[7].ToString());

                if (i == this.dsRegInfo.Tables[0].Rows.Count - 1)
                {
                    this.objDayReport.Details.Add(detail);//最后一条也重新生成明细
                }
            }
        }