[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-28 Thread Kedar Chitale (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15946553#comment-15946553
 ] 

Kedar Chitale commented on NIFI-3147:
-

[~jfrazee] Can you weigh in on this please. This contribution has gone through 
2 rounds of review and all comments have been addressed. Guess we are very near 
to get this to closure. As [~joewitt] mentioned, if we can get this merged to 
master, it can be incorporated into the release.

> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create individual attributes 
> for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15946539#comment-15946539
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@kedarchitale +1 will merge in the morning.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create individual attributes 
> for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-28 Thread Joseph Witt (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15945451#comment-15945451
 ] 

Joseph Witt commented on NIFI-3147:
---

[~kedarchitale] i'm totally good with this ending up on 1.2.0 and think this is 
really awesome.  What is hard to tell though is whether this is close to a 
merge.  You and [~jfrazee] have had some great convo.  If you two could discuss 
a bit on when this will land on master that would really help us plan/close in 
on the release.   Thanks!

> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create individual attributes 
> for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-28 Thread Kedar Chitale (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15945374#comment-15945374
 ] 

Kedar Chitale commented on NIFI-3147:
-

>From Healthcare perspective, CCDA is a significant ask, and already have 3 
>prospects who use NiFi and wanting this.While this is not a show stopper, 
>would it be worth reconsidering the tagging of this contribution for release 
>1.2.0? The idea of having this open sourced is to have more contributors 
>adding mapping for various sections and unless this gets in the release, how 
>would contributors add these mappings.Other sections can be easily added as 
>patches to the mapping file.

> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create individual attributes 
> for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-28 Thread Joseph Witt (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15945097#comment-15945097
 ] 

Joseph Witt commented on NIFI-3147:
---

removed the fix version for now.  please by all means keep making progress but 
wanted to get this off the things we must wait on for the 1.2.0 release.

> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create individual attributes 
> for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15926210#comment-15926210
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user kedarchitale commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@jfrazee thanks for the second review. the comments have been addressed, 
let me know if anything has been missed.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, parser
> Fix For: 1.2.0
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create individual attributes 
> for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899551#comment-15899551
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@kedarchitale We're getting pretty close. In addition to the per-line 
comments I noticed that you have DOS-style CRLF endings. Can you changes these 
to newlines only using dos2unix or something similar?


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, parser
> Fix For: 1.2.0
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create individual attributes 
> for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899541#comment-15899541
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r104681870
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/resources/docs/org.apache.nifi.processors.ccda.ExtractCCDAAttributes/additionalDetails.html
 ---
@@ -0,0 +1,63 @@
+
+
+
+
+
+ExtractCCDAAttributes
+
+
+
+
+
+Apache NiFi C-CDA Processor
+
+C-CDA Processor Bundle provides parser for Consolidated-CDA 
documents
+This processor parses C-CDA and sets attributes as FlowFile 
attributes. The attributes are named as Parent dot 
Key.
+If the Parent is repeating, the naming will be Parent 
underscore Parent Index dot Key.
+
+Example Attribute Output
+
+
+problemSection.act.observation.problemStatus.code.code=33999-4
+
problemSection.act.observation.problemStatus.code.codeSystem=2.16.840.1.113883.6.1
+problemSection.act.observation.problemStatus.code.codeSystemName=LOINC
+problemSection.act.observation.problemStatus.code.displayName=Status
+problemSection.act.observation.problemStatus.statusCode.code=completed
+problemSection.act.observation.statusCode.code=completed
+
+
+Example Parser Mapping
+
+This processor is driven by a mapping file which specifies the 
element relationships. For example
+
+
org.openhealthtools.mdht.uml.cda.consol.impl.ProblemObservationImpl=id#element.ids\
+@values#element.values[0]\
+@statusCode#element.statusCode\
+@effectiveTime#element.effectiveTime\
+@negation#element.negationInd\
+@problemStatus#element.problemStatus
+
org.openhealthtools.mdht.uml.cda.consol.impl.ProblemStatusImpl=id#element.id\
+@code#element.code\
+@values#element.values[0]\
+@statusCode#element.statusCode
+
+
+References
+
+These mappings are defined as per the implementation guide -http://www.hl7.org/documentcenter/public/standards/dstu/CDAR2_IG_IHE_CONSOL_DSTU_R1dot1_2012JUL.zip;>HL7
 Implementation Guide for CDA® Release 2
--- End diff --

Should use the mdash and reg HTML entities in this.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, parser
> Fix For: 1.2.0
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create individual attributes 
> for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899540#comment-15899540
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r104681755
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,329 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.util.StopWatch;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides individual attributes "
++ "as FlowFile attributes. The attributes are named as  
 . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private JexlEngine jexl = null; // JEXL Engine to execute code for 
mapping
+private JexlContext jexlCtx = null; // JEXL Context to hold element 
being processed
+
+private List properties;
+private Set relationships;
+
+/**
+ * SKIP_VALIDATION - Indicates whether to validate the CDA document 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899538#comment-15899538
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r104681504
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,329 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.util.StopWatch;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides individual attributes "
++ "as FlowFile attributes. The attributes are named as  
 . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private JexlEngine jexl = null; // JEXL Engine to execute code for 
mapping
+private JexlContext jexlCtx = null; // JEXL Context to hold element 
being processed
+
+private List properties;
+private Set relationships;
+
+/**
+ * SKIP_VALIDATION - Indicates whether to validate the CDA document 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899534#comment-15899534
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r104681118
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,329 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.util.StopWatch;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides individual attributes "
++ "as FlowFile attributes. The attributes are named as  
 . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private JexlEngine jexl = null; // JEXL Engine to execute code for 
mapping
+private JexlContext jexlCtx = null; // JEXL Context to hold element 
being processed
+
+private List properties;
+private Set relationships;
+
+/**
+ * SKIP_VALIDATION - Indicates whether to validate the CDA document 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899532#comment-15899532
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r104680946
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-nar/src/main/resources/META-INF/LICENSE
 ---
@@ -0,0 +1,238 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other 
modifications
+  represent, as a whole, an original work of authorship. For the 
purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces 
of,
+  the Work and Derivative Works thereof.
+
+  "Contribution" shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright 
owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, "submitted"
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source code control 
systems,
+  and issue tracking systems that are managed by, or on behalf of, the
+  Licensor for the purpose of discussing and improving the Work, but
+  excluding communication that is conspicuously marked or otherwise
+  designated in writing by the copyright owner as "Not a Contribution."
+
+  "Contributor" shall mean Licensor and any individual or Legal Entity
+  on behalf of whom a Contribution has been received by Licensor and
+  subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+  copyright license to reproduce, prepare Derivative Works of,
+  publicly display, publicly perform, sublicense, and distribute the
+  Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899529#comment-15899529
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r104680681
  
--- Diff: nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-nar/pom.xml ---
@@ -0,0 +1,40 @@
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+
+org.apache.nifi
+nifi-ccda-bundle
+1.2.0-SNAPSHOT
+
+
+nifi-ccda-nar
+nar
+
+true
+true
+
+
+
+
+org.apache.nifi
+nifi-ccda-processors
+1.2.0-SNAPSHOT
--- End diff --

Let's remove this and add a dependencyManagement section to the CCDA root 
pom.xml


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, parser
> Fix For: 1.2.0
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create individual attributes 
> for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-05 Thread Joey Frazee (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15896548#comment-15896548
 ] 

Joey Frazee commented on NIFI-3147:
---

[~joewitt] Expect to have this merged in the next couple days, so we're good 
for 1.2.0.

> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, json, parser
> Fix For: 1.2.0
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-03-02 Thread Joseph Witt (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15892537#comment-15892537
 ] 

Joseph Witt commented on NIFI-3147:
---

[~jfrazee] do you happen to have cycles to do the final review?  Given all the 
work put into this thus far and progress on review I've set the fix version for 
1.2.0 so we def grab in the next release or make a conscious choice to move it 
forward.

> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>Assignee: Joseph Witt
>  Labels: attributes, ccda, healthcare, json, parser
> Fix For: 1.2.0
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15882952#comment-15882952
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user kedarchitale commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@jfrazee thanks for the detailed feedback. all comments have been 
addressed, do let me know if any further changes are required


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878698#comment-15878698
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@kedarchitale I left some comments on some things that we need to change. 
Most are small but important modifications, but there's one thing that after 
some thought I think the processor is doing that it shouldn't: it's not the 
right place for transforming the output to JSON, especially since we have 
AttributesToJSON which will make it easy to do the same thing.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878690#comment-15878690
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102510825
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
+private Map 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878680#comment-15878680
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102509370
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
+private Map 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878650#comment-15878650
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102508342
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
+private Map 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878552#comment-15878552
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102500181
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
+private Map 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878547#comment-15878547
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102498955
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
+private Map 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878507#comment-15878507
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102494720
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
+private Map 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878497#comment-15878497
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102493388
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
+private Map 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878495#comment-15878495
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102492802
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
+private Map 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878453#comment-15878453
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102486824
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
+private Map 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878444#comment-15878444
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102486355
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/java/org/apache/nifi/processors/ccda/ExtractCCDAAttributes.java
 ---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.ccda;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.commons.jexl3.JexlBuilder;
+import org.apache.commons.jexl3.JexlContext;
+import org.apache.commons.jexl3.JexlEngine;
+import org.apache.commons.jexl3.JexlExpression;
+import org.apache.commons.jexl3.MapContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.openhealthtools.mdht.uml.cda.CDAPackage;
+import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
+import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage;
+import org.openhealthtools.mdht.uml.cda.consol.ConsolPackage;
+import org.openhealthtools.mdht.uml.cda.hitsp.HITSPPackage;
+import org.openhealthtools.mdht.uml.cda.ihe.IHEPackage;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
+import org.openhealthtools.mdht.uml.cda.util.CDAUtil.ValidationHandler;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+@SideEffectFree
+@SupportsBatching
+@InputRequirement(Requirement.INPUT_REQUIRED)
+@Tags({"CCDA", "healthcare", "extract", "JSON", "attributes"})
+@CapabilityDescription("Extracts information from an Consolidated CDA 
formatted FlowFile and provides JSON as FlowFile content "
++ "and individual attributes as FlowFile attributes. The 
attributes are named as   . "
++ "If the Parent is repeating, the naming will be  
   . "
++ "For example, section.act_07.observation.name=Essential 
hypertension")
+public class ExtractCCDAAttributes extends AbstractProcessor {
+
+private static final String APPLICATION_JSON = "application/json";
+private static final char FIELD_SEPARATOR = '@';
+private static final char KEY_VALUE_SEPARATOR = '#';
+
+private Map> processMap = new 
LinkedHashMap>(); // stores mapping data for Parser
+private List timingStats = new ArrayList(); // stores 
timing statistics
--- End diff --

Instead 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878361#comment-15878361
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102478735
  
--- Diff: 
nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/src/main/resources/docs/org.apache.nifi.processors.ccda.ExtractCCDAAttributes/additionalDetails.html
 ---
@@ -0,0 +1,108 @@
+
+
+
+
+
+ExtractCCDAAttributes
+
+
+
+
+
+Apache NiFi CCDA Processor
+
+CCDA Processor Bundle provides parser for Consolidated-CDA 
documents
+This processor provides JSON in FlowFile content. Pretty 
Printing can be set as a property while configuring the processor.
+Individual attributes are set as FlowFile attributes. The 
attributes are named as Parent dot Key.
+If the Parent is repeating, the naming will be Parent 
underscore Parent Index dot Key.
+
+Example JSON Output
+
+
+"observation": [
+  {
+"id": [
+  {
+"extension": "121387536",
+"root": "2.16.840.1.113883.1.13.9.999239"
+  }
+],
+"values": {
+  "code": "194828000",
+  "codeSystem": "2.16.840.1.113883.6.96",
+  "codeSystemName": "SNOMED CT",
+  "displayName": "Angina (disorder)",
+  "translations": [
+{
+  "code": "413.9",
+  "codeSystem": "2.16.840.1.113883.6.103",
+  "codeSystemName": "ICD-9CM (diagnosis codes)",
+  "displayName": "Other and unspecified angina pectoris"
+}
+  ]
+},
+"statusCode": {
+  "code": "completed"
+},
+"effectiveTime": {
+  "low": "20130711"
+}
+  }
+]
+
+
+Example Attribute Output
+
+
+problemSection.act_04.observation.effectiveTime.low=20130711
+problemSection.act_04.observation.id.extension=121387536
+
problemSection.act_04.observation.id.root=2.16.840.1.113883.1.13.9.999239
+problemSection.act_04.observation.statusCode.code=completed
+problemSection.act_04.observation.values.code=194828000
+
problemSection.act_04.observation.values.codeSystem=2.16.840.1.113883.6.96
+problemSection.act_04.observation.values.codeSystemName=SNOMED CT
+problemSection.act_04.observation.values.displayName=Angina (disorder)
+problemSection.act_04.observation.values.translations.code=413.9
+
problemSection.act_04.observation.values.translations.codeSystem=2.16.840.1.113883.6.103
+
problemSection.act_04.observation.values.translations.codeSystemName=ICD-9CM 
(diagnosis codes)
+
problemSection.act_04.observation.values.translations.displayName=Other and 
unspecified angina pectoris
+problemSection.act_04.statusCode.code=active
+
+
+Example Parser Mapping
+
+This processor is driven by a mapping file which specifies the 
element relationships. For example
+
+
org.openhealthtools.mdht.uml.cda.consol.impl.ProblemObservationImpl=id#element.ids\
+@values#element.values[0]\
+@statusCode#element.statusCode\
+@effectiveTime#element.effectiveTime\
+@negation#element.negationInd\
+@problemStatus#element.problemStatus
+
org.openhealthtools.mdht.uml.cda.consol.impl.ProblemStatusImpl=id#element.id\
+@code#element.code\
+@values#element.values[0]\
+@statusCode#element.statusCode
+
+
+References
+
+These mappings are defined as per the implementation guide -http://www.hl7.org/documentcenter/public/standards/dstu/CDAR2_IG_IHE_CONSOL_DSTU_R1dot1_2012JUL.zip;>HL7
 Implementation Guide for CDA® Release 2
+
+CCDA sample file used in this bundle for testing is from https://github.com/chb/sample_ccdas/blob/master/Cerner%20Samples/Transition_of_Care_Referral_Summary.xml;>Cerner
 Sample - Transition of Care Referral Summary
--- End diff --

Since the Cerner test file isn't included in the testing anymore, need to 
remove this from the additionalDetails.html


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: 

[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878357#comment-15878357
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1312#discussion_r102478227
  
--- Diff: nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-processors/pom.xml ---
@@ -0,0 +1,83 @@
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+
+org.apache.nifi
+nifi-ccda-bundle
+1.2.0-SNAPSHOT
+
+
+nifi-ccda-processors
+jar
+
+
+
+org.apache.nifi
+nifi-api
+
+
+org.apache.nifi
+nifi-processor-utils
+
+   
--- End diff --

These need to be de-indented.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15867944#comment-15867944
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@kedarchitale Fantastic. Will start digging into the changes.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15867894#comment-15867894
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user kedarchitale commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@jfrazee the xml file for testing is no longer required as using mdht api 
to generate test data is a better approach and even followed in the mdht 
library.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-02-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15856007#comment-15856007
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@kedarchitale Thanks for the explanation. I just wanted to make sure we 
discussed the packaging. The XML file is potentially an issue though. Even if 
it's an open license, without knowing what the contributor intended the 
particular license to be, we don't know if it's actually compatible with ASLv2. 
Since this will end up in the source release we have to be 100% sure about this.

I want to get this wrapped up this week so I'm going to try to email 
@jmandel and @gjewell and see if they can clarify.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-01-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15837801#comment-15837801
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user kedarchitale commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@jfrazee The consideration of separate bundle was based on SOLID principle. 
The HL7 bundle address HL7 V2 which is ascii/text protocol with XML support 
where as CDA is completely XML based. HL7 V3 is based on RIM model and CDA is 
one specific domain of V3 for clinical documents. The adoption of HL7 V3 varies 
as compared to legacy HL7 V2. The underlying parsers are different (HAPI and 
MDHT). CDA bundle is based on mapping, which will grow as more sections/entries 
are mapped by contributors. For now, keeping them as separate bundles makes 
sense, as they can be used/maintained separately without impacting each other.

Regarding the XML file, this is used for unit testing only and not shipped 
with the bundle runtime deployment. This is a Cerner Sample that was shared 
over github by @jmandel and not clear about the exact origins of this file. The 
markdown for that repository states that sample documents should be available 
under an open license, and ASLv2 being would be such an open license.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-01-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15830859#comment-15830859
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user jfrazee commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@kedarchitale I'm going to try picking up the review on this so we can get 
this done. Thanks for already making all the changes Joe suggested!

I have two questions now. First, do you think there's any sense in moving 
this over into the existing HL7 bundle? I don't have strong opinions but I 
think keeping the HL7 related stuff together would be good. Would love to know 
your perspective.

Second, I can't verify the source + licensing of the 
Transition_of_Care_Referral_Summary.xml example file that's used. Based on your 
docs I know you got it from chb/sample_ccdas (thanks for making that clear too) 
but it's not obvious that we can say it's ASLv2. Tagging @jmandel who I think 
made the contrib to that repo in case he can help clear it up.


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2017-01-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15823368#comment-15823368
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user joewitt commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@kedarchitale thanks for the PR.  I will do my best to review this in more 
detail and get back to you this week.  Thanks!


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2016-12-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15748364#comment-15748364
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user kedarchitale commented on the issue:

https://github.com/apache/nifi/pull/1312
  
What is the next step on this? Do I have to do anything or this would be 
reviewed by members of dev community and then merged with the master?


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741678#comment-15741678
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user kedarchitale commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@joewitt, I have moved the contents of README.md to additionalDetails.html


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2016-12-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15737288#comment-15737288
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user kedarchitale commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@joewitt, Thanks for the appreciation and early feedback. Will look into 
adding documentation to 'additionalDetails'. The properties file contains 
mappings for CCDA, which would not change once all sections are mapped, however 
wanted to externalize these from java code, so kept it in the bundle as 
resources. These properties would not be changed by NiFi user (at least don't 
foresee a need) and ideally should be changed and tested by contributors 
mapping any additional sections of CCDA. Considering this, options of having it 
as a single processor property or externalizing it from the bundle were not 
suitable. Will post on the dev list seeking feedback from the community. Thanks 
again for the feedback!


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2016-12-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15737238#comment-15737238
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user joewitt commented on the issue:

https://github.com/apache/nifi/pull/1312
  
@kedarchitale I've done  quick scan through the contrib so not a thorough 
evaluation.  But I want to immediately say thank you for what is quite 
obviously a very thoughtful and detailed contribution.  You appear to have been 
very thoughtful about license and notice and following convention around which 
is extremely appreciated. Nice!  

I also noticed you provided excellent documentation for the processor.  
Instead of that being expressed in the readme file could you take a look at 
some of the example processors that take advantage of the 'additionalDetails' 
which means this wonderful information becomes part of the automated 
documentation and available to the user through the application?

I noticed there was a properties file in the src/main/resources.  I haven't 
looked into how that ties in but if this is something you'll want the user to 
be able to edit perhaps we can consider some alternative approaches.  One 
challenge with properties files is that if it is meant to be user editable then 
it can become cluster unfriendly.  So perhaps those things could be expressed 
as processor properties instead or even as a single processor property.  Not 
sure and perhaps you've already thought through that.  Just wanted to mention 
it.

Anyway - great stuff and thanks for contributing!


> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2016-12-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15737165#comment-15737165
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

Github user kedarchitale commented on the issue:

https://github.com/apache/nifi/pull/1312
  
CI build passed but AppVeyor build is failing due to unrelated issue

Running org.apache.nifi.processors.standard.TestListFile
Tests run: 12, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.367 sec 
<<< FAILURE! - in org.apache.nifi.processors.standard.TestListFile
testAttributesSet(org.apache.nifi.processors.standard.TestListFile)  Time 
elapsed: 0.203 sec  <<< FAILURE!
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at 
org.apache.nifi.processors.standard.TestListFile.testAttributesSet(TestListFile.java:675)



> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2016-12-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15734934#comment-15734934
 ] 

ASF GitHub Bot commented on NIFI-3147:
--

GitHub user kedarchitale opened a pull request:

https://github.com/apache/nifi/pull/1312

NIFI-3147 CCDA Processor

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [Y] Is there a JIRA ticket associated with this PR? Is it referenced 
 in the commit message?

- [Y] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.

- [Y] Has your PR been rebased against the latest commit within the target 
branch (typically master)?

- [Y] Is your initial contribution a single, squashed commit?

### For code changes:
- [N/A ] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
- [Y] Have you written or updated unit tests to verify your changes?
- [Y] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
- [Y] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
- [Y] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
- [Y] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?

### For documentation related changes:
- [Y] Have you ensured that format looks appropriate for the output in 
which it is rendered?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.

https://issues.apache.org/jira/browse/NIFI-3147

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/kedarchitale/nifi NIFI-3147

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/1312.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1312


commit 4cc6062fc23b62fd2528d1722cb2475824e1bf8a
Author: kedarchitale 
Date:   2016-12-09T10:15:19Z

NIFI-3147 CCDA Processor
https://issues.apache.org/jira/browse/NIFI-3147




> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2016-12-05 Thread Aldrin Piri (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15722560#comment-15722560
 ] 

Aldrin Piri commented on NIFI-3147:
---

Background information on CCDA:  
https://www.healthit.gov/policy-researchers-implementers/consolidated-cda-overview

> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-3147) Build processor to parse CCDA into attributes and JSON

2016-12-05 Thread Joseph Witt (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15722483#comment-15722483
 ] 

Joseph Witt commented on NIFI-3147:
---

working with Kedar on how to make a contribution.

   https://github.com/kedarchitale/nifi/tree/NIFI-3147

> Build processor to parse CCDA into attributes and JSON
> --
>
> Key: NIFI-3147
> URL: https://issues.apache.org/jira/browse/NIFI-3147
> Project: Apache NiFi
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Kedar Chitale
>  Labels: attributes, ccda, healthcare, json, parser
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Accept a CCDA document, Parse the document to create JSON text and individual 
> attributes for example code.codeSystemName=LOINC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)