R4 Draft for Comment

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

Infrastructure And Messaging Work GroupMaturity Level: N/ABallot Status: Informative Compartments: Device, Practitioner

R2 : R3 Conversion maps for MessageHeader.

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/MessageHeader2to3" = "R2 to R3 Conversions for MessageHeader"

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/MessageHeader" alias MessageHeaderR2 as source
uses "http://hl7.org/fhir/StructureDefinition/MessageHeader" alias MessageHeader as target

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

group for type+types  MessageHeader extends DomainResource
  input src : MessageHeaderR2 as source
  input tgt : MessageHeader as target

  "MessageHeader-timestamp" : for src.timestamp make tgt.timestamp
  "MessageHeader-event" : for src.event make tgt.event
  "MessageHeader-response" : for src.response as vs0 make tgt.response as vt0 then mshResponse(vs0, vt0)
  "MessageHeader-source" : for src.source as vs0 make tgt.source as vt0 then mshSource(vs0, vt0)
  "MessageHeader-destination" : for src.destination as vs0 make tgt.destination as vt0 then mshDestination(vs0, vt0)

  "MessageHeader-enterer" : for src.enterer make tgt.enterer
  "MessageHeader-author" : for src.author make tgt.author
  "MessageHeader-receiver" : for src.receiver make tgt.receiver
  "MessageHeader-responsible" : for src.responsible make tgt.responsible
  "MessageHeader-reason" : for src.reason make tgt.reason
  "MessageHeader-data" : for src.data make tgt.focus

endgroup

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

  "MessageHeader.response-identifier" : for src.identifier make tgt.identifier
  "MessageHeader.response-code" : for src.code make tgt.code
  "MessageHeader.response-details" : for src.details make tgt.details
endgroup

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

  "MessageHeader.source-name" : for src.name make tgt.name
  "MessageHeader.source-software" : for src.software make tgt.software
  "MessageHeader.source-version" : for src.version make tgt.version
  "MessageHeader.source-contact" : for src.contact make tgt.contact
  "MessageHeader.source-endpoint" : for src.endpoint make tgt.endpoint
endgroup

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

  "MessageHeader.source-name" : for src.name make tgt.name
  "MessageHeader.source-target" : for src.target make tgt.target
  "MessageHeader.source-endpoint" : for src.endpoint make tgt.endpoint
endgroup

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

uses "http://hl7.org/fhir/StructureDefinition/MessageHeader" alias MessageHeader as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/MessageHeader" alias MessageHeaderR2 as target

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

group for type+types  MessageHeader extends DomainResource
  input src : MessageHeader as source
  input tgt : MessageHeaderR2 as target

  "MessageHeader-timestamp" : for src.timestamp make tgt.timestamp
  "MessageHeader-event" : for src.event make tgt.event
  "MessageHeader-response" : for src.response as vs0 make tgt.response as vt0 then mshResponse(vs0, vt0)
  "MessageHeader-source" : for src.source as vs0 make tgt.source as vt0 then mshSource(vs0, vt0)
  "MessageHeader-destination" : for src.destination as vs0 make tgt.destination as vt0 then mshDestination(vs0, vt0)

  "MessageHeader-enterer" : for src.enterer make tgt.enterer
  "MessageHeader-author" : for src.author make tgt.author
  "MessageHeader-receiver" : for src.receiver make tgt.receiver
  "MessageHeader-responsible" : for src.responsible make tgt.responsible
  "MessageHeader-reason" : for src.reason make tgt.reason
  "MessageHeader-data" : for src.focus make tgt.data

endgroup

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

  "MessageHeader.response-identifier" : for src.identifier make tgt.identifier
  "MessageHeader.response-code" : for src.code make tgt.code
  "MessageHeader.response-details" : for src.details make tgt.details
endgroup

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

  "MessageHeader.source-name" : for src.name make tgt.name
  "MessageHeader.source-software" : for src.software make tgt.software
  "MessageHeader.source-version" : for src.version make tgt.version
  "MessageHeader.source-contact" : for src.contact make tgt.contact
  "MessageHeader.source-endpoint" : for src.endpoint make tgt.endpoint
endgroup

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

  "MessageHeader.source-name" : for src.name make tgt.name
  "MessageHeader.source-target" : for src.target make tgt.target
  "MessageHeader.source-endpoint" : for src.endpoint make tgt.endpoint
endgroup