繁体   English   中英

HL7 - 在c#中使用nHapi解析标本源(OBR-15)

[英]HL7 - Parsing Specimen Source (OBR-15) using nHapi in c#

我想知道在C#中使用nHAPI的经验是否能够用HL7消息的OBR-15字段(标本源)帮助新手? 我已经挖了,我在网上找不到任何文件来帮助我,所以我很感激任何建议。

我的问题是,我找不到使用nHAPI填充OBR-15字段的正确方法。 我希望发送一个看起来像这样的OBR片段(我从除了OBR15以外的所有其他字段中删除了数据,所以我的实际消息并不像这样):

OBR | 1个|||||||||||||| T034 ^血||||||||||||||||||||

我已经尽一切可能形成这个领域但没有成功。 我总是得到一个&符号,它出现在我正在发送的所有内容中,这意味着该字段在下游应用程序中是不可读的:

OBR | 1 ||||||||||||||&T034 ^^^^^^及血液||||||||||||||||||||

我的OBR-15代码片段(我刚刚在这里保留了相关的东西,否则这部分会很大):

using System;
using System.Collections.Generic;
using System.Web.Services;
using NHapi.Model.V24.Message;
using NHapi.Model.V24.Segment;
using NHapi.Model.V24.Group;
using System.Data;
using System.Text;
using NHapi.Base.Parser;
using NHapi.Model.V24.Datatype;
using System.Text.RegularExpressions;
using System.Configuration;
using System.Data.SqlClient;


namespace HL7WebService
{

    public class HL7Reporting : System.Web.Services.WebService
    {
        private ORU_R01 Create_ORU_R01(Dictionary <string,string> reportData, int reportNumber)
        {
            ORU_R01 oruR01 = new ORU_R01();

            // lots of stuff removed for clarity

            ORU_R01_ORDER_OBSERVATION oruR01OrderObs = oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION(1);
            OBR obr = oruR01OrderObs.OBR;

            // OBR-15 Specimen Source
            obr.SpecimenSource.SpecimenSourceNameOrCode.Text.Value = "T034";
            obr.SpecimenSource.SpecimenRole.Text.Value = "Blood";

            // lots of other stuff removed for clarity

            return oruR01;
        }
    }
}

我正在使用nHapi(v2.5.0.6)和visual studio 2015.如果我遗漏了任何内容或者您需要任何进一步的信息,请告诉我,我会提供。 谢谢!

我通过以下方式声明OBR-15来解决它:

obr.SpecimenSource.SpecimenSourceNameOrCode.Identifier.Value = "T034"; 
obr.SpecimenSource.Additives.Value = "Blood";

暂无
暂无

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

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