RORSETU1 ;HCIOFO/SG - SETUP UTILITIES (USER INTERFACE) ;6/10/03 8:28am
;;1.5;CLINICAL CASE REGISTRIES;**21**;Feb 17, 2006;Build 45
;
;*****************************************************************************
; --- ROUTINE MODIFICATION LOG ---
;
;PKG/PATCH DATE DEVELOPER MODIFICATION
;----------- ---------- ----------- ----------------------------------------
;ROR*1.5*21 NOV 2013 T KOPP Changes to capture parameter info in
; post install log
;
;******************************************************************************
;
Q
;
;***** REQUESTS SETUP PARAMETERS FROM THE USER
;
; .MAXNTSK Maximum number of registry update subtasks is
; returned via this parameter
;
; .SUSPEND Start and end times of registry setup suspension
; are returned via this parameter
;
; Return Values:
; <0 Error code
; 0 Ok
;
ASKPARMS(MAXNTSK,SUSPEND) ;
N DA,DIR,DIROUT,DIRUT,DTOUT,DUOUT,RC,X,Y
S MAXNTSK=0,SUSPEND=""
;---
K DIR S DIR(0)="N^0:10:0",DIR("B")=5
S DIR("A")="Maximum number of registry update subtasks"
D BLD^DIALOG(7980000.009,,,"DIR(""?"")","S")
D ^DIR
Q:$D(DUOUT) -71 Q:$D(DTOUT) -72
S MAXNTSK=Y
;---
K DIR S DIR(0)="Y",DIR("B")="NO"
S DIR("A")="Suspend the post-install during the peak hours"
D BLD^DIALOG(7980000.01,,,"DIR(""?"")","S")
D ^DIR
Q:$D(DUOUT) -71 Q:$D(DTOUT) -72
;---
S RC=0
F Q:'$G(Y) D Q:RC<0
. K DIR S DIR(0)="D^::R",DIR("B")="7:00AM"
. S DIR("A")="Suspension start time"
. D BLD^DIALOG(7980000.011,,,"DIR(""?"")","S")
. D ^DIR
. I $D(DUOUT) S RC=-71 Q
. I $D(DTOUT) S RC=-72 Q
. S $P(SUSPEND,U,1)=Y#1
. ;---
. K DIR S DIR(0)="D^::R",DIR("B")="6:00PM"
. S DIR("A")="Suspension end time"
. D BLD^DIALOG(7980000.012,,,"DIR(""?"")","S")
. D ^DIR
. I $D(DUOUT) S RC=-71 Q
. I $D(DTOUT) S RC=-72 Q
. S $P(SUSPEND,U,2)=Y#1
. ;---
. I $P(SUSPEND,U,2)>$P(SUSPEND,U,1) S Y=0 Q
. W " ??",!!,"The end time must be later than the start time.",!
;---
D:'RC CONFTXT(MAXNTSK,SUSPEND)
;---
Q RC
;
;***** GENERATES THE TEXT OF CONFIRMATION REQUEST
;
; MAXNTSK Maximum number of registry update subtasks
; SUSPEND Task suspension parameters
;
CONFTXT(MAXNTSK,SUSPEND) ;
N TMP
D BMES^XPDUTL("")
D BMES^XPDUTL(" =============================================")
S TMP=$S(MAXNTSK>0:MAXNTSK,1:1)
D BMES^XPDUTL(" Number of registry update (sub)tasks... "_TMP)
S TMP=$S(SUSPEND:"Yes",1:"No")
D BMES^XPDUTL(" Suspend the tasks during peak hours.... "_TMP)
D:SUSPEND
. S TMP=$P($$FMTE^XLFDT(DT+$P(SUSPEND,U,1),"F"),"@",2)
. D BMES^XPDUTL(" Suspend the tasks at................... "_TMP)
. S TMP=$P($$FMTE^XLFDT(DT+$P(SUSPEND,U,2),"F"),"@",2)
. D BMES^XPDUTL(" Resume the tasks at.................... "_TMP)
D BMES^XPDUTL(" =============================================")
D BMES^XPDUTL("")
Q
;
;***** ASKS FOR CONFIRMATION IF THERE ARE NO SEARCH INDICATORS
;
; LSNAME Name of the Lab Search
;
; Return Values:
; <0 Error code
; 0 Exit the registry setup
; >1 Continue the setup
;
LSCONF(LSNAME) ;
N DA,DIR,DIROUT,DIRUT,DTOUT,DUOUT,RC,X,Y
S DIR(0)="Y",DIR("B")="NO"
S DIR("A")="Continue the registry setup"
S DIR("A",1)=""
S DIR("A",2)="The '"_LSNAME_"' Lab Search contains no active search indicators."
D ^DIR
Q $S($D(DUOUT):-71,$D(DTOUT):-72,1:+Y)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRORSETU1 3614 printed Dec 13, 2024@01:43:25 Page 2
RORSETU1 ;HCIOFO/SG - SETUP UTILITIES (USER INTERFACE) ;6/10/03 8:28am
+1 ;;1.5;CLINICAL CASE REGISTRIES;**21**;Feb 17, 2006;Build 45
+2 ;
+3 ;*****************************************************************************
+4 ; --- ROUTINE MODIFICATION LOG ---
+5 ;
+6 ;PKG/PATCH DATE DEVELOPER MODIFICATION
+7 ;----------- ---------- ----------- ----------------------------------------
+8 ;ROR*1.5*21 NOV 2013 T KOPP Changes to capture parameter info in
+9 ; post install log
+10 ;
+11 ;******************************************************************************
+12 ;
+13 QUIT
+14 ;
+15 ;***** REQUESTS SETUP PARAMETERS FROM THE USER
+16 ;
+17 ; .MAXNTSK Maximum number of registry update subtasks is
+18 ; returned via this parameter
+19 ;
+20 ; .SUSPEND Start and end times of registry setup suspension
+21 ; are returned via this parameter
+22 ;
+23 ; Return Values:
+24 ; <0 Error code
+25 ; 0 Ok
+26 ;
ASKPARMS(MAXNTSK,SUSPEND) ;
+1 NEW DA,DIR,DIROUT,DIRUT,DTOUT,DUOUT,RC,X,Y
+2 SET MAXNTSK=0
SET SUSPEND=""
+3 ;---
+4 KILL DIR
SET DIR(0)="N^0:10:0"
SET DIR("B")=5
+5 SET DIR("A")="Maximum number of registry update subtasks"
+6 DO BLD^DIALOG(7980000.009,,,"DIR(""?"")","S")
+7 DO ^DIR
+8 if $DATA(DUOUT)
QUIT -71
if $DATA(DTOUT)
QUIT -72
+9 SET MAXNTSK=Y
+10 ;---
+11 KILL DIR
SET DIR(0)="Y"
SET DIR("B")="NO"
+12 SET DIR("A")="Suspend the post-install during the peak hours"
+13 DO BLD^DIALOG(7980000.01,,,"DIR(""?"")","S")
+14 DO ^DIR
+15 if $DATA(DUOUT)
QUIT -71
if $DATA(DTOUT)
QUIT -72
+16 ;---
+17 SET RC=0
+18 FOR
if '$GET(Y)
QUIT
Begin DoDot:1
+19 KILL DIR
SET DIR(0)="D^::R"
SET DIR("B")="7:00AM"
+20 SET DIR("A")="Suspension start time"
+21 DO BLD^DIALOG(7980000.011,,,"DIR(""?"")","S")
+22 DO ^DIR
+23 IF $DATA(DUOUT)
SET RC=-71
QUIT
+24 IF $DATA(DTOUT)
SET RC=-72
QUIT
+25 SET $PIECE(SUSPEND,U,1)=Y#1
+26 ;---
+27 KILL DIR
SET DIR(0)="D^::R"
SET DIR("B")="6:00PM"
+28 SET DIR("A")="Suspension end time"
+29 DO BLD^DIALOG(7980000.012,,,"DIR(""?"")","S")
+30 DO ^DIR
+31 IF $DATA(DUOUT)
SET RC=-71
QUIT
+32 IF $DATA(DTOUT)
SET RC=-72
QUIT
+33 SET $PIECE(SUSPEND,U,2)=Y#1
+34 ;---
+35 IF $PIECE(SUSPEND,U,2)>$PIECE(SUSPEND,U,1)
SET Y=0
QUIT
+36 WRITE " ??",!!,"The end time must be later than the start time.",!
End DoDot:1
if RC<0
QUIT
+37 ;---
+38 if 'RC
DO CONFTXT(MAXNTSK,SUSPEND)
+39 ;---
+40 QUIT RC
+41 ;
+42 ;***** GENERATES THE TEXT OF CONFIRMATION REQUEST
+43 ;
+44 ; MAXNTSK Maximum number of registry update subtasks
+45 ; SUSPEND Task suspension parameters
+46 ;
CONFTXT(MAXNTSK,SUSPEND) ;
+1 NEW TMP
+2 DO BMES^XPDUTL("")
+3 DO BMES^XPDUTL(" =============================================")
+4 SET TMP=$SELECT(MAXNTSK>0:MAXNTSK,1:1)
+5 DO BMES^XPDUTL(" Number of registry update (sub)tasks... "_TMP)
+6 SET TMP=$SELECT(SUSPEND:"Yes",1:"No")
+7 DO BMES^XPDUTL(" Suspend the tasks during peak hours.... "_TMP)
+8 if SUSPEND
Begin DoDot:1
+9 SET TMP=$PIECE($$FMTE^XLFDT(DT+$PIECE(SUSPEND,U,1),"F"),"@",2)
+10 DO BMES^XPDUTL(" Suspend the tasks at................... "_TMP)
+11 SET TMP=$PIECE($$FMTE^XLFDT(DT+$PIECE(SUSPEND,U,2),"F"),"@",2)
+12 DO BMES^XPDUTL(" Resume the tasks at.................... "_TMP)
End DoDot:1
+13 DO BMES^XPDUTL(" =============================================")
+14 DO BMES^XPDUTL("")
+15 QUIT
+16 ;
+17 ;***** ASKS FOR CONFIRMATION IF THERE ARE NO SEARCH INDICATORS
+18 ;
+19 ; LSNAME Name of the Lab Search
+20 ;
+21 ; Return Values:
+22 ; <0 Error code
+23 ; 0 Exit the registry setup
+24 ; >1 Continue the setup
+25 ;
LSCONF(LSNAME) ;
+1 NEW DA,DIR,DIROUT,DIRUT,DTOUT,DUOUT,RC,X,Y
+2 SET DIR(0)="Y"
SET DIR("B")="NO"
+3 SET DIR("A")="Continue the registry setup"
+4 SET DIR("A",1)=""
+5 SET DIR("A",2)="The '"_LSNAME_"' Lab Search contains no active search indicators."
+6 DO ^DIR
+7 QUIT $SELECT($DATA(DUOUT):-71,$DATA(DTOUT):-72,1:+Y)