source: FOIAVistA/tag/r/SCHEDULING-SD-SC/SDWLFULU.m@ 1595

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1SDWLFULU ;;IOFO BAY PINES/TEH - SAVE/RESTORE UTILITY FOR ENROLLE STATUS;06/12/2002 ; 20 Aug 2002 2:10 PM
2 ;;5.3;scheduling;**525**;AUG 13 1993;Build 47
3 ;
4 ;
5 ;
6 ;
7 ;
8 ;
9 Q
10EN D HD
11 W !!
12 S DIR(0)="SA^B:BACKUP;R:RESTORE"
13 S DIR("A")="(B)ackup or (R)estore " D ^DIR
14 I X["^" Q
15 I X["b" D BACKUP
16 I X["B" D BACKUP
17 I X["R" D RESTORE
18 I X["r" D RESTORE
19 I X="" Q
20END K DA,DIE,DIR,DR,SDWLE,SDWLX,X,SDWLEE
21 Q
22BACKUP ;
23 ;CHECK FOR RUN STATUS
24 S Y=1 I $D(^XTMP("SDWLFULSTAT",$J,"1B")) W !,"This option has already been run." D I Y D RESTART G EN0
25 .S DIR(0)="Y",DIR("A")="Do you want to re-run all options",DIR("B")="N" D ^DIR
26 .I X["^" S Y=0 Q
27 .I X["Y"!(X["y") S Y=1 Q
28 .S Y=0
29 I 'Y Q
30EN0 K ^XTMP("409.3")
31 S SDWLX=0 F S SDWLX=$O(^SDWL(409.3,SDWLX)) Q:SDWLX<1 D
32 .S SDWLE=$G(^SDWL(409.3,SDWLX,0)) Q:SDWLE="" D
33 ..S SDWLEE=$P(SDWLE,U,20)
34 ..S ^XTMP("409.3",SDWLX)=SDWLEE
35 W !!,"Backup Completed in ^XTMP(""409.3"")"
36 S ^XTMP("SDWLFULSTAT",$J,"1B")=""
37 Q
38RESTORE ;
39 ;CHECK RUN STATUS
40 I '$D(^XTMP("SDWLFULSTAT",$J,"1B")) W !,"Must run BACK-UP before RESTORE." Q
41 I '$D(^XTMP("409.3")) W !,"Nothing to Restore." Q
42 S SDWLX=0,SDWLCNT=0 F S SDWLX=$O(^XTMP("409.3",SDWLX)) Q:SDWLX<1 D
43 .S SDWLCNT=SDWLCNT+1
44 .S SDWLE=$G(^XTMP("409.3",SDWLX))
45 .S DR="27////^S X=SDWLE",DIE="^SDWL(409.3,",DA=SDWLX D ^DIE
46 W !!,"Restore Completed" D MESS
47 K SDWLCNT S ^XTMP("SDWLFULSTAT",$J,"1R")=""
48 Q
49MESS ;
50 N XMSUB,XMY,XMTEXT,XMDUZ,SDWLMSG,SDWLI,SDWLIN,XQSUB,Y
51 S XMY("BENBOW.PHYLLIS2@FORUM.VA.GOV")=""
52 S XMY("DERDERIAN.JOHN@FORUM.VA.GOV")=""
53 S XMY("HOUTCHENS.THOMAS@FORUM.VA.GOV")=""
54 S XMY("BROWN.BONNIE@FORUM.VA.GOV")=""
55 S XMY("KROCHMAL.CHUCK@FORUM.VA.GOV")=""
56 S XMY("TAPPER.BRIAN@FORUM.VA.GOV")=""
57 S XMY("LANDRIE.LARRY@FORUM.VA.GOV")=""
58 S XMY("TOWSON.LINDA@FORUM.VA.GOV")=""
59 S XMSUB="Patch SD*5.3*525 restored."
60 S XMTEXT="SDWLMSG(",XMDUZ="POSTMASTER"
61 S SDWLIN=$$GET1^DIQ(4,DUZ(2)_",",.01,,)
62 S SDWLMSG(1,0)="A RESTORE has been performed on patch SD*5.3*525 at "_SDWLIN
63 S Y=DT D DD^%DT
64 S SDWLMSG(2,0)="At "_Y
65 S SDWLMSG(3,0)=SDWLCNT_"Records had the EWL Enrollee Status restored to pre-patch values."
66 S SDWLMSG(4,0)="",SDWLMSG(0)=4
67 D ^XMD
68 Q
69HD W:$D(IOF) @IOF W !,?80-$L("SD WAIT LIST file save/restore utility")\2,"EWL WAIT LIST save/restore utility"
70 Q
71RESTART ;
72 S DIR(0)="Y",DIR("A")="Are you absolutely sure you want to restart this process"
73 D ^DIR I X["^" Q
74 I X["Y"!(X["y") K ^XTMP("SDWLFULSTAT") Q
75 Q
Note: See TracBrowser for help on using the repository browser.