Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Simple Transform fails file to file copy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple Transform fails file to file copy

    When I take out the < on the line below it works? Is there some secret to the program processing these lines without error?

    OBX|1|NM|39135^GESTATIONAL DIABETES SCREEN^^39135^GESTATIONAL DIABETES SCREEN^||87|mg/dL|<130|N|||F|||20080415050300|SC^^L|||

    Simple xformation
    msg['MSH']['MSH.3']['MSH.3.1']="LAB2"

    So I process this file:
    MSH|^~\&|LAB|QUL||202085|20080415125539||ORU^R01|2 0080415609399430000|P|2.3|||||||
    PID OMITTED
    ORC|RE|3200|xxxxxxx||CM|||||||xxxxxx^SHARMA^ANJALI ^||||||||
    OBR|1|3200|xxxxxxxx|88888^*REPORT COMMENTS^^88888^*REPORT COMMENTS|||20080414095700|||||||20080414095700||Do cNum^DOC^NAME^|||||SC^Quest Diagnostics^Addro^CA^zip^M.D.|20080415050300|||X|| |||||||||||||||||
    OBX|1|ST|88888^*REPORT COMMENTS^^88888^*REPORT COMMENTS^||DNR||||||X|||20080415050300|SC^^L|||
    OBR|2|3200|xxxxxxx|39135^GESTATIONAL DIABETES SCREEN^^39135^GESTATIONAL DIABETES SCREEN|||20080414095700|||||||20080414095700||DocN um^DOC^NAME^|||||SC^Quest Diagnostics^ADDR^CA^95xxx^M.D.|20080415050300|||F| ||||||||||||||||||
    OBX|2|NM|39135^GESTATIONAL DIABETES SCREEN^^39135^GESTATIONAL DIABETES SCREEN^||87|mgdL|<130|N|||F|||20080415050300|SC^^L |||


    I GET...

    ERROR-300: Transformer error
    ERROR MESSAGE: Error evaluating transformer
    com.webreach.mirth.server.MirthJavascriptTransform erException:
    CHANNEL: FILTERHL7 - 202085-QUL LAB to LAB2
    CONNECTOR: sourceConnector
    SCRIPT SOURCE:
    LINE NUMBER: 1
    DETAILS: TypeError: error: Unexpected character encountered (lex state 9): '1'
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateScript(JavaScriptTransform er.java:397)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:307)
    at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
    at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
    at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:61)
    at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:79)
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:493)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:272)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:231)
    at com.webreach.mirth.connectors.file.FileMessageRece iver.processFile(FileMessageReceiver.java:236)
    at com.webreach.mirth.connectors.file.FileMessageRece iver.poll(FileMessageReceiver.java:138)
    at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:118)
    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
    at java.lang.Thread.run(Unknown Source)



    I don't know about the killer app just yet, I am learning and loving this program though. I have VB program I wrote that can do alot of this and process this file without error, not sure what the problem is here. 2 problems I have so far, Control-Z in text boxes should work, its a Windows standard and helps when you screw up, UNC is UNC not URL, I don't need it changing the UNC paths I enter as \\TEMP\OUT to //TEMP/OUT. When I have a long path I need to toss it in explorer to view the contents //TEMP/OUT calls the browser up, again its windows not Unix or the Mac.
    Mike Caldwell
    Alliance HealthCare - GE VAR
    Rocklin, CA
    Centricity PM/EMR Support - Developer - Network Engineer

  • #2
    Re:Simple Transform fails file to file copy

    Hi,

    Here is my work around:

    In your channel click the Scripts tab.
    Select the pre-processor dropdown item and put the following line of code in:

    message = message.replace(/</g,"");
    return message;

    You may be able to put this in the global scripts to, but I have not tested it there.

    Hope that helps

    Rick

    Comment

    Working...
    X