Blood Pressure measurements rejected

Feb 8, 2013 at 11:04 AM
Edited Feb 8, 2013 at 5:05 PM
Using the linking model I am able to send Temperature, Weight, Glucose, and Pulse OX measurements, but not Blood pressure. Has there been anything about the codes that have changed for Blood Pressure? I used to be able to send BP measurements (though that was in a SODA model). On the other hand the code for creating the 'Thing' object with all the measurements is the same in both models so I can't believe the model is the difference.

Is anyone else having problem sending Blood Pressure measurements? (This is to the ppe version of HV.)

Thanks

I did some testing with the HV validator and everything seems okay. I have looked at the xml being sent for the failure case (bloodpressure) and the successful case (Temperature) and cannot find any difference (besides the obvious values). The codes are correct according to the on-line HV site.

Here are the xmls in both cases; Blood pressure first:
<wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request">
    <auth>
        <hmac-data algName="HMACSHA256">MdTOQduA9JtTdIDDP5cvORFQAoF9yjxw98cKED4jDBU=</hmac-data>
    </auth>
    <header>
        <method>PutThings</method>
        <method-version>1</method-version>
        <record-id>f5782be5-5115-4253-b81e-1a35c63b7630</record-id>
        <auth-session>
            <auth-token>ASAAAEDPUlEefE5BhjpTvF+b8E2ThgU/3D57rLLHjilKCoyn/AhImalsVvVNOpnln5/7sUv5sm0frcU/3jWswwUQAKnxQqsX4ysmas5L9REqIVnpnpkN7lhjO0uyn8FbVGjbUGfCog/c/zwJqJXfqbYfaR3Uqba4bTaPVAPGrhQgZz5Fjg0BbI5bSdtKxXj0iDIuVXfkkfImqDbsXL0aJkUZaWB6lhmC+wBNuM0bWdkXYnxo</auth-token>
            <offline-person-info>
                <offline-person-id>9b1e5f97-2849-4f6a-9480-a49bb16bd80c</offline-person-id>
            </offline-person-info>
        </auth-session>
        <language>en</language>
        <country>US</country>
        <msg-time>2013-02-08T01:47:27</msg-time>
        <msg-ttl>29100</msg-ttl>
        <version>Java/1.3.0 JDK-1.5+</version>
        <info-hash>
            <hash-data algName="SHA256">k0gC5np/SVlgI6XdewpVVrbzH6VSiRcRuhLHZfCLFQ0=</hash-data>
        </info-hash>
    </header>
    <info>
        <thing>
            <type-id>73822612-C15F-4B49-9E65-6AF369E55C65</type-id>
            <data-xml>
                <vital-signs>
                    <when>
                        <date>
                            <y>2013</y><m>02</m><d>07</d>
                        </date>
                        <time>
                            <h>20</h><m>47</m><s>23</s><f>0</f>
                        </time>
                    </when>
                    <vital-signs-results>
                        <title>
                            <text>Pulse</text>
                        </title>
                        <value>80</value>
                        <unit>
                            <text>Beats per Minute</text>
                        </unit>
                    </vital-signs-results>
                </vital-signs>
            </data-xml>
        </thing>
        <thing>
            <type-id>ca3c57f4-f4c1-4e15-be67-0a3caf5414ed</type-id>
            <data-xml>
                <blood-pressure>
                    <when>
                        <date>
                            <y>2013</y><m>02</m><d>07</d>
                        </date>
                        <time>
                            <h>20</h><m>47</m><s>23</s><f>0</f>
                        </time>
                    </when>
                    <systolic>105</systolic>
                    <diastolic>70</diastolic>
                </blood-pressure>
            </data-xml>
        </thing>
    </info>
</wc-request:request>
and here is the case for temperature that succeeds
<wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request">
    <auth>
        <hmac-data algName="HMACSHA256">kRPZ/rt5EbzuIIvmV9jIzgcJFf4Xxu7pe8MKALVTyrU=</hmac-data>
    </auth>
    <header>
        <method>PutThings</method>
        <method-version>1</method-version>
        <record-id>f5782be5-5115-4253-b81e-1a35c63b7630</record-id>
        <auth-session>
            <auth-token>ASAAAEDPUlEefE5BhjpTvF+b8E2ThgU/3D57rLLHjilKCoyn/AhImalsVvVNOpnln5/7sUv5sm0frcU/3jWswwUQAKnxQqsX4ysmas5L9REqIVnpnpkN7lhjO0uyn8FbVGjbUGfCog/c/zwJqJXfqbYfaR3Uqba4bTaPVAPGrhQgZz5Fjg0BbI5bSdtKxXj0iDIuVXfkkfImqDbsXL0aJkUZaWB6lhmC+wBNuM0bWdkXYnxo</auth-token>
            <offline-person-info>
                <offline-person-id>9b1e5f97-2849-4f6a-9480-a49bb16bd80c</offline-person-id>
            </offline-person-info>
        </auth-session>
        <language>en</language>
        <country>US</country>
        <msg-time>2013-02-08T02:07:15</msg-time>
        <msg-ttl>29100</msg-ttl>
        <version>Java/1.3.0 JDK-1.5+</version>
        <info-hash>
            <hash-data algName="SHA256">ROWBjdDp+X0mv9jkVZCQOD9gGD5Slzxezok3m3v/QOA=</hash-data>
        </info-hash>
    </header>
    <info>
        <thing>
            <type-id>73822612-C15F-4B49-9E65-6AF369E55C65</type-id>
            <data-xml>
                <vital-signs>
                    <when>
                        <date>
                            <y>2013</y><m>02</m><d>07</d>
                        </date>
                        <time>
                            <h>21</h><m>07</m><s>15</s><f>0</f>
                        </time>
                    </when>
                    <vital-signs-results>
                        <title>
                            <text>Temperature-Body</text>
                            <code>
                                <value>Tmp</value>
                                <type>vital-statistics</type>
                            </code>
                        </title>
                        <value>37</value>
                        <unit>
                            <text>Cel</text>
                            <code>
                                <value>Cel</value>
                                <type>lab-results-units</type>
                            </code>
                        </unit>
                    </vital-signs-results>
                </vital-signs>
            </data-xml>
        </thing>
    </info>
</wc-request:request>
Coordinator
Feb 8, 2013 at 8:37 PM
Hi Brian,

Do you have the error you receive when the request fails?

--Rob
Coordinator
Feb 8, 2013 at 8:52 PM
Ensure you application has the proper authorization to blood pressure. Sign into https://account.healthvault-ppe.com/Apps and click on your application. You should then see the types your application has been authorized to access. Also ensure you are inspected the correct record.

--Rob
Feb 8, 2013 at 10:07 PM
I have checked and Blood pressure is included in the list of measurements. Here is the response for the bloodpressure case:
<?xml version="1.0" encoding="utf-8"?>
    <response>
        <status>
            <code>11</code>
                <error>
                    <message>Access is denied.</message>
                    <error-info>failed-item-index=1</error-info>
               </error>
        </status>
    </response>
Coordinator
Feb 8, 2013 at 10:23 PM
The error indicates that either the user does not have permission or the user has not granted the application permission to the first thing in the PutThings request. The PutThings request above contains two Things: vital-signs, blood pressure. So it appears your application does not have permission to vital-signs.

--Rob
Feb 8, 2013 at 11:55 PM
Or is it the double? Because temperature, which is a vital sign as is SpO2 and pulse rate from a pulse ox, they succeed. Is the problem because of the mixed message, a vital sign followed by blood pressure?
Coordinator
Feb 11, 2013 at 11:25 PM
Sending multiple Things in one PutThings request is totally normal. Have you checked if your application has access to the vital-signs thing type here: https://account.healthvault-ppe.com/Apps
Feb 11, 2013 at 11:46 PM
Yes I have looked at that. The information is:

Conditions | Reason for access
Medical Device
Custom Data | Reason for access
Application-Specific Information
Files | Reason for access
Clinical Document Architecture (CDA), Continuity of Care Document (CCD)
Measurements | Reason for access
Blood Glucose Measurement, Blood Oxygen Saturation, Blood Pressure Measurement, Body Composition, Body Dimension, HbA1C Measurement, Heart Rate, Height Measurement, Peak Flow Measurement, Vital Signs, Weight Measurement
Medications | Reason for access
Medication
Personal Profile | Reason for access
Basic Demographic Information

So vital signs are included in the permissions. I am also able to send other measurements as vital signs, for example the temperature above.
Coordinator
Feb 12, 2013 at 1:21 AM
Edited Feb 12, 2013 at 1:22 AM
I mispoke. HV uses a zero based index. The error indicates you don't have access to blood pressure. Do you have blood pressure in your offline rules in https://config.healthvault-ppe.com?

I created a unit test to recreate your problem and everything runs fine for me, so it points to an authorization problem.
@Test
    public void PutVitalandBP() throws Exception 
    {
        BloodPressure bp = new BloodPressure();
        bp.setWhen(DateTime.fromCalendar(Calendar.getInstance()));
        bp.setDiastolic(120);
        bp.setSystolic(90);
        
        Thing bpThing = new Thing();
        bpThing.setData(bp);
         
        VitalSigns vs = new VitalSigns();
        vs.setWhen(DateTime.fromCalendar(Calendar.getInstance()));
        
        Thing vsThing = new Thing();
        vsThing.setData(vs);
         
        SimpleRequestTemplate requestTemplate = new SimpleRequestTemplate(
            ConnectionFactory.getConnection());
        requestTemplate.setPersonId("75ac2c6c-c90e-4f7e-b74d-bb7e81787beb");
        requestTemplate.setRecordId("8c390004-3d41-4f5c-8f24-4841651579d6");
        
        PutThingsRequest request = new PutThingsRequest();
        request.getThing().add(vsThing);
        request.getThing().add(bpThing);
        
        
        PutThingsResponse response = (PutThingsResponse)requestTemplate.makeRequest(request);
         
    }
Feb 12, 2013 at 8:32 AM
Edited Feb 12, 2013 at 8:35 AM
Logging onto HV to see what I am configured for with respect to measurements shows

Measurements | Reason for access
Blood Glucose Measurement, Blood Oxygen Saturation, Blood Pressure Measurement, Body Composition, Body Dimension, HbA1C Measurement, Heart Rate, Height Measurement, Peak Flow Measurement, Vital Signs, Weight Measurement

and blood pressure is there. My application manager has the bp measurement checked in both the offline and online rules. In fact all the measurement items that are checked are in the list.

Maybe there is something wrong with my xml
        <thing>
            <type-id>ca3c57f4-f4c1-4e15-be67-0a3caf5414ed</type-id>
            <data-xml>
                <blood-pressure>
                    <when>
                        <date>
                            <y>2013</y><m>02</m><d>07</d>
                        </date>
                        <time>
                            <h>20</h><m>47</m><s>23</s><f>0</f>
                        </time>
                    </when>
                    <systolic>105</systolic>
                    <diastolic>70</diastolic>
                </blood-pressure>
            </data-xml>
        </thing>
that I am not seeing. The HV validator does not complain. My understanding from others is that HV has been having some problems in the past weeks. Perhaps I should just try again and see if it works.

How does your unit code test above create the id (ca3c57f4-f4c1-4e15-be67-0a3caf5414ed) for bp?
Coordinator
Feb 12, 2013 at 8:13 PM
Edited Feb 12, 2013 at 8:17 PM
Hi Brian,

I checked with HV and your application does not have offline permission to the bp type: ca3c57f4-f4c1-4e15-be67-0a3caf5414ed. It does have online permission, however. The XML in your requests uses offline permission. If you go to the config center https://config.healthvault-ppe.com/EditOfflineRules.aspx?appid=72c2b58a-a798-43ec-99b7-72e8e530977f you should be able to edit your offline rules.

If you make any modifications, it may take up to 20 minutes for the changes to take effect.

My unit test code uses the JAXB bindings which take care of the type-id madness.

--Rob
Feb 12, 2013 at 11:08 PM
You are right! How many times did I look at that and somehow see it selected? Wonder why it appeared in my list of selected measurements? But thanks. This should solve the 'mystery'