Announcement

Collapse
No announcement yet.

Can't process inbound messages

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

  • Can't process inbound messages

    Just uploaded and installed 1.3.1. Using the LLP to file writer/database channel for testing and investigation. When a message (see below) is processed this is the exception thrown:

    com.webreach.mirth.model.converters.SerializerExce ption: ca.uhn.hl7v2.HL7Exception: Can't XML-encode a GenericMessage. Message must have a recognized structure.
    at com.webreach.mirth.model.converters.ER7Serializer. toXML(ER7Serializer.java:60)
    at com.webreach.mirth.server.mule.transformers.HL7ToM essageObject.doTransform(HL7ToMessageObject.java:8 7)
    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.impl.MuleEventContext.getTransformedMessa ge(MuleEventContext.java:100)
    at com.webreach.mirth.server.mule.components.Channel. onCall(Channel.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.mule.model.DynamicEntryPoint.invokeCurrent(Dyn amicEntryPoint.java:168)
    at org.mule.model.DynamicEntryPoint.invoke(DynamicEnt ryPoint.java:90)
    at org.mule.impl.DefaultLifecycleAdapter.onCall(Defau ltLifecycleAdapter.java:177)
    at org.mule.impl.DefaultLifecycleAdapter.intercept(De faultLifecycleAdapter.java:232)
    at org.mule.impl.InterceptorsInvoker.execute(Intercep torsInvoker.java:53)
    at org.mule.impl.model.DefaultMuleProxy.run(DefaultMu leProxy.java:388)
    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)

    Message:

    MSH|;~\&|STAR|A|CAI|A|200209080200||ADT;A03;41|306 31362|D|2.3|30631362||AL||
    EVN|A03|200209080200||
    PID||02030669|0001446316;;;A|1800;A2280|MERGETWO;J UDIE;;||19520915|F||1|45357 BLACK OAK LANE;;ST LOUIS;MO;63141;US;C;MO189|MO189|(314)555-1212||;;|M|;|0221900001;;;A|101-01-1001|
    NK1|1|MERGETWO;DALE|H;;|45357 BLACK OAK LANE;;ST LOUIS;MO;63141;US|(314)555-1212
    PV1||O|;;;A;;;|3|||10398;FRANKELL;KENNETH;R|||IMG| |||1||DEF|10398;FRANKELL;KENNETH;R|SER;;A|02219000 01;;;A|S||||||||||||||||A|||A|||||200208070834|200 209072359||||

  • #2
    Re: Can't process inbound messages

    In your preprocessor do:

    Code:
    message = message.replace(";","^");
    or

    Code:
    message = message.replace(/\;/g,"^");
    -Chris
    Chris Lang

    Comment


    • #3
      Re: Can't process inbound messages

      Tried both, I think in the proper place. Now I see in the Channel Messages view "undefined" in the raw data view. So to insure I am doing this properly the preprocessor is located at the bottom of the Summary screen in the edit channel dialog. Just paste in the statement?
      But I have to ask. Since HL7 is a "self defining" protocol with the meta data up front why should I have to force the subfield separator? This sample data is form a HBOC STAR box. Mumps does not like ^ symbols in data. I am sure there are plenty of folks out there with a similar issue.

      com.webreach.mirth.model.converters.SerializerExce ption: ca.uhn.hl7v2.parser.EncodingNotSupportedException: Can't parse message beginning undefined
      at com.webreach.mirth.model.converters.HAPIMessageSer ializer.deserialize(HAPIMessageSerializer.java:54)
      at com.webreach.mirth.server.mule.transformers.HL7ToM essageObject.doTransform(HL7ToMessageObject.java:8 0)
      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.impl.MuleEventContext.getTransformedMessa ge(MuleEventContext.java:100)
      at com.webreach.mirth.server.mule.components.Channel. onCall(Channel.java:34)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.mule.model.DynamicEntryPoint.invokeCurrent(Dyn amicEntryPoint.java:168)
      at org.mule.model.DynamicEntryPoint.invoke(DynamicEnt ryPoint.java:90)
      at org.mule.impl.DefaultLifecycleAdapter.onCall(Defau ltLifecycleAdapter.java:177)
      at org.mule.impl.DefaultLifecycleAdapter.intercept(De faultLifecycleAdapter.java:232)
      at org.mule.impl.InterceptorsInvoker.execute(Intercep torsInvoker.java:53)
      at org.mule.impl.model.DefaultMuleProxy.run(DefaultMu leProxy.java:388)
      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)
      Caused by: ca.uhn.hl7v2.parser.EncodingNotSupportedException: Can't parse message beginning undefined
      at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:140)
      at com.webreach.mirth.model.converters.HAPIMessageSer ializer.deserialize(HAPIMessageSerializer.java:52)
      ... 21 more

      Comment


      • #4
        Re: Can't process inbound messages

        You are exactly right - you do not need to replace the ; with ^, HAPI will use the correct subfield seperator. The issue is with the message type field:

        MSH|;~\&|STAR|A|CAI|A|200209080200||ADT;A03;41|306 31362|D|2.3|30631362||AL||

        "ADT;A03:41" is invalid.

        Have your preprocessor replace the ":41"
        Code:
        message = message.replace(/:41/g,'');
        return message;
        FYI, the original preprocessor script should be
        Code:
        message = message.replace(/;/g,'^');
        return message
        Hope this helps!
        Chris Lang

        Comment


        • #5
          Re: Can't process inbound messages

          Here is the latest update. The value (3rd subfield) in the event type is the HBOC version number of the internal formatter routine for a particular HL7 event. Obviously a vendor "extension" I was struggling with the preprocessor statements so I manually removed the 3rd subfield and now the channel works. I will have to go back and play to better understand. Thanks for your assistance.

          David

          Comment

          Working...
          X