Changeset 623 for WorldVistAEHR/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLCSGTM.m
- Timestamp:
- Dec 4, 2009, 12:11:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLCSGTM.m
r613 r623 1 HLCSGTM ;OIFO-O/RWF - (TCP/IP) GT.M Linux ;08/13/2007 2 ;;1.6;HEALTH LEVEL SEVEN;**122**;Oct 13, 1995;Build 14 3 ;Per VHA Directive 2004-038, this routine should not be modified. 4 ; 5 ; 1. port number is input from VMS COM file, such as HLSxxxxDSM.COM, 6 ; HLSxxxxCACHE.COM, or HLSxxxxGTM.COM file, where xxxx is port 7 ; number. 8 ; 2. find the ien of #870(logical link file) for the multi-listener 9 Q 10 ; 11 IEN(HLPORT) ; 12 ; HLIEN870: ien in #870 (logical link file) 13 ; HLPRTS: port number in entry to be tested 14 ; 15 N HLPRTS,HLIEN870 16 I '$G(HLPORT) D ^%ZTER Q 17 S HLIEN870=0 18 F S HLIEN870=$O(^HLCS(870,"E","M",HLIEN870)) Q:'HLIEN870 D Q:(HLPRTS=HLPORT) 19 . S HLPRTS=$P(^HLCS(870,HLIEN870,400),"^",2) 20 I 'HLIEN870 D ^%ZTER Q 21 ; 22 Q HLIEN870 23 ; 24 GTMLNX ; From Linux xinetd script 25 ;Get port from ZSHOW "D" 26 S U="^",$ZT="",$ET="D ^%ZTER HALT" ;Setup the error trap 27 ; GTM specific code 28 S IO=$P X "U IO:(nowrap:nodelimiter:IOERROR=""TRAP"")" ;Setup device 29 S @("$ZINTERRUPT=""I $$JOBEXAM^ZU($ZPOSITION)""") 30 K ^TMP($J) ZSHOW "D":^TMP($J) 31 F %=1:1 Q:'$D(^TMP($J,"D",%)) S X=^(%) Q:X["LOCAL" 32 S IO("IP")=$P($P(X,"REMOTE=",2),"@"),IO("PORT")=+$P($P(X,"LOCAL=",2),"@",2) 33 S %=$P($ZTRNLNM("SSH_CLIENT")," ") S:%="" %=$ZTRNLNM("REMOTEHOST") 34 S HLDP=$$IEN(IO("PORT")) 35 ; 36 D LISTEN^HLCSTCP 37 Q 38 ; 39 ;Sample Linux script 40 ;#!/bin/bash 41 ;#HL7 Listener 42 ;cd /home/vista/dev/ 43 ;. ./gtmprofile 44 ;#env > hl7log.txt 45 ;$gtm_dist/mumps -r GTMLNX^HLCSGTM 46 ;exit 0 47 ; 48 ;Sample xinetd config file 49 ;service hl7tcp 50 ;{ 51 ; socket_type = stream 52 ; user = gtmuser 53 ; wait = no 54 ; disable = no 55 ; server = /bin/bash 56 ; server_args = -l /home/vista/dev/hl7tcp.sh 57 ; passenv = REMOTE_HOST 58 ;} 1 HLCSGTM ;OIFO-O/RWF - (TCP/IP) GT.M Linux ;08/13/2007 2 ;;1.6;HEALTH LEVEL SEVEN;**122**;Oct 13, 1995;Build 4;WorldVistA 30-Jan-08 3 ;Per VHA Directive 2004-038, this routine should not be modified. 4 ; 5 ; 1. port number is input from VMS COM file, such as HLSxxxxDSM.COM, 6 ; HLSxxxxCACHE.COM, or HLSxxxxGTM.COM file, where xxxx is port 7 ; number. 8 ; 2. find the ien of #870(logical link file) for the multi-listener 9 ;Modified from FOIA VISTA, 10 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU 11 ;General Public License See attached copy of the License. 12 ; 13 ;This program is free software; you can redistribute it and/or modify 14 ;it under the terms of the GNU General Public License as published by 15 ;the Free Software Foundation; either version 2 of the License, or 16 ;(at your option) any later version. 17 ; 18 ;This program is distributed in the hope that it will be useful, 19 ;but WITHOUT ANY WARRANTY; without even the implied warranty of 20 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 ;GNU General Public License for more details. 22 ; 23 ;You should have received a copy of the GNU General Public License along 24 ;with this program; if not, write to the Free Software Foundation, Inc., 25 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 26 Q 27 ; 28 IEN(HLPORT) ; 29 ; HLIEN870: ien in #870 (logical link file) 30 ; HLPRTS: port number in entry to be tested 31 ; 32 N HLPRTS,HLIEN870 33 I '$G(HLPORT) D ^%ZTER Q 34 S HLIEN870=0 35 F S HLIEN870=$O(^HLCS(870,"E","M",HLIEN870)) Q:'HLIEN870 D Q:(HLPRTS=HLPORT) 36 . S HLPRTS=$P(^HLCS(870,HLIEN870,400),"^",2) 37 I 'HLIEN870 D ^%ZTER Q 38 ; 39 Q HLIEN870 40 ; 41 GTMLNX ; From Linux xinetd script 42 ;Get port from ZSHOW "D" 43 S U="^",$ZT="",$ET="D ^%ZTER HALT" ;Setup the error trap 44 ; GTM specific code 45 S IO=$P X "U IO:(nowrap:nodelimiter:IOERROR=""TRAP"")" ;Setup device 46 S @("$ZINTERRUPT=""I $$JOBEXAM^ZU($ZPOSITION)""") 47 K ^TMP($J) ZSHOW "D":^TMP($J) 48 F %=1:1 Q:'$D(^TMP($J,"D",%)) S X=^(%) Q:X["LOCAL" 49 S IO("IP")=$P($P(X,"REMOTE=",2),"@"),IO("PORT")=+$P($P(X,"LOCAL=",2),"@",2) 50 S %=$P($ZTRNLNM("SSH_CLIENT")," ") S:%="" %=$ZTRNLNM("REMOTEHOST") 51 S HLDP=$$IEN(IO("PORT")) 52 ; 53 D LISTEN^HLCSTCP 54 Q 55 ; 56 ;Sample Linux script 57 ;#!/bin/bash 58 ;#HL7 Listener 59 ;cd /home/vista/dev/ 60 ;. ./gtmprofile 61 ;#env > hl7log.txt 62 ;$gtm_dist/mumps -r GTMLNX^HLCSGTM 63 ;exit 0 64 ; 65 ;Sample xinetd config file 66 ;service hl7tcp 67 ;{ 68 ; socket_type = stream 69 ; user = gtmuser 70 ; wait = no 71 ; disable = no 72 ; server = /bin/bash 73 ; server_args = -l /home/vista/dev/hl7tcp.sh 74 ; passenv = REMOTE_HOST 75 ;}
Note:
See TracChangeset
for help on using the changeset viewer.