locked
Is there any event available to capture the change of data in the health vault data types RRS feed

  • Question


  • Hi,

    I have a scenario that whenever there is a change in my data in the health vault data types, I need to trigger some of my events. Is there any method or event available to automatically trigger my service method when there is a data change in my health vault profile?

    Now I am getting this with LastUpdated property. But I need something like event, which automatically triggers my function.

     

    Thanks in Advance,

    Sathya N

    Wednesday, April 8, 2009 1:10 PM

Answers

  • Raj is correct-- currently fetching data from HealthVault is a "pull", not a "push".  We're working on ways to enable a push model, some sort of subscription-like setup where applications can register for events like you describe above.  This is not official and there is no date associated with it yet.

    For now, if you want to get the latest data, you have to do one of two things, or do both:
     1. Fetch data on demand when it's needed
     2. Have an offline polling process to check back for new data at some predetermined interval

    Both can be done simultaneously, of course.
    Thursday, April 9, 2009 4:56 PM

All replies

  • What exactly do you mean by triggering events, or automatically triggering your function?  I apologize, but it's not clear to me on reading the post above. 

    If you could provide more description or some examples, that would help me understand better so I can assist.

    Thanks!
    Wednesday, April 8, 2009 11:02 PM
  • Lowell,

    for example, i have my allergy details in my health vault account. I have provided access to two or more applications to access and modify my data. so when my allergy data is modified via any of the application or directly in the health vault profile, in that case my application should get some notification saying that the allergy data of Sathya is modified. Once my application receive such notification, i need to do some actions say that i need to send an email.

    I hope that i have explained my scenario in this post clearly.

    i have depicted my logic below. kindly help to achieve this.

    if(IsAllergyModified)
    {
          send mail();
    }
    else
    {
           //some function eg: send mail
    }


    Thanks
    Sathya N
    Thursday, April 9, 2009 4:36 AM
  • I assume you are looking for some notifications that will be triggered automatically in your application when something changes in HealthVault rather than you polling for changes.  There is no such notification feature available now.

    If you need to check if an item has been modified since the last time your application "saw" it, you need to make use of Audit information and/or compare HealthRecordItem's keys (from what it was to what it is now).

    In your case, you may want to run a process polling the status of HealthRecordItem in a scheduler or something if that is appropriate....

    Raj


    Raj HealthVault Developer Tool http://xray.getrealconsulting.com
    Thursday, April 9, 2009 10:45 AM
  • Raj is correct-- currently fetching data from HealthVault is a "pull", not a "push".  We're working on ways to enable a push model, some sort of subscription-like setup where applications can register for events like you describe above.  This is not official and there is no date associated with it yet.

    For now, if you want to get the latest data, you have to do one of two things, or do both:
     1. Fetch data on demand when it's needed
     2. Have an offline polling process to check back for new data at some predetermined interval

    Both can be done simultaneously, of course.
    Thursday, April 9, 2009 4:56 PM