Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FSCRPCON

FSCRPCON.m

Go to the documentation of this file.
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)_")"