简体   繁体   English

Mirth-向OBR 16段添加新字段

[英]Mirth - Add new field to OBR 16 segment

Got an opportunity to work in Mirth to add an entry in the OBR field. 有机会在Mirth工作,可以在OBR字段中添加条目。 With the help of this forum, I was able to edit an existing data, that works perfectly fine. 在这个论坛的帮助下,我能够编辑现有的数据,效果很好。 But failing to add a data to a field which doesn't exist in the source HL7. 但是无法将数据添加到源HL7中不存在的字段中。 Below is the example, 下面是示例

SourceHL7 SourceHL7

PV2|||||||System Alert Off~0437689973~ABC-KOTHAI-AUS
OBR|1||ABCDEDFGH|754051^ABCEDEF^MDC|||20190225133500+0000||||||||||||||||||F

In the DestinationHL7, I want to check if PV2.7.2 has "KOTHAI", if yes, then update the OBR.16 as below 在DestinationHL7中,我要检查PV2.7.2是否具有“ KOTHAI”,如果是,则如下更新OBR.16。

OBR|1||ABCDEDFGH|754051^ABCEDEF^MDC|||20190225133500+0000|||||||||KOTHAI|||||||||F

With the below Javascript, I am able to see the last value in OBR is changed as M but no "KOTHAI" is available. 使用以下Javascript,我可以看到OBR中的最后一个值被更改为M,但是没有“ KOTHAI”可用。 I could see the change in Transformed data but not in Encoded data. 我可以在“转换数据”中看到更改,但在“编码数据”中看不到。 Could you let me know what am I doing wrong. 你能让我知道我在做什么错。

 tmp=msg; 
var code = tmp['ORU_R01.PATIENT_RESULT']['ORU_R01.PATIENT']['ORU_R01.VISIT']['PV2']['PV2.7'][2].toString();
if (code.indexOf("ARSTALL") != -1 )
{

tmp['ORU_R01.PATIENT_RESULT']['ORU_R01.ORDER_OBSERVATION']['OBR']['OBR.25'] = "M";
tmp['ORU_R01.PATIENT_RESULT']['ORU_R01.ORDER_OBSERVATION']['OBR']['OBR.16'] = "KOTHAI";
}else {

tmp['ORU_R01.PATIENT_RESULT']['ORU_R01.ORDER_OBSERVATION']['OBR']['OBR.25'] = "F";
}

Here is the same answer I gave on your forum post http://www.mirthcorp.com/community/forums/showthread.php?t=218996 这是我在您的论坛帖子http://www.mirthcorp.com/community/forums/showthread.php?t=218996上给出的相同答案

You're using the strict parser, so you need to make sure everything is named correctly depending on hl7 datatype. 您正在使用严格的解析器,因此需要确保根据hl7数据类型正确命名所有内容。

I think you want to do this: 我认为您想这样做:

tmp['ORU_R01.PATIENT_RESULT']['ORU_R01.ORDER_OBSERVATION']['OBR']['OBR.16']['XCN.1'] = "KOTHAI";

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

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