We have seen how to validate messages manually in the HL7Connect Development Environment. As useful as it was for the tutorial, in real applications messages are validated automatically by the HL7Connect server.

This works on the same principle as the validation we had just done. As long as there is a validateMessage function in the script (for javascript or VBscript) run by the server (either the script run OnSendMessage or OnReceiveMessage, depending on the type of interface), the message will be validated. If the message fails the validation, it is rejected.

This is all script validation is in HL7Connect. A message is 'validated' if no exceptions are raised by the script. This is why the scripts in part B are all so simple, as they are only required to raise an exception to allow HL7Connect to recognise the message as invalid. As a consequence, it will probably be rare that an interface will solely script a validation. It will most likely be that the validation will be run as part of another function that will do other things like translation.

In addition to validating by scripts, you can also validate using a custom Profile or Catalogue (you may have noticed these in the Validation tab). These are both beyond the scope of this tutorial.


© Kestral Computing P/L 2000-2010.