예제 #1
0
        public int ComputeIndex(HealthIndex index)
        {
            switch (this.calculationMode)
            {
            case CalculationMode.Detailed:
                return(index.GetValue());

            default:
                if (index < (HealthIndex)33)
                {
                    return(-1);
                }
                else if (index >= (HealthIndex)33 && index < (HealthIndex)66)
                {
                    return(0);
                }
                else
                {
                    return(100);
                }
            }
        }
예제 #2
0
 public HealthIndex ComputeIndex(HealthIndex value)
 {
     return(new HealthIndex(value.GetValue(), (this.calculationMode == CalculationMode.Simple) ? false : true));
 }
예제 #3
0
 public CountyStatsViewModel(int doctorCount, int patientCount, long healthReportCount, HealthIndex averageHealthIndex)
 {
     this.AverageHealthIndex = averageHealthIndex;
     this.DoctorCount        = doctorCount;
     this.PatientCount       = patientCount;
     this.HealthReportCount  = healthReportCount;
 }