Menu

#256 EVN is not recognized (2.5.1)

2.2
open
nobody
None
5
2020-03-12
2020-03-09
No

Hi,

I'm getting an exception

ca.uhn.hl7v2.HL7Exception: The HL7 version 2.5.1
EVN is not recognized
at ca.uhn.hl7v2.parser.Parser.assertVersionExists(Parser.java:527) ~[387:hl7Service:5.0.10]
at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:208) ~[387:hl7Service:5.0.10]
at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:1018) ~[387:hl7Service:5.0.10]
at com.company.hl7Server.MessageHandler.process(MessageHandler.java:177) ~[387:hl7Service:5.0.10]
...

The start of my message, from the third party is like:

MSH|^~\&|SYSTEM|DFT|HOSPI|BILLING|20200227133531||DFT^P03|GEO000031|P|2.5.1
EVN|P03|20200227133531
followed by PID, PV1, FT1, IN1.

And the third party software is based on 2.5.1 (and says 2.5.1 in MSH).

How do I parse this without getting the error? I see there is an EVN in 2.5.1?
https://hapifhir.github.io/hapi-hl7v2/v251/apidocs/ca/uhn/hl7v2/model/v251/segment/EVN.html

Thanks
Daniel

Discussion

  • Christian Ohr

    Christian Ohr - 2020-03-09

    There is likely no proper HL7 segment separator after the 2.5.1 at the end of the MSH segment, so it treats the beginning of the next line as part of the version number.
    Segment separator must be a "\r" (corresponding to file saved with Mac linebreaks).

     
    • Daniel Brownell

      Daniel Brownell - 2020-03-12

      Thanks that was it.

       

Log in to post a comment.