BQIVFTRE ;PRXM/HC/ALA-Trigger Exam Information ; 09 Aug 2007 12:19 PM
;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
Q
;
EN(DATA,EXM) ;EP - BQI VFILE TRIGGER EXM
;
; Input
; EXM - Exam IEN
;
NEW UID,II,PARMS,DA,IENS,NM,VALUE,C
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIVFTRE",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIVFTRE D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
S SOURCE="APCDTRES",VALUE="N"_$C(29)_"NORMAL/NEGATIVE"
S C=$P(^AUTTEXAM(EXM,0),U,2)
I C=34 S VALUE=VALUE_$C(28)_"PA"_$C(29)_"PAST"_$C(28)_"PR"_$C(29)_"PRESENT"
I C=35!(C=36) S VALUE=VALUE_$C(28)_"PO"_$C(29)_"POSITIVE"
I C'=34,C'=35,C'=36 S VALUE=VALUE_$C(28)_"A"_$C(29)_"ABNORMAL"
S @DATA@(II)="T00008SOURCE^T00001CODE_TYPE^T01024PARMS"_$C(30)
S II=II+1,@DATA@(II)=SOURCE_U_"C"_U_VALUE_$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
BQIVFTRE ;PRXM/HC/ALA-Trigger Exam Information ; 09 Aug 2007 12:19 PM
+1 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
+2 QUIT
+3 ;
EN(DATA,EXM) ;EP - BQI VFILE TRIGGER EXM
+1 ;
+2 ; Input
+3 ; EXM - Exam IEN
+4 ;
+5 NEW UID,II,PARMS,DA,IENS,NM,VALUE,C
+6 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+7 SET DATA=$NAME(^TMP("BQIVFTRE",UID))
+8 KILL @DATA
+9 SET II=0
+10 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIVFTRE D UNWIND^%ZTER"
+11 SET SOURCE="APCDTRES"
SET VALUE="N"_$CHAR(29)_"NORMAL/NEGATIVE"
+12 SET C=$PIECE(^AUTTEXAM(EXM,0),U,2)
+13 IF C=34
SET VALUE=VALUE_$CHAR(28)_"PA"_$CHAR(29)_"PAST"_$CHAR(28)_"PR"_$CHAR(29)_"PRESENT"
+14 IF C=35!(C=36)
SET VALUE=VALUE_$CHAR(28)_"PO"_$CHAR(29)_"POSITIVE"
+15 IF C'=34
IF C'=35
IF C'=36
SET VALUE=VALUE_$CHAR(28)_"A"_$CHAR(29)_"ABNORMAL"
+16 SET @DATA@(II)="T00008SOURCE^T00001CODE_TYPE^T01024PARMS"_$CHAR(30)
+17 SET II=II+1
SET @DATA@(II)=SOURCE_U_"C"_U_VALUE_$CHAR(30)
+18 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+19 QUIT
+20 ;
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