The basic principle of the test, is to mimic production usage as much as possible. At the beginning of the tutorial, 2 hypothetical interfaces were described, an Incoming Interface for the PAS, and an Outgoing Interface for the LIS.

  1. On HL7Connect server, create an Incoming Interface called "PAS In". Make it a TCP/IP interface, and configure it as a server on the port 22221 (or another if this is in use).
  2. On HL7Connect server, create an Outgoing Interface called "LIS Out". Make it a TCP/IP interface, and configure it as a server on port 22222 (or another if this is in use).
  3. On HL7Connect server, go back to the PAS In interface, and create a route for any incoming messages to LIS Out.
  4. On HL7Connect Development Environment, you can do either of the following to create a HL7 Send Client:
    1. EITHER select File | New | HL7 Send Client and copy the test case message below into the "Message To Send" area:

           MSH|^~\&|ADT1|MCM|LABADT|MCM|198808181126|SECURITY|ADT^A01|MSG00001|P|2.3.1|
           EVN|A01|198808181123||
           PID|1||123456^^^^MR^PAS~123456789^^^USSSA^SS~4321234^^^DL^NTA||JONES^WILLIAM^A^III||19610615|M||C|1200 N ELM STREET^^GREENSBORO^NC^27401-1020|GL|(91-9)379-1212|(919)271-3434||S||PATID12345001^2^M10^ADT1^AN^A|123456789|987654^NC|
           NK1|1|JONES^BARBARA^K|WI^WIFE||||NK^NEXT OF KIN
           PV1|1|I|2000^2012^01||||004777^LEBAUER^SIDNEY^J.|||SUR||||ADM|A0|||||PRIV||||||
          
    2. OR from the Test Case File testcase5.tci select Copy to.. in the Event Information section - HL7 Send Client | Create new HL7 Send Client which automatically places the message in the HL7 Send Client.
  5. Select File | Save As... | sendclient5.hsc (Note: make sure you save it in the HL7Tutorial folder).
  6. Type in the Host IP/Name for your HL7Connect with a port of 22221. You should have a screen like the following:

    Screen Shot

  7. Select Send Message and note the "Message Received" area shows the acknowledgement received from HL7Connect.

    Screen Shot

  8. Check your HL7Connect, it should show that a message was received from the PAS In interface, and that there is 1 message waiting for the LIS Out interface.
  9. On HL7Connect Development Environment select File | New | HL7 Receive Client
  10. Select File | Save As... | receiveclient5.hsc
  11. Type in the Host IP/Name for your HL7Connect with a port of 22222. Also choose the Send AA tick box. You should have a screen like the following:

    Screen Shot

  12. Click on Receive Message and your screen should be like the following:

    Screen Shot

  13. Now, copy the translate5.js or translate5.vbs script into the $script$ folder (you may need to create the folder scripts - for example create folder c:\program files\HL7Connect\scripts) on the HL7Connect server, and configure the following script settings in HL7Connect for the LIS Out interface:

    Type    Event Name    Script    Procedure Name
    Javascript    OnInterfaceStart    $script$\translate5.js    opendatabase
       OnInterfaceStop    $script$\translate5.js    closedatabase
       OnSendMessage    $script$\translate5.js    translate
      
    VBScript    OnInterfaceStart    $script$\translate5.vbs    opendatabase
       OnInterfaceStop    $script$\translate5.vbs    closedatabase
       OnSendMessage    $script$\translate5.vbs    translate

    Your HL7Connect screen should appear as follows:

    Screen Shot

  14. Now Click on Receive Message in the HL7 Receive Client "receiveclient5". If all goes well your screen should appear as follows:

    Screen Shot

  15. If you have a problem then you need to use Browse Logs on HL7Connect to see what has happened.
  16. You can repeat the send and receive cycle any number of times with different messages to confirm that the script is working as expected.

When testing is finished, the interfaces created on HL7Connect can be removed. However, you may wish to use them for testing interfaces in the future.


© Kestral Computing P/L 2000-2010.