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

Validation added to include _text search parameter in UnSupportedParameters List #2779

Merged
merged 7 commits into from
Aug 31, 2022

Conversation

rajithaalurims
Copy link
Contributor

Description

When a Resource XXX is searched using _text parameter, we need to throw an error/warning depending on "Prefer handling" header option with a message "The search parameter '_text' is not supported for resource type 'XXX'."

Related issues

82463

Testing

Test 1:
https://localhost:44348/Observation?_text=MOBILE with heading Prefer: handling:strict
Returns below error message:
"issue": [
{
"severity": "error",
"code": "invalid",
"diagnostics": "The search parameter '_text' is not supported for resource type 'Patient'."
}
]

Test 2:
https://localhost:44348/Observation?_text=MOBILE with heading Prefer: handling:lenient
Returns below warning message:
"resource": {
"resourceType": "OperationOutcome",
"id": "004ba8ef-470c-4ee5-9a72-6fe48e5f7069",
"issue": [
{
"severity": "warning",
"code": "not-supported",
"diagnostics": "The search parameter '_text' is not supported for resource type 'Patient'."
}
]
},
In both scenarios, _text is removed from Self URL in the response.

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 Aug 29, 2022
@rajithaalurims rajithaalurims added this to the S96 milestone Aug 29, 2022
@rajithaalurims rajithaalurims marked this pull request as ready for review August 29, 2022 19:41
@rajithaalurims rajithaalurims requested a review from a team as a code owner August 29, 2022 19:41
@rbans96
Copy link
Contributor

rbans96 commented Aug 29, 2022

For my understanding, if Prefer header is not present, then the server is supposed to behave as Prefer:lineant? Not sure if we should add a test for default behavior?

@rajithaalurims
Copy link
Contributor Author

For my understanding, if Prefer header is not present, then the server is supposed to behave as Prefer:lineant? Not sure if we should add a test for default behavior?

You are right. I added another test case to verify that behavior.

rbans96
rbans96 previously approved these changes Aug 30, 2022
@rajithaalurims rajithaalurims merged commit 26aa830 into main Aug 31, 2022
@rajithaalurims rajithaalurims deleted the personal/rajithaaluri/_textSearch82463 branch August 31, 2022 15:29
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

4 participants