예제 #1
0
        private void ContributeCCDAViaRecordAuthorization()
        {
            // Note: Applications can store the HealthVault personID and recordID and use this to make offline requests to store new information
            // in the patient's record whenever new data is available. In this sample, since we don't maintain offline storage (i.e. a DB) to associate
            // the data source organization's patient identifier with the HealthVault person and record ID, we instead sign-in the user to determine the
            // person and record ID everytime a request to send a new CCDA to HealthVault happens (i.e. clicking the "Send CCDA to HealthVault" button);

            PersonInfo pi = WebApplicationUtilities.LoadPersonInfoFromCookie(HttpContext.Current);

            if (pi == null)
            {
                OutputMessage(lblErrorOutput, "Must login first");
                return;
            }

            // Make the offline call to stor the CCDA in the patient's HealthVault record.
            OfflineWebApplicationConnection connection      = new OfflineWebApplicationConnection(pi.PersonId);
            HealthRecordAccessor            receordAccessor = new HealthRecordAccessor(connection, pi.SelectedRecord.Id);

            receordAccessor.NewItem(_newCcdaItem);

            OutputMessage(lblSuccessOutput, "Successfully sent CCDA document to HealthVault via Record Authorization.");
        }
예제 #2
0
 private PersonInfo GetLoggedInPerson()
 {
     return(WebApplicationUtilities.LoadPersonInfoFromCookie(HttpContext.Current));
 }