source: FOIAVistA/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXDFL.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: 1.9 KB
Line 
1LEXDFL ; ISL Default Filter ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996
3 ;
4 ; Entry: D EN^LEXDFL LEXAP is unknown
5 ;
6 ; Entry: D EN1^LEXDFL(LEXAP) LEXAP is known
7 ;
8 ; Single user entry point - Saves Filter in file 757.2
9 ;
10 ; Where
11 ;
12 ; LEXAP Pointer to file 757.2
13 ; LEXUSER DUZ of user
14 ; LEXCA Action (modify/delete)
15 ; LEXCM Method (predefined/create)
16 ;
17EN ; Single user, LEXAP is unknown
18 N LEXAP S LEXAP=$$DFI^LEXDM4 Q:+LEXAP=0 W ! D EN1(LEXAP) Q
19EN1(LEXAP) ; Single user, LEXAP is known
20 N LEXUSER,LEXX S LEXUSER=$G(DUZ) Q:+LEXUSER'>0 Q:'$D(^VA(200,+LEXUSER))
21 ;
22 S LEXAP=$G(LEXAP) Q:LEXAP=""
23 I '$D(^LEXT(757.2,+LEXAP,0))&('$D(^LEXT(757.2,"B",LEXAP)))&('$D(^LEXT(757.2,"C",$$UP^XLFSTR(LEXAP))))&('$D(^LEXT(757.2,"AN",LEXAP))) Q
24 S:+LEXAP'>0 LEXAP=$$AP^LEXDFN2(LEXAP)
25 ;
26 Q:+($G(LEXAP))'>0 Q:+($P($G(^LEXT(757.2,+LEXAP,5)),"^",3))'>0
27 N LEXCA,LEXCM,LEXDVAL,LEXDNAM,LEXFLD,LEXFIL S LEXFIL=""
28 S LEXFLD=1,LEXCA=$$MOD^LEXDM(1) Q:LEXCA=0!(LEXCA="^^")
29 D:LEXCA="@" KILL Q:LEXCA="@" W ! S LEXCM=$$MTH^LEXDM(1) Q:LEXCM["^"
30 S:LEXCM=1 LEXDVAL=$$EN^LEXDFLS
31 S:LEXCM=2 LEXDVAL=$$EN^LEXDFLC Q:LEXDVAL="^^"
32 S LEXDNAM=$P(LEXDVAL,"^",$L(LEXDVAL,"^")),LEXDVAL=$P(LEXDVAL,"^",1,($L(LEXDVAL,"^")-1))
33 D SET
34 Q
35M ; Test entry point MGR
36 S X=$$MGR W !!,X,!! Q
37MGR(LEXX) ; Multi-user (for Manager options)
38 ; Do not save filter, return value to manager option
39 N LEXCA,LEXCM,LEXDVAL S LEXX=""
40 S LEXCA=$$MOD^LEXDM(1) Q:LEXCA=0 "^" Q:(LEXCA="^^") "^^"
41 Q:LEXCA="@" "@^Delete filter"
42 W ! S LEXCM=$$MTH^LEXDM(1) S:LEXCM[U LEXX=U S:LEXCM["^^" LEXX="^^"
43 Q:LEXX["^" LEXX
44 S:LEXCM=1 LEXDVAL=$$EN^LEXDFLS S:LEXCM=2 LEXDVAL=$$EN^LEXDFLC
45 Q:LEXDVAL="^^" "^^"
46 S LEXX=LEXDVAL Q LEXX
47SET ; Set default filter
48 D SET^LEXDSV(LEXUSER,LEXAP,LEXDVAL,LEXDNAM,LEXFLD) Q
49KILL ; Kill default filter
50 D SET^LEXDSV(LEXUSER,LEXAP,"@","Delete",LEXFLD) Q
Note: See TracBrowser for help on using the repository browser.