RMPRTDEL ;DEV/RGB - STOP PATIENT NOTIFICATION NIGHTLY JOB;02/18/16
;;3.0;PROSTHETICS;**180**;Feb 09, 1996;Build 12
;
Q
EN ; Entry Point
;
D DELETE
D BMES^XPDUTL("Task removal completed")
Q
;
;
DELETE ;Delete Task
N RMPRTSK,RMPROPT,DA,DIK
S RMPRTSK="RMPR DVN NIGHTLY JOB"
S RMPROPT=$O(^DIC(19,"B",RMPRTSK,"")) Q:'RMPROPT
S DA="" S:'$G(DT) DT=$$DT^XLFDT
F S DA=$O(^DIC(19.2,"B",RMPROPT,DA)) Q:'+DA D
. S ^XTMP("RMPRTSK",$J,0)=$$FMADD^XLFDT(DT,90)_"^"_DT_"^copy of RMPR DVN NIGHTLY Task^"_DA
. M ^XTMP("RMPRTSK",$J,"DIC",19.2,DA)=^DIC(19.2,DA)
. S DIK="^DIC(19.2," D ^DIK
. D BMES^XPDUTL("Legacy task "_RMPRTSK_" Deleted.")
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPRTDEL 670 printed Dec 13, 2024@02:37:56 Page 2
RMPRTDEL ;DEV/RGB - STOP PATIENT NOTIFICATION NIGHTLY JOB;02/18/16
+1 ;;3.0;PROSTHETICS;**180**;Feb 09, 1996;Build 12
+2 ;
+3 QUIT
EN ; Entry Point
+1 ;
+2 DO DELETE
+3 DO BMES^XPDUTL("Task removal completed")
+4 QUIT
+5 ;
+6 ;
DELETE ;Delete Task
+1 NEW RMPRTSK,RMPROPT,DA,DIK
+2 SET RMPRTSK="RMPR DVN NIGHTLY JOB"
+3 SET RMPROPT=$ORDER(^DIC(19,"B",RMPRTSK,""))
if 'RMPROPT
QUIT
+4 SET DA=""
if '$GET(DT)
SET DT=$$DT^XLFDT
+5 FOR
SET DA=$ORDER(^DIC(19.2,"B",RMPROPT,DA))
if '+DA
QUIT
Begin DoDot:1
+6 SET ^XTMP("RMPRTSK",$JOB,0)=$$FMADD^XLFDT(DT,90)_"^"_DT_"^copy of RMPR DVN NIGHTLY Task^"_DA
+7 MERGE ^XTMP("RMPRTSK",$JOB,"DIC",19.2,DA)=^DIC(19.2,DA)
+8 SET DIK="^DIC(19.2,"
DO ^DIK
+9 DO BMES^XPDUTL("Legacy task "_RMPRTSK_" Deleted.")
End DoDot:1
+10 QUIT
+11 ;