This page is part of the FHIR Core Extensions Registry (v1.0.0: Releases) based on FHIR v5.0.0. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions
Structured Documents Work Group | Maturity Level: N/A | Standards Status: Informative | Security Category: N/A | Compartments: N/A |
Following are maps for converting between the equivalent R4B resource and this R5 resource.
/// url = 'http://hl7.org/fhir/StructureMap/Composition5to4' /// name = 'Composition5to4' /// title = 'FML Conversion for Composition: R5 to R4' /// status = 'active' conceptmap "CompositionStatus" { prefix s = "http://hl7.org/fhir/composition-status" prefix t = "http://hl7.org/fhir/4.0/composition-status" s:preliminary - t:preliminary s:final - t:final s:amended - t:amended s:"entered-in-error" - t:"entered-in-error" } uses "http://hl7.org/fhir/StructureDefinition/Composition" alias CompositionR5 as source uses "http://hl7.org/fhir/4.0/StructureDefinition/Composition" alias CompositionR4 as target imports "http://hl7.org/fhir/StructureMap/*5to4" group Composition(source src : CompositionR5, target tgt : CompositionR4) extends DomainResource <<type+>> { src.identifier -> tgt.identifier; // src.url -> tgt.url; src.status as v -> tgt.status = translate(v, '#CompositionStatus', 'code'); // src.version -> tgt.version; src.type -> tgt.type; src.category -> tgt.category; src.subject -> tgt.subject; src.encounter -> tgt.encounter; src.date -> tgt.date; src.author -> tgt.author; // src.useContext -> tgt.useContext; src.title -> tgt.title; // src.name -> tgt.name; src.attester as s -> tgt.attester as t then CompositionAttester(s, t); // src.note -> tgt.note; src.custodian -> tgt.custodian; src.relatesTo as s -> tgt.relatesTo as t then CompositionRelatesTo(s, t); src.event as s -> tgt.event as t then CompositionEvent(s, t); src.section as s -> tgt.section as t then CompositionSection(s, t); } group CompositionAttester(source src, target tgt) extends BackboneElement { src.mode as s -> tgt then { s.coding as sc where s.system = 'http://hl7.org/fhir/composition-attestation-mode' -> tgt then { sc.code -> tgt.mode; }; }; src.time -> tgt.time; src.party -> tgt.party; } group CompositionEvent(source src, target tgt) extends BackboneElement { src.period -> tgt.period; // src.code -> tgt.code; src.detail -> tgt.detail; } group CompositionRelatesTo(source src, target tgt) extends Element { src.type where src.type in ('replaces' | 'transforms' | 'signs' | 'appends') -> tgt.code; src.resourceReference -> tgt.target; } group CompositionSection(source src, target tgt) extends BackboneElement { src.title -> tgt.title; src.code -> tgt.code; src.author -> tgt.author; src.focus -> tgt.focus; src.text -> tgt.text; src.orderedBy -> tgt.orderedBy; // src.mode as v -> tgt.mode = translate(v, '#SectionMode', 'code'); src.entry -> tgt.entry; src.emptyReason -> tgt.emptyReason; }
/// url = 'http://hl7.org/fhir/StructureMap/Composition5to4B' /// name = 'Composition5to4B' /// title = 'FML Conversion for Composition: R5 to R4B' /// status = 'active' conceptmap "CompositionStatus" { prefix s = "http://hl7.org/fhir/composition-status" prefix t = "http://hl7.org/fhir/4.3/composition-status" s:preliminary - t:preliminary s:final - t:final s:amended - t:amended s:"entered-in-error" - t:"entered-in-error" } uses "http://hl7.org/fhir/StructureDefinition/Composition" alias CompositionR5 as source uses "http://hl7.org/fhir/4.3/StructureDefinition/Composition" alias CompositionR4B as target imports "http://hl7.org/fhir/StructureMap/*5to4B" group Composition(source src : CompositionR5, target tgt : CompositionR4B) extends DomainResource <<type+>> { src.identifier -> tgt.identifier; // src.url -> tgt.url; src.status as v -> tgt.status = translate(v, '#CompositionStatus', 'code'); // src.version -> tgt.version; src.type -> tgt.type; src.category -> tgt.category; src.subject -> tgt.subject; src.encounter -> tgt.encounter; src.date -> tgt.date; src.author -> tgt.author; // src.useContext -> tgt.useContext; src.title -> tgt.title; // src.name -> tgt.name; src.attester as s -> tgt.attester as t then CompositionAttester(s, t); // src.note -> tgt.note; src.custodian -> tgt.custodian; src.relatesTo as s -> tgt.relatesTo as t then CompositionRelatesTo(s, t); src.event as s -> tgt.event as t then CompositionEvent(s, t); src.section as s -> tgt.section as t then CompositionSection(s, t); } group CompositionAttester(source src, target tgt) extends BackboneElement { src.mode as s -> tgt then { s.coding as sc where s.system = 'http://hl7.org/fhir/composition-attestation-mode' -> tgt then { sc.code -> tgt.mode; }; }; src.time -> tgt.time; src.party -> tgt.party; } group CompositionEvent(source src, target tgt) extends BackboneElement { src.period -> tgt.period; // src.code -> tgt.code; src.detail -> tgt.detail; } group CompositionRelatesTo(source src, target tgt) extends Element { src.type where src.type in ('replaces' | 'transforms' | 'signs' | 'appends') -> tgt.code; src.resourceReference -> tgt.target; } group CompositionSection(source src, target tgt) extends BackboneElement { src.title -> tgt.title; src.code -> tgt.code; src.author -> tgt.author; src.focus -> tgt.focus; src.text -> tgt.text; src.orderedBy -> tgt.orderedBy; // src.mode as v -> tgt.mode = translate(v, '#SectionMode', 'code'); src.entry -> tgt.entry; src.emptyReason -> tgt.emptyReason; }
/// url = 'http://hl7.org/fhir/StructureMap/Composition4Bto5' /// name = 'Composition4Bto5' /// title = 'FML Conversion for Composition: R4B to R5' /// status = 'active' conceptmap "CompositionStatus" { prefix s = "http://hl7.org/fhir/4.3/composition-status" prefix t = "http://hl7.org/fhir/composition-status" s:preliminary - t:preliminary s:final - t:final s:amended - t:amended s:"entered-in-error" - t:"entered-in-error" } uses "http://hl7.org/fhir/4.3/StructureDefinition/Composition" alias CompositionR4B as source uses "http://hl7.org/fhir/StructureDefinition/Composition" alias CompositionR5 as target imports "http://hl7.org/fhir/StructureMap/*4Bto5" group Composition(source src : CompositionR4B, target tgt : CompositionR5) extends DomainResource <<type+>> { src.identifier -> tgt.identifier; // src.url -> tgt.url; src.status as v -> tgt.status = translate(v, '#CompositionStatus', 'code'); // src.version -> tgt.version; src.type -> tgt.type; src.category -> tgt.category; src.subject -> tgt.subject; src.encounter -> tgt.encounter; src.date -> tgt.date; src.author -> tgt.author; // src.useContext -> tgt.useContext; src.title -> tgt.title; // src.name -> tgt.name; src.attester as s -> tgt.attester as t then CompositionAttester(s, t); // src.note -> tgt.note; src.custodian -> tgt.custodian; src.relatesTo as s -> tgt.relatesTo as t then CompositionRelatesTo(s, t); src.event as s -> tgt.event as t then CompositionEvent(s, t); src.section as s -> tgt.section as t then CompositionSection(s, t); } group CompositionAttester(source src, target tgt) extends BackboneElement { src.mode as s -> tgt.mode = create('CodeableConcept') as t, t.coding = create('Coding') as tc, tc.system = 'http://hl7.org/fhir/composition-attestation-mode', tc.code = s; src.time -> tgt.time; src.party -> tgt.party; } group CompositionRelatesTo(source src, target tgt) extends Element { src.code -> tgt.type; src.target : Identifier as s -> tgt.resourceReference as t, t.identifier = s; src.target : Reference -> tgt.resourceReference; } group CompositionEvent(source src, target tgt) extends BackboneElement { src.period -> tgt.period; // src.code -> tgt.code; src.detail -> tgt.detail; } group CompositionSection(source src, target tgt) extends BackboneElement { src.title -> tgt.title; src.code -> tgt.code; src.author -> tgt.author; src.focus -> tgt.focus; src.text -> tgt.text; src.orderedBy -> tgt.orderedBy; // src.mode as v -> tgt.mode = translate(v, '#SectionMode', 'code'); src.entry -> tgt.entry; src.emptyReason -> tgt.emptyReason; }
/// url = 'http://hl7.org/fhir/StructureMap/Composition4to5' /// name = 'Composition4to5' /// title = 'FML Conversion for Composition: R4 to R5' /// status = 'active' conceptmap "CompositionStatus" { prefix s = "http://hl7.org/fhir/4.0/composition-status" prefix t = "http://hl7.org/fhir/composition-status" s:preliminary - t:preliminary s:final - t:final s:amended - t:amended s:"entered-in-error" - t:"entered-in-error" } uses "http://hl7.org/fhir/4.0/StructureDefinition/Composition" alias CompositionR4 as source uses "http://hl7.org/fhir/StructureDefinition/Composition" alias CompositionR5 as target imports "http://hl7.org/fhir/StructureMap/*4to5" group Composition(source src : CompositionR4, target tgt : CompositionR5) extends DomainResource <<type+>> { src.identifier -> tgt.identifier; // src.url -> tgt.url; src.status as v -> tgt.status = translate(v, '#CompositionStatus', 'code'); // src.version -> tgt.version; src.type -> tgt.type; src.category -> tgt.category; src.subject -> tgt.subject; src.encounter -> tgt.encounter; src.date -> tgt.date; src.author -> tgt.author; // src.useContext -> tgt.useContext; src.title -> tgt.title; // src.name -> tgt.name; src.attester as s -> tgt.attester as t then CompositionAttester(s, t); // src.note -> tgt.note; src.custodian -> tgt.custodian; src.relatesTo as s -> tgt.relatesTo as t then CompositionRelatesTo(s, t); src.event as s -> tgt.event as t then CompositionEvent(s, t); src.section as s -> tgt.section as t then CompositionSection(s, t); } group CompositionAttester(source src, target tgt) extends BackboneElement { src.mode as s -> tgt.mode = create('CodeableConcept') as t, t.coding = create('Coding') as tc, tc.system = 'http://hl7.org/fhir/composition-attestation-mode', tc.code = s; src.time -> tgt.time; src.party -> tgt.party; } group CompositionRelatesTo(source src, target tgt) extends Element { src.code -> tgt.type; src.target : Identifier as s -> tgt.resourceReference as t, t.identifier = s; src.target : Reference -> tgt.resourceReference; } group CompositionEvent(source src, target tgt) extends BackboneElement { src.period -> tgt.period; // src.code -> tgt.code; src.detail -> tgt.detail; } group CompositionSection(source src, target tgt) extends BackboneElement { src.title -> tgt.title; src.code -> tgt.code; src.author -> tgt.author; src.focus -> tgt.focus; src.text -> tgt.text; src.orderedBy -> tgt.orderedBy; // src.mode as v -> tgt.mode = translate(v, '#SectionMode', 'code'); src.entry -> tgt.entry; src.emptyReason -> tgt.emptyReason; }