health vault intro for developers

46
Introduction to HealthVault for Developers Umesh Madan Principal Architect Microsoft Corporation Ali Emami Technical Lead Microsoft Corporation

Upload: aliemami

Post on 25-May-2015

13.225 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Health vault intro for developers

Introduction to HealthVault for Developers Umesh

MadanPrincipal Architect

Microsoft Corporation

Ali EmamiTechnical Lead

Microsoft Corporation

Page 2: Health vault intro for developers

2

• Today’s Agenda: • HealthVault Overview• HealthVault Application Development• Connecting to HealthVault• Data Model and Access• Building an App

• HealthVault + iOS development

• Welcome CodeFest Developers!

• Join us for “HealthVault State of the Union II” Tuesday 4/24 8-9am Pacific

HealthVault for Developers

Page 3: Health vault intro for developers

3

What is HealthVault?• Cloud-based personal health platform exposing HTTP/XML based interface to web, rich and mobile applications

• Supports wide range of data types: clinical, financial, imaging, fitness, safety, etc.

• Device connectivity for supporting home monitoring and fitness scenarios

• CONSUMER controlled record, with built-in provenance to support provider-to-provider sharing scenarios

Page 4: Health vault intro for developers

4

Why do we need it?

Technology innovation in health is crucial but hard to deliver

• Vendor-specific information systems

• Concerns with privacy and policy

• Industry focus on sick-care rather than health-care

• Economics – pushing costs to the consumer

Page 5: Health vault intro for developers

5

A neutral, patient-controlled resource that enables long-term family engagement

Enter HealthVault!

Page 6: Health vault intro for developers

6

• 300+ applications

• 80+ Devices

• Branding and business-model agnostic

• Sharing and secure messaging

• Built-in privacy, security & consent

• High-availability and redundancy

• Near real-time eventing

• Vibrant partner directory and ecosystem

• International availability

The development platform for Patient Engagement

Page 7: Health vault intro for developers

7

Microsoft platform DNA

• Developer engagement & tools

• Durable, supported interfaces

• Cross-platform commitment

• Long-term investment

• Enterprise footprint

• Respect for partner innovation & IP

• Relentless platform improvement

Page 8: Health vault intro for developers

8

• Authentication: Leverage Windows Live ID, Facebook and OpenID user log-in.

• Authorization: Use the HealthVault authorization model for requesting access to sensitive health information.

• Auditing: Data access auditing is built-in so you don’t have to build it.

• Data Provenance: Gives applications fine-grained choice in trust decisions• Every piece of data in HealthVault contains an audit trail of its source.

• Optional digital signatures allow for independent verification of data integrity and source.

Privacy, Security and Provenance Framework

Page 9: Health vault intro for developers

9

• Users store data once and leverage it in new ways as apps are introduced.

• Built-in support for custodianship and managing family health

• HealthVault provides the infrastructure for long-term storage and access to users health information so applications can focus on innovation.

• Flexible storage/access options:• One-time read of data from HealthVault. • One-time export of data to HealthVault• Continual synchronization of data between HealthVault and your storage system.

Flexible and Interoperable Data Type System

Page 10: Health vault intro for developers

10

• Users have a single place to collect, store, share, and use their health information.

• Built-in support for scenarios involving data custodianship and managing health of families.

• HealthVault provides the infrastructure for long-term storage and access to users health information so applications can focus on innovation.

• Flexible storage/access options:• One-time read of data from HealthVault. • One-time export of data to HealthVault• Continual synchronization of data between HealthVault and your storage system.

Cloud Service and Storage

Page 11: Health vault intro for developers

11

Device connectivity

FitBit Wireless Personal trainer

Withings Wi-Fi body Scale

• 80+ devices connected to HealthVault• Devices + apps = awesome opportunity • Device types include:

• Weight scales• Blood pressure monitors• Blood glucose monitors• Pedometers and activity monitors• Heart Rate monitors• Pulse oximeters• Etc.

• Device Directory: http://healthvault.com/devices

Omron blood pressure monitors

Page 12: Health vault intro for developers

12

5 minutes to valueScenario acceleration: Emergency Prep

Page 13: Health vault intro for developers

13

Deepen value proposition with partner applicationsScenario acceleration: Emergency Prep

Page 14: Health vault intro for developers

14

Medical imaging in the cloud

Candelis and Microsoft Team Up to Empower Patients

Patients can access and control their medical images

Expectant couples can share Ultrasound images of their baby with loved ones

Page 15: Health vault intro for developers

15

Mobile applications on HealthVaultWP7, iOS and Android

iTriage (iOS). #1 Health app on AppStore

Livescape (WP7). Daily tracking app

HealthVault (WP7). Our native app!

Weight4Me (WP7). Weight management

CTIS mPHR (iOS)

Page 16: Health vault intro for developers

16

More HealthVault mobile apps!

myMedicalImages (WP7)

bant (iOS). Diabetes managment

Skinscan (WP7) Mole tracking

HealthGuard (WP7) HealthVault data access

Page 17: Health vault intro for developers

17

HealthVault Application Development

Page 18: Health vault intro for developers

18

The HealthVault XML API defines the core service interface• Accessible from any modern programming language• Crypto layer to strongly identify callers• Core API released under MS Community Promise

Stack-specific SDKs simplify the task of communicating with HealthVault• .NET SDK

• Sim-ships with HealthVault releases• Strongly-typed, object-based interface

• Open source libraries• Generally lower-level abstractions than .NET• Java• Windows Phone• iOS• Android• Ruby• PHP

HealthVault Cross-Platform Development

Page 19: Health vault intro for developers

19

• Application: Refers to the external organization/system that is connecting with HealthVault.

• Person: Refers to a HealthVault user (patient).• PersonID: Uniquely identifies to the app, a Person that has authorized the app. • The term People or Persons is used to indicate a plurality of People in the HealthVault API. • Note: Healthcare providers do not have PersonIDs within HealthVault since they access HealthVault through an

external app.

• Record: A container of health data for a Person. • The data contained within a record is data intended for a single Person. • A Person can have access to multiple records.

» For instance, a parent maintains a record for herself and for her children. She acts as a custodian of these records since she manages their health.

• RecordID: Uniquely identifies to the app, a Record that is authorized to be accessed by the app. • Data CRUD operations are always performed for a target record.

• Thing: Represents a single health data item that is stored within a Record. • For example, a Weight thing represents an instance of a Weight measurement. ( more on the Data Type Model

and Schema later)• Things are referred to as HealthRecordItems in the .NET SDK.

Core Concepts: Application, Person, Record, Thing

Page 20: Health vault intro for developers

20

• A Person interacts with HealthVault by: 1) Logging-in and using the HealthVault Shell UI OR2) Using applications (and devices connected to applications)

» Applications and devices are the primary value drivers for HealthVault users.

• Healthcare professionals interact with HealthVault by: 1) Using HealthVault-connected applications like EMRs, provider portals, and custom

applications. » Healthcare professionals DON’T log-in to the HealthVault Shell to interact with People.

• Apps must establish a connection with Records in order to access data.

• HealthVault provides a number of ways to establish the connection.

Connecting to HealthVault

Page 21: Health vault intro for developers

21

• Usage Scenario: The application has a user-facing website. • People visit the site and are redirected to HealthVault to: • Sign-in, select a Record, and authorize it. • Subsequently, HealthVault redirects the Person back to the app.• The app uses the PersonID and RecordID to access data in the

Record.

• The .NET SDK wraps this functionality in the HealthServicePage class. • ASP.NET pages that derive from HealthServicePage inherit this

behavior.

Establishing a connectionFrom a Website

Page 22: Health vault intro for developers

22

• Usage Scenario: The application runs on a mobile device that communicates with HealthVault directly.

• Upon first use of the app, the Person is directed to HealthVault to sign-in or create an account, and authorize a Record.

• The Windows Phone, iOS and Java SDKs wrap this functionality nicely. – More on the iOS version of this later.

Establishing a connectionMobile app

Page 23: Health vault intro for developers

23

• Usage Scenario: The application does not have a patient facing website.

• Example: the connection is between a provider’s EHR system and a HealthVault Record.

• This patient picks a Secret Question an Answer. • The app creates a “Connect Request” and notifies the patient to pick

this up. • The patient answers the secret question and selects a Record. • The Connect Request is considered “validated” and authorization is

established between the application and the Record. • The app polls periodically to detect new validated connections. • The .NET SDK wraps this functionality in the

Microsoft.Health.PatientConnect namespace.

Establishing a connectionDirect-To-Clinical (or D2C)

Page 24: Health vault intro for developers

24

• Usage Scenario: The application wants to drop-off data without long-term authorization to a Record

• Example: – An EHR product within a clinic uses DOPU at discharge time to send

patients a visit summary.– The user must manually pickup the data on each visit as each long-

term authorization is not established. • This workflow is nearly identical to the D2C workflow.

– Difference with D2C: Data is incorporated into the Record instead of auth establishment.

– Simpler than D2C: The app does not need to poll for data changes.

• The .NET SDK wraps this functionality in the Microsoft.Health.Package class.

Establishing a connectionDrop-Off Pick-up (DOPU)

Page 25: Health vault intro for developers

Data Model Design Principles

• Interoperable o We do our best to make our data types

transformable to and from industry standards in actual use

• Inclusiveo Strike a balance between fully

structured data and unstructuredinformation

o Types are designed to be as inclusive as possible – with the ability to capture structure when it is available, but still take in the data when structure is missing

o Encourage the use of standard vocabularies through UI, API and JSON interfaces

• Just in Timeo Our data model is growing as we work with partners fluent in various domains

• Independento As much as possible, keep application development simple by eliminating relationships

across data itemso Allow expression of connections but never rely on their existence for data integrity

25

Page 26: Health vault intro for developers

26

HealthVault data examples

• Conditions, allergies and procedures from healthvault.com• Medications from Walgreens• Lab Results from MyMedLab• EOBs from Premera• Weight measurements from the HVCC Gadget and Withings Scale• Exercise sessions from MSN RouteTracker• Blood pressure readings from Omron• Genetic SNPs and analysis from Navigenics• Family History from the Surgeon General• Providers and appointments from Mayo• Health Assessments from Navigenics and H1N1• Medical images uploaded from HVCC• Passport and drivers license scans uploaded at healthvault.com• …

Page 27: Health vault intro for developers

HealthVault Data Model

• Things in HealthVault have common data elements as well as a schematized section specific to each type of data. The common fields include:

– Version Stamp: Identifies the specific instance of a thing. When a thing is created/updated, the version stamp changes.

– TypeID: Specified the data type of the “schematized” portion of the thing.

– Audits: The source of the data, when it was created/updated, by whom, etc.

– Blobs: Allows unstructured data to be associated with structured data. Medical Images are a good example.

– Signature: Optional Digital Signature on an item which can be used to validate integrity and source of data.

– Related Items: Allows created relationships between things. For instance a “Medication” used to treat a “Condition” could be linked through a Related Item.

– Client ID: Allows apps to define their own identifiers

– Notes: Free-form text notes

– Data-XML: The schematized portion of a thing.

27

Page 28: Health vault intro for developers

HealthVault Data Model

• The schematized portion represents health domain types. For example: Weight Measurement represents a single weight measurement.

• Explore Data Types here: http://developer.healthvault.com/pages/types/types.aspx

• XML representing a Weight Measurement:

28

<weight> <when> <date> <y>2012</y> <m>4</m> <d>18</d> </date> <time> <h>7</h> <m>30</m> </time> </when> <value> <kg>74.84274105165585</kg> <display units="pounds" units-code="lb">165</display> </value> </weight>

See the following for more information on the Data Model: • HealthVault Data Types – Weight, measurements and display va

lues

• Vocabularies and CodableValue

• HealthVault Data Types - Custom Data Types

• What data type should I use?

Page 29: Health vault intro for developers

Accessing Data

• In the XML API, there are two key web-service methods for accessing data, “GetThings” and “PutThings”.

• In the .NET SDK this functionality is wrapped in the following classes:– Microsoft.Health.HealthRecordAccessor for reading and writing data.– Microsoft.Health.HealthRecordSearcher for more advanced data querying.

• To read all instances of Weight things in a Record:

29

HealthRecordSearcher searcher = PersonInfo.SelectedRecord.CreateSearcher();

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

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

Page 30: Health vault intro for developers

30

Detecting Data Changes

• Apps may want to detect data changes in HealthVault Records to which they’re authorized.

• Options:o Polling

• In this approach the app calls GetUpdatedRecordsForApplication to detect Records authorized to the app that have changed since a specific time.

• The app can then read the data that has changed.

o Eventing• This is an event driven approach for detecting changes. • Apps register a handler which is notified when there are changes to authorized

records. • Refer to the HealthVault Eventing concept article for more information.

Page 31: Health vault intro for developers

31

Creating an app• Once you’re ready to create an app, visit the Application Configuration Center (ACC):

https://config.healthvault-ppe.com/ to get an ApplicationID and configure your application properties.

• Properties you will configure in ACC include: – Application Name– Description– App Type

• If you are creating a mobile device app, the app type in ACC should be “SODA” (Software on Device Architecture).

– The data types and permissions your application will request users to authorize (“Online rules” and “Offline rules” tabs)

– Action URL• If your app has a user-facing website, the URL HealthVault will redirect users to upon authorization and sign-in.

– The Help link in the top-right of ACC provides more detail on each individual field.

• Once you have your AppID, you can start your project by copying one of the existing sample apps that are part of the SDKs, and changing the existing AppID to the newly generated AppID for your application.

• Free Microsoft Developer Tools: http://microsoft.com/express

Page 32: Health vault intro for developers

32

HealthVault + iOS Development

Page 33: Health vault intro for developers

HealthVault for iOS Basics• Open Source Libraries

• Apache 2.0 License

• HVMobile_VNext• https://github.com/microsoft-hsg/HVMobile_VNext

• Hello World sample : HVLib/Samples• Pre-release of rich easy to use programming model for iOS• Built in parsing/serialization of HealthVault types• Ongoing active updates and development

• HVMobile V1.0• https://github.com/microsoft-hsg/HealthVault-Mobile-iOS-Library• Production Release

• This overview focuses on HVMobile_VNext

33

Page 34: Health vault intro for developers

Start your app -(void)startApp { [[HVClient current] startWithParentController:self andStartedCallback:^(id sender) { if ([HVClient current].provisionStatus == HVAppProvisionSuccess) { // App is appropriately provisioned } }];}-(void) viewDidLoad { … [self startApp];}

• Ensures application has access to user’s HealthVault Record. • Provisioning is usually a one time event

• User can add additional records later (such as their family member)

34

Page 35: Health vault intro for developers

35

Page 36: Health vault intro for developers

Get Items-(void) getWeightsFromHealthVault {

[[HVClient current].currentRecord getItemsForClass:[HVWeight class] callback:^(HVTask *task) { @try { …

HVItemCollection* items = ((HVGetItemsTask *) task).itemsRetrieved;HVItem* item = [items objectAtIndex:0];

HVWeight* weight = item.weight; @catch (….. }];}

• You typically work with one record at a time - the currentRecord

• Calls to HealthVault are asynchronous. Encapsulated as “Task” objects.

• HVWeight, HVMedication, etc. - Objective-C classes for the HealthVault types

36

Page 37: Health vault intro for developers

Display Item Data-(void) displayWeight:(HVWeight *)weight inCell:(UITableViewCell *)cell{ cell.detailTextLabel.text = [NSString stringWithFormat @“%f", weight.inPounds]; cell.textLabel.text = [weight.when toStringWithFormat:@"MM/dd/YY"];}

-(void) displayMedication:(HVMedication *)med inCell:(UITableViewCell *)cell{ cell.detailTextLabel.text = med.name.text; cell.textLabel.text = [med.dose toString];}

• Item data available as convenient properties• Methods to create text representations included

37

Page 38: Health vault intro for developers

Add New Items-(void) addWeight {

HVItem* item = [HVWeight newItem]; HVWeight* weight = item.weight; weight.inPounds = 153.34; weight.when = [[HVDateTime alloc] initNow];

[[HVClient current].currentRecord putItem:item callback:^(HVTask *task) {@try { [task checkSuccess]; } @catch (NSException*exception) { }} ];

}

38

Page 39: Health vault intro for developers

Update Existing Item- (void) updateExistingWeight:(HVItem *) weight { item.weight.inPounds = 163.34; item.note = @”Fixed typo! Haven’t actually lost 10 pounds !”;

[[HVClient current].currentRecord putItem:item callback:^(HVTask *task) {

@try { [task checkSuccess]; } @catch (NSException*exception) { }} ];

}

39

Page 40: Health vault intro for developers

Get Items Advanced-(void) getWeightsSinceDate:(NSDate *) date{ HVItemFilter* itemFilter = [[[HVItemFilter alloc] initWithTypeClass:[HVWeight class]] autorelease]; itemFilter.effectiveDateMin = date;

HVItemQuery* query = [[[HVItemQuery alloc] initWithFilter:itemFilter] autorelease]; query.maxResults = 25;

[[HVClient current].currentRecord getItems:query callback:^(HVTask *task) { HVItemQueryResults* results = ((HVGetItemsTask *)task).queryResults; }];}

• Rich querying of HealthVault data: HVItemQuery, HVItemFilter• Can query for specific items • Can query for items matching a given XPath

• Multiple filters per query – and multiple queries per getItems request. 40

Page 41: Health vault intro for developers

Search Vocabulary-(void) searchMedicationsFor:(NSString *)text {

[HVVocabSearchTask searchForText:text inVocabFamily:@"RxNorm" vocabName:@"RxNorm Active Medicines" callback:^(HVTask *task) {

HVVocabSearchTask* vocabSearch = (HVVocabSearchTask *) task; HVVocabCodeSet* result = vocabSearch.searchResult;

for (HVVocabItem* item in vocab.items) {… item.displayText …

}}

• Example does a full text search - great for auto-complete• Flexible Vocabulary searching and Vocabulary download API

41

Page 42: Health vault intro for developers

42

• Population Health• Identify high-risk individuals from a population• Integrate with standard off-the-shelf tools like Excel

• Telemedicine• Leverage devices, patients and providers connected to HealthVault to innovate around

remote care delivery.

• Mobile trackers/reminders• Mood, calorie intake

• Mashups• Charts combining various data points: weight, mood, GPS, calories, etc.

• Data Types: Weight, Daily Dietary Intake, Health Journal Entry, Blood Glucose, Many, Many Others

CodeFest ideas

Page 43: Health vault intro for developers

HealthVault Developer Center on MSDN: http://msdn.microsoft.com/healthvault

HealthVault Developer Forums: http://social.msdn.microsoft.com/forums/en-US/healthvault/threads/

Application Configuration Center (ACC): https://config.healthvault-ppe.com/Free Microsoft Developer tools: http://microsoft.com/express HealthVault SDKs

• .NET Framework: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3418 • Java: http://healthvaultjavalib.codeplex.com/ • Windows Phone: http://healthvaultwp7.codeplex.com/• iOS V1: https://github.com/microsoft-hsg/HealthVault-Mobile-iOS-Library• iOS vNext: https://github.com/microsoft-hsg/HVMobile_VNext• Android: http://healthvaultjavalib.codeplex.com/

3rd Party SDKs• Ruby SDK 1: https://github.com/vaibhavb/HealthVault-Ruby-Library • Ruby SDK 2: http://rubyforge.org/projects/rubyhealthvault/ • PHP: http://healthvaultphp.sourceforge.net/

Blogs• HealthVault team blog: http://blogs.msdn.com/b/healthvault/ • FamilyHealthGuy: http://familyhealthguy.com

Samples– Codeplex: http://www.codeplex.com/site/search?query=healthvault&ac=8 • WalkMe: http://walkme.codeplex.com/

– SDK samples: http://msdn.microsoft.com/en-us/library/ff803585.aspx

Resources

43

Page 44: Health vault intro for developers

Learn more about how HealthVault can help!

Business Development: [email protected]

We’re all better together

44

Page 45: Health vault intro for developers

• Appendix45

Page 46: Health vault intro for developers

46

• Person sharing or Person-Record Authorization: • Feature that allows a Person to share a record with a different Person. • For instance, an elderly Person authorizes her adult child to access her record. The child is able to

manage the elderly parent’s Record. • Person sharing is initiated through the Shell• Note: Person sharing is for sharing Record access with other HealthVault People but NOT intended to

be used for sharing Records with healthcare professionals.

• Application-Record Authorization:• An application-record authorization is established when a Person authorizes an Application to access a

Record. • The Person must have access to the Record in order to authorize an Application to access it.

• Authorization Rules• These specify the type of access the app is requesting from the user. For instance, “Read/Write Access to Weights” and Read Access to

“Daily Dietary Intake”.

Core Concepts: Authorization