This is a sample code snippet to connect with HealthVault using its SDK and make a search query for a patient's weight history:
HealthRecordSearcher recordSearcher = PersonInfo.SelectedRecord.CreateSearcher();
HealthRecordFilter weightFilter = new HealthRecordFilter(Weight.TypeId);
recordSearcher.Filters.Add(weightFilter);
HealthRecordItemCollection weightItems = recordSearcher.GetMatchingItems()[0];
//weightItems is a collection of the patient's weight historical data.
Further on, you can parse collection like following, to pull time
based weight data for usage.
for each (Weight weightItem in weightItems)
{
//weightItem.When - will give you the date
//weightItem.Value - will give you the patient's weight at the
specific date
}
Similarly, you can pull other health data using HealthValue APIs and share or reuse it within a holographic application.
You can refer to HealthVault documentation at https://www.healthvault.com for more details.