gpt4 book ai didi

javascript - mirth javascript 翻译返回错误

转载 作者:行者123 更新时间:2023-12-03 01:46:40 25 4
gpt4 key购买 nike

我正在使用mirth 应用程序来翻译 HL7 消息以推送到我的数据库中。

I am using the javascript to translate

method see the code below.
if (msg['PID']['PID.13']['PID.13.4'].toString() == null){
return "no email";
}
else{
return "email there";
}

但是我的输出是 编号: MH002079217v003 电子邮件 ID:${patentIdentification_phoneNumber_home1_emailAddress} 电话号码: 7022027430 名字:002

看到我获取的是变量名称而不是电子邮件,但未返回输出。

最佳答案

没有看到您的 channel ,我只能推测,但我相信您正在将变量名称作为您的值,因为该变量尚未在 map 中成功设置。

if (msg['PID']['PID.13']['PID.13.4'].toString()) {
connectorMap.put('patientIdentification_phoneNumber_home1_emailAddress', 'email');
}

在上面的示例中,如果电子邮件为空值,则 if 语句的正文将不会执行。然后,当您在速度中使用变量 ${patentIdentification_phoneNumber_home1_emailAddress} 时,如果该变量为 null,则无法替换该变量。

关于javascript - mirth javascript 翻译返回错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50602310/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com