HL7 Information
From VistApedia
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
- GTMLNX^HLCSGTM -- This sets up the mumps device and then starts listening for incoming text by running function below...
- LISTEN^HLCSTCP -- This does some setup, then runs function below....
- ^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) ...
- NEW^HLTP3(IEN) -- This is where the message is actually processed.
Applications are defined to receive messages in file #771 (HL7 Application PARAMETER)