Пример #1
0
 void CalculateWtCentile()
 {
     if (AdmissionWeight == null || AdmissionWeight < PatientDemographicsModel.MinBirthWeightGrams || IsMale == null || GestAgeWeeks == null || GestAgeWeeks < PatientDemographicsModel.MinGestAgeBirth)
     {
         WtForAgeCentile = string.Empty;
     }
     else
     {
         var weightData = new UKWeightData();
         WtForAgeCentile = string.Format(Strings.NewPatientVM_Centile,
                                         weightData.CumSnormForAge((double)AdmissionWeight.Value / 1000, 0, IsMale.Value, (double)GestAgeWeeks.Value + (double)(GestAgeDays ?? 0) / 7));
     }
 }
Пример #2
0
 void CalculateWtCentile()
 {
     if (LastWeightDate == null || LastContactWeight == null)
     {
         WtForAgeCentile = string.Empty;
     }
     else
     {
         var weightData = new UKWeightData();
         //note addDays is just to get roughly the mean time of weight
         WtForAgeCentile = string.Format(Strings.NewPatientVM_Centile,
                                         weightData.CumSnormForAge((double)LastContactWeight.Value / 1000, (LastWeightDate.Value.AddDays(0.5) - DateTimeBirth.Date).TotalDays, _participant.IsMale, _participant.GestAgeBirth));
     }
 }
Пример #3
0
        public void TestAllAges()
        {
            var wd = new UKWeightData();

            Console.WriteLine(wd.ZForAge(88, 365.25 * 50, true));
        }