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

FSCRPCS.m

Go to the documentation of this file.
FSCRPCS ;SLC/STAFF-NOIS RPC Select ;1/29/98  22:50
 ;;1.1;NOIS;;Sep 06, 1998
 ;
LISTS(IN,OUT) ; from FSCRPX (RPCSelectLists)
 N CALL,CALLX,CNT,COUNT,DATEO,INDX,INPUT,LIMITDFM,LIMITDTO,LIMITNUM,LIST,LISTNUM,LNAME,LNUM,NUM,OK,RLIST,ROK,TIME
 K ^TMP("FSC MERGE",$J) S COUNT=0
 S LNUM=0 F  S LNUM=$O(^TMP("FSC CURRENT LIST",$J,LNUM)) Q:LNUM<1  S CALL=+^(LNUM) D
 .S ^TMP("FSC MERGE",$J,LNUM,CALL)=""
 K ^TMP("FSC CURRENT LIST",$J)
 S LNUM=0 F  S LNUM=$O(^TMP("FSC MERGE",$J,LNUM)) Q:LNUM<1  S CALL=$O(^(LNUM,0)) D
 .S OK=0,LISTNUM=0 F  S LISTNUM=$O(^TMP("FSCRPC",$J,"INPUT",LISTNUM)) Q:LISTNUM<1  S INPUT=^(LISTNUM) D  I OK Q
 ..S LIST=+INPUT,INDX=+$P(INPUT,U,2),LIMITNUM=$P(INPUT,U,3),LIMITDTO=$P(INPUT,U,4),LIMITDFM=$P(INPUT,U,5)
 ..I 'LIST Q
 ..D LIST^FSCRPCA(LIST,INDX,.RLIST,.ROK) I 'ROK Q
 ..S LNAME=$P(^FSC("LIST",LIST,0),U)
 ..I LNAME="MRE:" D
 ...S TIME="" F  S TIME=$O(^FSCD("MRE","AUTC",INDX,TIME)) Q:TIME=""  D  I OK Q
 ....S CALLX=0 F  S CALLX=$O(^FSCD("MRE","AUTC",INDX,TIME,CALLX)) Q:CALLX<1  I CALLX=CALL S OK=1 Q
 ..E  I LNAME="MRA:" D
 ...S TIME="" F  S TIME=$O(^FSCD("MRA","AUTC",INDX,TIME)) Q:TIME=""  D  I OK Q
 ....S CALLX=0 F  S CALLX=$O(^FSCD("MRA","AUTC",INDX,TIME,CALLX)) Q:CALLX<1  I CALLX=CALL S OK=1 Q
 ..E  D
 ...I $D(@RLIST@(CALL)) D
 ....I 'LIMITNUM,'LIMITDTO,'LIMITDFM S OK=1 Q
 ....S OK=0
 ....I LIMITNUM D  Q
 .....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
 ....I 'LIMITDTO,'LIMITDFM S OK=1 Q
 ....S DATEO=$P(^FSCD("CALL",CALL,0),U,3)
 ....I DATEO'<LIMITDTO,DATEO'>LIMITDFM S OK=1
 .I OK D SETUP^FSCRPCA(CALL,.COUNT)
 D OUTPUT^FSCRPCA
 Q
 ;
CALLS(IN,OUT) ; from FSCRPX (RPCSelectCalls)
 N CALL,LNUM,NUM
 K ^TMP("FSC CURRENT LIST",$J)
 S LNUM=0
 S NUM=0 F  S NUM=$O(^TMP("FSCRPC",$J,"INPUT",NUM)) Q:NUM<1  S CALL=+$G(^(NUM)) D
 .S LNUM=LNUM+1
 .S (^TMP("FSCRPC",$J,"OUTPUT",LNUM),^TMP("FSC CURRENT LIST",$J,LNUM+1000))=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)
 .S ^TMP("FSC CURRENT LIST",$J,"C",CALL)=LNUM+1000
 Q