Package ca.uhn.hl7v2.validation.impl

Examples of ca.uhn.hl7v2.validation.impl.NoValidation


        // Helper class
    }

    private static Parser getParser() {
        PipeParser pipeParser = new PipeParser();
        pipeParser.setValidationContext(new NoValidation());
        return pipeParser;
    }
View Full Code Here


     * @return XML String
     */
    private String serializeHL7toXML(String rowHL7) {
        Parser xmlParser = new DefaultXMLParser();
        Parser ediParser = new PipeParser();
        ediParser.setValidationContext(new NoValidation());
        String xmlDoc = null;
        try {
            Message message = ediParser.parse(rowHL7);
            ConformanceProfileRule rule = new ConformanceProfileRule();
        ValidationException[] exs = rule.test(message);
View Full Code Here

     * Convenience factory method which returns an instance that has a
     * {@link NoValidation NoValidation validation context}.
     */
    public static PipeParser getInstanceWithNoValidation() {
        PipeParser retVal = new PipeParser();
        retVal.setValidationContext(new NoValidation());
        return retVal;
    }
View Full Code Here

        "PV1||O||||||||||||||||||||||||||||||||||||||||||||||||||\r" +
        "AL1|1||^PORK^|\r" +
        "AL1|2||^PENICILLIN^|";
   
    GenericParser parser = new GenericParser();
    parser.setValidationContext(new NoValidation());
    Message msg = parser.parse(msgString);
    System.out.println(msg.getClass().getName());
     
  }
View Full Code Here

  /** Creates a new instance of TestPanel */
  public TestPanel() throws HL7Exception {

    this.parser = new GenericParser();
    // Relax all validation
    this.parser.setValidationContext(new NoValidation());
    connectionHub = ConnectionHub.getInstance();
    router = new MessageTypeRouter();
    initUI();
    BasicConfigurator.configure(appender);
  }
View Full Code Here

        // replace \n with \r as HL7 uses 0x0d = \r as segment terminators and HAPI only parses with \r
        body = body.replace('\n', '\r');

        Parser parser = new PipeParser();
        if (!validate) {
            parser.setValidationContext(new NoValidation());
        }
        return parser.parse(body);
    }
View Full Code Here

    }

    static String encode(Message message, boolean validate) throws HL7Exception {
        Parser parser = new PipeParser();
        if (!validate) {
            parser.setValidationContext(new NoValidation());
        }
        return parser.encode(message);
    }
View Full Code Here

        assertMockEndpointsSatisfied();
    }   

    protected RouteBuilder createRouteBuilder() throws Exception {
        HapiContext hapiContext = new DefaultHapiContext();
        hapiContext.setValidationContext(new NoValidation());
        Parser p = new GenericParser(hapiContext);
        hl7 = new HL7DataFormat();
        hl7.setParser(p);
       
        return new RouteBuilder() {
View Full Code Here

        assertEquals("O01", new Terser(received).get("MSH-9-2"));
    }   

    protected RouteBuilder createRouteBuilder() throws Exception {
        HapiContext hapiContext = new DefaultHapiContext();
        hapiContext.setValidationContext(new NoValidation());
        Parser p = new GenericParser(hapiContext);
        hl7 = new HL7DataFormat();
        hl7.setParser(p);
       
        return new RouteBuilder() {
View Full Code Here

     * Convenience factory method which returns an instance that has a
     * {@link NoValidation NoValidation validation context}.
     */
    public static PipeParser getInstanceWithNoValidation() {
        PipeParser retVal = new PipeParser();
        retVal.setValidationContext(new NoValidation());
        return retVal;
    }
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.validation.impl.NoValidation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.