Пример #1
0
        // Cdsi Logic Spec 4.1 - Section 6-10
        public static bool SatisfyTargetDose(this IDoseEvaluator dose)
        {
            // this will short circuit so some status' might not get set correctly.
            // need to evaluate and later check the result?
            var val = dose.EvaluateAge(null) &&
                      dose.EvaluatePreferableInterval() &&
                      dose.EvaluateAllowableInterval() &&
                      !dose.EvaluateLiveVirusConflict() &&
                      dose.EvaluateForPreferableVaccine() &&
                      dose.EvaluateForAllowableVaccine();

            if (val)
            {
                dose.TargetDose.Status = TargetDoseStatus.Satisfied;
            }

            return(val);
        }