Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here's a screenshot of our channel configuration:

OpenMRS drops HL7 messages into this table, and then this channel reads the messages from the database.  This channel passes on the HL7 message to another channel that sends the HL7 message off to the PACS system via LLP. We use the following preprocessing script on the second channel to convert the xml format that the Mirth database reader returns into a format Mirth recognizes at HL7:

Code Block

// Strip off the leading and trailing <result> and <message> tags
&nbsp; &nbsp; &nbsp; &nbsp; message = message.replace(/&amp;/g,"&");
&nbsp; &nbsp; &nbsp; &nbsp; message = message.replace(/&#13;/g,"\x0D");
&nbsp; &nbsp; &nbsp; &nbsp; message = message.replace("<result><message>","");
&nbsp; &nbsp; &nbsp; &nbsp; message = message.replace("</message></result>","");
&nbsp; &nbsp; &nbsp; &nbsp; return message;
&nbsp; &nbsp;&nbsp;
// Strip off the leading and trailing <result> and <message> tags

&nbsp; &nbsp; &nbsp; &nbsp; message = message.replace(/&amp;/g,"&");

&nbsp; &nbsp; &nbsp; &nbsp; message = message.replace(/&#13;/g,"\x0D");

&nbsp; &nbsp; &nbsp; &nbsp; message = message.replace("<result><message>","");

&nbsp; &nbsp; &nbsp; &nbsp; message = message.replace("</message></result>","");

&nbsp; &nbsp; &nbsp; &nbsp; return message;