Tuesday, December 11, 2012 6:17 AM
I am using health vault sdk in visual studio 2012 windows 8 application.
I want to get the location of the registered user which he provided during registration in Health Vault.
Thanks in advance.
Tuesday, December 11, 2012 8:29 AM
Please note that the "address" associated with a Health Record is different from the "location" of their Live ID or Open ID. The address stored inside the health record that is considered content, and can be read and used by apps. This could also be empty.
You may use PersonInfo.Location to see if you can get the country and state info associated with the account. (State could be empty). To get the address info, you have to use:
Contact contact = GetSingleValue<Contact>(Contact.TypeId); string address = contact.ContactInformation.Address.ToString();
(GetSingleValue implementation is available here.)
- Edited by Santhosh Pillai Tuesday, December 11, 2012 8:29 AM
Wednesday, December 12, 2012 7:39 AM
Thanks for your immediate reply.Appreciate it!
Just for the reference, I have been using https://healthvaultwin8.codeplex.com/ (Healthvault library for Windows 8). The suggestion you quoted seems to be using the SDK which is different than the one I am using now.
The SDK which am using seems to be lacking out HealthRecordSearcher or PersonInfo class. I appreciate your time spent. Thanks.
Thursday, December 13, 2012 7:14 AM
Hi Adhi, in the version of the HealthVault Windows 8 SDK we have currently released, we do not have the Contact type implemented so you won't be able easily get it unless you want to implement it yourself.
Also the UserInfo object which is the Windows 8 name for the PersonInfo object in the SDK doesn't contain the Location information either :( We will need to add that to the SDK, but since our application currently hasn't had a need to use the Location information of a user it hasn't been implemented.
I'm sorry if that's not the answer you are looking for, but I will take note to get that implemented in the Windows 8 SDK. Timeline wise, it won't be out till sometime mid January due to higher priority work and deadlines.
Wednesday, December 26, 2012 7:00 AMI am able to get the location of the Registered User using Health Vault