source: FOIAVistA/trunk/r/NOIS-FSC/FSCRPCS.m@ 1288

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1FSCRPCS ;SLC/STAFF-NOIS RPC Select ;1/29/98 22:50
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4LISTS(IN,OUT) ; from FSCRPX (RPCSelectLists)
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=0,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=1 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=1 Q
22 ..E D
23 ...I $D(@RLIST@(CALL)) D
24 ....I 'LIMITNUM,'LIMITDTO,'LIMITDFM S OK=1 Q
25 ....S OK=0
26 ....I LIMITNUM D Q
27 .....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=1 Q
28 ....I 'LIMITDTO,'LIMITDFM S OK=1 Q
29 ....S DATEO=$P(^FSCD("CALL",CALL,0),U,3)
30 ....I DATEO'<LIMITDTO,DATEO'>LIMITDFM S OK=1
31 .I OK D SETUP^FSCRPCA(CALL,.COUNT)
32 D OUTPUT^FSCRPCA
33 Q
34 ;
35CALLS(IN,OUT) ; from FSCRPX (RPCSelectCalls)
36 N CALL,LNUM,NUM
37 K ^TMP("FSC CURRENT LIST",$J)
38 S LNUM=0
39 S NUM=0 F S NUM=$O(^TMP("FSCRPC",$J,"INPUT",NUM)) Q:NUM<1 S CALL=+$G(^(NUM)) D
40 .S LNUM=LNUM+1
41 .S (^TMP("FSCRPC",$J,"OUTPUT",LNUM),^TMP("FSC CURRENT LIST",$J,LNUM+1000))=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)
42 .S ^TMP("FSC CURRENT LIST",$J,"C",CALL)=LNUM+1000
43 Q
Note: See TracBrowser for help on using the repository browser.