在 CCDA Mirth 中开发重复 XML 片段

Develop Repeating XML segments in CCDA Mirth

我刚开发CCDAxml,需要生成多个模板ID标签,不喜欢在出站模板中定义结构,所以决定通过这个方法。

function data()
{
var clinicalDocument = new XML ("<clinicalDocument></clinicalDocument>");
clinicalDocument['realmCode']['@code']="US";
clinicalDocument['typeId']['@extension']="POCD_HD000040";
clinicalDocument['typeId']['@root']="2.16.840.1.113883.1.3";
clinicalDocument['templateId'][0]['@root']="2.16.840.1.113883.10.20.22.1.1";
clinicalDocument['templateId'][1]['@root']="2.16.840.1.113883.10.20.24.1.1";
clinicalDocument['templateId'][2]['@root']="2.16.840.1.113883.10.20.24.1.2";
clinicalDocument['documentationOf']['serviceEvent']['performer']['assignedEntity']['code']['@codeSystemName']="Healthcare Provider Taxonomy";
clinicalDocument['documentationOf']['serviceEvent']['performer']['assignedEntity']['code']['@displayName']="Adult Medicine";
logger.info("Data : "+clinicalDocument);
}
data();

我无法使用引用索引开发模板 ID。它说它是未定义的。显然我不能循环和反开发 output.It 表示未定义或错误。

我希望以这种格式输出。

<templateId root="2.16.840.1.113883.10.20.22.1.1"/> 
<templateId root="2.16.840.1.113883.10.20.24.1.1"/>
<templateId root="2.16.840.1.113883.10.20.24.1.2"/>

如果我能得到一些答案就太好了

我不是 Mirth 方面的专家,但是我有使用 CDA 的经验。我的建议是(如果可能的话,使用 Mirth)你使用 XSLT 来构建或转换 CDA,这是最好和更有效的方法。

希望有用。

我同意,有更好的方法可以为 CCDA 文档创建 header,但是,如果您想坚持使用您的解决方案,这里是缺少的部分:

var clinicalDocument = new XML ("<clinicalDocument></clinicalDocument>");

clinicalDocument['realmCode']['@code']="US";
clinicalDocument['typeId']['@extension']="POCD_HD000040";
clinicalDocument['typeId']['@root']="2.16.840.1.113883.1.3";

createSegment('templateId', clinicalDocument);
createSegment('templateId', clinicalDocument, 1);
createSegment('templateId', clinicalDocument, 2);

clinicalDocument['templateId'][0]['@root']="2.16.840.1.113883.10.20.22.1.1";
clinicalDocument['templateId'][1]['@root']="2.16.840.1.113883.10.20.24.1.1";
clinicalDocument['templateId'][2]['@root']="2.16.840.1.113883.10.20.24.1.2";

clinicalDocument['documentationOf']['serviceEvent']['performer']['assignedEntity']['code']['@codeSystemName']="Healthcare Provider Taxonomy";
clinicalDocument['documentationOf']['serviceEvent']['performer']['assignedEntity']['code']['@displayName']="Adult Medicine";

logger.info("Data : "+clinicalDocument);

好久没碰到这个问题了。从我目前所学的内容来看,以我发布的方式通过 Mirth 界面构建 XML 消息并不好。

这是因为一个主要原因: - 性能将受到很大影响,因为它是 Javascript 多行代码将被一个接一个地处理。

最佳实践: 最好的方法是根据业务需要在单独的 class 文件中构建具有分段功能(即过敏、药物、生命等)的 JAVA .jar 库,并通过 Mirth(Rhino 引擎)调用它们).

也请说出你的想法..