Stream: hapi
Topic: revinclude asRecursive
Jenny Meinsma (Jan 31 2017 at 14:02):
I am trying to "translate" the following query to hapi:
/EpisodeOfCare?patient=someId&_revinclude=Encounter:episodeofcare&_revinclude:recurse=Observation:encounter
I would expect it to be
client.search() .forResource(classOf[EpisodeOfCare]) .where(EpisodeOfCare.PATIENT.hasId(patientId)) .revInclude(Encounter.INCLUDE_EPISODEOFCARE) .revInclude(Observation.INCLUDE_ENCOUNTER.asRecursive())
Unfortunately the asRecursive
does not seem to do anything, it doesn't add ":recurse" to the query string. Is there something I am missing?
James Agnew (Feb 07 2017 at 03:08):
@Jenny Meinsma Hmm, it appears you're right, HAPI isn't properly including the :recurse
qualifier for revincludes.
I'm going to check in a fix shortly.
That said, I'm not sure what recurse would mean in the context of your example.. Observation.encounter doesn't point to EpisodeOfCare, so you couldn't do a revinclude like that AFAIK.
Jenny Meinsma (Feb 07 2017 at 11:20):
@James Agnew , thank you.
We want to search for EpisodeOfCare for a patient and maybe include encounters and observations. Because an observation has encounters and an encounter has episodeofcares we can search those at once with reverse include. For this search we have tested the query-url above which seems to work.
James Agnew (Feb 07 2017 at 11:37):
@Jenny Meinsma Interesting... I don't suppose you have a sample link against one of the public servers that shows this type of search working? I don't think this would work on HAPI's server, I'd like to try and replicate it.
Jenny Meinsma (Feb 07 2017 at 12:23):
Last updated: Apr 12 2022 at 19:14 UTC