Canada's interoperability program centers on the PS-CA patient summary, CA Core+ profiles and the CA:FeX exchange specification, all on FHIR R4. What they are and how to integrate from Python.
# -*- coding: utf-8 -*-
# Zato
from zato.server.service import Service
class ReadPatientSummary(Service):
name = 'demo.ca.read-patient-summary'
def handle(self) -> 'None':
# A provincial FHIR R4 endpoint
client = self.fhir['FHIR.Canada']
# PS-CA summaries are Bundle documents
bundles = client.resources('Bundle').search(
type = 'document',
).limit(5)
for bundle in bundles.fetch():
self.logger.info('Summary: %s', bundle['id'])
Canadian interoperability work is coordinated by Canada Health Infoway under the Shared Pan-Canadian Interoperability Roadmap, and three specifications are the most relevant for integration teams. PS-CA is the pan-Canadian Patient Summary - a FHIR R4 document bundle profiling the International Patient Summary for Canada. CA Core+ is the set of pan-Canadian baseline profiles the specifications build on. CA:FeX is the FHIR Exchange specification - the RESTful interaction patterns for submitting and retrieving documents like patient summaries.
Health delivery is provincial, so each province adopts and localizes on its own timeline - Ontario, for example, runs patient summary work aligned with PS-CA through Ontario Health. Integrations therefore target provincial endpoints and conformance programs, with the pan-Canadian specifications as the common shape underneath.
A PS-CA summary is a FHIR document - a Bundle whose first entry is a Composition, with sections pointing at the resources that hold the clinical content.
| Section | FHIR resources |
|---|---|
| Problems | Condition |
| Medications | MedicationStatement, MedicationRequest |
| Allergies and intolerances | AllergyIntolerance |
| Immunizations | Immunization |
| Results | Observation, DiagnosticReport |
| Procedures | Procedure |
Reading a summary is a Bundle read, and unpacking it is iteration over entries - each entry contains a resource, and the resourceType field says which section it belongs to, as covered in searches and bundles.
# -*- coding: utf-8 -*-
# Zato
from zato.server.service import Service
class UnpackSummary(Service):
name = 'demo.ca.unpack-summary'
def handle(self) -> 'None':
client = self.fhir['FHIR.Canada']
# Read the document bundle by its ID ..
bundle = client.get('Bundle', 'ps-ca-example')
# .. group its entries by resource type.
by_type = {}
for entry in bundle['entry']:
resource = entry['resource']
resource_type = resource['resourceType']
by_type.setdefault(resource_type, []).append(resource)
# The Composition is the table of contents
composition = by_type['Composition'][0]
self.logger.info('Summary title: %s', composition['title'])
# The clinical sections
for condition in by_type['Condition']:
code_text = condition['code']['text']
self.logger.info('Problem: %s', code_text)Submitting a summary under CA:FeX is the write direction of the same shapes - the integration layer assembles the Bundle from source systems and delivers it to the provincial endpoint through the same outgoing FHIR connection.
The data a summary aggregates - problems, medications, allergies - originates in hospital and clinic systems that still speak HL7 v2. The bridge is the standard pattern - ADT and ORU feeds arrive over MLLP channels, Python services map segments to FHIR resources per the mapping reference, and the FHIR store the summaries are assembled from stays current.
PS-CA profiles the IPS for Canada - the structure is aligned, with Canadian terminology, identifiers and constraints layered on. Systems conformant with PS-CA are close to IPS by construction.
No - each province runs its own infrastructure and conformance program, with the pan-Canadian specifications defining the common shapes. Integration code stays the same, the connection definitions point at each province's endpoints.
The specification for how documents like patient summaries are exchanged over FHIR REST - the submit, search and retrieve interactions - rather than what is inside them, which PS-CA defines.
No - profile validation belongs to the FHIR servers and provincial conformance tooling. Zato is the integration layer that assembles, transforms and delivers the data.
Get started with Zato and read your first patient summary bundle in minutes.