locked
Reading Blood Glucose records from HealthVault RRS feed

  • Question

  • Can anyone please share a sample code or help me with retrieving (not looking for add at this point in time) Blood Glucose readings from a HealthVault record.
    help is greatly appreciated.

    I am using HelloWorld SDK sample, other Itemtypes work fine, but I am not able to get Blood Glucose data with below code which I feel is going incorrect way.

    String

     

     

    bloodGlucoseBloodType = "plasma";
    BloodGlucoseMeasurement value = new BloodGlucoseMeasurement(); 
    BloodGlucose bloodGlucose = new BloodGlucose( 
    new HealthServiceDateTime(DateTime.Now), value, new CodableValue(bloodGlucoseBloodType));
    c_BloodGlucose.Text= bloodGlucose.Value.ToString();

    Thanks,
    Rajashri
    Tuesday, July 21, 2009 7:21 AM

Answers

  • Use this

    HealthRecordItemCollection collection = PersonInfo.SelectedRecord.GetItemsByType(BloodGlucose.TypeId);
    Raj HealthVault Developer Tool http://xray.getrealconsulting.com
    Tuesday, July 21, 2009 8:57 AM
  • Hi,

    After you create the application id and configure your application to use it, you need to authorize the user seperately and then use the new personid and recordid. Give access for both offline and online to Blood Glucose Item type.

    Enter the application id in the web.config file that you are currently using.

    Clear all the personid and recordid you have obtained by using the application id. (You just need to delete the offline.txt file created)

    Hope this helps.


    Wednesday, July 22, 2009 3:16 PM

All replies

  • Use this

    HealthRecordItemCollection collection = PersonInfo.SelectedRecord.GetItemsByType(BloodGlucose.TypeId);
    Raj HealthVault Developer Tool http://xray.getrealconsulting.com
    Tuesday, July 21, 2009 8:57 AM
  • Hi,

    When using Offline SDK Sample application "OfflineAccess" I am able to read records for Height and few other data types but not for blood glucose.
    Ideally I want to create a new certificate for an offline application and do not want to use the SDK sample certificate.
    While using certificate from SDK offline sample I get a wildcat exception when retrieving Blood glucose readings even when i have allowed Read permissions to Offline access from configuration center to Blood Glucose Item type. I am just not able to create any working certificate of my own for offline application. My created certificates work fine with Online apps.
    Need to know what different I have to do to be able to work with an offline application other than the Sample SDK offline app with a newly created certificate.

    Please help.

    Thanks,
    Rajashri.

    Wednesday, July 22, 2009 12:14 PM
  • Hi,

    After you create the application id and configure your application to use it, you need to authorize the user seperately and then use the new personid and recordid. Give access for both offline and online to Blood Glucose Item type.

    Enter the application id in the web.config file that you are currently using.

    Clear all the personid and recordid you have obtained by using the application id. (You just need to delete the offline.txt file created)

    Hope this helps.


    Wednesday, July 22, 2009 3:16 PM