VAQADM51 ;ALB/JRP - GENERATE PDX TRANSMISSIONS;10-MAR-93 [ 09/26/96 2:29 PM ]
;;1.5;PATIENT DATA EXCHANGE;**22**;NOV 17, 1993
START ;START RESPONSE TIME MONITORING (TIME TO BUILD/SEND COMPLETE TRANSMISSION)
I ($D(XRTL)) D T0^%ZOSV
Q
;
STOP ;STOP RESPONSE TIME MONITORING
I ($D(XRT0)) S XRTN=$T(+0) D T1^%ZOSV K XRTN,XRT0
Q
;
XMIT15 ;GERNERATE & SEND VERSION 1.5 MESSAGES (CONTINUATION FOR VAQADM50)
; DECLARATIONS DONE IN GENXMIT^VAQADM50
S DOMAIN=""
F S DOMAIN=$O(@ARRAY1@(DOMAIN)) Q:(DOMAIN="") D START D D STOP
.;EXTRACT INFORMATION FOR ALL TRANSACTIONS
.K @ARRAY5
.S TRANS=""
.F S TRANS=$O(@ARRAY1@(DOMAIN,TRANS)) Q:(TRANS="") D
..;PLACE TRANSACTION POINTER IN ARRAY5
..S TMPARR=$P(ARRAY5,")",1)_","_$C(34)_TRANS_$C(34)_")"
..;EXTRACT INFO
..S TMP=$$EXTRACT^VAQDBI(TRANS,TMPARR)
..I (TMP) D
...S @ARRAY3@(TRANS,0)="Error occurred while extracting information"
...S @ARRAY3@(TRANS,1)=$P(TMP,"^",2)
...K @ARRAY1@(DOMAIN,TRANS)
...K @TMPARR
.;CREATE STUB MESSAGE
.S TMP="PDX (V1.5) TRANSMISSION FROM "_SITE
.S XMZ=$$MAKESTUB^VAQCON1(TMP,"PDX")
.I (XMZ<1) D Q
..S X=$$KILLSTUB^VAQCON1(XMZ)
..S TRANS=""
..F S TRANS=$O(@ARRAY1@(DOMAIN,TRANS)) Q:(TRANS="") D
...S @ARRAY3@(TRANS,0)="Error occurred while building transmission"
...S @ARRAY3@(TRANS,1)=$P(XMZ,"^",2)
.;PLACE DOMAIN IN ARRAY1
.S TMPARR=$P(ARRAY1,")",1)_","_$C(34)_DOMAIN_$C(34)_")"
.;PLACE TRANSMISSION IN MESSAGE
.S TMP=$$XMIT^VAQCON(TMPARR,ARRAY5,XMZ,"",1)
.I (TMP<0) D Q
..S X=$$KILLSTUB^VAQCON1(XMZ)
..S TRANS=""
..F S TRANS=$O(@TMPARR@(TRANS)) Q:(TRANS="") D
...S @ARRAY3@(TRANS,0)="Error occurred while building transmission"
...S @ARRAY3@(TRANS,1)=$P(TMP,"^",2)
.;SET ZERO NODE
.S TMP=$$SETZERO^VAQCON1(XMZ,TMP)
.I (TMP) D Q
..S X=$$KILLSTUB^VAQCON1(XMZ)
..S TRANS=""
..F S TRANS=$O(@TMPARR@(TRANS)) Q:(TRANS="") D
...S @ARRAY3@(TRANS,0)="Error occurred while building transmission"
...S @ARRAY3@(TRANS,1)=$P(TMP,"^",2)
.;SEND TRANSMISSION
.S TMP=$G(@ARRAY2@(DOMAIN))
.S:(TMP="") TMP=DOMAIN
.S X="S.VAQ-PDX-SERVER"_"@"_TMP
.S XMY(X)=""
.S XMDUN="Patient Data eXchange"
.D ENT1^XMD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAQADM51 2187 printed Dec 13, 2024@02:24:31 Page 2
VAQADM51 ;ALB/JRP - GENERATE PDX TRANSMISSIONS;10-MAR-93 [ 09/26/96 2:29 PM ]
+1 ;;1.5;PATIENT DATA EXCHANGE;**22**;NOV 17, 1993
START ;START RESPONSE TIME MONITORING (TIME TO BUILD/SEND COMPLETE TRANSMISSION)
+1 IF ($DATA(XRTL))
DO T0^%ZOSV
+2 QUIT
+3 ;
STOP ;STOP RESPONSE TIME MONITORING
+1 IF ($DATA(XRT0))
SET XRTN=$TEXT(+0)
DO T1^%ZOSV
KILL XRTN,XRT0
+2 QUIT
+3 ;
XMIT15 ;GERNERATE & SEND VERSION 1.5 MESSAGES (CONTINUATION FOR VAQADM50)
+1 ; DECLARATIONS DONE IN GENXMIT^VAQADM50
+2 SET DOMAIN=""
+3 FOR
SET DOMAIN=$ORDER(@ARRAY1@(DOMAIN))
if (DOMAIN="")
QUIT
DO START
Begin DoDot:1
+4 ;EXTRACT INFORMATION FOR ALL TRANSACTIONS
+5 KILL @ARRAY5
+6 SET TRANS=""
+7 FOR
SET TRANS=$ORDER(@ARRAY1@(DOMAIN,TRANS))
if (TRANS="")
QUIT
Begin DoDot:2
+8 ;PLACE TRANSACTION POINTER IN ARRAY5
+9 SET TMPARR=$PIECE(ARRAY5,")",1)_","_$CHAR(34)_TRANS_$CHAR(34)_")"
+10 ;EXTRACT INFO
+11 SET TMP=$$EXTRACT^VAQDBI(TRANS,TMPARR)
+12 IF (TMP)
Begin DoDot:3
+13 SET @ARRAY3@(TRANS,0)="Error occurred while extracting information"
+14 SET @ARRAY3@(TRANS,1)=$PIECE(TMP,"^",2)
+15 KILL @ARRAY1@(DOMAIN,TRANS)
+16 KILL @TMPARR
End DoDot:3
End DoDot:2
+17 ;CREATE STUB MESSAGE
+18 SET TMP="PDX (V1.5) TRANSMISSION FROM "_SITE
+19 SET XMZ=$$MAKESTUB^VAQCON1(TMP,"PDX")
+20 IF (XMZ<1)
Begin DoDot:2
+21 SET X=$$KILLSTUB^VAQCON1(XMZ)
+22 SET TRANS=""
+23 FOR
SET TRANS=$ORDER(@ARRAY1@(DOMAIN,TRANS))
if (TRANS="")
QUIT
Begin DoDot:3
+24 SET @ARRAY3@(TRANS,0)="Error occurred while building transmission"
+25 SET @ARRAY3@(TRANS,1)=$PIECE(XMZ,"^",2)
End DoDot:3
End DoDot:2
QUIT
+26 ;PLACE DOMAIN IN ARRAY1
+27 SET TMPARR=$PIECE(ARRAY1,")",1)_","_$CHAR(34)_DOMAIN_$CHAR(34)_")"
+28 ;PLACE TRANSMISSION IN MESSAGE
+29 SET TMP=$$XMIT^VAQCON(TMPARR,ARRAY5,XMZ,"",1)
+30 IF (TMP<0)
Begin DoDot:2
+31 SET X=$$KILLSTUB^VAQCON1(XMZ)
+32 SET TRANS=""
+33 FOR
SET TRANS=$ORDER(@TMPARR@(TRANS))
if (TRANS="")
QUIT
Begin DoDot:3
+34 SET @ARRAY3@(TRANS,0)="Error occurred while building transmission"
+35 SET @ARRAY3@(TRANS,1)=$PIECE(TMP,"^",2)
End DoDot:3
End DoDot:2
QUIT
+36 ;SET ZERO NODE
+37 SET TMP=$$SETZERO^VAQCON1(XMZ,TMP)
+38 IF (TMP)
Begin DoDot:2
+39 SET X=$$KILLSTUB^VAQCON1(XMZ)
+40 SET TRANS=""
+41 FOR
SET TRANS=$ORDER(@TMPARR@(TRANS))
if (TRANS="")
QUIT
Begin DoDot:3
+42 SET @ARRAY3@(TRANS,0)="Error occurred while building transmission"
+43 SET @ARRAY3@(TRANS,1)=$PIECE(TMP,"^",2)
End DoDot:3
End DoDot:2
QUIT
+44 ;SEND TRANSMISSION
+45 SET TMP=$GET(@ARRAY2@(DOMAIN))
+46 if (TMP="")
SET TMP=DOMAIN
+47 SET X="S.VAQ-PDX-SERVER"_"@"_TMP
+48 SET XMY(X)=""
+49 SET XMDUN="Patient Data eXchange"
+50 DO ENT1^XMD
End DoDot:1
DO STOP
+51 QUIT