none
Question about Pending PatientConnection requests

    Question

  • I am setting up a web application that will allow a user to setup a pending PatientConnection  to our application.

    I've seen some (imo) inconsistent behavior with creating and deleting a PatientConnection request and wanted to see if I could get some clarification.

    Here is the scenario.

    1. User creates PatientConnection authorization request via app successfully
    2. User completes authorization request by answering secret question in HealthVault shell. Application is now authorized to access their Healthvault specified record.
    3. User then removes access to application (via HealthVault shell).
    4. If user attempts to create another PatientConnection authorization request, PatientConnection.Create() returns as exception which states "The connect request already exists, and cannot be recreated."

    I have attempted to call PatientConnection.DeletePending() with the applicationPersonID, but the exception in #5 is still thrown - Presumable because the PatientConnection request isn't pending but in fact validated.

    Calling PatientConnection.GetValidatedConnections() still shows the original PatientConnection authorization request that was created in #1. My hunch is that this is why creation of a new PatientConnection authorization request fails (since a PatientConnection request with a duplicate applicationPersonID exists in HealthVault). 

    Questions

    1. Is it correct that the ValidatedPatientConnection returned by PatientConnection.GetValidatedConnections() will be automatically deleted by HealthVault after 90 days?
    2. Is there a way to remove the ValidatedPatientConnection? If not, is there a way to create a new PatientConnection request with a applicationPersonID that was previously used?

    • Edited by KP-Keno Wednesday, April 17, 2013 4:30 PM title edit
    Wednesday, April 17, 2013 4:29 PM

Answers

  • The question as stated is a bit ambiguous, so I am going to restate it as interpreted, and then provide some guidance. Please feel free to clarify if I was not able to parse the question correctly :-)

    Here is the scenario.

    1. Application User creates PatientConnection authorization request via app successfully
    2. Patient completes authorization request by answering secret question in HealthVault shell. Application is now authorized to access their Healthvault specified record.
    3. Patient then removes access to application (via HealthVault shell).
    4. If Application User attempts to create another PatientConnection authorization request, PatientConnection.Create() returns as exception which states "The connect request already exists, and cannot be recreated."

    Step 4 in this scenario is not required ( by design ). 

    A connect request can be used multiple times until it is deleted from HealthVault. This is useful in the following scenarios:

    • The user deauthorizes the app and then wants to reauthorize it. The user ID and record ID values are preserved during reauthorization, so the app doesn't have to update its store.

    • The user wants to select a different record. The app will remain authorized to the original record as well as the new one. Your app needs to be able to handle this scenario.

    For more information see Establishing authorization with a user using Patient Connect

    Thursday, March 20, 2014 4:56 AM

All replies

  • Can you use a separate applicationPersonID for the second time to force the re-auth?
    Thursday, April 18, 2013 7:43 PM
  • The same problem.

    No, It's not feasible. It doesn't fit my requirements.

    How do I remove InvalidPerson's ValidatedPatientConnection?

    Friday, July 26, 2013 11:23 AM
  • The same problem.

    No, It's not feasible. It doesn't fit my requirements.

    How do I remove InvalidPerson's ValidatedPatientConnection?

    Did you find a solution for this? I have the same issue.
    Saturday, March 01, 2014 8:48 PM
  • The question as stated is a bit ambiguous, so I am going to restate it as interpreted, and then provide some guidance. Please feel free to clarify if I was not able to parse the question correctly :-)

    Here is the scenario.

    1. Application User creates PatientConnection authorization request via app successfully
    2. Patient completes authorization request by answering secret question in HealthVault shell. Application is now authorized to access their Healthvault specified record.
    3. Patient then removes access to application (via HealthVault shell).
    4. If Application User attempts to create another PatientConnection authorization request, PatientConnection.Create() returns as exception which states "The connect request already exists, and cannot be recreated."

    Step 4 in this scenario is not required ( by design ). 

    A connect request can be used multiple times until it is deleted from HealthVault. This is useful in the following scenarios:

    • The user deauthorizes the app and then wants to reauthorize it. The user ID and record ID values are preserved during reauthorization, so the app doesn't have to update its store.

    • The user wants to select a different record. The app will remain authorized to the original record as well as the new one. Your app needs to be able to handle this scenario.

    For more information see Establishing authorization with a user using Patient Connect

    Thursday, March 20, 2014 4:56 AM