Thanks for posting the fix here, Julian. Hopefully other developers
will get some mileage out of it!
You're right-on about the profile "categories"; you can query for data
in specific categories, such as "medication", "condition", etc., by
either adding "/-/medication" or "/-/condition" in your query, or by
using the following code:
CategoryFilter cf = new CategoryFilter();
cf.addCategory(new Category("medication"));
query.addCategoryFilter(cf);
I'm not too sure how to use the above code while appending a profile
id and a query item (i.e. "Sotalol"). If anyone has tried this,
please let us know!
We have some docs on how to query for data within specific categories
at http://code.google.com/apis/health/docs/2.0/reference.html#Parameters.
Thanks again!
p...@google
On Apr 9, 1:09 am, julian <[email protected]> wrote:
> I was wondering how to find a specific entry (like concerning the
> condition cough) using the Java API in a Clientapplication.
>
> I asked Paul from Google about this topic and he was so nice to help
> me with my problem:
>
> String url = "https://www.google.com/h9/feeds/profile/ui/" +
> profilid + "/-/medication/";
> url += URLEncoder.encode("{http://schemas.google.com/health/item}
> Sotalol", "ISO-8859-1");
>
> Query query = new Query(new URL(url));
> ProfileFeed feed = service.query(query, ProfileFeed.class);
>
> for (ProfileEntry entry : feed.getEntries()) {
>
> System.out.println( entry.getContinuityOfCareRecord().getXmlBlob().getBlob()
> );
> }
>
> My problem was a thinking problem about the URI encoding but this was
> very helpful anyways,
> you can just change "medication" to any other CCR Body type like
> condition, alert, etc. the same applied to the item (ie. Sotalol, or
> cough)
>
> I hope this helps other people struggling with the same problem.
--
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.