HL7 Module 10.5 | Understanding and Using HL7 Module | Installing and Using HL7 Module | webMethods HL7 Module Services | WmHL7 Package | wm.ip.hl7.service:validate
 
wm.ip.hl7.service:validate
Validates the HL7 version 2.x message and reports a list of errors and warnings, if any. The service performs syntactic, semantic, and code table validation of the message.
The validate service parses the input message and if it encounters an error, it tries to ignore the section where the error was encountered and continue parsing. When the service completes parsing the HL7 version 2.x message, it returns a list of all the errors that it has encountered during the process. When the service can not continue parsing the message, it returns a single error.
Input Parameters
message
Object The HL7 message as a string, byte array, or InputStream.
charsetEncoding
String Optional. Used to determine the encoding when reading the HL7 message. If no value is specified, the charsetEncoding to be used is determined based on the information in the TPA. For more information, see the flow charts in Determining the Encoding of HL7 Messages.
Valid values for this parameter are the Java charset encoding values supported by the HL7 standard.
For information about the charset encoding supported by the HL7 standard, see Code Table: 0211 (Alternate Character Sets).
Note:
The charsetEncoding input parameter is different from the encoding mentioned in the HL7 message MSH.18 field. HL7 Module does not use the MSH.18 field encoding to parse or process the HL7 message.
messageScheme
Document Optional. Specifies settings related to the message scheme. Parameters are:
*schemeID String Optional. The unique message scheme ID to use for validation.
*To use custom message definitions do one of the following:
*Specify a value for the schemeID parameter. HL7 Module uses the message schemas that correspond to the schemeIDvalue. In this case, the values that you specify for some or all of the other messageScheme parameters will be ignored.
*Do not specify a value for the schemeID parameter, but provide values for the remaining messageScheme parameters. In this case, HL7 Module extracts the schemeID from the TPA. The module uses the message schemas that correspond to the schemeID extracted from the TPA.
*To use the default message definitions provided with HL7 Module, do one of the following:
*Specify wm.ip.hl7.docType (the schemeID for the default XML schemas provided with HL7 Module)
*Do not specify values for any of the messageScheme parameters.
*senderID String Optional. The external sender ID for the input HL7 message.
*senderIDType String Optional. The external sender ID type for the input HL7 message.
*receiverID String Optional. The external receiver ID for the input HL7 message.
*receiverIDType String Optional. The external receiver ID type for the HL7 input message.
Output Parameters
isValid
String Specifies whether the input message is valid. The value is derived from the errors parameter. Valid values are:
*true - The message is valid.
*false - The message is invalid.
errors
Document List Contains an accumulated list of errors that occurred while parsing the document. Parameters are:
*errorMessage String The text of the error message.
warnings
Document List Contains an accumulated list of warnings that occurred while parsing the document. Parameters are:
*warningMessage String The text of the warning message.