コード例 #1
0
ファイル: InsPlans.cs プロジェクト: luisurbinanet/apolloniax
        ///<summary>Get pending insurance for a given plan for one benefit year. Include a ClaimProcList which is all claimProcs for the patient.  Must supply all benefits for patient so that we know if it's a service year or a calendar year.  asofDate used to determine which benefit year to calc.  Usually the date of service for a claim.  The insplan.PlanNum is the plan to get value for.</summary>
        public static double GetPending(ClaimProc[] ClaimProcList, DateTime asofDate, InsPlan curPlan, int patPlanNum, int excludeClaim, Benefit[] benList)
        {
            //InsPlan curPlan=GetPlan(planNum,PlanList);
            if (curPlan == null)
            {
                return(0);
            }
            //get the most recent renew date, possibly including today:
            DateTime renewDate = Benefits.GetRenewDate(benList, curPlan.PlanNum, patPlanNum, curPlan.DateEffective, asofDate);
            DateTime stopDate  = renewDate.AddYears(1);
            double   retVal    = 0;

            for (int i = 0; i < ClaimProcList.Length; i++)
            {
                if (ClaimProcList[i].PlanNum == curPlan.PlanNum &&
                    ClaimProcList[i].ClaimNum != excludeClaim &&
                    ClaimProcList[i].ProcDate < stopDate &&
                    ClaimProcList[i].ProcDate >= renewDate
                    //enum ClaimProcStatus{NotReceived,Received,Preauth,Adjustment,Supplemental}
                    && ClaimProcList[i].Status == ClaimProcStatus.NotReceived)
                //Status Adjustment has no insPayEst, so can ignore it here.
                {
                    retVal += ClaimProcList[i].InsPayEst;
                }
            }
            return(retVal);
        }
コード例 #2
0
        /// <summary>Get insurance benefits used for one benefit year.  Returns actual insurance used based on ClaimProc data. Must supply all claimprocs for the patient.  Must supply all benefits for patient so that we know if it's a service year or a calendar year.  asofDate is used to determine which benefit year to calc.  Usually date of service for a claim.  The insplan.PlanNum is the plan to get value for.  ExcludeClaim is the ClaimNum to exclude, or enter -1 to include all.</summary>
        public static double GetInsUsed(ClaimProc[] ClaimProcList, DateTime asofDate, int planNum, int patPlanNum, int excludeClaim, InsPlan[] PlanList, Benefit[] benList)
        {
            InsPlan curPlan = GetPlan(planNum, PlanList);

            if (curPlan == null)
            {
                return(0);
            }
            //get the most recent renew date, possibly including today:
            DateTime renewDate = Benefits.GetRenewDate(benList, planNum, patPlanNum, curPlan.DateEffective, asofDate);
            //DateTime startDate;//for benefit year
            DateTime stopDate = renewDate.AddYears(1);

            /*
             * //if renew date is earlier this year or is today(assuming typical situation of date being today)
             * if(renewDate.Month <= date.Month && renewDate.Day <= date.Day) {
             *      startDate=new DateTime(date.Year,renewDate.Month,renewDate.Day);
             *      stopDate=new DateTime(date.Year+1,renewDate.Month,renewDate.Day);
             * }
             * else {//otherwise, renew date must be late last year
             *      startDate=new DateTime(date.Year-1,renewDate.Month,renewDate.Day);
             *      stopDate=new DateTime(date.Year,renewDate.Month,renewDate.Day);
             * }*/
            double retVal = 0;

            for (int i = 0; i < ClaimProcList.Length; i++)
            {
                if (ClaimProcList[i].PlanNum == planNum &&
                    ClaimProcList[i].ClaimNum != excludeClaim &&
                    ClaimProcList[i].ProcDate < stopDate &&
                    ClaimProcList[i].ProcDate >= renewDate
                    //enum ClaimProcStatus{NotReceived,Received,Preauth,Adjustment,Supplemental}
                    && ClaimProcList[i].Status != ClaimProcStatus.Preauth)
                {
                    if (ClaimProcList[i].Status == ClaimProcStatus.Received ||
                        ClaimProcList[i].Status == ClaimProcStatus.Adjustment ||
                        ClaimProcList[i].Status == ClaimProcStatus.Supplemental)
                    {
                        retVal += ClaimProcList[i].InsPayAmt;
                    }
                    else                      //NotReceived
                                              //retVal-=ClaimProcList[i].InsPayEst;
                    {
                    }
                }
            }
            return(retVal);
        }
コード例 #3
0
        ///<summary>Get pending insurance for a given plan for one benefit year. Include a ClaimProcList which is all claimProcs for the patient.  Must supply all benefits for patient so that we know if it's a service year or a calendar year.  asofDate used to determine which benefit year to calc.  Usually the date of service for a claim.  The insplan.PlanNum is the plan to get value for.</summary>
        public static double GetPending(ClaimProc[] ClaimProcList, DateTime asofDate, int planNum, int patPlanNum, int excludeClaim, InsPlan[] PlanList, Benefit[] benList)
        {
            InsPlan curPlan = GetPlan(planNum, PlanList);

            if (curPlan == null)
            {
                return(0);
            }
            //get the most recent renew date, possibly including today:
            //MessageBox.Show("mark1");
            DateTime renewDate = Benefits.GetRenewDate(benList, planNum, patPlanNum, curPlan.DateEffective, asofDate);
            //MessageBox.Show("mark2");
            //DateTime startDate;//for benefit year
            DateTime stopDate = renewDate.AddYears(1);
            //if renew date is earlier this year or is today(assuming typical situation of date being today)
            //Debug.WriteLine(renewDate.Month);
            //Debug.WriteLine(date.Month);
            //MessageBox.Show((renewDate.Month <= date.Month).ToString());
            //MessageBox.Show((renewDate.Day <= date.Day).ToString());

            /*if(renewDate.Month <= date.Month && renewDate.Day <= date.Day) {
             *      startDate=new DateTime(date.Year,renewDate.Month,renewDate.Day);
             *      stopDate=new DateTime(date.Year+1,renewDate.Month,renewDate.Day);
             * }
             * else {//otherwise, renew date must be late last year
             *      startDate=new DateTime(date.Year-1,renewDate.Month,renewDate.Day);
             *      stopDate=new DateTime(date.Year,renewDate.Month,renewDate.Day);
             * }*/
            double retVal = 0;

            for (int i = 0; i < ClaimProcList.Length; i++)
            {
                if (ClaimProcList[i].PlanNum == planNum &&
                    ClaimProcList[i].ClaimNum != excludeClaim &&
                    ClaimProcList[i].ProcDate < stopDate &&
                    ClaimProcList[i].ProcDate >= renewDate
                    //enum ClaimProcStatus{NotReceived,Received,Preauth,Adjustment,Supplemental}
                    && ClaimProcList[i].Status == ClaimProcStatus.NotReceived)
                //Status Adjustment has no insPayEst, so can ignore it here.
                {
                    retVal += ClaimProcList[i].InsPayEst;
                }
            }
            return(retVal);
        }
コード例 #4
0
        ///<summary>Get insurance deductible used for one benefit year.  Must supply all claimprocs for the patient.  Must supply all benefits for patient so that we know if it's a service year or a calendar year.  asofDate is used to determine which benefit year to calc.  Usually date of service for a claim.  The insplan.PlanNum is the plan to get value for.  ExcludeClaim is the ClaimNum to exclude, or enter -1 to include all.</summary>
        public static double GetDedUsed(ClaimProc[] ClaimProcList, DateTime asofDate, int planNum, int patPlanNum, int excludeClaim, InsPlan[] PlanList, Benefit[] benList)
        {
            InsPlan curPlan = GetPlan(planNum, PlanList);

            if (curPlan == null)
            {
                return(0);
            }
            //get the most recent renew date, possibly including today. Date based on annual max.
            DateTime renewDate = Benefits.GetRenewDate(benList, planNum, patPlanNum, curPlan.DateEffective, asofDate);
            //DateTime startDate;//for benefit year
            DateTime stopDate = renewDate.AddYears(1);

            /*if(renewDate.Month <= date.Month && renewDate.Day <= date.Day) {
             *      startDate=new DateTime(date.Year,renewDate.Month,renewDate.Day);
             *      stopDate=new DateTime(date.Year+1,renewDate.Month,renewDate.Day);
             * }
             * else {//otherwise, renew date must be late last year
             *      startDate=new DateTime(date.Year-1,renewDate.Month,renewDate.Day);
             *      stopDate=new DateTime(date.Year,renewDate.Month,renewDate.Day);
             * }*/
            double retVal = 0;

            for (int i = 0; i < ClaimProcList.Length; i++)
            {
                if (ClaimProcList[i].PlanNum == planNum &&
                    ClaimProcList[i].ClaimNum != excludeClaim &&
                    ClaimProcList[i].ProcDate < stopDate &&
                    ClaimProcList[i].ProcDate >= renewDate
                    //enum ClaimProcStatus{NotReceived,Received,Preauth,Adjustment,Supplemental}
                    && (ClaimProcList[i].Status == ClaimProcStatus.Adjustment ||
                        ClaimProcList[i].Status == ClaimProcStatus.NotReceived ||
                        ClaimProcList[i].Status == ClaimProcStatus.Received ||
                        ClaimProcList[i].Status == ClaimProcStatus.Supplemental)
                    )
                {
                    retVal += ClaimProcList[i].DedApplied;
                }
            }
            return(retVal);
        }