none
Problem in blood glucose value to health vault

    Question

  • Hi

    I am trying to add blood glucose value to health vault database.
    while saving am getting the following error

    Microsoft.Health.HealthRecordItemSerializationException: The blood glucose measurement type must be set before creating or updating the blood glucose item.

    The code i used to save data is


    BloodGlucose objBloodGlucose = new BloodGlucose();
                objBloodGlucose.Value = new BloodGlucoseMeasurement();
                objBloodGlucose.Value.Value = Convert.ToDouble(txtGlucose.Text);
     objBloodGlucose.When.Date = new HealthServiceDate(Convert.ToInt32(ddlYear.SelectedValue), ddlMonth.SelectedIndex + 1, Convert.ToInt32(ddlDate.SelectedValue));
                PersonInfo.SelectedRecord.NewItem(objBloodGlucose);



    Can anyone help me on this issue.
    It is an urgent requirement for me


    Thanks
    Sathya N
    Wednesday, August 13, 2008 2:13 PM

Answers

  • In your code you need to set a value for the objBloodGlucose.GlucoseMeasurementType property. The possible values are in the glucose-measurement-type vocabulary.

     

    This is required because the type of measurement changes how the numbers are interpreted.

    Wednesday, August 13, 2008 5:40 PM

All replies