Chained/nested include

Is it possible to do include for referenced resources in referenced resources?
Ex: I need to find Procedure, include Procedure.encounter and then include Procedure.encounter.location

Yes. You would need to use the :iterate qualifier. Your search would look like this:


1 Like

Hi, lloyd!
I am doing the implementation of include search and have a question about chained include search.
My querstion is, does the order of include search matter?
E.g. I want to retrieve the referenced labor value of the patients, who has previous illness 386661006, though the Encounter. The query like following.
Does the query make sense?
If the order of search parameters does not matter, are the multiple iterations allowed?

Order of parameters doesn’t matter. (Some systems aren’t able to keep track of the order). Iteration keeps happening until running the iterate doesn’t add any new includes. (Or the server decides that it’s iterated enough.)

1 Like