web stats
Strict Parser Error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2014, 02:03 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default 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 at 02:04 AM. Reason: Added more information
Reply With Quote
  #2  
Old 07-17-2014, 06:33 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

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.
Reply With Quote
  #3  
Old 07-17-2014, 06:36 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default

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?
Reply With Quote
  #4  
Old 07-17-2014, 06:57 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Quote:
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.
Reply With Quote
  #5  
Old 07-17-2014, 07:05 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default

Yes, point taken - I did not test this properly and I see it does autogenerate an acknowlegement. Thank you Nick.
Reply With Quote
Reply

Tags
strict parser

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 09:57 AM.


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