简体   繁体   中英

Mirth connect fails on evaluating transformers

I'm working with Mirth Connect v3.0.1 and getting stuck on one task, transformation of XML to HL7 v2. I am using a xml template, dragging and dropping values to the hl7 template.

destination 1 Method: file Directory: C:\\throw\\AXSFLW File Name: ${message.encodedData}

In the Transformer:

Message Segment: tmp['PID']['PID.5']['PID.5.1'] Mapping: msg['Day']['Patient']['LastName'].toString()

Message Segment: tmp['PID']['PID.5']['PID.5.2'] Mapping: msg['Day']['Patient']['FirstName'].toString()

When the source gets a xml file mirth connect fails with this error

Transformer error
ERROR MESSAGE: Error evaluating transformer
java.lang.NullPointerException
at org.mozilla.javascript.xmlimpl.XmlNode$InternalList.add(XmlNode.java:834)
at org.mozilla.javascript.xmlimpl.XMLList.replace(XMLList.java:55)
at org.mozilla.javascript.xmlimpl.XMLList.putXMLProperty(XMLList.java:151)
at org.mozilla.javascript.xmlimpl.XMLList.putXMLProperty(XMLList.java:150)
at org.mozilla.javascript.xmlimpl.XMLObjectImpl.put(XMLObjectImpl.java:261)
at org.mozilla.javascript.ScriptRuntime.setObjectElem(ScriptRuntime.java:1571)
at org.mozilla.javascript.ScriptRuntime.setObjectElem(ScriptRuntime.java:1564)
at org.mozilla.javascript.Interpreter.doSetElem(Interpreter.java:2227)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1264)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3110)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120) at     com.mirth.connect.server.util.javascript.JavaScriptTask.executeScript(JavaScriptTask.java:49)
at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.call(JavaScriptFilterTransformer.java:123)
at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.call(JavaScriptFilterTransformer.java:100)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) 

Hope somebody can point me to a solution. This seemed to work in Mirth Connect 2.1 thanks for any help.

The only way I get past things like this is to remove the steps in the transformer till things work again and then try to add them one at a time until I find the specific step that causes the issue.

In this case, are you sure you do not have a Filter step that is causing the issue ... I just saw JavaScriptFilterTransformer and for some reason it rang a bell.

Also, you seem like you have done this before, but are you sure you have your data types correct?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM