Assistance with Query to Retrieve 100 Most Active ...
# support
t
Hi @rahul1 , I need help crafting a query in Medplum to identify the 100 most active patients based on their observation records. Could you provide guidance or an example query to achieve this? Thank you.
b
hi @rahul1 - can you or someone on the team help with this query?
r
Hi @tanveerqamar_97071 , we don't support sorting based on a chained field.
A workaround might be run an
_include
search on Observations sorted by update time, and then including the patient
However, I understand your concern that you might get duplicate patients. Right now, unfortunately I don;t have a more elegant solution for you other than client side filtering
190 Views