source: FOIAVistA/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXLK.m@ 1446

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1LEXLK ; ISL Demo Look Up ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996
3 ;
4EN ; Initialize variables
5 W @IOF N LEXSF,LEXCONT,LEXCLAS,LEXDEF,LEXDIS,LEXEXP,LEXFORM
6 N LEXFM,LEXMC,LEXCODE,LEXSRC,LEXSO,LEXLINE,LEXSPC,LEXNOM
7 N LEXX,LEXY,LEXYPE,LEXEMP,LEXCHK,X,Y,LEXAP S LEXSF=1
8 W @IOF D LOOK G EXIT
9LOOK ; Look-up term
10 W !! K X S LEXAP=1 D ^LEXA1 K DIC D:+($$Y) MORE
11AGAIN ; Try again?
12 W !,"Try another" S %=$S(+($$X):1,1:2)
13 D YN^DICN I %=-1!(%=2) Q
14 I '% W !!,"You have searched for a term in the Lexicon, do you want to" G AGAIN
15 I +($$X)&(%=1) G LOOK
16 I '+($$X)&(%=1) G LOOK
17 I (+($$X)&(%=2))!('+($$X)&(%=1)) Q
18 G LOOK Q
19MORE ; Do you want more information?
20 W !!,"Do you want more information" S %=1 D YN^DICN Q:%=-1
21 I '% D G MORE
22 . W !!,"The Lexicon also contains definitions (on most major concepts),"
23 . W !,"codes (from major coding systems, i.e., ICD, CPT, NANDA, etc.),"
24 . W !,"synonyms, lexical variants, and semantic classifications for each"
25 . W !,"term by class and type."
26 Q:%=2 D:%=1 DISP
27 Q
28DISP ; If requested, get and display information
29 Q:'+($$Y) D GET^LEXLK2(Y) Q:'$G(LEX(0))
30 D LIST^LEXLK2
31 Q
32EXIT ; Clean up environment and quit
33 K %,DIC,DIR,DIROUT,DIRUT,DTOUT,DUOUT,LEX,LEXB,LEXC,LEXCHK,LEXCL
34 K LEXCLAS,LEXCODE,LEXCT,LEXCONT,LEXDEF,LEXDIS,LEXE,LEXEMP
35 K LEXEXP,LEXF,LEXFM,LEXFORM,LEXLC,LEXLINE,LEXLN,LEXMC,LEXMCE
36 K LEXNOM,LEXSCP,LEXSF,LEXSO,LEXSPC,LEXSPCR,LEXSR,LEXSRC
37 K LEXSTR,LEXT,LEXTT,LEXX,LEXY,LEXYPE,X,Y
38 Q
39X(LEX) ; Evaluate X
40 Q:$L($G(X)) 1 Q 0
41Y(LEX) ; Evaluate Y
42 Q:+($G(Y))>1 1 Q 0
Note: See TracBrowser for help on using the repository browser.