locked
Unprocessed Thing Key info RRS feed

  • Question

  • Hi,

    I have some user data in HealthVault - which has a large number of records. When I request for all the records to be returned, I get the data in the following format (find below). Not sure why the entire content is not being returned. Part of the data has the entire record - while the remaining data has the format below.

    We are very close to going to production and would appreciate a quick response.

    Thanks

    Shyam

    <unprocessed-thing-key-info> has thing id and version stamp </unprocessed-thing-key-info>

    • Edited by ssunter Wednesday, April 27, 2011 2:59 PM
    Tuesday, April 26, 2011 9:18 PM

All replies

  • Hi Shyam,

    There is a parameter on the HealthRecordFilter object called MaxFullItemsReturnedPerRequest and it is set to 240 by default. If your search returns more than MaxFullItemsReturnedPerRequest items then you will get full items for the first max items and then HealthRecordItemIds for the remaining items. You can then retrieve the other items by ID.

    Please see http://blogs.msdn.com/b/healthvaultfaq/archive/2009/10/19/healthvault-response-paging.aspx for more information.

    Thanks, Piyali.

     

    • Proposed as answer by Piyali Sen Thursday, April 28, 2011 9:38 AM
    Wednesday, April 27, 2011 8:43 AM
  • Hi Piyali,

    Can I change the MaxFullItemsReturnedPerRequest to return ALL the records? Please note that I am using HealthVault JAVA development kit to query into MSHV.

    The only reason our application needs to retrieve ALL the records is because - there is no other way to identify deleted records (since they are never returned).

    In the JAVA based API, I noticed that when the number of records exceed 120, Microsoft HealthVault (GetThings) returns “Unprocessed Thing Key Info” – with the thing keys that have not been sent across. When I started working with this, we realized that if the user has 12000 records, then we will be making 100 + calls (and potentially have to wait for a long time).

    In order to avoid this, we are considering making a call to “GetUpdatedRecordsForApplication” method instead of the “GetThings” method. However, since deleted records are never returned to the application, from the “GetUpdatedRecordsForApplication” method, we cannot identify if records have been deleted from MSHV.

    Is there an alternate mechanism to identify deleted records from MSHV?

    Hope you can get back to me on this ASAP.

    Thanks

    Shyam

    Wednesday, April 27, 2011 3:04 PM
  • Hi,

    I made the following request using JAVA API. the response still contained unprocessed-thing-key-info records. I got only 120 FULL records and 384 partial records. I set the values as 5000 and 30000 respectively.

    <wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request">
     <auth>
      <hmac-data algName="HMACSHA1">CHANGEDhmac-data>
     </auth>
     <header>
      <method>GetThings</method>
      <method-version>3</method-version>
      <record-id>CHANGED</record-id>
      <auth-session>
       <auth-token>CHANGED</auth-token>
       <offline-person-info>
        <offline-person-id>CHANGED</offline-person-id>
       </offline-person-info>
      </auth-session>
      <language>en</language>
      <country>US</country>
      <msg-time>2011-04-27T17:57:10.503-04:00</msg-time>
      <msg-ttl>29100</msg-ttl>
      <version>0.0.0.1</version>
      <info-hash>
       <hash-data algName="SHA1">CHANGED</hash-data>
      </info-hash>
     </header>
     <info>
      <group max-full="5000" max="30000">
       <filter>
        <type-id>3d34d87e-7fc1-4153-800f-f56592cb0d17</type-id>
        <type-id>ca3c57f4-f4c1-4e15-be67-0a3caf5414ed</type-id>
        <type-id>879e7c04-4e8a-4707-9ad3-b054df467ce4</type-id>
        <type-id>cd3587b5-b6e1-4565-ab3b-1c3ad45eb04f</type-id>
        <type-id>796c186f-b874-471c-8468-3eeff73bf66e</type-id>
        <type-id>40750a6a-89b2-455c-bd8d-b420a4cb500b</type-id>
        <type-id>5800eab5-a8c2-482a-a4d6-f1db25ae08c3</type-id>
       </filter>
       <format>
        <section>core</section>
        <section>audits</section>
        <xml></xml>
       </format>
      </group>
     </info>
    </wc-request:request>

    Wednesday, April 27, 2011 10:05 PM
  • Hi Shyam,

    Please take a look at the forum thread at http://social.msdn.microsoft.com/forums/en-us/healthvault/thread/61B99911-A6C6-4C2E-8BAB-FA09C8A4EE52 and see if that helps you.

    Since you are using Java API you can also check http://healthvaultjavalib.codeplex.com/discussions/ for solutions specific to the JAVA API.

    Thanks,

    Piyali.

    • Proposed as answer by Piyali Sen Thursday, April 28, 2011 9:38 AM
    Thursday, April 28, 2011 9:34 AM
  • To expand a bit...

    The data is returned in chunks so that applications can be more responsive (it can take a while to grab a lot of records), and so that it's possible to get more data than would fit in a single response.

    Running out of space to fit all the data in the response is unlikely with most data types, but is possible with some of the bigger ones. AerobicSession would be most likely to cause an issue, though it's a older version type and the newer version "Exercise" is much less likely to have this issue.

    Keeping that in mind, it's fine to ask for all of them, though I am curious why you are doing this. Can you explain what your scenario is?

    Friday, April 29, 2011 5:44 PM
  • Hi Eric,

    When you ask why I am doing this - Do you mean - why we want to fetch ALL the records? If that is your question - it has primarily to do with the fact that HealthVault does not return DELETED or MARKED PERSONAL items.

    The only way for us to identify deleted records is to get ALL the data items from MSHV. Our application has a daily "offline" sync process which does get all the data items and identifies all adds/updates and deletes. However, if there are any DELETES since the sync - the get updated things call will not help me identify the deletes.

    At login, we would like to get all the data items for the user again - but unfortunately - if the user has say 1200 records, I would have to make 10 calls to MSHV.

    My thoughts on this are as follows:

    1. Ideally, I would like MSHV to return an indicator informing me that a particular thing has been deleted (with status flag set to deleted - and just the header data). This way data privacy is still maintained while still informing the subscribing system such as ours to clean up the data more easily.
    2. If the above is not, perhaps also consider increasing the size of records returned from 120 to a larger number so that the number of calls to MSHV are minimized.

    Thanks again for getting back to me on this.

    Regards,

    Shyam

    Monday, May 2, 2011 4:34 PM
  • Thanks,

    We'll need to talk about what to do in the deleted case, and whether returning the information about a deleted or personal item would be okay from a PII perspective.

    I do have two suggestions.

    The first is to call connection.GetUpdatedRecordsForApplication. This will let you figure out which records have new data and limit the amount of polling that you need to do.

    The second is to consider using our new eventing facility to be notified when records change. That will allow you to detect that a specific thing is deleted; you will get a notification with the thing-id but if you go to fetch it you will get no results back. You could use your current scheme to set up the sync and then use eventing to keep it going.

    More information here.

    Monday, May 2, 2011 5:31 PM