none
Exporting HealthVault record as CCD

    Question

  • To HealthVault team,

    I have been trying to export my test HealthVault record in CCD in both ways, through the HealthVault Shell and programmatically through -searcher.GetTransformedItems("toccd");-.

    The CCD was successfully generated, however, it contains none of my reocrd health information. When I tried to re-import that CCD file throught the HealthVault Shell, no items were to be seen, and I got that message instead:

    The stylesheet used to generate this view of the HL7 Continuity of Care Document (CCD) copyright Health Level Seven, Inc. 2007, modified and used by Microsoft with permission.

    I am positive that nothing is technically wrong with my approach. In fact, when tried the same for CCR it worked fine, and I was able to see all my vital signs and to re-import them accordingly.

    Am I missing anything so far, or it is just HealthVault not providing full support to export CCD yet?

    Thanks!
    Mustafa Al-Durra, B.Sc Computer Engineering, MCP, MCDBA, MCAD.NET, SoftHealth Inc. (President/CEO)
    Sunday, May 02, 2010 4:21 PM

Answers

  • Hi Mustafa,

    This is a bug in our end and the fix will most likely be in the next HealthVault platform release.

    Thank you,


    Anish Ravindran
    Thursday, May 13, 2010 6:14 PM
  • Hello Mustafa,

    I have tried both the scenarios you have suggested. Please let me explain the results below.

    I tried exporting the items to CCD and then importing it to my account through shell. Then the xml file went to the Files type, which I feel the file format is not proper for the CCD export. Whereas the same work flow is working fine for the CCR documents. I will contact our technical team on this and will get back to you with the results as soon as possible.

    When trying the "toccd" transform in code please note that currently we don't support all data types for this transform. Please take a look into our release notes for the list of supported types for the "toccd" transformation. One sample code snippet is as below.

     

            HealthRecordSearcher searcher = PersonInfo.SelectedRecord.CreateSearcher();
            HealthRecordFilter filter = new HealthRecordFilter(Allergy.TypeId);
            searcher.Filters.Add(filter);
            string ccdText = searcher.GetTransformedItems("toccd");

    This string can be directly written to file to make it a CCD document.

    If you are still getting the same error please paste the code snippet that you are using to create the ccd content and your application ID.

    Also I am not able to reproduce the error "The stylesheet used ...". Can you please provide the exact steps to reproduce this issue?

    Thanks and Regards,

    Aneesh D.

    Tuesday, May 04, 2010 12:37 AM
  • Hello Mustafa,

    Have you added the rules for Allergy type in the Application Configuration Center for your appliction? The data type list shown in the permissions page will be equivalent to the data types specified in the application's rules in the Configuration Center and it don't correspond to the data types used in the code. So please go the configuration center and either edit the existing rule to add Allergy data type or add a new rule to include the Allergy data type in the Offline rules tab. Please note that once you make any changes to the Configuration it will take half an hour to get the changes properly propagated. Please wait for half an hour after making the changes to try the code.

    As you are using Offline access, once we change the base authorization rules for the application all existing record IDs will become invalid and we will get "Access Denied" error if we try using them again. Because of this platform behavior, after making the changes in the configuration first please de-authorize the application and then re-authorize the application to get the a new record ID. This new record ID should be used in all further transactions.

    If you have already done these please let me know the application ID you are using. Please confirm that you are not using the sample Offline application ID.

    Thanks and Regards,

    Aneesh D.

    Thursday, May 06, 2010 5:58 PM
  • Hi Mustafa,

    The offline sample application (ApplicationID: 37f55bd1-c5dc-4401-8aec-fe0d1b850c42) which shipped along with the SDK  has only Create/Read/Update/Delete access to Height Measurement. For all other data types it will throw an 'Access Denied' error'.

    The offline sample application which you modified is a web type application, so can you please try to use an ApplicationID of web type and repeat the same steps to access Allergy?

    Thank you,


    Anish Ravindran
    Wednesday, May 12, 2010 4:17 AM

All replies

  • Hello Mustafa,

    I have tried both the scenarios you have suggested. Please let me explain the results below.

    I tried exporting the items to CCD and then importing it to my account through shell. Then the xml file went to the Files type, which I feel the file format is not proper for the CCD export. Whereas the same work flow is working fine for the CCR documents. I will contact our technical team on this and will get back to you with the results as soon as possible.

    When trying the "toccd" transform in code please note that currently we don't support all data types for this transform. Please take a look into our release notes for the list of supported types for the "toccd" transformation. One sample code snippet is as below.

     

            HealthRecordSearcher searcher = PersonInfo.SelectedRecord.CreateSearcher();
            HealthRecordFilter filter = new HealthRecordFilter(Allergy.TypeId);
            searcher.Filters.Add(filter);
            string ccdText = searcher.GetTransformedItems("toccd");

    This string can be directly written to file to make it a CCD document.

    If you are still getting the same error please paste the code snippet that you are using to create the ccd content and your application ID.

    Also I am not able to reproduce the error "The stylesheet used ...". Can you please provide the exact steps to reproduce this issue?

    Thanks and Regards,

    Aneesh D.

    Tuesday, May 04, 2010 12:37 AM
  • Thanks Aneesh D.,

    it is great to have that tailored reply within less than 24 hours! I value your support.

    As for exporting CCD, am looking forward to your technical team's feedback. Like you said, things turned to work fine for CCR, and it might be an implmentation issue that is not finalized yet!.

    As for the "toccd" transformation, you are absolutely right, the transformation does not support the Height ItemType that I was trying to export. Now, I wanted to run the Allergy sample you posted, and I had a couple of issues troubling me with that:

    1. My current working environment, is the offline access application. This application has worked fine so far, and had only authorization for Height Measurements. Since, I need to permit Allergies now, I thought to re-code the entire offline access application to deal with Allergy instead of Height. The changes were ok, and built has succeeded. However, I had the access denied exception when running the code.
    2. I looked up the following thread, http://social.msdn.microsoft.com/Forums/en/healthvault/thread/3653346b-a7f6-43cc-9f6e-e6a553bb8415 , concerning Re-authorization which I might still need to do first.
    3. Now. I recoded the offline access application to deal with allergies instead of Height measurement all over the code. However, when I run into the authoring shell, I can only see that the application is request permissions to Height measurement? I was expecting to see Allergies instead?

    I can not run your code unless premissions are granted for Allergies. am missing anything so far?

    Thanks again in advance Aneesh D.!

    Mustafa

     

     


    Mustafa Al-Durra, B.Sc Computer Engineering, MCP, MCDBA, MCAD.NET, SoftHealth Inc. (President/CEO)
    Thursday, May 06, 2010 2:08 PM
  • Hello Mustafa,

    Have you added the rules for Allergy type in the Application Configuration Center for your appliction? The data type list shown in the permissions page will be equivalent to the data types specified in the application's rules in the Configuration Center and it don't correspond to the data types used in the code. So please go the configuration center and either edit the existing rule to add Allergy data type or add a new rule to include the Allergy data type in the Offline rules tab. Please note that once you make any changes to the Configuration it will take half an hour to get the changes properly propagated. Please wait for half an hour after making the changes to try the code.

    As you are using Offline access, once we change the base authorization rules for the application all existing record IDs will become invalid and we will get "Access Denied" error if we try using them again. Because of this platform behavior, after making the changes in the configuration first please de-authorize the application and then re-authorize the application to get the a new record ID. This new record ID should be used in all further transactions.

    If you have already done these please let me know the application ID you are using. Please confirm that you are not using the sample Offline application ID.

    Thanks and Regards,

    Aneesh D.

    Thursday, May 06, 2010 5:58 PM
  • Aneesh D.,

    your response time was down to 4 hours....if you maintaine that pace, in coming days, we may see answers posted before their questions being revealed!...

     

    Indeed, I was using the Sample Offline ApplicationID that is available with HealthVault Installation (SDK) which may have been the reason why I was not able to grant access for any other ItemTypes rather than Height Measurement.

    Along the way, I created a new ApplicationID of (SODA) type in the Application Configuration Cente and set that new ID in my Web.Config. My new ApplicationID has rules to permit accessing Allergy. Again and after editing the samle offline application to deal with Allergy instead of Height, and when running the application (days after), everything still the same, I was only asked to grant access for Height Measurement and NOT TO ALLERGY?

    Any suggestions? should I mail my application ID to you?

    Mustafa

     


    Mustafa Al-Durra, B.Sc Computer Engineering, MCP, MCDBA, MCAD.NET, SoftHealth Inc. (President/CEO)
    Wednesday, May 12, 2010 12:20 AM
  • Hi Mustafa,

    The offline sample application (ApplicationID: 37f55bd1-c5dc-4401-8aec-fe0d1b850c42) which shipped along with the SDK  has only Create/Read/Update/Delete access to Height Measurement. For all other data types it will throw an 'Access Denied' error'.

    The offline sample application which you modified is a web type application, so can you please try to use an ApplicationID of web type and repeat the same steps to access Allergy?

    Thank you,


    Anish Ravindran
    Wednesday, May 12, 2010 4:17 AM
  • Anish,

    am greatful for your tip, it has worked and I could export my Test Allergies now into CCR and CCD. The only pending issue is still that you can re-import the CCD file exported by HealthVault into HealthVault shell again. Aneesh D. has esclated the issue to the technical team. Please, keep me posted accordingly.

    Thanks again.

     


    Mustafa Al-Durra, B.Sc Computer Engineering, MCP, MCDBA, MCAD.NET, SoftHealth Inc. (President/CEO)
    Thursday, May 13, 2010 1:24 PM
  • Hi Mustafa,

    This is a bug in our end and the fix will most likely be in the next HealthVault platform release.

    Thank you,


    Anish Ravindran
    Thursday, May 13, 2010 6:14 PM