Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BQIVFTRE

BQIVFTRE.m

Go to the documentation of this file.
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