Retrieve Modified Data - since last change

Dec 7, 2010 at 4:59 PM
Edited Dec 7, 2010 at 5:43 PM

Hi,

I believe that there is a mechanism by which an application can retrieve data that has changed since last update using MS SDK. Is there an equivalent mechanism to retrieve data that has changed (add/update/delete) using the MS JDK? Or do we to write the native XML request to retrieve this information? Can we pass a timestamp - based on which all data added/changed/deleted - will be returned?

Hope you can help.

Thanks.

Coordinator
Dec 14, 2010 at 8:20 AM

Hi ssunter

Sorry for the delay, I'm on vacation.  :-)

You can use the GetUpdatedRecordsForApplication method.  There is a very simple unit test for it in the jaxb test directory.

If you want to work with a single record, look at the ThingFilterSpec passed to GetThings.  It has a variety of attributes on it you may be interested in:

  • createdDateMin
  • createdDateMax
  • updatedDateMax
  • updatedDateMin
  • ...

--Rob

Dec 14, 2010 at 2:35 PM

Hi Rob,

Thanks for getting back to me during your vacation. As a follow up to this question - I have a question about deleted/marked private records.

From my understanding, records that have been deleted or marked private are not returned by MS HV. So when I request for GetUpdatedRecordsForApplication - will I receive any indicators if there are deleted/records marked private? Otherwise there is no way to distinguish between records not returned - because they have not been changed since last request and records that have been deleted or have been marked private.

Your response is much appreciated.

Thanks

Shyam

Coordinator
Dec 14, 2010 at 6:48 PM

Records cannot be marked private, but consumers may deauthorize your application or delete their record.  You cannot distinguish between the two.  Either way if you try to access their record you will get access denied. 

Dec 14, 2010 at 7:06 PM

Sorry ... may be I wasn't clear in my previous message...

The consumer can mark the record "Private" from their MS Health Vault account (using healthvault UI) - can they not?

Dec 14, 2010 at 7:13 PM

Following up on the delete part of my question ... Let me describe the scenario to you.

 

1. User creates Record 1, Record 2, and Record 3 (using our application or using MS HV and/or partner applications).

2. Our application is synchronized with the R1, R2 and R3 on Mon (12.13.2010).

3. User access MS HV or external application and does the following (on 12.14.2010)

      a. Modifies R1 (edits the values here in some manner)

      b. Deletes R2

4. Our application uses GetUpdatedRecordsForApplication and requests for all records modified after 12.13.2010

5. MS HV will return only R1 (since R2 is deleted - as far as I understand this will not be returned).

Our application is now out of sync - since there is no indication that R2 has been deleted. In order to find out if there are any deleted records, a separate call needs to be made to get all Things and compare - to identify the deleted records and update our application accordingly.

Isn't this how MS HV works - or am I misinformed here?

Hope you can clarify this when you get a chance.

Thanks.

Jan 31, 2011 at 7:44 PM
Rob, Just wanted to find out if you had a chance to look at the scenario described in my previous question on this post. If a record is deleted, there is no way for me to identify it unless I iterate through the things and compare it to the data that I have - to identify the missing records and mark them deleted. If that is the case, if I use the "GetUpdatedRecordsForApplication" method, I would not have an indication if a record has been deleted or if it has just not been updated since the updateDateMax parameter. Is there an alternate mechanism to test for deleted records? Please let me know when you get a chance. Thanks Shyam