When we have a FHIR query like the following:
?issued=ge2024-04-22T00:00:00&issued=lt2024-04-23T00:00:00
We currently generate two CTE's in SQL and then join them. This is inefficient and can be improved if we combine the two conditions into one CTE.
Manually tested against the example query. All other automated tests run for regression testing.
FHIR Team Checklist
Update the title of the PR to be succinct and less than 65 characters
Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
Description
When we have a FHIR query like the following: ?issued=ge2024-04-22T00:00:00&issued=lt2024-04-23T00:00:00 We currently generate two CTE's in SQL and then join them. This is inefficient and can be improved if we combine the two conditions into one CTE.
Related issues
Addresses [issue AB#121039].
Testing
Manually tested against the example query. All other automated tests run for regression testing.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)