Esempio n. 1
0
 public decimal OutOfPocketMax(DeductibleType deductibleType)
 {
     switch (deductibleType)
     {
         case DeductibleType.Individual:
             return IndividualOutOfPocketMax;
         case DeductibleType.Family:
             return FamilyOutOfPocketMax;
         default:
             throw new ApplicationException("Unkown deductible type.");
     }
 }
        public decimal CalculateYearlyCost(Plan plan, decimal totalMedicalCosts, PremiumType premiumType, DeductibleType deductibleType = DeductibleType.Individual)
        {
            var premium = plan.Premium(premiumType);
            var premiumCost = premium.Cost * PremiumMultiplierFactory.GetMultipler(premium.Frequency);

            var deductibleAmount = plan.Deductible(deductibleType);
            var costsDuringDeductible = Math.Min(deductibleAmount, totalMedicalCosts);

            var outOfPocketMax = plan.OutOfPocketMax(deductibleType);
            var costsUnderOutOfPocketMax = Math.Min((totalMedicalCosts - costsDuringDeductible) * plan.CoinsurancePercentage, outOfPocketMax - deductibleAmount);

            return premiumCost + costsDuringDeductible + costsUnderOutOfPocketMax;
        }
Esempio n. 3
0
 public CoveragePricedType()
 {
     this._deductible = new DeductibleType();
     this._charge     = new VehicleChargeType();
     this._coverage   = new CoverageType();
 }