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

FSCRPCR.m

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