Sorting Patients By Name
# support
a
Hello everyone! I hope you are well! I would like to know if there is something already under discussion or related to ordering patient results by name. I tried to use the _sort argument in the API request (/Patient?address:line="JDBAL MEIA PONTE"&_sort=name), but it gives a Timeout error. I tried to use Sort in Medplum itself, in the patient list, but it remains on load and does not return to the list. Is there anything we can do to improve performance? Thank you in advance for your attention! Thanks!
r
what version are you on?
a
Good morning @reshma ! All good? We are using version 3.2.11
r
@medplummatt may have some insight here?
a
@medplummatt , can you help me?
m
Apologies for the delayed response @Adriano Freitas — unfortunately I don't think there's any immediate action you could take to improve the performance of this search. The pattern of filtering on one complex string type (
address
) and then sorting on another one (
name
) is currently something of a pathological case due to the way our database stores these types of search parameters. This is an area of active investigation for us though, and we're already beginning to experiment with different solutions for how to improve exactly this case