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

ATSERCHB.m

Go to the documentation of this file.
ATSERCHB ;TUCSON/DG;MENU FOR CHOICES TO LINK TO  [ 10/25/91  1:22 PM ]
 ;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
 ;
 F ATSENB=1:1:3 S ATSEOP(ATSENB)=$P($T(OPTIONS+ATSENB),";",3)
 I ATSEARCH(1,"SRCHFILENUM")=ATSEARCH(2,"SRCHFILENUM") D ASKFILE3,EOJ Q
 D @$S(ATSNOT="":"ASKFILE4",1:"ASKFILE5"),EOJ Q  ;IF TWO TEMPLATES LINKED TO DIFFERENT FILES
 ;
ASKFILE3 ;SRCHFILE1=SRCHFILE2, IF DIFFERENCE, THEN UTILIZE THE TEMPLATE THAT
 ;HAS THE ENTRIES YOU WILL STORE TO CREATE THE "MERGED" UTILITY NODES
 W !!,"Results will be linked with the ",@ATSEOP(1)_" file" H 2
 S ATSENB=$S(ATSMTCH=3:2,1:1) ; IF ATSMTCH=3 THEN USE TEMPLATE TWO
 S ATSEARCH("FILELINK")=ATSEARCH(1,"SRCHFILENUM")
 ;FOR FILELINK, ATSEARCH(1,"SRCHFILENUM")=(2,"SRCHFILENUM")
 S ATSX=ATSENB
 ;ATSX IS USEFUL ONLY IF USER WANTS RESULTS NOT LINKED TO PTR FILE
 D ^ATSERCH4
 Q
 ;
ASKFILE4 ;PTRFILE,SRCHFILE1,SRCHFILE2 DIFF FILES, INTERSECTION OF TEMPLATES
 S X="" F ATSL=0:0 Q:(X'<1&(X'>2))!(X="^")!(ATSFLAG)  D:X["?" HELP D ASKLOOP4
 I ATSFLAG Q
 S ATSEARCH("FILELINK")=$S(X=1:ATSEARCH(1,"SRCHFILENUM"),1:ATSEARCH(2,"SRCHFILENUM")),ATSX=X
 D ^ATSERCH4
 Q
 ;
ASKLOOP4 ;CONTINUATION OF FOR LOOP IN ASKFILE4
 W !!,"Choose, by number, the file you want merged results linked to:",!!,1," ",@ATSEOP(1),!,2," ",@ATSEOP(2) R !!,"Your choice (1-2): ",X:DTIME
 S:'$T X="^" I "^"[X S ATSFLAG=$S($D(^UTILITY("ATSEARCH",$J,"MERGED")):2,1:1)
 Q
 ;
ASKFILE5 ;PTRFILE,SRCHFILE1,SRCHFILE2, DIFF FILES, DIFFERENCE BETWEEN TEMPLATES
 S ATSENB=$S(ATSMTCH=2:1,1:2)
 ;
 ;CAN ONLY LINK TO TEMPLATE THAT HAS THE ENTRIES YOU WANT
 ;THE "NOT TEMPLATE" CANNOT BE CHOSEN
 ;NOR CAN THE POINTER FILE BE CHOSEN
 ;
 W !!,"Results will be linked to the ",@ATSEOP(ATSENB)_" file" H 2
 S ATSEARCH("FILELINK")=ATSEARCH(ATSENB,"SRCHFILENUM")
 S ATSX=ATSENB
 D ^ATSERCH4
 Q
 ;
HELP ;CALL TO HELP FRAME
 S XQH="ATSEARCH-LINK",DIC(0)="X" D EN^XQH
 W:$D(IOF) @IOF
 Q
 ;
EOJ ;
 K ATSEOP,ATSENB,ATSEY
 Q
 ;
OPTIONS ;MENU CHOICES
 ;;ATSEARCH(1,"SRCHFILENAM")
 ;;ATSEARCH(2,"SRCHFILENAM")
 ;;ATSEARCH("PTRFILENAM")
 ;;