Transmission Wrapper

From Wiki for HL7 Norge
Jump to: navigation, search

All HL7 version 3 interactions contain a Transmission Wrapper, an optional Trigger Event Control Act Wrapper (mostly referred to as the ControlAct Wrapper, present in all interactions except one: the Accept Acknowledgement) and a so-called Payload (in 90% of interactions there is exactly 1 payload, some interactions –notably responses to queries- may contain zero or multiple payloads).

The Transmission Wrapper has the aim to identify the sending and receiving applications, the time that the interaction was sent, as well as some other meta data related to the interaction.

Information Model

File:MCCI RM000300UVno.png
Select thumbnail to enlarge; modified from NE2008

The entry class in this model is the Message class. Note that the root element of the XML instance is equal to the interaction type, e.g. PRPA_IN201103NO. It has the same value as the Message/interactionId/@extension XML attribute. The Message class has the following attributes:

Class Component Documentation
Message id The id contains the unique identification of this instance of the interaction. This attribute corresponds to the II data type.
  creationTime Contains the date/time the interaction was sent. Format: YYYYMMDDHHMMSS.
  versionCode Contains the base version of HL7 version 3 used in this interaction. In Norway this should either contain the fixed value ‘NE2008’ (if you use the specifications prior to 2011) or the fixed value 'NE2010NO' (if you use these HL7 specifications which were created in or after 2011).
  interactionId Identifies the interaction ID (the type of service). @root contains the fixed value ‘2.16.840.1.113883.1.6’. @extension contains the identifier as specified for the interaction, e.g. PRPA_IN201103NO. The value of @extension has to be equal to the name of the root element in the XML instance. This attribute corresponds to the II data type.
  processingCode ProcessingCode is a mandatory attribute within all interactions. @code shall either have the value T (Test) or the value P (Production).
  • P = Production. The receiver of the interaction shall process the contents of the interaction in a production environment and the production database. If an interaction with a processingCode equal to P is received by a test application (based on a test database) the receiving application shall not process the interaction and shall create an error message.
  • T = Test. The receiver of the interaction shall process the contents of the interaction in a test environment and the test database. If an interaction with a processingCode equal to T is received by a production application (based on a production database) the receiving application shall not process the interaction and shall create an error message.

Note that all responses related to an interaction have to use the same ProcessingCode as the original interaction. If the original interaction had ProcessingCode 'T', then all response interactions that it results in shall also have processingCode 'T'.

  processingModeCode No further description. Fixed value ‘T’.
  acceptAckCode Specifies whether or not the receiver should send an Accept Acknowledgement (MCCI_IN000002UV02 interaction) in response to this interaction. In the context of the Norwegian infrastructure the value of Message.acceptAckCode will always be either AL (Always) or NE (Never), and the value will be implied by the WSDL used for the service. Therefore, the receiving application will always be aware if an Accept Acknowledgement has to be sent simply because of the WSDL definition. The value of the acceptAckCode may not conflict with the expectations as documented in the WSDL.

A Message has exactly one Sender and one Receiver associated with it; these are modeled by means of the Sender, Receiver and Device classes. These classes have the following attributes:

Class Component Documentation
Sender/Receiver typeCode Identifies the sending/receiving software application by means of an abstract identifier. @typeCode has the fixed value 'RCV' (for receiver) or 'SND' (for sender).
Device classCode, determinerCode Identifies a software application. @classCode has the fixed value ‘DEV’, @determinerCode has the fixed value ‘INSTANCE’
  id The id contains the unique identification of a software application. This attribute corresponds to the II data type.

The NHN Person Registry uses root 2.16.578.1.12.4.5.1.1 without an extension.


If the Transmission Wrapper is part of a response interaction (i.e. an interaction sent as a response to a prior interaction) instead of the 'initial interaction' the Acknowledgement and targetMessage classes are mandatory in the Transmission Wrapper. Their purpose is to indicate if the original interaction could be processed; and to identify the original interaction that this interaction forms a response to. The Acknowledgement and targetMessage classes have the following attributes:

Class Component Documentation
Acknowledgement typeCode The acknowledgement part is mandatory in response interactions, and may not be used in ‘initiating interactions’.

The purpose of the Acknowledgement class is to identify if the interaction has been successfully processed, and to identify the interaction to which this is a response. @typeCode identifies if the interaction has been successfully processed.

  • If the response interaction is an Accept Acknowledgement (MCCI_IN000002UV02) then the allowable values for @typeCode are either ‘CE’ (error, content not processed), or ‘CA’ (accepted, contents processed).
  • For any other interaction the allowable values are for @typeCode are either ‘AE’ (error, content not processed), or ‘AA’ (accepted, contents processed).

See Error Handling for details about identifying the errors themselves.

Warning: in NE2008 the HL7 typeCode attribute was mapped to an XML element, see example below:

 <acknowledgement>
    <typeCode code="AE"/>

In NE2010 the HL7 typecode attribute is mapped to an XML attribute, see example below:

<acknowledgement typeCode="AE"/>
targetMessage id Identifies the original interaction to which this is a response. This is equal to the values of /id/@root and /id/@extension as contained in the original interaction. This attribute corresponds to the II data type.

If the Transmission Wrapper is part of a response interaction (i.e. an interaction sent as a response to a prior interaction) instead of the 'initial interaction' the AcknowledgementDetail class can be used to identify zero or more errors/warnings/informational issue detected during the processing of the original interaction. The AcknowledgementDetail class contains the following attributes:

Class Component Documentation
AcknowledgementDetail typeCode Indicates if the class documents an error, a warning or informational data. Contains either E (Error), W (Warning), or I (Informational).
If the typeCode equals 'E', Acknowledgement.TypeCode (see above for description) SHALL be set to either CE or AE.
  code Contains a code that uniquely identifies the error/warning/information item. See Error Handling for details of the coding system used.
If the typeCode equals 'E' a code SHALL be specified in Norwegian implementations. A code SHOULD be specified if the typeCode equals W or I.
This code is used by the receiving software application for processing logic (e.g. decide if the problem can be taken care of automatically, or to display the issue to a user or system operator)
  text Contains (optional) additional textual information about the error. The text should preferrably be written in such a way to be understandable by an end user.


Note: Any other classes/attributes not listed above, but shown in the diagram, are reserved for future use in Norway. Sending applications SHOULD not use these model elements; receiving applications SHALL nor produce an error if these model elements are present, and MAY ignore these model elements if present.

Examples

1. The interaction below is of type PRPA_IN201307NO. It was sent on 20080719140010, from application 145 to application 922.

<PRPA_IN201307NO01 ITSVersion="XML_1.0" xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"	>
  <id extension="3948375" root="2.16.578.1.34.1.145.1"/>
  <!- Time message was sent -->
  <creationTime value="20080719140010"/>
  <versionCode code="NE2010NO"/>
  <!- Fixed values for GetPatientDemographics query -->
  <interactionId extension="PRPA_IN201307NO01" root="2.16.840.1.113883.1.6"/>
  <processingCode code="P"/>
  <processingModeCode code="T"/>
  <acceptAckCode code="NE"/>
  <receiver>
    <device>
    <!- Receiving software application. Helse Vest assigned application identifier -->
        <id extension="922" root="2.16.578.1.34.1"/>
    </device>
  </receiver>
  <sender>
    <device>
    <!- Sending software application. Helse Vest assigned application identifier -->
    <id extension="145" root="2.16.578.1.34.1"/>
    </device>
  </sender>
  <controlActProcess>

See ControlAct Wrapper for details of the secondary wrapper and the payload.

  </controlActProcess>
</PRPA_IN201307NO01>

2. Application Acknowledgement of type PRPA_IN090002 - interaction 0806071541103 is rejected (CE) with errors (E217 code)

<PRPA_IN090002 ITSVersion="XML_1.0" xmlns="urn:hl7-org:v3"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3">
    <id extension="34236" root="2.16.578.1.34.1.871.3"/>
    <creationTime value="20080607154128"/>
    <versionCode code="NE2010NO"/>
    <interactionId extension="PRPA_IN090002" root="2.16.840.1.113883.1.6"/>
    <processingCode code="P"/>
    <processingModeCode code="T"/>
    <acceptAckCode code="NE"/>
       <receiver typeCode="RCV">
          <device classCode="DEV" determinercode="INSTANCE">
              <id extension="408" root="2.16.578.1.34.1"/>
          </device>
       </receiver>
       <sender typeCode="SND">
           <device classCode="DEV" determinerCode="INSTANCE">
               <id extension="871" root="2.16.578.1.34.1"/>
           </device>
       </sender>
       <controlActProcess>

See ControlAct Wrapper for details of the secondary wrapper and the payload.

       </controlActProcess>
       <acknowledgement typeCode="AE"/>
           <acknowledgementDetail typeCode="E">
               <code code="E217" displayName="Invalid F-Number" 
                     codeSystem="2.16.840.1.113883.5.1100"/>
           </acknowledgementDetail>
           <targetMessage>
               <id extension="0806071541103" root="2.16.578.1.34.1.408.7"/>
           </targetMessage>
   </acknowledgement>
</PRPA_IN090002>