Stream: Vulcan/RWD
Topic: Medication Search Options
Craig McClendon (Sep 14 2021 at 16:02):
RE: Trying to reduce query burden - or reduce number of queries required to fetch a Patient with all Medications and related resources like Conditions.
So far this is a dry hole as far as using standard FHIR options.
Option 1: Patient$everything - http://hl7.org/fhir/R4/patient-operation-everything.html
This works and is well supported by many servers. However it returns everything related to the patient which can be a lot of extra data.
Option 2: Patient$everything using the _type filter parameter
This would be perfect, allows you to specify an explicit list of the Resource types you want included in the return. However this doesn't appear to be well supported - HAPI doesn't appear to support it for instance. Likely most EMRs would not either, might not even support $everything
Option 3: Issue requests using the _include _revinclude search parameters
_include and _revinclude can only be specified for defined resource search parameters.
MedicationXXX.reasonReference is not a searchable attribute for any of the MedicationXX resources.
Craig McClendon (Sep 14 2021 at 16:06):
So we're back to, I think, using Patient$everything and potentially getting a large payload or using a custom client to fetch things one by one and chasing the links to construct a Bundle with the relevant resources in it. I think I'd likely rather use Patient$everything and filter it client side, but either way there is effort involved with the client.
Scott Gordon (Nov 23 2021 at 16:37):
(deleted)
Last updated: Apr 12 2022 at 19:14 UTC