When querying a Patient resource, is there some way to lookup a property (e.g. family name) that matches the string exactly but without case sensitivity?
If querying "Smith", it should match "Smith" and "smith" but not "Smithy" or "smithy". The :exact modifier will resolve half the issue but it is case sensitive. Querying the field directly or using the :contains modifier will handle the case sensitivity but will fetch unwanted results.
I've tried creating a custom SearchParameter but the expression FHIRPath does not allow string manipulation functions. Specifying an expression like Patient.name.family[0].lower() doesn't work, with the API call failing because of the .lower() even though its a valid function.
The FHIRPath doc does mention the following limitation:
Note: The following sections of this specification have not received significant implementation experience and are marked for Standard for Trial Use (STU):
Functions - String (additional functions, marked as appropriate)
Can this be accomplished in a different way today or would the only solution would be to execute the query like {fhirurl}/Patient?family=Smith returning all approximate matches and post-process the returned data which excludes records that don't match the string exactly?
There's no 'standard' way to do what you're trying to do. You can certainly define your own custom SearchParameter that has the desired behavior and try to get the server to support it, but it would require custom development on the part of the server.