HL7 Multi-Listener

Configure HL7 multi-listener and set-up HL7 link parameters.

This instruction assumes that the reader is familiar with the linux operating system and the vi text editor or an equivalent. It also assumes that you have a working installation and Configuration of VistA. For this example, I am running Bhaskar's SemiViva 2.3.1 on ubuntu linux 7.04. My machine's address will be 10.1.1.1, my HL7 listner will use port 9201, and my user will be root.

All commands should be issued as root and will be expressed as so: .  Any output or text to enter will be listed between brackets and astricks, i.e.:

[******* text to enter *******]

Background on my installation and paths:

I unzipped the SemiViva package to /usr/local/ which created directory VistAOfficeEHR_2.3.1. So, my routines are stored in /usr/local/ VistAOfficeEHR_2.3.1/r. Also, I ran install so that I created a child environment in /vista. So, my path to gtm is /vista/gtm_V5.2-000/.

First, I installed xinetd because this package was not included by default in the ubuntu 7.04 installation.

    installs the xinetd package.

Make sure /etc/xinetd.conf contains "includedir /etc/xinetd.d" as shown:



[******* # defaults { } includedir /etc/xinetd.d *******] Create a VistA routine that will start the HL7 process when a message is received (make sure HLPORT is set to the port you want to use)
 * 1) Simple Configuration file for xinetd
 * 1) Some defaults, and include /etc/xinetd.d/
 * 1) Please note that you need a log_type line to be able to use log_on_success
 * 2) and log_on_failure. The default is the following :
 * 3) log_type = SYSLOG daemon info

 [******* N HLDP,HLPORT,HLPRTS,IO S HLDP=0,HLPORT=9201 F S HLDP=$O(^HLCS(870,"E","M",HLDP)) Q:'HLDP  D  Q:(HLPRTS=HLPORT) .S HLPRTS=$P(^HLCS(870,HLDP,400),"^",2) .Q I 'HLDP D ^%ZTER Q  K HLPORT,HLPRTS S IO=$P U IO:(NOWRAP:NODELIMITER:IOERROR="TRAP") D LISTEN^HLCSTCP Q *******]

Now, create a script in the gtm directory to call that routine:

 [******* export HOME=/home/`whoami` cd `dirname $0` source ./env cd ../tmp mumps -run ^VISTAHL7 *******]
 * 1) !/bin/bash

do a chmod on the vistahl7 script to make it executable:



Next, create a Configuration file in xinetd.d to call that script:



[******* service vistahl7 {        type = UNLISTED port = 9201 socket_type = stream protocol = tcp user = root server = /vista/gtm_V5.2-000/vistahl7 disable = no        wait = no } *******]

Finally, add the following entry at the end of /etc/services

[******* vistahl7       9201/tcp                        # vista hl7 listener *******]

Restart the xinetd service with:  When you have a connection to the socket just created, you should be able to check it with this:

 [******* tcp       0      0 0.0.0.0:9201            0.0.0.0:* LISTEN tcp       0      0 10.1.1.1:9201         x.x.x.x:59972 ESTABLISHED *******]

If you have not yet configured the VistA HL7 subsystem, check out this really nice website: http://www.geocities.com/kdtop3/

All you have to do to start using the new multi-listener is change your link type to MULTI LISTENER on the link edit screen, then stop and start the link manager. What you do with the message received is now up to you. I wrote a routine to file patient and insurance information into the VistA database when demographics are received via HL7 from our billing system.

Register a patient via HL7

User:cmdupre