Class 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 Detail

      • TIMESTAMP

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

        Description:
        Type: date
        Path: MessageHeader.timestamp

      • EVENT

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

        Description:
        Type: token
        Path: MessageHeader.event

      • 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

      • 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

      • 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

      • 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

      • 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

      • DATA

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

        Description:
        Type: reference
        Path: MessageHeader.data

      • RECEIVER

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

        Description:
        Type: reference
        Path: MessageHeader.receiver

      • AUTHOR

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

        Description:
        Type: reference
        Path: MessageHeader.author

      • RESPONSIBLE

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

        Description:
        Type: reference
        Path: MessageHeader.responsible

      • 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".
    • Method Detail

      • 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

      • 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

        public MessageHeader.Response 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

        public MessageHeader setResponse​(MessageHeader.Response theValue)
        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

        public MessageHeader.Source 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

      • getDestination

        public List<MessageHeader.DestinationgetDestination()
        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

      • addDestination

        public MessageHeader.Destination addDestination()
        Adds and returns a new value for destination (who.focus)

        Definition: The destination application which the message is intended for

      • addDestination

        public MessageHeader addDestination​(MessageHeader.Destination theValue)
        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

        public MessageHeader.Destination 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

        public ResourceReferenceDt 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

        public MessageHeader setEnterer​(ResourceReferenceDt theValue)
        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

        public ResourceReferenceDt 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

        public MessageHeader setAuthor​(ResourceReferenceDt theValue)
        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

        public ResourceReferenceDt 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

        public MessageHeader setReceiver​(ResourceReferenceDt theValue)
        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

        public ResourceReferenceDt 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

        public MessageHeader setResponsible​(ResourceReferenceDt theValue)
        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

        public CodeableConceptDt 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

        public MessageHeader setReason​(CodeableConceptDt theValue)
        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

        public List<ResourceReferenceDtgetData()
        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.

      • addData

        public ResourceReferenceDt 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

        public String 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