Stream: implementers
Topic: searching on the resource id
Brian Reinhold (Jul 18 2017 at 14:27):
One of the most ubiquitous and basic searches is searching for a resource based upon the logical id. However, this option seems, in practice, difficult to do since the logical id is arbitrary and often specified by the server upon creation of the resource. SO if you are not the creator of the resource, searching for that resource based upon logical id is really not practical. This statement appears to be a definition of obvious unless I am missing something. Am I missing something?
John Moehrke (Jul 18 2017 at 14:32):
What is the use-case for searching on logical id for when you don't already know the logical id? However there is a common search parameter available against all resources for this http://build.fhir.org/search.html#id
Brian Reinhold (Jul 18 2017 at 14:35):
What is the use-case for searching on logical id for when you don't already know the logical id? However there is a common search parameter available against all resources for this http://build.fhir.org/search.html#id
There isn't! But I am seeing it used without this knowledge so I just wanted to make sure I have not blindly missed something after all this time before I speak up!
Lloyd McKenzie (Jul 18 2017 at 14:38):
Typically if you know the logical id, you just do a "get". Using logical id in a search is generally when you're trying to find other resources that point to a known resource - and you're confident the resource you're searching knows the target by the same logical id you have.
Grahame Grieve (Jul 21 2017 at 12:36):
if you know the idea, you can just do a read:
GET [base]/Patient/1
Grahame Grieve (Jul 21 2017 at 12:36):
but if you wanted to bring back a bundle of related content:
GET [base]/Patient?_id=1&include=....
Grahame Grieve (Jul 21 2017 at 12:37):
that's why the resource id is there
Grahame Grieve (Jul 21 2017 at 12:37):
as a search option
Last updated: Apr 12 2022 at 19:14 UTC