source: WorldVistAEHR/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXDMGV.m@ 1261

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

initial load of WorldVistAEHR

File size: 3.1 KB
Line 
1LEXDMGV ; ISL Defaults - Manager/Verify ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996;Build 1
3 ;
4 ; LEXDICS Filter
5 ; LEXDICS(0) Filter name
6 ; LEXDICS(1) Filter - Add, Delete, No Change
7 ; LEXSHOW Display
8 ; LEXSHOW(0) Display name
9 ; LEXSHOW(1) Display - Add, Delete, No Change
10 ; LEXSUB Vocabulary
11 ; LEXSUB(0) Vocabulary name
12 ; LEXSUB(1) Vocabulary - Add, Delete, No Change
13 ; LEXCTX Shortcut Context
14 ; LEXCTX(0) Shortcut Context name
15 ; LEXCTX(1) Shortcut Context - Add, Delete, No Change
16 ;
17 ; LEXUSER User (text, not pointer)
18 ; LEXX Returned value
19 ; LEXLIM Limits (parameter for LEXMETH)
20 ; LEXMETH Method, singel user, by service, by location,
21 ; by both service and location, or all users
22 ;
23VER(LEXX) ; Verify defaults before commiting to the global
24 W @IOF
25 D DDEF,DDU,OVRCHG^LEXDMGO
26 W ! N DIR,DTOUT,DUOUT,DIRUT,DIROUT,X,Y
27 S DIR("A")="Is this correct? "
28 S DIR("B")="Yes"
29 S (DIR("?"),DIR("??"))="^D VERH^LEXDMGV"
30 S DIR(0)="YAO" D ^DIR K DIR I X["^^" Q "^^"
31 Q:X[U U S LEXX=+Y Q LEXX
32VERH ; Verify help
33 W !!,"By answering ""Yes"" you will be setting the look-up defaults for the Clinical"
34 W !,"Lexicon for the selected applications and users."
35 W !!,"Is this correct"
36 Q
37DDEF ; Display defaults
38 N LEXC S LEXC=0
39 I (+($$ACT)) D
40 . W !,"Set user defaults:",!
41 I $D(LEXDICS(1)) D
42 . S LEXC=LEXC+1 W !," ",LEXC," Filter ",LEXDICS(1)
43 . W:$G(LEXDICS(1))["Add" ", ",$P($G(LEXDICS(0))," (",1)
44 I $D(LEXSHOW(1)) D
45 . S LEXC=LEXC+1 W !," ",LEXC," Display ",$G(LEXSHOW(1))
46 . W:$G(LEXSHOW(1))["Add" ", ",$P($G(LEXSHOW(0))," (",1)
47 I $D(LEXSUB(1)) D
48 . S LEXC=LEXC+1 W !," ",LEXC," Vocabulary ",$G(LEXSUB(1))
49 . W:$G(LEXSUB(1))["Add" ", ",$P($G(LEXSUB(0))," (",1)
50 I $D(LEXCTX(1)) D
51 . S LEXC=LEXC+1 W !," ",LEXC," Shortcuts ",$G(LEXCTX(1))
52 . W:$G(LEXCTX(1))["Add" ", ",$P($G(LEXCTX(0))," (",1)
53 W:(+($$ACT)) !
54 Q
55ACT(LEXX) ; Check for Default Action
56 I $D(LEXDICS(1))!($D(LEXSHOW(1))) Q 1
57 I $D(LEXSUB(1))!($D(LEXCTX(1))) Q 1
58 Q 0
59NAM(LEXX) ; Check for Default Names
60 I $D(LEXDICS(0))!($D(LEXSHOW(0))) Q 1
61 I $D(LEXSUB(0))!($D(LEXCTX(0))) Q 1
62 Q 0
63VAL(LEXX) ; Check for Default Values
64 I $D(LEXDICS)!($D(LEXSHOW)) Q 1
65 I $D(LEXSUB)!($D(LEXCTX)) Q 1
66 Q 0
67DDU ; Display users
68 Q:'$D(LEXMETH) N LEXUSER S LEXUSER=$P(LEXMETH,U,2) Q:'$L(LEXUSER)
69 W !,"For ",LEXUSER,! Q
70DEFCK ; Check defaults
71 S LEXDICS(1)=$S($G(LEXDICS)="":"No Change",$G(LEXDICS)="@":"Deleted",1:"Added")
72 S LEXSHOW(1)=$S($G(LEXSHOW)="":"No Change",$G(LEXSHOW)="@":"Deleted",1:"Added")
73 S LEXSUB(1)=$S($G(LEXSUB)="":"No Change",$G(LEXSUB)="@":"Deleted",1:"Added")
74 S LEXCTX(1)=$S($G(LEXCTX)="":"No Change",$G(LEXCTX)="@":"Deleted",1:"Added")
75 Q
76USERCK ; Check user
77 I LEXMETH="ONE",+LEXLIM>0 S $P(LEXMETH,U,2)="user: "_$P(LEXLIM,U,2)
78 I LEXMETH="SEV",+LEXLIM>0 S $P(LEXMETH,U,2)="users in Service/Section: "_$P(LEXLIM,U,2)
79 I LEXMETH="LOC",+LEXLIM>0 S $P(LEXMETH,U,2)="users in Hospital Location: "_$P(LEXLIM,U,2)
80 I LEXMETH="SAL",+LEXLIM>0 S $P(LEXMETH,U,2)="users in Service/Location: "_$P($P(LEXLIM,";",1),U,2)_"/"_$P($P(LEXLIM,";",2),U,2)
81 I LEXMETH="ALL",+LEXLIM>0 S $P(LEXMETH,U,2)="users: All Users"
82 Q
Note: See TracBrowser for help on using the repository browser.