Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort is crashing when Organization (any resource) is searched using chained search param and sort #2794

Merged

Conversation

rajithaalurims
Copy link
Contributor

@rajithaalurims rajithaalurims commented Sep 6, 2022

Description

Ex: https://ihealth-pie.fhir.azurehealthcareapis.com/Organization?partof.name=ABC&_sort=name throws Unknown error instead of returning results back.
As part of this work item, code was added in SortRewriter class to return null expression when sort field is already part of search filter name, which is causing failure in case of chained expression.
I modified code to use the expression as it is in chained expression part.

Related issues

AB#94770

Testing

Created test data and tested below URLs.
https://localhost:44348/Organization?partof.name=Test&_sort=name - should return results without failing
https://localhost:44348/Organization?name=Test&_sort=name - should return results as before
https://localhost:44348/Patient?organization.name=Mi&_sort=name - should return results without failing
https://localhost:44348/Patient?name=Mi&_sort=name - should return results as before

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 50 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, Dependencies, Enhancement, or New-Feature
  • Tag the PR with Azure API for FHIR if this will release to the Azure API for FHIR managed service (CosmosDB or common code related to service)
  • Tag the PR with Azure Healthcare APIs if this will release to the Azure Healthcare APIs managed service (Sql server or common code related to service)
  • CI is green before merge
  • Review squash-merge requirements

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

@rajithaalurims rajithaalurims added the Bug Bug bug bug. label Sep 6, 2022
@rajithaalurims rajithaalurims added this to the S97 milestone Sep 6, 2022
feordin
feordin previously approved these changes Sep 6, 2022
@fhibf fhibf marked this pull request as ready for review September 8, 2022 17:59
@fhibf fhibf requested a review from a team as a code owner September 8, 2022 17:59
@rajithaalurims rajithaalurims merged commit 7e50b64 into main Sep 8, 2022
@rajithaalurims rajithaalurims deleted the personal/rajithaaluri/SortyByInChaainedParams#94770 branch September 8, 2022 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug bug bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants