#1
|
|||
|
|||
![]()
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. |
#2
|
|||
|
|||
![]()
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? |
#3
|
|||
|
|||
![]()
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.
|
#4
|
|||
|
|||
![]()
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; |
#5
|
|||
|
|||
![]() Quote:
|
![]() |
Thread Tools | |
Display Modes | |
|
|