locked
How does the HealthVault web site determine the Type of uploaded xml files? RRS feed

  • Question

  • We have been uploading CCRs from various sources into HealthVault (via account.healthvault-ppe.com) and some of them get typed as a CCR and some of them are just inserted as a File type.  Do you have an XSD that determines whether an xml file is a CCR?  If so, where can I find it?

    Thanks!

    Kevin
    Friday, May 22, 2009 8:43 PM

Answers

  • Hey Kevin ---

    When you upload files through the shell UI with the extensions XML, CCR or CCD, we try to validate the content against the appropriate schema (for CCR that's the "final november 7" schema as shown here: http://developer.healthvault.com/types/type.aspx?id=1e1ccbfc-a55d-4d91-8940-fa2fbf73c195). If the file validates, we add it as a CCR (or CCD) --- if not, it goes in as a file.

    Note this only happens when uploading through the shell --- when you add items through the API we don't try to guess the item type. We just accept what you give us and then the content either validates or doesn't for that specific type.

    I have been known to use this behavior as a poor-man's check on the validity of CCR documents when feeling exceptionally lazy. :)

    Hope that helps ...
    ---S
    • Marked as answer by Kevin Noone Friday, May 22, 2009 9:42 PM
    Friday, May 22, 2009 9:23 PM

All replies

  • Have you seen specific differences in the ones that are identified versus those that are not?  Can you post an example of one that is not?

    Friday, May 22, 2009 8:56 PM
  • Hey Kevin ---

    When you upload files through the shell UI with the extensions XML, CCR or CCD, we try to validate the content against the appropriate schema (for CCR that's the "final november 7" schema as shown here: http://developer.healthvault.com/types/type.aspx?id=1e1ccbfc-a55d-4d91-8940-fa2fbf73c195). If the file validates, we add it as a CCR (or CCD) --- if not, it goes in as a file.

    Note this only happens when uploading through the shell --- when you add items through the API we don't try to guess the item type. We just accept what you give us and then the content either validates or doesn't for that specific type.

    I have been known to use this behavior as a poor-man's check on the validity of CCR documents when feeling exceptionally lazy. :)

    Hope that helps ...
    ---S
    • Marked as answer by Kevin Noone Friday, May 22, 2009 9:42 PM
    Friday, May 22, 2009 9:23 PM
  • I don't see a significant difference, but they are large files, so I haven't looked them over in detail. 

    I was able to get the CCR xsd (by using code found on Eric Gunnerson's site - http://blogs.msdn.com/ericgu/archive/2008/03/11/scheming-for-schema.aspx).  If that xsd is used to validate CCRs when uploading, then I can resolve the issues myself.  Is that how the type is determined?

    Kevin
    Friday, May 22, 2009 9:31 PM
  • Perfect, that's exactly what I was looking for.  Thanks!
    Kevin
    Friday, May 22, 2009 9:42 PM