Class MessageHeader

java.lang.Object
ca.uhn.fhir.model.api.BaseElement
ca.uhn.fhir.model.dstu2.resource.BaseResource
ca.uhn.fhir.model.dstu2.resource.MessageHeader
All Implemented Interfaces:
ca.uhn.fhir.model.api.ICompositeElement, ca.uhn.fhir.model.api.IElement, ca.uhn.fhir.model.api.IResource, ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseResource

public class MessageHeader
extends BaseResource
implements ca.uhn.fhir.model.api.IResource
HAPI/FHIR MessageHeader Resource (infrastructure.exchange)

Definition: The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.

Requirements: Many implementations are not prepared to use REST and need a messaging based infrastructure

Profile Definition: http://hl7.org/fhir/profiles/MessageHeader

See Also:
Serialized Form
  • Field Details

    • SP_TIMESTAMP

      public static final String SP_TIMESTAMP
      Search parameter constant for timestamp

      Description:
      Type: date
      Path: MessageHeader.timestamp

      See Also:
      Constant Field Values
    • TIMESTAMP

      public static final ca.uhn.fhir.rest.gclient.DateClientParam TIMESTAMP
      Fluent Client search parameter constant for timestamp

      Description:
      Type: date
      Path: MessageHeader.timestamp

    • SP_EVENT

      public static final String SP_EVENT
      Search parameter constant for event

      Description:
      Type: token
      Path: MessageHeader.event

      See Also:
      Constant Field Values
    • EVENT

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam EVENT
      Fluent Client search parameter constant for event

      Description:
      Type: token
      Path: MessageHeader.event

    • SP_RESPONSE_ID

      public static final String SP_RESPONSE_ID
      Search parameter constant for response-id

      Description:
      Type: token
      Path: MessageHeader.response.identifier

      See Also:
      Constant Field Values
    • RESPONSE_ID

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESPONSE_ID
      Fluent Client search parameter constant for response-id

      Description:
      Type: token
      Path: MessageHeader.response.identifier

    • SP_CODE

      public static final String SP_CODE
      Search parameter constant for code

      Description:
      Type: token
      Path: MessageHeader.response.code

      See Also:
      Constant Field Values
    • CODE

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE
      Fluent Client search parameter constant for code

      Description:
      Type: token
      Path: MessageHeader.response.code

    • SP_SOURCE

      public static final String SP_SOURCE
      Search parameter constant for source

      Description:
      Type: string
      Path: MessageHeader.source.name

      See Also:
      Constant Field Values
    • SOURCE

      public static final ca.uhn.fhir.rest.gclient.StringClientParam SOURCE
      Fluent Client search parameter constant for source

      Description:
      Type: string
      Path: MessageHeader.source.name

    • SP_SOURCE_URI

      public static final String SP_SOURCE_URI
      Search parameter constant for source-uri

      Description:
      Type: uri
      Path: MessageHeader.source.endpoint

      See Also:
      Constant Field Values
    • SOURCE_URI

      public static final ca.uhn.fhir.rest.gclient.UriClientParam SOURCE_URI
      Fluent Client search parameter constant for source-uri

      Description:
      Type: uri
      Path: MessageHeader.source.endpoint

    • SP_DESTINATION

      public static final String SP_DESTINATION
      Search parameter constant for destination

      Description:
      Type: string
      Path: MessageHeader.destination.name

      See Also:
      Constant Field Values
    • DESTINATION

      public static final ca.uhn.fhir.rest.gclient.StringClientParam DESTINATION
      Fluent Client search parameter constant for destination

      Description:
      Type: string
      Path: MessageHeader.destination.name

    • SP_DESTINATION_URI

      public static final String SP_DESTINATION_URI
      Search parameter constant for destination-uri

      Description:
      Type: uri
      Path: MessageHeader.destination.endpoint

      See Also:
      Constant Field Values
    • DESTINATION_URI

      public static final ca.uhn.fhir.rest.gclient.UriClientParam DESTINATION_URI
      Fluent Client search parameter constant for destination-uri

      Description:
      Type: uri
      Path: MessageHeader.destination.endpoint

    • SP_DATA

      public static final String SP_DATA
      Search parameter constant for data

      Description:
      Type: reference
      Path: MessageHeader.data

      See Also:
      Constant Field Values
    • DATA

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DATA
      Fluent Client search parameter constant for data

      Description:
      Type: reference
      Path: MessageHeader.data

    • SP_RECEIVER

      public static final String SP_RECEIVER
      Search parameter constant for receiver

      Description:
      Type: reference
      Path: MessageHeader.receiver

      See Also:
      Constant Field Values
    • RECEIVER

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECEIVER
      Fluent Client search parameter constant for receiver

      Description:
      Type: reference
      Path: MessageHeader.receiver

    • SP_AUTHOR

      public static final String SP_AUTHOR
      Search parameter constant for author

      Description:
      Type: reference
      Path: MessageHeader.author

      See Also:
      Constant Field Values
    • AUTHOR

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR
      Fluent Client search parameter constant for author

      Description:
      Type: reference
      Path: MessageHeader.author

    • SP_RESPONSIBLE

      public static final String SP_RESPONSIBLE
      Search parameter constant for responsible

      Description:
      Type: reference
      Path: MessageHeader.responsible

      See Also:
      Constant Field Values
    • RESPONSIBLE

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESPONSIBLE
      Fluent Client search parameter constant for responsible

      Description:
      Type: reference
      Path: MessageHeader.responsible

    • SP_ENTERER

      public static final String SP_ENTERER
      Search parameter constant for enterer

      Description:
      Type: reference
      Path: MessageHeader.enterer

      See Also:
      Constant Field Values
    • ENTERER

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTERER
      Fluent Client search parameter constant for enterer

      Description:
      Type: reference
      Path: MessageHeader.enterer

    • SP_TARGET

      public static final String SP_TARGET
      Search parameter constant for target

      Description:
      Type: reference
      Path: MessageHeader.destination.target

      See Also:
      Constant Field Values
    • TARGET

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGET
      Fluent Client search parameter constant for target

      Description:
      Type: reference
      Path: MessageHeader.destination.target

    • INCLUDE_AUTHOR

      public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MessageHeader:author".
    • INCLUDE_DATA

      public static final ca.uhn.fhir.model.api.Include INCLUDE_DATA
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MessageHeader:data".
    • INCLUDE_ENTERER

      public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTERER
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MessageHeader:enterer".
    • INCLUDE_RECEIVER

      public static final ca.uhn.fhir.model.api.Include INCLUDE_RECEIVER
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MessageHeader:receiver".
    • INCLUDE_RESPONSIBLE

      public static final ca.uhn.fhir.model.api.Include INCLUDE_RESPONSIBLE
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MessageHeader:responsible".
    • INCLUDE_TARGET

      public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MessageHeader:target".
  • Constructor Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
    • getAllPopulatedChildElementsOfType

      public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType​(Class<T> theType)
      Specified by:
      getAllPopulatedChildElementsOfType in interface ca.uhn.fhir.model.api.ICompositeElement
    • getTimestampElement

      public ca.uhn.fhir.model.primitive.InstantDt getTimestampElement()
      Gets the value(s) for timestamp (when.init). creating it if it does not exist. Will not return null.

      Definition: The time that the message was sent

    • getTimestamp

      public Date getTimestamp()
      Gets the value(s) for timestamp (when.init). creating it if it does not exist. This method may return null.

      Definition: The time that the message was sent

    • setTimestamp

      public MessageHeader setTimestamp​(ca.uhn.fhir.model.primitive.InstantDt theValue)
      Sets the value(s) for timestamp (when.init)

      Definition: The time that the message was sent

    • setTimestampWithMillisPrecision

      Sets the value for timestamp (when.init)

      Definition: The time that the message was sent

    • setTimestamp

      public MessageHeader setTimestamp​(Date theDate, ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
      Sets the value for timestamp (when.init)

      Definition: The time that the message was sent

    • getEvent

      public CodingDt getEvent()
      Gets the value(s) for event (what). creating it if it does not exist. Will not return null.

      Definition: Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value \"http://hl7.org/fhir/message-events\"

    • setEvent

      public MessageHeader setEvent​(CodingDt theValue)
      Sets the value(s) for event (what)

      Definition: Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value \"http://hl7.org/fhir/message-events\"

    • getResponse

      Gets the value(s) for response (). creating it if it does not exist. Will not return null.

      Definition: Information about the message that this message is a response to. Only present if this message is a response.

    • setResponse

      Sets the value(s) for response ()

      Definition: Information about the message that this message is a response to. Only present if this message is a response.

    • getSource

      Gets the value(s) for source (who.actor). creating it if it does not exist. Will not return null.

      Definition: The source application from which this message originated

    • setSource

      Sets the value(s) for source (who.actor)

      Definition: The source application from which this message originated

    • getDestination

      Gets the value(s) for destination (who.focus). creating it if it does not exist. Will not return null.

      Definition: The destination application which the message is intended for

    • setDestination

      Sets the value(s) for destination (who.focus)

      Definition: The destination application which the message is intended for

    • addDestination

      Adds and returns a new value for destination (who.focus)

      Definition: The destination application which the message is intended for

    • addDestination

      Adds a given new value for destination (who.focus)

      Definition: The destination application which the message is intended for

      Parameters:
      theValue - The destination to add (must not be null)
    • getDestinationFirstRep

      Gets the first repetition for destination (who.focus), creating it if it does not already exist.

      Definition: The destination application which the message is intended for

    • getEnterer

      Gets the value(s) for enterer (who.author). creating it if it does not exist. Will not return null.

      Definition: The person or device that performed 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

    • setEnterer

      Sets the value(s) for enterer (who.author)

      Definition: The person or device that performed 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

    • getAuthor

      Gets the value(s) for author (who.author). creating it if it does not exist. Will not return null.

      Definition: The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions

    • setAuthor

      Sets the value(s) for author (who.author)

      Definition: The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions

    • getReceiver

      Gets the value(s) for receiver (who.focus). creating it if it does not exist. Will not return null.

      Definition: Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.

    • setReceiver

      Sets the value(s) for receiver (who.focus)

      Definition: Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.

    • getResponsible

      Gets the value(s) for responsible (who.witness). creating it if it does not exist. Will not return null.

      Definition: The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party

    • setResponsible

      Sets the value(s) for responsible (who.witness)

      Definition: The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party

    • getReason

      Gets the value(s) for reason (why). creating it if it does not exist. Will not return null.

      Definition: Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message

    • setReason

      Sets the value(s) for reason (why)

      Definition: Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message

    • getData

      Gets the value(s) for data (). creating it if it does not exist. Will not return null.

      Definition: The actual data of the message - a reference to the root/focus class of the event.

    • setData

      Sets the value(s) for data ()

      Definition: The actual data of the message - a reference to the root/focus class of the event.

    • addData

      Adds and returns a new value for data ()

      Definition: The actual data of the message - a reference to the root/focus class of the event.

    • getResourceName

      Specified by:
      getResourceName in interface ca.uhn.fhir.model.api.IResource
    • getStructureFhirVersionEnum

      public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum()
      Specified by:
      getStructureFhirVersionEnum in interface org.hl7.fhir.instance.model.api.IBaseResource
      Specified by:
      getStructureFhirVersionEnum in interface ca.uhn.fhir.model.api.IResource