locked
How to add healthServiceDateTime to HealthVault? RRS feed

  • Question

  • Hi,
    I'm trying to sync our local data with the data in HV.
    I need to Sync TimeZone with HV.
    I am trying to use healthServiceDateTime Item, but it is not succeeded. I followed the fallowing code to add timezone

     1) HealthServiceDateTime hvSDT = new HealthServiceDateTime();
     2) hvSDT.TimeZone = new CodableValue("Some value");
     3) PersonInfo.SelectedRecord.NewItem(hvSDT);


    It is giving compilation error at line 3. Error is "NewItem("" ) having some invalid arguments ".
    I appreciate your help

    Thanks in advance
    Chellam
    Monday, October 12, 2009 2:34 PM

Answers

  • Hello,

    HealthServiceDateTime is not an Item type and it it is an item data. So an instance of HealthServiceDateTime cannot be created using a NewItem call.
    Normally HealthServiceDateTime objects are used as fields in other item types such as in Directive type

    public HealthServiceDateTime AttendingPhysicianEndorsement;

    Hope this helps.

    Thanks and Regards,
    Aneesh D.
    • Marked as answer by Eric Gunnerson Tuesday, October 13, 2009 4:17 PM
    Monday, October 12, 2009 4:41 PM