O'Reilly logo

Enabling Programmable Self with HealthVault by Vaibhav Bhandari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Getting Started with HealthVault

“The groundwork of all happiness is health.”

Leigh Hunt

Health is critical to all of us. Health care and the infrastructure around it touch our lives and the lives of our loved ones. Many of us in pursuit of long-term health adopt goals ranging from controlling our weight to long-distance running. The health care industry is in an early stage of realizing the power of the digital world and the effectiveness of personal health tools in helping drive change.

This chapter introduces HealthVault as a powerful tool for interacting with health data. It also provides a walkthrough of the functionality available to end users through HealthVault.

What Is HealthVault?

HealthVault is a personal data platform that allows a user to record, collect, and share all health information in a central location. A key benefit of using HealthVault is its application programming interface (API), which applications and devices can use to provide value for the end user. As depicted in Figure 1-1, HealthVault enables an ecosystem of devices and applications, with use cases ranging from tracking diet and nutrition to connecting to hospital or pharmacy systems. HealthVault currently supports more than 300 applications and 80 devices. Some devices connect to HealthVault via the HealthVault Connection Center, a complimentary client application that enables devices to upload information directly to HealthVault from a Windows PC.

HealthVault ecosystem with devices and applications

Figure 1-1. HealthVault ecosystem with devices and applications

Getting Started with HealthVault

On the HealthVault website, http://www.healthvault.com, a user can create an account using an existing Windows Live ID, Facebook, or OpenID account, or choose to create a new Windows Live ID. Figure 1-2 shows the sign-up screen for HealthVault.

HealthVault is currently publicly available in the United States and United Kingdom. You can create an account by entering basic demographic information and proof of human-computer interaction.

When a new user signs into HealthVault, he is greeted with a new user wizard that enables him to select tasks and allows him to connect to various services (Figure 1-3).

HealthVault sign-in page

Figure 1-2. HealthVault sign-in page

HealthVault new user wizard

Figure 1-3. HealthVault new user wizard

Overview of HealthVault Features

This section covers a few of the most popular features in HealthVault, concentrating on ones that we’ll use in this book to collect, manipulate, and share information.

Health Information

The Health Information section of the health profile provides a view of all the information in the user’s health record. HealthVault supports more than 80 discrete kinds of data, from Advance Directive to Weight Goals. Through the user interface, you can edit and add health information. As Figure 1-4 indicates, you can add allergies, conditions, various measurements (blood glucose, blood pressure, peak flow, weight, height, and lab test results), files (Continuity of Care Document [CCD], Continuity of Care Record [CCR], etc.), health history (family, immunizations, procedures), and emergency provider contact information.

Health information input supported by HealthVault

Figure 1-4. Health information input supported by HealthVault

You can also drill deeper to understand the data entered into your health profile and see the audit trail to understand how the data evolved. Figure 1-5 shows an audit history of weight in HealthVault.

Viewing details of health data in HealthVault

Figure 1-5. Viewing details of health data in HealthVault

Creating an Emergency Profile

Out of the box, HealthVault provides each user account with an emergency profile consisting of current allergies, conditions, medications, medical devices, and emergency contact information. A user can print, share, and update her emergency profile.

With an emergency profile, the user gets an emergency access code that could provide timely and up-to-date medical information to an emergency responder through HealthVault.com.

Figure 1-6 shows the emergency access profile. Note that in addition to printing and sharing it, a user can also access a number of HealthVault tools that provide a plethora of emergency services.

Emergency access profile

Figure 1-6. Emergency access profile

Discovering Health Tools

Using the Apps and Device section of the health profile, users can discover new applications and devices available as part of the HealthVault ecosystem. Figure 1-7 shows integrated HealthVault application and device directory. This directory is categorized by activities and conditions. A user can also get a recommended set of health tools based on their preferences set in the new user wizard (Figure 1-3). This searchable directory functionality was recently added to HealthVault.

Through this section, users can also review and revoke access permissions to all the HealthVault applications they have used over time.

Discovering HealthVault applications and devices

Figure 1-7. Discovering HealthVault applications and devices

Sharing

Using the Sharing section of the health profile, users can view with whom and how this information is being shared. Users can invite people to view granular information in their health profiles. The data used in this book was collected from gracious contributors by using this sharing functionality for specific types of health data. As Figure 1-8 shows, through the Sharing pane, users can review and revoke access to other people.

History

Having a granularly shareable health profile enables a plethora of care coordination scenarios. However, we do want to know how and when our sensitive health information is being accessed and updated. As Figure 1-9 shows, through the History pane of the health profile, users can view the ways their health information has been accessed. I frequently look at the “Changes made in last 30 days” and review who has accessed and updated my record.

Sharing health information

Figure 1-8. Sharing health information

Reviewing a history of changes

Figure 1-9. Reviewing a history of changes

Working with Health Data

Data is a powerful tool to understand behaviors and trigger appropriate, measured change. Users can find out interesting trends by running calculations on their data stored in HealthVault, as I’ll show throughout this book.

For instance, through the health information section, a user can chart his weight readings (Figure 1-10).

Tracking weight in HealthVault

Figure 1-10. Tracking weight in HealthVault

You will see that over the last several readings, weight has been stable around 257 pounds. Nonetheless, I would like to take this a bit further and analyze these readings. To do this, I click on the Export button in the health information section. This gives me the readings in a comma-separated values (CSV) format, which I can then open in Microsoft Excel or any spreadsheet program (Figure 1-11). If you don’t have weight data, I encourage you to download the sample spreadsheet with weight data included as part of this book’s examples and follow along with that data.

Weight readings in Microsoft Excel

Figure 1-11. Weight readings in Microsoft Excel

Using Excel, I can clean the data so I can chart and analyze it further. I can add a series date attribute by just using the date from the first column (Figure 1-12).

Using Excel to clean up the date

Figure 1-12. Using Excel to clean up the date

The formula DATEVALUE(LEFT(A2, FIND(""), A2))) converts the cell to a date value by picking the left side of the date format before the first space in column A2. The formula ROUND(SUBSTITUTE(C2, "pounds")),0) removes the pound unit in column C and rounds the value to the nearest integer.

Using Excel, I can find the average weight over the last set of readings and in fact plot my weight over a number of months to uncover the monthly trend (Figure 1-13).

Monthly average weight as a bar chart

Figure 1-13. Monthly average weight as a bar chart

Managing weight is only one scenario where you can use health tools to gain insights. This book’s associated website, http://enablingprogrammableself.com, has a repository of spreadsheets that can give you inspiration for additional care scenarios.

Using Partner Applications

So far, we have looked at the mechanisms provided within HealthVault to track, update, and visualize health information. Outside applications, however, offer even more information. For instance, the Mayo Clinic Health Manager application (https://healthmanager.mayoclinic.com) can track your weight toward an intended goal (Figure 1-14).

Tracking weight against a goal

Figure 1-14. Tracking weight against a goal

The Mayo Clinic Health Manager is able to access all the weight information from a user’s HealthVault account using the HealthVault API. If you’re not a programmer, you can benefit from many such applications that add value to HealthVault by allowing you to track and measure health data. If, however, you have modest programming skills in almost any modern language, this book will show how you can create your own.

The HealthVault .NET Web SDK provides an abstraction on HealthVault APIs to simplify working with the platform. Example 1-1 is a .NET program that uses the SDK to extract all the weights from a user’s HealthVault record into a dictionary.

Example 1-1. Accessing HealthVault through the .NET Web SDK to read weight measurements

using System;
using System.Collections.Generic;

using System.Web;

using Microsoft.Health;
using Microsoft.Health.Web;
using Microsoft.Health.ItemTypes;
using Microsoft.Health;

public partial class HelloWorldPage : HealthServicePage
{
    protected void Page_Load(object sender, EventArgs e)
    {

        HealthRecordSearcher searcher = PersonInfo.SelectedRecord.CreateSearcher();

        HealthRecordFilter filter = new HealthRecordFilter(Weight.TypeId);
        searcher.Filters.Add(filter);

        HealthRecordItemCollection items = searcher.GetMatchingItems()[0]; 1

        Dictionary<string, string> weights = new Dictionary<string, string>();

        foreach (Weight item in items)
        {
            weights[item.When.ToString()] = item.Value.ToString();
        }

        WeightView.DataSource = weights;
        WeightView.DataBind();
    }
}

The steps in extracting data are: create a searcher, add a filter to restrict the output to the field or rows you want, and then run a search. searcher.GetMatchingItems() in line 1 of Example 1-1 actually issues a HealthVault GetThings API request with a query configured to fetch all the Weight items from the user’ss HealthVault record. We will learn more about the API and account management in Chapter 3, and more about the data types in Chapter 4.

In the next chapter, we will delve deeper into the HealthVault device and application ecosystem.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required