简体   繁体   English

HL7 ORM_o01 nHapi上的OBR提示

[英]OBR Repitions on HL7 ORM_o01 nHapi

Hi I am trying to parse HL7 ORM_o01 Messages but I get an error stating that I cannot get OBR repititions. 嗨,我正在尝试解析HL7 ORM_o01消息,但收到一条错误消息,指出我无法获得OBR替换。 I'm parsing using HL7 2.3 and this format according to the standard does allow OBR repitions. 我正在使用HL7 2.3解析,并且根据标准,此格式的确允许OBR复制。 Below is the HL7 message I'm trying to parse using nHapi . 以下是我正在尝试使用nHapi解析的HL7消息。 Is there any way to remove the repitition limit? 有什么方法可以取消重新分配限制吗?

    MSH|^~\&|TEST|LAB|FFLEX|TEST|20030723120318||ORM^O01|163|T|2.3||||NE|NE
    PID||36996-13|36996-13||WHITE^TEST^W^^|SMITH|19441215|F|NONE||1540 ECONSTITUTION^^LONG BEACH^CA^90001^^^||(480)795-3023|(480)795-3333||||00012350583|015348184||||
    NTE|1||Patient Level Comment Only
    PV1|1|I|ER||||10830^ATTEND^ING|20830^REF^ALICE^|30830^LEE^CONSULT^||||||||40830^LEE^ADMIT^||3501319|
    DG1|1||001.9^CHOLERA NOS|
    GT1|1|000614848|WHITE^TEST^W^^||1540 E CONSTITUTION^^LONGBEACH^CA^90001^^^|(505)791-1023||19441215|F||1|015348184|
    IN1|1|PLAN001|210012|BANNER CHOICE PLUS|445 W 5TH PLACE #108^^LOSANGELES^CA^90002||(800)333-4444|BHA001|VALLEY MC||||||PI|WHITE^TEST^W^^|1|19441215|155 E2nd^^LONG BEACH^CA^90001^^^||||||||||||N|||||123456|
    ORC|NW|000000064|||||||20030723114728|||20830^REF^ALICE^
    OBR|2|000000064||ALT^ALT^L|R|20030723114734|20030723115904||4~CC|Tech|N|||20030723115904|BLDV-BLOOD VENOUS^^^LA~LEFT ARM|40830^LEE^ADMIT^|||||||||||||||285.29^ANEMIA OF OTHERCHRONIC ILLNESS (285.29)^I9||||||||||||||
    NTE|1||N FASTING
    DG1|1||285.29^ANEMIA OF OTHER CHRONIC ILLNESS|
    OBR|2|000000064||ALB^ALBUMIN^L|R|20030723114734|20030723115904||4~CC|Tech|N|||20030723115904|BLDV-BLOOD VENOUS^^^LA~LEFT ARM|40830^LEE^ADMIT^|||||||||||||||285.29^ANEMIA OFOTHER CHRONIC ILLNESS (285.29)^I9||||||||||||||

Ok so with a bit of tinkering I found a method that works... 好吧,经过一番修补,我发现了一种可行的方法...

With the NHapi 2 core .dll files are required; 对于NHapi 2,需要核心.dll文件; NHapi.Base.dll and NHapi.Model.V23.dll NHapi.Base.dll和NHapi.Model.V23.dll

What you need to do is download the source files which you can do from sourceForge. 您需要做的是从sourceForge下载源文件。 Open the NHapi.Model.V23 project. 打开NHapi.Model.V23项目。 In the solution the explorer expand Group then go to the ORM_O01_OBSERVATION.cs file. 在解决方案中,资源管理器展开“组”,然后转到ORM_O01_OBSERVATION.cs文件。

inside the class constructor, refer below code: 在类构造函数中,请参见以下代码:

public ORM_O01_OBSERVATION(IGroup parent, IModelClassFactory factory) : base(parent, factory){
   try {
      this.add(typeof(OBX), true, false);
      this.add(typeof(NTE), false, true);
   } catch(HL7Exception e) {
      HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected error creating ORM_O01_OBSERVATION - this is probably a bug in the source code generator.", e);
   }
}

you need to change this.add(typeof(OBX), true, false); 您需要更改this.add(typeof(OBX), true, false); to read this.add(typeof(OBX), true, true); 读取this.add(typeof(OBX), true, true);

This will allow OBX to be repeated. 这将允许重复OBX。 You should be able to apply this concept on to any field you are experiencing a problem on. 您应该能够将此概念应用于遇到问题的任何领域。

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

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