How to force app to use version 2 of 'Basic Demographics Information'?

Sep 25, 2012 at 1:09 PM
Edited Sep 25, 2012 at 2:13 PM

My app seems to be stuck on version 1 of Basic Demographics Information, but HealthVault has moved on to version 2 -- what steps are required to force my app to use version 2?

(Here is the error returned from the server:)

error: Error: 85 The 'Basic Demographic Information' data type has been versioned by 
HealthVault. The application cannot save the data because the existing instance of
this data uses version 2 of the 'Basic Demographic Information' data type whereas
the application uses version 1.

Thank you

P.S.  For reference, the difference between version 1 and 2 appears limited to "country" being treated as simple text (version 1) and a full <code> block (version 2):

Full <code> for country seen as a result of clicking "View as XML" on the HealthVault web page:

  -- snip --
    -- snip --

And here is country as simple text when returned using GetThings:

    <wc:info xmlns:wc="">
            -- snip --
            -- snip --
<country>CH</country> </basic> <common/> </data-xml> </thing> </group> </wc:info> </response>
Sep 26, 2012 at 6:45 PM

Ensure your application is registered to use the latest version of the type in your authorization rules.  Goto and examine your online/offline rules.  HealthVault will down convert to the type version in that list if it is not the latest version.

You can also specify which version to return in your GetThings request.  The ThingFormatSpec element contains an element named type-version-format.  The documentation for that element looks like this:

<element name="type-version-format" 
                            The version ID for the type format in which the results should be 
                            When a type gets versioned, HealthVault will retrieve instances of 
                            multiple versions even when only one type is specified in the request
                            filter.  By default HealthVault will map the XML of the instance to
                            the version supported by the application based on the base 
                            authorization XML specified in the configuration of the application in
                            HealthVault. However, if multiple versions are supported by the 
                            application, it can use this parameter to state the version format to
                            use when writing out the instance XML.
                            For example, when querying for medications, HealthVault will retrieve
                            medications of both version one and two schemas. If an application
                            only supports version one of the medication schema, then HealthVault
                            will automatically map version two instances down to the version one
                            schema. However, if the application supports both version one and two
                            by declaring both type IDs in the applications configuration, then
                            version one instances will be returned using the version one schema, and
                            version two instances will be returned using the version two schema.
                            If this application wants to retrieve all instances using a common 
                            schema (say version two), then it would specify the version two type
                            ID in this parameter and all instances will be mapped to version two
                            of the medication schema before being returned.