source: FOIAVistA/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXDVO.m@ 1163

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1LEXDVO ; ISL Default Vocabulary ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996
3 ;
4 ; Entry: D EN^LEXDVO LEXAP is unknown
5 ;
6 ; Entry: D EN1^LEXDVO(LEXAP) LEXAP is known
7 ;
8 ; Single user entry point - Saves Default Vocabulary in file 757.2
9 ;
10 ; Where
11 ;
12 ; LEXAP Pointer to file 757.2
13 ; LEXCA Action (modify/delete)
14 ; LEXDEL Flag default for Deletion
15 ; LEXDNAM Default Name
16 ; LEXDVAL Default Value
17 ; LEXFIL Flag for Filter
18 ; LEXFLD Default field (1-4) in file 757.201
19 ; LEXUSER DUZ of user
20 ; LEXX Returned value
21 ;
22EN ; Single user, LEXAP is unknown
23 N LEXAP S LEXAP=$$DFI^LEXDM4 Q:+LEXAP=0 W ! D EN1(LEXAP) Q
24EN1(LEXAP) ; Single user, LEXAP is known
25 N X,Y,LEXUSER,LEXX S LEXUSER=$G(DUZ) Q:+LEXUSER'>0 Q:'$D(^VA(200,+LEXUSER))
26 ;
27 S LEXAP=$G(LEXAP) Q:LEXAP=""
28 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
29 S:+LEXAP'>0 LEXAP=$$AP^LEXDFN2(LEXAP)
30 ;
31 Q:+($G(LEXAP))'>0 Q:+($P($G(^LEXT(757.2,+LEXAP,5)),"^",3))'>0
32 K LEXFIL N LEXCA,LEXDVAL,LEXDNAM,LEXFLD S LEXFLD=3
33 S LEXDVAL=$$EN^LEXDVOS Q:LEXDVAL="^^"
34 S LEXDNAM=$P(LEXDVAL,"^",2),LEXDVAL=$P(LEXDVAL,"^",1)
35 Q:LEXDVAL=""&(LEXDNAM="") I LEXDVAL="",LEXDNAM'="" D Q
36 . N LEXDEL S LEXDEL=$$EN^LEXDM2(LEXUSER,LEXAP,3) I +LEXDEL>0 D KILL
37 D SET
38 Q
39MGR(LEXX) ; Multi-user (for Manager options)
40 ; Do not save vocabulary, return value to manager option
41 N LEXCA,LEXDVAL,LEXDNAM S LEXCA=$$MOD^LEXDM(3) Q:LEXCA=0 "^"
42 Q:(LEXCA="^^") "^^" Q:LEXCA="@" "@^Delete vocabulary"
43 W ! S LEXDVAL=$$EN^LEXDVOS Q:LEXDVAL="^^" "^^"
44 S LEXX=LEXDVAL Q LEXX
45SET ; Set default vocabulary
46 D SET^LEXDSV(LEXUSER,LEXAP,LEXDVAL,LEXDNAM,LEXFLD) Q
47KILL ; Kill default vocabulary
48 D SET^LEXDSV(LEXUSER,LEXAP,"@","Delete",LEXFLD) Q
Note: See TracBrowser for help on using the repository browser.