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

BQIIPPOR.m

Go to the documentation of this file.
BQIIPPOR ;VNGT/HS/ALA-IPC Portal ; 22 Sep 2011  3:09 PM
 ;;2.3;ICARE MANAGEMENT SYSTEM;;Apr 18, 2012;Build 59
 ;
 ;
EN(DATA,FAKE) ;EP -- BQI GET IPC PORTAL
 NEW UID,II,HDR,PROD,CRIPC,CRN,IP,DOWN,UP
 S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
 S DATA=$NA(^TMP("BQIIPPOR",UID)) K @DATA
 ;
 S II=0
 NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIIPPOR D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
 ;
 S HDR="T00120PORTAL_IP_DOWNLOAD^T00120PORTAL_IP_UPLOAD"
 S @DATA@(II)=HDR_$C(30)
 ;
 S PROD=$$PROD^XUPROD()
 ; Get current IPC
 S CRIPC=$P($G(^BQI(90508,1,11)),U,1)
 S CRN=$O(^BQI(90508,1,22,"B",CRIPC,"")) I CRN="" Q
 I 'PROD S DOWN=$P($G(^BQI(90508,1,22,CRN,4)),U,1),UP=$P($G(^BQI(90508,1,22,CRN,4)),U,2)
 I PROD S DOWN=$P($G(^BQI(90508,1,22,CRN,5)),U,1),UP=$P($G(^BQI(90508,1,22,CRN,5)),U,2)
 S II=II+1,@DATA@(II)=DOWN_U_UP_$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