コード例 #1
0
        ///<summary>Used once from Claims and also in ContrTreat.  Gets insurance deductible remaining for one benefit year which includes the given date.  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.  Date used to determine which benefit year to calc.  Usually today's date.  The insplan.PlanNum is the plan to get value for.  ExcludeClaim is the ClaimNum to exclude, or enter -1 to include all.  The supplied adaCode is needed because some deductibles, for instance, do not apply to preventive.</summary>
        public static double GetDedRem(ClaimProc[] ClaimProcList, DateTime date, int planNum, int patPlanNum, int excludeClaim, InsPlan[] PlanList, Benefit[] benList, string adaCode)
        {
            double dedTot  = Benefits.GetDeductibleByCode(benList, planNum, patPlanNum, adaCode);
            double dedUsed = GetDedUsed(ClaimProcList, date, planNum, patPlanNum, excludeClaim, PlanList, benList);

            if (dedTot - dedUsed < 0)
            {
                return(0);
            }
            return(dedTot - dedUsed);
        }