web stats
HL7 v2 Transformer Error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 07-12-2018, 12:31 AM
npasupathi npasupathi is offline
What's HL7?
Join Date: Jul 2018
Posts: 2
npasupathi is on a distinguished road
Default HL7 v2 Transformer Error

(Mirth Connect v3.5.2)
I am receiving HL7 messages from Siemens hematology analyser and writing it into a text file. However, once I apply any transformer, it throws up the error (as in the end of this message).

I have tried applying pre processing to clean up but no avail. I have also tried using various other HL7 messages from other sources but the same error shows up. Looking at the HL7 file, I don't see any non standard characters.

I have also tried setting the data type to RAW but it didn't work. Since this error shows up for any HL7 file I use, I guess it has nothing to do with

How to fix this?

Transformer error
ERROR MESSAGE: Error evaluating transformer
com.mirth.connect.server.MirthJavascriptTransforme rException:
CHANNEL: Samsung FBC 1
CONNECTOR: Destination 1
47: }
48: eval('importPackage(' + Packages.java.lang.Class.forName(className).getPac kage().getName() + ')');
49: }
50: }
51: function doScript() {
52: msg = new XML(connectorMessage.getTransformedData());
53: if (msg.namespace('') != undefined) { default xml namespace = msg.namespace(''); } else { default xml namespace = ''; }
54: function doFilter() { phase[0] = 'filter'; return true; }function doTransform() { phase[0] = 'transformer'; logger = Packages.org.apache.log4j.Logger.getLogger(phase[0]);
DETAILS: TypeError: The content of elements must consist of well-formed character data or markup.
at fa27a305-8828-4a2d-87ff-d35f508ff57f:52 (doScript)
at fa27a305-8828-4a2d-87ff-d35f508ff57f:90
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.doCall(JavaS criptFilterTransformer.java:154)
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.doCall(JavaS criptFilterTransformer.java:119)
at com.mirth.connect.server.util.javascript.JavaScrip tTask.call(JavaScriptTask.java:113)
at java.util.concurrent.FutureTask.run(FutureTask.jav a:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Attached Files
File Type: xml Samsung FBC 1.xml (30.8 KB, 4 views)
File Type: txt fbc_samsung.txt (2.6 KB, 9 views)
Reply With Quote
Old 07-12-2018, 10:46 AM
calvinouk calvinouk is offline
Mirth Employee
Join Date: Jan 2015
Posts: 2
calvinouk is on a distinguished road

The channel is configured to save the entire message as an attachment, so the HL7 is no present in the raw inbound message for you to transform.
Integration Engineer, Connected Health Services
NextGen Healthcare
Reply With Quote
Old 07-18-2018, 11:43 PM
npasupathi npasupathi is offline
What's HL7?
Join Date: Jul 2018
Posts: 2
npasupathi is on a distinguished road
Default Solved

I solved this by adding in the source transformer this:

tmp = new XML(SerializerFactory.getSerializer('HL7V2').toXML (connectorMessage.getRawData()));

I though the HL7 will be automatically loaded into XML like it does in DICOM, but that's not the case
Reply With Quote

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:37 PM.

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