Stream: implementers
Topic: Proposal to remove :recurse (GF#13602)
Grahame Grieve (Dec 11 2017 at 20:50):
GF#13602 relates to the definition of the :recurse modifier on the _include parameter. After discussion on the FHIR-I call about this, we would like to propose to remove the :recurse modifier and just make this the behavior.
our resasoning is that this is something we have observed people to get tripped up by - even the definition is subtle. People just expect _include to work 'recursively' (though that possibly isn't the best word). And all of the potentially circular cascades where this is relevant (Organization.partOf, Observation.related, ValueSet.import, *.basedOn) are self-limiting (though you could imagine organizations that feel infinitely deep!).
so it seems to us that this more complexity than justified; let's just toast the modifier and make it the default behavior. We'll do that if no one objects.
Grahame Grieve (Dec 11 2017 at 20:51):
Note: this would be a breaking change to a FMM 5 artefact, so we'll need to do more consultation than just here.
Christiaan Knaap (Dec 18 2017 at 09:09):
To me it looks like :recurse is a way to "Define a graph of resources to return in a query", without the right semantics to ensure consistent behaviour.
e.g.: What if I ask for:
[base]/MedicationRequest?_include=requester&_include=performer&_include:recurse=Patient:general-practitioner.
Do I ask to include the GP's of the requester, the performer or both?
And does this implicitly limit both includes to Patient as well, like below, or do you just request the GP if the requester/performer happens to be a Patient?
[base]/MedicationRequest?_include=requester:Patient&_include=performer:Patient&_include:recurse=Patient:general-practitioner.
And as for the 'recursive' example in the spec:
[base]/Observation?_include:recurse=Observation:related-target&criteria...
where "The second search asks for the _include based on related parameter to be executed recursively" - but to what depth then? And how am I to determine which _include:recurse is meant to be really recursive and which just to _include one link further down the chain?
I deliberately chose the quote in the first sentence because it comes from GraphDefinition. My take would be: eliminate ':recurse' and specify a GraphDefinition if you want similar functionality.
Christiaan Knaap (Dec 18 2017 at 09:10):
Apart from that I would love to hear experiences from people using :recurse this in real world scenarios.
Ewout Kramer (Dec 18 2017 at 14:07):
"specify a GraphDefinition" - that's a big thing to do if you "just want the common simple case". Question is maybe: is there a common, simple case?
Last updated: Apr 12 2022 at 19:14 UTC