FSCLMPON ;SLC/STAFF-NOIS List Manager Protocol Other Notify ;1/11/98 18:37
;;1.1;NOIS;;Sep 06, 1998
;
NOTIFY(CALL) ; from FSCLMPO
N CNT,LISTNAME,LISTNUM,LISTSNUM,MSG,NUM,OK,OWNER
K ^TMP("FSC NOTIFY",$J)
W !,"Notifications on this call:" S (CNT,OK)=1
D NOTINFO^FSCNOT(CALL)
S MSG="" F S MSG=$O(^TMP("FSC NOTIFY",$J,"B",MSG)) Q:MSG="" D I 'OK Q
.S NUM=0 F S NUM=$O(^TMP("FSC NOTIFY",$J,"B",MSG,NUM)) Q:NUM<1 D I 'OK Q
..W !,?2,^TMP("FSC NOTIFY",$J,NUM)
..S CNT=CNT+1 I CNT'<(IOSL-1) S CNT=1 D PAUSE^FSCU(.OK) I 'OK Q
K ^TMP("FSC NOTIFY",$J)
I 'OK Q
W !,"This call is found on the following lists:" S CNT=CNT+1
I CALL D
.S LISTSNUM=0 F S LISTSNUM=$O(^FSCD("LISTS","B",CALL,LISTSNUM)) Q:LISTSNUM<1 D I 'OK Q
..S LISTNUM=+$P(^FSCD("LISTS",LISTSNUM,0),U,2)
..Q:'$D(^FSC("LIST",LISTNUM,0)) S LISTNAME=$P(^(0),U),OWNER=+$P(^(0),U,2)
..W !?2,LISTNAME I OWNER W ?24," Owner: ",$$VALUE^FSCGET(OWNER,7107.1,1)," ",$$SITESP(OWNER)
..S CNT=CNT+1 I CNT'<(IOSL-1) S CNT=1 D PAUSE^FSCU(.OK) I 'OK Q
I 'OK Q
D PAUSE^FSCU(.OK)
Q
;
SITESP(USER) ; $$(user) -> (site - area)
N AREA,BOTH,SITE
S SITE=$P($G(^FSC("SPEC",USER,0)),U,3),AREA=$P($G(^(0)),U,4),BOTH=""
I 'SITE,'AREA Q ""
I SITE,AREA S BOTH=" - "
Q "("_$$VALUE^FSCGET(SITE,7105.2,3)_BOTH_$$VALUE^FSCGET(AREA,7105.2,4)_")"
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCLMPON 1329 printed Nov 22, 2024@17:28:30 Page 2
FSCLMPON ;SLC/STAFF-NOIS List Manager Protocol Other Notify ;1/11/98 18:37
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
NOTIFY(CALL) ; from FSCLMPO
+1 NEW CNT,LISTNAME,LISTNUM,LISTSNUM,MSG,NUM,OK,OWNER
+2 KILL ^TMP("FSC NOTIFY",$JOB)
+3 WRITE !,"Notifications on this call:"
SET (CNT,OK)=1
+4 DO NOTINFO^FSCNOT(CALL)
+5 SET MSG=""
FOR
SET MSG=$ORDER(^TMP("FSC NOTIFY",$JOB,"B",MSG))
if MSG=""
QUIT
Begin DoDot:1
+6 SET NUM=0
FOR
SET NUM=$ORDER(^TMP("FSC NOTIFY",$JOB,"B",MSG,NUM))
if NUM<1
QUIT
Begin DoDot:2
+7 WRITE !,?2,^TMP("FSC NOTIFY",$JOB,NUM)
+8 SET CNT=CNT+1
IF CNT'<(IOSL-1)
SET CNT=1
DO PAUSE^FSCU(.OK)
IF 'OK
QUIT
End DoDot:2
IF 'OK
QUIT
End DoDot:1
IF 'OK
QUIT
+9 KILL ^TMP("FSC NOTIFY",$JOB)
+10 IF 'OK
QUIT
+11 WRITE !,"This call is found on the following lists:"
SET CNT=CNT+1
+12 IF CALL
Begin DoDot:1
+13 SET LISTSNUM=0
FOR
SET LISTSNUM=$ORDER(^FSCD("LISTS","B",CALL,LISTSNUM))
if LISTSNUM<1
QUIT
Begin DoDot:2
+14 SET LISTNUM=+$PIECE(^FSCD("LISTS",LISTSNUM,0),U,2)
+15 if '$DATA(^FSC("LIST",LISTNUM,0))
QUIT
SET LISTNAME=$PIECE(^(0),U)
SET OWNER=+$PIECE(^(0),U,2)
+16 WRITE !?2,LISTNAME
IF OWNER
WRITE ?24," Owner: ",$$VALUE^FSCGET(OWNER,7107.1,1)," ",$$SITESP(OWNER)
+17 SET CNT=CNT+1
IF CNT'<(IOSL-1)
SET CNT=1
DO PAUSE^FSCU(.OK)
IF 'OK
QUIT
End DoDot:2
IF 'OK
QUIT
End DoDot:1
+18 IF 'OK
QUIT
+19 DO PAUSE^FSCU(.OK)
+20 QUIT
+21 ;
SITESP(USER) ; $$(user) -> (site - area)
+1 NEW AREA,BOTH,SITE
+2 SET SITE=$PIECE($GET(^FSC("SPEC",USER,0)),U,3)
SET AREA=$PIECE($GET(^(0)),U,4)
SET BOTH=""
+3 IF 'SITE
IF 'AREA
QUIT ""
+4 IF SITE
IF AREA
SET BOTH=" - "
+5 QUIT "("_$$VALUE^FSCGET(SITE,7105.2,3)_BOTH_$$VALUE^FSCGET(AREA,7105.2,4)_")"