【问题标题】:HL7 - Parsing Specimen Source (OBR-15) using nHapi in c#HL7 - 在 c# 中使用 nHapi 解析样本源 (OBR-15)
【发布时间】:2019-01-14 19:59:46
【问题描述】:

我想知道是否有任何在 C# 中使用 nHAPI 经验的优秀人士能够帮助新手处理 HL7 消息的 OBR-15 字段(样本源)?我已经四处寻找,我无法在网上找到任何文档来帮助我,所以我会很感激任何建议。

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

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

我已经尝试了所有可能的方法来形成这个字段,但没有成功。我总是在我发送的所有内容的前面出现一个 & 符号,这意味着该字段在下游应用程序中是不可读的:

OBR|1||||||||||||||&T034^^^^^^&血|||||||||||||||||||

我的 OBR-15 代码 sn-p(我只是把相关的东西放在这里,否则这个部分会很庞大):

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。如果我遗漏了什么或者您需要任何进一步的信息,请告诉我,我会提供。谢谢!

【问题讨论】:

    标签: c# hl7 nhapi


    【解决方案1】:

    我通过以下方式声明 OBR-15 解决了这个问题:

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

    【讨论】:

      猜你喜欢
      • 2016-03-16
      • 2017-10-10
      • 1970-01-01
      • 2012-05-28
      • 1970-01-01
      • 1970-01-01
      • 2015-05-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多