ConnectR Pre Proc Script

From Galen Healthcare Solutions - Allscripts TouchWorks EHR Wiki
Revision as of 15:14, 16 November 2012 by John.Buckley (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Scenario

In an EHR-inbound interface, messages received by the vendor contain control characters which need to be substituted for accordingly. For instance in the case of a textual result, in place of the ASCII equivalent for carriage return and line feed (<28><13>) a vendor might send \br\. This is done to avoid a contention between HL7 delimiting characters (typically <28><13> represents the delimiting end character in an HL7 message). Thus the interface mapping logic needs to properly substitute the control character from the vendor (\br|) with its ASCII equivalent (<28><13>) such that the result text renders properly in the application

Approach

Utilization of a pre-processing script can facilitate substitutions of characters BEFORE a target system processes the source message using the mapping definition. The source message is the input in this case.

First define a pre-proc script within ConnectR with the desired logic. In the example shown below, a substitution is made for both carriage return and line feed controls (\br\ -> <28><13>) and ampersand (\T\ -> &). Key pieces to note are highlighted in that the script usage must be "Script Pre Processor" and the input to the script must be named sOriginalMessage (representative of the sources message): CxRPreProcScript.jpg

Next modify the interface mapping to select a Script Type of "Pre Script" and specify the script to be the one just created as shown below: CxRPreProcScript2.jpg