BQIPLRF ;PRXM/HC/ALA-Panel Refresh ; 11 Jul 2006 10:05 AM
;;2.3;ICARE MANAGEMENT SYSTEM;**1**;Apr 18, 2012;Build 43
;
Q
;
ALOG(DATA,FAKE) ;EP -- BQI AUTOPOP LOGIN
NEW UID,II,USR,PNL,LGLOB,LOCK,X,CSTA,PLIDEN,LFLG
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J),II=0
S DATA=$NA(^TMP("BQIPLRF",UID))
K @DATA
;
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIPLRF D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
S @DATA@(II)="I00010RESULT"_$C(30)
;
S USR=DUZ,PNL=""
;
I $O(^BQICARE(USR,1,"AC","A",PNL))="" G DLOG
;
F S PNL=$O(^BQICARE(USR,1,"AC","A",PNL)) Q:'PNL D
. ; Lock panel to be repopulated
. S LOCK=$$LCK(USR,PNL)
. ; If not able to lock panel, clear status, send notification and go to next one
. I 'LOCK D Q
.. D STA(USR,PNL)
.. D NNOTF(USR,PNL)
. ;
. ; Check if locked panel has panel filters
. NEW PLSUCC,SUBJECT,LOCK,POWNR,PPLIEN
. S PLSUCC=$$CPFL^BQIPLUTL(USR,PNL)
. ; If panel contains panel filters and were not successful in being locked,
. ; clear status, send notification and go to next panel in list
. I 'PLSUCC D Q
.. D STA(USR,PNL)
.. D ULK(USR,PNL)
.. S SUBJECT="Unable to lock panel(s) that are filters for panel: "_$P(^BQICARE(USR,1,PNL,0),U,1)
.. S LOCK="0^"_$P(PLSUCC,U,2),POWNR=$P(PLSUCC,U,4),PPLIEN=$P(PLSUCC,U,5)
.. I $P(PLSUCC,U,3)'="" S BMXSEC=$P(PLSUCC,U,3),SUBJECT=""
.. D NNOTF(USR,PNL,SUBJECT)
. ;
. ; Check if panel is a panel filter
. S PLIDEN=USR_$C(26)_$P(^BQICARE(USR,1,PNL,0),"^",1)
. I $D(^BQICARE("AD",PLIDEN)) D Q:LFLG
.. S LFLG=0 D PFILL^BQIPLUTL(USR,PNL,PLIDEN)
.. ; If not able to lock any of the owning panels, unlock owning panel, clear status, unlock panel and quit
.. I LFLG D PFILU^BQIPLUTL(USR,PNL,PLIDEN),STA(USR,PNL),ULK(USR,PNL)
. ; Set status to currently running
. D STA(USR,PNL,1)
;
; Refresh panel list
D EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(USR,0))
;
K PLIDEN
S PNL=""
F S PNL=$O(^BQICARE(USR,1,"AC","A",PNL)) Q:'PNL D
. ; For each panel, check current status, if not currently running, quit
. S CSTA=+$$CSTA(USR,PNL) I 'CSTA Q
. ; repopulate
. D POP^BQIPLPP("",USR,PNL,"",USR)
. ; Reset description
. NEW DA,IENS
. S DA(1)=USR,DA=PNL,IENS=$$IENS^DILF(.DA)
. K DESC
. D DESC^BQIPDSCM(USR,PNL,.DESC)
. ;D PEN^BQIPLDSC(USR,PNL,.DESC)
. D WP^DIE(90505.01,IENS,5,"","DESC")
. K DESC
. ; clear status
. D STA(USR,PNL)
. ; unlock panel
. D ULK(USR,PNL)
. ; unlock any panels that are filters
. D CPFLU^BQIPLUTL(USR,PNL)
. ; unlock any owning panels
. S PLIDEN=USR_$C(26)_$P(^BQICARE(USR,1,PNL,0),"^",1)
. I $D(^BQICARE("AD",PLIDEN)) D PFILU^BQIPLUTL(USR,PNL,PLIDEN)
. ; refresh panel list
. D EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(USR,PNL))
;
; refresh flag list
D EVT("BQI REFRESH FLAG LIST",USR)
;
DLOG S II=II+1,@DATA@(II)="1"_$C(30)
S II=II+1,@DATA@(II)=$C(31)
K PLIDEN
Q
;
MAN(DATA,OWNR,PLIEN,RETAIN) ;EP -- BQI MANUAL POP
NEW UID,II,LGLOB,LOCK,X,PLIDEN,LFLG
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J),II=0
S DATA=$NA(^TMP("BQIPLRF",UID))
K @DATA
;
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIPLRF D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
S RETAIN=$G(RETAIN,"")
S LOCK=$$LCK(OWNR,PLIEN)
I 'LOCK D G EXT
. D STA(OWNR,PLIEN)
. D NNOTF(OWNR,PLIEN)
;
; Check if panel contains panel filters and try to lock them
NEW PLSUCC,SUBJECT,LOCK,POWNR,PPLIEN
S PLSUCC=$$CPFL^BQIPLUTL(OWNR,PLIEN)
I 'PLSUCC D G EXT
. D STA(OWNR,PLIEN)
. S SUBJECT="Unable to lock panel(s) that are filters for panel: "_$P(^BQICARE(OWNR,1,PLIEN,0),U,1)
. S LOCK="0^"_$P(PLSUCC,U,2),POWNR=$P(PLSUCC,U,4),PPLIEN=$P(PLSUCC,U,5)
. I $P(PLSUCC,U,3)'="" S BMXSEC=$P(PLSUCC,U,3),SUBJECT=""
. D NNOTF(OWNR,PLIEN,SUBJECT)
;
; Check if panel is a panel filter and try to lock all panels using this one
S PLIDEN=OWNR_$C(26)_$P(^BQICARE(OWNR,1,PLIEN,0),"^",1)
I $D(^BQICARE("AD",PLIDEN)) D I LFLG G EXT
. S LFLG=0 D PFILL^BQIPLUTL(OWNR,PLIEN,PLIDEN)
. I LFLG D PFILU^BQIPLUTL(OWNR,PLIEN,PLIDEN),STA(OWNR,PLIEN),ULK(OWNR,PLIEN) Q
D STA(OWNR,PLIEN,1)
;
S @DATA@(II)="I00010RESULT"_$C(30)
;
D EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(OWNR,PLIEN))
;
K PLIDEN
; populate panel
D POP^BQIPLPP("",OWNR,PLIEN,RETAIN)
; Reset description
NEW DA,IENS
S DA(1)=OWNR,DA=PLIEN,IENS=$$IENS^DILF(.DA)
K DESC
D DESC^BQIPDSCM(OWNR,PLIEN,.DESC)
;D PEN^BQIPLDSC(OWNR,PLIEN,.DESC)
D WP^DIE(90505.01,IENS,5,"","DESC")
K DESC
;
D STA(OWNR,PLIEN)
D ULK(OWNR,PLIEN)
D CPFLU^BQIPLUTL(OWNR,PLIEN)
S PLIDEN=OWNR_$C(26)_$P(^BQICARE(OWNR,1,PLIEN,0),"^",1)
I $D(^BQICARE("AD",PLIDEN)) D PFILU^BQIPLUTL(OWNR,PLIEN,PLIDEN)
;
EXT D EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(OWNR,PLIEN))
D EVT("BQI REFRESH FLAG LIST",OWNR)
;
S II=II+1,@DATA@(II)="1"_$C(30)
S II=II+1,@DATA@(II)=$C(31)
;
K RETAIN,OWNR,PLIEN,PLIDEN
Q
;
LCK(USR,PNL) ;EP -- Try to lock panel
S LGLOB=$NA(^TMP("BQIPLRF",UID))
D LOCK^BQIPLLK(.LGLOB,USR,PNL)
I $G(BMXSEC) Q 0
; Strip off trailing $C(30)
I $P($G(@LGLOB@(1)),U,1)=0 Q 0_U_$$TKO^BQIUL1($P(@LGLOB@(1),U,3),$C(30))
Q 1
;
ULK(USR,PNL) ;EP -- Unlock panel
S LGLOB=$NA(^TMP("BQIPLRF",UID))
D UNLOCK^BQIPLLK(.LGLOB,USR,PNL)
K ^TMP("BQIPLLK",UID)
Q
;
EVT(NAME,PARMS) ;EP -- Raise the event
D EVENT^BMXMEVN(NAME,PARMS)
Q
;
STA(USR,PNL,VAL) ;EP -- Set status
I $G(VAL)="" S VAL="@"
NEW DA,IENS
S DA(1)=USR,DA=PNL,IENS=$$IENS^DILF(.DA)
S BQIUPD(90505.01,IENS,3.4)=$G(VAL)
D FILE^DIE("","BQIUPD","ERROR")
K BQIUPD
Q
;
CSTA(USR,PNL) ;EP -- Current status value
NEW DA,IENS
S DA(1)=USR,DA=PNL,IENS=$$IENS^DILF(.DA)
Q $$GET1^DIQ(90505.01,IENS,3.4,"I")
;
NOT(USR,PNL,LCKBY) ;EP -- Send a notification
NEW SUBJECT,DA,IENS,USRNM
S DA(1)=USR,DA=PNL,IENS=$$IENS^DILF(.DA)
S USRNM=$$GET1^DIQ(200,USR_",",.01,"E")
S SUBJECT="Panel "_$$GET1^DIQ(90505.01,IENS,.01,"E")_" was unable to be autorefreshed"
I $G(LCKBY)]"" S SUBJECT=SUBJECT_" because it was locked by "_$S(LCKBY[USRNM:"you",1:LCKBY)
D ADD^BQINOTF("",USR,SUBJECT)
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 $G(USR)'=""&($G(PNL)'="") D
. D STA(USR,PNL)
. D ULK(USR,PNL)
. D EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(USR,PNL))
I $G(OWNR)'=""&($G(PLIEN)'="") D
. D STA(OWNR,PLIEN)
. D ULK(OWNR,PLIEN)
. D EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(OWNR,PLIEN))
I $D(II),$D(DATA) S II=II+1,@DATA@(II)="-1"_$C(30)
I $D(II),$D(DATA) S II=II+1,@DATA@(II)=$C(31)
Q
;
NNOTF(OWNR,PLIEN,SUBJECT) ;EP - Not able to lock notification message
S SUBJECT=$G(SUBJECT,"")
I $G(BMXSEC)=""&(SUBJECT="") D NOT(OWNR,PLIEN,$P(LOCK,U,2)) Q
I SUBJECT="" S SUBJECT="Unable to lock because "_BMXSEC
D ADD^BQINOTF("",OWNR,SUBJECT)
Q
BQIPLRF ;PRXM/HC/ALA-Panel Refresh ; 11 Jul 2006 10:05 AM
+1 ;;2.3;ICARE MANAGEMENT SYSTEM;**1**;Apr 18, 2012;Build 43
+2 ;
+3 QUIT
+4 ;
ALOG(DATA,FAKE) ;EP -- BQI AUTOPOP LOGIN
+1 NEW UID,II,USR,PNL,LGLOB,LOCK,X,CSTA,PLIDEN,LFLG
+2 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
SET II=0
+3 SET DATA=$NAME(^TMP("BQIPLRF",UID))
+4 KILL @DATA
+5 ;
+6 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIPLRF D UNWIND^%ZTER"
+7 ;
+8 SET @DATA@(II)="I00010RESULT"_$CHAR(30)
+9 ;
+10 SET USR=DUZ
SET PNL=""
+11 ;
+12 IF $ORDER(^BQICARE(USR,1,"AC","A",PNL))=""
GOTO DLOG
+13 ;
+14 FOR
SET PNL=$ORDER(^BQICARE(USR,1,"AC","A",PNL))
IF 'PNL
QUIT
Begin DoDot:1
+15 ; Lock panel to be repopulated
+16 SET LOCK=$$LCK(USR,PNL)
+17 ; If not able to lock panel, clear status, send notification and go to next one
+18 IF 'LOCK
Begin DoDot:2
+19 DO STA(USR,PNL)
+20 DO NNOTF(USR,PNL)
End DoDot:2
QUIT
+21 ;
+22 ; Check if locked panel has panel filters
+23 NEW PLSUCC,SUBJECT,LOCK,POWNR,PPLIEN
+24 SET PLSUCC=$$CPFL^BQIPLUTL(USR,PNL)
+25 ; If panel contains panel filters and were not successful in being locked,
+26 ; clear status, send notification and go to next panel in list
+27 IF 'PLSUCC
Begin DoDot:2
+28 DO STA(USR,PNL)
+29 DO ULK(USR,PNL)
+30 SET SUBJECT="Unable to lock panel(s) that are filters for panel: "_$PIECE(^BQICARE(USR,1,PNL,0),U,1)
+31 SET LOCK="0^"_$PIECE(PLSUCC,U,2)
SET POWNR=$PIECE(PLSUCC,U,4)
SET PPLIEN=$PIECE(PLSUCC,U,5)
+32 IF $PIECE(PLSUCC,U,3)'=""
SET BMXSEC=$PIECE(PLSUCC,U,3)
SET SUBJECT=""
+33 DO NNOTF(USR,PNL,SUBJECT)
End DoDot:2
QUIT
+34 ;
+35 ; Check if panel is a panel filter
+36 SET PLIDEN=USR_$CHAR(26)_$PIECE(^BQICARE(USR,1,PNL,0),"^",1)
+37 IF $DATA(^BQICARE("AD",PLIDEN))
Begin DoDot:2
+38 SET LFLG=0
DO PFILL^BQIPLUTL(USR,PNL,PLIDEN)
+39 ; If not able to lock any of the owning panels, unlock owning panel, clear status, unlock panel and quit
+40 IF LFLG
DO PFILU^BQIPLUTL(USR,PNL,PLIDEN)
DO STA(USR,PNL)
DO ULK(USR,PNL)
End DoDot:2
IF LFLG
QUIT
+41 ; Set status to currently running
+42 DO STA(USR,PNL,1)
End DoDot:1
+43 ;
+44 ; Refresh panel list
+45 DO EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(USR,0))
+46 ;
+47 KILL PLIDEN
+48 SET PNL=""
+49 FOR
SET PNL=$ORDER(^BQICARE(USR,1,"AC","A",PNL))
IF 'PNL
QUIT
Begin DoDot:1
+50 ; For each panel, check current status, if not currently running, quit
+51 SET CSTA=+$$CSTA(USR,PNL)
IF 'CSTA
QUIT
+52 ; repopulate
+53 DO POP^BQIPLPP("",USR,PNL,"",USR)
+54 ; Reset description
+55 NEW DA,IENS
+56 SET DA(1)=USR
SET DA=PNL
SET IENS=$$IENS^DILF(.DA)
+57 KILL DESC
+58 DO DESC^BQIPDSCM(USR,PNL,.DESC)
+59 ;D PEN^BQIPLDSC(USR,PNL,.DESC)
+60 DO WP^DIE(90505.01,IENS,5,"","DESC")
+61 KILL DESC
+62 ; clear status
+63 DO STA(USR,PNL)
+64 ; unlock panel
+65 DO ULK(USR,PNL)
+66 ; unlock any panels that are filters
+67 DO CPFLU^BQIPLUTL(USR,PNL)
+68 ; unlock any owning panels
+69 SET PLIDEN=USR_$CHAR(26)_$PIECE(^BQICARE(USR,1,PNL,0),"^",1)
+70 IF $DATA(^BQICARE("AD",PLIDEN))
DO PFILU^BQIPLUTL(USR,PNL,PLIDEN)
+71 ; refresh panel list
+72 DO EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(USR,PNL))
End DoDot:1
+73 ;
+74 ; refresh flag list
+75 DO EVT("BQI REFRESH FLAG LIST",USR)
+76 ;
DLOG SET II=II+1
SET @DATA@(II)="1"_$CHAR(30)
+1 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+2 KILL PLIDEN
+3 QUIT
+4 ;
MAN(DATA,OWNR,PLIEN,RETAIN) ;EP -- BQI MANUAL POP
+1 NEW UID,II,LGLOB,LOCK,X,PLIDEN,LFLG
+2 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
SET II=0
+3 SET DATA=$NAME(^TMP("BQIPLRF",UID))
+4 KILL @DATA
+5 ;
+6 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIPLRF D UNWIND^%ZTER"
+7 ;
+8 SET RETAIN=$GET(RETAIN,"")
+9 SET LOCK=$$LCK(OWNR,PLIEN)
+10 IF 'LOCK
Begin DoDot:1
+11 DO STA(OWNR,PLIEN)
+12 DO NNOTF(OWNR,PLIEN)
End DoDot:1
GOTO EXT
+13 ;
+14 ; Check if panel contains panel filters and try to lock them
+15 NEW PLSUCC,SUBJECT,LOCK,POWNR,PPLIEN
+16 SET PLSUCC=$$CPFL^BQIPLUTL(OWNR,PLIEN)
+17 IF 'PLSUCC
Begin DoDot:1
+18 DO STA(OWNR,PLIEN)
+19 SET SUBJECT="Unable to lock panel(s) that are filters for panel: "_$PIECE(^BQICARE(OWNR,1,PLIEN,0),U,1)
+20 SET LOCK="0^"_$PIECE(PLSUCC,U,2)
SET POWNR=$PIECE(PLSUCC,U,4)
SET PPLIEN=$PIECE(PLSUCC,U,5)
+21 IF $PIECE(PLSUCC,U,3)'=""
SET BMXSEC=$PIECE(PLSUCC,U,3)
SET SUBJECT=""
+22 DO NNOTF(OWNR,PLIEN,SUBJECT)
End DoDot:1
GOTO EXT
+23 ;
+24 ; Check if panel is a panel filter and try to lock all panels using this one
+25 SET PLIDEN=OWNR_$CHAR(26)_$PIECE(^BQICARE(OWNR,1,PLIEN,0),"^",1)
+26 IF $DATA(^BQICARE("AD",PLIDEN))
Begin DoDot:1
+27 SET LFLG=0
DO PFILL^BQIPLUTL(OWNR,PLIEN,PLIDEN)
+28 IF LFLG
DO PFILU^BQIPLUTL(OWNR,PLIEN,PLIDEN)
DO STA(OWNR,PLIEN)
DO ULK(OWNR,PLIEN)
QUIT
End DoDot:1
IF LFLG
GOTO EXT
+29 DO STA(OWNR,PLIEN,1)
+30 ;
+31 SET @DATA@(II)="I00010RESULT"_$CHAR(30)
+32 ;
+33 DO EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(OWNR,PLIEN))
+34 ;
+35 KILL PLIDEN
+36 ; populate panel
+37 DO POP^BQIPLPP("",OWNR,PLIEN,RETAIN)
+38 ; Reset description
+39 NEW DA,IENS
+40 SET DA(1)=OWNR
SET DA=PLIEN
SET IENS=$$IENS^DILF(.DA)
+41 KILL DESC
+42 DO DESC^BQIPDSCM(OWNR,PLIEN,.DESC)
+43 ;D PEN^BQIPLDSC(OWNR,PLIEN,.DESC)
+44 DO WP^DIE(90505.01,IENS,5,"","DESC")
+45 KILL DESC
+46 ;
+47 DO STA(OWNR,PLIEN)
+48 DO ULK(OWNR,PLIEN)
+49 DO CPFLU^BQIPLUTL(OWNR,PLIEN)
+50 SET PLIDEN=OWNR_$CHAR(26)_$PIECE(^BQICARE(OWNR,1,PLIEN,0),"^",1)
+51 IF $DATA(^BQICARE("AD",PLIDEN))
DO PFILU^BQIPLUTL(OWNR,PLIEN,PLIDEN)
+52 ;
EXT DO EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(OWNR,PLIEN))
+1 DO EVT("BQI REFRESH FLAG LIST",OWNR)
+2 ;
+3 SET II=II+1
SET @DATA@(II)="1"_$CHAR(30)
+4 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+5 ;
+6 KILL RETAIN,OWNR,PLIEN,PLIDEN
+7 QUIT
+8 ;
LCK(USR,PNL) ;EP -- Try to lock panel
+1 SET LGLOB=$NAME(^TMP("BQIPLRF",UID))
+2 DO LOCK^BQIPLLK(.LGLOB,USR,PNL)
+3 IF $GET(BMXSEC)
QUIT 0
+4 ; Strip off trailing $C(30)
+5 IF $PIECE($GET(@LGLOB@(1)),U,1)=0
QUIT 0_U_$$TKO^BQIUL1($PIECE(@LGLOB@(1),U,3),$CHAR(30))
+6 QUIT 1
+7 ;
ULK(USR,PNL) ;EP -- Unlock panel
+1 SET LGLOB=$NAME(^TMP("BQIPLRF",UID))
+2 DO UNLOCK^BQIPLLK(.LGLOB,USR,PNL)
+3 KILL ^TMP("BQIPLLK",UID)
+4 QUIT
+5 ;
EVT(NAME,PARMS) ;EP -- Raise the event
+1 DO EVENT^BMXMEVN(NAME,PARMS)
+2 QUIT
+3 ;
STA(USR,PNL,VAL) ;EP -- Set status
+1 IF $GET(VAL)=""
SET VAL="@"
+2 NEW DA,IENS
+3 SET DA(1)=USR
SET DA=PNL
SET IENS=$$IENS^DILF(.DA)
+4 SET BQIUPD(90505.01,IENS,3.4)=$GET(VAL)
+5 DO FILE^DIE("","BQIUPD","ERROR")
+6 KILL BQIUPD
+7 QUIT
+8 ;
CSTA(USR,PNL) ;EP -- Current status value
+1 NEW DA,IENS
+2 SET DA(1)=USR
SET DA=PNL
SET IENS=$$IENS^DILF(.DA)
+3 QUIT $$GET1^DIQ(90505.01,IENS,3.4,"I")
+4 ;
NOT(USR,PNL,LCKBY) ;EP -- Send a notification
+1 NEW SUBJECT,DA,IENS,USRNM
+2 SET DA(1)=USR
SET DA=PNL
SET IENS=$$IENS^DILF(.DA)
+3 SET USRNM=$$GET1^DIQ(200,USR_",",.01,"E")
+4 SET SUBJECT="Panel "_$$GET1^DIQ(90505.01,IENS,.01,"E")_" was unable to be autorefreshed"
+5 IF $GET(LCKBY)]""
SET SUBJECT=SUBJECT_" because it was locked by "_$SELECT(LCKBY[USRNM:"you",1:LCKBY)
+6 DO ADD^BQINOTF("",USR,SUBJECT)
+7 QUIT
+8 ;
ERR ;
+1 ;
+2 DO ^%ZTER
+3 NEW Y,ERRDTM
+4 SET Y=$$NOW^XLFDT()
XECUTE ^DD("DD")
SET ERRDTM=Y
+5 SET BMXSEC="Recording that an error occurred at "_ERRDTM
+6 IF $GET(USR)'=""&($GET(PNL)'="")
Begin DoDot:1
+7 DO STA(USR,PNL)
+8 DO ULK(USR,PNL)
+9 DO EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(USR,PNL))
End DoDot:1
+10 IF $GET(OWNR)'=""&($GET(PLIEN)'="")
Begin DoDot:1
+11 DO STA(OWNR,PLIEN)
+12 DO ULK(OWNR,PLIEN)
+13 DO EVT("BQI REFRESH PANEL LIST",$$PLID^BQIUG1(OWNR,PLIEN))
End DoDot:1
+14 IF $DATA(II)
IF $DATA(DATA)
SET II=II+1
SET @DATA@(II)="-1"_$CHAR(30)
+15 IF $DATA(II)
IF $DATA(DATA)
SET II=II+1
SET @DATA@(II)=$CHAR(31)
+16 QUIT
+17 ;
NNOTF(OWNR,PLIEN,SUBJECT) ;EP - Not able to lock notification message
+1 SET SUBJECT=$GET(SUBJECT,"")
+2 IF $GET(BMXSEC)=""&(SUBJECT="")
DO NOT(OWNR,PLIEN,$PIECE(LOCK,U,2))
QUIT
+3 IF SUBJECT=""
SET SUBJECT="Unable to lock because "_BMXSEC
+4 DO ADD^BQINOTF("",OWNR,SUBJECT)
+5 QUIT