SDECI3E ;ALB/SAT - VISTA SCHEDULING RELEASE 2 PRE/POST INSTALL ;FEB 04, 2016
;;5.3;Scheduling;**643**;Aug 13, 1993;Build 14
;
ENV ;
D PQ
Q
;
PQ ;
N SDI,SDNM,SDNOD,SDY
;K:$D(^XTMP("SDECI3E")) ^XTMP("SDECI3E")
Q:$D(^XTMP("SDECI3E","PARAM"))
S ^XTMP("SDECI3E",0)=$$FMADD^XLFDT($$NOW^XLFDT,,1)_"^"_$$NOW^XLFDT
S SDI=0 F S SDI=$O(^SD(403.53,SDI)) Q:SDI'>0 D
.S SDNOD=$G(^SD(403.53,SDI,0))
.S SDNM=$P(SDNOD,U,1)
.S SDY=$P(SDNOD,U,5)
.D ASK
.S ^XTMP("SDECI3E","PARAM",SDI)=SDY
Q
ASK ;
N DIR
S DIR(0)="NA^0:45:0"
S DIR("A")="ENTER the number of days for the CLEAN UP DAY SETTING field for DIVISION "_SDNM_": "
S DIR("B")=$S('+SDY:45,+SDY>45:45,1:SDY)
S DIR("?")="ENTER a number between 0 and 45."
S DIR("??")="This is the number of days to enter into the CLEAN UP DAY SETTING field of the RECALL REMINDERS PARAMETERS file 403.53."
D ^DIR
S SDY=Y
Q
;
PRE ;
Q
;
POST ;
D RPC
D PAR
D RECALL
Q
;
RECALL ;
N SDFDA,SDMENU,SDNEW,SDSYN
S SDMENU=$O(^DIC(19,"B","SDRR MANAGER MENU",0))
I SDMENU="" W !!,"SDRR MANAGER MENU option not found.",! Q
S SDNEW=$O(^DIC(19,"B","SDRR CLINIC LETTER REPORT",0))
I SDNEW="" W !!,"SDRR CLINIC LETTER REPORT option not found.",! Q
Q:$D(^DIC(19,SDMENU,10,"B",SDNEW)) ;already added
S SDSYN=$O(^DIC(19,SDMENU,10,"C",999999999),-1)
S SDSYN=$S(+SDSYN:SDSYN+1,1:9999)
S SDFDA(19.01,"+1,"_SDMENU_",",.01)=SDNEW
S SDFDA(19.01,"+1,"_SDMENU_",",2)=SDSYN
S SDFDA(19.01,"+1,"_SDMENU_",",3)=SDSYN
D UPDATE^DIE("","SDFDA")
Q
;
PAR ;
N SDC,SDFDA,SDI
S SDI=0 F S SDI=$O(^XTMP("SDECI3E","PARAM",SDI)) Q:SDI="" D
.S SDC=^XTMP("SDECI3E","PARAM",SDI)
.I ('+SDC)!(SDC>45) S SDC=45
.S SDFDA(403.53,SDI_",",4)=SDC
.D UPDATE^DIE("","SDFDA")
K ^XTMP("SDECI3E")
Q
;
RPC ;register SDEC rpcs
Q
N Y
S Y=$$NOW^XLFDT,Y=$$FMTE^XLFDT(Y)
W !!,"Registering new RPCs..."
W !,Y
D REGNMSP^SDECRPC("SDEC APPSLOTS","SDECRPC")
D REGNMSP^SDECRPC("SDEC GETSITES","SDECRPC")
D REGNMSP^SDECRPC("XUS SET VISITOR","SDECRPC")
D REGNMSP^SDECRPC("XUS GET VISITOR","SDECRPC")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDECI3E 2096 printed Dec 13, 2024@02:52:10 Page 2
SDECI3E ;ALB/SAT - VISTA SCHEDULING RELEASE 2 PRE/POST INSTALL ;FEB 04, 2016
+1 ;;5.3;Scheduling;**643**;Aug 13, 1993;Build 14
+2 ;
ENV ;
+1 DO PQ
+2 QUIT
+3 ;
PQ ;
+1 NEW SDI,SDNM,SDNOD,SDY
+2 ;K:$D(^XTMP("SDECI3E")) ^XTMP("SDECI3E")
+3 if $DATA(^XTMP("SDECI3E","PARAM"))
QUIT
+4 SET ^XTMP("SDECI3E",0)=$$FMADD^XLFDT($$NOW^XLFDT,,1)_"^"_$$NOW^XLFDT
+5 SET SDI=0
FOR
SET SDI=$ORDER(^SD(403.53,SDI))
if SDI'>0
QUIT
Begin DoDot:1
+6 SET SDNOD=$GET(^SD(403.53,SDI,0))
+7 SET SDNM=$PIECE(SDNOD,U,1)
+8 SET SDY=$PIECE(SDNOD,U,5)
+9 DO ASK
+10 SET ^XTMP("SDECI3E","PARAM",SDI)=SDY
End DoDot:1
+11 QUIT
ASK ;
+1 NEW DIR
+2 SET DIR(0)="NA^0:45:0"
+3 SET DIR("A")="ENTER the number of days for the CLEAN UP DAY SETTING field for DIVISION "_SDNM_": "
+4 SET DIR("B")=$SELECT('+SDY:45,+SDY>45:45,1:SDY)
+5 SET DIR("?")="ENTER a number between 0 and 45."
+6 SET DIR("??")="This is the number of days to enter into the CLEAN UP DAY SETTING field of the RECALL REMINDERS PARAMETERS file 403.53."
+7 DO ^DIR
+8 SET SDY=Y
+9 QUIT
+10 ;
PRE ;
+1 QUIT
+2 ;
POST ;
+1 DO RPC
+2 DO PAR
+3 DO RECALL
+4 QUIT
+5 ;
RECALL ;
+1 NEW SDFDA,SDMENU,SDNEW,SDSYN
+2 SET SDMENU=$ORDER(^DIC(19,"B","SDRR MANAGER MENU",0))
+3 IF SDMENU=""
WRITE !!,"SDRR MANAGER MENU option not found.",!
QUIT
+4 SET SDNEW=$ORDER(^DIC(19,"B","SDRR CLINIC LETTER REPORT",0))
+5 IF SDNEW=""
WRITE !!,"SDRR CLINIC LETTER REPORT option not found.",!
QUIT
+6 ;already added
if $DATA(^DIC(19,SDMENU,10,"B",SDNEW))
QUIT
+7 SET SDSYN=$ORDER(^DIC(19,SDMENU,10,"C",999999999),-1)
+8 SET SDSYN=$SELECT(+SDSYN:SDSYN+1,1:9999)
+9 SET SDFDA(19.01,"+1,"_SDMENU_",",.01)=SDNEW
+10 SET SDFDA(19.01,"+1,"_SDMENU_",",2)=SDSYN
+11 SET SDFDA(19.01,"+1,"_SDMENU_",",3)=SDSYN
+12 DO UPDATE^DIE("","SDFDA")
+13 QUIT
+14 ;
PAR ;
+1 NEW SDC,SDFDA,SDI
+2 SET SDI=0
FOR
SET SDI=$ORDER(^XTMP("SDECI3E","PARAM",SDI))
if SDI=""
QUIT
Begin DoDot:1
+3 SET SDC=^XTMP("SDECI3E","PARAM",SDI)
+4 IF ('+SDC)!(SDC>45)
SET SDC=45
+5 SET SDFDA(403.53,SDI_",",4)=SDC
+6 DO UPDATE^DIE("","SDFDA")
End DoDot:1
+7 KILL ^XTMP("SDECI3E")
+8 QUIT
+9 ;
RPC ;register SDEC rpcs
+1 QUIT
+2 NEW Y
+3 SET Y=$$NOW^XLFDT
SET Y=$$FMTE^XLFDT(Y)
+4 WRITE !!,"Registering new RPCs..."
+5 WRITE !,Y
+6 DO REGNMSP^SDECRPC("SDEC APPSLOTS","SDECRPC")
+7 DO REGNMSP^SDECRPC("SDEC GETSITES","SDECRPC")
+8 DO REGNMSP^SDECRPC("XUS SET VISITOR","SDECRPC")
+9 DO REGNMSP^SDECRPC("XUS GET VISITOR","SDECRPC")
+10 QUIT