Receiving ER7 Events via HL7¶
Purpose:¶
This application demonstrates how to configure WSO2 Streaming Integrator Tooling to send Hl7 events in ER7 format via MLLP protocol and log the events in hl7Stream and the acknowledgement message to the output console.
Prerequisites:¶
- Install the HAPI testpanel. (Reference: https://hapifhir.github.io/hapi-hl7v2/hapi-testpanel/install.html)
- Save this sample. If there is no syntax error, the following message is shown on the console:
- Siddhi App PublishHl7InER7Format successfully deployed.
Executing the Sample:¶
- In the HAPI testpanel create a receiving connection with port that provided in the Siddhi app.
- Start the listener.
- Start the Siddhi application by clicking on 'Run'.
- If the Siddhi application starts successfully, the following messages are shown on the console:
- PublishHl7InER7Format.siddhi - Started Successfully!
- 'Hl7' sink at 'hl7Stream' stream successfully connected to 'localhost:4000'.
- Executing HL7Sender: HOST: localhost, PORT: 4000 for stream PublishHl7InER7Format:hl7Stream.
Testing the Sample:¶
- Open the event simulator by clicking on the second icon or pressing Ctrl+Shift+I.
- In the Single Simulation tab of the panel, specify the values as follows:
- Siddhi App Name : PublishHl7InER7Format
- Stream Name : er7Stream
- In the payload, enter 'MSH|~\&|||||20190211145413.131+0530||ADTA01|10601|T|2.3' and then click Send to send the event.
- Send more events as desired.
@App:name('PublishHl7InER7Format')
@App:description('This publishes the HL7 messages in ER7 format, receives and logs the acknowledgement message in the console using MLLP protocol and custom text mapping.')
define stream er7Stream (payload string);
@sink(type = 'hl7', uri='localhost:4000', tls.enabled='false', hl7.encoding='er7', @map(type='text', @payload('')))
define stream hl7Stream (payload String);
@info(name='query1')
from er7Stream
select payload
insert into hl7Stream;
Top