INHOU7 ;DP; 28 Feb 96 14:58;27 Dec 95 10:39;LIST QUEUED TRANSACTIONS II
;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
;COPYRIGHT 1991-2000 SAIC
Q
QUE ;Select que
K QUE1 I X[U S POP=1 Q
I +X<0!(+X>1) K X Q
S QUE1=$S(X=1:"^INLHSCH",X=0:"^INLHDEST",1:"All")
W " ",QUE1 Q:X=""
I $O(@QUE1@(0))'?.N W " is empty" H 1 K X Q
Q
HELP ;
W !,"Select Queue: 1=INLHSCH"
W !," 0=INLHDEST"
W !!,"Press 'Enter' to select all queues"
Q
;
PRIO ;Priority
I X[U K X S POP=1 Q
Q:X?1.3N
K X
Q
HELP1 ;
W !,"Enter a valid Priority Number or Return for All"
Q
YN ;
I X[U K X S POP=1 Q
S X=$E($$UPCASE^%ZTF(X))
I X]"YN " K X Q
S X=1 S:X="N" X=0
Q
YNH ;
W !,"Enter Yes to see message details or No for message ID only."
Q
P1 ;
W:X="" "Yes"
S ^DIZ(4001.1,INDA,9)=X
Q
;Get begining and ending dates.
S %DT("B")="Today"
W ! S %DT("A")="Starting Date: ",%DT="ATE" D ^%DT Q:Y<0 S INBEG=+Y
W ! S %DT("A")=" Ending Date: ",%DT="ATE" D ^%DT Q:Y<0 S INEND=+Y
;Direction
W !! N INO S INO="IiOo"
D ^UTSRD("Direction: ;1A;;;O;;;;I $F(INO,X)<1 K X;DIRC","Enter In or Out")
I DIRC[U S POP=1 Q
S DIRC=$$UPCASE^%ZTF(DIRC)
W $S(DIRC="O":"ut",1:"n")
DES ;Get multiple destinations
W ! K X,X2,IN1 S X2=""
F I=1:1 D W:Y=-1&(X2="") "ALL" Q:Y=-1
.D ^DIC Q:+Y<1
.S X(+Y)=$P(^INRHD(+Y,0),U)
.S IN1(X(+Y))="",X2=X2_(+Y)_","
W ! Q:POP
;
DET ;Detail yes/no
W ! S DET=$$YN^UTSRD("Detailed: ;N")
I DET[U S POP=1 Q
INT ;Read time interval
W @IOF,!," Priority: ",PRIO
W !," From: ",$$CDATASC^%ZTFDT($E(INBEG,1,12),3,1)
W !," To: ",$$CDATASC^%ZTFDT($E(INEND,1,12),3,1)
W !," Queue: ",QUE1
W !," Direction: ",$S(DIRC="I":"In",1:"Out")
W !," Detail: ",$S(DET=1:"Yes",1:"No"),!
W !,"Destination: " I $L(X2)=0 W "All "
E F I=1:1:$L(X2,",")-1 W ?13,$P(^INRHD($P(X2,",",I),0),U),!
W ! S Z=$$CR^UTSRD
I Z S POP=1 Q
; taskman variables
; X2 = destination list (IEN,...)
; INBEG = beginning date@time
; INEND = ending date@time
;
S INBEG=$$CDATF2H^%ZTFDT(INBEG) S:PRIO="All" PRIO=""
S INEND=$$CDATF2H^%ZTFDT(INEND)
S INLOAD=DET_U_X2_U_INBEG_U_INEND_U_DIRC_U_QUE_U_PRIO
W !
Q
;
INHOU7 ;DP; 28 Feb 96 14:58;27 Dec 95 10:39;LIST QUEUED TRANSACTIONS II
+1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
+2 ;COPYRIGHT 1991-2000 SAIC
+3 QUIT
QUE ;Select que
+1 KILL QUE1
IF X[U
SET POP=1
QUIT
+2 IF +X<0!(+X>1)
KILL X
QUIT
+3 SET QUE1=$SELECT(X=1:"^INLHSCH",X=0:"^INLHDEST",1:"All")
+4 WRITE " ",QUE1
IF X=""
QUIT
+5 IF $ORDER(@QUE1@(0))'?.N
WRITE " is empty"
HANG 1
KILL X
QUIT
+6 QUIT
HELP ;
+1 WRITE !,"Select Queue: 1=INLHSCH"
+2 WRITE !," 0=INLHDEST"
+3 WRITE !!,"Press 'Enter' to select all queues"
+4 QUIT
+5 ;
PRIO ;Priority
+1 IF X[U
KILL X
SET POP=1
QUIT
+2 IF X?1.3N
QUIT
+3 KILL X
+4 QUIT
HELP1 ;
+1 WRITE !,"Enter a valid Priority Number or Return for All"
+2 QUIT
YN ;
+1 IF X[U
KILL X
SET POP=1
QUIT
+2 SET X=$EXTRACT($$UPCASE^%ZTF(X))
+3 IF X]"YN "
KILL X
QUIT
+4 SET X=1
IF X="N"
SET X=0
+5 QUIT
YNH ;
+1 WRITE !,"Enter Yes to see message details or No for message ID only."
+2 QUIT
P1 ;
+1 IF X=""
WRITE "Yes"
+2 SET ^DIZ(4001.1,INDA,9)=X
+3 QUIT
+4 ;Get begining and ending dates.
+5 SET %DT("B")="Today"
+6 WRITE !
SET %DT("A")="Starting Date: "
SET %DT="ATE"
DO ^%DT
IF Y<0
QUIT
SET INBEG=+Y
+7 WRITE !
SET %DT("A")=" Ending Date: "
SET %DT="ATE"
DO ^%DT
IF Y<0
QUIT
SET INEND=+Y
+8 ;Direction
+9 WRITE !!
NEW INO
SET INO="IiOo"
+10 DO ^UTSRD("Direction: ;1A;;;O;;;;I $F(INO,X)<1 K X;DIRC","Enter In or Out")
+11 IF DIRC[U
SET POP=1
QUIT
+12 SET DIRC=$$UPCASE^%ZTF(DIRC)
+13 WRITE $SELECT(DIRC="O":"ut",1:"n")
DES ;Get multiple destinations
+1 WRITE !
KILL X,X2,IN1
SET X2=""
+2 FOR I=1:1
Begin DoDot:1
+3 DO ^DIC
IF +Y<1
QUIT
+4 SET X(+Y)=$PIECE(^INRHD(+Y,0),U)
+5 SET IN1(X(+Y))=""
SET X2=X2_(+Y)_","
End DoDot:1
IF Y=-1&(X2="")
WRITE "ALL"
IF Y=-1
QUIT
+6 WRITE !
IF POP
QUIT
+7 ;
DET ;Detail yes/no
+1 WRITE !
SET DET=$$YN^UTSRD("Detailed: ;N")
+2 IF DET[U
SET POP=1
QUIT
INT ;Read time interval
+1 WRITE @IOF,!," Priority: ",PRIO
+2 WRITE !," From: ",$$CDATASC^%ZTFDT($EXTRACT(INBEG,1,12),3,1)
+3 WRITE !," To: ",$$CDATASC^%ZTFDT($EXTRACT(INEND,1,12),3,1)
+4 WRITE !," Queue: ",QUE1
+5 WRITE !," Direction: ",$SELECT(DIRC="I":"In",1:"Out")
+6 WRITE !," Detail: ",$SELECT(DET=1:"Yes",1:"No"),!
+7 WRITE !,"Destination: "
IF $LENGTH(X2)=0
WRITE "All "
+8 IF '$TEST
FOR I=1:1:$LENGTH(X2,",")-1
WRITE ?13,$PIECE(^INRHD($PIECE(X2,",",I),0),U),!
+9 WRITE !
SET Z=$$CR^UTSRD
+10 IF Z
SET POP=1
QUIT
+11 ; taskman variables
+12 ; X2 = destination list (IEN,...)
+13 ; INBEG = beginning date@time
+14 ; INEND = ending date@time
+15 ;
+16 SET INBEG=$$CDATF2H^%ZTFDT(INBEG)
IF PRIO="All"
SET PRIO=""
+17 SET INEND=$$CDATF2H^%ZTFDT(INEND)
+18 SET INLOAD=DET_U_X2_U_INBEG_U_INEND_U_DIRC_U_QUE_U_PRIO
+19 WRITE !
+20 QUIT
+21 ;