async Task OnMeasurementClicked(MeasurementType measurementType)
        {
            CurrentMeasurementType = measurementType;
            String measurementTitle = MeasurementEnums.MeasurementTypeAsString(measurementType, CurrentContext.CurrentLanguage);

            viewModel.ChartTitle = measurementTitle;
            GrowthChart.Text     = measurementTitle;
            try
            {
                viewModel.InputData.Clear();
            }
            catch (Exception e)
            {
                // Changing children and reverting to this page causes a crash.
                viewModel            = new ViewModel();
                viewModel.ChartTitle = measurementTitle;
            }
            if (CurrentChild == null)
            {
                return;
            }
            GrowthChart.Text = measurementTitle;
            viewModel.InputData.Clear();
            if (CurrentChild == null)
            {
                if (CurrentContext.CurrentLanguage == Language.ENGLISH)
                {
                    await DisplayAlert("Error",
                                       "Please select a child",
                                       "OK");

                    return;
                }
                else
                {
                    await DisplayAlert("Error",
                                       "Porfavor seleccione un niño",
                                       "OK");

                    return;
                }
            }
            List <Points> points = CurrentChild.GetSortedMeasurementListByType(measurementType);

            if (points == null)
            {
                CurrentChild.AddMeasurementForDateAndType(CurrentChild.Birthday, MeasurementType.HEIGHT, CurrentContext.CurrentUnits, 0.0);
                CurrentChild.AddMeasurementForDateAndType(CurrentChild.Birthday, MeasurementType.WEIGHT, CurrentContext.CurrentUnits, 0.0);
                CurrentChild.AddMeasurementForDateAndType(CurrentChild.Birthday, MeasurementType.HEAD_CIRCUMFERENCE, CurrentContext.CurrentUnits, 0.0);
                return;
            }
            foreach (Points pt in points)
            {
                viewModel.InputData.Add(pt);
            }
            viewModel.LineData3.Clear();
            viewModel.LineData5.Clear();
            viewModel.LineData10.Clear();
            viewModel.LineData25.Clear();
            viewModel.LineData50.Clear();
            viewModel.LineData75.Clear();
            viewModel.LineData90.Clear();

            WHOData measurementData = new WHOData();

            Dictionary <WHOData.Percentile, List <double> > measurementsByGender;

            List <Double> measurementList3;
            List <Double> measurementList5;
            List <Double> measurementList10;
            List <Double> measurementList25;
            List <Double> measurementList50;
            List <Double> measurementList75;
            List <Double> measurementList90;

            // Find list of measurements for measurement type and gender. TODO: Change this based on preferred units.
            switch (measurementType)
            {
            case MeasurementType.WEIGHT:
                measurementData.weightPercentile.TryGetValue(WHOData.AdaptChildGender(CurrentChild.ChildGender), out measurementsByGender);
                break;

            case MeasurementType.HEIGHT:
                measurementData.heightPercentile.TryGetValue(WHOData.AdaptChildGender(CurrentChild.ChildGender), out measurementsByGender);
                break;

            case MeasurementType.HEAD_CIRCUMFERENCE:
                measurementData.headPercentile.TryGetValue(WHOData.AdaptChildGender(CurrentChild.ChildGender), out measurementsByGender);
                break;

            default:
                measurementData.weightPercentile.TryGetValue(WHOData.AdaptChildGender(CurrentChild.ChildGender), out measurementsByGender);
                break;
            }

            measurementsByGender.TryGetValue(WHOData.Percentile.P3, out measurementList3);
            measurementsByGender.TryGetValue(WHOData.Percentile.P5, out measurementList5);
            measurementsByGender.TryGetValue(WHOData.Percentile.P10, out measurementList10);
            measurementsByGender.TryGetValue(WHOData.Percentile.P25, out measurementList25);
            measurementsByGender.TryGetValue(WHOData.Percentile.P50, out measurementList50);
            measurementsByGender.TryGetValue(WHOData.Percentile.P75, out measurementList75);
            measurementsByGender.TryGetValue(WHOData.Percentile.P90, out measurementList90);

            for (int i = 0; i < measurementData.ageList.Count(); i++)
            {
                viewModel.LineData3.Add(new Points(measurementData.ageList[i], measurementList3[i]));
                viewModel.LineData5.Add(new Points(measurementData.ageList[i], measurementList5[i]));
                viewModel.LineData10.Add(new Points(measurementData.ageList[i], measurementList10[i]));
                viewModel.LineData25.Add(new Points(measurementData.ageList[i], measurementList25[i]));
                viewModel.LineData50.Add(new Points(measurementData.ageList[i], measurementList50[i]));
                viewModel.LineData75.Add(new Points(measurementData.ageList[i], measurementList75[i]));
                viewModel.LineData90.Add(new Points(measurementData.ageList[i], measurementList90[i]));
            }
        }
        /// <summary>
        /// Submit Height, Weight, and HeadC
        /// </summary>
        async void OnSubmitClicked(object sender, EventArgs args)
        {
            Double Height = DEFAULT_MEASUREMENT_VALUE;
            Double Weight = DEFAULT_MEASUREMENT_VALUE;
            Double HeadC  = DEFAULT_MEASUREMENT_VALUE;

            try
            {
                Height = Double.Parse(HeightEntry.Text);
            }
            catch
            {
            }
            try
            {
                Weight = Double.Parse(WeightEntry.Text);
            }
            catch
            {
            }
            try
            {
                HeadC = Double.Parse(HeadEntry.Text);
            }
            catch
            {
            }

            Button button = (Button)sender;

            //TODO STEFAN: Replace this with an await call to SQLite
            ChildDatabaseAccess childDatabase = new ChildDatabaseAccess();
            DateTime            selectedDate  = GetSelectedDate();
            Units currentUnits = GetCurrentUnits();

            if (CurrentChild != null)
            {
                try
                {
                    if (DEFAULT_MEASUREMENT_VALUE != Height)
                    {
                        CurrentChild.AddMeasurementForDateAndType(selectedDate, MeasurementType.HEIGHT, currentUnits, Height);
                    }
                    if (DEFAULT_MEASUREMENT_VALUE != Weight)
                    {
                        CurrentChild.AddMeasurementForDateAndType(selectedDate, MeasurementType.WEIGHT, currentUnits, Weight);
                    }
                    if (DEFAULT_MEASUREMENT_VALUE != HeadC)
                    {
                        CurrentChild.AddMeasurementForDateAndType(selectedDate, MeasurementType.HEAD_CIRCUMFERENCE, currentUnits, HeadC);
                    }
                    UpdateSelectedMeasurements();
                }
                catch (Exception e)
                {
                }

                List <Points> points = _currentChild.GetSortedMeasurementListByType(MeasurementType.WEIGHT);
                if (points == null)
                {
                    _currentChild.AddMeasurementForDateAndType(_currentChild.Birthday, MeasurementType.WEIGHT, CurrentContext.CurrentUnits, 0.0);
                    return;
                }
                foreach (Points pt in points)
                {
                    viewModel.InputData.Add(pt);
                }
            }
        }