public bool LearningDeliveryFAMConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(!_learningDeliveryFAMQueryService.HasAnyLearningDeliveryFAMCodesForType(
                learningDeliveryFAMs,
                LearningDeliveryFAMTypeConstants.LDM,
                _learnDelFamCodesToExclude));
 }
Example #2
0
 public bool Excluded(int ukprn, int?progType, IEnumerable <ILearningDeliveryFAM> learningDeliveryFams)
 {
     return(_dd07.IsApprenticeship(progType) ||
            _learningDeliveryFamQueryService.HasLearningDeliveryFAMType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.RES) ||
            _learningDeliveryFamQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.LDM, _learningDeliveryFamCodes) ||
            _organisationDataService.LegalOrgTypeMatchForUkprn(ukprn, LegalOrgTypeConstants.USDC));
 }
 public bool Excluded(int?progType, IEnumerable <ILearningDeliveryFAM> learningDeliveryFams, string learnAimRef)
 {
     return(_derivedData07.IsApprenticeship(progType) ||
            _learningDeliveryFamQueryService.HasLearningDeliveryFAMType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.RES) ||
            _learningDeliveryFamQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.LDM, _learningDeliveryFamCodes) ||
            _larsDataService.HasAnyLearningDeliveryForLearnAimRefAndTypes(learnAimRef, _learnAimRefTypes));
 }
 public bool LearningDeliveryFAMConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(learningDeliveryFAMs != null &&
            _learnDelFAMQueryService.
            HasAnyLearningDeliveryFAMCodesForType(
                learningDeliveryFAMs,
                LearningDeliveryFAMTypeConstants.SOF,
                _famCodesSOF));
 }
Example #5
0
        public bool IsLearningDeliveryExcluded(ILearner learner, ILearningDelivery learningDelivery)
        {
            if (learningDelivery.ProgTypeNullable.HasValue &&
                learningDelivery.ProgTypeNullable.Value == TypeOfLearningProgramme.Traineeship)
            {
                return(true);
            }

            if (_dd07.IsApprenticeship(learningDelivery.ProgTypeNullable))
            {
                return(true);
            }

            if (_famQueryService.HasAnyLearningDeliveryFAMCodesForType(
                    learningDelivery.LearningDeliveryFAMs,
                    LearningDeliveryFAMTypeConstants.LDM,
                    famCodesForExclusion))
            {
                return(true);
            }

            if (_dd12.IsAdultSkillsFundedOnBenefits(learner.LearnerEmploymentStatuses, learningDelivery))
            {
                return(true);
            }

            if (_derivedDataRule21.IsAdultFundedUnemployedWithOtherStateBenefits(learningDelivery, learner))
            {
                return(true);
            }

            if (_famQueryService.HasLearningDeliveryFAMType(learningDelivery.LearningDeliveryFAMs, LearningDeliveryFAMTypeConstants.RES))
            {
                return(true);
            }

            if (_larsDataService.BasicSkillsMatchForLearnAimRefAndStartDate(
                    TypeOfLARSBasicSkill.AsEnglishAndMathsBasicSkills,
                    learningDelivery.LearnAimRef,
                    learningDelivery.LearnStartDate))
            {
                return(true);
            }

            if (_larsDataService.LearnAimRefExistsForLearningDeliveryCategoryRef(
                    learningDelivery.LearnAimRef,
                    TradeUnionAimsCategoryRef))
            {
                return(true);
            }

            return(false);
        }
 public void Validate(ILearner objectToValidate)
 {
     foreach (var learningDelivery in objectToValidate.LearningDeliveries)
     {
         if (ConditionMet(
                 learningDelivery.FundModelNullable,
                 objectToValidate.DateOfBirthNullable,
                 learningDelivery.LearnStartDateNullable,
                 _learningDeliveryFAMQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDelivery.LearningDeliveryFAMs, LearningDeliveryFAMTypeConstants.ASL, famCodes)))
         {
             HandleValidationError(RuleNameConstants.DateOfBirth_12, objectToValidate.LearnRefNumber, learningDelivery.AimSeqNumberNullable);
         }
     }
 }
        public bool IsLearningDeliveryExcluded(ILearner learner, ILearningDelivery learningDelivery)
        {
            if (learningDelivery.ProgTypeNullable.HasValue &&
                learningDelivery.ProgTypeNullable.Value == ProgTypes.Traineeship)
            {
                return(true);
            }

            if (_dd07.IsApprenticeship(learningDelivery.ProgTypeNullable))
            {
                return(true);
            }

            if (_famQueryService.HasAnyLearningDeliveryFAMCodesForType(
                    learningDelivery.LearningDeliveryFAMs,
                    LearningDeliveryFAMTypeConstants.LDM,
                    famCodesForExclusion))
            {
                return(true);
            }

            if (_dd28.IsAdultFundedUnemployedWithBenefits(learningDelivery, learner))
            {
                return(true);
            }

            if (_dd29.IsInflexibleElementOfTrainingAimLearningDelivery(learningDelivery))
            {
                return(true);
            }

            if (_famQueryService.HasLearningDeliveryFAMType(learningDelivery.LearningDeliveryFAMs, LearningDeliveryFAMTypeConstants.RES))
            {
                return(true);
            }

            if (_larsDataService.BasicSkillsMatchForLearnAimRefAndStartDate(
                    LARSConstants.BasicSkills.EnglishAndMathsList,
                    learningDelivery.LearnAimRef,
                    learningDelivery.LearnStartDate))
            {
                return(true);
            }

            return(false);
        }
Example #8
0
 public bool LearningDeliveryFAMsConditionMet(IReadOnlyCollection <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_learningDeliveryFAMQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.SOF, _learnDelFAMCodes));
 }
 public bool LearningDeliveryFAMConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(!(_learningDeliveryFAMQueryService.HasLearningDeliveryFAMType(learningDeliveryFAMs, "RES") ||
              _learningDeliveryFAMQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDeliveryFAMs, "LDM", _ldmCodes)));
 }
 public virtual bool LearningDeliveryFAMConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFams)
 {
     return(!_learningDeliveryFamQueryService.HasLearningDeliveryFAMType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.RES) &&
            !_learningDeliveryFamQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.LDM, _ldmLearningDeliveryFamCodes));
 }
Example #11
0
 public bool LearningDeliveryFAMConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_learningDeliveryFAMQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDeliveryFAMs, "ASL", _famCodes));
 }
Example #12
0
 public bool ConditionMet(ILearningDelivery learningDelivery)
 {
     return(_fundModels.Contains(learningDelivery.FundModel) &&
            learningDelivery.LearnStartDate >= _firstAugust2015 &&
            _learningDeliveryFamQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDelivery.LearningDeliveryFAMs, "LDM", _famCodes));
 }
Example #13
0
 public bool LearningDeliveryFAMExclusion(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_learningDeliveryFAMQueryService.HasLearningDeliveryFAMType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.RES) ||
            _learningDeliveryFAMQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.LDM, _ldmExclusions) ||
            _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.DAM, LearningDeliveryFAMCodeConstants.DAM_DevolvedLevelTwoOrThreeExclusion));
 }
Example #14
0
 public virtual bool LearningDeliveryFAMsConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(!_learningDeliveryFAMQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDeliveryFAMs, _learnDelFamType, _learnDelFamCodes));
 }