Hello,
I am trying to set up Mirth to send an ADT^A04 message to VistA. We are using the one directly from VA (not openVistA or worldVistA). I found a guide from
https://medsphere.org/docs/DOC-1764 and another guide from jhthurber and followed the set up instructions for listeners, application parameters, event driver / subs etc. Now I am at a point that I can send a HL7 message from Mirth to VistA's listening port. Mirth shows that the message has been sent but I couldn't find the message in VistA through inquiring file entries to HL7 message file 772 / 773. d ^XTER also didn't find any error. So I am not sure where to go next... Any comment will be greatly appreciated.
Here is my listener:
hl7tcp
service hl7tcp
{
disable = no
port = 9240
socket_type = stream
protocol = tcp
user = ehruser
server = /home/ehruser/VistA/common/bin/hl7tcp.sh
type = UNLISTED
wait = no
groups = yes
}
hl7tcp.sh
#!/bin/bash
#HL7 Listener
source /etc/profile.d/gtmprofile.sh
date >> /home/ehruser/VistA/logs/hl7tcp.log
$gtm_dist/mumps -run GTMLNX^HLCSGTM 2>>/home/ehruser/VistA/logs/hl7tcp.log
[ehruser@s3-VistA-Dev r]$ netstat -al | grep 9240
tcp 0 0 *:9240 *:* LISTEN
However, when I tried telnet it, the connection was established and then restored:
[ehruser@s3-VistA-Dev r]$ telnet localhost 9240
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
I am not sure if this telnet behavior points to an issue or not (and how to fix it).
I tried to modify GTMLNX^HLCSGTM and add a simple debug global there:
GTMLNX ; From Linux xinetd script
;Get port from ZSHOW "D"
s ^JSTEST(1)=$h_"TEST"
S U="^",$ZT="",$ET="D ^%ZTER HALT" ;Setup the error trap
; GTM specific code
S IO=$P X "U IO:(nowrap:nodelimiter:IOERROR=""TRAP"")" ;Setup device
S @("$ZINTERRUPT=""I $$JOBEXAM^ZU($ZPOSITION)""")
K ^TMP($J) ZSHOW "D":^TMP($J)
F %=1:1 Q:'$D(^TMP($J,"D",%)) S X=^(%) Q:X["LOCAL"
S IO("IP")=$P($P(X,"REMOTE=",2),"@"),IO("PORT")=+$P($P(X,"LOCAL=",2),"@",2)
S %=$P($ZTRNLNM("SSH_CLIENT")," ") S:%="" %=$ZTRNLNM("REMOTEHOST")
S HLDP=$$IEN(IO("PORT"))
;
D LISTEN^HLCSTCP
Q
Then I sent a few messages from Mirth to VistA. However, JSTEST is never set.
UTF8>zwr ^JSTEST
%GTM-E-GVUNDEF, Global variable undefined: ^JSTEST
The other thing I noticed that is in /home/ehruser/VistA/logs/hl7tcp.log there are some errors like:
Mon Oct 15 16:12:15 EDT 2012
%GTM-E-NONUTF8LOCALE, Locale has character encoding (ISO-8859-1) which is not compatible with UTF-8 character set
I am not sure if this points to an issue or not (and how to fix it).
Again I am at lost and don't know where to go next. Any comments will be greatly appreciated.
thanks!
Jason