public class MessageValidator extends Object
| Constructor and Description |
|---|
MessageValidator(ValidationContext theContext,
boolean theFailOnErrorFlag) |
public MessageValidator(ValidationContext theContext, boolean theFailOnErrorFlag)
theContext - context that determines which validation rules applytheFailOnErrorFlag - public boolean validate(Message message) throws HL7Exception
message - a parsed message to validate (note that MSH-9-1 and MSH-9-2 must be valued)HL7Exception - if there is at least one error and this validator is set to fail on errorspublic boolean validate(String message, boolean isXML, String version) throws HL7Exception
message - an ER7 or XML encoded message to validateisXML - true if XML, false if ER7version - HL7 version (e.g. "2.2") to which the message belongsHL7Exception - if there is at least one error and this validator is set to fail on errorsCopyright © 2001-2012 University Health Network. All Rights Reserved.