2

I'm starting to work with nHapi C#. I've tried to parse some message of HL7 2.6 version with NHapi 2.8.1 model but is not working.

How can I parse an HL7 message of a previous version (say 2.6) with a newer HL7 nHapi version (say 2.8)? There some way to do this? Or the only way is to get the version with NHapi.Base.Parser.PipeParser and than use the specific version like:

var header = (NHapi.Model.V281.Segment.MSH) hl7Msg.GetStructure("MSH");
rmpt
  • 606
  • 1
  • 4
  • 24

1 Answers1

0

A bit late, but in my experience you must parse an HL7 message using the same NHAPI dll version. So the answer to your question would be no. The NHAPI version dll's are specific for that HL7 version and know nothing about other versions and their syntax.

As a side note: This is my biggest problem with using NHAPI. It is too rigid in applying the HL7 standard. I've yet to come across an actual implementation that is 100% compliant.

Hintham
  • 1,078
  • 10
  • 29
  • thanks for sharing your experience and let us know we are not alone. It's a shame that nhapi does not have a retro compatibility function or event a side tool to this. Seems that we have to implement a module for each specific device/version. – rmpt May 30 '17 at 14:21