source: FOIAVistA/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXSET2.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: 4.0 KB
Line 
1LEXSET2 ; ISL Retrieve Appl/Sub/Mode/User Defaults ; 10-15-97
2 ;;2.0;LEXICON UTILITY;**6**;Sep 23, 1996
3 ;
4APP(LEXA) ; Application
5 K LEXD("AP") N LEXT,LEXI S LEXA=+($G(LEXA))
6 Q:LEXA=0 Q:'$D(^LEXT(757.2,LEXA)) Q:$P($G(^LEXT(757.2,LEXA,5)),"^",5)=""
7 S LEXT="AP",LEXI=LEXA D COMMON
8 S:$L($G(^LEXT(757.2,LEXI,7))) LEXD(LEXT,"DIS")=$G(^LEXT(757.2,LEXI,7))
9 S LEXD(LEXT,"UNR")=+($P($G(^LEXT(757.2,LEXI,5)),"^",6))
10 S LEXD(LEXT,"DEF")=+($P($G(^LEXT(757.2,LEXI,5)),"^",3))
11 S LEXD(LEXT,"SCT")=+($P($G(^LEXT(757.2,LEXI,5)),"^",8))
12 ; Modifiers PCH 6
13 S LEXD(LEXT,"MOD")=+($P($G(^LEXT(757.2,LEXI,5)),"^",9))
14 K:+(LEXD(LEXT,"SCT"))=0 LEXD(LEXT,"SCT")
15 S LEXD(LEXT,"FIL")=$G(^LEXT(757.2,LEXI,6))
16 S LEXD("DF","UNR")=+($P($G(^LEXT(757.2,LEXI,5)),"^",6))
17 S LEXD(LEXT,"SUB")=$P($G(^LEXT(757.2,LEXI,5)),"^",2)
18 S:LEXD(LEXT,"SUB")="" LEXD(LEXT,"SUB")="WRD"
19 S LEXD(LEXT,"IDX")="A"_LEXD(LEXT,"SUB")
20 Q
21SUB(LEXS) ; Subset
22 K LEXD("SS") N LEXT,LEXI S LEXS=+($G(LEXS))
23 Q:LEXS=0 Q:'$D(^LEXT(757.2,LEXS)) Q:$P($G(^LEXT(757.2,LEXS,0)),"^",2)=""
24 S LEXT="SS",LEXI=LEXS D COMMON
25 S:$L($G(^LEXT(757.2,LEXI,4))) LEXD(LEXT,"DIS")=$G(^LEXT(757.2,LEXI,4))
26 S LEXD(LEXT,"SCT")=+($P($G(^LEXT(757.2,LEXI,5)),"^",8))
27 K:+(LEXD(LEXT,"SCT"))=0 LEXD(LEXT,"SCT")
28 ; Modifiers PCH 6
29 S LEXD(LEXT,"MOD")=+($P($G(^LEXT(757.2,LEXI,5)),"^",9))
30 S LEXD(LEXT,"FIL")=$G(^LEXT(757.2,LEXI,6))
31 S LEXD(LEXT,"SUB")=$P($G(^LEXT(757.2,LEXI,0)),"^",2)
32 S:LEXD(LEXT,"SUB")="" LEXD(LEXT,"SUB")="WRD"
33 S LEXD(LEXT,"IDX")="A"_LEXD(LEXT,"SUB")
34 Q
35GEN S LEXD("DF","OVR")=0 S:$G(LEXD("AP","OVR"))=1!($G(LEXD("SS","OVR"))=1) LEXD("DF","OVR")=1
36 Q
37MOD(LEXM) ; Mode
38 K LEXD("SS") N LEXT,LEXI S LEXM=+($G(LEXM))
39 Q:LEXM=0 Q:'$D(^LEXT(757.2,LEXM,5)) Q:$P(^LEXT(757.2,LEXM,5),"^",1)="" Q:$P(^LEXT(757.2,LEXM,5),"^",5)'="" Q:$P($G(^LEXT(757.2,LEXM,5)),"^",1)="" S LEXT="SS",LEXI=LEXM D COMMON
40 S:$L($G(^LEXT(757.2,LEXI,7))) LEXD(LEXT,"DIS")=$G(^LEXT(757.2,LEXI,7))
41 S LEXD(LEXT,"FIL")=$G(^LEXT(757.2,LEXI,6))
42 S LEXD(LEXT,"SCT")=+($P($G(^LEXT(757.2,LEXI,5)),"^",8))
43 ; Modifiers PCH 6
44 S LEXD(LEXT,"MOD")=+($P($G(^LEXT(757.2,LEXI,5)),"^",9))
45 K:+(LEXD(LEXT,"SCT"))=0 LEXD(LEXT,"SCT")
46 S LEXD(LEXT,"SUB")=$P($G(^LEXT(757.2,LEXI,5)),"^",2)
47 S:LEXD(LEXT,"SUB")="" LEXD(LEXT,"SUB")="WRD"
48 S LEXD(LEXT,"IDX")="A"_LEXD(LEXT,"SUB")
49 Q
50IND ;
51 S LEXD("DF","XTLKSAY")=1 S:'$L($G(DIC(0))) DIC(0)="EQM" S:'$L($G(X))&(DIC(0)'["A") DIC(0)="A"_DIC(0)
52 S:DIC(0)["L" DIC(0)=$P(DIC(0),"L",1)_$P(DIC(0),"L",2) S:DIC(0)["I" DIC(0)=$P(DIC(0),"I",1)_$P(DIC(0),"L",2)
53 S LEXD("DF","DIC(0)")=DIC(0) K DIC(0)
54 Q
55COMMON ; Common Values
56 S LEXD(LEXT,"IEN")=LEXI S:LEXT="AP" LEXD("DF","LEXAP")=LEXI
57 S LEXD(LEXT,"NAM")=$P($G(^LEXT(757.2,LEXI,0)),"^",1)
58 S LEXD(LEXT,"GBL")=$G(^LEXT(757.2,LEXI,1))
59 S LEXD(LEXT,"OVR")=+($P($G(^LEXT(757.2,LEXI,5)),"^",7))
60 S:$G(^LEXT(757.2,LEXI,2))'="" LEXD(LEXT,"DSP")=$G(^LEXT(757.2,LEXI,3))
61 S:$G(^LEXT(757.2,LEXI,3))'="" LEXD(LEXT,"HLP")="D "_$G(^LEXT(757.2,LEXI,2))
62 Q
63USR(LEXI) ; User defaults
64 Q:+($G(LEXI))=0 Q:+($G(DUZ))=0 Q:'$D(^LEXT(757.2,+LEXI,200,DUZ))
65 N LEXEMP S LEXEMP=$G(^LEXT(757.2,+LEXI,200,DUZ,1)) S:LEXEMP'="" LEXD("UD","FIL")=LEXEMP
66 S LEXEMP=$G(^LEXT(757.2,+LEXI,200,DUZ,2)) S:LEXEMP'="" LEXD("UD","DIS")=LEXEMP
67 S LEXEMP=$G(^LEXT(757.2,+LEXI,200,DUZ,3)) S:LEXEMP'="" LEXD("UD","SUB")=LEXEMP,LEXD("UD","IDX")="A"_LEXEMP
68 S LEXEMP=$G(^LEXT(757.2,+LEXI,200,DUZ,4)) S:LEXEMP'="" LEXD("UD","SCT")=LEXEMP
69 I $L($G(LEXD("UD","SUB"))) D
70 . I $D(^LEXT(757.2,"AA",LEXD("UD","SUB"))) S LEXD("UD","IEN")=$O(^LEXT(757.2,"AA",LEXD("UD","SUB"),0))
71 . I $D(^LEXT(757.2,"AB",LEXD("UD","SUB"))) S LEXD("UD","IEN")=$O(^LEXT(757.2,"AB",LEXD("UD","SUB"),0))
72 . I +($G(LEXD("UD","IEN")))>0,$D(^LEXT(757.2,+($G(LEXD("UD","IEN"))))) D
73 . . S:$L($G(^LEXT(757.2,+($G(LEXD("UD","IEN"))),1))) LEXD("UD","GBL")=$G(^LEXT(757.2,+($G(LEXD("UD","IEN"))),1))
74 . . S:$L($G(^LEXT(757.2,+($G(LEXD("UD","IEN"))),2))) LEXD("UD","DSP")=$G(^LEXT(757.2,+($G(LEXD("UD","IEN"))),2))
75 . . S:$L($G(^LEXT(757.2,+($G(LEXD("UD","IEN"))),3))) LEXD("UD","HLP")=$G(^LEXT(757.2,+($G(LEXD("UD","IEN"))),3))
76 . I '$L($G(LEXD("UD","GBL"))) K LEXD("UD","SUB"),LEXD("UD","IDX")
77 Q
Note: See TracBrowser for help on using the repository browser.