This page is part of the FHIR Specification (v0.01: Historical Archive Draft). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

Message

A message that contains FHIR resources.

The relative url is /messages

Content

UML Image

<Message xmlns="http://www.hl7.org/fhir">
  <id> mand id Master Resource Id = Message Id</id>
  <threadId> opt id Id of thread of conversation</threadId>
  <instant> mand instant Instant the message was sent</instant>
  <event> mand code Code for the event his message represents</event>
  <response> opt  <!-- If this is a response -->
   <id> mand id Id of original message</id>
   <code> mand code Type of response to the message</code>
   <duplicate> mand boolean if this is not the first response</duplicate>
  </response>
  <source> mand (Device) Message Source Application</source>
  <destination> mand (Device) Message Destination Application</destination>
  <enterer> opt (Person|Device) The source of the data entry</enterer>
  <author> opt (Person|Device) The source of the decision</author>
  <responsible> opt (Person|Organization) final responsibility for event</responsible>
  <effective> opt Interval(dateTime) time of effect</effective>
  <reason> opt CodeableConcept Cause of event</reason>
  <data> cond (Any) The actual content of the message</data>
  <extensions> opt See Extensions   See Extensions </extensions>
  <text> mand Narrative Text summary of message, for human interpretation</text>
</Message>

Schema for Message and an example (or formatted for browser)

Terminology Bindings

Notes:

Formal Definitions

The formal definitions for the elements above. Also available as an XML file.

Message
DefinitionA message that contains FHIR resources
ControlMandatory, 1..1
RequirementsMany implementations are not prepared to use REST, and need a message based infrastructure
Message.id
DefinitionUnique Id for this message
ControlMandatory, 1..1
Typeid
Must Understandtrue
RequirementsEach message needs a unique identifier so other messages and underlying infrastructure can reference it
Commentsmust be unique within a channel, but should be globally unique. UUIDs are recommended
Message.threadId
DefinitionId of the thread - a series of messages that pertain to the same logical sequence, and are all identified by the same thread identifier
ControlOptional, 0..1
Typeid
Message.instant
DefinitionInstant the message was sent
ControlMandatory, 1..1
Typeinstant
Must Understandtrue
Message.event
DefinitionCode that identifies the event this message represents, and connects it with the event definition in the FHIR specification
ControlMandatory, 1..1
Typecode from MessageEvent
Must Understandtrue
Message.response
DefinitionInformation about the the message that this message is a response to - if it is a response
ControlOptional, 0..1
Must Understandtrue
Message.response.id
DefinitionThe id of the message that this a response to
ControlMandatory, 1..1
Typeid
Must Understandtrue
Commentsthis message must have the same threadId as the original message (including missing if the original message threadId was missing)
Message.response.code
DefinitionCode that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not
ControlMandatory, 1..1
Typecode from ResponseCode
Must Understandtrue
CommentsThis is a generic response to the request message. Specific data for the response will be found in Message.data
Message.response.duplicate
DefinitionTrue if this is not the first response, because the request message has been received more than once
ControlMandatory, 1..1
Typeboolean
Must Understandtrue
CommentsThe request shouldn't be received more than once if reliable message delivery applies, but mostly it doesn't
Message.source
DefinitionThe source application from which this message originated
ControlMandatory, 1..1
TypeResource(Device)
Message.destination
DefinitionThe destination application which the message is intended for
ControlMandatory, 1..1
TypeResource(Device)
Message.enterer
DefinitionThe person or device that performd the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions
ControlOptional, 0..1
TypeResource(Person|Device)
RequirementsNeed to know for audit/traceback requirements
CommentsUsually only for the request, but can be used in a response
Message.author
DefinitionThe logical author of the message - the person or device that decided it should happen. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions
ControlOptional, 0..1
TypeResource(Person|Device)
RequirementsNeed to know for audit/traceback requirements
CommentsUsually only for the request, but can be used in a response
Message.responsible
DefinitionThe person or organization that accepts overall responsbility for the contents of the message. The implication is that the message event happened under the policies of the responsible party
ControlOptional, 0..1
TypeResource(Person|Organization)
RequirementsNeed to know for audit/traceback requirements
CommentsUsually only for the request, but can be used in a response
Message.effective
DefinitionThe effective time - the real world time of the even that the message represents. Usually this is just a starting time, but some message events also have an end time (do x for period y)
ControlOptional, 0..1
TypeInterval(dateTime)
RequirementsNeed to know for understanding the content of the message
CommentsUsually only for the request, but can be used in a response
To DoGrahame thinks this is not 80/20. Also, that it reall should be domain modeled, not tucked away here
Message.reason
DefinitionThe cause of the event - a reason for why this message is being sent
ControlOptional, 0..1
TypeCodeableConcept from EventReason
RequirementsNeed to be able to track why resources are being changed and report in the audit log / history of the resource
RIM MappingControlAct.reasonCode
Message.data
DefinitionThe actual data of the message - a reference to the focus class of the message.
ControlConditional, 0..1: Mandatory unless the message is a response, in which case the element is optional
TypeResource(Any)
Must Understandtrue
RequirementsEvery message event is about actual data, a single resource, that is identified in the definition of the event, and perhaps some or all linked resources
CommentsThe data is defined where the transaction type is defined. The transaction data is always aggregated with the transaction resource
Message.extensions
DefinitionSee Extensions
ControlOptional, 0..1
Message.text
Definition
ControlMandatory, 1..1
TypeNarrative

This is an old version of FHIR retained for archive purposes. Do not use for anything else
Implementers are welcome to experiment with the content defined here, but should note that the contents are subject to change without prior notice.
© HL7.org 2011 - 2012. FHIR v0.01 generated on Mon, May 14, 2012 09:48+1000.