BQIPLSTA ;PRXM/HC/ALA-Set panel status ; 12 Dec 2006 1:56 PM
;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
;
Q
;
EN(DATA,OWNR,PLIEN,STATUS) ; EP -- BQI SET PANEL STATUS
;
;Description
; Set the panel's autopopulation status
;Input
; OWNR - owner of the panel
; PLIEN - panel internal entry number
; STATUS - Status to be set
;Output
; DATA - name of global (passed by reference) in which the data
; is stored
;
NEW UID,II,ERROR
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIPLSTA",UID))
K @DATA
;
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIPLSTA D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
S @DATA@(II)="I00010RESULT"_$C(30)
S STATUS=$G(STATUS,""),OWNR=$G(OWNR,""),PLIEN=$G(PLIEN,"")
I OWNR="" S OWNR=DUZ
D STA^BQIPLRF(OWNR,PLIEN,STATUS)
I $D(ERROR) S II=II+1,@DATA@(II)="-1"_$C(30)
I '$D(ERROR) S II=II+1,@DATA@(II)="1"_$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
BQIPLSTA ;PRXM/HC/ALA-Set panel status ; 12 Dec 2006 1:56 PM
+1 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
+2 ;
+3 QUIT
+4 ;
EN(DATA,OWNR,PLIEN,STATUS) ; EP -- BQI SET PANEL STATUS
+1 ;
+2 ;Description
+3 ; Set the panel's autopopulation status
+4 ;Input
+5 ; OWNR - owner of the panel
+6 ; PLIEN - panel internal entry number
+7 ; STATUS - Status to be set
+8 ;Output
+9 ; DATA - name of global (passed by reference) in which the data
+10 ; is stored
+11 ;
+12 NEW UID,II,ERROR
+13 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+14 SET DATA=$NAME(^TMP("BQIPLSTA",UID))
+15 KILL @DATA
+16 ;
+17 SET II=0
+18 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIPLSTA D UNWIND^%ZTER"
+19 ;
+20 SET @DATA@(II)="I00010RESULT"_$CHAR(30)
+21 SET STATUS=$GET(STATUS,"")
SET OWNR=$GET(OWNR,"")
SET PLIEN=$GET(PLIEN,"")
+22 IF OWNR=""
SET OWNR=DUZ
+23 DO STA^BQIPLRF(OWNR,PLIEN,STATUS)
+24 IF $DATA(ERROR)
SET II=II+1
SET @DATA@(II)="-1"_$CHAR(30)
+25 IF '$DATA(ERROR)
SET II=II+1
SET @DATA@(II)="1"_$CHAR(30)
+26 ;
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