web stats
Inbound HL7 interface: how to open TCP port and how to pass HL7 via Web Services - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2014, 09:55 PM
dzilberman dzilberman is offline
OBX.2 Kenobi
 
Join Date: Sep 2013
Location: San Francisco, CA
Posts: 71
dzilberman is on a distinguished road
Wink Inbound HL7 interface: how to open TCP port and how to pass HL7 via Web Services

Folks,

I have two fold question regarding best practices for implementing INBOUND HL7 interface - that is when Mirth channel expects HL7 message format and needs to physically receive it while being deployed in AWS secured zone.

1. I know that in general (and by spec I believe) HL7 should be received via TCP (MLP) sockets but since our Mirth is in AWS secure zone in a cloud, it is very challenging to have it working (open that port somehow) - and I'd appreciate some pointers on how others do that (open ports 6661 for tunneling into Mirth deployment zone). So far I couldn't even deploy my channel with TCP transport in AWS..

2. So this channel that takes an HL7 msg as an input, converts it first to XML and then to JSON has data type for source connector as "HL7" (see attached channel code) .

For now I have published the channel as SOAP WS:

Passing in HL7 as I am passing JSON - withing <arg0> element:
Quote:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.connectors.connect.mirth.com/">
<soapenv:Header/>
<soapenv:Body>
<ws:acceptMessage>
<!--Optional:-->
<arg0>
MSH|^~\&|JAKARICARE|TEST|1100|BN|201310161451||ADT ^A04||T|2.4
PID|||PATID1234^5^M11||Jones^William^A^III||196106 15|M-||C|1200 N Elm Street^^Greensboro^NC^27401-1020|GL|(91-9)379-1212|(919)271- 3434||S||PATID12345001^2^M10|123456789|9-87654^
NK1|1|Jones^Barbara^K|Wife||||||NK
IN1|1|UNK.|MR1|Medicare/Commercial|P.O. BOX C32086^^Richmond^VA^23261||-0000000000|499032980||||00001231|00001231||MC|Odon nell^Richard^W^^|1|-19221027|7982 Wellington Dr^^Warrenton^VA^22186^USA||||||||||||N||||-|499032980-A|||||||M||
</arg0>
</ws:acceptMessage>
</soapenv:Body>
</soapenv:Envelope>
results in a chain of exceptions in the channel dashboard:
Quote:
2014-05-08 09:45:25,834] ERROR (com.mirth.connect.connectors.ws.LoggingSOAPHandle r:64): Error handling SOAP message
javax.xml.ws.WebServiceException: javax.xml.soap.SOAPException: org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 18; ParseError at [row,col]:[7,18]Message: The entity name must immediately follow the '&' in the entity reference.
at com.sun.xml.internal.ws.handler.SOAPMessageContext Impl.getMessage(SOAPMessageContextImpl.java:71)
at com.mirth.connect.connectors.ws.LoggingSOAPHandler .handleMessage(LoggingSOAPHandler.java:62)
at com.mirth.connect.connectors.ws.LoggingSOAPHandler .handleMessage(LoggingSOAPHandler.java:29)
at com.sun.xml.internal.ws.handler.HandlerProcessor.c allHandleMessage(HandlerProcessor.java:282)
at com.sun.xml.internal.ws.handler.HandlerProcessor.c allHandlersRequest(HandlerProcessor.java:125)
at com.sun.xml.internal.ws.handler.ServerSOAPHandlerT ube.callHandlersOnRequest(ServerSOAPHandlerTube.ja va:123)
at com.sun.xml.internal.ws.handler.HandlerTube.proces sRequest(HandlerTube.java:105)
whereas executed form Mirth client it works perfectly fin.

I tried changing the Input Data type to "Raw" as well (it worked for Web Service listener with incoming JSON message) but transformers immediately failed. Any thoughts - I need to get this working at least via SOPA WWS ASAP.

thanks,
Dan Z
Attached Files
File Type: txt Jakari_PID_Sample_Message.hl7.txt (512 Bytes, 15 views)
File Type: xml Test Receive HL7convert JSON WORKS WITH E_MAIL.xml (84.0 KB, 15 views)
Reply With Quote
  #2  
Old 05-09-2014, 05:58 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

That SOAP envelope is incorrect; you need to entity-encode any text nodes as necessary. For example the first "&" should be "&amp;".
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 05-09-2014, 07:28 AM
dzilberman dzilberman is offline
OBX.2 Kenobi
 
Join Date: Sep 2013
Location: San Francisco, CA
Posts: 71
dzilberman is on a distinguished road
Default

Thanks Nick, got that - so there's nothing wrong with passing HL7 in SOAP request per se, but all special characters have to be "HTML encoded"?
What about the port 6661/tunneling question #1?

thanks,
Dan
Reply With Quote
  #4  
Old 05-09-2014, 07:44 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Quote:
Originally Posted by dzilberman View Post
What about the port 6661/tunneling question #1?
I'm guess that would be a question for Amazon. I would have guessed that you could easily expose whatever ports you want.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
Reply

Tags
amazon, hl7, soap, tcp listener, web channel reader

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:44 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation