Using the bulk export ($export) functionality of FHIR, I am able to export all resources given a query. What I am unsure about is how to export data related to these resources.
For example, suppose I want to export all MedicationDispense resources of 2024:
{{fhirurl}}/$export?_type=MedicationDispense&_typeFilter=MedicationDispense?whenhandedover=2024
...how do I select all referenced Medication resources (through MedicationDispense > medicationReference)? The following code gives me all Medication resources, not only the ones referenced by the selected MedicationDispense resources.
{{fhirurl}}/$export?_type=MedicationDispense,Medication&_typeFilter=MedicationDispense?whenhandedover=2024