public bool OutCodeConditionMet(IDPOutcome dpOutcome)
 {
     return(!_lookups.IsCurrent(
                TypeOfLimitedLifeLookup.OutTypedCode,
                $"{dpOutcome.OutType}{dpOutcome.OutCode}",
                dpOutcome.OutStartDate));
 }
        public bool OutCodeConditionMet(IDPOutcome dpOutcome)
        {
            var code = $"{dpOutcome.OutType}{dpOutcome.OutCode}";
            var t    = !_lookups.Contains(
                TypeOfLimitedLifeLookup.OutType,
                code);

            return(t);
        }
        public bool DPOutComeConditionMet(string learnRefNumber, DateTime learnActEndDateLatest, out string ldapLearnRefNumber, out DateTime?outStartDate)
        {
            ldapLearnRefNumber = string.Empty;
            outStartDate       = null;
            bool conditionMet = false;

            var lDAP = _fileDataService.LearnerDestinationAndProgressionsForLearnRefNumber(learnRefNumber);

            if (lDAP != null)
            {
                ldapLearnRefNumber = lDAP.LearnRefNumber;
                outStartDate       = lDAP.DPOutcomes?.OrderByDescending(dp => dp.OutStartDate).Select(dp => dp.OutStartDate).FirstOrDefault();
                IDPOutcome dpOutCome = lDAP.DPOutcomes?.Where(dpo => dpo.OutStartDate >= learnActEndDateLatest).FirstOrDefault();
                if (dpOutCome == null)
                {
                    conditionMet = true;
                }
            }

            return(conditionMet);
        }
 public bool OutTypeConditionMet(IDPOutcome dpOutcome)
 {
     return(dpOutcome.OutType != null && _outTypes.Contains(dpOutcome.OutType));
 }
 public bool ConditionMet(IDPOutcome dpOutcome)
 {
     return(OutTypeConditionMet(dpOutcome) &&
            OutCodeConditionMet(dpOutcome));
 }
 public bool HasQualifyingOutcome(IDPOutcome outcome, DateTime actualEndDate) =>
     actualEndDate <= outcome.OutStartDate;
Exemplo n.º 7
0
 public DPOutcome BuildDPOutcome(int ukprn, ILearnerDestinationAndProgression destinationAndProgression, IDPOutcome dpOutcome)
 {
     return(new DPOutcome
     {
         LearnRefNumber = destinationAndProgression.LearnRefNumber,
         OutCode = dpOutcome.OutCode,
         UKPRN = ukprn,
         OutCollDate = dpOutcome.OutCollDate,
         OutEndDate = dpOutcome.OutEndDateNullable,
         OutStartDate = dpOutcome.OutStartDate,
         OutType = dpOutcome.OutType
     });
 }
 public bool OutTypeNullConditionMet(IDPOutcome dpOutcome)
 {
     return(dpOutcome.OutType != null);
 }