Hello, thanks for the great work 🙂 I am wonderi...
# general
u
Hello, thanks for the great work 🙂 I am wondering if this feature is planed to be supported soon -> https://build.fhir.org/observation-operation-lastn.html thanks in advance
r
quick question: Would a query like this work for you? Observation?_compartment=Patient%_______-921f-415f-984e-dc5695de0e36&_count=20&_fields=id,_lastUpdated,subject,code,status&_offset=0&_sort=-_lastUpdated
very similar
a
hi @reshma, first, really appreciate you chiming in here 🙏 i may be missing something in your example, but does that ysupport the
lastn
use case for (
'GROUP BY' Observation.code)
returning the most recent N records for a given
observation.code
across any array of supplied codes? We're currently achieving this with bundled requests per code, which certainly works.
r
https://app.medplum.com/Observation?_count=20&_fields=id,_lastUpdated,subject,code,status&_offset=0&_sort=-_lastUpdated&code:contains=41793-1 - something like this should work. You can add _compartment=Patient\xxxxxx to make sure it is just for the patient in question. I realize this is not "group by" but rather filter
Solid feature request on the GROUP BY though - it does make sense
a
Thanks Reshma!
u
thanks :