FHIR Release 3 (STU) 4

This page is part of the FHIR Specification (v3.0.2: (v4.0.1: R4 - Mixed Normative and STU 3). ) in it's permanent home (it will always be available at this URL). The current version which supercedes this version is 5.0.0 . For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R4 R3

Structured Documents Work Group Maturity Level : N/A Ballot Standards Status : Informative Security Category : Not Classified Compartments : Device , Encounter , Patient , Practitioner , RelatedPerson

R2 : R3 Converson : R4 Conversion maps for Composition.

Functional status for this map: 1 test that all execute ok. All tests pass round-trip testing and all r3 resources are valid. ( see documentation)

map "http://hl7.org/fhir/StructureMap/Composition2to3" = "R2 to R3 Conversions for Composition"

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Composition" alias CompositionR2 as source
uses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as target

imports "http://hl7.org/fhir/StructureMap/*2to3"

map "http://hl7.org/fhir/StructureMap/Composition3to4" = "R3 to R4 Conversions for Composition"


group for type+types  Composition extends DomainResource
  input src : CompositionR2 as source
  input tgt : Composition as target

uses "http://hl7.org/fhir/3.0/StructureDefinition/Composition" alias CompositionR3 as source
uses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as target


  "Composition-identifier" : for src.identifier make tgt.identifier
  "Composition-date" : for src.date make tgt.date
  "Composition-type" : for src.type make tgt.type
  "Composition-class" : for src.class make tgt.class
  "Composition-title" : for src.title make tgt.title
  "Composition-status" : for src.status make tgt.status
  "Composition-confidentiality" : for src.confidentiality make tgt.confidentiality
  "Composition-subject" : for src.subject make tgt.subject
  "Composition-author" : for src.author make tgt.author
  "Composition-attester" : for src.attester as vs0 make tgt.attester as vt0 then cmpAttester(vs0, vt0)
  "Composition-custodian" : for src.custodian make tgt.custodian
  "Composition-event" : for src.event as vs0 make tgt.event as vt0 then cmpEvent(vs0, vt0)
  "Composition-section" : for src.section as vs0 make tgt.section as vt0 then cmpSection(vs0, vt0)
  "Composition-encounter" : for src.encounter make tgt.encounter
endgroup

imports "http://hl7.org/fhir/StructureMap/*3to4"


group cmpAttester extends BackboneElement
  input src as source
  input tgt as target

group Composition(source src : CompositionR3, target tgt : Composition) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status -> tgt.status;
  src.type -> tgt.type;
  src.class -> tgt.category;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter;
  src.date -> tgt.date;
  src.author -> tgt.author;
  src.title -> tgt.title;
  src.confidentiality -> tgt.confidentiality;
  src.attester as vs0 -> tgt.attester as vt0 then attester(vs0, vt0);
  src.custodian -> tgt.custodian;
  src.relatesTo as vs0 -> tgt.relatesTo as vt0 then relatesTo(vs0, vt0);
  src.event as vs0 -> tgt.event as vt0 then event(vs0, vt0);
  src.section as vs0 -> tgt.section as vt0 then section(vs0, vt0);
}


  "Composition.attester-mode" : for src.mode make tgt.mode
  "Composition.attester-time" : for src.time make tgt.time
  "Composition.attester-party" : for src.party make tgt.party
endgroup

group attester(source src, target tgt) extends BackboneElement {
  src.mode -> tgt.mode;
  src.time -> tgt.time;
  src.party -> tgt.party;
}


group cmpEvent extends BackboneElement
  input src as source
  input tgt as target

group relatesTo(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.target : Identifier as vs -> tgt.target = create('Identifier') as vt then Identifier(vs, vt);
  src.target : Reference as vs -> tgt.target = create('Reference') as vt then Reference(vs, vt);
}


  "Composition.event-code" : for src.code make tgt.code
  "Composition.event-period" : for src.period make tgt.period
  "Composition.event-detail" : for src.detail make tgt.detail
endgroup

group event(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.period -> tgt.period;
  src.detail -> tgt.detail;
}


group cmpSection extends BackboneElement
  input src as source
  input tgt as target

group section(source src, target tgt) extends BackboneElement {
  src.title -> tgt.title;
  src.code -> tgt.code;
  src.text -> tgt.text;
  src.mode -> tgt.mode;
  src.orderedBy -> tgt.orderedBy;
  src.entry -> tgt.entry;
  src.emptyReason -> tgt.emptyReason;
  src.section as vs0 -> tgt.section as vt0 then section(vs0, vt0);
}


  "Composition.section-title" : for src.title make tgt.title
  "Composition.section-code" : for src.code make tgt.code
  "Composition.section-text" : for src.text make tgt.text
  "Composition.section-mode" : for src.mode make tgt.mode
  "Composition.section-orderedBy" : for src.orderedBy make tgt.orderedBy
  "Composition.section-entry" : for src.entry make tgt.entry
  "Composition.section-emptyReason" : for src.emptyReason make tgt.emptyReason
  "Composition.section-section" : for src.section as vs0 make tgt.section as vt0 then cmpSection(vs0, vt0)
endgroup


map "http://hl7.org/fhir/StructureMap/Composition3to2" = "R3 to R2 Conversion for Composition"

uses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Composition" alias CompositionR2 as target

imports "http://hl7.org/fhir/StructureMap/*3to2"

map "http://hl7.org/fhir/StructureMap/Composition4to3" = "R4 to R3 Conversion for Composition"


group for type+types  Composition extends DomainResource
  input src : Composition as source
  input tgt : CompositionR2 as target

uses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/Composition" alias CompositionR3 as target


  "Composition-identifier" : for src.identifier make tgt.identifier
  "Composition-date" : for src.date make tgt.date
  "Composition-type" : for src.type make tgt.type
  "Composition-class" : for src.class make tgt.class
  "Composition-title" : for src.title make tgt.title
  "Composition-status" : for src.status make tgt.status
  "Composition-confidentiality" : for src.confidentiality make tgt.confidentiality
  "Composition-subject" : for src.subject make tgt.subject
  "Composition-author" : for src.author make tgt.author
  "Composition-attester" : for src.attester as vs0 make tgt.attester as vt0 then cmpAttester(vs0, vt0)
  "Composition-custodian" : for src.custodian make tgt.custodian
  "Composition-event" : for src.event as vs0 make tgt.event as vt0 then cmpEvent(vs0, vt0)
  "Composition-section" : for src.section as vs0 make tgt.section as vt0 then cmpSection(vs0, vt0)
  "Composition-encounter" : for src.encounter make tgt.encounter
endgroup

imports "http://hl7.org/fhir/StructureMap/*4to3"


group cmpAttester extends BackboneElement
  input src as source
  input tgt as target

group Composition(source src : Composition, target tgt : CompositionR3) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status -> tgt.status;
  src.type -> tgt.type;
  src.category -> tgt.class;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter;
  src.date -> tgt.date;
  src.author -> tgt.author;
  src.title -> tgt.title;
  src.confidentiality -> tgt.confidentiality;
  src.attester as vs0 -> tgt.attester as vt0 then attester(vs0, vt0);
  src.custodian -> tgt.custodian;
  src.relatesTo as vs0 -> tgt.relatesTo as vt0 then relatesTo(vs0, vt0);
  src.event as vs0 -> tgt.event as vt0 then event(vs0, vt0);
  src.section as vs0 -> tgt.section as vt0 then section(vs0, vt0);
}


  "Composition.attester-mode" : for src.mode make tgt.mode
  "Composition.attester-time" : for src.time make tgt.time
  "Composition.attester-party" : for src.party make tgt.party
endgroup

group attester(source src, target tgt) extends BackboneElement {
  src.mode -> tgt.mode;
  src.time -> tgt.time;
  src.party -> tgt.party;
}


group cmpEvent extends BackboneElement
  input src as source
  input tgt as target

group relatesTo(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.target : Identifier as vs -> tgt.target = create('Identifier') as vt then Identifier(vs, vt);
  src.target : Reference as vs -> tgt.target = create('Reference') as vt then Reference(vs, vt);
}


  "Composition.event-code" : for src.code make tgt.code
  "Composition.event-period" : for src.period make tgt.period
  "Composition.event-detail" : for src.detail make tgt.detail
endgroup

group event(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.period -> tgt.period;
  src.detail -> tgt.detail;
}


group cmpSection extends BackboneElement
  input src as source
  input tgt as target

group section(source src, target tgt) extends BackboneElement {
  src.title -> tgt.title;
  src.code -> tgt.code;
  src.text -> tgt.text;
  src.mode -> tgt.mode;
  src.orderedBy -> tgt.orderedBy;
  src.entry -> tgt.entry;
  src.emptyReason -> tgt.emptyReason;
  src.section as vs0 -> tgt.section as vt0 then section(vs0, vt0);
}


  "Composition.section-title" : for src.title make tgt.title
  "Composition.section-code" : for src.code make tgt.code
  "Composition.section-text" : for src.text make tgt.text
  "Composition.section-mode" : for src.mode make tgt.mode
  "Composition.section-orderedBy" : for src.orderedBy make tgt.orderedBy
  "Composition.section-entry" : for src.entry make tgt.entry
  "Composition.section-emptyReason" :   for src.emptyReason make tgt.emptyReason
  "Composition.section-section" : for src.section as vs0 make tgt.section as vt0 then cmpSection(vs0, vt0)
endgroup


<p>No validation errors - all conversions are clean</p>