1 | LEXDFL ; ISL Default Filter ; 09-23-96
|
---|
2 | ;;2.0;LEXICON UTILITY;;Sep 23, 1996;Build 1
|
---|
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 | ;
|
---|
17 | EN ; Single user, LEXAP is unknown
|
---|
18 | N LEXAP S LEXAP=$$DFI^LEXDM4 Q:+LEXAP=0 W ! D EN1(LEXAP) Q
|
---|
19 | EN1(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
|
---|
35 | M ; Test entry point MGR
|
---|
36 | S X=$$MGR W !!,X,!! Q
|
---|
37 | MGR(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
|
---|
47 | SET ; Set default filter
|
---|
48 | D SET^LEXDSV(LEXUSER,LEXAP,LEXDVAL,LEXDNAM,LEXFLD) Q
|
---|
49 | KILL ; Kill default filter
|
---|
50 | D SET^LEXDSV(LEXUSER,LEXAP,"@","Delete",LEXFLD) Q
|
---|