source: WorldVistAEHR/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXDCX.m@ 792

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

initial load of WorldVistAEHR

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