Difference between revisions of "Sending HL7 Version 3 Query Messages"

From IHE Wiki
Jump to navigation Jump to search
m
 
Line 57: Line 57:
 
   </sender>
 
   </sender>
  
 +
====  <''HL7Interaction'' xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0" xmlns:xsi="<nowiki>http://www.w3.org/2001/XMLSchema-instance</nowiki>"> ====
 +
The HL7 Interaction being sent will control the name of the root element in the message.  The namespace of this message shall be urn:hl7-org:v3, and the ITSVersion shall be "XML_1.0".
 +
====<id root='&nbsp;' extension='&nbsp;'/>====
 +
Each message shall be uniquely identified.  The root attribute is required, the extension attribute may be used if the root attribute is insufficient to uniquely identify the message instance. 
 +
==== <creationTime value='&nbsp;'/> ====
 +
The creationTime indicates when the message was created, and shall be sent with a timestamp that is precise to at least 1/100th of a second.
 +
==== <interactionId extension=<nowiki>'</nowiki>''HL7Interaction''<nowiki>'</nowiki> root='2.16.840.1.113883'/> ====
 +
The identifer for the interaction shall be sent.  The extension value shall be valued with the HL7 Interaction identifier specified within the standard.  The root attribute shall be set to the value 2.16.840.1.113883 to identify this as an HL7 interaction.
 +
 +
==== <processingCode code='D|P|T'/>====
 +
The processingCode element identifiers whether this message is being sent for debugging, production or training respectively.  It shall be present and have one of the values D, P or T, as shown above.
 +
 +
==== <processingModeCode code='A|T|I|R'/> ====
 +
The processingModeCode distinguishes the type of processing being performed, using the values A, T, I or R for Archive, current processing, Initial load, or Restore from archive respectively.  This element shall be present and have one of the values shown above.
 +
 
 +
==== <acceptAckCode code='AL|ER|NE'/> ====
 +
The acceptAckCode indicates whether the reciever wants to recieve an acknowledgement Always (AL), only on errors (ER), or never (NE).  Unless reliable message transport has been established through some other mechanism, any message that would result in the potential alteration of clinical data shall be sent with the acceptAckCode set to AL, and any message that performs queries or is otherwise non-destructive should be set the value to 'ER' or 'AL'.
 +
 +
==== <receiver typeCode="RCV"><br/><sender typeCode='SND'/> ====
 +
The reciever and sender elements shall be used to identify the systems responsible for recieving and sending the messages.
 +
 +
==== <id/> ====
 +
The id element is required and identifies the sender or reciever of the message.
 +
 +
==== <name/> ====
 +
The name may be send to provide a human readable name for the sender or reciever.
 +
 +
==== <existenceTime><low value='&nbsp;'/></existenceTime> ====
 +
The existenceTime element may be set by the sender on the sender element, or by the reciever on the reciever element to indicate the time at which the sending or recieving process was last started.  The sender should not set this value for the reviever, and visa-versa.
 +
 +
==== <telecom value='&nbsp;' /> ====
 +
The telecommunications address for the sender and/or reciever may be sent.  This address is the URL at which the sender or reciever is originating or recieving messages.  The URL shall be the URL of the appropriate web service end-point.
 +
 +
==== <manufacturerModelName/> ====
 +
The manufacturer model name may be set by the sender or reciever to indicate a human readable description of the manufacturer model name of the sending or recieving device.  Once again, the senders and recievers should only set these values for themselves.
 +
 +
==== <softwareName/> ====
 +
The software name may be set by the sender or reciever to indicate a human readable description of the software being used to send or recieve the message.  Once again, the senders and recievers should only set these values for themselves.
  
 
=== Control Act ===
 
=== Control Act ===

Revision as of 22:13, 21 May 2007

Sending HL7 Version 3 Messages

HL7 Version 3 messages are sent in XML. Each message has information related to:

  1. Messaging Infrastructure
  2. Control Act
  3. Domain Content

These components are described in greater detail below.

Message Infrastructure

This section of the message conveys information about the message itself, including:

  • The message identity
  • Creation time of the message
  • The message type
  • Processing controls on the message
  • Identity of the sending and recieving systems
  • The control act which is being conveyed in the message
<HL7Interaction xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                
 <!-- A unique identifier for this transmission (mandatory). -->
 <id root=' ' extension=' '/>
 <!-- The time that the transmission was created. -->
 <creationTime value=' '/>
 <!-- The identification of the unique information interchange. The extension should be the same as the outermost tag. The root shall be 2.16.840.1.113883 -->
 <interactionId extension='HL7Interaction' root='2.16.840.1.113883'/>
 <!-- debugging, production or training -->
 <processingCode code='D|P|T'/>
 
 <!-- Archive, Current Processing, Initial Load or Restore from Archive -->
 <processingModeCode code='A|T|I|R'/>
 
 <!-- Always, Errors only or Never -->
 <acceptAckCode code='AL|ER|NE'/>
 
 <receiver typeCode="RCV">
   <device determinerCode="INSTANCE">
     <id/><!--  Application id -->
     <name/>
     <desc/>
     <existenceTime><low value=' '/><high value=' '/></existenceTime>
     <telecom value=' ' />
     <manufacturerModelName/>
     <softwareName/>
   </device>
 </receiver>
 <sender typeCode="SND">
   <device determinerCode="INSTANCE">
     <id/><!--  Application id -->
     <name/>
     <desc/>
     <existenceTime><low value=' '/><high value=' '/></existenceTime>
     <telecom value=' ' />
     <manufacturerModelName/>
     <softwareName/>
   </device>
 </sender>

<HL7Interaction xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

The HL7 Interaction being sent will control the name of the root element in the message. The namespace of this message shall be urn:hl7-org:v3, and the ITSVersion shall be "XML_1.0".

<id root=' ' extension=' '/>

Each message shall be uniquely identified. The root attribute is required, the extension attribute may be used if the root attribute is insufficient to uniquely identify the message instance.

<creationTime value=' '/>

The creationTime indicates when the message was created, and shall be sent with a timestamp that is precise to at least 1/100th of a second.

<interactionId extension='HL7Interaction' root='2.16.840.1.113883'/>

The identifer for the interaction shall be sent. The extension value shall be valued with the HL7 Interaction identifier specified within the standard. The root attribute shall be set to the value 2.16.840.1.113883 to identify this as an HL7 interaction.

<processingCode code='D|P|T'/>

The processingCode element identifiers whether this message is being sent for debugging, production or training respectively. It shall be present and have one of the values D, P or T, as shown above.

<processingModeCode code='A|T|I|R'/>

The processingModeCode distinguishes the type of processing being performed, using the values A, T, I or R for Archive, current processing, Initial load, or Restore from archive respectively. This element shall be present and have one of the values shown above.

<acceptAckCode code='AL|ER|NE'/>

The acceptAckCode indicates whether the reciever wants to recieve an acknowledgement Always (AL), only on errors (ER), or never (NE). Unless reliable message transport has been established through some other mechanism, any message that would result in the potential alteration of clinical data shall be sent with the acceptAckCode set to AL, and any message that performs queries or is otherwise non-destructive should be set the value to 'ER' or 'AL'.

<receiver typeCode="RCV">
<sender typeCode='SND'/>

The reciever and sender elements shall be used to identify the systems responsible for recieving and sending the messages.

<id/>

The id element is required and identifies the sender or reciever of the message.

<name/>

The name may be send to provide a human readable name for the sender or reciever.

<existenceTime><low value=' '/></existenceTime>

The existenceTime element may be set by the sender on the sender element, or by the reciever on the reciever element to indicate the time at which the sending or recieving process was last started. The sender should not set this value for the reviever, and visa-versa.

<telecom value=' ' />

The telecommunications address for the sender and/or reciever may be sent. This address is the URL at which the sender or reciever is originating or recieving messages. The URL shall be the URL of the appropriate web service end-point.

<manufacturerModelName/>

The manufacturer model name may be set by the sender or reciever to indicate a human readable description of the manufacturer model name of the sending or recieving device. Once again, the senders and recievers should only set these values for themselves.

<softwareName/>

The software name may be set by the sender or reciever to indicate a human readable description of the software being used to send or recieve the message. Once again, the senders and recievers should only set these values for themselves.

Control Act

This section of the message identifies the action and provides information the business actors related to the transaction. This includes:

  • The author or performer of the act
  • The information recipients to who the information will be conveyed
  • The domain content related to the act
 <controlActProcess moodCode="EVN">
   <id root=' ' extension=' '/>
   
   <effectiveTime value=' '/>
   <languageCode code=' '/>
   <authorOrPerformer typeCode=' '></authorOrPerformer>
   <informationRecipient typeCode=' '></informationRecipient>
   <subject>
      :
      Domain Content
   </subject>
      - OR -
   <queryByParameter>
     <statusCode />
     <parameterList>
        :
        Domain Content
     </parameterList>
   </queryByParameter>
 </controlActProcess>


Domain Content