Receiving ER7 Events via HL7
Purpose¶
This application demonstrates how to configure WSO2 Streaming Integrator Tooling to receive Hl7 events in ER7 format to the hl7Stream
via MLLP protocol and log the events in er7Stream to the output console.
Prerequisites¶
- Install the HAPI testpanel.
- Save this sample. If there are no syntax errors, the following message will be shown on the console:
Siddhi App ReceiveHl7InER7Format successfully deployed.
Executing the Sample¶
- Start the Siddhi application by clicking on
Run
. - If the Siddhi application starts successfully, the following messages would be shown on the console.
Starting SimpleServer running on port 4000
ReceiveHl7InER7Format.siddhi - Started Successfully!
Testing the Sample¶
- In the HAPI testpanel create a sending connection with the port that is provided in the Siddhi app.
- Send the following message from the testpanel.
'MSH|^~\&|sendingSystemA|senderFacilityA|receivingSystemB|receivingFacilityB|20080925161613||ADT^A01|589888ADT30502184808|P|2.3'
.
Viewing the Results¶
See the output. Following message will be shown on the console if you publish events.
ReceiveHl7InER7Format : er7Stream : Event{timestamp=1552530948958, data=[MSH|^~\&|||||20190211145413.131+0530||ADT^A01|10601|T|2.3 ], isExpired=false}
@App:name('ReceiveHl7InER7Format')
@App:description('This receives the HL7 messages and sends the acknowledgement message to the client using the MLLP protocol and text mapping.')
@source(type = 'hl7', port = '4000', hl7.encoding = 'er7', @map(type = 'text'))
define stream hl7stream(payload string);
@sink(type='log')
define stream er7Stream (payload string);
@info(name='query1')
from hl7stream
select *
insert into er7Stream;