source: WorldVistAEHR/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXNDX5.m@ 1714

Last change on this file since 1714 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1LEXNDX5 ; ISL Set/kill indexes (Part 5) Link ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996;Build 1
3 ;
4EXCL ; Is a term used with an "Exclusive" meaning?
5 Q:'$D(LEXREP)!('$D(LEXBY))
6 S LEXEXCL=1 I $D(^LEX(757.01,"AWRD",LEXREP)) D
7 . W !,LEXREP," is used as follows: ",!
8 . S (LEXCTR,LEXREC)=0 F S LEXREC=$O(^LEX(757.01,"AWRD",LEXREP,LEXREC)) Q:+LEXREC=0 D
9 . . S LEXCTR=LEXCTR+1 W !,$J(LEXCTR,4),": ",^LEX(757.01,LEXREC,0)
10 . . I LEXCTR#16=0 D CONT
11ASKEX . ; Ask, "is it exclusive?"
12 . W !!,"Based on the reference",$S(LEXCTR>1:"s",1:"")," shown above, does ",LEXREP
13 . W !,"exclusively refer to ",LEXBY
14ASKEX2 . ; Get response
15 . S %=2 D YN^DICN S LEXEXCL=$S(%=2:0,%=-1:0,1:%) Q:%'=0
16 . I '% D EXCLHLP G ASKEX2
17 . G ASKEX
18 Q
19EXCLHLP ; Help to decide if the term use is "Exclusive"
20 W !!,"If ",LEXREP," exclusively refers to ",LEXBY,", answer"
21 W !,"""Yes"" and ",LEXREP," will always be replaced by",LEXBY,"."
22 W !!,"If ",LEXREP," refers to concepts other than",LEXBY,", answer"
23 W !,"""No"" and begin linking ",LEXREP," to ",LEXBY," (in each"
24 W !,"occurrence where the two terms have the same meaning)"
25 W !!,"Is ",LEXREP," used exclusively"
26 Q
27CONT ; Continue?
28 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
29ANYWAY ; Term was not found, ask to link the term anyway
30 Q:'$D(LEXREP)!('$D(LEXBY)) Q:$D(^LEX(757.01,"AWRD",LEXREP)) N LEXANYW S LEXEXCL=0
31 W !!,LEXREP," was not found in the Lexicon"
32ANY2 ; Get response
33 W !,"Do you wish to link ",LEXREP," to terms",!,"containing ",LEXBY
34 S %=1,LEXEXCL=0 D YN^DICN S:%=-1!(%=2) LEXEXCL=1 Q:%'=0
35 I '% D ANYHLP G ANY2
36 W ! G ANY2
37ANYHLP ; Help to decide whether to continue with the linkage
38 W !!,"Linking ",LEXREP," to ",LEXREP," will cause the "
39 W !,"look-up to include all linked occurences of ",LEXREP
40 W !,"to be listed when searching for ",LEXREP,!
41 Q
Note: See TracBrowser for help on using the repository browser.