SD53674P ;ALB/BJR - Un-schedule and Delete CLW and CLU Transmissions ;9/16/2017 2:06 pm
;;5.3;Scheduling;**674**;Aug 13, 1993;Build 18
; Call to RTN^%ZTLOAD supported by ICR #10063
; Call to DQ^%ZTLOAD supported by ICR #10063
; Call to KILL^%ZTLOAD supported by ICR #10063
; Call to OWNSKEY^XUSRB supported by ICR #3277
; Call to BMES^XPDUTL supported by ICR #10141
Q
EN ;Entry Point for SD*5.3*674 post install routine
N SDRTN,SDRTN1,SDRTN2,SDLIST,ZTSK,SDKEY,SDRET
S SDKEY="ZTMQ" D OWNSKEY^XUSRB(.SDRET,SDKEY) I '$G(SDRET(0)) D BMES^XPDUTL("The Installer MUST be assigned Security Key 'ZTMQ'.") D Q
.D BMES^XPDUTL("Please add the key to yourself using Allocation of Security Keys [ORLEASE] menu option.")
.D BMES^XPDUTL("Then, either re-install the patch, or re-run post install routine EN^SS53674P from the command prompt.")
S SDRTN="RUN^SCRPW74(1)",SDRTN1="RUN^SCRPW74(0)",SDRTN2="RUN^SCRPW74"
S SDLIST="^TMP(""SDLIST"",$J)"
D RTN^%ZTLOAD(SDRTN,SDLIST),RTN^%ZTLOAD(SDRTN1,SDLIST),RTN^%ZTLOAD(SDRTN2,SDLIST)
I '$O(^TMP("SDLIST",$J,0)) D BMES^XPDUTL("No Clinic Utilization (CLU) or Clinic Wait Time (CLW) tasks found.") Q
S ZTSK=0 F S ZTSK=$O(^TMP("SDLIST",$J,ZTSK)) Q:'ZTSK D
.D DQ^%ZTLOAD I $G(ZTSK(0)) D BMES^XPDUTL("Task number "_ZTSK_" has been successfully un-scheduled.")
.I '$G(ZTSK(0)) D BMES^XPDUTL("Task number "_ZTSK_" could not be un-scheduled. Please use Taskman Management [XUTM MGR] to un-schedule the task.")
.D KILL^%ZTLOAD I $G(ZTSK(0)) D BMES^XPDUTL("Task number "_ZTSK_" has been successfully deleted.")
.I '$G(ZTSK(0)) D BMES^XPDUTL("Task number "_ZTSK_" could not be deleted. Please use Taskman Management [XUTM MGR] to delete the task.")
K ^XTMP("SD53P192","EXTRACT") D BMES^XPDUTL("The global ^XTMP(""SD53P192"",""EXTRACT"") has been deleted.")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSD53674P 1822 printed Dec 13, 2024@02:45:22 Page 2
SD53674P ;ALB/BJR - Un-schedule and Delete CLW and CLU Transmissions ;9/16/2017 2:06 pm
+1 ;;5.3;Scheduling;**674**;Aug 13, 1993;Build 18
+2 ; Call to RTN^%ZTLOAD supported by ICR #10063
+3 ; Call to DQ^%ZTLOAD supported by ICR #10063
+4 ; Call to KILL^%ZTLOAD supported by ICR #10063
+5 ; Call to OWNSKEY^XUSRB supported by ICR #3277
+6 ; Call to BMES^XPDUTL supported by ICR #10141
+7 QUIT
EN ;Entry Point for SD*5.3*674 post install routine
+1 NEW SDRTN,SDRTN1,SDRTN2,SDLIST,ZTSK,SDKEY,SDRET
+2 SET SDKEY="ZTMQ"
DO OWNSKEY^XUSRB(.SDRET,SDKEY)
IF '$GET(SDRET(0))
DO BMES^XPDUTL("The Installer MUST be assigned Security Key 'ZTMQ'.")
Begin DoDot:1
+3 DO BMES^XPDUTL("Please add the key to yourself using Allocation of Security Keys [ORLEASE] menu option.")
+4 DO BMES^XPDUTL("Then, either re-install the patch, or re-run post install routine EN^SS53674P from the command prompt.")
End DoDot:1
QUIT
+5 SET SDRTN="RUN^SCRPW74(1)"
SET SDRTN1="RUN^SCRPW74(0)"
SET SDRTN2="RUN^SCRPW74"
+6 SET SDLIST="^TMP(""SDLIST"",$J)"
+7 DO RTN^%ZTLOAD(SDRTN,SDLIST)
DO RTN^%ZTLOAD(SDRTN1,SDLIST)
DO RTN^%ZTLOAD(SDRTN2,SDLIST)
+8 IF '$ORDER(^TMP("SDLIST",$JOB,0))
DO BMES^XPDUTL("No Clinic Utilization (CLU) or Clinic Wait Time (CLW) tasks found.")
QUIT
+9 SET ZTSK=0
FOR
SET ZTSK=$ORDER(^TMP("SDLIST",$JOB,ZTSK))
if 'ZTSK
QUIT
Begin DoDot:1
+10 DO DQ^%ZTLOAD
IF $GET(ZTSK(0))
DO BMES^XPDUTL("Task number "_ZTSK_" has been successfully un-scheduled.")
+11 IF '$GET(ZTSK(0))
DO BMES^XPDUTL("Task number "_ZTSK_" could not be un-scheduled. Please use Taskman Management [XUTM MGR] to un-schedule the task.")
+12 DO KILL^%ZTLOAD
IF $GET(ZTSK(0))
DO BMES^XPDUTL("Task number "_ZTSK_" has been successfully deleted.")
+13 IF '$GET(ZTSK(0))
DO BMES^XPDUTL("Task number "_ZTSK_" could not be deleted. Please use Taskman Management [XUTM MGR] to delete the task.")
End DoDot:1
+14 KILL ^XTMP("SD53P192","EXTRACT")
DO BMES^XPDUTL("The global ^XTMP(""SD53P192"",""EXTRACT"") has been deleted.")
+15 QUIT