Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RORSETU1

RORSETU1.m

Go to the documentation of this file.
  1. RORSETU1 ;HCIOFO/SG - SETUP UTILITIES (USER INTERFACE) ;6/10/03 8:28am
  1. ;;1.5;CLINICAL CASE REGISTRIES;**21**;Feb 17, 2006;Build 45
  1. ;
  1. ;*****************************************************************************
  1. ; --- ROUTINE MODIFICATION LOG ---
  1. ;
  1. ;PKG/PATCH DATE DEVELOPER MODIFICATION
  1. ;----------- ---------- ----------- ----------------------------------------
  1. ;ROR*1.5*21 NOV 2013 T KOPP Changes to capture parameter info in
  1. ; post install log
  1. ;
  1. ;******************************************************************************
  1. ;
  1. Q
  1. ;
  1. ;***** REQUESTS SETUP PARAMETERS FROM THE USER
  1. ;
  1. ; .MAXNTSK Maximum number of registry update subtasks is
  1. ; returned via this parameter
  1. ;
  1. ; .SUSPEND Start and end times of registry setup suspension
  1. ; are returned via this parameter
  1. ;
  1. ; Return Values:
  1. ; <0 Error code
  1. ; 0 Ok
  1. ;
  1. ASKPARMS(MAXNTSK,SUSPEND) ;
  1. N DA,DIR,DIROUT,DIRUT,DTOUT,DUOUT,RC,X,Y
  1. S MAXNTSK=0,SUSPEND=""
  1. ;---
  1. K DIR S DIR(0)="N^0:10:0",DIR("B")=5
  1. S DIR("A")="Maximum number of registry update subtasks"
  1. D BLD^DIALOG(7980000.009,,,"DIR(""?"")","S")
  1. D ^DIR
  1. Q:$D(DUOUT) -71 Q:$D(DTOUT) -72
  1. S MAXNTSK=Y
  1. ;---
  1. K DIR S DIR(0)="Y",DIR("B")="NO"
  1. S DIR("A")="Suspend the post-install during the peak hours"
  1. D BLD^DIALOG(7980000.01,,,"DIR(""?"")","S")
  1. D ^DIR
  1. Q:$D(DUOUT) -71 Q:$D(DTOUT) -72
  1. ;---
  1. S RC=0
  1. F Q:'$G(Y) D Q:RC<0
  1. . K DIR S DIR(0)="D^::R",DIR("B")="7:00AM"
  1. . S DIR("A")="Suspension start time"
  1. . D BLD^DIALOG(7980000.011,,,"DIR(""?"")","S")
  1. . D ^DIR
  1. . I $D(DUOUT) S RC=-71 Q
  1. . I $D(DTOUT) S RC=-72 Q
  1. . S $P(SUSPEND,U,1)=Y#1
  1. . ;---
  1. . K DIR S DIR(0)="D^::R",DIR("B")="6:00PM"
  1. . S DIR("A")="Suspension end time"
  1. . D BLD^DIALOG(7980000.012,,,"DIR(""?"")","S")
  1. . D ^DIR
  1. . I $D(DUOUT) S RC=-71 Q
  1. . I $D(DTOUT) S RC=-72 Q
  1. . S $P(SUSPEND,U,2)=Y#1
  1. . ;---
  1. . I $P(SUSPEND,U,2)>$P(SUSPEND,U,1) S Y=0 Q
  1. . W " ??",!!,"The end time must be later than the start time.",!
  1. ;---
  1. D:'RC CONFTXT(MAXNTSK,SUSPEND)
  1. ;---
  1. Q RC
  1. ;
  1. ;***** GENERATES THE TEXT OF CONFIRMATION REQUEST
  1. ;
  1. ; MAXNTSK Maximum number of registry update subtasks
  1. ; SUSPEND Task suspension parameters
  1. ;
  1. CONFTXT(MAXNTSK,SUSPEND) ;
  1. N TMP
  1. D BMES^XPDUTL("")
  1. D BMES^XPDUTL(" =============================================")
  1. S TMP=$S(MAXNTSK>0:MAXNTSK,1:1)
  1. D BMES^XPDUTL(" Number of registry update (sub)tasks... "_TMP)
  1. S TMP=$S(SUSPEND:"Yes",1:"No")
  1. D BMES^XPDUTL(" Suspend the tasks during peak hours.... "_TMP)
  1. D:SUSPEND
  1. . S TMP=$P($$FMTE^XLFDT(DT+$P(SUSPEND,U,1),"F"),"@",2)
  1. . D BMES^XPDUTL(" Suspend the tasks at................... "_TMP)
  1. . S TMP=$P($$FMTE^XLFDT(DT+$P(SUSPEND,U,2),"F"),"@",2)
  1. . D BMES^XPDUTL(" Resume the tasks at.................... "_TMP)
  1. D BMES^XPDUTL(" =============================================")
  1. D BMES^XPDUTL("")
  1. Q
  1. ;
  1. ;***** ASKS FOR CONFIRMATION IF THERE ARE NO SEARCH INDICATORS
  1. ;
  1. ; LSNAME Name of the Lab Search
  1. ;
  1. ; Return Values:
  1. ; <0 Error code
  1. ; 0 Exit the registry setup
  1. ; >1 Continue the setup
  1. ;
  1. LSCONF(LSNAME) ;
  1. N DA,DIR,DIROUT,DIRUT,DTOUT,DUOUT,RC,X,Y
  1. S DIR(0)="Y",DIR("B")="NO"
  1. S DIR("A")="Continue the registry setup"
  1. S DIR("A",1)=""
  1. S DIR("A",2)="The '"_LSNAME_"' Lab Search contains no active search indicators."
  1. D ^DIR
  1. Q $S($D(DUOUT):-71,$D(DTOUT):-72,1:+Y)