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

BQIVFTRO.m

Go to the documentation of this file.
BQIVFTRO ;VNGT/HS/ALA-V File Trigger for PCC Visit ; 17 Oct 2008  2:30 PM
 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
 ;
EN(DATA,FAKE) ; EP -- BQI VFILE TRIGGER PCC
 ;
 NEW UID,II
 S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
 S DATA=$NA(^TMP("BQIVFTRO",UID))
 K @DATA
 S II=0
 NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIVFTRO D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
 ;
 S @DATA@(II)="T00008SOURCE^T00001ABLE_FLAG^T01024CLEAR_FIELDS"_$C(30)
 ;
 I $P($G(^APCDSITE(DUZ(2),0)),U,16)'="Y" D
 . S II=II+1,@DATA@(II)="APCDOLOC^N^"_$C(30)
 . S II=II+1,@DATA@(II)="APCDTOPR^N^"_$C(30)
 ;
 I $P($G(^APCDSITE(DUZ(2),0)),U,16)="Y" D
 . S II=II+1,@DATA@(II)="APCDOLOC^Y^"_$C(30)
 . S II=II+1,@DATA@(II)="APCDTOPR^Y^"_$C(30)
 ;
DONE ;
 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