Search code examples
javascriptmirth

How to use Preprocessor in mirthconnect


I'm trying to replace all the single quotes with blanks in the incoming HL7 message. I was trying to use the option preprocessor but I'm getting some errors. I'm new to the mirth connect. Could you give me some insight or some sample codes on this.


Solution

  • You can do this either in Attachment or Preprocessor scripts, both allows to deal with the message before Mirth tries to serialize it into the E4X object.

    In both scripts you can do the following:

    message = message.replace(/'/g,"");