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

BQIVFTRI.m

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