@SideEffectFree @SupportsBatching @InputRequirement(value=INPUT_REQUIRED) @Tags(value={"CCDA","healthcare","extract","attributes"}) @CapabilityDescription(value="Extracts information from an Consolidated CDA formatted FlowFile and provides individual 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>. For example, section.act_07.observation.name=Essential hypertension") public class ExtractCCDAAttributes extends AbstractProcessor
| Modifier and Type | Class and Description |
|---|---|
protected class |
ExtractCCDAAttributes.CDAValidationHandler |
| Modifier and Type | Field and Description |
|---|---|
private static char |
FIELD_SEPARATOR |
private org.apache.commons.jexl3.JexlEngine |
jexl |
private org.apache.commons.jexl3.JexlContext |
jexlCtx |
private static char |
KEY_VALUE_SEPARATOR |
private Map<String,Map<String,String>> |
processMap |
private List<PropertyDescriptor> |
properties |
static Relationship |
REL_FAILURE
REL_FAILURE - Value to be returned in case the processor fails
|
static Relationship |
REL_SUCCESS
REL_SUCCESS - Value to be returned in case the processor succeeds
|
private Set<Relationship> |
relationships |
static PropertyDescriptor |
SKIP_VALIDATION
SKIP_VALIDATION - Indicates whether to validate the CDA document after loading.
|
| Constructor and Description |
|---|
ExtractCCDAAttributes() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,String> |
addElement(Map<String,Object> map,
String prefix,
String key,
Object value,
Map<String,String> attributes)
Adds element to the attribute list based on the type
|
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
protected org.openhealthtools.mdht.uml.cda.ClinicalDocument |
loadDocument(InputStream inputStream,
Boolean skipValidation) |
protected void |
loadMappings() |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
protected Map<String,Object> |
processElement(String parent,
Object element,
Map<String,String> attributes)
Process elements children based on the parser mapping.
|
protected List<Object> |
processList(String key,
List value,
Map<String,String> attributes)
Iterate through the list and calls processElement to process each element
|
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTruecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprivate static final char FIELD_SEPARATOR
private static final char KEY_VALUE_SEPARATOR
private org.apache.commons.jexl3.JexlEngine jexl
private org.apache.commons.jexl3.JexlContext jexlCtx
private List<PropertyDescriptor> properties
private Set<Relationship> relationships
public static final PropertyDescriptor SKIP_VALIDATION
public static final Relationship REL_SUCCESS
public static final Relationship REL_FAILURE
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorprotected void init(ProcessorInitializationContext context)
init in class AbstractSessionFactoryProcessor@OnScheduled public void onScheduled(ProcessContext context) throws IOException
IOExceptionpublic void onTrigger(ProcessContext context, ProcessSession session)
onTrigger in class AbstractProcessorprotected Map<String,Object> processElement(String parent, Object element, Map<String,String> attributes)
parent - parent key for this element, used as a prefix for attribute keyelement - element to be processedattributes - map of attributes to populateprotected Map<String,String> addElement(Map<String,Object> map, String prefix, String key, Object value, Map<String,String> attributes)
map - object mapprefix - parent key as prefixkey - element keyvalue - element valueprotected List<Object> processList(String key, List value, Map<String,String> attributes)
key - key used while calling processElementvalue - value is the individual Object being processedattributes - map of attributes to populateprotected org.openhealthtools.mdht.uml.cda.ClinicalDocument loadDocument(InputStream inputStream, Boolean skipValidation)
protected void loadMappings()
Copyright © 2018 Apache NiFi Project. All rights reserved.