none
Why cannot find Custom Data Type in HealthVault Service Specification

    Question

  • There are some topics about creating custom data type in "How-to Guides".

    But, I cannot find the description about custom data type.

    i want to know that's the differences between Thing type and Custom data type  as XML format.

    Thanks

    Wednesday, August 04, 2010 4:00 AM

Answers

All replies

  • Hello ,

    The basic difference between Thing type and Custom Data Type is mentioned below:

    Thing Type:    A “thing type” or “HealthRecordItem type” is a specific kind of data stored in HealthVault, such as a blood pressure or weight measurement.

    Custom Data Type:   If the data type you need doesn't already exist in HealthVault, you need to create a custom data type. If you need more than one custom data type, you need to create a wrapper that you can use with each custom data type.

    You can find complete information in the below url's:

    You can find all the pre-defined Thing - Types in HealthVault Developer Center

    To create a custom data type (If you need more than one custom data type, you need to create a wrapper that you can use with each custom data type.) - http://msdn.microsoft.com/en-us/healthvault/bb968869.aspx

    I recommend Eric's tutorial http://blogs.msdn.com/ericgu/archive/2009/01/08/introduction-to-healthvault-development-1-introduction.aspx which is really helpful for all HealthVault beginners.

    To add an extension to an existing data type - http://msdn.microsoft.com/en-us/healthvault/bb968876.aspx

     

    Hope this helps, Please let me know if you need further assistance.

     

    Regards,

    Madan Kamuju

    Wednesday, August 04, 2010 9:22 AM
  • Hi, Madan

    Thanks for your reply.

    Maybe I didnot describle the question clearly.

    There is a xml document of Heigth in HV Service Specification document.

    <thing>

    <type-id>407…b500b</type-id>

    <thing-state>Active</thing-state>

    <data-xml>

    <height>

           <when> <date> <y>2008</y> <m>9</m> <d>5</d> </date> </when>

           <value> <m>2.54</m> <display units="inches" units-code="in">120</display> </value>

    </height>

    <common>

          <source>Manual Entry</source>

         <note>Sample Note</note>

         <related-thing>

              <thing-id>4dd57a…8e3</thing-id>

              <version-stamp>27bdc3f…f88c3</version-stamp>

              <relationship-type>WeightMeasure</relationship-type>

         </related-thing>

    </common>

    </data-xml>

    </thing>

    I can extent this data type in element /thing/data-xml/common/extension according to the specification.

    But how can i define a total custom data type? how to describle this data type as xml format according to the specification.

    Thanks!

    Z. Q. Xu.

    Thursday, August 05, 2010 8:51 AM
  • Hello,

    As per my understanding you would like to create a custom data type as xml format . To create custom data type as xml format please see the below sample xml and the same is mentioned in this url in my previous reply. 

    The custom data type XML format

    <app-specific>
       <format-appid>MyAppName</format-appid>
       <format-tag>PeakZone</format-tag>
       <when>
          <date>
             <y>2007</y>
             <m>8</m>
             <d>7</d>
          </date>
          <time>
             <h>0</h>
             <m>0</m>
             <s>0</s>
          </time>
       </when>
       <summary />
       <PeakZone RedOrangeBoundary="3" OrangeYellowBoundary="4"
            YellowGreenBoundary="5" />
    </app-specific>

    Hope this helps, Please let me know whether you are expecting some thing different than what i have mentioned.

     

    Regards,

    Madan Kamuju

    Thursday, August 05, 2010 10:56 AM
  • Looks as if the OP is satisfied... but there is the world of difference between the definition of the XML and a mere example of it. Like the OP, I can work out what to do from the example even though it is only an extract of the full ThingType XML and doesn't touch on defining multiple custom types.

    It's still not really adequate that the custom thing type is missing from the list of ThingTypes. It is obviously something of a special case as it is not fully pre-defined, but that makes it more important to give a full description of what is allowed and what isn't, and particularly in this case, where the developer has freedom to defined the custom XML! After all, it is still partially predefined.

    Wednesday, May 21, 2014 7:02 AM