Beispiel #1
0
 /// <summary>
 /// Determines whether [has qualifying funding] [the specified delivery].
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <returns>
 ///   <c>true</c> if [has qualifying funding] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool HasQualifyingFunding(ILearningDelivery delivery) =>
 _check.HasQualifyingFunding(
     delivery,
     TypeOfFunding.CommunityLearning,
     TypeOfFunding.AdultSkills,
     TypeOfFunding.ApprenticeshipsFrom1May2017,
     TypeOfFunding.EuropeanSocialFund,
     TypeOfFunding.OtherAdult);
Beispiel #2
0
        /// <summary>
        /// Determines whether [is adult funded on benefits at start of aim] [the specified candidate].
        /// </summary>
        /// <param name="delivery">The delivery.</param>
        /// <param name="learnerEmployments">The learner employments.</param>
        /// <returns>
        ///   <c>true</c> if [is adult funded on benefits at start of aim] [the specified candidate]; otherwise, <c>false</c>.
        /// </returns>
        public bool IsAdultFundedOnBenefitsAtStartOfAim(ILearningDelivery delivery, IReadOnlyCollection <ILearnerEmploymentStatus> learnerEmployments)
        {
            It.IsNull(delivery)
            .AsGuard <ArgumentNullException>(nameof(delivery));
            It.IsEmpty(learnerEmployments)
            .AsGuard <ArgumentNullException>(nameof(learnerEmployments));

            /*
             *  if
             *      LearningDelivery.FundModel = 35
             *      and the learner's Employment status on the LearningDelivery.LearnStartDate of the learning aim
             *      is (EmploymentStatusMonitoring.ESMType = BSI and EmploymentStatusMonitoring.ESMCode = 1, 2, 3 or 4)
             *          set to Y,
             *          otherwise set to N
             */

            return(_check.HasQualifyingFunding(delivery, TypeOfFunding.AdultSkills) &&
                   InReceiptOfBenefits(learnerEmployments, delivery.LearnStartDate));
        }
Beispiel #3
0
        /// <summary>
        /// Determines whether [is adult funded unemployed with other state benefits] [this delivery].
        /// </summary>
        /// <param name="thisDelivery">This delivery.</param>
        /// <param name="forThisCandidate">For this candidate.</param>
        /// <returns>
        ///   <c>true</c> if [is adult funded unemployed with other state benefits] [this delivery]; otherwise, <c>false</c>.
        /// </returns>
        public bool IsAdultFundedUnemployedWithOtherStateBenefits(ILearningDelivery thisDelivery, ILearner forThisCandidate)
        {
            It.IsNull(thisDelivery)
            .AsGuard <ArgumentNullException>(nameof(thisDelivery));
            It.IsNull(forThisCandidate)
            .AsGuard <ArgumentNullException>(nameof(forThisCandidate));

            /*
             *  if
             *      // is adult skills
             *      LearningDelivery.FundModel = 35
             *
             *      //  is umemployed (not employed, seeking and available or otherwise)
             *      and     LearnerEmploymentStatus.EmpStat = 11 or 12 for the latest Employment Status on (or before) the LearningDelivery.LearnStartDate
             *
             *              // in receipt of another benefit.
             *      and     ((Monitoring.EmploymentStatus.ESMType = BSI and Monitoring.EmploymentStatus.ESMCode = 3)
             *              or
             *              // in receipt of universal credit.
             *              (Monitoring.EmploymentStatus.ESMType = BSI and Monitoring.EmploymentStatus.ESMCode = 4
             *              // is learning delivery monitored
             *              and LearningDeliveryFAM.LearnDelFAMType = LDM
             *              // and not mandated to skills training
             *              and LearningDeliveryFAM.LearnDelFAMCode <> 318))
             *
             *          set to Y,
             *          otherwise set to N
             */

            var employment = _check.GetEmploymentStatusOn(thisDelivery.LearnStartDate, forThisCandidate.LearnerEmploymentStatuses);

            return(_check.HasQualifyingFunding(thisDelivery, TypeOfFunding.AdultSkills) &&
                   It.Has(employment) &&
                   IsNotEmployed(employment) &&
                   (InReceiptOfBenefits(employment) ||
                    (InReceiptOfCredits(employment) &&
                     (NotIsMonitored(thisDelivery.LearningDeliveryFAMs) ||
                      !MandatedToSkillsTraining(thisDelivery.LearningDeliveryFAMs)))));
        }
Beispiel #4
0
        /// <summary>
        /// Determines whether [is adult skills unemployed with benefits] [this delivery].
        /// </summary>
        /// <param name="thisDelivery">This delivery.</param>
        /// <param name="forThisCandidate">For this candidate.</param>
        /// <returns>
        ///   <c>true</c> if [is adult skills unemployed with benefits] [this delivery]; otherwise, <c>false</c>.
        /// </returns>
        public bool IsAdultFundedUnemployedWithBenefits(ILearningDelivery thisDelivery, ILearner forThisCandidate)
        {
            It.IsNull(thisDelivery)
            .AsGuard <ArgumentNullException>(nameof(thisDelivery));
            It.IsNull(forThisCandidate)
            .AsGuard <ArgumentNullException>(nameof(forThisCandidate));

            /*
             *  if
             *      // is adult skills
             *      LearningDelivery.FundModel = 35
             *      // and has valid employment status
             *      and LearnerEmploymentStatus.EmpStat = 10, 11, 12 or 98
             *      // and in receipt of support at the time of starting the learning aim
             *      and (Monitoring.EmploymentStatus.ESMType = BSI and Monitoring.EmploymentStatus.ESMCode = 1 or 2)
             *          (for the learner's Employment status on the LearningDelivery.LearnStartDate of the learning aim)
             *  or
             *      // or is not employed, and in receipt of benefits
             *      LearnerEmploymentStatus.EmpStat = 11 or 12
             *      and (Monitoring.EmploymentStatus.ESMType = BSI and Monitoring.EmploymentStatus.ESMCode = 3 or 4)
             *  or
             *      // or is employed with workng short hours and in receipt of support
             *      LearnerEmploymentStatus.EmpStat = 10
             *      and (Monitoring.EmploymentStatus.ESMType = EII and Monitoring.EmploymentStatus.ESMCode = 2, 5 or 6)
             *      and (Monitoring.EmploymentStatus.ESMType = BSI and Monitoring.EmploymentStatus.ESMCode = 3 or 4)
             *          set to Y,
             *          otherwise set to N
             */

            var employment = _check.GetEmploymentStatusOn(thisDelivery.LearnStartDate, forThisCandidate.LearnerEmploymentStatuses);

            return(_check.HasQualifyingFunding(thisDelivery, TypeOfFunding.AdultSkills) &&
                   It.Has(employment) &&
                   (IsValidWithEmploymentSupport(employment) ||
                    IsNotEmployedWithBenefits(employment) ||
                    IsEmployedWithSupport(employment)));
        }
 /// <summary>
 /// Determines whether [is not valid] [the specified delivery].
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="learner">The learner.</param>
 /// <returns>
 ///   <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsNotValid(ILearningDelivery delivery, ILearner learner) =>
 !IsExcluded(delivery) &&
 _check.HasQualifyingFunding(delivery, TypeOfFunding.AdultSkills, TypeOfFunding.OtherAdult, TypeOfFunding.EuropeanSocialFund) &&
 _check.HasQualifyingStart(delivery, FirstViableDate) &&
 InReceiptOfAnotherStateBenefit(delivery, learner) &&
 HasDisqualifyingLearningCategory(delivery);
 /// <summary>
 /// Determines whether [is not valid] [the specified this delivery].
 /// </summary>
 /// <param name="thisDelivery">The this delivery.</param>
 /// <returns>
 ///   <c>true</c> if [is not valid] [the specified this delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsNotValid(ILearningDelivery thisDelivery) =>
 !IsExcluded(thisDelivery) &&
 _check.HasQualifyingFunding(thisDelivery, TypeOfFunding.EuropeanSocialFund) &&
 HasDisqualifyingSubjectSector(GetLARSLearningDeliveryFor(thisDelivery), GetSubjectAreaLevelsFor(thisDelivery));
 /// <summary>
 /// Returns true if ... is valid.
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <returns>
 ///   <c>true</c> if the specified delivery is valid; otherwise, <c>false</c>.
 /// </returns>
 public bool PassesRestrictions(ILearningDelivery delivery) =>
 _check.HasQualifyingFunding(delivery, TypeOfFunding.AdultSkills) &&
 _check.HasQualifyingStart(delivery, FirstViableDate);
 /// <summary>
 /// Determines whether [has qualifying funding] [this delivery].
 /// </summary>
 /// <param name="thisDelivery">this delivery.</param>
 /// <returns>
 ///   <c>true</c> if [has qualifying funding] [this delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool HasQualifyingFunding(ILearningDelivery thisDelivery) =>
 _check.HasQualifyingFunding(thisDelivery, TypeOfFunding.Age16To19ExcludingApprenticeships, TypeOfFunding.Other16To19);
 /// <summary>
 /// Determines whether [is not valid] [this delivery].
 /// </summary>
 /// <param name="thisDelivery">this delivery.</param>
 /// <param name="derivedRuleAction">The derived rule action.</param>
 /// <returns>
 ///   <c>true</c> if [is not valid] [this delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsNotValid(ILearningDelivery thisDelivery, Func <bool> derivedRuleAction) =>
 _check.HasQualifyingFunding(thisDelivery, TypeOfFunding.EuropeanSocialFund) &&
 !HasMatchingBenefitsIndicator(thisDelivery, derivedRuleAction);
 /// <summary>
 /// Determines whether [is not valid] [the specified delivery].
 /// </summary>
 /// <param name="thisDelivery">this delivery.</param>
 /// <returns>
 ///   <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsNotValid(ILearningDelivery thisDelivery) =>
 _check.HasQualifyingFunding(thisDelivery, TypeOfFunding.EuropeanSocialFund) &&
 HasQualifyingAim(thisDelivery) &&
 !HasQualifyingStart(thisDelivery, GetAllocationFor(thisDelivery));
Beispiel #11
0
 /// <summary>
 /// Determines whether [is not valid] [the specified delivery].
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <returns>
 ///   <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsNotValid(ILearningDelivery delivery) =>
 _check.HasQualifyingFunding(delivery, TypeOfFunding.AdultSkills) &&
 !_check.IsSteelWorkerRedundancyTraining(delivery) &&
 !_check.IsTraineeship(delivery) &&
 IsWorkExperience(delivery);
Beispiel #12
0
 /// <summary>
 /// Determines whether [is not valid] [the specified delivery].
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <returns>
 ///   <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsNotValid(ILearningDelivery delivery) =>
 !IsExcluded(delivery) &&
 _check.HasQualifyingFunding(delivery, TypeOfFunding.AdultSkills) &&
 _check.HasQualifyingStart(delivery, FirstViableDate) &&
 !HasQualifyingNotionalNVQ(delivery);
Beispiel #13
0
 /// <summary>
 /// Determines whether [is not valid] [this delivery].
 /// </summary>
 /// <param name="thisDelivery">this delivery.</param>
 /// <param name="derivedRuleAction">The derived rule action.</param>
 /// <returns>
 ///   <c>true</c> if [is not valid] [this delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsNotValid(ILearningDelivery thisDelivery, Func <int?> derivedRuleAction) =>
 _check.HasQualifyingFunding(thisDelivery, TypeOfFunding.EuropeanSocialFund) &&
 HasDisqualifyingLOUIndicator(thisDelivery, derivedRuleAction);