BQITMPLL ;GDIT/HS/ALA-Get list of templates ; 18 Jul 2013 2:32 PM
;;2.3;ICARE MANAGEMENT SYSTEM;**3,4**;Apr 18, 2012;Build 66
;
EN(DATA,FAKE) ;EP -- BQI TEMPLATE LIST
NEW UID,II,TYP,VSIEN,TMTYP,COLM,SYSD
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQITMPLL",UID))
K @DATA
;
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQITMPLL D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
S @DATA@(II)="T00050LAYOUT_TYPE^T00245COLUMN_RPC^T00245SYSTEM_DEF_RPC"_$C(30)
;
S TYP=""
F S TYP=$O(^BQI(90506.5,"C",TYP)) Q:TYP="" D
. S VSIEN=$O(^BQI(90506.5,"C",TYP,""))
. I $P(^BQI(90506.5,VSIEN,0),U,10)=1 Q
. S TMTYP=$P($G(^BQI(90506.5,VSIEN,2)),U,2) I TMTYP="" Q
. I $P($G(^BQI(90506.5,VSIEN,2)),U,3)=1 Q
. S COLM=$G(^BQI(90506.5,VSIEN,3))
. S SYSD=$G(^BQI(90506.5,VSIEN,4))
. S II=II+1,@DATA@(II)=TMTYP_U_COLM_U_SYSD_$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
BQITMPLL ;GDIT/HS/ALA-Get list of templates ; 18 Jul 2013 2:32 PM
+1 ;;2.3;ICARE MANAGEMENT SYSTEM;**3,4**;Apr 18, 2012;Build 66
+2 ;
EN(DATA,FAKE) ;EP -- BQI TEMPLATE LIST
+1 NEW UID,II,TYP,VSIEN,TMTYP,COLM,SYSD
+2 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+3 SET DATA=$NAME(^TMP("BQITMPLL",UID))
+4 KILL @DATA
+5 ;
+6 SET II=0
+7 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQITMPLL D UNWIND^%ZTER"
+8 ;
+9 SET @DATA@(II)="T00050LAYOUT_TYPE^T00245COLUMN_RPC^T00245SYSTEM_DEF_RPC"_$CHAR(30)
+10 ;
+11 SET TYP=""
+12 FOR
SET TYP=$ORDER(^BQI(90506.5,"C",TYP))
IF TYP=""
QUIT
Begin DoDot:1
+13 SET VSIEN=$ORDER(^BQI(90506.5,"C",TYP,""))
+14 IF $PIECE(^BQI(90506.5,VSIEN,0),U,10)=1
QUIT
+15 SET TMTYP=$PIECE($GET(^BQI(90506.5,VSIEN,2)),U,2)
IF TMTYP=""
QUIT
+16 IF $PIECE($GET(^BQI(90506.5,VSIEN,2)),U,3)=1
QUIT
+17 SET COLM=$GET(^BQI(90506.5,VSIEN,3))
+18 SET SYSD=$GET(^BQI(90506.5,VSIEN,4))
+19 SET II=II+1
SET @DATA@(II)=TMTYP_U_COLM_U_SYSD_$CHAR(30)
End DoDot:1
+20 ;
+21 ;
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