BQIMURUN ;VNGT/HS/ALA-Get MU run date/times ; 13 Apr 2011 1:47 PM
;;2.3;ICARE MANAGEMENT SYSTEM;**5**;Apr 18, 2012;Build 17
;
Q
;
EN(DATA,FAKE) ; EP - BQI GET LAST MU RUN
;
; Input
; FAKE - extra 'blank' parameter required by BMXNET async 'feature'
; Get the beginning and ending times of the GPRA run
NEW UID,II,BDT,EDT,X,DA,BUDT,BUEDT,HDR
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIMURUN",UID))
K @DATA
;
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIMURUN D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
S HDR="D00030RUN_START_DATETIME^D00030RUN_END_DATETIME"
S @DATA@(II)=HDR_$C(30)
;
S DA=$O(^BQI(90508,0)) I 'DA G DONE
;
S BDT=$$FMTE^BQIUL1($$GET1^DIQ(90508,DA_",",8.04,"I"))
S EDT=$$FMTE^BQIUL1($$GET1^DIQ(90508,DA_",",8.05,"I"))
S II=II+1,@DATA@(II)=BDT_"^"_EDT_$C(30)
;
DONE ;
S II=II+1,@DATA@(II)=$C(31)
Q
;
CQM(DATA,FAKE) ; EP - BQI GET LAST CQM RUN
;
; Input
; FAKE - extra 'blank' parameter required by BMXNET async 'feature'
; Get the beginning and ending times of the CQM run
NEW UID,II,BDT,EDT,X,DA,BUDT,BUEDT,HDR
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIMURUN",UID))
K @DATA
;
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIMURUN D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
S HDR="D00030RUN_START_DATETIME^D00030RUN_END_DATETIME"
S @DATA@(II)=HDR_$C(30)
;
S DA=$O(^BQI(90508,0)) I 'DA G DONE
;
S BDT=$$FMTE^BQIUL1($$GET1^DIQ(90508,DA_",",4.19,"I"))
S EDT=$$FMTE^BQIUL1($$GET1^DIQ(90508,DA_",",4.2,"I"))
S II=II+1,@DATA@(II)=BDT_"^"_EDT_$C(30)
;
XCQM ;
S II=II+1,@DATA@(II)=$C(31)
Q
;
ERR ;
D ^%ZTER
NEW Y,ERRDTM
S Y=$$NOW^XLFDT() X ^DD("DD") S ERRDTM=Y
S BMXSEC="Recording that an error occurred at "_ERRDTM
I $D(II),$D(DATA) S II=II+1,@DATA@(II)=$C(31)
Q
BQIMURUN ;VNGT/HS/ALA-Get MU run date/times ; 13 Apr 2011 1:47 PM
+1 ;;2.3;ICARE MANAGEMENT SYSTEM;**5**;Apr 18, 2012;Build 17
+2 ;
+3 QUIT
+4 ;
EN(DATA,FAKE) ; EP - BQI GET LAST MU RUN
+1 ;
+2 ; Input
+3 ; FAKE - extra 'blank' parameter required by BMXNET async 'feature'
+4 ; Get the beginning and ending times of the GPRA run
+5 NEW UID,II,BDT,EDT,X,DA,BUDT,BUEDT,HDR
+6 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+7 SET DATA=$NAME(^TMP("BQIMURUN",UID))
+8 KILL @DATA
+9 ;
+10 SET II=0
+11 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIMURUN D UNWIND^%ZTER"
+12 ;
+13 SET HDR="D00030RUN_START_DATETIME^D00030RUN_END_DATETIME"
+14 SET @DATA@(II)=HDR_$CHAR(30)
+15 ;
+16 SET DA=$ORDER(^BQI(90508,0))
IF 'DA
GOTO DONE
+17 ;
+18 SET BDT=$$FMTE^BQIUL1($$GET1^DIQ(90508,DA_",",8.04,"I"))
+19 SET EDT=$$FMTE^BQIUL1($$GET1^DIQ(90508,DA_",",8.05,"I"))
+20 SET II=II+1
SET @DATA@(II)=BDT_"^"_EDT_$CHAR(30)
+21 ;
DONE ;
+1 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+2 QUIT
+3 ;
CQM(DATA,FAKE) ; EP - BQI GET LAST CQM RUN
+1 ;
+2 ; Input
+3 ; FAKE - extra 'blank' parameter required by BMXNET async 'feature'
+4 ; Get the beginning and ending times of the CQM run
+5 NEW UID,II,BDT,EDT,X,DA,BUDT,BUEDT,HDR
+6 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+7 SET DATA=$NAME(^TMP("BQIMURUN",UID))
+8 KILL @DATA
+9 ;
+10 SET II=0
+11 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIMURUN D UNWIND^%ZTER"
+12 ;
+13 SET HDR="D00030RUN_START_DATETIME^D00030RUN_END_DATETIME"
+14 SET @DATA@(II)=HDR_$CHAR(30)
+15 ;
+16 SET DA=$ORDER(^BQI(90508,0))
IF 'DA
GOTO DONE
+17 ;
+18 SET BDT=$$FMTE^BQIUL1($$GET1^DIQ(90508,DA_",",4.19,"I"))
+19 SET EDT=$$FMTE^BQIUL1($$GET1^DIQ(90508,DA_",",4.2,"I"))
+20 SET II=II+1
SET @DATA@(II)=BDT_"^"_EDT_$CHAR(30)
+21 ;
XCQM ;
+1 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+2 QUIT
+3 ;
ERR ;
+1 DO ^%ZTER
+2 NEW Y,ERRDTM
+3 SET Y=$$NOW^XLFDT()
XECUTE ^DD("DD")
SET ERRDTM=Y
+4 SET BMXSEC="Recording that an error occurred at "_ERRDTM
+5 IF $DATA(II)
IF $DATA(DATA)
SET II=II+1
SET @DATA@(II)=$CHAR(31)
+6 QUIT