FHIR Chat · Search By Logical IDs (_id) · implementers

Stream: implementers

Topic: Search By Logical IDs (_id)


view this post on Zulip Nihar (Jun 04 2021 at 11:22):

Hi,
We have a query related to the Search By Logical IDs (_id).
Does the 'Logical IDs' searches by the exact match to the value i.e. if I'm searching as "GET [base]/Patient/1032702" then it will exactly check for the Id = 1032702..? OR it might also return the Id = 1032.
Logically, it looks like that it will be an exact match but since it is not mentioned explicitly thought of getting the inputs.
Please suggest. Thanks in advance.

view this post on Zulip Grahame Grieve (Jun 04 2021 at 13:22):

exact match

view this post on Zulip Nihar (Jun 04 2021 at 14:11):

Got it...!! Thank you so much, @Grahame Grieve ...!!!

view this post on Zulip Nihar (Jun 07 2021 at 06:33):

@Grahame Grieve : We have another confusion with the Logical id search: The Resource.id search parameter on the page: 'https://www.hl7.org/fhir/search.html#table' considers datatype as "token" whereas if we check on the respective StructureDefinition page for each resource, 'id' is considered as 'String'. Almost for all the resources it is mapped to 'string'.

Question is: For all Search by 'id' - String datatype rules will applicable correct? e.g. token with id are case sensitive whereas string with id are not case sensitive.

Please suggest.

view this post on Zulip Grahame Grieve (Jun 07 2021 at 06:36):

keep in mind that 'token' is the type of the search parameter itself, where as 'string' is the type of the element in the underlying resource.

It's a little bit misleading that some search parameter types have the same names as related data types, but they're not the same thing

view this post on Zulip Nihar (Jun 07 2021 at 06:49):

@Grahame Grieve : So it means, if we are using the 'id' as the Search parameter then it would be considered as token type. Am i having the correct understanding..?

view this post on Zulip Grahame Grieve (Jun 07 2021 at 06:49):

yes

view this post on Zulip Nihar (Jun 07 2021 at 07:13):

@Grahame Grieve : I'm really sorry with many confusion on my side.....!! Implementing token datatype, it has mention as “The matches on ‘_id’ are always case sensitive. If the underlying data type is string then the search is not case sensitive.“ Does this means 'id' search for all the resources are not case sensitive..?

view this post on Zulip Grahame Grieve (Jun 07 2021 at 07:42):

Note that matches on _id are always case sensitive

view this post on Zulip Grahame Grieve (Jun 07 2021 at 07:42):

then

view this post on Zulip Grahame Grieve (Jun 07 2021 at 07:42):

If the underlying data type is string then the search is not case sensitive

view this post on Zulip Grahame Grieve (Jun 07 2021 at 07:43):

the first rule takes precedence over the second

view this post on Zulip Nihar (Jun 07 2021 at 08:39):

Ok got it...!!! Thank you so much, @Grahame Grieve. Thanks for prompt clarification to all queries.


Last updated: Apr 12 2022 at 19:14 UTC