Was this helpful?
HL7 Message Aggregator
The HL7 Message Aggregator generates a template HL7 message using the data provided.
You must provide a pattern specifying the composite /sub-composite of a field under a segment along with the data so that the required message is generated. The pattern along with the data is in the XML format.
The process then performs the following actions:
1. Sets the pattern XML to the DJMessage body.
2. Passes the DJMessage body to the PutMessage action of the component.
3. Calls multiple PutMessage action (s) on the component by providing the pattern XML.
4. Retrieves the template message (GetMessage action) using the information provided by the PutMessage action.
5. Clears the data placeholder objects after generating the XML message.
Pattern XML
The pattern XML has the following definitions:
<? xml version="1.0" encoding="UTF-8"? >
      <!ELEMENT datapattern (data)+>
      <!ELEMENT data (segment | group | choice)+>
      <!ELEMENT group (segment | group )+>
      <!ATTLIST group 
      id CDATA #REQUIRED
      repeatIndex CDATA #IMPLIED
      sequence CDATA #IMPLIED
      mode CDATA #IMPLIED>
     <!ELEMENT choice (segment+)>
      <!ATTLIST choice 
      id CDATA #REQUIRED
      repeatIndex CDATA #IMPLIED
      sequence CDATA #IMPLIED
      mode CDATA #IMPLIED>
      <!ELEMENT segment (field+)>
      <!ATTLIST segment
      id CDATA #REQUIRED
      repeatIndex CDATA #IMPLIED
      sequence CDATA #IMPLIED
      mode CDATA #IMPLIED>
      <!ELEMENT field (composite+)>
      <!ATTLIST field
      number CDATA #REQUIRED
      repeatIndex CDATA #IMPLIED>
      <!ELEMENT composite (#PCDATA | subcomposite)*>
      <!ATTLIST composite number CDATA #REQUIRED>
      <!ELEMENT subcomposite (#PCDATA)>
      <!ATTLIST subcomposite 
      number CDATA #REQUIRED> 
The data element contains groups, segments, and choices for which the data has to be inserted.The following table provides the attributes for the XML pattern.
Attribute Name
Description
id
The name of the segment/group/choice.
repeatIndex
(Optional) Applicable only to segment/group/fields.
Default - first index.
If an invalid repeatIndex is specified, then the component displays an error. The reason is that you cannot create a higher repeatIndex when a lower repeatIndex is not created.
sequence
(Optional) Specifies the position of the occurrence of this segment/group/choice within the message.
Default - first occurring sequence of this segment/group within the message.
To add a repeated segment, specify the sequence number of the segment within the message so that it is inserted at the specified position in the message.
The sequence attribute is used to differentiate between segments occurring in more than one position within the message.
mode
(Optional) Allowable values are:
"C" - for create
"D" - for delete.
If the data for a composite or subcomposite exists and a new value is provided, then the old value is overwritten with the new one. Thus, the default behavior of the component is "when the data already exists then update".
The "D"- delete mode, removes the data from the specified composite or subcomposite and the placeholder associated with it. Delete mode is available at all the levels of the message hierarchy. If the delete option is specified at segment level, then values from all the fields, composites, and subcomposites within that segment is removed.
Default - "C" - create.
number
(Mandatory) Available only at the field, composite and the sub composite level. This attribute specifies the sequence of the field within the segment.
Composites can have data only if it does not have any sub composite within it. Otherwise the data is set to the subcomposite values.
HL7 Message Aggregator Properties
 
Property Name
Description
Base Segment Path
Location of the schema library, which the component loads for a specific schema version and message type.
Version
Supported HL7 version.
Message Type
Message type for which the template message is generated.
Supported Actions
 
Action
Description
GetMessage
Returns data from the Iterator in a DJMessage object.
PutMessage
Sends the data contained in a DJMessage object to the aggregator.
Note:  The maximum size limit for DJMessage is 512 MB.
Supported Action Parameters
 
Action
Parameter
Description
GetMessage
Message
Returns the template message.
PutMessage
Message
Creates the data placeholders using the pattern XML provided.
Supported Action Properties
There are no supported action properties.
Error Conditions
This transformer returns the following error messages.
Error Code
Error Name
Description
Reason
8
ERR_WRITERR
Error while running the “put message” action.
This error is returned by the HL7 Message Aggregator when an error occurs while creating the template message
0
ERR_OK
OK status
No Error. OK Status. The Information is returned successfully
Last modified date: 08/02/2023