XUP468 ;OIFO-OAKLAND/RM - REPORT OF BACKUP ALERT REVIEWERS ;08/14/2007
;;8.0;KERNEL;**468**;Jul 10, 1995;Build 4
;This routines is in support of p468.
Q
RPT1 ;This report will generate a list of active users/providers that hold
;the ORES key and backup reviewers for ALERTS.
N IEN S IEN=0
F S IEN=$O(^VA(200,IEN)) Q:'IEN D
.I ('$D(^VA(200,IEN,0)))#2 Q ;Check of zero node
.Q:'$$ACTIVE^XUSER(IEN)
.I $D(^XUSEC("ORES",IEN)) D
..S ^TMP("XQAL NO BKRV",$J,$P(^VA(200,IEN,0),U),IEN)=""
;WRITE REPORT
N DIC,L,FLDS,BY
S DIC="^VA(200,",L=0,FLDS="[XQAL NO BKUP REVIEWER]"
S L(0)=2,BY(0)="^TMP(""XQAL NO BKRV"",$J,"
D EN1^DIP
Q
BKRV(IEN) ;WRITE BACKUP REVEIWER
;This entry is called from the print template XQAL NO BKUP REVIEWER
;and will retieve all backup reveiwer for a provider. It will also
;check to see if the backup reviewer is an active user.
N XQAA,BKIEN,BKNAME,I
S BKNAME="",I=0
D GETBKUP^XQALDEL(.XQAA,IEN)
I $D(XQAA) S BKIEN=0 F S BKIEN=$O(XQAA(BKIEN)) Q:'BKIEN D
.S I=I+1
.I ('$D(^VA(200,BKIEN,0)))#2 Q ;Check of zero node
.S BKNAME=$P(^VA(200,BKIEN,0),U)
.I '$$ACTIVE^XUSER(BKIEN) S BKNAME="*"_BKNAME ;for an inactive user
.W:I>1 !
.W ?63,BKNAME ;print to report
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUP468 1239 printed Oct 16, 2024@18:12:13 Page 2
XUP468 ;OIFO-OAKLAND/RM - REPORT OF BACKUP ALERT REVIEWERS ;08/14/2007
+1 ;;8.0;KERNEL;**468**;Jul 10, 1995;Build 4
+2 ;This routines is in support of p468.
+3 QUIT
RPT1 ;This report will generate a list of active users/providers that hold
+1 ;the ORES key and backup reviewers for ALERTS.
+2 NEW IEN
SET IEN=0
+3 FOR
SET IEN=$ORDER(^VA(200,IEN))
if 'IEN
QUIT
Begin DoDot:1
+4 ;Check of zero node
IF ('$DATA(^VA(200,IEN,0)))#2
QUIT
+5 if '$$ACTIVE^XUSER(IEN)
QUIT
+6 IF $DATA(^XUSEC("ORES",IEN))
Begin DoDot:2
+7 SET ^TMP("XQAL NO BKRV",$JOB,$PIECE(^VA(200,IEN,0),U),IEN)=""
End DoDot:2
End DoDot:1
+8 ;WRITE REPORT
+9 NEW DIC,L,FLDS,BY
+10 SET DIC="^VA(200,"
SET L=0
SET FLDS="[XQAL NO BKUP REVIEWER]"
+11 SET L(0)=2
SET BY(0)="^TMP(""XQAL NO BKRV"",$J,"
+12 DO EN1^DIP
+13 QUIT
BKRV(IEN) ;WRITE BACKUP REVEIWER
+1 ;This entry is called from the print template XQAL NO BKUP REVIEWER
+2 ;and will retieve all backup reveiwer for a provider. It will also
+3 ;check to see if the backup reviewer is an active user.
+4 NEW XQAA,BKIEN,BKNAME,I
+5 SET BKNAME=""
SET I=0
+6 DO GETBKUP^XQALDEL(.XQAA,IEN)
+7 IF $DATA(XQAA)
SET BKIEN=0
FOR
SET BKIEN=$ORDER(XQAA(BKIEN))
if 'BKIEN
QUIT
Begin DoDot:1
+8 SET I=I+1
+9 ;Check of zero node
IF ('$DATA(^VA(200,BKIEN,0)))#2
QUIT
+10 SET BKNAME=$PIECE(^VA(200,BKIEN,0),U)
+11 ;for an inactive user
IF '$$ACTIVE^XUSER(BKIEN)
SET BKNAME="*"_BKNAME
+12 if I>1
WRITE !
+13 ;print to report
WRITE ?63,BKNAME
End DoDot:1
+14 QUIT