Mapping composition elements A Composition as it exists in openEHR has no direct equivalent in FHIR. The fields it carries — date, author, status, participations, identifiers — are not a resource of their own; they end up on the target resource instance. These composition-level fields recur for every resource built from a composition. Rather than re-mapping them in each project, they are modelled once as a single reusable composition model mapping (under model/medical/composition) that a project uses as-is, or specialises through an extension when it needs to. Because the same composition archetype maps to different FHIR resources, there is one composition model per target resource, named COMPOSITION.<archetype>.<FhirResource> — e.g. COMPOSITION.report_result.v1.DiagnosticReport and COMPOSITION.report.v1.Condition. A composition is therefore not consumed as a layer of its own: a project includes the one it needs and uses or changes its fields. Example Say we have the following composition model mapping for mappings to the Procedure resource. It maps the composition-level fields composer. grammar: FHIRConnect/v1.0.0 type: model metadata: name: COMPOSITION.report.v1.Procedure version: 0.0.1-alpha spec: system: FHIR version: R4 openEhrConfig: archetype: openEHR-EHR-COMPOSITION.report.v1 fhirConfig: structureDefinition: http://hl7.org/fhir/StructureDefinition/Procedure mappings: - name: composer with: fhir: $resource.recorder openehr: $composition/composer Triggering the composition Composition mappings are extended and used like any other model mapping — through extensions and the context. To run one, the start mapping slots it in via slotArchetype. If the start does not already do this, extend it and add the mapping: grammar: FHIRConnect/v1.0.0 type: extension metadata: name: KDS_procedure.v1 version: 0.0.1-alpha spec: system: FHIR version: R4 extends: ACTION.procedure.v1 mappings: - name: compositionMapping extension: add with: fhir: $resource openehr: $composition slotArchetype: COMPOSITION.report.v1.Procedure This is the single point that triggers the composition mapping — no magic, just model mappings and extensions as everywhere else. Doing it is mandatory since every openEHR representation is contained in a composition, so the start always has to pull one in. Extension methods Context Mappings