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.
- User creates PatientConnection authorization request via app successfully
- User completes authorization request by answering secret question in HealthVault shell. Application is now authorized to access their Healthvault specified record.
- User then removes access to application (via HealthVault shell).
- 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).
- Is it correct that the ValidatedPatientConnection returned by PatientConnection.GetValidatedConnections() will be automatically deleted by HealthVault after 90 days?
- 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