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
balki_25780
01/09/2025, 3:06 AM
hi @rahul1 - can you or someone on the team help with this query?
r
rahul1
01/23/2025, 6:41 AM
Hi @tanveerqamar_97071 , we don't support sorting based on a chained field.
rahul1
01/23/2025, 6:43 AM
A workaround might be run an
_include
search on Observations sorted by update time, and then including the patient
rahul1
01/23/2025, 6:53 AM
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