FHIRConnect RESTful Implementation Guide
0.1.0 - ci-build

FHIRConnect RESTful Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

OperationDefinition: $tofhir — Convert openEHR Composition to FHIR

Official URL: http://fhirconnect.org/fhir/OperationDefinition/ToFhir Version: 0.1.0
Draft as of 2026-05-27 Computable Name: ToFhir

Converts an openEHR Composition to one or more FHIR resources using a FHIRConnect mapping.

The operation accepts a FHIR Parameters resource containing the serialized openEHR Composition and optional context fields (patient reference, EHR ID, provenance policy). It returns a FHIR Bundle containing the mapped resources. The Bundle type is implementation-dependent (collection, searchset, or document) and is not fixed by this specification.

An OperationOutcome MAY be included in the returned Bundle to convey warnings or partial failures.

URL: [base]/$tofhir

Parameters

UseNameScopeCardinalityTypeBindingDocumentation
INcomposition1..1string

The openEHR Composition serialized as a JSON string. Passed as valueString rather than resource to maintain FHIR SDK compatibility.

INehr_id0..1string

The openEHR EHR identifier associated with the Composition.

INpatient0..1Reference (Patient)

Reference to the FHIR Patient resource that is the subject of the Composition. Used to populate subject/patient references in mapped resources.

INprovenance0..1

Provenance policy information. The engine resolves remaining provenance data; only the policy is required from the caller.

INprovenance.policy0..*uri

URI identifying the provenance policy.

OUTreturn1..1Bundle

A Bundle containing the FHIR resources produced by the mapping. The Bundle type (collection, searchset, or document) is context-dependent. An OperationOutcome MAY be included as an entry to convey warnings or partial mapping failures.