LinuxForHealth / FHIR

The LinuxForHealth FHIR® Server and related projects
https://linuxforhealth.github.io/FHIR
Apache License 2.0
333 stars 156 forks source link

Add support for historical data sorting #4245

Open berkant-k opened 10 months ago

berkant-k commented 10 months ago

In this update, we have introduced a feature allowing the sorting of historical data based on the '_sort' parameter. A method, 'getHistorySortOrder', has been added to validate the provided _sort parameter and a new field, 'historySortOrder', has been attached to the FHIRHistoryContext class.

Now system supports following queries.

Descendion order by lastUpdated

GET {ResourceName}/{id}/_history/?_sort=-_lastUpdated

Ascending order by lastUpdated

Closes Issue #4237