Overview
Bulk Medication History is the FHIR representation of the medication fill and prescription history returned for a population of patients. It is produced after a customer submits a patient population using one of the Medication History request APIs (patient panel load or bulk file load). ThecorrelationId returned from that original
request ties the resulting FHIR data back to the request that produced it.
Unlike the Patient Everything and Patient Summary
outputs, this data is not wrapped in a single
Bundle resource. Instead, following the HL7
Bulk Data Access approach, resources are grouped by resource type and
written out as newline-delimited JSON (NDJSON) files — one resource per line, one file per resource type (for
example, all MedicationRequest resources for the whole population are written to a single file).
Delivery
Bulk Medication History files are pushed to customer cloud storage using the same mechanisms described in Delivery (S3, Azure, and soon Google Cloud Storage). Webhook notification of delivery completion is planned for this output but is not yet available — today, delivery is push-only with no accompanying webhook event.Resources Included
The
Patient resource is built from the patient demographic information submitted in the original Medication
History request, not from the medication history returned by the responding system. Its demographics reflect what
was requested, not what the responding system has on file for the patient. See the
Patient resource page for the fields populated.OperationOutcome usage
OperationOutcome appears in two distinct situations in this output, rather than representing a single consistent
concept:
- Incomplete medication record — if a medication record from the source system is missing its history source
qualifier, it does not contain enough information to build the resources above. An
OperationOutcomewith severityinformationis emitted in its place instead of any medication resources for that record. - Patient-level error — if the original patient population request encountered an error while trying to locate
or process a specific patient, that error is surfaced as a separate
OperationOutcome, unrelated to any specific medication.

