简体   繁体   English

如何在Apache Nifi中实现ExtractCCDAAttributes处理器?

[英]How to implement ExtractCCDAAttributes processor in Apache Nifi?

I am on the process to extract some healthcare Data. 我正在提取一些医疗数据。 Initially started with CCDA which is XML file format. 最初以XML文件格式CCDA开始。 How can i config the ExtractCCDAAttributes to extract the attributes with its value? 如何配置ExtractCCDAAttributes以提取其值与属性?

You can refer to this minimal flow that demonstrates use of ExtractCCDAAttributes processor. 您可以参考此最小流程,该流程演示了ExtractCCDAAttributes处理器的使用。

在此处输入图片说明

1) Get CDA Document (Processor type: GetFile ) 1) 获取CDA文档 (处理器类型: GetFile

This will create a FlowFile with the document contents. 这将创建带有文档内容的FlowFile。 The sample data file (XML) used is available here . 此处提供示例数据文件(XML)。

在此处输入图片说明

2) ExtractCCDAAttributes (Processor type: ExtractCCDAAttributes ) 2) ExtractCCDAAttributes (处理器类型: ExtractCCDAAttributes

This processor has a single property ( Skip Validation ) to indicate whether or not to validate CDA message values. 该处理器具有单个属性(“ Skip Validation ),用于指示是否验证CDA消息值。 We accept the default value of true . 我们接受默认值true The processor outputs individual attributes as FlowFile attributes. 处理器将各个属性输出为FlowFile属性。

在此处输入图片说明

3) Success (Processor type: LogAttribute ) 3) 成功 (处理器类型: LogAttribute

This is to log attributes upon success of ExtractCCDAAttributes processor. 这是在ExtractCCDAAttributes处理器成功执行后记录属性。

4) Failure (Processor type: LogAttribute ) 4) 失败 (处理器类型: LogAttribute

This is to log attributes upon failure of ExtractCCDAAttributes processor. 这是在ExtractCCDAAttributes处理器发生故障时记录属性。

Verification: 验证:

When the sample file is processed, two of the (many) attributes logged by the Success processor are: 处理示例文件时成功处理器记录的两个(许多)属性是:

Key: 'vitalSignsSection.organizer_01.observations_02.code.displayName'
    Value: 'Intravascular Systolic'

Key: 'vitalSignsSection.organizer_02.observations_03.code.displayName'
    Value: 'Intravascular Systolic'

In the sample file, the two places where these appear are on lines 3592 and 3700: 在示例文件中,它们出现的两个位置在第3592和3700行上: 在此处输入图片说明

and

在此处输入图片说明

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

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