· Jun 20, 2023

Record Map Validation on Business Service

Had an issue on Friday where a vendor added an additional field in the middle of a row of one of our record maps. This threw the mapping off when I take the record and try to map it into HL7 and caused massive amounts of errors in our EMR because the data was wrong.

Is there a way that I can add validation on the Business Service to say if the fields are off to fail, stop, and alert on the Business Service?

Product version: IRIS 2022.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:13:24 EDT
Discussion (2)2
Log in or sign up to continue

UPD: Never mind, that's the wrong answer as it's about HL7. Sorry about that.

There are two ways to do that:

  1. Use EnsLib.MsgRouter.VDocRoutingEngine, it has Validation setting which is a string specifying types of validation to perform. Set to 1 to block documents that don't pass default validation. Default validation checks for DocType assignment and successful BuildMapStatus. This is equivalent to 'dm': 'd' - require DocType 'm' - require successful BuildMap status. Set to 0 to skip validation. In addition configure Bad Message Handler setting to handle messages which fail validation. I'm not sure it your messages would fail BuildMap validation, but that's the easiest option to implement.
  2. Create a subclass of EnsLib.MsgRouter.RoutingEngine and implement OnValidate method to provide custom validation. You'll also need to add Validation property to settings, same as EnsLib.MsgRouter.VDocRoutingEngine  does. In OnValidate method you can perform any checks you like.