HL7 Information

From VistApedia
Revision as of 21:51, 19 February 2011 by Kdtop (talk | contribs)
Jump to: navigation, search

This will be notes as I explore how HL7 works in vistA

in linux xinet.d is setup like this.

/etc/xinetd.d$ cat HL7

   service hl7tcp
   {
       socket_type = stream
       port = xxxx
       protocol = tcp
       user = xxxxx
       wait = no
       disable = no
       server = /bin/bash
       server_args = /opt/worldvista/EHR/bin/hl7tcp.sh
       groups = yes
       type = UNLISTED
   }

So when the HL7 message comes in (our case, as delivered from Mirth), the following script is launched.

/etc/xinetd.d$ cat /opt/worldvista/EHR/bin/hl7tcp.sh

 #!/bin/bash
 #HL7 Listener
 . /opt/worldvista/EHR/etc/env
 $gtm_dist/mumps -r GTMLNX^HLCSGTM 2>>/tmp/console.log
 exit 0

Mumps code then executed as below

  1. GTMLNX^HLCSGTM -- This sets up the mumps device and then starts listening for incoming text by running function below...
  2. LISTEN^HLCSTCP -- This does some setup, then runs function below....
  3. ^HLCSTCP1 -- This calls a function READ^HLCSTCP1 which reads in the message and returns an HLMIEN to file #773 (HL7 MESSAGE ADMINISTRATION), which contains a pointer to file #772 (HL7 MESSAGE TEXT), which is where the actual text of the HL7 message is stored in a a WP field. Next PROCESS^HLCSTCP1 is called --> calls NEW^HLTP3(HLMIEN) ...
  4. NEW^HLTP3(IEN) -- This is where the message is actually processed.