简体   繁体   中英

Parsing HL7 message with newest nHapi parser version - C#

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");

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM