SCDXSTOP ;ALB/TXH - STOP ACRP HL7 TRANSMISSIONS;08/21/18
;;5.3;Scheduling;**640**;AUG 13, 1993;Build 8
;
; This post-init routine will
; - disable the AMB-CARE & SDPM Logical Links
; - unschedule the AMB-CARE NIGHTLY transmission task
; - place AMB-CARE & APM related options Out of Order
;
Q
;
EN ; Entry Point
D BMES^XPDUTL("SD*5.3*640 Post-Init Started...")
D LOGLNK
D DELETE
D OPTOUT
D BMES^XPDUTL("SD*5.3*640 Post-Init Finished.")
D MES^XPDUTL(" ")
Q
;
LOGLNK ; Disable the AMB-CARE & SDPM Logical Links
;
D BMES^XPDUTL(" * Disabling the following Logical Links...")
N SDLOG,SDLOGN,SDLOGLNK,DA,DR,SDLNKMSG,SDLNK
S SDLOG=0
F SDLOGN=1:1 S SDLOGLNK=$P($TEXT(LOGLIST+SDLOGN),";;",2) Q:SDLOGLNK="$$END"!(SDLOGLNK="") D
. S SDLNK=+$$FIND1^DIC(870,"","BX",SDLOGLNK,"","","")
. I SDLNK="" D MES^XPDUTL(" "_SDLOGLNK_" not found. It's okay.") Q
. ; Get AUTOSTART disabled and set SHUTDOWN LLP to YES.
. N DIE S DIE="^HLCS(870,",DA=SDLNK,DR="4.5///0;14///1"
. D ^DIE
. S SDLNKMSG=" "_SDLOGLNK
. D MES^XPDUTL(SDLNKMSG)
D MES^XPDUTL(" Done.")
Q
;
DELETE ; Remove the following tasks in Option Schedule
; SCDX AMBCAR NIGHTLY XMIT Ambulatory Care Nightly Transmission to NPCDB
; SCRPW APM TASK JOB Schedule APM Performance Monitor Task
; SDOQM PM NIGHTLY JOB Nightly job for PM data extract
;
; IA #6121 Remove Scheduled options from #19.2
; IA #2051 Database Server API: Lookup Utilities (DIC)
;
K ^XTMP("SCDXTSK")
D BMES^XPDUTL(" * Removing ACRP & APM related scheduled tasks...")
N SDMCN,SDRPTSK,SDOPT,DA,DIK,SDTSKMSG
S SDN=0
F SDMCN=1:1 S SDRPTSK=$P($TEXT(TSKLIST+SDMCN),";;",2) Q:SDRPTSK="$$END"!(SDRPTSK="") D
. S SDOPT=+$$FIND1^DIC(19,"","BX",SDRPTSK,"","","")
. I SDOPT="" D MES^XPDUTL(" "_SDRPTSK_" not found. It's okay.") Q
. S DA="" F S DA=$O(^DIC(19.2,"B",SDOPT,DA)) Q:'+DA D
. . S ^XTMP("SCDXTSK",$J,SDN)=$$FMADD^XLFDT(DT+90)_"^"_DT_"^copy of "_SDRPTSK_" in #19.2^"_DA
. . M ^XTMP("SCDXTSK",$J,SDN,"DIC",19.2,DA)=^DIC(19.2,DA)
. . S DIK="^DIC(19.2," D ^DIK
. . S SDTSKMSG=" "_SDRPTSK
. . D MES^XPDUTL(SDTSKMSG)
. . S SDN=SDN+1
K SDN
D MES^XPDUTL(" Done.")
Q
;
OPTOUT ; Set options out of order
;
; IA #1157 OUT^XPDMENU(OPT,TXT)
;
D BMES^XPDUTL(" * Placing the following options out of order...")
N SDMCN,SDOPT,SDTXT,SDOPTMSG
S SDTXT="This functionality is now accomplished by CDW/VSSC."
F SDMCN=1:1 S SDOPT=$P($TEXT(OPTLIST+SDMCN),";;",2) Q:SDOPT="$$END"!(SDOPT="") D
. D OUT^XPDMENU(SDOPT,SDTXT) ;Mark option out-of-order
. S SDOPTMSG=" "_SDOPT
. D MES^XPDUTL(SDOPTMSG)
D MES^XPDUTL(" Done.")
Q
;
OPTLIST ; options
;;SCDX AMBCAR NIGHTLY XMIT
;;SCDX AMBCAR RETRANS BY DATE
;;SCDX AMBCAR RETRANS ERROR
;;SCDX AMBCAR RETRANS SEL REJ
;;SCRPW APM TASK JOB
;;SCRPW PM RETRANSMIT REPORT
;;SDOQM PM NIGHTLY JOB
;;$$END
;
TSKLIST ; Scheduled tasks
;;SCDX AMBCAR NIGHTLY XMIT
;;SCRPW APM TASK JOB
;;SDOQM PM NIGHTLY JOB
;;$$END
;
LOGLIST ; Logical Links
;;AMB-CARE
;;SDPM
;;$$END
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSCDXSTOP 3112 printed Dec 13, 2024@02:39:32 Page 2
SCDXSTOP ;ALB/TXH - STOP ACRP HL7 TRANSMISSIONS;08/21/18
+1 ;;5.3;Scheduling;**640**;AUG 13, 1993;Build 8
+2 ;
+3 ; This post-init routine will
+4 ; - disable the AMB-CARE & SDPM Logical Links
+5 ; - unschedule the AMB-CARE NIGHTLY transmission task
+6 ; - place AMB-CARE & APM related options Out of Order
+7 ;
+8 QUIT
+9 ;
EN ; Entry Point
+1 DO BMES^XPDUTL("SD*5.3*640 Post-Init Started...")
+2 DO LOGLNK
+3 DO DELETE
+4 DO OPTOUT
+5 DO BMES^XPDUTL("SD*5.3*640 Post-Init Finished.")
+6 DO MES^XPDUTL(" ")
+7 QUIT
+8 ;
LOGLNK ; Disable the AMB-CARE & SDPM Logical Links
+1 ;
+2 DO BMES^XPDUTL(" * Disabling the following Logical Links...")
+3 NEW SDLOG,SDLOGN,SDLOGLNK,DA,DR,SDLNKMSG,SDLNK
+4 SET SDLOG=0
+5 FOR SDLOGN=1:1
SET SDLOGLNK=$PIECE($TEXT(LOGLIST+SDLOGN),";;",2)
if SDLOGLNK="$$END"!(SDLOGLNK="")
QUIT
Begin DoDot:1
+6 SET SDLNK=+$$FIND1^DIC(870,"","BX",SDLOGLNK,"","","")
+7 IF SDLNK=""
DO MES^XPDUTL(" "_SDLOGLNK_" not found. It's okay.")
QUIT
+8 ; Get AUTOSTART disabled and set SHUTDOWN LLP to YES.
+9 NEW DIE
SET DIE="^HLCS(870,"
SET DA=SDLNK
SET DR="4.5///0;14///1"
+10 DO ^DIE
+11 SET SDLNKMSG=" "_SDLOGLNK
+12 DO MES^XPDUTL(SDLNKMSG)
End DoDot:1
+13 DO MES^XPDUTL(" Done.")
+14 QUIT
+15 ;
DELETE ; Remove the following tasks in Option Schedule
+1 ; SCDX AMBCAR NIGHTLY XMIT Ambulatory Care Nightly Transmission to NPCDB
+2 ; SCRPW APM TASK JOB Schedule APM Performance Monitor Task
+3 ; SDOQM PM NIGHTLY JOB Nightly job for PM data extract
+4 ;
+5 ; IA #6121 Remove Scheduled options from #19.2
+6 ; IA #2051 Database Server API: Lookup Utilities (DIC)
+7 ;
+8 KILL ^XTMP("SCDXTSK")
+9 DO BMES^XPDUTL(" * Removing ACRP & APM related scheduled tasks...")
+10 NEW SDMCN,SDRPTSK,SDOPT,DA,DIK,SDTSKMSG
+11 SET SDN=0
+12 FOR SDMCN=1:1
SET SDRPTSK=$PIECE($TEXT(TSKLIST+SDMCN),";;",2)
if SDRPTSK="$$END"!(SDRPTSK="")
QUIT
Begin DoDot:1
+13 SET SDOPT=+$$FIND1^DIC(19,"","BX",SDRPTSK,"","","")
+14 IF SDOPT=""
DO MES^XPDUTL(" "_SDRPTSK_" not found. It's okay.")
QUIT
+15 SET DA=""
FOR
SET DA=$ORDER(^DIC(19.2,"B",SDOPT,DA))
if '+DA
QUIT
Begin DoDot:2
+16 SET ^XTMP("SCDXTSK",$JOB,SDN)=$$FMADD^XLFDT(DT+90)_"^"_DT_"^copy of "_SDRPTSK_" in #19.2^"_DA
+17 MERGE ^XTMP("SCDXTSK",$JOB,SDN,"DIC",19.2,DA)=^DIC(19.2,DA)
+18 SET DIK="^DIC(19.2,"
DO ^DIK
+19 SET SDTSKMSG=" "_SDRPTSK
+20 DO MES^XPDUTL(SDTSKMSG)
+21 SET SDN=SDN+1
End DoDot:2
End DoDot:1
+22 KILL SDN
+23 DO MES^XPDUTL(" Done.")
+24 QUIT
+25 ;
OPTOUT ; Set options out of order
+1 ;
+2 ; IA #1157 OUT^XPDMENU(OPT,TXT)
+3 ;
+4 DO BMES^XPDUTL(" * Placing the following options out of order...")
+5 NEW SDMCN,SDOPT,SDTXT,SDOPTMSG
+6 SET SDTXT="This functionality is now accomplished by CDW/VSSC."
+7 FOR SDMCN=1:1
SET SDOPT=$PIECE($TEXT(OPTLIST+SDMCN),";;",2)
if SDOPT="$$END"!(SDOPT="")
QUIT
Begin DoDot:1
+8 ;Mark option out-of-order
DO OUT^XPDMENU(SDOPT,SDTXT)
+9 SET SDOPTMSG=" "_SDOPT
+10 DO MES^XPDUTL(SDOPTMSG)
End DoDot:1
+11 DO MES^XPDUTL(" Done.")
+12 QUIT
+13 ;
OPTLIST ; options
+1 ;;SCDX AMBCAR NIGHTLY XMIT
+2 ;;SCDX AMBCAR RETRANS BY DATE
+3 ;;SCDX AMBCAR RETRANS ERROR
+4 ;;SCDX AMBCAR RETRANS SEL REJ
+5 ;;SCRPW APM TASK JOB
+6 ;;SCRPW PM RETRANSMIT REPORT
+7 ;;SDOQM PM NIGHTLY JOB
+8 ;;$$END
+9 ;
TSKLIST ; Scheduled tasks
+1 ;;SCDX AMBCAR NIGHTLY XMIT
+2 ;;SCRPW APM TASK JOB
+3 ;;SDOQM PM NIGHTLY JOB
+4 ;;$$END
+5 ;
LOGLIST ; Logical Links
+1 ;;AMB-CARE
+2 ;;SDPM
+3 ;;$$END
+4 ;