This application simulates a
study where blood pressure information for a number of people is downloaded
from HealthVault. It demonstrates how a direct-to-clinical application can
perform the following functions:
·
Generate an
authorization code and security question/answer to give to users to authorize
the application
·
Get a list
of which users have actually used their codes to authorize the application
·
Retrieve
data from a selected group of authorized users for a selected date range.
Generating and configuring a new Application
Id
This sample does not come with an
ApplicationID pre-generated and requires you to
generate your own.
Because this is a
direct-to-clinical application, it can query for the list of all users who have
authorized the application and access their data. If everyone who used this
application used a common ApplicationId then they
would all be able to see each others’ users and data.
You can use the HealthVault
Application Configuration Center to create your own ApplicationID.
The following video in MSDN demonstrates how to get started:
http://msdn.microsoft.com/en-us/healthvault/bb898878.aspx
Within HealthVault Application Configuration Center you will need to set the
following configuration values:
·
Turn on
access to ConnectPackage methods
On the Methods tab, check the box adjacent to Application requires
access to ConnectPackage methods and save it.
·
Configure
permissions for offline access
Direct to clinical applications require offline access to users data. This
application requires read access to following data types in HealthVault
·
Personal
Contact Information
·
Personal
Demographic Information
·
Blood
Pressure Measurement
This application does NOT require any online access. You don’t have to do
anything on that tab.
Once the Application Id is created and configured as above, enter the Application
Id in the sample's DCApp.exe.config
configuration file. Example:
<add key="ApplicationId" value="1234da34-218a-4ddd-a042-f0f10a68571f
"/>
Authorizing the application for users
The first thing to do in the
application is to click Enroll Participant
and create the Authorization code for a new user. That user
can then go to the URL provided and authorize the application. Then you
can return to the application and click Check
for Authorizations to see that the user has authorized the application. You
are then ready to click Retrieve Data
to return data.