FHIR Chat · String searches with Modifiers · implementers

Stream: implementers

Topic: String searches with Modifiers


view this post on Zulip Richard Kavanagh (Jan 15 2021 at 14:13):

If a system has the following records with the given names as shown

#1 Freda
#2 Fred
#3 Alfred
#4 fred
#5 Frederick

My understanding of the search mechanism is the following

/Patient?given=fred - this will yield #1,#2,#4,#5
/Patient?given:contains=fred - this will yield #1,#2,#3,#4,#5
/Patient?given:exact=fred - this will yield #4 (case sensitive)
/Patient?given:exact=Fred - this will yield #2 (case sensitive)

How can you query to retrieve #2 and #4 (i.e. Fred and fred )?

view this post on Zulip René Spronk (Jan 15 2021 at 14:15):

given:exact=fred,Fred ;-)

view this post on Zulip Richard Kavanagh (Jan 15 2021 at 14:18):

@René Spronk technically correct of course - but not a scalable solution. If the names were "McAndrews","MCAndrews","mcAndrews","mcandrews" etc - then the client has a lot of work to do....

view this post on Zulip Michele Mottini (Jan 15 2021 at 14:23):

Our :exact is case insensitive....

view this post on Zulip René Spronk (Jan 15 2021 at 14:26):

@Richard Kavanagh I know, I know, but I couldn't resist ;-) ..

view this post on Zulip René Spronk (Jan 15 2021 at 14:26):

@Michele Mottini Hmm - :exact is defined as "For string: :exact returns results that match the entire supplied parameter, including casing and combining characters" so capitalization matters

view this post on Zulip Michele Mottini (Jan 15 2021 at 14:29):

I know, but it did not seem the best idea to make it case-sensitive

view this post on Zulip René Spronk (Jan 15 2021 at 14:31):

Non conformance is rarely a good idea ;-)

view this post on Zulip Richard Kavanagh (Jan 15 2021 at 14:33):

René Spronk said:

Non conformance is rarely a good idea ;-)

I agree, but sometimes there isn't an alternative.

view this post on Zulip René Spronk (Jan 15 2021 at 14:34):

you can always define your own modifier or parameter.

view this post on Zulip Richard Kavanagh (Jan 15 2021 at 14:38):

Modifiers are from a fixed ValueSet so I am not sure you can (easily) add your own. Adding a new search parameter is a pain as we'd need it for a number of different string-based searches. Client's won't be expecting it as it would not be intuitive

view this post on Zulip Lloyd McKenzie (Jan 15 2021 at 16:47):

You can't define your own qualifiers. And the existing qualifiers are normative, so I'm afraid it's too late to change them. You could propose adding a new qualifier in R5, but in R4, there's not choice other than a custom search parameter.


Last updated: Apr 12 2022 at 19:14 UTC