- ORB3REC ; SLC/AEB - Notification Management Options for Recipients/Users ;4/30/01 09:52
- ;;3.0;ORDER ENTRY/RESULTS REPORTING;**9,85,105,173**;Dec 17, 1997
- ;
- ERASE ;
- N ORBT S ORBT="Erase All of My Notifications"
- D TITLE(ORBT)
- I '$$GET^XPAR("ALL^USR.`"_DUZ,"ORB ERASE ALL",1,"Q") D Q
- .W !,"You are not authorized to perform this function."
- W !!,"This option purges all your existing notifications",!!?20,"*** USE WITH CAUTION ***"
- W !!,$C(7),"Do you want to purge all notifications for recipient ",$P(^VA(200,DUZ,0),"^") S %=2 D YN^DICN D
- .I %=0 W !,"Enter 'YES' if you want to purge all existing notifications for this person.",!,"Do you want to purge all notifications for this recipient" S %=2 D YN^DICN
- Q:%'=1 W !!,"Purging notifications...",!
- K %
- D RECIPURG^XQALBUTL(DUZ)
- Q
- PFLAG ;
- N ORBT,ENT,PAR,PIEN
- S ORBT="Enable/Disable My Notifications",PIEN=0
- S PIEN=$O(^XTV(8989.51,"B","ORB PROCESSING FLAG",PIEN)) Q:PIEN=""
- S PAR=PIEN
- D TITLE(ORBT) D PROC
- Q
- ;
- FLGOB ;
- N ORBT,ENT,PAR,PIEN
- S ORBT="Set My Flagged Orders Bulletin",PIEN=0
- S PIEN=$O(^XTV(8989.51,"B","ORB FLAGGED ORDERS BULLETIN",PIEN)) Q:PIEN=""
- S PAR=PIEN
- D TITLE(ORBT) D PROC
- Q
- ;
- USRNOTS ; List notifications a user could receive
- D USRNOTS^ORB3U2(DUZ)
- Q
- ;
- TITLE(ORBT) ;
- ; Center and write title
- S IOP=0 D ^%ZIS K IOP W @IOF
- W !,?(80-$L(ORBT)-1/2),ORBT
- Q
- ;
- PROC ; Process Parameter Settings
- S ENT=DUZ_";VA(200," ; Entity is the recipient/user
- W !,$$DASH($S($D(IOM):IOM-1,1:78))
- D EDIT^XPAREDIT(ENT,PAR)
- Q
- DASH(N) ;extrinsic function returns N dashes
- N X
- S $P(X,"-",N+1)=""
- Q X
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORB3REC 1632 printed Jan 18, 2025@03:28:38 Page 2
- ORB3REC ; SLC/AEB - Notification Management Options for Recipients/Users ;4/30/01 09:52
- +1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**9,85,105,173**;Dec 17, 1997
- +2 ;
- ERASE ;
- +1 NEW ORBT
- SET ORBT="Erase All of My Notifications"
- +2 DO TITLE(ORBT)
- +3 IF '$$GET^XPAR("ALL^USR.`"_DUZ,"ORB ERASE ALL",1,"Q")
- Begin DoDot:1
- +4 WRITE !,"You are not authorized to perform this function."
- End DoDot:1
- QUIT
- +5 WRITE !!,"This option purges all your existing notifications",!!?20,"*** USE WITH CAUTION ***"
- +6 WRITE !!,$CHAR(7),"Do you want to purge all notifications for recipient ",$PIECE(^VA(200,DUZ,0),"^")
- SET %=2
- DO YN^DICN
- Begin DoDot:1
- +7 IF %=0
- WRITE !,"Enter 'YES' if you want to purge all existing notifications for this person.",!,"Do you want to purge all notifications for this recipient"
- SET %=2
- DO YN^DICN
- End DoDot:1
- +8 if %'=1
- QUIT
- WRITE !!,"Purging notifications...",!
- +9 KILL %
- +10 DO RECIPURG^XQALBUTL(DUZ)
- +11 QUIT
- PFLAG ;
- +1 NEW ORBT,ENT,PAR,PIEN
- +2 SET ORBT="Enable/Disable My Notifications"
- SET PIEN=0
- +3 SET PIEN=$ORDER(^XTV(8989.51,"B","ORB PROCESSING FLAG",PIEN))
- if PIEN=""
- QUIT
- +4 SET PAR=PIEN
- +5 DO TITLE(ORBT)
- DO PROC
- +6 QUIT
- +7 ;
- FLGOB ;
- +1 NEW ORBT,ENT,PAR,PIEN
- +2 SET ORBT="Set My Flagged Orders Bulletin"
- SET PIEN=0
- +3 SET PIEN=$ORDER(^XTV(8989.51,"B","ORB FLAGGED ORDERS BULLETIN",PIEN))
- if PIEN=""
- QUIT
- +4 SET PAR=PIEN
- +5 DO TITLE(ORBT)
- DO PROC
- +6 QUIT
- +7 ;
- USRNOTS ; List notifications a user could receive
- +1 DO USRNOTS^ORB3U2(DUZ)
- +2 QUIT
- +3 ;
- TITLE(ORBT) ;
- +1 ; Center and write title
- +2 SET IOP=0
- DO ^%ZIS
- KILL IOP
- WRITE @IOF
- +3 WRITE !,?(80-$LENGTH(ORBT)-1/2),ORBT
- +4 QUIT
- +5 ;
- PROC ; Process Parameter Settings
- +1 ; Entity is the recipient/user
- SET ENT=DUZ_";VA(200,"
- +2 WRITE !,$$DASH($SELECT($DATA(IOM):IOM-1,1:78))
- +3 DO EDIT^XPAREDIT(ENT,PAR)
- +4 QUIT
- DASH(N) ;extrinsic function returns N dashes
- +1 NEW X
- +2 SET $PIECE(X,"-",N+1)=""
- +3 QUIT X