-
Notifications
You must be signed in to change notification settings - Fork 507
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
History returns items in the wrong order #2689
Comments
Hi @rmeoc, thanks for reporting this, we'll investigate |
Cosmos sorts correctly with _lastUpdated DESC: fhir-server/src/Microsoft.Health.Fhir.CosmosDb/Features/Search/Queries/QueryBuilder.cs Lines 142 to 147 in 4cfd7aa
The SQL Provider looks to be sorting incorrectly with: fhir-server/src/Microsoft.Health.Fhir.SqlServer/Features/Search/SqlServerSearchService.cs Lines 491 to 494 in 4cfd7aa
History tests should be updated to check ordering: fhir-server/test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/HistoryTests.cs Lines 86 to 93 in 4cfd7aa
|
@rmeoc Thanks for reporting the issue. The issue is fixed. |
Describe the bug
The versions returned when retrieving history are sorted from old to new, while they should be from new to old. See the following section of the FHIR Specification (from http://hl7.org/fhir/http.html#history):
FHIR Version?
Stu3
Data provider?
I don't know. I have encountered the bug with the Azure Health Data Services FHIR service. I don't know what Data provider is used by that service.
To Reproduce
Steps to reproduce the behavior:
GET [base]/[type]/[id]/_history
Expected behavior
A bundle is returned containing the version history sorted with oldest versions last.
Actual behavior
A bundle is returned containing the version history sorted with oldest versions first.
AB#93193
The text was updated successfully, but these errors were encountered: