source: WorldVistAEHR/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXDMGO.m@ 1579

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1LEXDMGO ; ISL Defaults - Manager/Overwrite ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996;Build 1
3 ;
4 ; LEXOVER Flag - Overwrite user defaults (Y/N)
5 ; LEXDNAM Default name
6 ; LEXDVAL Default value
7 ; LEXX Return value
8 ;
9OVER(LEXX) ; Replace existing defaults
10 S LEXX=$$OVERW Q LEXX
11OVERW(LEXX) ; Ask to overwrite (replace)
12 W !
13OVERP ; Get user response
14 N DIR,DTOUT,DUOUT,DIRUT,DIROUT,X,Y
15 S DIR("A")="Replace existing user defaults? "
16 S DIR("B")="No",DIR(0)="YAO",DIR("?")="^D OVRH^LEXDMGO"
17 S DIR("??")="^D OVRH^LEXDMGO" D ^DIR K DIR I Y[U S LEXX=Y Q LEXX
18 S LEXX=0 S:+Y>0 LEXX=1 Q LEXX
19OVRH ; Overwrite help
20 W !!," By answering No:"
21 W !!," Existing defaults will have precedence over the selected changes"
22 W !," Replacing or deleting existing defaults will not be allowed"
23 W !," Adding defaults where none previously existed will be allowed"
24 W !!," By answering Yes:"
25 W !!," Selected changes will have precedence over existing defaults"
26 W !," Adding defaults where none previously existed will be allowed",!
27 D DISCHG Q
28OVRCHG ; Display effects of overwrite changes
29 I +($G(LEXOVER))>0 D Q
30 . W !,"Replace existing defaults:"
31 . W " Yes, existing defaults will be changed",! D DISCHG
32 I +($G(LEXOVER))'>0 D Q
33 . W !!,"Replace existing defaults:"
34 . W " No, existing defaults will remain unaltered",!
35 Q
36DISCHG ; Display changes
37 D CHG("LEXDICS","filter"),CHG("LEXSHOW","display")
38 D CHG("LEXSUB","vocabulary"),CHG("LEXCTX","shortcuts")
39 Q
40CHG(LEXDVAL,LEXDNAM) ; Changes
41 I $G(@LEXDVAL)="" D Q
42 . W !," No changes made to the default ",LEXDNAM
43 I $G(@LEXDVAL)'="@" D Q
44 . W !," Existing ",LEXDNAM," will be replaced"
45 I $G(@LEXDVAL)="@" D
46 . W !," Existing ",LEXDNAM," will be deleted"
47 Q
Note: See TracBrowser for help on using the repository browser.