Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The HL7 Sender component is used to send the HL7 data on to a port specified on a particular IP address in a specified format. The component receives the response (acknowledgementacknowledgment) generated and sends it to the output port.

...

The component can be configured using the properties in the Custom Property Sheet (CPS) shown in Figure 1.

Image RemovedImage Added
Figure 1: Custom Property Sheet (CPS) for the HL7Sender component

Pre Processing XSL Configuration

...


Figure 2: Pre/Post Processing XSL Configuration

Input

...

contains multiple messages

Enable this property if the input contains multiple HL7 messages delimited by a character.


Figure 3: Property allowing multiple messages in the input, separated by a delimiter

Validate Input

This checkbox enable the Enable this property to perform validation on the input message.


 

 

Figure 4: Property to perform validation and select validation type

Validate ACK Response

Enable this property to perform validation on the ACK Response received before sending it to the output port.

Validation Type
  • DEFAULT: Messages will be validated with standard HL7 message rules.
  • CONFORMANCE_PROFILE: Message will be validated with the conformance profile file configured for its type. Default validation is performed if a conformance profile is not configured for a specific type.


    Figure 5: Conformance profile validation type and its options
Sender Configurations
Select a Sender to Modify

Add the sender which is used in the creation of component input and output ports. By default, the component has no ports. Depending on the names provided in the property sheet (Click Add the Add  button against the Sender Configurations property), a set of input and output ports gets generated.

...

Click the small button against the Connection Details property to configure connection details.


Figure 6: Sender Connection Details configuration properties

IP Address

The IP address on which HL7 Receiver service is running.

...

Request Time Out is the time out of the HL7 message in milliseconds. The HL7 Sender waits for the response till the timeout happens and throws an exception , if it do does not receive any response.

...

Is Use custom blocks in MLLP

Select Enable this checkbox to option to define custom blocks to be used in MLLP. Specify valid hexadecimal representation of characters in Start Block, End Block, and Last Character fields. The default values populated are standard blocks used in MLLP.

  • Start Block: Start Block character (1 byte). Default value is 0B (0x0B).
  • End Block: End Block character (1 byte). Default value is 1C (0x1C).
  • Last Character: Usually Carriage Return is used as last character (1 byte). Default value 0D (0x0D).

Image Removed

Image Added
Figure 7: Options to define Custom blocks

Receive Type

The type of message expected on component's input port. 

...

Message Rectifier class is a class whose instance will be delegated the responsibility of rectifying or correcting HL7 message every time a retry is attempted. If a value is not provided here then message rectification will not be done and retry is attempted with the same message.

Message Rectifier should implement implements com.fiorano.services.hl7sender.engine.IMessageRectifier and should have a default constructor.

Image Removed
Figure 2: Message Rectifier class

Code Block
titleMessage Rectifier class
public interface IMessageRectifier {
/**
* This method of implementation, if exists, will be called when the <code>originalMessage</code>
* could not be sent because of an exception.
*
* @param originalMessage message that has to be corrected
* @param problem exception that was encountered when trying to send <code>originalMessage</code>
* @return rectified message
* @throws ServiceExecutionException any exception that might occur when rextifying
*/
Message rectifyMessage(Message originalMessage, Exception problem) throws ServiceExecutionException;
/**
* This method of implementation, if exists, will be called when the <code>originalMessage</code>
* is sent and an ack message other than AA is returned
*
* @param originalMessage message that has to be corrected
* @param ackMessage ackMessage, ither than AA, that was returned in response to <code>originalMessage</code>
* @return rectified message
* @throws ServiceExecutionException any exception that might occur when rextifying
*/
Message rectifyMessage(Message originalMessage, Message ackMessage) throws ServiceExecutionException;
}
Ack Code Categories

Each Ack Code [AA, AR, AE …. ] the sender is expected to receive can be categorized as a success or error or warning as shown in Figure 1. In case, the ack code returned to sender is configured as success or warning, the ack message is simply sent onto the output port of the component. If the received ack code is configured as a warning, then a retry is attempted.

...

When ack code returned to sender is categorized as a warning, the number of times retry is to be attempted and interval after which retry is to be attempted can be configured.

Functional Demonstration

Figure 3 The figure below illustrates the event process where HL7Sender accepts ADT and ORU messages and sends out the corresponding acknowledgementsacknowledgments

Image Modified
Figure 38: Sample Event process using HL7Sender

Figure 4 The figure below illustrates the event process where HL7Receiver listens to the messages from HL7Sender.

Image Modified
Figure 49: Sample Event process using HL7Receiver

...

When a sample ADT A01 message is sent from the Feeder ADT_XML, HL7Sender sends this message to HL7Receiver.Image Removed
Figure 5:

Expand
titleSample ADT A01 message (expand to see)
Code Block
languagexml
<?xml version="1.0" encoding="UTF-8"?>
<ADT_A01 xmlns="urn:hl7-org:v2xml">
    <MSH>
        <MSH.1>|</MSH.1>
        <MSH.2>^~\&amp;</MSH.2>
        <MSH.3>
            <HD.1>EPIC</HD.1>
        </MSH.3>
        <MSH.4>
            <HD.1>EPICADT</HD.1>
        </MSH.4>
        <MSH.5>
            <HD.1>SMS</HD.1>
        </MSH.5>
        <MSH.6>
            <HD.1>SMSADT</HD.1>
        </MSH.6>
        <MSH.7>
            <TS.1>199912271408</TS.1>
        </MSH.7>
        <MSH.8>CHARRIS</MSH.8>
        <MSH.9>
            <MSG.1>ADT</MSG.1>
            <MSG.2>A04</MSG.2>
        </MSH.9>
        <MSH.10>1817457</MSH.10>
        <MSH.11>
            <PT.1>D</PT.1>
        </MSH.11>
        <MSH.12>
            <VID.1>2.5</VID.1>
        </MSH.12>
    </MSH>
    <PID>
        <PID.2>
            <CX.1>0493575</CX.1>
            <CX.4>
                <HD.1>2</HD.1>
            </CX.4>
            <CX.5>ID 1</CX.5>
        </PID.2>
        <PID.3>
            <CX.1>454721</CX.1>
        </PID.3>
        <PID.5>
            <XPN.1>
                <FN.1>DOE</FN.1>
            </XPN.1>
            <XPN.2>JOHN</XPN.2>
        </PID.5>
        <PID.6>
            <XPN.1>
                <FN.1>DOE</FN.1>
            </XPN.1>
            <XPN.2>JOHN</XPN.2>
        </PID.6>
        <PID.7>
            <TS.1>19480203</TS.1>
        </PID.7>
        <PID.8>M</PID.8>
        <PID.10>
            <CE.1>B</CE.1>
        </PID.10>
        <PID.11>
            <XAD.1>
                <SAD.1>254 MYSTREET AVE</SAD.1>
            </XAD.1>
            <XAD.3>MYTOWN</XAD.3>
            <XAD.4>OH</XAD.4>
            <XAD.5>44123</XAD.5>
            <XAD.6>USA</XAD.6>
        </PID.11>
        <PID.13>
            <XTN.1>(216)123-4567</XTN.1>
        </PID.13>
        <PID.16>
            <CE.1>M</CE.1>
        </PID.16>
        <PID.17>
            <CE.1>NON</CE.1>
        </PID.17>
        <PID.18>
            <CX.1>400003403</CX.1>
        </PID.18>
        <PID.18>
            <CX.1>1129086</CX.1>
        </PID.18>
    </PID>
    <NK1>
        <NK1.2>
            <XPN.1>
                <FN.1>ROE</FN.1>
            </XPN.1>
            <XPN.2>MARIE</XPN.2>
        </NK1.2>
        <NK1.3>
            <CE.1>SPO</CE.1>
        </NK1.3>
        <NK1.5>
            <XTN.1>(216)123-4567</XTN.1>
        </NK1.5>
        <NK1.7>
            <CE.1>EC</CE.1>
        </NK1.7>
    </NK1>
    <PV1>
        <PV1.2>O</PV1.2>
        <PV1.3>
            <PL.1>168 </PL.1>
        </PV1.3>
        <PV1.3>
            <PL.1>219</PL.1>
        </PV1.3>
        <PV1.3>
            <PL.1>C</PL.1>
        </PV1.3>
        <PV1.3>
            <PL.1>PMA</PL.1>
        </PV1.3>
        <PV1.7>
            <XCN.1>277</XCN.1>
            <XCN.2>
                <FN.1>ALLEN MYLASTNAME</FN.1>
            </XCN.2>
            <XCN.3>BONNIE</XCN.3>
        </PV1.7>
        <PV1.19>
            <CX.1>2688684</CX.1>
        </PV1.19>
        <PV1.44>
            <TS.1>199912271408</TS.1>
        </PV1.44>
        <PV1.50>
            <CX.1>002376853</CX.1>
        </PV1.50>
    </PV1>
</ADT_A01>

When the message receipt is acknowledged by HL7Receiver, HL7Sender receives it and sends it to the Display ADT_ACK_REC.

Image RemovedImage Added
Figure 610: Acknowledgment received by HL7Sender

...

When a sample ORU A01 message is sent from the Feeder ORU_MSG, HL7Sender sends this message to HL7Receiver.Image Removed
Figure 7:

Code Block
titleSample ORU R01 message
MSH|^~\&|FORMENTRY|AMRS|HL7LISTENER|AMRS|20060809121931||ORU^R01|formentry-20060809121931|P|2.5|1||||||||2^AMRS-ELDORET^http://schema.openmrs.org/2006/FormEntry/formId^URI
PID|||3^^^^||Patient^John^D||
PV1||O|1^Unknown||||2^Ima Doc (2-6)|||||||||||||||||||||||||||||||||||||20060807|||||||V
ORC|RE||||||||20060807161605|1^Super User
OBR|1|||1238^MEDICAL RECORD OBSERVATIONS^99DCT
OBX|1|NM|5089^WEIGHT (KG)^99DCT||70|||||||||20060807
OBR|2|||1019^COMPLETE BLOOD COUNT^99DCT
OBX|1|NM|1015^HEMATOCRIT^99DCT||1000|||||||||20060807
OBX|2|NM|21^HEMOGLOBIN^99DCT||1000|||||||||20060807
OBX|3|NM|678^WHITE BLOOD CELLS^99DCT||100000|||||||||20060807
OBX|4|NM|729^PLATELETS^99DCT||10|||||||||20060807
OBR|3|||1284^PROBLEM LIST^99DCT
OBX|1|CWE|6042^PROBLEM ADDED^99DCT||2^ANEMIA, HEMOLYSIS^99DCT|||||||||20060807

When the message receipt is acknowledged by HL7Receiver, HL7Sender receives it and sends it to the Display ORU_MSG_REC.

Image RemovedImage Added
Figure 811: Acknowledgement received by HL7Sender

Image Added
Figure 12: ORU R01 message received by HL7Receiver

Scenario 3: Sending multiple messages at a time

Create the event process in the following manner.

Image Added
Figure 13: Sample Event process for sending multiple messages

Configure HL7Sender as shown in the figure below.

Image Added
Figure 14: CPS configuration to enable sending multiple messages

When two HL7 messages are given in different lines through the same feeder, HL7Sender sends these as two separate messages to the HL7Receiver. This is because both the messages are separated by the delimiter (0A-New LineFeed).

Code Block
titleTwo sample HL7 messages sent as input
MSH|^~\&|EPIC|EPICADT|SMS|SMSADT|199912271408|CHARRIS|ADT^A04|1817457|D|2.5|PID||0493575^^^2^ID 1|454721||DOE^JOHN^^^^|DOE^JOHN^^^^|19480203|M||B|254 MYSTREETAVE^^MYTOWN^OH^44123^USA||(216)123-4567|||M|NON|400003403~1129086|NK1||ROE^MARIE^^^^|SPO||(216)123-4567||EC|||||||||||||||||||||||||||PV1||O|168~219~C~PMA^^^^^^^^^||||277^ALLEN MYLASTNAME^BONNIE^^^^|||||||||| ||2688684|||||||||||||||||||||||||199912271408||||||002376853
MSH|^~\&|EPIC|EPICADT|SMS|SMSADT|199912271408|CHARRIS|ADT^A04|1817457|D|2.5|PID||0493575^^^2^ID 1|454721||DOE^JOHN^^^^|DOE^JOHN^^^^|19480203|M||B|254 MYSTREETAVE^^MYTOWN^OH^44123^USA||(216)123-4567|||M|NON|400003403~1129086|NK1||ROE^MARIE^^^^|SPO||(216)123-4567||EC|||||||||||||||||||||||||||PV1||O|168~219~C~PMA^^^^^^^^^||||277^ALLEN MYLASTNAME^BONNIE^^^^|||||||||| ||2688684|||||||||||||||||||||||||199912271408||||||002376853

Image Added
Figure 15: It is seen that two messages are received in the output port of the HL7Receiver

Tip

To understand the service better, refer the HL7Sender-Receiver example which demonstrates HL7Sender service features.

Adaptavist ThemeBuilder EngineAtlassian Confluence