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

BQIVFTRP.m

Go to the documentation of this file.
BQIVFTRP ;PRXM/HC/ALA-Trigger Procedure Information ; 30 Aug 2007  1:55 PM
 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
 Q
 ;
EN(DATA,TEXT) ;EP - BQI VFILE TRIGGER PRC
 ;
 ; Input
 ;   TEXT  - Narrative Text
 ;
 NEW UID,II,VALUE,NARR,SOURCE
 S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
 S DATA=$NA(^TMP("BQIVFTRP",UID))
 K @DATA
 S II=0
 NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIVFTRP D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
 S SOURCE="APCDTNQ",VALUE=""
 S DIC(0)="LX",DIC="^AUTNPOV(",DLAYGO=9999999.27,X=TEXT
 D ^DIC
 S IEN=+Y
 I IEN=-1 K DO,DD D FILE^DICN S IEN=+Y
 S VALUE=IEN_$C(29)_TEXT
 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