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
BQIVFTRO ;VNGT/HS/ALA-V File Trigger for PCC Visit ; 17 Oct 2008 2:30 PM
+1 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
+2 ;
EN(DATA,FAKE) ; EP -- BQI VFILE TRIGGER PCC
+1 ;
+2 NEW UID,II
+3 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+4 SET DATA=$NAME(^TMP("BQIVFTRO",UID))
+5 KILL @DATA
+6 SET II=0
+7 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIVFTRO D UNWIND^%ZTER"
+8 ;
+9 SET @DATA@(II)="T00008SOURCE^T00001ABLE_FLAG^T01024CLEAR_FIELDS"_$CHAR(30)
+10 ;
+11 IF $PIECE($GET(^APCDSITE(DUZ(2),0)),U,16)'="Y"
Begin DoDot:1
+12 SET II=II+1
SET @DATA@(II)="APCDOLOC^N^"_$CHAR(30)
+13 SET II=II+1
SET @DATA@(II)="APCDTOPR^N^"_$CHAR(30)
End DoDot:1
+14 ;
+15 IF $PIECE($GET(^APCDSITE(DUZ(2),0)),U,16)="Y"
Begin DoDot:1
+16 SET II=II+1
SET @DATA@(II)="APCDOLOC^Y^"_$CHAR(30)
+17 SET II=II+1
SET @DATA@(II)="APCDTOPR^Y^"_$CHAR(30)
End DoDot:1
+18 ;
DONE ;
+1 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+2 QUIT
+3 ;
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