Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

Building a Multi-Record Application (MRA)

HealthVault

MRA stands for Multi-Record Application. SRA is Single-Record Application. MRA can access multiple records at the same time, while SRA needs to call platform redirect target to switch record to use.

During application provisioning at Application Configuration Center(ACC), an application does not need to be identified as an SRA or an MRA. An application makes this identification only when it makes a specific request to the platform.

If the application needs HealthVault platform functions as MRA, it has to call HealthVault platform with optional parameter.

  • When signing in the user, call the RedirectToLogOn method and pass in “TRUE” for the isMra parameter. This action ensures that the user sees appropriate UI to select multiple records in application authorization.
  • If a user of the application adds a new record to the account, the application needs to call HealthVault platform to give the application access to that record. The application calls the RedirectToShell method and passes in “APPAUTH” as the target location (targetLocation) parameter. In the target query (targetQuery) parameter, the application needs to pass in "isMra=true".

A HealthVault account is created when you sign up with HealthVault. An account can hold records for many users, but is under a single person’s name. Each record contains health information for one person, and can be managed and shared independently of other records, so you can keep information for each person separate.

If you are writing an application, this is something that you need to deal with. If you use an application, and then come back to it after getting access to another record, you need to provide the following:

  • A way to authorize the application to access the new record. This authorization is done through the shell and a redirect, similar to the way normal authorization is done.
  • UI to allow the user to switch between records.

For an example of how to do this, take a look at the HealthAndFitness application, provided in SDK\DotNet\WebSamples.

The existence of multiple records is the reason why you need to use PersonInfo.SelectedRecord to access the data: it belongs to the current record, not to the current user.

An application can access PersonInfo.PersonId and SelectedRecord.Id, and use those to uniquely identify that user and record.

But, to make it harder to correlate information between applications, the same person using two separate applications is going to have two different values of PersonInfo.PersonId and SelectedRecord.Id.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.