For a full list of available versions, see the Directory of published versions
The Bulk Load interaction is used to migrate historical immunization records to the IR. This encompasses both Create and Update.
Note: This page is a first draft covering the bulk data migration ("bulk load") pathway for onboarding historical bulk extracts of immunization data, beginning with Panorama and extensible to other source systems (e.g. pharmacies, EMRs).
The Bulk Load interaction is used to migrate immunization records into the IR in volume, via file-based exchange, as distinct from the transactional, per-record Submit Immunization interaction. This pathway is intended for initial data migration from source systems (e.g. Panorama) and may also be used for periodic bulk extracts from other source systems going forward.
A Source System exports its immunization data as one or more NDJSON (newline-delimited JSON) files and uploads them to a designated location (location details will be determined by Ontario Health and communicated to the implementers at onboarding time). Each line of an NDJSON file is a single FHIR Bundle of type document, structured identically to the Bundle used in the Submit Immunization interaction (Composition as the first entry, with Composition.section.entry referencing an Immunization resource, plus the associated Patient, MedicationRequest, PractitionerRole, Practitioner, Organization, and Location resources). This Bundle model constitutes a self-contained immutable point-in-time document.
IR Bulk Load picks up the uploaded NDJSON file(s), reads each line, and ingests it into the IR Repository using a conditional update based on the Bundle's client-assigned (i.e. source system assigned) business identifier to handle both initial creation and subsequent re-submission of corrected records without creating duplicates.
During ingestion, each record is validated against the IR profiles. Records that pass validation are stored, and a Provenance resource is created for every ingested record to capture the origin of the data and its source system. Records that fail validation, along with their associated OperationOutcome resources, are routed to Data Quality Solution (DQS). DQS compiles error reports, and IR Bulk Load team works with the source system to correct the underlying data; the source system then re-extracts the corrected records into a new NDJSON file for re-submission through the same pathway.
Actor: Source System
Role: Extracts immunization data and exports it as NDJSON file(s). Each line is a document Bundle with a stable, client-assigned identifier suitable for conditional update. Uploads file(s) to the designated location, and re-extracts and re-submits corrected records identified by DQS.
Actor: Upload Location
Role: Intermediate storage location on Azure Blob Storage where Source Systems deposit NDJSON files for retrieval by the IR Bulk Load. Mechanism, protocol, and ownership will be determined by Ontario Health and communicated to the implementers at onboarding time.
Actor: IR Bulk Load
Role: Retrieves uploaded NDJSON files, parses each line as a document Bundle, converts it into a transaction Bundle entry using a conditional update keyed on the Bundle's client-assigned identifier, and submits it to the IR Solution. Aggregates per-file processing results and communicates this batch summary along with the error report and rejected records to the Source System to resolve data issues ahead of re-submission.
Actor: IR Solution (Smile CDR)
Role: Validates each submitted record against the IR profiles, performs patient matching, creates or updates the immunization record, creates a Provenance resource for every ingested record, and returns an OperationOutcome with errors and warnings for any record that fails validation or business rules.
Actor: Data Quality Solution (DQS)
Role: Receives rejected records and OperationOutcome resources from the IR Bulk Load, compiles error reports, and forwards these to IR Bulk Load.
type = document, with Bundle.entry[0] having a Composition resource, and Composition.section.entry referencing an Immunization resource (plus all the associated Patient, MedicationRequest, PractitionerRole, Practitioner, Organization, and Location resources) - structurally identical to the Bundle used for the Submit Immunization interaction.
Every Bundle SHALL have a stable, client-assigned identifier that the Source System will not reuse for a different record. This is typically:
For every record successfully created or updated through this pathway, the IR Solution creates a Provenance resource recording:
Provenance.agent.| Profile | Immunization Scenario |
|---|---|
| Bundle (Document) | ✓ |
| Composition | ✓ |
| Immunization (Submission) | ✓ |
| Patient (Submission) | ✓ |
| Practitioner (Submission) | ✓ |
| PractitionerRole (Submission) | ✓ |
| Organization (Submission) | ✓ |
| Location (Submission) | ✓ |
| MedicationRequest (Submission) | ✓ |
| OperationOutcome | ✓ |
Command 'link' could not render: Resource was not found for 'canonical=http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-provenance' |
✓ |
| Extension URL | Element | Description |
|---|---|---|
| BasedON | Immunization.extension |
References to the MedicationRequest profile on which the immunization is based. |
| Is Valid | Immunization.extension |
Indicates if the administration is clinically valid. |
Per-record behavior within a bulk load batch is expected to mirror some of the items defined in the Submit Immunization interaction's Expected Behavior table (same OperationOutcome codes, business-rule codes, and HTTP status semantics per record), since each NDJSON line is processed as an individual conditional-update transaction entry.
| Legend |
|---|
| code = OperationOutcome.issue.code |
| severity = OperationOutcome.issue.severity |
| details.coding.code=OperationOutcome.issue.details.coding.code |
| details.coding.display=OperationOutcome.issue.details.coding.display |
| details.text = OperationOutcome.issue.details.coding.text |
| diagnostics = OperationOutcome.issue.diagnostics |
| HTTP Status | Scenario Description | severity | code | details.coding.code | details.coding.display | details.text/diagnostics |
|---|---|---|---|---|---|---|
| 200 OK | Resource successfully updated | |||||
| 201 Created | Resource successfully created (there might be informational or warning findings) | |||||
| 422 Content validation | Failed IG validation | error | business-rule | FHIR_IG_1000 | Determined by IG $validate operation |
In addition, the following bulk specific considerations apply:
| Scenario | Notes |
|---|---|
| Record successfully created or updated | Immunization Document Bundle is created. Provenance resource is created and associated with the Immunization Document Bundle |
| Record fails validation/business rules | Record is not stored; record + OperationOutcome are routed to DQS; no Provenance is created |
| Duplicate client-assigned identifier within the same file | Immunization Bundle with the duplicate identifier gets routed to DQS as an error |
| File-level failure (e.g. malformed NDJSON, unreadable file) | The whole file is rejected and flagged as an error in DQS |
| Batch summary / reconciliation | Format and delivery of per-file processing summaries (counts of created/updated/warned/rejected records) will be determined by Ontario Health and communicated to the implementers at onboarding time |