ATSERCHG ;TUCSON/DG;PIECES OF ATSERCH4 [ 10/25/91 1:39 PM ]
;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
WRITE ; - EP -
W !!,"There ",$S(ATSEARCH("MERGE COUNT")=1:"was ",1:"were "),ATSEARCH("MERGE COUNT"),$S(ATSEARCH("MERGE COUNT")=1:" match ",1:" matches "),"("
W $S(ATSEARCH(1,"SRCHNAM")'=ATSEARCH(2,"SRCHNAM"):ATSEARCH(1,"SRCHNAM")_" and "_ATSEARCH(2,"SRCHNAM"),1:ATSEARCH(1,"SRCHNAM")),")"
Q
;
CHKMTCH ; - EP - IF MATCHES=0 AND > FIRST TIME THRU, SET ^("MERGED",4) TO ^("MERGED",3)
I ATSEARCH("MERGE COUNT")=0,ATSLOOP>1
E K ^UTILITY("ATSEARCH",$J,"TMP") Q
S ATSTMPN=0 F ATSL=0:0 S ATSTMPN=$O(^UTILITY("ATSEARCH",$J,"TMP",ATSTMPN)) Q:ATSTMPN'=+ATSTMPN S ^UTILITY("ATSEARCH",$J,"MERGED",3,ATSTMPN)=""
Q
;
ATSERCHG ;TUCSON/DG;PIECES OF ATSERCH4 [ 10/25/91 1:39 PM ]
+1 ;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
WRITE ; - EP -
+1 WRITE !!,"There ",$SELECT(ATSEARCH("MERGE COUNT")=1:"was ",1:"were "),ATSEARCH("MERGE COUNT"),$SELECT(ATSEARCH("MERGE COUNT")=1:" match ",1:" matches "),"("
+2 WRITE $SELECT(ATSEARCH(1,"SRCHNAM")'=ATSEARCH(2,"SRCHNAM"):ATSEARCH(1,"SRCHNAM")_" and "_ATSEARCH(2,"SRCHNAM"),1:ATSEARCH(1,"SRCHNAM")),")"
+3 QUIT
+4 ;
CHKMTCH ; - EP - IF MATCHES=0 AND > FIRST TIME THRU, SET ^("MERGED",4) TO ^("MERGED",3)
+1 IF ATSEARCH("MERGE COUNT")=0
IF ATSLOOP>1
+2 IF '$TEST
KILL ^UTILITY("ATSEARCH",$JOB,"TMP")
QUIT
+3 SET ATSTMPN=0
FOR ATSL=0:0
SET ATSTMPN=$ORDER(^UTILITY("ATSEARCH",$JOB,"TMP",ATSTMPN))
IF ATSTMPN'=+ATSTMPN
QUIT
SET ^UTILITY("ATSEARCH",$JOB,"MERGED",3,ATSTMPN)=""
+4 QUIT
+5 ;