Esempio n. 1
0
 private FitnessClassification ParseCountToFitnessClassification(IStrengthTestRanges lowerLimits)
 {
     if (_test.Value < lowerLimits.LowerLimitOfPoor)
     {
         return(FitnessClassification.VeryPoor);
     }
     if (_test.Value < lowerLimits.LowerLimitOfBelowAverage)
     {
         return(FitnessClassification.Poor);
     }
     if (_test.Value < lowerLimits.LowerLimitOfAverage)
     {
         return(FitnessClassification.BelowAverage);
     }
     if (_test.Value < lowerLimits.LowerLimitOfAboveAverage)
     {
         return(FitnessClassification.Average);
     }
     if (_test.Value < lowerLimits.LowerLimitOfGood)
     {
         return(FitnessClassification.AboveAverage);
     }
     return(_test.Value < lowerLimits.LowerLimitOfExcellent
         ? FitnessClassification.Good
         : FitnessClassification.Excellent);
 }
Esempio n. 2
0
        protected MuscularStrengthClassification(MuscularStrengthTest test, Patient patient)
        {
            if (patient == null)
            {
                throw new ArgumentNullException(nameof(patient));
            }
            _test = test ?? throw new ArgumentNullException(nameof(test));

            if (_test.Type == StrengthTest.Pushups)
            {
                _ranges = PushupsRepository.GetRanges(patient);
            }
            else if (_test.Type == StrengthTest.Situps)
            {
                _ranges = SitupsRepository.GetRanges(patient);
            }
            else if (_test.Type == StrengthTest.SitAndReach)
            {
                _ranges = SitAndReachRepository.GetRanges(patient);
            }
            else
            {
                throw new NotImplementedException(nameof(_test.Type));
            }
        }