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

LEXNDX5.m

Go to the documentation of this file.
  1. LEXNDX5 ;ISL/KER - Set/kill indexes (Part 5) Link ;04/21/2014
  1. ;;2.0;LEXICON UTILITY;**80**;Sep 23, 1996;Build 1
  1. ;
  1. ; Global Variables
  1. ; None
  1. ;
  1. ; External References
  1. ; YN^DICN ICR 10009
  1. ; ^DIR ICR 10026
  1. ;
  1. EXCL ; Is a term used with an "Exclusive" meaning?
  1. Q:'$D(LEXREP)!('$D(LEXBY))
  1. S LEXEXCL=1 I $D(^LEX(757.01,"AWRD",LEXREP)) D
  1. . W !,LEXREP," is used as follows: ",!
  1. . S (LEXCTR,LEXREC)=0 F S LEXREC=$O(^LEX(757.01,"AWRD",LEXREP,LEXREC)) Q:+LEXREC=0 D
  1. . . S LEXCTR=LEXCTR+1 W !,$J(LEXCTR,4),": ",^LEX(757.01,LEXREC,0)
  1. . . I LEXCTR#16=0 D CONT
  1. ASKEX . ; Ask, "is it exclusive?"
  1. . W !!,"Based on the reference",$S(LEXCTR>1:"s",1:"")," shown above, does ",LEXREP
  1. . W !,"exclusively refer to ",LEXBY
  1. ASKEX2 . ; Get response
  1. . S %=2 D YN^DICN S LEXEXCL=$S(%=2:0,%=-1:0,1:%) Q:%'=0
  1. . I '% D EXCLHLP G ASKEX2
  1. . G ASKEX
  1. Q
  1. EXCLHLP ; Help to decide if the term use is "Exclusive"
  1. W !!,"If ",LEXREP," exclusively refers to ",LEXBY,", answer"
  1. W !,"""Yes"" and ",LEXREP," will always be replaced by",LEXBY,"."
  1. W !!,"If ",LEXREP," refers to concepts other than",LEXBY,", answer"
  1. W !,"""No"" and begin linking ",LEXREP," to ",LEXBY," (in each"
  1. W !,"occurrence where the two terms have the same meaning)"
  1. W !!,"Is ",LEXREP," used exclusively"
  1. Q
  1. CONT ; Continue?
  1. W ! N X,Y,DTOUT,DUOUT,DIRUT,DIROUT S DIR("A")="Press <Return> to continue ",DIR("?")="Additional information is available, press <Return> to continue ",DIR(0)="EA" D ^DIR K DIR W ! Q
  1. ANYWAY ; Term was not found, ask to link the term anyway
  1. Q:'$D(LEXREP)!('$D(LEXBY)) Q:$D(^LEX(757.01,"AWRD",LEXREP)) N LEXANYW S LEXEXCL=0
  1. W !!,LEXREP," was not found in the Lexicon"
  1. ANY2 ; Get response
  1. W !,"Do you wish to link ",LEXREP," to terms",!,"containing ",LEXBY
  1. S %=1,LEXEXCL=0 D YN^DICN S:%=-1!(%=2) LEXEXCL=1 Q:%'=0
  1. I '% D ANYHLP G ANY2
  1. W ! G ANY2
  1. ANYHLP ; Help to decide whether to continue with the linkage
  1. W !!,"Linking ",LEXREP," to ",LEXREP," will cause the "
  1. W !,"look-up to include all linked occurences of ",LEXREP
  1. W !,"to be listed when searching for ",LEXREP,!
  1. Q