source: FOIAVistA/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXDFN.m@ 1801

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1LEXDFN ; ISL Default Names ; 10-15-97
2 ;;2.0;LEXICON UTILITY;**6**;Sep 23, 1996
3 ;
4APPN(X) ; Application Name
5 N LEXT,LEXA S (LEXA,LEXT)="",X=$G(X)
6 I +X>0,$D(^LEXT(757.2,+X,0)) D
7 . S LEXA=$P($G(^LEXT(757.2,+X,5)),"^",4)
8 . Q:LEXA="" Q:'$D(^LEXT(757.2,"APPS",LEXA))
9 . S LEXT=$P($G(^LEXT(757.2,+X,0)),"^",1)
10 S:X'=""&(LEXT="") X="Unknown Application" S:LEXT'="" X=LEXT Q X
11DISN(X) ; Display Name
12 N LEXT S LEXT="" S X=$G(X) I X'="" D
13 . N LEXO,LEXC,LEXR S LEXC=$E(X,1,63),LEXO=$E(LEXC,1,($L(LEXC)-1))_$C($A($E(LEXC,$L(LEXC)))-1)_"~"
14 . F S LEXO=$O(^LEX(757.31,"ADSP",LEXO)) Q:LEXO=""!(LEXO'[LEXC) D Q:LEXT'=""
15 . . S LEXR=0 F S LEXR=$O(^LEX(757.31,"ADSP",LEXO,LEXR)) Q:+LEXR=0 D Q:LEXT'=""
16 . . . I $G(^LEX(757.31,LEXR,1))=X S LEXT=$P($G(^LEX(757.31,LEXR,0)),"^",1)
17 S:X'=""&(LEXT="") X="User Defined Display" S:LEXT'="" X=LEXT Q X
18FILN(X) ; Filter Name
19 N LEXT S LEXT="" S X=$G(X) I X'="" D
20 . N LEXO,LEXC,LEXR S LEXC=$E(X,1,63)
21 . S LEXO=$E(LEXC,1,($L(LEXC)-1))_$C($A($E(LEXC,$L(LEXC)))-1)_"~"
22 . F S LEXO=$O(^LEX(757.3,"AS",LEXO)) Q:LEXT'=""!(LEXO'[LEXC) D
23 . . S LEXR=0 F S LEXR=$O(^LEX(757.3,"AS",LEXO,LEXR)) Q:+LEXR=0!(LEXT'="") D Q:LEXT'=""
24 . . . S:$G(^LEX(757.3,+LEXR,1))=X LEXT=$P($G(^LEX(757.3,+LEXR,0)),"^",1)
25 S:X'=""&(LEXT="") X="User Defined Filter" S:LEXT'="" X=LEXT Q X
26GBLN(X) ; Global Name
27 S X=$G(X) Q:X="" "Unknown Global" Q:X'["^" "Unknown Global"
28 Q:X'["(" "Unknown Global" N LEXT S LEXT=$G(@(X_"0)"))
29 S LEXT=$P(LEXT,"^",1) Q:LEXT="" "Unknown Global"
30 N LEXS,LEXK,LEXI S LEXS=""
31 F LEXI=1:1:$L(LEXT," ") D
32 . S LEXK=$$UP^XLFSTR($E($P(LEXT," ",LEXI),1))_$$LOW^XLFSTR($E($P(LEXT," ",LEXI),2,$L($P(LEXT," ",LEXI))))
33 . S LEXS=LEXS_" "_LEXK
34 S:$E(LEXS,1)=" " LEXS=$E(LEXS,2,$L(LEXS))
35 S LEXT=LEXS Q:LEXT="" "Unknown Global"
36 S X=LEXT_" Global" Q X
37IDXN(X) ;
38 S X=$G(X) Q:X="" "Unknown Index" N LEXT,LEXA S LEXT="",LEXA=$E(X,2,$L(X))
39 Q:LEXA="" "Unknown Index" Q:'$D(^LEXT(757.2,"AA",LEXA)) "Unknown Index"
40 N LEXR S LEXR=$O(^LEXT(757.2,"AA",LEXA,0))
41 Q:+LEXR=0 "Unknown Index" Q:'$D(^LEXT(757.2,+LEXR)) "Unknown Index"
42 S LEXT=$P($G(^LEXT(757.2,LEXR,0)),"^",1)
43 I +LEXR=1,LEXT'="" S X="Main "_LEXT_" word index" Q X
44 I +LEXR>1,LEXT'="" S X=LEXT_" subset word index" Q X
45 Q X
46OVRN(X) ; Overwrite
47 S X=+($G(X)) Q:X=0 "Do not overwrite user defaults"
48 Q "Overwrite user defaults"
49 ;
50SCTN(X) ; Shortcuts Context
51 N LEXT,LEXA S (LEXA,LEXT)="",X=$G(X)
52 I +X>0,$D(^LEX(757.41,+X,0)) D
53 . S LEXA=$P($G(^LEX(757.41,+X,0)),"^",1) Q:LEXA="" S LEXT=LEXA
54 S:X'=""&(LEXT="") X="Unknown Shortcut Context" S:LEXT'="" X=LEXT Q X
55 ;
56UNRN(X) ; Unresolved Narratives
57 S X=+($G(X)) Q:X=0 "Do not use unresolved narratives"
58 Q "Use unresolved narratives"
59 ;
60MODI(X) ; Modifiers PCH 6 (added)
61 S X=+($G(X)) Q:X=0 "Do not use modifiers"
62 Q "Use modifiers"
63 ;
64VOCN(X) ; Vocabulary
65 N LEXT,LEXA,LEXR S LEXR=0,LEXT="",LEXA=X,X=""
66 I +LEXA>0,$D(^LEXT(757.2,+LEXA)) D
67 . S LEXT=$P($G(^LEXT(757.2,+LEXA,0)),"^",2) S:LEXT'="" LEXA=LEXT
68 . S LEXT=$P($G(^LEXT(757.2,+LEXA,5)),"^",2) S:LEXT'="" LEXA=LEXT
69 I $D(^LEXT(757.2,"AA",LEXA)) D Q X
70 . S LEXR=$O(^LEXT(757.2,"AA",LEXA,0)) I +LEXR=0 S X="Unknown Vocabulary" Q
71 . S X=$P($G(^LEXT(757.2,+LEXR,0)),"^",1) I X="" S X="Unknown Vocabulary" Q
72 I $D(^LEXT(757.2,"AB",LEXA)) D Q X
73 . S LEXR=$O(^LEXT(757.2,"AB",LEXA,0)) I +LEXR=0 S X="Unknown Vocabulary" Q
74 . S LEXA=$P($G(^LEXT(757.2,+LEXR,5)),"^",2)
75 . I LEXA="" S LEXA=$P($G(^LEXT(757.2,+LEXR,0)),"^",2)
76 . I LEXA'="",$D(^LEXT(757.2,"AA",LEXA)) D
77 . . S LEXR=$O(^LEXT(757.2,"AA",LEXA,0)) I +LEXR=0 S X="Unknown Vocabulary" Q
78 . . S X=$P($G(^LEXT(757.2,+LEXR,0)),"^",1) I X="" S X="Unknown Vocabulary" Q
79 . I X="" S X="Unknown Vocabulary"
80 S:X="" X="Unknown Vocabulary" Q X
Note: See TracBrowser for help on using the repository browser.