Announcement

Collapse
No announcement yet.

Strict Parser Error

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

  • Strict Parser Error

    Hi there.
    I've never tried using the HL7 strict parser before and have given this a go but I am getting the following error returned by the channel when playing in a test message:

    Code:
     
     ER7Serializer error
    ERROR MESSAGE: Error converting ER7 to XML
    ca.uhn.hl7v2.HL7Exception: Can't XML-encode a GenericMessage.  Message must have a recognized structure.
     at ca.uhn.hl7v2.parser.XMLParser.doEncode(XMLParser.java:262)
     at ca.uhn.hl7v2.parser.Parser.encode(Parser.java:243)
     at com.mirth.connect.plugins.datatypes.hl7v2.ER7Serializer.toXML(ER7Serializer.java:199)
     at com.mirth.connect.donkey.server.channel.FilterTransformerExecutor.processConnectorMessage(FilterTransformerExecutor.java:91)
     at com.mirth.connect.donkey.server.channel.Channel.process(Channel.java:1266)
     at com.mirth.connect.donkey.server.channel.Channel.dispatchRawMessage(Channel.java:956)
     at com.mirth.connect.donkey.server.channel.SourceConnector.dispatchRawMessage(SourceConnector.java:175)
     at com.mirth.connect.server.controllers.DonkeyEngineController.dispatchRawMessage(DonkeyEngineController.java:520)
     at com.mirth.connect.server.servlets.MessageObjectServlet$2.run(MessageObjectServlet.java:193)
     at java.lang.Thread.run(Unknown Source)
    Can anyone point me in the right direction?

    I have strict parser enabled at source, and am using version 3.0.3.

    This is the message I am sending in:

    MSH|^~\&|||||||ADT^A08^ADT_A08|||2.4||||||windows-1252
    PID|||41509892||Teak^Anne||19591005000000


    Simon
    Last edited by seaston; 07-17-2014, 02:04 AM. Reason: Added more information

  • #2
    MSH.9.3 is defined by HL7 user table 0354, which defines the structure "ADT_A01" as encompassing the A01, A04, A08, and A13 trigger types. There is no such structure "ADT_A08". So your MSH.9 should look like "ADT^A08^ADT_A01".
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      Thanks Nick, but I would have expected the parser to respond with a nack rather than just error and give no response. Should this be considered as a bug?

      Comment


      • #4
        Originally posted by seaston View Post
        Thanks Nick, but I would have expected the parser to respond with a nack rather than just error and give no response. Should this be considered as a bug?
        Why would the parser do that? The parser's job is to serialize ER7 to XML and since it wasn't able to do that it spit out a specific, correct exception:

        Code:
        ca.uhn.hl7v2.HL7Exception: Can't XML-encode a GenericMessage.  Message must have a recognized structure.
         at ca.uhn.hl7v2.parser.XMLParser.doEncode(XMLParser.java:262)
         at ca.uhn.hl7v2.parser.Parser.encode(Parser.java:243)
         at com.mirth.connect.plugins.datatypes.hl7v2.ER7Serializer.toXML(ER7Serializer.java:199)
         at com.mirth.connect.donkey.server.channel.FilterTransformerExecutor.processConnectorMessage(FilterTransformerExecutor.java:91)
         at com.mirth.connect.donkey.server.channel.Channel.process(Channel.java:1266)
         at com.mirth.connect.donkey.server.channel.Channel.dispatchRawMessage(Channel.java:956)
         at com.mirth.connect.donkey.server.channel.SourceConnector.dispatchRawMessage(SourceConnector.java:175)
         at com.mirth.connect.server.controllers.DonkeyEngineController.dispatchRawMessage(DonkeyEngineController.java:520)
         at com.mirth.connect.server.servlets.MessageObjectServlet$2.run(MessageObjectServlet.java:193)
         at java.lang.Thread.run(Unknown Source)
        If you're auto-generating an HL7 ACK (set on the source connector response settings), then the response sent back will be a NACK. I just tested by using a TCP Sender to a TCP Listener. Sent in this message:

        Code:
        MSH|^~\&|||||||ADT^A08^ADT_A08|||2.4||||||windows-1252
        PID|||41509892||Teak^Anne||19591005000000
        Got back this response, as expected:

        Code:
        MSH|^~\&|MIRTH||||20140717075643||ACK^A08^ACK|20140717075643|P|2.4
        MSA|AE|1|An Error Occurred Processing Message.
        If I change MSH.9.3 to "ADT_A01", then everything processes successfully.
        Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

        Nicholas Rupley
        Work: 949-237-6069
        Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


        - How do I foo?
        - You just bar.

        Comment


        • #5
          Yes, point taken - I did not test this properly and I see it does autogenerate an acknowlegement. Thank you Nick.

          Comment

          Working...
          X