Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: VAQADM51

VAQADM51.m

Go to the documentation of this file.
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