BQISYTSK ;GDIT/HCSD/ALA-Check on tasks ; 06 Aug 2015 4:12 PM
;;2.6;ICARE MANAGEMENT SYSTEM;;Jul 07, 2017;Build 72
;
;
EN ;EP
NEW BQTSDTM,BQT,BDT1,BDT2,BDT3,BDT4,ZTSK
S ^XTMP("BQISYTSK",0)=$$FMADD^XLFDT(DT,7)_U_$$DT^XLFDT()_U_"List of running tasks"
S BQTSDTM=$$NOW^XLFDT()
S BQT=""
F S BQT=$O(^%ZTSCH("TASK",BQT)) Q:BQT="" D
. S BDT1=$P(^%ZTSCH("TASK",BQT),"^",5),BDT2=$P(^%ZTSCH("TASK",BQT),"^",8)
. S BDT3=$P(^%ZTSCH("TASK",BQT),"^",13),BDT4=$G(^%ZTSCH("TASK",BQT,1))
. K ZTSK
. S ZTSK=BQT D STAT^%ZTLOAD
. S ^XTMP("BQISYTSK",BQTSDTM,BQT)=$G(ZTSK(2))_"^"_$P(^%ZTSCH("TASK",BQT),"^",4)_"^"_$$HTFM^XLFDT(BDT1)_"^"_$$HTFM^XLFDT(BDT2)_"^"_$$HTFM^XLFDT(BDT3)_"^"_$$HTFM^XLFDT(BDT4)
Q
BQISYTSK ;GDIT/HCSD/ALA-Check on tasks ; 06 Aug 2015 4:12 PM
+1 ;;2.6;ICARE MANAGEMENT SYSTEM;;Jul 07, 2017;Build 72
+2 ;
+3 ;
EN ;EP
+1 NEW BQTSDTM,BQT,BDT1,BDT2,BDT3,BDT4,ZTSK
+2 SET ^XTMP("BQISYTSK",0)=$$FMADD^XLFDT(DT,7)_U_$$DT^XLFDT()_U_"List of running tasks"
+3 SET BQTSDTM=$$NOW^XLFDT()
+4 SET BQT=""
+5 FOR
SET BQT=$ORDER(^%ZTSCH("TASK",BQT))
IF BQT=""
QUIT
Begin DoDot:1
+6 SET BDT1=$PIECE(^%ZTSCH("TASK",BQT),"^",5)
SET BDT2=$PIECE(^%ZTSCH("TASK",BQT),"^",8)
+7 SET BDT3=$PIECE(^%ZTSCH("TASK",BQT),"^",13)
SET BDT4=$GET(^%ZTSCH("TASK",BQT,1))
+8 KILL ZTSK
+9 SET ZTSK=BQT
DO STAT^%ZTLOAD
+10 SET ^XTMP("BQISYTSK",BQTSDTM,BQT)=$GET(ZTSK(2))_"^"_$PIECE(^%ZTSCH("TASK",BQT),"^",4)_"^"_$$HTFM^XLFDT(BDT1)_"^"_$$HTFM^XLFDT(BDT2)_"^"_$$HTFM^XLFDT(BDT3)_"^"_$$HTFM^XLFDT(BDT4)
End DoDot:1
+11 QUIT