ATSERCHA ; TUCSON/DG;DISPLAY RESULT OF COMPARISON VALUES [ 10/25/91 3:20 PM ]
;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
;
D DISPLAY
D START
D EOJ
Q
;
DISPLAY ;
W:$D(IOF) @IOF
I $D(IO)#2 U IO ; Use of USE command granted exemption by OMB
E U 0 ; Use of USE command granted exemption by OMB
Q
;
START ;GET VALUES OUT OF ^UTILITY("ATSEARCH",$J,"MERGED",3
S ATSECMPT=0 F L=0:0 S ATSECMPT=$O(^UTILITY("ATSEARCH",$J,"MERGED",3,ATSECMPT)) Q:ATSECMPT'=+ATSECMPT D @$S(ATSEARCH("FILELINK")=ATSEARCH("PTRFILENUM"):"PTRFILE",1:"NOTPTRFL")
I IO=IO(0) R !!,"Press return when ready to continue ... ",X:DTIME
I IO'=IO(0) X ^%ZIS("C")
Q
;
PTRFILE ;DISPLAYS .01 FIELD ONLY FROM POINTER FILE IF MERGED RESULTS
;LINKED TO POINTER FILE
S DR=".01",DA=ATSECMPT,DIC=ATSEARCH("FILELINK") D EN^DIQ1
I $D(^UTILITY("DIQ1",$J,ATSEARCH("FILELINK"),DA,.01)) W !,^(.01)
E W *7,!,"STORED ENTRY, DFN=",DA,", NOT FOUND IN THE ",$P(^DIC(ATSEARCH("FILELINK"),0),U)," FILE"
K ^UTILITY("DIQ1",$J,ATSEARCH("FILELINK"),DA,.01)
Q
;
NOTPTRFL ;DISPLAYS .01 FIELD AND COMMON FIELD VALUE FROM NOT
;POINTED TO FILE WITH MERGED RESULTS LINKED TO IT
I ATSEARCH("FILELINK")=ATSEARCH(1,"SRCHFILENUM") S DR=".01;"_ATSEARCH(1,"FIELD")
E S DR=".01;"_ATSEARCH(2,"FIELD")
S DIC=ATSEARCH("FILELINK"),DA=ATSECMPT D EN^DIQ1
I $D(^UTILITY("DIQ1",$J,ATSEARCH("FILELINK"),DA,.01)) W !,^(.01) S ATSEVLU=$S($D(^($P(DR,";",2))):^($P(DR,";",2)),1:"") I ATSEVLU'=^UTILITY("DIQ1",$J,ATSEARCH("FILELINK"),DA,.01) W ?32,$S(ATSEVLU]"":ATSEVLU,1:"POINTER FIELD VALUE IS NULL")
I '$D(^UTILITY("DIQ1",$J,ATSEARCH("FILELINK"),DA,.01)) W *7,!,"STORED ENTRY, DFN=",DA,", NOT FOUND IN THE ",$P(^DIC(ATSEARCH("FILELINK"),0),U)," FILE"
K ^UTILITY("DIQ1",$J,ATSEARCH("FILELINK"),DA)
Q
;
EOJ ;
K ATSECMPT,ATSEVLU
Q
;
ATSERCHA ; TUCSON/DG;DISPLAY RESULT OF COMPARISON VALUES [ 10/25/91 3:20 PM ]
+1 ;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
+2 ;
+3 DO DISPLAY
+4 DO START
+5 DO EOJ
+6 QUIT
+7 ;
DISPLAY ;
+1 IF $DATA(IOF)
WRITE @IOF
+2 ; Use of USE command granted exemption by OMB
IF $DATA(IO)#2
USE IO
+3 ; Use of USE command granted exemption by OMB
IF '$TEST
USE 0
+4 QUIT
+5 ;
START ;GET VALUES OUT OF ^UTILITY("ATSEARCH",$J,"MERGED",3
+1 SET ATSECMPT=0
FOR L=0:0
SET ATSECMPT=$ORDER(^UTILITY("ATSEARCH",$JOB,"MERGED",3,ATSECMPT))
IF ATSECMPT'=+ATSECMPT
QUIT
DO @$SELECT(ATSEARCH("FILELINK")=ATSEARCH("PTRFILENUM"):"PTRFILE",1:"NOTPTRFL")
+2 IF IO=IO(0)
READ !!,"Press return when ready to continue ... ",X:DTIME
+3 IF IO'=IO(0)
XECUTE ^%ZIS("C")
+4 QUIT
+5 ;
PTRFILE ;DISPLAYS .01 FIELD ONLY FROM POINTER FILE IF MERGED RESULTS
+1 ;LINKED TO POINTER FILE
+2 SET DR=".01"
SET DA=ATSECMPT
SET DIC=ATSEARCH("FILELINK")
DO EN^DIQ1
+3 IF $DATA(^UTILITY("DIQ1",$JOB,ATSEARCH("FILELINK"),DA,.01))
WRITE !,^(.01)
+4 IF '$TEST
WRITE *7,!,"STORED ENTRY, DFN=",DA,", NOT FOUND IN THE ",$PIECE(^DIC(ATSEARCH("FILELINK"),0),U)," FILE"
+5 KILL ^UTILITY("DIQ1",$JOB,ATSEARCH("FILELINK"),DA,.01)
+6 QUIT
+7 ;
NOTPTRFL ;DISPLAYS .01 FIELD AND COMMON FIELD VALUE FROM NOT
+1 ;POINTED TO FILE WITH MERGED RESULTS LINKED TO IT
+2 IF ATSEARCH("FILELINK")=ATSEARCH(1,"SRCHFILENUM")
SET DR=".01;"_ATSEARCH(1,"FIELD")
+3 IF '$TEST
SET DR=".01;"_ATSEARCH(2,"FIELD")
+4 SET DIC=ATSEARCH("FILELINK")
SET DA=ATSECMPT
DO EN^DIQ1
+5 IF $DATA(^UTILITY("DIQ1",$JOB,ATSEARCH("FILELINK"),DA,.01))
WRITE !,^(.01)
SET ATSEVLU=$SELECT($DATA(^($PIECE(DR,";",2))):^($PIECE(DR,";",2)),1:"")
IF ATSEVLU'=^UTILITY("DIQ1",$JOB,ATSEARCH("FILELINK"),DA,.01)
WRITE ?32,$SELECT(ATSEVLU]"":ATSEVLU,1:"POINTER FIELD VALUE IS NULL")
+6 IF '$DATA(^UTILITY("DIQ1",$JOB,ATSEARCH("FILELINK"),DA,.01))
WRITE *7,!,"STORED ENTRY, DFN=",DA,", NOT FOUND IN THE ",$PIECE(^DIC(ATSEARCH("FILELINK"),0),U)," FILE"
+7 KILL ^UTILITY("DIQ1",$JOB,ATSEARCH("FILELINK"),DA)
+8 QUIT
+9 ;
EOJ ;
+1 KILL ATSECMPT,ATSEVLU
+2 QUIT
+3 ;