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

XTLKKWL.m

Go to the documentation of this file.
XTLKKWL ; IHS/OHPRD/ACC,ALB/JLU,SFISC/JC - LOOKUP DRIVER PROGRAM FOR "AND"ING INVERTED SEARCH ;07/22/93  15:46 [ 04/02/2003   8:47 AM ]
 ;;7.3;TOOLKIT;**1001**;APR 1, 2003
 ;;7.3;TOOLKIT;;Apr 25, 1995
 ;THIS ROUTINE CONTAINS IHS MODIFICATIONS BY IHS/ANMC/FDB-9/5/96
 ;AND TASSC/MFD
 ; ASSUMES XTLKKSCH("TYPE"),("GBL"),("INDEX") AND XTLKX
 S XTLKXSAV=XTLKX
 K Y
 S XTLKGBL=XTLKKSCH("GBL"),XTLKL=XTLKX
 S XTLKASK=$S('$D(DIC(0)):1,DIC(0)["E":1,1:0)
 I $G(XTLKSAY)="" S XTLKSAY=1
 ;----- BEGIN IHS MODIFICATION
 ;ORIGINAL MODIFICATIONS BY IHS/ANMC/FDB-9/5/96 AND TASSC/MFD
 ;LINE INIT IS COMMENTED OUT
INIT ;I XTLKGBL'["^",XTLKGBL'?1N.N,XTLKGBL'?1N.N1"."1N.N S XTLKGBL=$O(^DIC("B",XTLKGBL,""))  ;IHS/ANMC/FDB-9/5/96-ORIGINAL LINE-COMMENTED OUT
 ;ADD NEW LINE:
 I $L(XTLKGBL,"@")>2 S XTLKGBL=@($P(XTLKGBL,"@",2))  S:XTLKGBL'["(" XTLKGBL=XTLKGBL_"("  ;IHS/ANMC/FDB-9/5/96-ADDED LINE-PATCH FOR DOUBLY-INDIRECT AMQQ GLOBAL ROOTS BEING PASSED IN DIC
 ;NEXT LINE IS COMMENTED OUT AND REPLACED BY NEW LINE
 ;I XTLKGBL'["^",XTLKGBL'?1N.N"."?1N.N1"."1N.N S XTLKGBL=$O(^DIC("B",XTLKGBL,""))
 I XTLKGBL'["^",XTLKGBL'?1N.N,XTLKGBL'?1N.N1"."1N.N S XTLKGBL=$O(^DIC("B",XTLKGBL,""))   ;TASSC/MFD changed line to equal INIT and get rid of syntax error in the line above
 ;----- END IHS MODIFICATION
 S:XTLKGBL'["^" XTLKGBL=^DIC(XTLKGBL,0,"GL")
 S XTLKREF=XTLKGBL_""""_XTLKKSCH("INDEX")_""",XTLKWD)"
 S XTLKREF1=XTLKGBL
 S XTLKREF2=$E(XTLKREF,1,$L(XTLKREF)-1)_","""")"
 S XTLKREF3=XTLKGBL_"^TMP(""XTLKHITS"",$J,XTLKH),0)"
 S XTLKREF4=$E(XTLKREF,1,$L(XTLKREF)-1)_",XTLKD)"
 ; NOTE: CHKSHRT HAS BEEN CHANGED TO USE "AB" BECAUSE THE
 ;       B INDEX NO LONGER EXISTS FOR ICD FILES -- NEEDS TO
 ;       BE IMPROVED TO PRESERVE GENERALITY OF LOOKUP!!!
CHKSHRT G:'$D(^XT(8984.2,"AC",$P(XTLKREF1,U,2),XTLKL)) NOTSHRT S XTLKI=$O(^(XTLKL,"")),XTLKL=$P($P(^XT(8984.2,XTLKI,0),U,2),";") S Y=$S(XTLKREF1'[$P($P(^XT(8984.2,XTLKI,0),U,2),";",2):-1,$D(@(XTLKREF1_"XTLKL,0)")):XTLKL,1:-1)
 G:Y<1 NOTSHRT
 I $D(@(XTLKREF1_"Y,0)")) X:$D(DIC("S")) DIC("S") E  S Y=-1
 G:Y<1 NOTSHRT
 K ^TMP("XTLKHITS",$J) S ^TMP("XTLKHITS",$J)=1,^TMP("XTLKHITS",$J,1)=Y G VERIFY
NOTSHRT ;
 G NOTSHRT^XTLKKWL1
VERIFY ;
 G VERIFY^XTLKKWL1