I am so psyched about this post that I’m literally bouncing up and down in my chair. That may be partially a hangover from watching Pacific Rim on the enormous Boeing IMAX screen at Pacsci … but only a little, because I get to announce something today that I think fundamentally ups the ante for the “quantified self” movement.
HealthVault is a pretty great aggregator of health data. We have more than 200 biometric monitoring devices connected to the platform: fitness and activity monitors, weight scales, blood pressure and glucose monitors, peak flow meters, and more. We have hundreds of connected web and mobile apps, many of which are built to capture personal observations using everything from simple manual check-ins to camera and audio captures.
But best of all --- we have an API and extensible data model that makes it incredibly easy for developers to add even more data to the mix, and to work with it holistically and efficiently. One query and data across domains comes back for correlation and pattern-searching. No database to worry about. Automatic integration of clinical data. SDKs available for all modern platforms. And a fully-functional test environment you can start using in five minutes. It’s pretty awesome.
So why isn’t it already the de-facto platform for all QS work?
One key reason is that, by design, connecting an app to the production HealthVault systems is a somewhat involved process. You have to sign an agreement with Microsoft that talks about lawyerly stuff like liability and agreement transparency, etc… things that are completely appropriate and are part of the fabric that make HealthVault a credible ecosystem, but which also make it hard to simply work with your own data in creative ways.
Enter Personal Applications for HealthVault!
Beginning today, any HealthVault user can create their own personal applications, which have full access to the HealthVault API --- every bit and byte of data in a HealthVault record --- read and write --- on any supported platform --- with just one limitation. These apps are “special” in that they can only work against your own data (or more accurately, data in records that you have access to).
Because they are limited in this way, there is no additional approval process required --- personal apps are “live” by definition and provide you an integrated API to work with the data from any of your connected apps and devices.
Let’s be really clear about what this is. You now have one, universal, consistent API that you can use to work with your data from (let’s just take a sampling off the top of my head):
- Fitness devices from: Fitbit, Withings, Nike, Polar, Garmin, more…
- Blood glucose meters, blood pressure cuffs, weight scales, peak flow meters, more…
- Healthcare providers (Blue Button, Direct Project, more…)
- Clinical lab results from LabCorp, Quest, MyMedLab, more…
- Mobile apps on iOS, Android, Windows Phone, Windows 8, more….
- Medical images in DICOM format…
- WHATEVER ELSE YOU CAN MEASURE THIS IS SO AWESOME AAAAAHHHH!
Ahem. That last bullet, over-enthusiasm aside, is a key thing to realize. Literally anything you want to capture and store in HealthVault … you can write an app for. Want to keep track of how many meetings you have each day, or the ambient temperature and humidity, or GPS location traces? You can use a Personal App to store any of that in HealthVault --- either using one of our dozens of existing data types, or by using the “application specific” type to store anything at all. And you can do it from pretty much any phone, web or tablet.
How it works
The mechanics are pretty simple. First, log into the Personal App Manager using your HealthVault account credentials and grant access to your record. From there, click the “Create new personal application” link. Enter a name for your app, and pick the data types you want to access.
Note you have to decide whether you want “online” or “offline” access for the types you select --- you can read more about what that means here, but the likelihood is that you’ll want online when writing web applications, otherwise offline. You can create new apps anytime, so the downside of picking wrong the first time is not a big deal.
Click the “create app” button and you’re off to the races. On the resulting page you’ll see your new application identifier (“AppId”), as well as links to download the app’s private key (Pfx) file --- these two pieces together identify your app to HealthVault.
That it --- now just write your app as you would any other HealthVault app, using that appid and pfx. You can get started with sample code and all the documentation you could ever want at http://msdn.com/healthvault.com. When you run your code, you’ll only be able to authorize records tied to your account. If you decide the app you’re building should be available more broadly … let us know (you can use the contact form on the blog here!); we’d love to help you take the app “live” for others to use as well.
A quick sample: “HVDump”
From the day we launched HealthVault, we’ve made it clear that you control your HV data. It’s yours, and you can get it out anytime you want. That’s completely true --- but just logistically, it’s been hard to take advantage of. You can export a CCD, but that doesn’t include all the data types. You can download items as XML one-by-one, but really? The only real way to get at everything without calling us on the phone is to use the API.
And now, that API is easy for you to take advantage of. Make a personal app with the data types you want, and run this little sample command-line app I built called HVDUMP. The source code is in the download link; to get it working just:
- Download and build the source; the project file is for Visual Studio 2012.
- Create a Personal App with offline read access to desired types.
- Click the “Authorize” link for your app and follow the instructions --- this step is important for apps that work in offline mode.
- Download the Pfx file and save it in the same directory with the hvdump.exe executable.
- Edit the app.config file to specify your appid, the name of your pfx file and the password you selected. Also make sure the “PlatformUrl” setting matches the one you see when you sign in to the Personal App Manager.
- Run it …the output will contain the raw XML for your complete HealthVault record. W00t!
Actually, it’s not quite the full record --- this app doesn’t download binary blobs associated with uploaded files or DICOM images … I’ll leave adding that support as the traditional exercise for the reader. 😉
Why I think this is so important
In the world today --- code is power. Code runs virtually everything around us, so making sure our users have code-level access to their information is the most real and sincere way we can possibly say: it’s yours, do with it what you want. Will everyone use it? Of course not --- but for those that do, it’s magic.
Add to that, the breadth and depth of data you can work with through the HealthVault API are unparalleled. Period. Nobody else brings together so much data in one place, and beyond that lets you add your own stuff --- anything you want --- to the mix.
There are critical discoveries out there about YOU and how you work --- we’ve just lit up an amazing tool to help you make those discoveries. I can’t wait to see what comes of it!