BQIVFTRI ;PRXM/HC/ALA-V File Trigger RPC for Immunizations fields ; 19 Jun 2007 1:16 PM
;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
Q
;
EN(DATA,IMM) ;EP - BQI VFILE TRIGGER IMM
;
; Input
; IMM - Immunization IEN
;
NEW UID,II,PARMS,DA,IENS,NM,VALUE
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIVFTRI",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIVFTRI D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
S SOURCE="APCDTLOT"
S @DATA@(II)="T00008SOURCE^T00001CODE_TYPE^T01024PARMS"_$C(30)
S IEN="",NAME="IEN=",VALUE=""
F S IEN=$O(^AUTTIML("C",IMM,IEN)) Q:IEN="" D
. I $$GET1^DIQ(9999999.41,IEN,.03,"I")=1 Q
. ;S VALUE=VALUE_$$GET1^DIQ(9999999.41,IEN,.01,"E")_$C(29)
. S VALUE=VALUE_IEN_$C(29)_$$GET1^DIQ(9999999.41,IEN,.01,"E")_$C(28)
S VALUE=$$TKO^BQIUL1(VALUE,$C(28))
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
BQIVFTRI ;PRXM/HC/ALA-V File Trigger RPC for Immunizations fields ; 19 Jun 2007 1:16 PM
+1 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
+2 QUIT
+3 ;
EN(DATA,IMM) ;EP - BQI VFILE TRIGGER IMM
+1 ;
+2 ; Input
+3 ; IMM - Immunization IEN
+4 ;
+5 NEW UID,II,PARMS,DA,IENS,NM,VALUE
+6 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+7 SET DATA=$NAME(^TMP("BQIVFTRI",UID))
+8 KILL @DATA
+9 SET II=0
+10 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIVFTRI D UNWIND^%ZTER"
+11 SET SOURCE="APCDTLOT"
+12 SET @DATA@(II)="T00008SOURCE^T00001CODE_TYPE^T01024PARMS"_$CHAR(30)
+13 SET IEN=""
SET NAME="IEN="
SET VALUE=""
+14 FOR
SET IEN=$ORDER(^AUTTIML("C",IMM,IEN))
IF IEN=""
QUIT
Begin DoDot:1
+15 IF $$GET1^DIQ(9999999.41,IEN,.03,"I")=1
QUIT
+16 ;S VALUE=VALUE_$$GET1^DIQ(9999999.41,IEN,.01,"E")_$C(29)
+17 SET VALUE=VALUE_IEN_$CHAR(29)_$$GET1^DIQ(9999999.41,IEN,.01,"E")_$CHAR(28)
End DoDot:1
+18 SET VALUE=$$TKO^BQIUL1(VALUE,$CHAR(28))
+19 SET II=II+1
SET @DATA@(II)=SOURCE_U_"C"_U_VALUE_$CHAR(30)
+20 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+21 QUIT
+22 ;
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