简体   繁体   English

使用最新的nHapi解析器版本解析HL7消息-C#

[英]Parsing HL7 message with newest nHapi parser version - C#

I'm starting to work with nHapi C#. 我开始使用nHapi C#。 I've tried to parse some message of HL7 2.6 version with NHapi 2.8.1 model but is not working. 我尝试使用NHapi 2.8.1模型解析HL7 2.6版本的某些消息,但无法正常工作。

How can I parse an HL7 message of a previous version (say 2.6) with a newer HL7 nHapi version (say 2.8)? 如何解析较早版本(例如2.6)和较新的HL7 nHapi版本(例如2.8)的HL7消息? 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: 或唯一的方法是使用NHapi.Base.Parser.PipeParser获取版本,然后使用特定的版本,例如:

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. 有点晚了,但是以我的经验,您必须使用相同的NHAPI dll版本解析HL7消息。 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. NHAPI版本dll是特定于该HL7版本的,对其他版本及其语法一无所知。

As a side note: This is my biggest problem with using NHAPI. 附带说明:这是使用NHAPI的最大问题。 It is too rigid in applying the HL7 standard. 应用HL7标准过于严格。 I've yet to come across an actual implementation that is 100% compliant. 我还没有遇到一个100%兼容的实际实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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