R4 Ballot #2 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.5.0: R4 Ballot #2). 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

Structured Documents Work GroupMaturity Level: N/ABallot Status: Informative Compartments: Device, Encounter, Patient, Practitioner, RelatedPerson

R3 : R4 Conversion maps for Composition.

Functional status for this map: 1 test that all execute ok. 1 fail round-trip testing and 1 r3 resources are invalid (0 errors). (see documentation)

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


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

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



group Composition extends DomainResource
  input src : CompositionR3 as source
  input tgt : Composition as target

  "Composition.identifier" : for src.identifier as vs make tgt.identifier as vt
  "Composition.status" : for src.status as vs make tgt.status as vt
  "Composition.type" : for src.type as vs make tgt.type as vt
  "Composition.class" : for src.class as vs make tgt.class as vt
  "Composition.subject" : for src.subject as vs make tgt.subject as vt
  "Composition.encounter" : for src.encounter as vs make tgt.encounter as vt
  "Composition.date" : for src.date as vs make tgt.date as vt
  "Composition.author" : for src.author as vs make tgt.author as vt
  "Composition.title" : for src.title as vs make tgt.title as vt
  "Composition.confidentiality" : for src.confidentiality as vs make tgt.confidentiality as vt
  "Composition.attester" : for src.attester as vs0 make tgt.attester as vt0 then {
    "Composition.attester.time" : for vs0.time as vs make vt0.time as vt
    "Composition.attester.party" : for vs0.party as vs make vt0.party as vt
  }
  "Composition.custodian" : for src.custodian as vs make tgt.custodian as vt
  "Composition.relatesTo" : for src.relatesTo as vs0 make tgt.relatesTo as vt0 then {
    "Composition.relatesTo.code" : for vs0.code as vs make vt0.code as vt
    "Composition.relatesTo.target-Identifier" : for vs0.target  : Identifier as vs make vt0.target = create("Identifier") as vt then Identifier(vs,vt)
    "Composition.relatesTo.target-Reference" : for vs0.target  : Reference as vs make vt0.target = create("Reference") as vt then Reference(vs,vt)
  }
  "Composition.event" : for src.event as vs0 make tgt.event as vt0 then {
    "Composition.event.code" : for vs0.code as vs make vt0.code as vt
    "Composition.event.period" : for vs0.period as vs make vt0.period as vt
    "Composition.event.detail" : for vs0.detail as vs make vt0.detail as vt
  }
endgroup


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


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

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



group Composition extends DomainResource
  input src : Composition as source
  input tgt : CompositionR3 as target

  "Composition.identifier" : for src.identifier as vs make tgt.identifier as vt
  "Composition.status" : for src.status as vs make tgt.status as vt
  "Composition.type" : for src.type as vs make tgt.type as vt
  "Composition.class" : for src.class as vs make tgt.class as vt
  "Composition.subject" : for src.subject as vs make tgt.subject as vt
  "Composition.encounter" : for src.encounter as vs make tgt.encounter as vt
  "Composition.date" : for src.date as vs make tgt.date as vt
  "Composition.author" : for src.author as vs make tgt.author as vt
  "Composition.title" : for src.title as vs make tgt.title as vt
  "Composition.confidentiality" : for src.confidentiality as vs make tgt.confidentiality as vt
  "Composition.attester" : for src.attester as vs0 make tgt.attester as vt0 then {
    "Composition.attester.mode" : for vs0.mode as vs make vt0.mode as vt
    "Composition.attester.time" : for vs0.time as vs make vt0.time as vt
    "Composition.attester.party" : for vs0.party as vs make vt0.party as vt
  }
  "Composition.custodian" : for src.custodian as vs make tgt.custodian as vt
  "Composition.relatesTo" : for src.relatesTo as vs0 make tgt.relatesTo as vt0 then {
    "Composition.relatesTo.code" : for vs0.code as vs make vt0.code as vt
    "Composition.relatesTo.target-Identifier" : for vs0.target  : Identifier as vs make vt0.target = create("Identifier") as vt then Identifier(vs,vt)
    "Composition.relatesTo.target-Reference" : for vs0.target  : Reference as vs make vt0.target = create("Reference") as vt then Reference(vs,vt)
  }
  "Composition.event" : for src.event as vs0 make tgt.event as vt0 then {
    "Composition.event.code" : for vs0.code as vs make vt0.code as vt
    "Composition.event.period" : for vs0.period as vs make vt0.period as vt
    "Composition.event.detail" : for vs0.detail as vs make vt0.detail as vt
  }
endgroup