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: $toopenehr — Convert FHIR Bundle to openEHR Composition

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

Converts a FHIR Bundle to an openEHR Composition using a FHIRConnect mapping.

The operation accepts a FHIR Bundle as input and returns a FHIR Parameters resource containing the serialized openEHR Composition as a JSON string.

When the mapping is fully successful the response contains only the composition parameter. When mapping issues occur (e.g. a source element could not be mapped, a required field was absent, or a partial result was produced), an additional outcome parameter carrying an OperationOutcome resource SHOULD be included alongside the composition. The presence of an OperationOutcome does not necessarily mean the composition is absent — a partial result MAY be returned together with issues describing what could not be mapped.

Example response with OperationOutcome:

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "composition",
      "valueString": "{\"_type\": \"COMPOSITION\", \"name\": {\"_type\": \"DV_TEXT\", \"value\": \"International Patient Summary\"}, ...}"
    },
    {
      "name": "outcome",
      "resource": {
        "resourceType": "OperationOutcome",
        "issue": [
          {
            "severity": "warning",
            "code": "incomplete",
            "details": {
              "text": "Element Observation.effectivePeriod could not be mapped; no corresponding openEHR archetype path found."
            }
          }
        ]
      }
    }
  ]
}

URL: [base]/$toopenehr

Parameters

UseNameScopeCardinalityTypeBindingDocumentation
INbundle1..1Bundle

The FHIR Bundle containing the resources to be converted to an openEHR Composition.

OUTcomposition1..1string

The resulting openEHR Composition serialized as a JSON string.

OUToutcome0..*OperationOutcome

An OperationOutcome conveying warnings or partial mapping failures.