Search in sources :

Example 6 with HL7Message

use of org.apache.nifi.hl7.model.HL7Message in project nifi by apache.

the class SegmentEvaluator method evaluate.

public List<HL7Segment> evaluate(final Map<String, Object> objectMap) {
    final String segmentType = segmentTypeEvaluator.evaluate(objectMap);
    if (segmentType == null) {
        return Collections.emptyList();
    }
    final HL7Message message = (HL7Message) objectMap.get(Evaluator.MESSAGE_KEY);
    final List<HL7Segment> segments = message.getSegments(segmentType);
    return (segments == null) ? Collections.<HL7Segment>emptyList() : segments;
}
Also used : HL7Segment(org.apache.nifi.hl7.model.HL7Segment) HL7Message(org.apache.nifi.hl7.model.HL7Message)

Aggregations

HL7Message (org.apache.nifi.hl7.model.HL7Message)6 DefaultHapiContext (ca.uhn.hl7v2.DefaultHapiContext)2 HapiContext (ca.uhn.hl7v2.HapiContext)2 Message (ca.uhn.hl7v2.model.Message)2 PipeParser (ca.uhn.hl7v2.parser.PipeParser)2 HapiMessage (org.apache.nifi.hl7.hapi.HapiMessage)2 Test (org.junit.Test)2 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Charset (java.nio.charset.Charset)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Map (java.util.Map)1 Tree (org.antlr.runtime.tree.Tree)1 FlowFile (org.apache.nifi.flowfile.FlowFile)1 HL7Field (org.apache.nifi.hl7.model.HL7Field)1 HL7Segment (org.apache.nifi.hl7.model.HL7Segment)1 HL7Query (org.apache.nifi.hl7.query.HL7Query)1