Health vault intro for developers


Published on

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • See additional methods on HVRecordReference object
  • Health vault intro for developers

    1. 1. HealthVault State of the UnionII 2
    2. 2. 3
    3. 3. 4
    4. 4. 5
    5. 5. 6
    6. 6. 7
    7. 7. 8
    8. 8. 9
    9. 9. 10
    10. 10. • 80+ devices connected to HealthVault• Devices + apps = awesome opportunity• Device types include: • Weight scales • Blood pressure monitors Withings Wi-Fi FitBit Wireless • Blood glucose monitors body Scale Personal trainer • Pedometers and activity monitors • Heart Rate monitors • Pulse oximeters • Etc. Omron• Device Directory: blood pressure monitors 11
    11. 11. 12
    12. 12. 13
    13. 13. Candelis andMicrosoft Team Up toEmpower PatientsPatients can access andcontrol their medical imagesExpectant couples can shareUltrasound images of theirbaby with loved ones 14
    14. 14. iTriage (iOS). #1 Livescape (WP7). HealthVault Weight4Me CTIS mPHRHealth app on Daily tracking (WP7). Our (WP7). Weight (iOS)AppStore app native app! management 15
    15. 15. myMedicalImages bant (iOS). Skinscan (WP7) HealthGuard (WP7)(WP7) Diabetes Mole tracking HealthVault data managment access 16
    16. 16. 17
    17. 17. XML API• .NET SDK• Open source 18
    18. 18. 19
    19. 19. 20
    20. 20. HealthServicePage 21
    21. 21. 22
    22. 22. Microsoft.Health.PatientConnect 23
    23. 23. Microsoft.Health.Package 24
    24. 24. Data Model Design Principles• Interoperable o We do our best to make our data types transformable to and from industry standards in actual use• Inclusive o Strike a balance between fully structured data and unstructured information 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 Time o Our data model is growing as we work with partners fluent in various domains• Independent o As much as possible, keep application development simple by eliminating relationships across data items o Allow expression of connections but never rely on their existence for data integrity 25
    25. 25. 26 HealthVault data examples• Conditions, allergies and procedures from• 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• …
    26. 26. 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
    27. 27. HealthVault Data Model• The schematized portion represents health domain types. For example: Weight Measurement represents a single weight measurement.• Explore Data Types here:• XML representing a Weight Measurement: <weight> <when> <date> <y>2012</y> <m>4</m> <d>18</d> </date> See the following for more information on the Data Model: <time> • HealthVault Data Types – Weight, measurements and display values <h>7</h> <m>30</m> • Vocabularies and CodableValue </time> </when> • HealthVault Data Types - Custom Data Types <value> <kg>74.84274105165585</kg> • What data type should I use? <display units="pounds" units-code="lb">165</display> </value> </weight> 28
    28. 28. 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: HealthRecordSearcher searcher = PersonInfo.SelectedRecord.CreateSearcher(); HealthRecordFilter filter = new HealthRecordFilter(Weight.TypeId); searcher.Filters.Add(filter); HealthRecordItemCollection items = searcher.GetMatchingItems()[0]; 29
    29. 29. 30Detecting 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.
    30. 30. 31Creating an app• Once you’re ready to create an app, visit the Application Configuration Center (ACC): https://config.healthvault- 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:
    31. 31. 32
    32. 32. HealthVault for iOS Basics• Open Source Libraries • Apache 2.0 License• 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 • • Production Release• This overview focuses on HVMobile_VNext 33
    33. 33. 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
    34. 34. 35
    35. 35. 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
    36. 36. 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 =; cell.textLabel.text = [med.dose toString];} • Item data available as convenient properties • Methods to create text representations included 37
    37. 37. 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
    38. 38. 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
    39. 39. 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
    40. 40. Search Vocabulary-(void) searchMedicationsFor:(NSString *)text {[HVVocabSearchTask searchForText:text inVocabFamily:@"RxNorm" vocabName:@"RxNorm ActiveMedicines" 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
    41. 41. 42
    42. 42. HealthVault Developer Center on MSDN: Developer Forums: Configuration Center (ACC): Microsoft Developer tools: SDKs • .NET Framework: • Java: • Windows Phone: • iOS V1: • iOS vNext: • Android: Party SDKs • Ruby SDK 1: • Ruby SDK 2: • PHP: • HealthVault team blog: • FamilyHealthGuy: http://familyhealthguy.comSamples– Codeplex: • WalkMe:– SDK samples: 43
    43. 43. Learn more about how HealthVault can help!Business Development: 44
    44. 44. 45
    45. 45. 46