locked
Accessing Health Vault Data From a Class DLL. RRS feed

  • Question

  • I am currently working on a Health Vault Project and would like to create a Buffer between my Web Service & Health Vault. Thus the Class DLL. Once the User Signs on to Health Vault and Authinticates the Connection using the Web Service, I would like the Class DLL to Pull all the Users Data that the Application has Access to from Health Vault and Store it in a Structure for the Duration of the Web Services Use. Then the Web page will make periodic calls the The Structure located in the Class DLL and retrive the needed information for what ever the current page is being displayed.

    I have dug around in the forms and Microsoft's MSDN for Health Vault and I seem to be getting conflicting results. On one hand I hear that, for instance, PersonInfo, can only be accessed from a web page that is inheriting HealthServicePage.
    Is this correct, If not how would i go about Accessing the Data?

    I'm developing ASP.NET pages with C# code behind.

    Thank You For Your Time.
    Joshua T Willis
    Tuesday, July 8, 2008 3:53 PM

Answers

  • I'm not terribly excited about what you are proposing architecturally. If other applications add new data while your application is running, it won't show up, and you will have to be careful to make sure that your save works correctly.

     

    If you are writing a caching engine that is used as part of your web application, you can simply pass it the PersonInfo object on the web page, and then it can use that for all of your access. There is extra complexity around dealing with multiple records, switching records, etc.

     

    If you are wanting the cache to live outside of the web application, there aren't any recommended ways to doing that.

    Tuesday, July 8, 2008 8:31 PM

All replies

  • Joshua,

     

    I'm not exactly clear on what you're building, but if you are building a web application, I recommend pulling the data out as you need it rather than trying to get it all at once.

     

    If you want some ideas on how to cache the data once you have it, the Health and Fitness application in the SDK implements a caching scheme.

     

    If that doesn't answer your question, please ask again.

     

    Tuesday, July 8, 2008 6:04 PM
  • My Idea is two only have Two Calls to the Health Vault Server.
    1st to retrieve the data.
    Last to Save the Data.
    (Yes i know that means all the information that has been changed or update is volatile until it is saved)
    But i wanted to try it as an option.

    I can't go into details about what the Web Application will do (boss might have a fit) but it will require custom data types (will mess with that when i get to it) That will contain quite a bit of info that won't be changing much. And instead of Requesting that info every time the page is hit, I just want to get it once when the App is first loaded. Then I can "refresh" periodically when ever data is changed and saved.

    I found a way to access the data via the web site then store it in a Class, but what hoping for an option to retrieve the data directly from the Class instead of sending it to the class Via the Web App.
    Tuesday, July 8, 2008 8:07 PM
  • I'm not terribly excited about what you are proposing architecturally. If other applications add new data while your application is running, it won't show up, and you will have to be careful to make sure that your save works correctly.

     

    If you are writing a caching engine that is used as part of your web application, you can simply pass it the PersonInfo object on the web page, and then it can use that for all of your access. There is extra complexity around dealing with multiple records, switching records, etc.

     

    If you are wanting the cache to live outside of the web application, there aren't any recommended ways to doing that.

    Tuesday, July 8, 2008 8:31 PM
  • I think I understand what your saying, And a good part of me agrees with you. It could cause some havoc with the data, if its being altered while my web app is running.

    For clarification reasons, the data that I'm wanting to retrieve then store are to be custom data types, that as of yet we are just calling "Mail Types" until either we request the type or the type is made for use. I was also under the impression that if a custom data type is created for use by an application only that application can access that custom type. In which case there is no real worry for other applications accessing and changing that data. except through Health Vault directly.

    But as you say though there are no recommended ways of caching to live outside of the web app then more than likely I will end up pulling the data from Health Vault through then web page when ever the page is opened and/or refreshed and just store it temporarily as needed.
    Wednesday, July 9, 2008 3:14 PM