source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCRPCC.m@ 691

Last change on this file since 691 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1FSCRPCC ;SLC/STAFF-NOIS RPC Call ;1/19/98 11:26
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4CALL(IN,OUT) ; from FSCRPX (RPCNOISCall)
5 N CALL,CNT,LINE,NUM
6 S CALL=+$G(^TMP("FSCRPC",$J,"INPUT",1))
7 I 'CALL Q
8 S ^TMP("FSCRPC",$J,"OUTPUT",1)="0^"_$G(^FSCD("CALL",CALL,0))
9 S ^TMP("FSCRPC",$J,"OUTPUT",2)="1^"_$G(^FSCD("CALL",CALL,1))
10 S ^TMP("FSCRPC",$J,"OUTPUT",3)="1.5^"_$G(^FSCD("CALL",CALL,1.5))
11 S ^TMP("FSCRPC",$J,"OUTPUT",4)="120^"_$G(^FSCD("CALL",CALL,120))
12 S ^TMP("FSCRPC",$J,"OUTPUT",5)="{{{DESC}}}"
13 S CNT=6
14 S NUM=0 F S NUM=$O(^FSCD("CALL",CALL,30,NUM)) Q:NUM<1 S LINE=$G(^(NUM,0)) D
15 .S CNT=CNT+1
16 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
17 S CNT=CNT+1
18 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
19 S CNT=CNT+1
20 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{NOTE}}}"
21 S NUM=0 F S NUM=$O(^FSCD("CALL",CALL,50,NUM)) Q:NUM<1 S LINE=$G(^(NUM,0)) D
22 .S CNT=CNT+1
23 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
24 S CNT=CNT+1
25 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
26 S CNT=CNT+1
27 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{RES}}}"
28 S NUM=0 F S NUM=$O(^FSCD("CALL",CALL,80,NUM)) Q:NUM<1 S LINE=$G(^(NUM,0)) D
29 .S CNT=CNT+1
30 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
31 S CNT=CNT+1
32 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
33 Q
34 ;
35FORLIST(IN,OUT) ; from FSCRPX (RPCCallForList)
36 N CALL
37 S CALL=+$G(^TMP("FSCRPC",$J,"INPUT",1))
38 I 'CALL Q
39 S ^TMP("FSCRPC",$J,"OUTPUT",1)=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)
40 Q
41 ;
42SELECT(IN,OUT) ;from FSCRPX (RPCSelectCall)
43 N CALL,LINE,MODE,TEXT,TEXTNM,TEXTZ
44 S LINE=$G(^TMP("FSCRPC",$J,"INPUT",1))
45 S TEXT=$P(LINE,U),MODE=$P(LINE,U,2)
46 I '$L(TEXT) Q
47 S TEXT=$$UP^XLFSTR(TEXT)
48 I TEXT!(TEXT?1"N"4N.N) D
49 .S CALL=0 F S CALL=$O(^FSCD("CALL","BN",TEXT,CALL)) Q:CALL<1 D SETUP(CALL,MODE)
50 E D
51 .S TEXTZ=TEXT_"ZZZZ",TEXTNM=$E(TEXT,1,$L(TEXT)-1)_$C($A(TEXT,$L(TEXT))-1)_"ZZZZ"
52 .F S TEXTNM=$O(^FSCD("CALL","B",TEXTNM)) Q:TEXTNM="" Q:TEXTNM]TEXTZ D
53 ..S CALL=0 F S CALL=$O(^FSCD("CALL","B",TEXTNM,CALL)) Q:CALL<1 D SETUP(CALL,MODE)
54 Q
55 ;
56SETUP(CALL,MODE) ;
57 N OK
58 S OK=0 D
59 .I MODE="ANY" S OK=1 Q
60 .I MODE="ADD" D Q
61 ..I '$D(^TMP("FSC CURRENT LIST",$J,"C",CALL)) S OK=1 Q
62 .I $D(^TMP("FSC CURRENT LIST",$J,"C",CALL)) S OK=1 Q
63 I OK S ^TMP("FSCRPC",$J,"OUTPUT",CALL)=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)
64 Q
Note: See TracBrowser for help on using the repository browser.