source: FOIAVistA/trunk/r/CLINICAL_CASE_REGISTRIES-ROR/RORSETU1.m@ 1423

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1RORSETU1 ;HCIOFO/SG - SETUP UTILITIES (USER INTERFACE) ; 6/10/03 8:28am
2 ;;1.5;CLINICAL CASE REGISTRIES;;Feb 17, 2006
3 ;
4 Q
5 ;
6 ;***** REQUESTS SETUP PARAMETERS FROM THE USER
7 ;
8 ; .MAXNTSK Maximum number of registry update subtasks is
9 ; returned via this parameter
10 ;
11 ; .SUSPEND Start and end times of registry setup suspension
12 ; are returned via this parameter
13 ;
14 ; Return Values:
15 ; <0 Error code
16 ; 0 Ok
17 ;
18ASKPARMS(MAXNTSK,SUSPEND) ;
19 N DA,DIR,DIROUT,DIRUT,DTOUT,DUOUT,RC,X,Y
20 S MAXNTSK=0,SUSPEND=""
21 ;---
22 K DIR S DIR(0)="N^0:10:0",DIR("B")=5
23 S DIR("A")="Maximum number of registry update subtasks"
24 D BLD^DIALOG(7980000.009,,,"DIR(""?"")","S")
25 D ^DIR
26 Q:$D(DUOUT) -71 Q:$D(DTOUT) -72
27 S MAXNTSK=Y
28 ;---
29 K DIR S DIR(0)="Y",DIR("B")="NO"
30 S DIR("A")="Suspend the post-install during the peak hours"
31 D BLD^DIALOG(7980000.01,,,"DIR(""?"")","S")
32 D ^DIR
33 Q:$D(DUOUT) -71 Q:$D(DTOUT) -72
34 ;---
35 S RC=0
36 F Q:'$G(Y) D Q:RC<0
37 . K DIR S DIR(0)="D^::R",DIR("B")="7:00AM"
38 . S DIR("A")="Suspension start time"
39 . D BLD^DIALOG(7980000.011,,,"DIR(""?"")","S")
40 . D ^DIR
41 . I $D(DUOUT) S RC=-71 Q
42 . I $D(DTOUT) S RC=-72 Q
43 . S $P(SUSPEND,U,1)=Y#1
44 . ;---
45 . K DIR S DIR(0)="D^::R",DIR("B")="6:00PM"
46 . S DIR("A")="Suspension end time"
47 . D BLD^DIALOG(7980000.012,,,"DIR(""?"")","S")
48 . D ^DIR
49 . I $D(DUOUT) S RC=-71 Q
50 . I $D(DTOUT) S RC=-72 Q
51 . S $P(SUSPEND,U,2)=Y#1
52 . ;---
53 . I $P(SUSPEND,U,2)>$P(SUSPEND,U,1) S Y=0 Q
54 . W " ??",!!,"The end time must be later than the start time.",!
55 ;---
56 D:'RC CONFTXT(MAXNTSK,SUSPEND)
57 ;---
58 Q RC
59 ;
60 ;***** GENERATES THE TEXT OF CONFIRMATION REQUEST
61 ;
62 ; MAXNTSK Maximum number of registry update subtasks
63 ; SUSPEND Task suspension parameters
64 ;
65CONFTXT(MAXNTSK,SUSPEND) ;
66 N TMP
67 W !
68 W !," ============================================="
69 S TMP=$S(MAXNTSK>0:MAXNTSK,1:1)
70 W !," Number of registry update (sub)tasks... "_TMP
71 S TMP=$S(SUSPEND:"Yes",1:"No")
72 W !," Suspend the tasks during peak hours.... "_TMP
73 D:SUSPEND
74 . S TMP=$P($$FMTE^XLFDT(DT+$P(SUSPEND,U,1),"F"),"@",2)
75 . W !," Suspend the tasks at................... "_TMP
76 . S TMP=$P($$FMTE^XLFDT(DT+$P(SUSPEND,U,2),"F"),"@",2)
77 . W !," Resume the tasks at.................... "_TMP
78 W !," ============================================="
79 W !
80 Q
81 ;
82 ;***** ASKS FOR CONFIRMATION IF THERE ARE NO SEARCH INDICATORS
83 ;
84 ; LSNAME Name of the Lab Search
85 ;
86 ; Return Values:
87 ; <0 Error code
88 ; 0 Exit the registry setup
89 ; >1 Continue the setup
90 ;
91LSCONF(LSNAME) ;
92 N DA,DIR,DIROUT,DIRUT,DTOUT,DUOUT,RC,X,Y
93 S DIR(0)="Y",DIR("B")="NO"
94 S DIR("A")="Continue the registry setup"
95 S DIR("A",1)=""
96 S DIR("A",2)="The '"_LSNAME_"' Lab Search contains no active search indicators."
97 D ^DIR
98 Q $S($D(DUOUT):-71,$D(DTOUT):-72,1:+Y)
Note: See TracBrowser for help on using the repository browser.