locked
GetValidatedConnections returns and empty list RRS feed

  • Question

  • I am not able to get a list of patients despite the fact that I can register new patients and authorize my app. Can someone check my AppID (16f6eead-a1f0-4bfa-8a85-a38340aa5c3e) in the Pre-Production Environment?

     

    Monday, December 12, 2011 5:31 PM

All replies

  • Just to be clear, your application is using patient connection, then you are picking up those connections on http://account.healthvault-ppe.com, and they aren't showing up when you are calling GetAuthorizedApplication?

    Can you verify that you are using the same application id in both cases?

    Monday, December 12, 2011 9:51 PM
  • Here's my test harness code, I used as a sanity check:

    PatientConnection.GetValidatedConnections(offlineConn) always returns an empty list even when I have just recently added a new patient and authorized the app. The issue at hand is that my real application has worked and in the latest release regression testing showed that half of the MSHV integration was not working, we can register patients, print thier letters and authorize my app to access test patient records, but I cannot file results to MSHV because I never get a list of patients that have authorized my app.

    Public Class Form1
    
        Private Sub btnGetAuthorizations_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGetAuthorizations.Click
    
            'We need to check which patients have authorized this application.
    
            'Prepare the application ID
            Dim applicationID As New Guid(txtApplicationID.Text)
    
            'Create an offline connection
            Dim offlineConn As OfflineWebApplicationConnection
    
            offlineConn = New OfflineWebApplicationConnection(applicationID, txtHealthVaultURL.Text, Guid.Empty)
    
            offlineConn.Authenticate()
    
            'Then get all valid connections
            Dim collConnections As Collection(Of ValidatedPatientConnection)
            collConnections = PatientConnection.GetValidatedConnections(offlineConn)
    
            For Each valConn As ValidatedPatientConnection In collConnections
    
                Try
    
                    txtPatientList.Text += valConn.PersonId.ToString() + valConn.RecordId.ToString() + Convert.ToInt32(valConn.ApplicationPatientId.ToString())
    
                Catch ex As Exception
    
                    'Log/display errors
    
                End Try
    
            Next
        End Sub
    
    
    
    End Class

     

    Tuesday, December 13, 2011 10:33 PM
  • Hi Eric,

      I looked at this again today and I am using the same certificate to register patients as well as check for recent authorizations.

    Chris

    Wednesday, December 14, 2011 6:03 PM
  • This issue is being worked on offline.

    Thank you.

    -Suzanne

    Thursday, December 15, 2011 11:38 PM