KMPDSSD ;OAK/RAK - CM Tools Status ;2/14/05 11:42
;;3.0;KMPD;;Jan 22, 2009;Build 42
;
FORMAT(KMPDLN) ;-format text for display
;-----------------------------------------------------------------------------
; KMPDLN.... return number of lines - called by reference
;-----------------------------------------------------------------------------
;
Q:$G(KMPDNMSP)=""
;
N LN,VERSION,X S LN=0 K TMP
;
; if no kmpdutl routine
S X="KMPDUTL" X ^%ZOSF("TEST") I '$T D Q
.S LN=LN+1
.D SET^VALM10(LN,"The CM Tools Package is not installed!")
;
; version data
S VERSION=$$VERSION^KMPDUTL
;
; option data
D OPT("KMPD BACKGROUND DRIVER")
;
; bacground data
D BKGRND
;
; file data
D FILES
;
; routine version check
D ROUCHK^KMPDSSD1("D")
;
; node/cpu data
D CPU^KMPDSSD1
;
; mailgroup members
D MGRP^KMPDSSD1
;
; legend
D LEGEND
;
S KMPDLN=LN
;
Q
;
BKGRND ; hl7 background info
;
N DATA,DELTA,ENDT,I,STAT,STDT,Z
;
D PARAMS^KMPDUT("DATA") Q:'$D(DATA)
S DATA(3)=$G(DATA(3)),DATA(4)=$G(DATA(4))
S STDT=$P(DATA(3),U,5),ENDT=$P(DATA(3),U,6),DELTA=$P(DATA(3),U,7)
S:$E(DELTA)=" " $E(DELTA)="0"
; if hl7
I KMPDNMSP="H" D
.S LN=LN+1
.D SET^VALM10(LN,"")
.S LN=LN+1
.D SET^VALM10(LN," Hl7 Dly Bckgrnd Last Start.. "_$$FMTE^XLFDT(STDT))
.S LN=LN+1
.D SET^VALM10(LN," HL7 Dly Bckgrnd Last Stop... "_$$FMTE^XLFDT(ENDT))
.S LN=LN+1
.D SET^VALM10(LN," HL7 Dly Bkgrnd Total Time... "_DELTA)
.S STDT=$P(DATA(3),U,8),ENDT=$P(DATA(3),U,9),DELTA=$P(DATA(3),U,10)
.S:$E(DELTA)=" " $E(DELTA)="0"
.S LN=LN+1
.D SET^VALM10(LN,"")
.S LN=LN+1
.D SET^VALM10(LN," HL7 Wkly Backgrnd Last Start "_$$FMTE^XLFDT(STDT))
.S LN=LN+1
.D SET^VALM10(LN," HL7 Wkly Bckgrnd Last Stop.. "_$$FMTE^XLFDT(ENDT))
.S LN=LN+1
.D SET^VALM10(LN," HL7 Wkly Bckgrnd Total Time. "_DELTA)
.S LN=LN+1
.D SET^VALM10(LN," HL7 Purge Data After........ "_$P(DATA(3),U,11)_" weeks")
.D TRANSTO^KMPDUTL7(1,3,.Z)
.I '$D(Z) S LN=LN+1 D SET^VALM10(LN," HL7 Transmit Data to........ <>")
.E D
..S I=$O(Z("")) I I'="" S LN=LN+1 D SET^VALM10(LN," HL7 Transmit Data to........ "_I)
..F S I=$O(Z(I)) Q:I="" S LN=LN+1 D SET^VALM10(LN,$J(" ",32)_I)
.S LN=LN+1
.D SET^VALM10(LN,"")
;
; timing background info - if available
I KMPDNMSP="T" D
.S LN=LN+1
.D SET^VALM10(LN,"")
.I '$D(DATA(4)) S LN=LN+1 D SET^VALM10(LN," There is no Timing data to report") Q
.S STAT=$G(^KMPTMP("KMPD-CPRS"))
.S LN=LN+1
.D SET^VALM10(LN," TMG Collection Status....... "_$S(STAT:"Running",1:"STOPPED!"))
.S STDT=$P(DATA(4),U,5),ENDT=$P(DATA(4),U,6),DELTA=$P(DATA(4),U,7)
.S:$E(DELTA)=" " $E(DELTA)="0"
.S LN=LN+1
.D SET^VALM10(LN," TMG Dly Bckgrnd Last Start.. "_$$FMTE^XLFDT(STDT))
.S LN=LN+1
.D SET^VALM10(LN," TMG Dly Bckgrnd Last Stop... "_$$FMTE^XLFDT(ENDT))
.S LN=LN+1
.D SET^VALM10(LN," TMG Dly Bkgrnd Total Time... "_DELTA)
.S STDT=$P(DATA(4),U,8),ENDT=$P(DATA(4),U,9),DELTA=$P(DATA(4),U,10)
.S:$E(DELTA)=" " $E(DELTA)="0"
.S LN=LN+1
.D SET^VALM10(LN," TMG Purge Data After........ "_$P(DATA(4),U,11)_" weeks")
.D TRANSTO^KMPDUTL7(1,4,.Z)
.I '$D(Z) S LN=LN+1 D SET^VALM10(LN," TMG Transmit Data to........ <>")
.E D
..S I=$O(Z("")) I I'="" S LN=LN+1 D SET^VALM10(LN," TMG Transmit Data to........ "_I)
..F S I=$O(Z(I)) Q:I="" S LN=LN+1 D SET^VALM10(LN,$J(" ",32)_I)
.S LN=LN+1
.D SET^VALM10(LN,"")
;
Q
;
FILES ;-- file data
;
N TEXT,X
;
S LN=LN+1
D SET^VALM10(LN,$J(" ",35)_" # of Oldest Recent")
S LN=LN+1
D SET^VALM10(LN," File"_$J(" ",28)_"Entries Date Date")
S LN=LN+1
D SET^VALM10(LN," ------------------------- ------- ------- -------")
;
; if hl7
I KMPDNMSP="H" D
.; file name
.S TEXT=" 8973.1 - "_$P($G(^DIC(8973.1,0)),U)
.; number of entries
.S TEXT=TEXT_$J(" ",35-$L(TEXT))_$J($FN($P($G(^KMPD(8973.1,0)),U,4),",",0),7)
.; oldest date
.S X=$$FMTE^XLFDT(+$O(^KMPD(8973.1,"B",0)),2)
.S X=$S(X=0:"---",1:X)
.S TEXT=TEXT_$J(" ",45-$L(TEXT))_X
.; current date
.S X=$$FMTE^XLFDT(+$O(^KMPD(8973.1,"B","A"),-1),2)
.S X=$S(X=0:"---",1:X)
.S TEXT=TEXT_$J(" ",55-$L(TEXT))_X
.S LN=LN+1
.D SET^VALM10(LN,TEXT)
;
; if timing data
I KMPDNMSP="T" D
.; file name
.S TEXT=" 8973.2 - "_$P($G(^DIC(8973.2,0)),U)
.; number of entries
.S TEXT=TEXT_$J(" ",35-$L(TEXT))_$J($FN($P($G(^KMPD(8973.2,0)),U,4),",",0),7)
.; oldest date
.S X=$$FMTE^XLFDT($P(+$O(^KMPD(8973.2,"C",0)),"."),2)
.S X=$S(X=0:"---",1:X)
.S TEXT=TEXT_$J(" ",45-$L(TEXT))_X
.; most recent date
.S X=$$FMTE^XLFDT($P(+$O(^KMPD(8973.2,"ASTDTTM","A"),-1),"."),2)
.S X=$S(X=0:"---",1:X)
.S TEXT=TEXT_$J(" ",55-$L(TEXT))_X
.S LN=LN+1
.D SET^VALM10(LN,TEXT)
;
Q
;
LEGEND ;-- display legend
;
S LN=LN+1
D SET^VALM10(LN,"")
S LN=LN+1
D SET^VALM10(LN,"")
I KMPDNMSP="H" D
.S LN=LN+1
.D SET^VALM10(LN," HL7 = Health Level Seven")
I KMPDNMSP="T" D
.S LN=LN+1
.D SET^VALM10(LN," TMG = Timing Data")
;
Q
;
OPT(KMPDOPT) ;-- option data
;-----------------------------------------------------------------------------
; KMPDOPT... Option name - free text
;-----------------------------------------------------------------------------
;
Q:$G(KMPDOPT)=""
;
N DIR,DOW,FREQ,KMPDX,KMPDX1,OPTEXT,STATUS,TEXT,X,Y
;
S STATUS=$$TSKSTAT^KMPDUTL1(KMPDOPT)
;
; option not in system
;Q:(+STATUS)=3
;
S OPTEXT=""
S:KMPDOPT="KMPD BACKGROUND DRIVER" OPTEXT="CM Tools Background Driver"
S:KMPDOPT="KMPR BACKGROUND DRIVER" OPTEXT="RUM Background Driver"
S:KMPDOPT="KMPS SAGG REPORT" OPTEXT="SAGG Master Background Task"
;
; if background option is missing
I (+STATUS)=3 D Q
.S LN=LN+1
.D SET^VALM10(LN," The "_OPTEXT_" option ["_KMPDOPT_" is missing!")
;
; background option is present
;
; if cm tools and not scheduled or no task id
I KMPDOPT="KMPD BACKGROUND DRIVER"&(+(STATUS)=3) D
.D SET^VALM10(LN," The "_OPTEXT_" ["_KMPDOPT_"] is not scheduled")
.S LN=LN+1
.D SET^VALM10(LN," to run!"),SET^VALM10(LN,"")
;
; if not scheduled or no task id
I KMPDOPT="KMPR BACKGROUND DRIVER"&(+(STATUS)=3) D
.D SET^VALM10(LN," The "_OPTEXT_" ["_KMPDOPT_"] is not scheduled")
.S LN=LN+1
.D SET^VALM10(LN," to run!"),SET^VALM10(LN,"")
;
; check status again in case it has been requeued
S STATUS=$$TSKSTAT^KMPDUTL1(KMPDOPT)
;
; not scheduled
I (+STATUS)=1 S LN=LN+1 D SET^VALM10(LN," The "_OPTEXT_" ["_KMPDOPT_"] is not scheduled") Q
;
S TEXT=" "_OPTEXT
S TEXT=TEXT_$$REPEAT^XLFSTR(".",31-$L(TEXT))
S TEXT=TEXT_" "_KMPDOPT
S LN=LN+1
D SET^VALM10(LN,TEXT)
S LN=LN+1
D SET^VALM10(LN," QUEUED TO RUN AT............ "_$P(STATUS,U,3))
S LN=LN+1
D SET^VALM10(LN," RESCHEDULING FREQUENCY...... "_$P(STATUS,U,5))
;
; check to see if SAGG is not running on the weekend (Fri-Sun)
S DOW=$P(STATUS,U,4),FREQ=$P(STATUS,U,6)
I KMPDOPT="KMPS SAGG REPORT" I (DOW<0)!((DOW>0)&(DOW<5))!(FREQ<0)!(FREQ'="28D") D
.S LN=LN+1
.D SET^VALM10(LN," ***It is STRONGLY recommended that this job be")
.S LN=LN+1
.D SET^VALM10(LN," rescheduled to run over the weekend every 28 days.***")
;
S LN=LN+1
D SET^VALM10(LN," TASK ID..................... "_$P(STATUS,U,7))
; user info.
S TEXT=" QUEUED BY................... "_$P(STATUS,U,8)
; user
S TEXT=TEXT_" ("_$S($P(STATUS,U,9)["NOT ACTIVE":"Not Active - ",1:"Active")_")"
S LN=LN+1
D SET^VALM10(LN,TEXT)
; if user is not active
I KMPDOPT="KMPS SAGG REPORT" I $P(STATUS,U,9)="NOT ACTIVE" D
.S LN=LN+1
.D SET^VALM10(LN," ***The user that originally queued this task is no ")
.S LN=LN+1
.D SET^VALM10(LN," longer active. Therefore the 'SAGG Master Background")
.S LN=LN+1
.D SET^VALM10(LN," Task' [KMPS SAGG REPORT] must be scheduled again by")
.S LN=LN=1
.D SET^VALM10(LN," an active user.***")
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HKMPDSSD 8146 printed Oct 16, 2024@17:41:32 Page 2
KMPDSSD ;OAK/RAK - CM Tools Status ;2/14/05 11:42
+1 ;;3.0;KMPD;;Jan 22, 2009;Build 42
+2 ;
FORMAT(KMPDLN) ;-format text for display
+1 ;-----------------------------------------------------------------------------
+2 ; KMPDLN.... return number of lines - called by reference
+3 ;-----------------------------------------------------------------------------
+4 ;
+5 if $GET(KMPDNMSP)=""
QUIT
+6 ;
+7 NEW LN,VERSION,X
SET LN=0
KILL TMP
+8 ;
+9 ; if no kmpdutl routine
+10 SET X="KMPDUTL"
XECUTE ^%ZOSF("TEST")
IF '$TEST
Begin DoDot:1
+11 SET LN=LN+1
+12 DO SET^VALM10(LN,"The CM Tools Package is not installed!")
End DoDot:1
QUIT
+13 ;
+14 ; version data
+15 SET VERSION=$$VERSION^KMPDUTL
+16 ;
+17 ; option data
+18 DO OPT("KMPD BACKGROUND DRIVER")
+19 ;
+20 ; bacground data
+21 DO BKGRND
+22 ;
+23 ; file data
+24 DO FILES
+25 ;
+26 ; routine version check
+27 DO ROUCHK^KMPDSSD1("D")
+28 ;
+29 ; node/cpu data
+30 DO CPU^KMPDSSD1
+31 ;
+32 ; mailgroup members
+33 DO MGRP^KMPDSSD1
+34 ;
+35 ; legend
+36 DO LEGEND
+37 ;
+38 SET KMPDLN=LN
+39 ;
+40 QUIT
+41 ;
BKGRND ; hl7 background info
+1 ;
+2 NEW DATA,DELTA,ENDT,I,STAT,STDT,Z
+3 ;
+4 DO PARAMS^KMPDUT("DATA")
if '$DATA(DATA)
QUIT
+5 SET DATA(3)=$GET(DATA(3))
SET DATA(4)=$GET(DATA(4))
+6 SET STDT=$PIECE(DATA(3),U,5)
SET ENDT=$PIECE(DATA(3),U,6)
SET DELTA=$PIECE(DATA(3),U,7)
+7 if $EXTRACT(DELTA)=" "
SET $EXTRACT(DELTA)="0"
+8 ; if hl7
+9 IF KMPDNMSP="H"
Begin DoDot:1
+10 SET LN=LN+1
+11 DO SET^VALM10(LN,"")
+12 SET LN=LN+1
+13 DO SET^VALM10(LN," Hl7 Dly Bckgrnd Last Start.. "_$$FMTE^XLFDT(STDT))
+14 SET LN=LN+1
+15 DO SET^VALM10(LN," HL7 Dly Bckgrnd Last Stop... "_$$FMTE^XLFDT(ENDT))
+16 SET LN=LN+1
+17 DO SET^VALM10(LN," HL7 Dly Bkgrnd Total Time... "_DELTA)
+18 SET STDT=$PIECE(DATA(3),U,8)
SET ENDT=$PIECE(DATA(3),U,9)
SET DELTA=$PIECE(DATA(3),U,10)
+19 if $EXTRACT(DELTA)=" "
SET $EXTRACT(DELTA)="0"
+20 SET LN=LN+1
+21 DO SET^VALM10(LN,"")
+22 SET LN=LN+1
+23 DO SET^VALM10(LN," HL7 Wkly Backgrnd Last Start "_$$FMTE^XLFDT(STDT))
+24 SET LN=LN+1
+25 DO SET^VALM10(LN," HL7 Wkly Bckgrnd Last Stop.. "_$$FMTE^XLFDT(ENDT))
+26 SET LN=LN+1
+27 DO SET^VALM10(LN," HL7 Wkly Bckgrnd Total Time. "_DELTA)
+28 SET LN=LN+1
+29 DO SET^VALM10(LN," HL7 Purge Data After........ "_$PIECE(DATA(3),U,11)_" weeks")
+30 DO TRANSTO^KMPDUTL7(1,3,.Z)
+31 IF '$DATA(Z)
SET LN=LN+1
DO SET^VALM10(LN," HL7 Transmit Data to........ <>")
+32 IF '$TEST
Begin DoDot:2
+33 SET I=$ORDER(Z(""))
IF I'=""
SET LN=LN+1
DO SET^VALM10(LN," HL7 Transmit Data to........ "_I)
+34 FOR
SET I=$ORDER(Z(I))
if I=""
QUIT
SET LN=LN+1
DO SET^VALM10(LN,$JUSTIFY(" ",32)_I)
End DoDot:2
+35 SET LN=LN+1
+36 DO SET^VALM10(LN,"")
End DoDot:1
+37 ;
+38 ; timing background info - if available
+39 IF KMPDNMSP="T"
Begin DoDot:1
+40 SET LN=LN+1
+41 DO SET^VALM10(LN,"")
+42 IF '$DATA(DATA(4))
SET LN=LN+1
DO SET^VALM10(LN," There is no Timing data to report")
QUIT
+43 SET STAT=$GET(^KMPTMP("KMPD-CPRS"))
+44 SET LN=LN+1
+45 DO SET^VALM10(LN," TMG Collection Status....... "_$SELECT(STAT:"Running",1:"STOPPED!"))
+46 SET STDT=$PIECE(DATA(4),U,5)
SET ENDT=$PIECE(DATA(4),U,6)
SET DELTA=$PIECE(DATA(4),U,7)
+47 if $EXTRACT(DELTA)=" "
SET $EXTRACT(DELTA)="0"
+48 SET LN=LN+1
+49 DO SET^VALM10(LN," TMG Dly Bckgrnd Last Start.. "_$$FMTE^XLFDT(STDT))
+50 SET LN=LN+1
+51 DO SET^VALM10(LN," TMG Dly Bckgrnd Last Stop... "_$$FMTE^XLFDT(ENDT))
+52 SET LN=LN+1
+53 DO SET^VALM10(LN," TMG Dly Bkgrnd Total Time... "_DELTA)
+54 SET STDT=$PIECE(DATA(4),U,8)
SET ENDT=$PIECE(DATA(4),U,9)
SET DELTA=$PIECE(DATA(4),U,10)
+55 if $EXTRACT(DELTA)=" "
SET $EXTRACT(DELTA)="0"
+56 SET LN=LN+1
+57 DO SET^VALM10(LN," TMG Purge Data After........ "_$PIECE(DATA(4),U,11)_" weeks")
+58 DO TRANSTO^KMPDUTL7(1,4,.Z)
+59 IF '$DATA(Z)
SET LN=LN+1
DO SET^VALM10(LN," TMG Transmit Data to........ <>")
+60 IF '$TEST
Begin DoDot:2
+61 SET I=$ORDER(Z(""))
IF I'=""
SET LN=LN+1
DO SET^VALM10(LN," TMG Transmit Data to........ "_I)
+62 FOR
SET I=$ORDER(Z(I))
if I=""
QUIT
SET LN=LN+1
DO SET^VALM10(LN,$JUSTIFY(" ",32)_I)
End DoDot:2
+63 SET LN=LN+1
+64 DO SET^VALM10(LN,"")
End DoDot:1
+65 ;
+66 QUIT
+67 ;
FILES ;-- file data
+1 ;
+2 NEW TEXT,X
+3 ;
+4 SET LN=LN+1
+5 DO SET^VALM10(LN,$JUSTIFY(" ",35)_" # of Oldest Recent")
+6 SET LN=LN+1
+7 DO SET^VALM10(LN," File"_$JUSTIFY(" ",28)_"Entries Date Date")
+8 SET LN=LN+1
+9 DO SET^VALM10(LN," ------------------------- ------- ------- -------")
+10 ;
+11 ; if hl7
+12 IF KMPDNMSP="H"
Begin DoDot:1
+13 ; file name
+14 SET TEXT=" 8973.1 - "_$PIECE($GET(^DIC(8973.1,0)),U)
+15 ; number of entries
+16 SET TEXT=TEXT_$JUSTIFY(" ",35-$LENGTH(TEXT))_$JUSTIFY($FNUMBER($PIECE($GET(^KMPD(8973.1,0)),U,4),",",0),7)
+17 ; oldest date
+18 SET X=$$FMTE^XLFDT(+$ORDER(^KMPD(8973.1,"B",0)),2)
+19 SET X=$SELECT(X=0:"---",1:X)
+20 SET TEXT=TEXT_$JUSTIFY(" ",45-$LENGTH(TEXT))_X
+21 ; current date
+22 SET X=$$FMTE^XLFDT(+$ORDER(^KMPD(8973.1,"B","A"),-1),2)
+23 SET X=$SELECT(X=0:"---",1:X)
+24 SET TEXT=TEXT_$JUSTIFY(" ",55-$LENGTH(TEXT))_X
+25 SET LN=LN+1
+26 DO SET^VALM10(LN,TEXT)
End DoDot:1
+27 ;
+28 ; if timing data
+29 IF KMPDNMSP="T"
Begin DoDot:1
+30 ; file name
+31 SET TEXT=" 8973.2 - "_$PIECE($GET(^DIC(8973.2,0)),U)
+32 ; number of entries
+33 SET TEXT=TEXT_$JUSTIFY(" ",35-$LENGTH(TEXT))_$JUSTIFY($FNUMBER($PIECE($GET(^KMPD(8973.2,0)),U,4),",",0),7)
+34 ; oldest date
+35 SET X=$$FMTE^XLFDT($PIECE(+$ORDER(^KMPD(8973.2,"C",0)),"."),2)
+36 SET X=$SELECT(X=0:"---",1:X)
+37 SET TEXT=TEXT_$JUSTIFY(" ",45-$LENGTH(TEXT))_X
+38 ; most recent date
+39 SET X=$$FMTE^XLFDT($PIECE(+$ORDER(^KMPD(8973.2,"ASTDTTM","A"),-1),"."),2)
+40 SET X=$SELECT(X=0:"---",1:X)
+41 SET TEXT=TEXT_$JUSTIFY(" ",55-$LENGTH(TEXT))_X
+42 SET LN=LN+1
+43 DO SET^VALM10(LN,TEXT)
End DoDot:1
+44 ;
+45 QUIT
+46 ;
LEGEND ;-- display legend
+1 ;
+2 SET LN=LN+1
+3 DO SET^VALM10(LN,"")
+4 SET LN=LN+1
+5 DO SET^VALM10(LN,"")
+6 IF KMPDNMSP="H"
Begin DoDot:1
+7 SET LN=LN+1
+8 DO SET^VALM10(LN," HL7 = Health Level Seven")
End DoDot:1
+9 IF KMPDNMSP="T"
Begin DoDot:1
+10 SET LN=LN+1
+11 DO SET^VALM10(LN," TMG = Timing Data")
End DoDot:1
+12 ;
+13 QUIT
+14 ;
OPT(KMPDOPT) ;-- option data
+1 ;-----------------------------------------------------------------------------
+2 ; KMPDOPT... Option name - free text
+3 ;-----------------------------------------------------------------------------
+4 ;
+5 if $GET(KMPDOPT)=""
QUIT
+6 ;
+7 NEW DIR,DOW,FREQ,KMPDX,KMPDX1,OPTEXT,STATUS,TEXT,X,Y
+8 ;
+9 SET STATUS=$$TSKSTAT^KMPDUTL1(KMPDOPT)
+10 ;
+11 ; option not in system
+12 ;Q:(+STATUS)=3
+13 ;
+14 SET OPTEXT=""
+15 if KMPDOPT="KMPD BACKGROUND DRIVER"
SET OPTEXT="CM Tools Background Driver"
+16 if KMPDOPT="KMPR BACKGROUND DRIVER"
SET OPTEXT="RUM Background Driver"
+17 if KMPDOPT="KMPS SAGG REPORT"
SET OPTEXT="SAGG Master Background Task"
+18 ;
+19 ; if background option is missing
+20 IF (+STATUS)=3
Begin DoDot:1
+21 SET LN=LN+1
+22 DO SET^VALM10(LN," The "_OPTEXT_" option ["_KMPDOPT_" is missing!")
End DoDot:1
QUIT
+23 ;
+24 ; background option is present
+25 ;
+26 ; if cm tools and not scheduled or no task id
+27 IF KMPDOPT="KMPD BACKGROUND DRIVER"&(+(STATUS)=3)
Begin DoDot:1
+28 DO SET^VALM10(LN," The "_OPTEXT_" ["_KMPDOPT_"] is not scheduled")
+29 SET LN=LN+1
+30 DO SET^VALM10(LN," to run!")
DO SET^VALM10(LN,"")
End DoDot:1
+31 ;
+32 ; if not scheduled or no task id
+33 IF KMPDOPT="KMPR BACKGROUND DRIVER"&(+(STATUS)=3)
Begin DoDot:1
+34 DO SET^VALM10(LN," The "_OPTEXT_" ["_KMPDOPT_"] is not scheduled")
+35 SET LN=LN+1
+36 DO SET^VALM10(LN," to run!")
DO SET^VALM10(LN,"")
End DoDot:1
+37 ;
+38 ; check status again in case it has been requeued
+39 SET STATUS=$$TSKSTAT^KMPDUTL1(KMPDOPT)
+40 ;
+41 ; not scheduled
+42 IF (+STATUS)=1
SET LN=LN+1
DO SET^VALM10(LN," The "_OPTEXT_" ["_KMPDOPT_"] is not scheduled")
QUIT
+43 ;
+44 SET TEXT=" "_OPTEXT
+45 SET TEXT=TEXT_$$REPEAT^XLFSTR(".",31-$LENGTH(TEXT))
+46 SET TEXT=TEXT_" "_KMPDOPT
+47 SET LN=LN+1
+48 DO SET^VALM10(LN,TEXT)
+49 SET LN=LN+1
+50 DO SET^VALM10(LN," QUEUED TO RUN AT............ "_$PIECE(STATUS,U,3))
+51 SET LN=LN+1
+52 DO SET^VALM10(LN," RESCHEDULING FREQUENCY...... "_$PIECE(STATUS,U,5))
+53 ;
+54 ; check to see if SAGG is not running on the weekend (Fri-Sun)
+55 SET DOW=$PIECE(STATUS,U,4)
SET FREQ=$PIECE(STATUS,U,6)
+56 IF KMPDOPT="KMPS SAGG REPORT"
IF (DOW<0)!((DOW>0)&(DOW<5))!(FREQ<0)!(FREQ'="28D")
Begin DoDot:1
+57 SET LN=LN+1
+58 DO SET^VALM10(LN," ***It is STRONGLY recommended that this job be")
+59 SET LN=LN+1
+60 DO SET^VALM10(LN," rescheduled to run over the weekend every 28 days.***")
End DoDot:1
+61 ;
+62 SET LN=LN+1
+63 DO SET^VALM10(LN," TASK ID..................... "_$PIECE(STATUS,U,7))
+64 ; user info.
+65 SET TEXT=" QUEUED BY................... "_$PIECE(STATUS,U,8)
+66 ; user
+67 SET TEXT=TEXT_" ("_$SELECT($PIECE(STATUS,U,9)["NOT ACTIVE":"Not Active - ",1:"Active")_")"
+68 SET LN=LN+1
+69 DO SET^VALM10(LN,TEXT)
+70 ; if user is not active
+71 IF KMPDOPT="KMPS SAGG REPORT"
IF $PIECE(STATUS,U,9)="NOT ACTIVE"
Begin DoDot:1
+72 SET LN=LN+1
+73 DO SET^VALM10(LN," ***The user that originally queued this task is no ")
+74 SET LN=LN+1
+75 DO SET^VALM10(LN," longer active. Therefore the 'SAGG Master Background")
+76 SET LN=LN+1
+77 DO SET^VALM10(LN," Task' [KMPS SAGG REPORT] must be scheduled again by")
+78 SET LN=LN=1
+79 DO SET^VALM10(LN," an active user.***")
End DoDot:1
+80 ;
+81 QUIT