VAQADM5 ;ALB/JRP - GENERATE PDX TRANSMISSIONS;20-MAY-93
;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
GENTASK(TRANARR) ;TASK TRANSMISSION GENERATION
;INPUT : TRANARR - Array of pointers to transactions that
; should be transmit (full global ref)
;OUTPUT : ZTSK - Task number transmission(s) queued as
; -1^Error_Text - Error
;NOTES : TRANARR will have the following format
; TRANARR(X)="" where X is a pointer to the transaction
; : Transmission(s) will be queued for NOW
; : Some over-head may be saved by using VAQTRN as input
;
;CHECK INPUT
Q:($G(TRANARR)="") "-1^Did not pass reference to transaction array"
Q:($O(@TRANARR@(""))="") "-1^Transaction array did not contain any information"
;DECLARE VARIABLES
N ZTSK,ZTRTN,ZTDESC,ZTDTH,ZTSAVE,ZTIO,TMP
;COPY TRANSACTIONS INTO VAQTRN (INPUT FOR GENXMIT^VAQADM50)
I (TRANARR'="VAQTRN") N VAQTRN D
.S TMP=""
.F S TMP=$O(@TRANARR@(TMP)) Q:(TMP="") S VAQTRN(TMP)=""
;SET UP TASK
S ZTRTN="GENXMIT^VAQADM50"
S ZTDESC="Generation of PDX transmission"
S ZTDTH=$H
S ZTSAVE("VAQTRN(")=""
S ZTIO=""
;TASK
D ^%ZTLOAD
;NOT QUEUED
Q:($G(ZTSK)="") "-1^Could not queue transmission(s)"
Q ZTSK
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAQADM5 1238 printed Oct 16, 2024@18:25:13 Page 2
VAQADM5 ;ALB/JRP - GENERATE PDX TRANSMISSIONS;20-MAY-93
+1 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
GENTASK(TRANARR) ;TASK TRANSMISSION GENERATION
+1 ;INPUT : TRANARR - Array of pointers to transactions that
+2 ; should be transmit (full global ref)
+3 ;OUTPUT : ZTSK - Task number transmission(s) queued as
+4 ; -1^Error_Text - Error
+5 ;NOTES : TRANARR will have the following format
+6 ; TRANARR(X)="" where X is a pointer to the transaction
+7 ; : Transmission(s) will be queued for NOW
+8 ; : Some over-head may be saved by using VAQTRN as input
+9 ;
+10 ;CHECK INPUT
+11 if ($GET(TRANARR)="")
QUIT "-1^Did not pass reference to transaction array"
+12 if ($ORDER(@TRANARR@(""))="")
QUIT "-1^Transaction array did not contain any information"
+13 ;DECLARE VARIABLES
+14 NEW ZTSK,ZTRTN,ZTDESC,ZTDTH,ZTSAVE,ZTIO,TMP
+15 ;COPY TRANSACTIONS INTO VAQTRN (INPUT FOR GENXMIT^VAQADM50)
+16 IF (TRANARR'="VAQTRN")
NEW VAQTRN
Begin DoDot:1
+17 SET TMP=""
+18 FOR
SET TMP=$ORDER(@TRANARR@(TMP))
if (TMP="")
QUIT
SET VAQTRN(TMP)=""
End DoDot:1
+19 ;SET UP TASK
+20 SET ZTRTN="GENXMIT^VAQADM50"
+21 SET ZTDESC="Generation of PDX transmission"
+22 SET ZTDTH=$HOROLOG
+23 SET ZTSAVE("VAQTRN(")=""
+24 SET ZTIO=""
+25 ;TASK
+26 DO ^%ZTLOAD
+27 ;NOT QUEUED
+28 if ($GET(ZTSK)="")
QUIT "-1^Could not queue transmission(s)"
+29 QUIT ZTSK