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

FSCRPCLO.m

Go to the documentation of this file.
FSCRPCLO ;SLC/STAFF-NOIS RPC List Organizer ;4/20/98  13:29
 ;;1.1;NOIS;;Sep 06, 1998
 ;
LOADLIST(IN,OUT) ; from FSCRPX (RPCLoadCurrentList)
 N CALL,CNT,LINE,LNUM
 S CNT=0
 S LNUM=0 F  S LNUM=$O(^TMP("FSC CURRENT LIST",$J,LNUM)) Q:LNUM<1  S CALL=+^(LNUM) D
 .S CNT=CNT+1
 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=CALL_U_$$TEXTID(CALL)
 Q
 ;
RENAME(IN,OUT) ; from FSCRPX (RPCRenameList)
 N DA,DATA,DIE,DR,LIST,NAME,X,Y
 S DATA=$G(^TMP("FSCRPC",$J,"INPUT",1))
 S LIST=+DATA,NAME=$P(DATA,U,2)
 I '$D(^FSC("LIST",LIST,0)) Q
 I $L(NAME)<3 Q
 S DA=LIST,DIE="^FSC(""LIST"",",DR=".01///"_$$FIX^FSCRPCEC($E(NAME,1,30))
 D ^DIE
 Q
 ;
UPLIST(IN,OUT) ; from FSCRPX (RPCUpdateCurrentList)
 N CNT,LINE,LNUM
 S CNT=0
 S LNUM=0 F  S LNUM=$O(^TMP("FSC CURRENT LIST",$J,LNUM)) Q:LNUM<1  S LINE=^(LNUM) D
 .S CNT=CNT+1
 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
 Q
 ;
DELLIST(IN,OUT) ; from FSCRPX (RPCDeleteList)
 N CALL,DA,DIE,DIK,DR,LISTNUM,LISTSNUM,SPEC
 S LISTNUM=+$G(^TMP("FSCRPC",$J,"INPUT",1))
 I '$D(^FSC("LIST","C",DUZ,LISTNUM)) Q
 S CALL=0 F  S CALL=$O(^FSCD("LISTS","ALC",LISTNUM,CALL)) Q:CALL<1  S LISTSNUM=+$O(^(CALL,0)) I LISTSNUM D DELETE^FSCLMPS(LISTSNUM)
 S DIE=7105.2,DR="9///@"
 S SPEC=0 F  S SPEC=$O(^FSC("SPEC","AL",LISTNUM,SPEC)) Q:SPEC<1  D
 .S DA=SPEC
 .L +^FSC("SPEC",SPEC):30
 .D ^DIE
 .L -^FSC("SPEC",SPEC)
 N DA,DIK,NOTIFY
 S DIK="^FSCD(""NOTIFY"","
 S NOTIFY=0 F  S NOTIFY=$O(^FSCD("NOTIFY","ALIST",LISTNUM,NOTIFY)) Q:NOTIFY<1  D
 .S DA=NOTIFY
 .L +^FSCD("NOTIFY",NOTIFY):30
 .D ^DIK
 .L -^FSCD("NOTIFY",NOTIFY)
 D DELMRU^FSCLDR(LISTNUM)
 S DA=LISTNUM,DIK="^FSC(""LIST""," D ^DIK
 Q
 ;
DUPCALL(IN,OUT) ; from FSCRPX (RPCDuplicateOfCall)
 Q
 ;
LOADTREE(IN,OUT) ; from FSCRPX (RPCLoadTree)
 N CALL,CNT,LIST,LISTNAME
 S CNT=0
 S LIST=0 F  S LIST=$O(^FSC("LIST","C",DUZ,LIST)) Q:LIST<1  D
 .Q:$P($G(^FSC("LIST",LIST,0)),U,3)'="S"  S LISTNAME=$P(^(0),U)
 .S CNT=CNT+1
 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LIST_"^-1^"_LISTNAME
 .S CALL="" F  S CALL=$O(^FSCD("LISTS","ALC",LIST,CALL),-1) Q:CALL=""  D
 ..S CNT=CNT+1
 ..S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LIST_U_CALL_U_$$TEXTID(CALL)
 Q
 ;
TEXTID(CALL) ; $$(call) -> text for tree display
 Q $P(^FSCD("CALL",CALL,0),U)_"  "_$G(^FSCD("CALL",CALL,1))
 ;
SAVELIST(IN,OUT) ; from FSCRPX (RPCSaveOrganizer)
 N CALL,LINE,LIST,LNUM,NUM,SCALL,SLIST K SLIST
 D KILLLIST^FSCRPCL
 S LNUM=0
 S NUM=0 F  S NUM=$O(^TMP("FSCRPC",$J,"INPUT",NUM)) Q:NUM<1  S LINE=^(NUM) I $L(LINE) D
 .S LIST=$P(LINE,U),CALL=$P(LINE,U,2)
 .I LIST="C" D  Q
 ..S LNUM=LNUM+1
 ..S ^TMP("FSC CURRENT LIST",$J,LNUM+1000)=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)
 ..S ^TMP("FSC CURRENT LIST",$J,"C",CALL)=LNUM+1000
 .I '$D(^FSC("LIST","C",DUZ,LIST)) Q
 .I '$D(SLIST(LIST)) D
 ..S SLIST(LIST)=""
 ..S SCALL=0 F  S SCALL=$O(^FSCD("LISTS","ALC",LIST,SCALL)) Q:SCALL<1  S LISTSNUM=+$O(^(SCALL,0)) I LISTSNUM D DELETE^FSCLMPS(LISTSNUM)
 .I CALL>0,$D(^FSCD("CALL",CALL,0)) D ADD^FSCLMPS(CALL,LIST)
 K SLIST
 Q
 ;
TEST ;
 D LOADTREE(.IN,.OUT)
 Q