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

ATSERCH8.m

Go to the documentation of this file.
ATSERCH8 ;TUCSON/DG;DISPLAYS OR PRINTS RESULTS TO THIS POINT  [ 10/25/91  1:22 PM ]
 ;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
 ;
 S ATSEAGAN=0
 S ATSENDIS=1000 ;WILL NOT DISPLAY INTERMEDIATE RESULTS IF TOO GREAT A COUNT
 S ATSESURE=100 ;WILL ASK IF YOU'RE SURE IF ABOVE A CERTAIN COUNT
 F L=0:0 Q:ATSEAGAN  D ASK
 I ATSEAGAN=2 D EOJ Q
 S ATSEAGAN=0 ; RESET IN CASE ASK USER IF SURE THEY WANT A PRINTOUT
 I ATSEARCH("MERGE COUNT")>ATSESURE F L=0:0 Q:ATSEAGAN  D SURE
 I ATSEAGAN=2 D EOJ Q
 D PRINT
 D @$S(POP:"EOJ",1:"^ATSERCHA")
 I $S('$D(POP):1,'POP:1,1:0) D EOJ
 Q
 ;
ASK ;ASKS USER IF WANTS TO DISPLAY/PRINT RESULTS TO THIS POINT
 I ATSEARCH("MERGE COUNT")>ATSENDIS S ATSEAGAN=2 Q
 W !!,"Do you want to print the results to this point" S %=2 D YN^DICN
 I %=2!(%=-1) S ATSEAGAN=2 Q
 I %=0 D HELP Q
 I %=1 S ATSEAGAN=1 Q
 Q
 ;
SURE ;IF GREATER THAN 90 MATCHES, USER ASKED IF THEY ARE SURE THEY WANT A DISPLAY
 W !!,*7,"There are ",ATSEARCH("MERGE COUNT")," matches.",!,"Are you sure you want to print or display the results so far" S %=1 D YN^DICN
 I %=2!(%=-1) S ATSEAGAN=2 Q
 I %=1 S ATSEAGAN=1 Q
 Q
 ;
PRINT ;
 W !! S %IS="P" D ^%ZIS
 Q
 ;
HELP ;
 S XQH="ATSEARCH-PRINT",DIC(0)="X" D EN^XQH
 W:$D(IOF) @IOF
 Q
 ;
EOJ ;
 I ATSEAGAN'=2,$I'=IO(0) X ^%ZIS("C")
 K ATSEAGAN,ATSENDIS,ATSESURE
 Q
 ;