Stream: implementers
Topic: Search Medications
Paul Barry (Nov 09 2016 at 01:43):
We have a requirement to bring back the most recent 100 (configurable) MedicationOrders and MedicationDispense in a single query i.e. we cant call 2 endpoints. So the resultset should contain both MedicationOrders and MedicationDispenses based on date created (prescribe and dispense date) and only 100 entries returned. What type of FHIR search method/endpoint should be used for this type of search.
Grahame Grieve (Nov 09 2016 at 02:09):
right now your only option is a batch, but see task GF#12148
Yunwei Wang (Nov 09 2016 at 02:18):
You can use _include for _revinclude in search:
Yunwei Wang (Nov 09 2016 at 02:19):
GET [base]/MedicationDispense?_include=MedicationDispense:authorizingPrescription&....
Paul Barry (Nov 09 2016 at 03:00):
Thanks Grahame
Paul Barry (Nov 09 2016 at 03:01):
@Yunwei Wang that wont work as it will omit MedicationOrders that do not have an associated MedicationDispense which is not what we're after. Cheers
Brian Postlethwaite (Nov 09 2016 at 05:25):
Yes. the batch of searches is what I would do.
Last updated: Apr 12 2022 at 19:14 UTC