web stats
Client is sending over PDFs on a Channel that expects only HL7 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-15-2019, 10:01 AM
JohnWA JohnWA is offline
What's HL7?
 
Join Date: Jan 2019
Posts: 4
JohnWA is on a distinguished road
Default Client is sending over PDFs on a Channel that expects only HL7

I am having an error in one of my Mirth Channels where a clinic is sending over PDFs that are oddly encoded (Photo enclosed). This channel only expects/process HL7 message. The clinic says they can't stop the messages. So I have a few questions:

1) How would I filter out these messages?

2) What format is mirth presenting the PDF in and is there a way to convert them? (I can't show the rest of the code due to HIPAA reasons but it is a lot of red question marks in diamonds and random letters/characters.

Thanks in advance.
Attached Images
File Type: png Screen Shot 2019-01-15 at 10.44.38 AM.png (9.4 KB, 8 views)
Reply With Quote
  #2  
Old 01-15-2019, 09:34 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 898
agermano is on a distinguished road
Default

That's what a PDF looks like if you open it in a text editor.

What is the source connector of your channel? A File Reader?
Reply With Quote
  #3  
Old 01-16-2019, 07:33 AM
JohnWA JohnWA is offline
What's HL7?
 
Join Date: Jan 2019
Posts: 4
JohnWA is on a distinguished road
Default

The source is TCP Listener. I also though just copying the pdf files from mirth and save as *.pdf would work, but it didn't. They might be just blank/corrupt though.
Reply With Quote
  #4  
Old 01-16-2019, 06:39 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 898
agermano is on a distinguished road
Default

I'm a little baffled how they can't stop PDFs from flowing over a TCP connection meant for HL7.

If you just want to discard them, you can enable batch processing on your source connector, then use a javascript batch splitter script to drop them as if they were never sent. Something like this should work for your batch script.

Code:
// read entire message into string
var message = org.apache.commons.io.IOUtils.toString(reader);
// only keep it if it starts with MSH
return message.startsWith('MSH') ? message : null;
If you want to keep them it's more complicated, so I won't get into that unless you are interested.
Reply With Quote
  #5  
Old 01-17-2019, 11:29 AM
JohnWA JohnWA is offline
What's HL7?
 
Join Date: Jan 2019
Posts: 4
JohnWA is on a distinguished road
Default

Quote:
Originally Posted by agermano View Post
I'm a little baffled how they can't stop PDFs from flowing over a TCP connection meant for HL7.

If you just want to discard them, you can enable batch processing on your source connector, then use a javascript batch splitter script to drop them as if they were never sent. Something like this should work for your batch script.

Code:
// read entire message into string
var message = org.apache.commons.io.IOUtils.toString(reader);
// only keep it if it starts with MSH
return message.startsWith('MSH') ? message : null;
If you want to keep them it's more complicated, so I won't get into that unless you are interested.
Thanks I appreciate it. Also that is mid-size hospitals for you. The might not know how to stop it on their end.
Reply With Quote
Reply

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 02:39 PM.


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