source: WorldVistAEHR/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXDMG.m@ 1739

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

initial load of WorldVistAEHR

File size: 3.1 KB
Line 
1LEXDMG ; ISL Defaults - Manager Options ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996;Build 1
3 ;
4 ; LEXDICS Filter
5 ; LEXDICS(0) Filter name
6 ; LEXSHOW Display
7 ; LEXSHOW(0) Display name
8 ; LEXSUB Vocabulary
9 ; LEXSUB(0) Vocabulary name
10 ; LEXCTX Shortcut Context
11 ; LEXCTX(0) Shortcut Context name
12 ;
13 ; LEXAP Application
14 ; LEXCHG Flag for 1) defaults changed 0) not changed
15 ; LEXDNAM Default name
16 ; LEXDVAL Default value
17 ; LEXGET Executable code which gets the default values
18 ; LEXMAX Maximum number of defaults
19 ; LEXMGR Flag - Manager
20 ; LEXRTN Routine name which sets the defaults values
21 ; LEXSEL User input/selection
22 ;
23 W @IOF
24 N LEXDICS,LEXSHOW,LEXSUB,LEXCTX,LEXMAX
25 N LEXAP,LEXCHG,LEXDNAM,LEXDVAL,LEXGET
26 N LEXRTN,LEXSEL,LEXMGR
27 S (LEXMGR,LEXSEL,LEXDICS,LEXDICS(0),LEXSHOW,LEXSHOW(0))=""
28 S (LEXSUB,LEXSUB(0),LEXCTX,LEXCTX(0))="",LEXMAX=4
29APPS ; Defaults for an application
30 S LEXCHG=0
31APP ; Get the application(s) - $$FI^LEXDM4
32 S LEXAP=$$FI^LEXDM4
33 I LEXAP="" W !!,"No application(s) selected",! G EXIT
34 D DEFMENU G DEFOPT
35DEFMENU ; Edit Defaults Menu
36 W !!,"Lexicon Defaults:"
37 W !!," 1 Filter "
38 W $S($L($G(LEXDICS(0))):"- ",1:""),$G(LEXDICS(0))
39 W:'$L($G(LEXDICS(0))) " Unselected"
40 W !," 2 Display "
41 W $S($L($G(LEXSHOW(0))):"- ",1:""),$G(LEXSHOW(0))
42 W:'$L($G(LEXSHOW(0))) " Unselected"
43 W !," 3 Vocabulary "
44 W $S($L($G(LEXSUB(0))):"- ",1:""),$G(LEXSUB(0))
45 W:'$L($G(LEXSUB(0))) " Unselected"
46 W !," 4 Shortcuts "
47 W $S($L($G(LEXCTX(0))):"- ",1:""),$G(LEXCTX(0))
48 W:'$L($G(LEXCTX(0))) " Unselected"
49 W ! Q
50DEFOPT ; Get user input LEXSEL from ^DIR
51 N DIR,DTOUT,DUOUT,DIRUT,DIROUT,X,Y
52 G:$G(LEXSEL)["^^" EXIT
53 S DIR("A")="Select default to modify (1-"_LEXMAX_"): "
54 S DIR("?")="^D DEFHLP^LEXDMG"
55 S DIR(0)="NAO^1:"_LEXMAX_":0" D ^DIR
56 S LEXSEL=$S($D(DTOUT):"",X["^^":"^^",X[U&(X'["^^"):U,1:X) K DIR
57 G:LEXSEL=U APPS G:LEXSEL="^^" EXIT
58 G:+LEXSEL=0&(LEXCHG=0) EXIT G:+LEXSEL=0&(LEXCHG>0) USR
59 ; Get Filter - $$MGR^LEXDFL
60 I +LEXSEL=1 D G DEFOPT
61 . D GETDEF("LEXDICS","LEXDICS(0)","$$MGR^LEXDFL")
62 ; Get Display - $$MGR^LEXDCC
63 I +LEXSEL=2 D G DEFOPT
64 . D GETDEF("LEXSHOW","LEXSHOW(0)","$$MGR^LEXDCC")
65 ; Get Vocabulary - $$MGR^LEXDVO
66 I +LEXSEL=3 D G DEFOPT
67 . D GETDEF("LEXSUB","LEXSUB(0)","$$MGR^LEXDVO")
68 ; Get Shortcut Context - $$MGR^LEXDCX
69 I +LEXSEL=4 D G DEFOPT
70 . D GETDEF("LEXCTX","LEXCTX(0)","$$MGR^LEXDCX")
71 Q
72DEFHLP ; Help
73 W !!,"Enter 1-",LEXMAX," to modify defaults, ""^"" for previous menu,"
74 W:'LEXCHG " or ""^^""/<Return> to exit"
75 W:LEXCHG " ""^^"" to exit, or",!,"<Return> to continue."
76 D DEFMENU Q
77GETDEF(LEXDVAL,LEXDNAM,LEXRTN) ; Get the default values - X LEXGET
78 N LEXGET S LEXGET="S "_LEXDVAL_"="_LEXRTN X LEXGET
79 S:@LEXDVAL="^^" LEXSEL="^^"
80 S @LEXDNAM=$P(@LEXDVAL,U,$L(@LEXDVAL,U))
81 S @LEXDVAL=$P(@LEXDVAL,U,1,($L(@LEXDVAL,U)-1))
82 S:@LEXDVAL="" @LEXDNAM="No Change"
83 S:@LEXDVAL'="" LEXCHG=1 D:LEXSEL'["^^" DEFMENU Q
84USR ; Set defaults for a User or User Group - $$USER^LEXDMGU
85 S LEXSEL=$$USER^LEXDMGU
86 I $D(LEXSEL),LEXSEL=U D DEFMENU G DEFOPT
87EXIT ; Cleanup and quit
88 Q
Note: See TracBrowser for help on using the repository browser.