locked
is recordid guaranteed to be unique across all personids? RRS feed

  • Question

  • we are a web portal into HV. When we register a new user on our site we pass them through to HV to enroll. We get back from HV a personid and a recordid (GUIDs) which we store in a local DB in our own PatientRegistration table. I understand that the personid corresponds to the HV account and that multiple patients can exist within one HV account and that each patient within a given HV account will have a unique recordid.

    Are recordids unique across all HV accounts? Or are they guaranteed to be unique only within a given HV account?

    I ask because we have noticed that a few recordids recorded in our local DB have been reused across different patientids. 

    ira

    Wednesday, May 9, 2012 7:43 PM

Answers

  • rob:

    accoring to your first paragraph, recordids are unique within applid/personid, but are NOT guaranteed to be unique across all personids. That is:

    applid1/personid1/recordid1

    and

    applid1/personid2/recordid1

    is not an error situation. Correct?

    However, if i am reading your second paragraph correctly there are certain circumstances in which the same recordid will be repeated across different personids. Is that correct?

    I'm confused...

    • Marked as answer by icopperman Monday, May 14, 2012 8:35 PM
    Monday, May 14, 2012 8:35 PM

All replies

  • Hi Ira,

    Record ids are unique per person/record/application-id.  If a person shares their record with somebody else who also authorizes your application, that record-id will be different even though the same underlying record is the same.  You won't have duplicates this way.  The record-id is used to make requests to HealthVault.

    There is also an associated app-specific-record-id returned with each record.  That id will be unique per record/application-id.  If a person shares their record with somebody else who authorizes your application, the app-specific-record-id will be the same.  App-specific-record-id enables your application to determine if the underlying record is the same for multiple application users.

    --Rob

    Thursday, May 10, 2012 5:51 PM
  • rob:

    accoring to your first paragraph, recordids are unique within applid/personid, but are NOT guaranteed to be unique across all personids. That is:

    applid1/personid1/recordid1

    and

    applid1/personid2/recordid1

    is not an error situation. Correct?

    However, if i am reading your second paragraph correctly there are certain circumstances in which the same recordid will be repeated across different personids. Is that correct?

    I'm confused...

    • Marked as answer by icopperman Monday, May 14, 2012 8:35 PM
    Monday, May 14, 2012 8:35 PM
  • Hi,

    Sorry for the confusion.

    When I said they are unique per person/record/application-id I was trying to say that if you change any one of those, you will get a different unique record-id.  So if you change the person-id (through sharing for example), you will see a different record-id.  No two people will ever have the same record-id.  No two applications will ever see the same record-id. 

    The record-id is always used to make requests.  However, HealthVault returns another value--the "app-specific-record-id" as an attribute on the record element to help applications correlate records across person-ids.

    So, to answer your question directly, yes record-id is guaranteed to be unqiue across all person-ids.

    --Rob


    • Edited by robmay Wednesday, May 16, 2012 10:25 PM
    Wednesday, May 16, 2012 10:24 PM