BQIULDT ;PRXM/HC/ALA-Return FileMan Date ; 12 Apr 2007 5:17 PM
;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
;
Q
;
EN(DATA,DATE) ; EP -- BQI GET FILEMAN DATE
;
; Input
; DATE - Date in a standard, non-FileMan format
NEW UID,II,FDATE
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIULDT",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIULDT D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
S @DATA@(II)="T00025FILEMAN_DATE"_$C(30)
S FDATE=$$DATE^BQIUL1(DATE)
S II=II+1,@DATA@(II)=FDATE_$C(30)
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
;
DTM(DATA,FAKE) ;EP - BQI GET SYSTEM DATETIME
;
NEW UID,II
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIULDTM",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIULDT D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
S @DATA@(II)="D00030SYSTEM_DATETIME"_$C(30)
S II=II+1,@DATA@(II)=$$FMTE^BQIUL1($$NOW^XLFDT())_$C(30)
S II=II+1,@DATA@(II)=$C(31)
Q
BQIULDT ;PRXM/HC/ALA-Return FileMan Date ; 12 Apr 2007 5:17 PM
+1 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
+2 ;
+3 QUIT
+4 ;
EN(DATA,DATE) ; EP -- BQI GET FILEMAN DATE
+1 ;
+2 ; Input
+3 ; DATE - Date in a standard, non-FileMan format
+4 NEW UID,II,FDATE
+5 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+6 SET DATA=$NAME(^TMP("BQIULDT",UID))
+7 KILL @DATA
+8 SET II=0
+9 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIULDT D UNWIND^%ZTER"
+10 SET @DATA@(II)="T00025FILEMAN_DATE"_$CHAR(30)
+11 SET FDATE=$$DATE^BQIUL1(DATE)
+12 SET II=II+1
SET @DATA@(II)=FDATE_$CHAR(30)
+13 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+14 QUIT
+15 ;
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
+7 ;
DTM(DATA,FAKE) ;EP - BQI GET SYSTEM DATETIME
+1 ;
+2 NEW UID,II
+3 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+4 SET DATA=$NAME(^TMP("BQIULDTM",UID))
+5 KILL @DATA
+6 SET II=0
+7 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIULDT D UNWIND^%ZTER"
+8 SET @DATA@(II)="D00030SYSTEM_DATETIME"_$CHAR(30)
+9 SET II=II+1
SET @DATA@(II)=$$FMTE^BQIUL1($$NOW^XLFDT())_$CHAR(30)
+10 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+11 QUIT