简体   繁体   English

nHapi 向 REFI12 消息添加非标准段

[英]nHapi Add Non-Standard Segments to REFI12 Message

I'm using nHapi to create & read HL7 REF_I12 messages in HL7 V2.3 and V2.4.我正在使用 nHapi 在 HL7 V2.3 和 V2.4 中创建和读取 HL7 REF_I12 消息。

The standard nHapi REF_I12 Message is missing several segments I need - PRD, OBR, PV1, PV2, ORC and OBX.标准的 nHapi REF_I12 消息缺少我需要的几个段 - PRD、OBR、PV1、PV2、ORC 和 OBX。

How do I add these segments to the standard nHapi REF_I12 Message ?如何将这些段添加到标准 nHapi REF_I12 消息中?

Should I try and add them as custom Z segments ?我应该尝试将它们添加为自定义 Z 段吗?

How do I add these segments to the standard nHapi REF_I12 Message ?如何将这些段添加到标准 nHapi REF_I12 消息中?

You do not need to add those;您不需要添加这些; those are there.那些在那里。 You need to load them.你需要加载它们。

Just populating the message does not load the segment like PID in case of REF^I12 .REF^I12情况下,仅填充消息不会像PID那样加载段。 Please refer to the hierarchy here :请参考这里的层次结构:

等级制度

You need to load Provider_Contact before loading PRD segment.您需要在加载PRD段之前加载Provider_Contact

You can do it something like below:您可以执行以下操作:

msgREF_I12.GetPROVIDER_CONTACT(0).PRD......

You need to repeat the same for all the segments those are not loading.您需要对所有未加载的段重复相同的操作。 I think ORC is not the part of message;我认为ORC不是消息的一部分; so this will not work with it.所以这不起作用。

Please refer to the source code on GitHub :请参考GitHub 上的源代码:

 ///<summary> /// Returns first repetition of REF_I12_PROVIDER_CONTACT (a Group object) - creates it if necessary ///</summary> public REF_I12_PROVIDER_CONTACT GetPROVIDER_CONTACT() { REF_I12_PROVIDER_CONTACT ret = null; try { ret = (REF_I12_PROVIDER_CONTACT)this.GetStructure("PROVIDER_CONTACT"); } catch(HL7Exception e) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected error accessing data - this is probably a bug in the source code generator.", e); throw new System.Exception("An unexpected error ocurred", e); } return ret; }

Should I try and add them as custom Z segments ?我应该尝试将它们添加为自定义 Z 段吗?

If you add Z segment, it will be a Z segment.如果添加Z段,它将一个 Z 段。 It will not be the segment you are expecting.它不会是您期望的细分市场。

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

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