Stream: implementers
Topic: Question about reference search
Yunwei Wang (Jun 01 2020 at 13:46):
http://build.fhir.org/search.html#reference lists three reference search formats:
[parameter]=[id] the logical [id] of a resource using a local reference (i.e. a relative reference)
[parameter]=[type]/[id] the logical [id] of a resource of a specified type using a local reference (i.e. a relative reference), for when the reference can point to different types of resources (e.g. Observation.subject)
[parameter]=[url] where the [url] is an absolute URL - a reference to a resource by its absolute location, or by it's canonical URL
SHALL a server support all three formats?
Michele Mottini (Jun 01 2020 at 13:47):
SHALL but WON'T
Paul Church (Jun 01 2020 at 14:41):
Why not? Seems like standard reference search.
Michele Mottini (Jun 01 2020 at 15:25):
Patchy implementation
Michele Mottini (Jun 01 2020 at 15:26):
Having three ways to specify the same thing does not help with that of course
Brian Kaney (Aug 06 2020 at 00:22):
Here is a different search question about how to resolve absolute references (external from the server's URL base).
Suppose condition resources were on http://server-a, and patient resources http://server-b .. if I GET http://server-a/Condition?_include=Condition:subject
shall I expect server-a to follow the condition's references, querying server-b, and combine the results? Or is it an expectation that during search, a server only resolves references to resources it manages?
Paul Church (Aug 06 2020 at 00:32):
I wouldn't expect a server to call another server on your behalf.
There is language in _include that suggests that it won't: "If there is no reference, or no matching resource, the resource cannot be retrieved (e.g. on a different server), then the resource is omitted, and no error is returned."
Brian Kaney (Aug 06 2020 at 00:38):
Ah, I missed the parenthetical example in the docs. Thanks @Paul Church Maybe this should be called out more directly in the spec?
Paul Church (Aug 06 2020 at 00:53):
The spec doesn't really exclude the possibility that the server might recognize and follow some URLs - maybe they're public, or a known entity (e.g. part of the same organization).
Brian Kaney (Aug 06 2020 at 01:03):
I see. Maybe the server's capability statement (in the search operation section) could specify if it follows external references? Or what base URLs it will consider following?
Grahame Grieve (Aug 06 2020 at 01:07):
it is server discretion on this. We haven't been asked about saying something in the capability statement but it seems reasonable - do you want to make a jira task on this?
Last updated: Apr 12 2022 at 19:14 UTC