Hi!

I've read that it's possible to insert multiple Test into a Result
item, but I can't find the way!

If I insert a Result with only one Test, it works, however if I used
the same code in order to insert 2 or more test, it fails!
I use the API for Java and that's a summary of my code:

CCR data to insert:
XMLData =
<urn:Body xmlns:urn="urn:astm-org:CCR">
        <urn:Results>
                <urn:Result>
                        <urn:CCRDataObjectID/>
                        <urn:Description>
                                <urn:Text>Glucose Log</urn:Text>
                        </urn:Description>
                        <urn:Test>
                                
<urn:Description><urn:Text>Glucose</urn:Text></urn:Description>
                                <urn:TestResult>
                                        <urn:Value>120</urn:Value>
                                        
<urn:Units><urn:Unit>mg/dl</urn:Unit></urn:Units>
                                </urn:TestResult>
                        </urn:Test>
                </urn:Result>
        </urn:Results>
</urn:Body>

Then I get the ProfileFeed of my profile and:
        ProfileEntry entry2 = profileFeed.createEntry();

        entry2.setContinuityOfCareRecord(new
com.google.gdata.data.health.ContinuityOfCareRecord());
        entry2.getContinuityOfCareRecord().setXmlBlob(new XmlBlob());
 
entry2.getContinuityOfCareRecord().getXmlBlob().setBlob(XMLdata);
        String url = http://www.google.com/health/feeds/profile/ui/"; +
profileID;
        entry2 = healthService.insert(new URL(url), entry2);

AND, IT WORKS!!

HOWEVER, if the CCR data has more than one test:

XMLData =
<urn:Body xmlns:urn="urn:astm-org:CCR">
        <urn:Results>
                <urn:Result>
                        <urn:CCRDataObjectID/>
                        <urn:Description>
                                <urn:Text>Blood Test</urn:Text>
                        </urn:Description>
                        <urn:Test>
                                
<urn:Description><urn:Text>Glucose</urn:Text></urn:Description>
                                <urn:TestResult>
                                        <urn:Value>120</urn:Value>
                                        
<urn:Units><urn:Unit>mg/dl</urn:Unit></urn:Units>
                                </urn:TestResult>
                        </urn:Test>
                        <urn:Test>
                                
<urn:Description><urn:Text>Creatinine</urn:Text></urn:Description>
                                <urn:TestResult>
                                        <urn:Value>70</urn:Value>
                                        
<urn:Units><urn:Unit>mmol/dl</urn:Unit></urn:Units>
                                </urn:TestResult>
                        </urn:Test>
                </urn:Result>
        </urn:Results>
</urn:Body>

IT FAILS!

Someone can help me!?
I've tried to insert firstly the Result with only one Test and later
insert another test and update, but it fails too...

Another problem I've is when I try to insert two Results at a time for
example:

XMLData =
<urn:Body xmlns:urn="urn:astm-org:CCR">
        <urn:Results>
                <urn:Result>
                        ...
                </urn:Result>
                <urn:Result>
                        ...
                </urn:Result>
        </urn:Results>
</urn:Body>

IT FAILS TOO!!!

Thanks in advance!

Skizo

-- 
You received this message because you are subscribed to the Google Groups 
"Google Health Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/googlehealthdevelopers?hl=en.

Reply via email to