Open karsiwek-kainos opened 8 years ago
select fhir_search('{"resourceType":"Appointment", "queryString":"_sort=location"}');
sorts data on first element in "participant" and it should look for location type actor.
example: having appointments:
{ "resourceType":"Appointment", "id":"1", ... "participant":[ { "actor":{ "reference":"Patient/2", "display":"Peter James Chalmers" }, "required":"information-only", "status":"accepted" }, { "actor":{ "reference":"Location/2", "display":"location B" }, "required":"required", "status":"accepted" }, ... ] } { "resourceType":"Appointment", "id":"2", ... "participant":[ { "actor":{ "reference":"Patient/3", "display":"Peter James Chalmers" }, "required":"information-only", "status":"accepted" }, { "actor":{ "reference":"Location/1", "display":"location A" }, "required":"required", "status":"accepted" }, ... ] } { "resourceType":"Appointment", "id":"2", ... "participant":[ { "actor":{ "reference":"Patient/1", "display":"Peter James Chalmers" }, "required":"information-only", "status":"accepted" }, { "actor":{ "reference":"Location/3", "display":"location C" }, "required":"required", "status":"accepted" }, ... ] }
query : select fhir_search('{"resourceType":"Appointment", "queryString":"_sort=location"}'); should return appointments in order 2,3,1 (id's), but returns 3,1,2.
it looks like it's sorting patients and not locations.
select fhir_search('{"resourceType":"Appointment", "queryString":"_sort=location"}');
sorts data on first element in "participant" and it should look for location type actor.
example: having appointments:
query : select fhir_search('{"resourceType":"Appointment", "queryString":"_sort=location"}'); should return appointments in order 2,3,1 (id's), but returns 3,1,2.
it looks like it's sorting patients and not locations.