locked
Extract Health Vault data to CCR format RRS feed

  • Question

  • Hi,

    Is there a way to extract the data from Health Vault into CCR or CCD format? Basically we have already successfully integrated our site to allow import of data into Health Vault via CCR but would now like to enable export of data from health Vault. Is there any way to do this using the health Vault SDK?

    Friday, October 9, 2009 7:28 AM

Answers

  • The requests being sent were lacking the country tag. The resolution was to add the country tag values to each of the requests.

    Thanks and Regards,
    Aneesh D.
    • Marked as answer by andre_sch Thursday, October 22, 2009 12:17 AM
    Wednesday, October 21, 2009 7:40 PM

All replies

  • Currently, there is no feature which will allow you to export the native type instances in HealthVault as CCR/CCD.

    Having said that the reverese is available, once you upload a CCR document to a user's HealthRecord, he can go thru a reconcile process in the shell to create native type instances.

    Hope this helps

    Raj
    Raj HealthVault Developer Tool http://xray.getrealconsulting.com
    Friday, October 9, 2009 8:34 AM
  • Hi Andre,

    Yes - we do support export to a CCR.  This is done via an XSL transform named 'toccr' that is provided by the HealthVault platform.  Here is some sample code that shows you how to request some data types and transform them to a CCR using the HealthRecordSearcher class in the SDK:

    HealthRecordSearcher searcher = accessor.CreateSearcher();

    HealthRecordFilter filter =

         new HealthRecordFilter (

             Allergy .TypeId,

             Condition .TypeId,

             FamilyHistory .TypeId,

             Immunization .TypeId,

             Problem .TypeId,

             Medication .TypeId,

             LabTestResults .TypeId);

    searcher.Filters.Add(filter);

    string ccrText = searcher.GetTransformedItems(“toccr”);


    -Matt W.
    • Proposed as answer by Matt_Wagner Friday, October 9, 2009 10:04 PM
    • Marked as answer by andre_sch Monday, October 12, 2009 12:14 AM
    • Unmarked as answer by andre_sch Tuesday, October 13, 2009 6:58 AM
    • Unproposed as answer by andre_sch Wednesday, October 14, 2009 11:17 PM
    • Proposed as answer by Lowell MeyerMicrosoft employee Tuesday, October 20, 2009 11:09 PM
    Friday, October 9, 2009 10:03 PM
  • Hi Matt,

    I have tried the code as suggested. Unfortunately I get an "Access is denied" error on the GetTransformedItems method. What can I do to rectify this?

    BTW I am using the "Hello World" cert which appears to have full access to all of the requested data items so I'm not sure exactly what the problem is.

    Thanks
    Andre
    Monday, October 12, 2009 4:48 AM
  • Andre,

    Make sure that your application includes the types in the sample code in your app auth rules.

    -Matt W.
    Monday, October 12, 2009 5:49 PM
  • Hi,

    I have managed to fix the "access is denied" error but am still getting the following error:

    {"Value cannot be null. Parameter name: parameter"}
    Microsoft.Health.HealthServiceException: {"Value cannot be null. Parameter name: parameter"}
    Data: {System.Collections.ListDictionaryInternal}
    HelpLink: Nothing
    InnerException: Nothing
    Message: "Value cannot be null. Parameter name: parameter"
    Source: "Microsoft.Health"

    StackTrace: " at Microsoft.Health.HealthServiceRequest.ExecuteForTransformInternal(String transform) at Microsoft.Health.AuthenticatedConnection.ExecuteRequestForTransformWithRetry(HealthServiceRequest request, String transform) at Microsoft.Health.HealthServiceRequest.ExecuteForTransform(String transform) at Microsoft.Health.HealthRecordSearcher.GetTransformedItems(String transform) at Machealth.Modules.ImportExportData.HealthVault.Page_Load(Object sender, EventArgs e) in C:\DotNetNuke Website1\DesktopModules\Machealth_ImportExportData\HealthVault.aspx.vb:line 45"

    TargetSite: {System.Reflection.RuntimeMethodInfo}


    I have included my code for your reference and would really appreciate some help:

     

    Dim ccrText As String = ""
    Dim searcher As HealthRecordSearcher = PersonInfo.SelectedRecord.CreateSearcher
    Dim filter As HealthRecordFilter = New HealthRecordFilter(Medication.TypeId)
    searcher.Filters.Add(filter)
    ccrText = searcher.GetTransformedItems("toccr")

    Thanks
    Andre



    Tuesday, October 13, 2009 7:05 AM
  • The requests being sent were lacking the country tag. The resolution was to add the country tag values to each of the requests.

    Thanks and Regards,
    Aneesh D.
    • Marked as answer by andre_sch Thursday, October 22, 2009 12:17 AM
    Wednesday, October 21, 2009 7:40 PM