LRJSML5 ;ALB/GTS - Lab Vista Hospital Location Pre-Patch Utilities;02/22/2010 14:51:41
;;5.2;LAB SERVICE;**425**;Sep 27, 1994;Build 30
;
;
INIT ;* init variables and list array
;Called from Protocol: LRJ SYS MAP HL SCHED AUDIT RPT DISP
;
; This API will show the HLCMS Audit Rpt Task schedule
;
NEW LRFROM,LRTO
SET (LRFROM,LRTO)=""
DO GETDATE^LRJSML8(.LRFROM,.LRTO)
D KILL
IF (+LRFROM=0)!(+LRTO=0) DO
.SET LRFROM=$P($G(^TMP("LRJ SYS USER MANAGER - DATES",$JOB)),"^")
.SET LRTO=$P($G(^TMP("LRJ SYS USER MANAGER - DATES",$JOB)),"^",2)
SET ^TMP("LRJ SYS USER MANAGER - DATES",$JOB)=LRFROM_"^"_LRTO
D CREATRPT
D HDR
D REFRESH
QUIT
;
REFRESH ;* refresh display
D MSG^LRJSML
SET VALMBCK="R"
SET VALMBG=1
QUIT
;
CREATRPT ;Create array of Hospital Location changes between selected dates
N LRSCHED
D OPTSTAT^XUTMOPT("LRJ SYS MAP HL TASKMAN RPT",.LRSCHED)
D BLDREC(.LRSCHED) ;Create outarray
Q
;
BLDREC(LRSCHED) ;Build Listman Output for background task
; INPUT:
; LRSCHED : Schedule information about option
; format -
; task number^scheduled time^reschedule freq^special queuing flag
;
NEW X,PCE,LROPTDAT
DO KILL^VALM10()
SET VALMCNT=0
SET X=" Hospital Location Audit task schedule"
DO ADD^LRJSMLU(.VALMCNT,X)
DO CNTRL^VALM10(VALMCNT,2,$LENGTH(X)-1,IOUON,IOUOFF_IOINORM)
D ADD^LRJSMLU(.VALMCNT," ")
SET X=" OPTION: LRJ SYS MAP HL TASKMAN RPT"
D ADD^LRJSMLU(.VALMCNT,X)
IF +$G(LRSCHED(1))=0 DO
.SET X=" TASK ID: Not Scheduled"
.DO ADD^LRJSMLU(.VALMCNT,X)
.SET X="QUEUED TO RUN AT WHAT TIME: Not Scheduled"
.DO ADD^LRJSMLU(.VALMCNT,X)
.SET X=" RESCHEDULING FREQUENCY: Not Scheduled"
.DO ADD^LRJSMLU(.VALMCNT,X)
;
IF +$G(LRSCHED(1))'=0 DO
.SET PCE=0
.FOR PCE=1:1:3 SET LROPTDAT=$P(LRSCHED(1),"^",PCE) DO
..SET:PCE=1 X=" TASK ID: "_$S(LROPTDAT'="":LROPTDAT,1:"Not Scheduled")
..IF PCE=2 DO
...NEW LROUTDT,Y
...SET Y=LROPTDAT
...DO DD^%DT
...SET LROUTDT=Y
...SET X="QUEUED TO RUN AT WHAT TIME: "_$S(LROUTDT'="":LROUTDT,1:"Not Scheduled")
..SET:PCE=3 X=" RESCHEDULING FREQUENCY: "_$S(LROPTDAT'="":LROPTDAT,1:"Not Scheduled")
..DO ADD^LRJSMLU(.VALMCNT,X)
D ADD^LRJSMLU(.VALMCNT," ")
D ADD^LRJSMLU(.VALMCNT," ")
D ADD^LRJSMLU(.VALMCNT," ")
D ADD^LRJSMLU(.VALMCNT," ")
SET LROPTDAT=""
SET LROPTDAT=$$GET^XPAR("SYS","LRJ HL LAST END DATE",1,"Q")
SET X="Hospital Location Audit Automated Reporting begin Date: "_$S(LROPTDAT'="":$$FMTE^XLFDT(LROPTDAT),1:"Not indicated")
DO ADD^LRJSMLU(.VALMCNT,X)
QUIT
KILL ; -- kill off display data array
KILL ^TMP("LRJ SYS MAP HL INIT MGR",$JOB)
QUIT
;
HDR ; -- header code
SET VALMHDR(1)=" LAB Hospital Location Change Audit Task Option Schedule"
SET VALMHDR(2)=" Version: "_$$VERNUM^LRJSMLU()_" Build: "_$$BLDNUM^LRJSMLU()
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRJSML5 2939 printed Dec 13, 2024@02:15:43 Page 2
LRJSML5 ;ALB/GTS - Lab Vista Hospital Location Pre-Patch Utilities;02/22/2010 14:51:41
+1 ;;5.2;LAB SERVICE;**425**;Sep 27, 1994;Build 30
+2 ;
+3 ;
INIT ;* init variables and list array
+1 ;Called from Protocol: LRJ SYS MAP HL SCHED AUDIT RPT DISP
+2 ;
+3 ; This API will show the HLCMS Audit Rpt Task schedule
+4 ;
+5 NEW LRFROM,LRTO
+6 SET (LRFROM,LRTO)=""
+7 DO GETDATE^LRJSML8(.LRFROM,.LRTO)
+8 DO KILL
+9 IF (+LRFROM=0)!(+LRTO=0)
Begin DoDot:1
+10 SET LRFROM=$PIECE($GET(^TMP("LRJ SYS USER MANAGER - DATES",$JOB)),"^")
+11 SET LRTO=$PIECE($GET(^TMP("LRJ SYS USER MANAGER - DATES",$JOB)),"^",2)
End DoDot:1
+12 SET ^TMP("LRJ SYS USER MANAGER - DATES",$JOB)=LRFROM_"^"_LRTO
+13 DO CREATRPT
+14 DO HDR
+15 DO REFRESH
+16 QUIT
+17 ;
REFRESH ;* refresh display
+1 DO MSG^LRJSML
+2 SET VALMBCK="R"
+3 SET VALMBG=1
+4 QUIT
+5 ;
CREATRPT ;Create array of Hospital Location changes between selected dates
+1 NEW LRSCHED
+2 DO OPTSTAT^XUTMOPT("LRJ SYS MAP HL TASKMAN RPT",.LRSCHED)
+3 ;Create outarray
DO BLDREC(.LRSCHED)
+4 QUIT
+5 ;
BLDREC(LRSCHED) ;Build Listman Output for background task
+1 ; INPUT:
+2 ; LRSCHED : Schedule information about option
+3 ; format -
+4 ; task number^scheduled time^reschedule freq^special queuing flag
+5 ;
+6 NEW X,PCE,LROPTDAT
+7 DO KILL^VALM10()
+8 SET VALMCNT=0
+9 SET X=" Hospital Location Audit task schedule"
+10 DO ADD^LRJSMLU(.VALMCNT,X)
+11 DO CNTRL^VALM10(VALMCNT,2,$LENGTH(X)-1,IOUON,IOUOFF_IOINORM)
+12 DO ADD^LRJSMLU(.VALMCNT," ")
+13 SET X=" OPTION: LRJ SYS MAP HL TASKMAN RPT"
+14 DO ADD^LRJSMLU(.VALMCNT,X)
+15 IF +$GET(LRSCHED(1))=0
Begin DoDot:1
+16 SET X=" TASK ID: Not Scheduled"
+17 DO ADD^LRJSMLU(.VALMCNT,X)
+18 SET X="QUEUED TO RUN AT WHAT TIME: Not Scheduled"
+19 DO ADD^LRJSMLU(.VALMCNT,X)
+20 SET X=" RESCHEDULING FREQUENCY: Not Scheduled"
+21 DO ADD^LRJSMLU(.VALMCNT,X)
End DoDot:1
+22 ;
+23 IF +$GET(LRSCHED(1))'=0
Begin DoDot:1
+24 SET PCE=0
+25 FOR PCE=1:1:3
SET LROPTDAT=$PIECE(LRSCHED(1),"^",PCE)
Begin DoDot:2
+26 if PCE=1
SET X=" TASK ID: "_$SELECT(LROPTDAT'="":LROPTDAT,1:"Not Scheduled")
+27 IF PCE=2
Begin DoDot:3
+28 NEW LROUTDT,Y
+29 SET Y=LROPTDAT
+30 DO DD^%DT
+31 SET LROUTDT=Y
+32 SET X="QUEUED TO RUN AT WHAT TIME: "_$SELECT(LROUTDT'="":LROUTDT,1:"Not Scheduled")
End DoDot:3
+33 if PCE=3
SET X=" RESCHEDULING FREQUENCY: "_$SELECT(LROPTDAT'="":LROPTDAT,1:"Not Scheduled")
+34 DO ADD^LRJSMLU(.VALMCNT,X)
End DoDot:2
End DoDot:1
+35 DO ADD^LRJSMLU(.VALMCNT," ")
+36 DO ADD^LRJSMLU(.VALMCNT," ")
+37 DO ADD^LRJSMLU(.VALMCNT," ")
+38 DO ADD^LRJSMLU(.VALMCNT," ")
+39 SET LROPTDAT=""
+40 SET LROPTDAT=$$GET^XPAR("SYS","LRJ HL LAST END DATE",1,"Q")
+41 SET X="Hospital Location Audit Automated Reporting begin Date: "_$SELECT(LROPTDAT'="":$$FMTE^XLFDT(LROPTDAT),1:"Not indicated")
+42 DO ADD^LRJSMLU(.VALMCNT,X)
+43 QUIT
KILL ; -- kill off display data array
+1 KILL ^TMP("LRJ SYS MAP HL INIT MGR",$JOB)
+2 QUIT
+3 ;
HDR ; -- header code
+1 SET VALMHDR(1)=" LAB Hospital Location Change Audit Task Option Schedule"
+2 SET VALMHDR(2)=" Version: "_$$VERNUM^LRJSMLU()_" Build: "_$$BLDNUM^LRJSMLU()
+3 QUIT