+ "EVN|A31|200903230934\r\n"
+ "PID|1||29^^CAISI_1-2^PI~\"\"||Test300^Leticia^^^^^L||19770202|M||||||||||||||||||||||";
Message validMessage = new PipeParser().parse(validMessageString);
// Load a conformance profile
ProfileParser profileParser = new ProfileParser(false);
RuntimeProfile profile = profileParser.parseClasspath("ca/uhn/hl7v2/examples/profiles/ADT_A31.xml");
// Create a conformance validator, and validate
DefaultValidator validator = new DefaultValidator();
HL7Exception[] exceptions = validator.validate(validMessage, profile.getMessage());