source: FOIAVistA/tag/r/NOIS-FSC/FSCRPCR.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1FSCRPCR ;SLC/STAFF-NOIS RPC Remove ;1/29/98 22:49
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4LISTS(IN,OUT) ; from FSCRPX (RPCRemoveLists)
5 N CALL,CALLX,CNT,COUNT,DATEO,INDX,INPUT,LIMITDFM,LIMITDTO,LIMITNUM,LIST,LISTNUM,LNAME,LNUM,NUM,OK,RLIST,ROK,TIME
6 K ^TMP("FSC MERGE",$J) S COUNT=0
7 S LNUM=0 F S LNUM=$O(^TMP("FSC CURRENT LIST",$J,LNUM)) Q:LNUM<1 S CALL=+^(LNUM) D
8 .S ^TMP("FSC MERGE",$J,LNUM,CALL)=""
9 K ^TMP("FSC CURRENT LIST",$J)
10 S LNUM=0 F S LNUM=$O(^TMP("FSC MERGE",$J,LNUM)) Q:LNUM<1 S CALL=$O(^(LNUM,0)) D
11 .S OK=1,LISTNUM=0 F S LISTNUM=$O(^TMP("FSCRPC",$J,"INPUT",LISTNUM)) Q:LISTNUM<1 S INPUT=^(LISTNUM) D I 'OK Q
12 ..S LIST=+INPUT,INDX=+$P(INPUT,U,2),LIMITNUM=$P(INPUT,U,3),LIMITDTO=$P(INPUT,U,4),LIMITDFM=$P(INPUT,U,5)
13 ..I 'LIST Q
14 ..D LIST^FSCRPCA(LIST,INDX,.RLIST,.ROK) I 'ROK Q
15 ..S LNAME=$P(^FSC("LIST",LIST,0),U)
16 ..I LNAME="MRE:" D
17 ...S TIME="" F S TIME=$O(^FSCD("MRE","AUTC",INDX,TIME)) Q:TIME="" D I 'OK Q
18 ....S CALLX=0 F S CALLX=$O(^FSCD("MRE","AUTC",INDX,TIME,CALLX)) Q:CALLX<1 I CALLX=CALL S OK=0 Q
19 ..E I LNAME="MRA:" D
20 ...S TIME="" F S TIME=$O(^FSCD("MRA","AUTC",INDX,TIME)) Q:TIME="" D I 'OK Q
21 ....S CALLX=0 F S CALLX=$O(^FSCD("MRA","AUTC",INDX,TIME,CALLX)) Q:CALLX<1 I CALLX=CALL S OK=0 Q
22 ..E D
23 ...I $D(@RLIST@(CALL)) D
24 ....I 'LIMITNUM,'LIMITDTO,'LIMITDFM S OK=0 Q
25 ....I LIMITNUM D Q
26 .....S CNT=0,NUM="A" F S NUM=$O(@RLIST@(NUM),-1) Q:NUM<1 S CNT=CNT+1 I NUM=CALL S:CNT'>LIMITNUM OK=0 Q
27 ....I 'LIMITDTO,'LIMITDFM S OK=0 Q
28 ....S DATEO=$P(^FSCD("CALL",CALL,0),U,3)
29 ....I DATEO'<LIMITDTO,DATEO'>LIMITDFM S OK=0
30 .I OK D SETUP^FSCRPCA(CALL,.COUNT)
31 D OUTPUT^FSCRPCA
32 Q
33 ;
34CALLS(IN,OUT) ; from FSCRPX (RPCRemoveCalls)
35 N CALL,LNUM,NUM
36 S NUM=0 F S NUM=$O(^TMP("FSCRPC",$J,"INPUT",NUM)) Q:NUM<1 S CALL=+$G(^(NUM)) D
37 .I $D(^TMP("FSC CURRENT LIST",$J,"C",CALL)) S LNUM=+^(CALL) D
38 ..K ^TMP("FSC CURRENT LIST",$J,LNUM)
39 ..K ^TMP("FSC CURRENT LIST",$J,"C",CALL)
40 D OUTPUT^FSCRPCA
41 Q
Note: See TracBrowser for help on using the repository browser.