anchor.diff:  Sample:
   
   [source,java]
  -----------------------------------------------------------------------
  +----
   import static org.apache.camel.component.hl7.HL7.messageConformsTo;
   import ca.uhn.hl7v2.validation.impl.DefaultValidation;
  -...
   
      // Use standard or define your own validation rules
      ValidationContext defaultContext = new DefaultValidation(); 
  
positive.code: can be easily reused:
  
  [source,java]
  ----------------------------------------------------------------------------------------------------------------
  import static org.apache.camel.component.hl7.HL7.messageConformsTo;
  import static org.apache.camel.component.hl7.HL7.messageConforms
  ...
  
    HapiContext hapiContext = new DefaultHapiContext();
    hapiContext.getParserConfiguration().setValidating(false); // don't validate during parsing
  
negative.code: versions 2.4 and 2.5 then the following dependencies must be added:
  
  [source,xml]
  ----
  <dependency>
      <groupId>ca.uhn.hapi</groupId>
      <artifactId>hapi-structures-v24</artifactId>
  