Class HL7v2
java.lang.Object
org.openehealth.ipf.platform.camel.hl7.HL7v2
Factory class for commonly used HL7-related expressions, predicates and
 processors.
- 
Method SummaryModifier and TypeMethodDescriptionstatic org.apache.camel.builder.ValueBuilderack()static org.apache.camel.builder.ValueBuilderack(AcknowledgmentCode acknowledgmentCode) static org.apache.camel.builder.ValueBuilderack(AcknowledgmentCode acknowledgmentCode, String message, ErrorCode errorCode) static MessagebodyMessage(Exchange exchange) Returns the HAPI Message from the message body.static org.apache.camel.builder.ValueBuilderstatic Predicatestatic PredicatemessageConformsTo(HapiContext hapiContext) static PredicatemessageConformsTo(Expression expression) static org.apache.camel.builder.ValueBuilderReturns a response to the message in the body, using the provided event type and trigger eventstatic Expressionset(String terserSpec, Expression value) static org.apache.camel.builder.ValueBuilderstaticResponse(String message) Returns a constant response message.static ProcessorReturns a validating Camel processor for a message.static ProcessorvalidatingProcessor(HapiContext context) Returns a validating Camel processor for a message.
- 
Method Details- 
get- Returns:
- Expression that extracts data from HL7 messages based on a HAPI Terser expression
 
- 
set- Returns:
- Expression that sets data in a HL7 messages based on a HAPI Terser expression
 
- 
ackpublic static org.apache.camel.builder.ValueBuilder ack()- Returns:
- Expression that creates an acknowledgement to a message
 
- 
ack- Returns:
- Expression that creates an acknowledgement to a message using a given code
 
- 
ackpublic static org.apache.camel.builder.ValueBuilder ack(AcknowledgmentCode acknowledgmentCode, String message, ErrorCode errorCode) - Returns:
- Expression that creates an acknowledgement to a message using a given code, message and error details
 
- 
responseReturns a response to the message in the body, using the provided event type and trigger event- Parameters:
- eventType- event type, e.g. ADT
- triggerEvent- trigger event, e.g. A01
- Returns:
- expression that generates the response for the body message
 
- 
staticResponseReturns a constant response message. Useful for mocks and tests only- Parameters:
- message- constant message
- Returns:
- expression that generates a static message using the same HapiContext as the message in the body
 
- 
validatingProcessorReturns a validating Camel processor for a message. The actual validation rules to be used is defined in the message's HapiContext. UnlikemessageConforms(), this processor throws an exception with details about the validation result instead of just returning true or false.- Returns:
- a validating Camel processor for a message
 
- 
validatingProcessorReturns a validating Camel processor for a message. The actual validation rules to be used is defined in the message's HapiContext. UnlikemessageConforms(), this processor throws an exception with details about the validation result instead of just returning true or false.- Parameters:
- context- HAPI context
- Returns:
- a validating Camel processor for a message
 
- 
messageConforms- Returns:
- Predicate that returns true if the message validates successfully
 
- 
messageConformsTo- Returns:
- Predicate that returns true if the message validates successfully using a dedicated HapiContext
 
- 
messageConformsTo- Returns:
- Predicate that returns true if the message validates successfully using an expression that returns
 a ValidationContext.
 
- 
bodyMessageReturns the HAPI Message from the message body. If the body is a string, it is parsed on the fly- Parameters:
- exchange- exchange
- Returns:
- HAPI message
- Throws:
- HL7Exception- HL7 Exception
 
 
-