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

Sorting on patient resource error #2344

Closed
EMellau opened this issue Nov 10, 2021 · 5 comments
Closed

Sorting on patient resource error #2344

EMellau opened this issue Nov 10, 2021 · 5 comments
Labels
Bug Bug bug bug. VSTS-Current We are working on this item in the current sprint
Milestone

Comments

@EMellau
Copy link

EMellau commented Nov 10, 2021

When calling Fhir with _sort= and organization.identifier= on Patient resource get, it bugs.

Using azurehealthcareapis

Description
When using the parameter _sort on Patient resource at the same time than filtering by organization it bugs.

All of them i use curl to test
curl -X GET -H "Authorization: Bearer $tokenFIHR" -H "Content-Type: application/json" "https://fhir-xx-xxxx-xxxx.azurehealthcareapis.com

This one gives not sorted results of an organization(As expected)

/Patient?organization.identifier=000000&_count=30

This one gives sorted results, has some patients from the org we were searching before(Showing that there is indeed patients on that organization with a birthdate)

Patient?_sort=birthdate&_count=30

This one gives no results (But it should)

/Patient?organization.identifier=000000&_sort=birthdate&_count=30

This one gives not sorted results (As expected)

/Patient?organization.identifier=000000&_sort=&_count=30

Not working neither (We can not sort by identifier OR FullName)

/Patient?_sort=identifier&_count=30
@EMellau EMellau added the Bug Bug bug bug. label Nov 10, 2021
@brendankowitz
Copy link
Member

Thanks for reporting this @EMellau, we are looking into it

@CaitlinV39
Copy link
Contributor

CaitlinV39 commented Nov 10, 2021

AB#86544

@CaitlinV39 CaitlinV39 added the VSTS-Current We are working on this item in the current sprint label Nov 10, 2021
@CaitlinV39 CaitlinV39 added this to the S75 milestone Nov 10, 2021
@brendankowitz
Copy link
Member

In the above, you can't sort on all search parameters, when not supported these are returned in the search bundle as OperationOutcomes, e.g.:

{
        "resourceType": "OperationOutcome",
        "id": "54fc2239-45df-4e93-8abc-c96c5522ff7c",
        "issue": [
          {
            "severity": "warning",
            "code": "not-supported",
            "diagnostics": "Sorting by the 'identifier' parameter is not supported."
          }

@EMellau
Copy link
Author

EMellau commented Nov 11, 2021

In the above, you can't sort on all search parameters, when not supported these are returned in the search bundle as OperationOutcomes, e.g.:

{
        "resourceType": "OperationOutcome",
        "id": "54fc2239-45df-4e93-8abc-c96c5522ff7c",
        "issue": [
          {
            "severity": "warning",
            "code": "not-supported",
            "diagnostics": "Sorting by the 'identifier' parameter is not supported."
          }

Agree but birthdate is supported right?

@CaitlinV39
Copy link
Contributor

@EMellau - Thank you so much for identifying this. We have identified the fix and it is merged into the open-source code and will ship to the managed service during the month of December. If you'd like to follow up at all feel free to email me: cavoeg@microsoft.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug bug bug. VSTS-Current We are working on this item in the current sprint
Projects
None yet
Development

No branches or pull requests

3 participants