none
How to get results messages back from HV

    Question

  • I am sending data to HV using the SDK as follows. The program and code works, however when I look at my HV record there is no new weight item added. How do you get the results from HV, including any error messages?

    Try

                Dim medication As New Medication()

                'Establish an offline connection with only the person ID parameter

                Dim offlineConn As OfflineWebApplicationConnection = New OfflineWebApplicationConnection(personId)

                offlineConn.Authenticate()

                Dim accessor As New HealthRecordAccessor(offlineConn, recordId)

                Dim weightInPounds As Integer = Int32.Parse(190)

                Dim weight As New Weight()

                weight.Value.Kilograms = weightInPounds / 2.204

                weight.Value.DisplayValue = New DisplayValue(weightInPounds, "pounds")

                accessor.NewItem(weight)

                MsgBox("Wt added")

            Catch ex As Exception

                MsgBox(ex.ToString)

            End Try

    Sunday, January 20, 2013 4:02 PM

All replies

  • Try this:
    Dim kg As Double = 86.2
    Dim dv As DisplayValue = New DisplayValue(190, "pounds")
    Dim wv As WeightValue = New WeightValue(kg, dv)
    Dim wt As Weight = New Weight(New HealthServiceDateTime(DateTime.Now), wv)
    accessor.NewItem(wt)
    
    

    Monday, January 21, 2013 12:13 AM
  • Still not seeing the newitem when I log into HV: Turned on the trace looking at the trace can anyone determing why?

    HealthVaultTraceSource Information: 0 : Found cert with thumbprint: 5190E03CF90121FC52F8F520A374FB5D00B3CF47

    HealthVaultTraceSource Information: 0 : Private key found

    HealthVaultTraceSource Information: 0 : <wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request"><header><method>CreateAuthenticatedSessionToken</method><method-version>2</method-version><app-id>25220dbb-7a5e-4d3a-a382-69cc1da32e28</app-id><language>en</language><country>US</country><msg-time>2013-01-21T15:43:23.172Z</msg-time><msg-ttl>1800</msg-ttl><version>2.0.0.0</version></header><info><auth-info><app-id>25220dbb-7a5e-4d3a-a382-69cc1da32e28</app-id><credential><appserver2><sig digestMethod="SHA1" sigMethod="RSA-SHA1" thumbprint="5190E03CF90121FC52F8F520A374FB5D00B3CF47">MKECa9ku+ak9/c+Xm8FTo7gaHCymJupH1sh+2mOsy6EaQtAXmzmrb00sdpl/aUAtIGi2OCdeLSoE4+FEbPtykurReEetwpJOJbCCTHUmhFnoTRRjJqqLtHE7+t2qJW/ZHzNu1GdX5jJ5VcDERWdvtW6vutXOLdV1+OUc81Suk0U=</sig><content><app-id>25220dbb-7a5e-4d3a-a382-69cc1da32e28</app-id><hmac>HMACSHA256</hmac><signing-time>2013-01-21T15:43:23.156542Z</signing-time></content></appserver2></credential></auth-info></info></wc-request:request>

    request:request>_________________________________________________________________________________________________________________________________________________________________________________________

    HealthVaultTraceSource Information: 0 : <response><status><code>0</code></status><wc:info xmlns:wc="urn:com.microsoft.wc.methods.response.CreateAuthenticatedSessionToken2"><token app-id="25220dbb-7a5e-4d3a-a382-69cc1da32e28" app-record-auth-action="NoActionRequired">ASAAADdAqgl3/PlMuauFlGjZFVl4YaEnoinfB6y7+wUPTVQ4XR7R7ApNoq1iOobqoxJZyW3BxbI5QYXFikR9fJ4eapTPSqcX7Y7gJnX7TBytH6OWXKlnDSR9G79TyrcKB/dEMNTVFt3Oi0wNoBkrMr9psGP0pnQosJFPYP70bnPeKWXvsktt4jYyd23w/F8mWZE3Np/NdXE/XccQCyOcLrvyRgdTqjXgTilcAcP1YlXl66SYpB2kvvUuaBqdiCiAJZUZJsoVPt71LSwtXSsNkEQeJbClsmYY94+mUB5aWc0Zz1oZB6LC2b311oAtz9d7sMR2XA==</token><shared-secret>K2UWsjrat1+fREei5nSdwFJEmOD+vXao5eNnaTeDRaB2QKOiSwF56nBga4GBCIzisSeiJV+MAc7F7x2hjFkePw==</shared-secret></wc:info></response>

    HealthVaultTraceSource Information: 0 : <wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request"><auth><hmac-data algName="HMACSHA256">OIfhqIv/V5XCAcB0tgoM3xXSAqgUo0wYHpZpzgTJa28=</hmac-data></auth><header><method>PutThings</method><method-version>2</method-version><record-id>abd89775-3988-4d1b-bc73-df8c228d5e8c</record-id><auth-session><auth-token>ASAAADdAqgl3/PlMuauFlGjZFVl4YaEnoinfB6y7+wUPTVQ4XR7R7ApNoq1iOobqoxJZyW3BxbI5QYXFikR9fJ4eapTPSqcX7Y7gJnX7TBytH6OWXKlnDSR9G79TyrcKB/dEMNTVFt3Oi0wNoBkrMr9psGP0pnQosJFPYP70bnPeKWXvsktt4jYyd23w/F8mWZE3Np/NdXE/XccQCyOcLrvyRgdTqjXgTilcAcP1YlXl66SYpB2kvvUuaBqdiCiAJZUZJsoVPt71LSwtXSsNkEQeJbClsmYY94+mUB5aWc0Zz1oZB6LC2b311oAtz9d7sMR2XA==</auth-token><offline-person-info><offline-person-id>b287cfd0-d8cb-4ef0-baff-fcd7c4470cbf</offline-person-id></offline-person-info></auth-session><language>en</language><country>US</country><msg-time>2013-01-21T15:43:23.39Z</msg-time><msg-ttl>1800</msg-ttl><version>2.0.0.0</version><info-hash><hash-data algName="SHA256">HDc8u/zYQZwuND81s7tIkhnFqxJnVjImNy/e+Z5GR+E=</hash-data></info-hash></header><info><thing><type-id>3d34d87e-7fc1-4153-800f-f56592cb0d17</type-id><thing-state>Active</thing-state><flags>0</flags><data-xml><weight><when><date><y>2013</y><m>1</m><d>21</d></date><time><h>10</h><m>43</m><s>23</s><f>359</f></time></when><value><kg>86.2</kg><display units="pounds">190</display></value></weight><common /></data-xml></thing></info></wc-request:request>______________________________________________________________________________________________________________________________________________________________________________

    HealthVaultTraceSource Information: 0 : <response><status><code>0</code></status><wc:info xmlns:wc="urn:com.microsoft.wc.methods.response.PutThings"><thing-id version-stamp="656a0fe4-6be4-47ba-96c8-660479647908">878e23f2-7b6e-4c74-aba2-743d4b027857</thing-id></wc:info></response>

    HealthVaultTraceSource Information: 0 : <wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request"><auth><hmac-data algName="HMACSHA256">2/Z/K/jZHgferLQ8h8YMW08vUODs1uYcIBfskP+66Q4=</hmac-data></auth><header><method>PutThings</method><method-version>2</method-version><record-id>abd89775-3988-4d1b-bc73-df8c228d5e8c</record-id><auth-session><auth-token>ASAAADdAqgl3/PlMuauFlGjZFVl4YaEnoinfB6y7+wUPTVQ4XR7R7ApNoq1iOobqoxJZyW3BxbI5QYXFikR9fJ4eapTPSqcX7Y7gJnX7TBytH6OWXKlnDSR9G79TyrcKB/dEMNTVFt3Oi0wNoBkrMr9psGP0pnQosJFPYP70bnPeKWXvsktt4jYyd23w/F8mWZE3Np/NdXE/XccQCyOcLrvyRgdTqjXgTilcAcP1YlXl66SYpB2kvvUuaBqdiCiAJZUZJsoVPt71LSwtXSsNkEQeJbClsmYY94+mUB5aWc0Zz1oZB6LC2b311oAtz9d7sMR2XA==</auth-token><offline-person-info><offline-person-id>b287cfd0-d8cb-4ef0-baff-fcd7c4470cbf</offline-person-id></offline-person-info></auth-session><language>en</language><country>US</country><msg-time>2013-01-21T15:43:24.778Z</msg-time><msg-ttl>1800</msg-ttl><version>2.0.0.0</version><info-hash><hash-data algName="SHA256">EX9Wyc/nWSphlNw+XHLCnnndnGScMDEfdRIQiK7r0fY=</hash-data></info-hash></header><info><thing><type-id>40750a6a-89b2-455c-bd8d-b420a4cb500b</type-id><thing-state>Active</thing-state><flags>0</flags><data-xml><height><when><date><y>2013</y><m>1</m><d>21</d></date><time><h>10</h><m>43</m><s>24</s><f>778</f></time></when><value><m>2</m></value></height><common /></data-xml></thing></info></wc-request:request>______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    HealthVaultTraceSource Information: 0 : <response><status><code>0</code></status><wc:info xmlns:wc="urn:com.microsoft.wc.methods.response.PutThings"><thing-id version-stamp="f96c2788-d3fd-4a3c-a0c2-46921f152286">7782106f-9f2d-4b44-bca8-4e96c6c60821</thing-id></wc:info></response>

    HealthVaultTraceSource Information: 0 : <wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request"><auth><hmac-data algName="HMACSHA256">2R0aYvHeFFecXKNGQs1nBu2BAYDubivxpJUr5gbSTwo=</hmac-data></auth><header><method>PutThings</method><method-version>2</method-version><record-id>abd89775-3988-4d1b-bc73-df8c228d5e8c</record-id><auth-session><auth-token>ASAAADdAqgl3/PlMuauFlGjZFVl4YaEnoinfB6y7+wUPTVQ4XR7R7ApNoq1iOobqoxJZyW3BxbI5QYXFikR9fJ4eapTPSqcX7Y7gJnX7TBytH6OWXKlnDSR9G79TyrcKB/dEMNTVFt3Oi0wNoBkrMr9psGP0pnQosJFPYP70bnPeKWXvsktt4jYyd23w/F8mWZE3Np/NdXE/XccQCyOcLrvyRgdTqjXgTilcAcP1YlXl66SYpB2kvvUuaBqdiCiAJZUZJsoVPt71LSwtXSsNkEQeJbClsmYY94+mUB5aWc0Zz1oZB6LC2b311oAtz9d7sMR2XA==</auth-token><offline-person-info><offline-person-id>b287cfd0-d8cb-4ef0-baff-fcd7c4470cbf</offline-person-id></offline-person-info></auth-session><language>en</language><country>US</country><msg-time>2013-01-21T15:43:26.385Z</msg-time><msg-ttl>1800</msg-ttl><version>2.0.0.0</version><info-hash><hash-data algName="SHA256">MBIleNT5Fe9PMyHyRMimqjyyhZr02dzlVg45SIteCgo=</hash-data></info-hash></header><info><thing><type-id>3d34d87e-7fc1-4153-800f-f56592cb0d17</type-id><thing-state>Active</thing-state><flags>0</flags><data-xml><weight><when><date><y>2013</y><m>1</m><d>21</d></date><time><h>10</h><m>43</m><s>26</s><f>385</f></time></when><value><kg>86.2</kg><display units="pounds">190</display></value></weight><common /></data-xml></thing></info></wc-request:request>____________________________________________________________________________________________________

    HealthVaultTraceSource Information: 0 : <response><status><code>0</code></status><wc:info xmlns:wc="urn:com.microsoft.wc.methods.response.PutThings"><thing-id version-stamp="6414d462-5320-427e-991c-aab6ef93319f">ee1dc461-ec39-4ff0-a09e-d50e12974ace</thing-id></wc:info></response>

    HealthVaultTraceSource Information: 0 : <wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request"><auth><hmac-data al

    Monday, January 21, 2013 4:20 PM
  • Are you looking at the right account in HealthVault? Do you see Height being updated properly?

    Monday, January 21, 2013 6:01 PM
  • Only a single account. When I get the personid and recordid its always the same, I assume since its single account.

    Height Measurement

    Add: Height Measurement

    See sharing

    <input name="ctl00$cphMainBody$itemGridWrapper$wcDataGrid$ctl01$ToggleAll" type="checkbox" />Select/deselect   all

    Date

    Height

    Note

    Details

    Change Mike Bullen's access to this record

    Sharing level

    <input name="ctl00$cphMainBody$rblAccess" type="radio" value="0" />View   Mike's information
    <input name="ctl00$cphMainBody$rblAccess" type="radio" value="1" />View and   modify Mike's information
    <input CHECKED="" name="ctl00$cphMainBody$rblAccess" type="radio" value="2" />Act as   a custodian of Mike's record (What can a record custodian do?)

    Select information type

    <input CHECKED="" name="ctl00$cphMainBody$rblSharedInfo" type="radio" value="0" />Share   all items in this record
    <input name="ctl00$cphMainBody$rblSharedInfo" type="radio" value="1" />Share only   the types of information selected below

    Monday, January 21, 2013 6:53 PM
  • Do you have read and write access to height and weight? I see that you have difficulty in writing weight. Do you have the same problem with height? What isthe account that you are writing these values into? Are you using the same account to examine account.healthvault-ppe-com?

    Thanks
    Monday, January 21, 2013 7:16 PM