[英]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.