So on this topic: given that the register feed approach is a bit of a kludge, could Google please supply some guidance as to how to tie 2 profile feed items together. I've spent the better part of a day trying to sleuth this out and I decided to ask in case its fairly straightforward.
I have a app in the Android Market (http://simpleeye.com/platforms/ android/google-health-sync/) that takes measurements retrieved from Bluetooth-enabled measurement devices (weight/temperature/pulse oximeter/blood glucose/blood pressure) and sends them to Google Health. Everything works just fine, except for Blood Pressure. When I did my testing I posted to the register feed and Google Health reconciled the post and generated 2 matched systolic/diastolic values. That was fine for testing, but for production my app implements updates/deletes of the entries (so the user can change a weight or add a note and it just automagically updates on a timer) and so has to post to the profile feed. Here is the problem: posting the same notice to the profile feed results in a single broken entry. The blood pressure tracker graph gives me the dreaded "1 value can't be graphed: look at the table" error. Even worse when I tried to edit the values in the web interface I get the even more annoying and less helpful "Oops. An error occured" with no guidance as to WHAT the error is. I dumped out the profile feed and looked at the actual chunks of XML and I can't figure out for the life of me what the server uses to match up each pair: the 2 entries don't appear to share anything other than the <published> field and the <DateTime> on the <Test> element. I've manually generated a systolic and a diastolic notice on the profile feed that LOOK right, but the server still treats them as separate entries instead of matching them up. I've matched timestamps at second resolution and at day resolution and still no luck. I've tried using LOINC codes, and that actually worked somewhat better: I could suddenly edit the value and fix it, which of course didn't fix my initial issue but at least allowed the values to be graphed. I know that the recommendation Paul gave is to POST to the register feed and then do a search on the profile feed to try and deduce which posts were created. Besides the significant performance issues (its pretty slow over the air: I see couple of second response times for a single POST, and its not much better in batch mode) there have been significant delays between posting to the register feed and actually having the reconciled entries hit the profile feed (I'm guessing there's some queuing going on, which would be fine if I wasn't in a hurry) and this means that's kind of a non-starter. I'd be EXTREMELY grateful if anyone from Google could point out a simple way to resolve this (even a complex way would be fine, but a way that works!). In a nutshell: how can I reliably POST the 2 values for a blood pressure reading to the profile feed and retrieve the ids efficiently? I have code that works for posting: I just need to know what referential IDs the server uses to match them up. Thanks, Femi. On Feb 16, 1:49 am, peter mason <[email protected]> wrote: > With a profile feed being "...a set of entries that collectively describe a > user's medical conditions, medications, .." I figured that I'd never need a > register feed as "... used to collect data from sources external to Google. > ". I think you're saying that we'll be able to deal with multiple tests in a > single CCR result at a future time? If one is responsible for the GETting > only, ie not the POSTing, then it's also possible that we may be looking at > the wrong feed? > > Perhaps I'm missing the point of a "register" feed? > > On 16/02/2011, at 2:32 PM, Paul (Google) wrote: > > > Hi Skizo, > > > The profile feed currently doesn't support compound results or panels (i.e. > > two TestResult elements in a single Result); however, the register feed > > does. If you don't need access to the entry ids returned from the profile > > feed, then you'll certainly want to post compound results using the > > register feed. > > > If you are building an app that allows a user to update and delete data > > from Health, instead of using the entry ids returned from the profile feed > > when you post data, you could also post data via the register feed and > > subsequently retrieve the data, with entry ids, from the profile feed. By > > using the published-min query parameter on the profile feed, you should be > > able to get the entry ids for the results you posted to the register feed. > > >http://code.google.com/apis/health/docs/2.0/reference.html#Parameters > > > I hope this helps! > > > Paul > > > On Wed, Feb 9, 2011 at 10:01 AM, Eskizo <[email protected]> wrote: > > 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 > > athttp://groups.google.com/group/googlehealthdevelopers?hl=en. > > > -- > > 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 > > athttp://groups.google.com/group/googlehealthdevelopers?hl=en. -- 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.
