0

刚开发CCDA xml,需要生成多个模板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。它说它是未定义的。显然我也不能循环和计数器来开发输出。它说是未定义或错误。

我希望以这种格式输出。

<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"/>

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

4

3 回答 3

1

我同意,有更好的方法来为 CCDA 文档创建标题,但是,如果你想坚持你的解决方案,这里缺少部分:

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);
于 2016-09-15T16:54:14.067 回答
1

我碰巧在很长一段时间后遇到了这个问题。从我到目前为止所学到的知识来看,通过 Mirth Interface 以我发布的方式构建 XML 消息并不好。

这是因为一个主要原因: - 性能会受到很大影响,因为它是具有多行数的 Javascript,并且代码将被一一处理。

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

也请说出你的想法。。

于 2017-06-02T17:59:44.283 回答
0

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

希望有用。

于 2016-09-15T09:34:29.447 回答