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

FSCRPCC.m

Go to the documentation of this file.
FSCRPCC ;SLC/STAFF-NOIS RPC Call ;1/19/98  11:26
 ;;1.1;NOIS;;Sep 06, 1998
 ;
CALL(IN,OUT) ; from FSCRPX (RPCNOISCall)
 N CALL,CNT,LINE,NUM
 S CALL=+$G(^TMP("FSCRPC",$J,"INPUT",1))
 I 'CALL Q
 S ^TMP("FSCRPC",$J,"OUTPUT",1)="0^"_$G(^FSCD("CALL",CALL,0))
 S ^TMP("FSCRPC",$J,"OUTPUT",2)="1^"_$G(^FSCD("CALL",CALL,1))
 S ^TMP("FSCRPC",$J,"OUTPUT",3)="1.5^"_$G(^FSCD("CALL",CALL,1.5))
 S ^TMP("FSCRPC",$J,"OUTPUT",4)="120^"_$G(^FSCD("CALL",CALL,120))
 S ^TMP("FSCRPC",$J,"OUTPUT",5)="{{{DESC}}}"
 S CNT=6
 S NUM=0 F  S NUM=$O(^FSCD("CALL",CALL,30,NUM)) Q:NUM<1  S LINE=$G(^(NUM,0)) D
 .S CNT=CNT+1
 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
 S CNT=CNT+1
 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
 S CNT=CNT+1
 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{NOTE}}}"
 S NUM=0 F  S NUM=$O(^FSCD("CALL",CALL,50,NUM)) Q:NUM<1  S LINE=$G(^(NUM,0)) D
 .S CNT=CNT+1
 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
 S CNT=CNT+1
 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
 S CNT=CNT+1
 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{RES}}}"
 S NUM=0 F  S NUM=$O(^FSCD("CALL",CALL,80,NUM)) Q:NUM<1  S LINE=$G(^(NUM,0)) D
 .S CNT=CNT+1
 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
 S CNT=CNT+1
 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
 Q
 ;
FORLIST(IN,OUT) ; from FSCRPX (RPCCallForList)
 N CALL
 S CALL=+$G(^TMP("FSCRPC",$J,"INPUT",1))
 I 'CALL Q
 S ^TMP("FSCRPC",$J,"OUTPUT",1)=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)
 Q
 ;
SELECT(IN,OUT) ;from FSCRPX (RPCSelectCall)
 N CALL,LINE,MODE,TEXT,TEXTNM,TEXTZ
 S LINE=$G(^TMP("FSCRPC",$J,"INPUT",1))
 S TEXT=$P(LINE,U),MODE=$P(LINE,U,2)
 I '$L(TEXT) Q
 S TEXT=$$UP^XLFSTR(TEXT)
 I TEXT!(TEXT?1"N"4N.N) D
 .S CALL=0 F  S CALL=$O(^FSCD("CALL","BN",TEXT,CALL)) Q:CALL<1  D SETUP(CALL,MODE)
 E  D
 .S TEXTZ=TEXT_"ZZZZ",TEXTNM=$E(TEXT,1,$L(TEXT)-1)_$C($A(TEXT,$L(TEXT))-1)_"ZZZZ"
 .F  S TEXTNM=$O(^FSCD("CALL","B",TEXTNM)) Q:TEXTNM=""  Q:TEXTNM]TEXTZ  D
 ..S CALL=0 F  S CALL=$O(^FSCD("CALL","B",TEXTNM,CALL)) Q:CALL<1  D SETUP(CALL,MODE)
 Q
 ;
SETUP(CALL,MODE) ;
 N OK
 S OK=0 D
 .I MODE="ANY" S OK=1 Q
 .I MODE="ADD" D  Q
 ..I '$D(^TMP("FSC CURRENT LIST",$J,"C",CALL)) S OK=1 Q
 .I $D(^TMP("FSC CURRENT LIST",$J,"C",CALL)) S OK=1 Q
 I OK S ^TMP("FSCRPC",$J,"OUTPUT",CALL)=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)
 Q