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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCRPCC 2263 printed Nov 22, 2024@17:29:14 Page 2
FSCRPCC ;SLC/STAFF-NOIS RPC Call ;1/19/98 11:26
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
CALL(IN,OUT) ; from FSCRPX (RPCNOISCall)
+1 NEW CALL,CNT,LINE,NUM
+2 SET CALL=+$GET(^TMP("FSCRPC",$JOB,"INPUT",1))
+3 IF 'CALL
QUIT
+4 SET ^TMP("FSCRPC",$JOB,"OUTPUT",1)="0^"_$GET(^FSCD("CALL",CALL,0))
+5 SET ^TMP("FSCRPC",$JOB,"OUTPUT",2)="1^"_$GET(^FSCD("CALL",CALL,1))
+6 SET ^TMP("FSCRPC",$JOB,"OUTPUT",3)="1.5^"_$GET(^FSCD("CALL",CALL,1.5))
+7 SET ^TMP("FSCRPC",$JOB,"OUTPUT",4)="120^"_$GET(^FSCD("CALL",CALL,120))
+8 SET ^TMP("FSCRPC",$JOB,"OUTPUT",5)="{{{DESC}}}"
+9 SET CNT=6
+10 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("CALL",CALL,30,NUM))
if NUM<1
QUIT
SET LINE=$GET(^(NUM,0))
Begin DoDot:1
+11 SET CNT=CNT+1
+12 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)=LINE
End DoDot:1
+13 SET CNT=CNT+1
+14 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)="{{{}}}"
+15 SET CNT=CNT+1
+16 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)="{{{NOTE}}}"
+17 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("CALL",CALL,50,NUM))
if NUM<1
QUIT
SET LINE=$GET(^(NUM,0))
Begin DoDot:1
+18 SET CNT=CNT+1
+19 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)=LINE
End DoDot:1
+20 SET CNT=CNT+1
+21 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)="{{{}}}"
+22 SET CNT=CNT+1
+23 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)="{{{RES}}}"
+24 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("CALL",CALL,80,NUM))
if NUM<1
QUIT
SET LINE=$GET(^(NUM,0))
Begin DoDot:1
+25 SET CNT=CNT+1
+26 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)=LINE
End DoDot:1
+27 SET CNT=CNT+1
+28 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)="{{{}}}"
+29 QUIT
+30 ;
FORLIST(IN,OUT) ; from FSCRPX (RPCCallForList)
+1 NEW CALL
+2 SET CALL=+$GET(^TMP("FSCRPC",$JOB,"INPUT",1))
+3 IF 'CALL
QUIT
+4 SET ^TMP("FSCRPC",$JOB,"OUTPUT",1)=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)
+5 QUIT
+6 ;
SELECT(IN,OUT) ;from FSCRPX (RPCSelectCall)
+1 NEW CALL,LINE,MODE,TEXT,TEXTNM,TEXTZ
+2 SET LINE=$GET(^TMP("FSCRPC",$JOB,"INPUT",1))
+3 SET TEXT=$PIECE(LINE,U)
SET MODE=$PIECE(LINE,U,2)
+4 IF '$LENGTH(TEXT)
QUIT
+5 SET TEXT=$$UP^XLFSTR(TEXT)
+6 IF TEXT!(TEXT?1"N"4N.N)
Begin DoDot:1
+7 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL","BN",TEXT,CALL))
if CALL<1
QUIT
DO SETUP(CALL,MODE)
End DoDot:1
+8 IF '$TEST
Begin DoDot:1
+9 SET TEXTZ=TEXT_"ZZZZ"
SET TEXTNM=$EXTRACT(TEXT,1,$LENGTH(TEXT)-1)_$CHAR($ASCII(TEXT,$LENGTH(TEXT))-1)_"ZZZZ"
+10 FOR
SET TEXTNM=$ORDER(^FSCD("CALL","B",TEXTNM))
if TEXTNM=""
QUIT
if TEXTNM]TEXTZ
QUIT
Begin DoDot:2
+11 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL","B",TEXTNM,CALL))
if CALL<1
QUIT
DO SETUP(CALL,MODE)
End DoDot:2
End DoDot:1
+12 QUIT
+13 ;
SETUP(CALL,MODE) ;
+1 NEW OK
+2 SET OK=0
Begin DoDot:1
+3 IF MODE="ANY"
SET OK=1
QUIT
+4 IF MODE="ADD"
Begin DoDot:2
+5 IF '$DATA(^TMP("FSC CURRENT LIST",$JOB,"C",CALL))
SET OK=1
QUIT
End DoDot:2
QUIT
+6 IF $DATA(^TMP("FSC CURRENT LIST",$JOB,"C",CALL))
SET OK=1
QUIT
End DoDot:1
+7 IF OK
SET ^TMP("FSCRPC",$JOB,"OUTPUT",CALL)=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)
+8 QUIT