ATSERCHD ;TUCSON/DG;CALL TO TASKMAN [ 10/25/91 1:22 PM ]
;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
;
S (ATSQT,ATSGO)=0 F L=0:0 D ASK Q:ATSQT
K IO("Q")
D:ATSGO ZIS
S ATSTASK=0
I $D(IO("Q")),'POP S ATSTASK=1 D TSKMN
D EOJ
Q
;
ASK ;
W !!,"Do you want to queue the comparison to another device" S %=2 D YN^DICN
I %=2 S ATSQT=1 Q
I %=0 D HELP Q
I %=-1 S ATSQT=1,ATSFLAG=$S($D(^UTILITY("ATSEARCH",$J,"MERGED")):2,1:1) Q
I %=1 S ATSQT=1,ATSGO=1 Q
Q
;
ZIS ;
W !! S %IS="PQ",IOP="Q" D ^%ZIS
Q
;
TSKMN ;
S ATSFLAG=1
K ZTSAVE F %="ATSTASK","ATSEARCH(","ATSEINRL","ATSENB","ATSENLAG","ATSFLAG","ATSMTCH","ATSNOT","ATSPC","ATSX","ATSETMP","ATSRCSTR" S ZTSAVE(%)=""
S ZTRTN="ZTM^ATSERCH4",ZTDESC="SEARCH COMPARISON",ZTIO=IO,ZTDTH="" D ^%ZTLOAD
X ^%ZIS("C")
Q
;
HELP ;
S XQH="ATSEARCH-QUEUE",DIC(0)="X" D EN^XQH
W:$D(IOF) @IOF
Q
;
EOJ ;
K ATSGO,ATSQT,IO("Q")
Q
;
ATSERCHD ;TUCSON/DG;CALL TO TASKMAN [ 10/25/91 1:22 PM ]
+1 ;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
+2 ;
+3 SET (ATSQT,ATSGO)=0
FOR L=0:0
DO ASK
IF ATSQT
QUIT
+4 KILL IO("Q")
+5 IF ATSGO
DO ZIS
+6 SET ATSTASK=0
+7 IF $DATA(IO("Q"))
IF 'POP
SET ATSTASK=1
DO TSKMN
+8 DO EOJ
+9 QUIT
+10 ;
ASK ;
+1 WRITE !!,"Do you want to queue the comparison to another device"
SET %=2
DO YN^DICN
+2 IF %=2
SET ATSQT=1
QUIT
+3 IF %=0
DO HELP
QUIT
+4 IF %=-1
SET ATSQT=1
SET ATSFLAG=$SELECT($DATA(^UTILITY("ATSEARCH",$JOB,"MERGED")):2,1:1)
QUIT
+5 IF %=1
SET ATSQT=1
SET ATSGO=1
QUIT
+6 QUIT
+7 ;
ZIS ;
+1 WRITE !!
SET %IS="PQ"
SET IOP="Q"
DO ^%ZIS
+2 QUIT
+3 ;
TSKMN ;
+1 SET ATSFLAG=1
+2 KILL ZTSAVE
FOR %="ATSTASK","ATSEARCH(","ATSEINRL","ATSENB","ATSENLAG","ATSFLAG","ATSMTCH","ATSNOT","ATSPC","ATSX","ATSETMP","ATSRCSTR"
SET ZTSAVE(%)=""
+3 SET ZTRTN="ZTM^ATSERCH4"
SET ZTDESC="SEARCH COMPARISON"
SET ZTIO=IO
SET ZTDTH=""
DO ^%ZTLOAD
+4 XECUTE ^%ZIS("C")
+5 QUIT
+6 ;
HELP ;
+1 SET XQH="ATSEARCH-QUEUE"
SET DIC(0)="X"
DO EN^XQH
+2 IF $DATA(IOF)
WRITE @IOF
+3 QUIT
+4 ;
EOJ ;
+1 KILL ATSGO,ATSQT,IO("Q")
+2 QUIT
+3 ;