FSCRPCON ;SLC/STAFF-NOIS RPC Other Notification ;12/7/97 16:42
;;1.1;NOIS;;Sep 06, 1998
;
NOTIFY(IN,OUT) ; from FSCRPX (RPCCallNotification)
N CALL,CNT,LISTNAME,LISTNUM,LISTSNUM,MSG,NUM,OWNER
S CALL=+$G(^TMP("FSCRPC",$J,"INPUT",1))
I 'CALL S ^TMP("FSCRPC",$J,"OUTPUT",1)="no information" Q
K ^TMP("FSC NOTIFY",$J)
S CNT=0
S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="Notifications on this call:"
D NOTINFO^FSCNOT(CALL)
S MSG="" F S MSG=$O(^TMP("FSC NOTIFY",$J,"B",MSG)) Q:MSG="" D
.S NUM=0 F S NUM=$O(^TMP("FSC NOTIFY",$J,"B",MSG,NUM)) Q:NUM<1 D
..S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=" "_^TMP("FSC NOTIFY",$J,NUM)
K ^TMP("FSC NOTIFY",$J)
S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="This call is found on the following lists:"
S LISTSNUM=0 F S LISTSNUM=$O(^FSCD("LISTS","B",CALL,LISTSNUM)) Q:LISTSNUM<1 D
.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)
.S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=" "_LISTNAME I OWNER D
..S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=^TMP("FSCRPC",$J,"OUTPUT",CNT)_" Owner: "_$$VALUE^FSCGET(OWNER,7107.1,1)_" "_$$SITESP(OWNER)
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[HFSCRPCON 1442 printed Nov 22, 2024@17:29:40 Page 2
FSCRPCON ;SLC/STAFF-NOIS RPC Other Notification ;12/7/97 16:42
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
NOTIFY(IN,OUT) ; from FSCRPX (RPCCallNotification)
+1 NEW CALL,CNT,LISTNAME,LISTNUM,LISTSNUM,MSG,NUM,OWNER
+2 SET CALL=+$GET(^TMP("FSCRPC",$JOB,"INPUT",1))
+3 IF 'CALL
SET ^TMP("FSCRPC",$JOB,"OUTPUT",1)="no information"
QUIT
+4 KILL ^TMP("FSC NOTIFY",$JOB)
+5 SET CNT=0
+6 SET CNT=CNT+1
SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)="Notifications on this call:"
+7 DO NOTINFO^FSCNOT(CALL)
+8 SET MSG=""
FOR
SET MSG=$ORDER(^TMP("FSC NOTIFY",$JOB,"B",MSG))
if MSG=""
QUIT
Begin DoDot:1
+9 SET NUM=0
FOR
SET NUM=$ORDER(^TMP("FSC NOTIFY",$JOB,"B",MSG,NUM))
if NUM<1
QUIT
Begin DoDot:2
+10 SET CNT=CNT+1
SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)=" "_^TMP("FSC NOTIFY",$JOB,NUM)
End DoDot:2
End DoDot:1
+11 KILL ^TMP("FSC NOTIFY",$JOB)
+12 SET CNT=CNT+1
SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)="This call is found on the following lists:"
+13 SET LISTSNUM=0
FOR
SET LISTSNUM=$ORDER(^FSCD("LISTS","B",CALL,LISTSNUM))
if LISTSNUM<1
QUIT
Begin DoDot:1
+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 SET CNT=CNT+1
SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)=" "_LISTNAME
IF OWNER
Begin DoDot:2
+17 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)=^TMP("FSCRPC",$JOB,"OUTPUT",CNT)_" Owner: "_$$VALUE^FSCGET(OWNER,7107.1,1)_" "_$$SITESP(OWNER)
End DoDot:2
End DoDot:1
+18 QUIT
+19 ;
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)_")"