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

FSCLMPQU.m

Go to the documentation of this file.
FSCLMPQU ;SLC/STAFF-NOIS List Manager Protocol Query Utility ;9/6/98  21:08
 ;;1.1;NOIS;;Sep 06, 1998
 ;
SETUP(VALMCNT,CALL) ; from FSCELL, FSCLMPQA, FSCLMPQR, FSCLMPQS
 N LISTNUM
 S VALMCNT=VALMCNT+1
 S LISTNUM=1+$G(^TMP("FSC LIST CALLS",$J)),^($J)=LISTNUM_U_VALMCNT
 S ^TMP("FSC LIST CALLS",$J,VALMCNT,0)=$$SHORT^FSCGETS(CALL,LISTNUM)
 S ^TMP("FSC LIST CALLS",$J,"CX",CALL)=""
 S ^TMP("FSC LIST CALLS",$J,"ICX",VALMCNT,CALL)=""
 S ^TMP("FSC LIST CALLS",$J,"IDX",LISTNUM,VALMCNT)=""
 I $D(^TMP("FSC LIST CLEANUP",$J,CALL)) D
 .S VALMCNT=VALMCNT+1
 .S ^TMP("FSC LIST CALLS",$J,VALMCNT,0)="  "_^TMP("FSC LIST CLEANUP",$J,CALL)
 Q
 ;
COUNT(VALMCNT) ; from FSCELL, FSCLMPQA, FSCLMPQR, FSCLMPQS
 N LISTNUM,LNUM
 S (LISTNUM,LNUM)=0 F  S LISTNUM=$O(^TMP("FSC LIST CALLS",$J,"IDX",LISTNUM)) Q:LISTNUM<1  S LNUM=LNUM+1
 S ^TMP("FSC LIST CALLS",$J)=LNUM_U_VALMCNT
 D HDR
 Q
 ;
HDR ; from FSCLMPQA, FSCLMPQQ, FSCLMPQR
 S:FSCLNAME'["(MODIFIED)" FSCLNAME=FSCLNAME_" (MODIFIED)" D HEADER^FSCLML
 Q
 ;
LIST(RLISTS,LIMITS,OK) ; from FSCLMPQA, FSCLMPQR, FSCLMPQS
 N FIELD0,INDX,LNAME,LNUM,RLIST
 S OK=1 F  D  Q:'$L(OK)
 .N FSCLIMIT,LIST
 .D LIST^FSCULOOK(.LIST,.FSCLIMIT,.OK)
 .I LIST<1!'OK  S OK="" Q
 .S LNUM=+LIST,LNAME=$P(LIST,U,2)
 .S L0=^FSC("LIST",LNUM,0)
 .S RLIST="^FSCD(""LISTS"",""ALC"","_LNUM_")"
 .I $L($P(L0,U,4)),'$P(L0,U,5) S RLIST="^FSCD(""CALL"","_$P(L0,U,4)_")"
 .I $P(L0,U,5) D  Q:'$G(INDX)
 ..N DIC,FIELD0 K DIC S FIELD0=$G(^FSC("FLD",$P(L0,U,5),0)),DIC=+$P($P(FIELD0,U,3),"P",2) Q:'DIC
 ..S DIC(0)="AEMOQ",DIC("A")="Select "_$P(FIELD0,U,2)_": "
 ..I $E(LNAME,1,4)="MRE:"!($E(LNAME,1,4)="MRA:") S DIC("A")="  Select User: ",DIC("B")=DUZ
 ..D ^DIC K DIC Q:Y<1
 ..S INDX=+Y,LNAME=LNAME_" "_$P(Y,U,2),RLIST="^FSCD(""CALL"","_$P(L0,U,4)_","_INDX_")"
 ..I INDX S LIST=+LIST_"."_INDX
 .I $P(L0,U,3)="M" D
 ..S RLIST="^TMP(""FSC MLC"","_$J_","_LNUM_")"
 ..D MANUAL^FSCLP(LNUM)
 ..M ^TMP("FSC MLC",$J,LNUM)=^TMP("FSC LIST",$J)
 ..K ^TMP("FSC LIST",$J)
 .S LISTNUM=+LIST
 .S RLISTS(LISTNUM)=RLIST,LIMITS(LISTNUM)=FSCLIMIT
 .D MRU^FSCMR(DUZ,+$P(LISTNUM,"."),+$P(LISTNUM,".",2))
 I '$L(OK) S OK=1
 Q
 ;
QUERY(TYPE) ; from FSCLMPQA, FSCLMPQR, FSCLMPQS
 N CALL,MSG S MSG=1
 K ^TMP("FSC LIST",$J)
 S CALL=0 F  S CALL=$O(^TMP("FSC LIST CALLS",$J,"CX",CALL)) Q:CALL<1  S ^TMP("FSC LIST",$J,CALL,0)=CALL ;*** calls should be loaded with internal number of call
 D BROWSE^FSCQB("",FSCLNAME,.VALMCNT,.MSG,TYPE)
 S FSCQUERY=1 S:FSCLNAME'["(MODIFIED)" FSCLNAME=FSCLNAME_" (MODIFIED)"
 K VALMQUIT D ENTRY^FSCLML I $D(VALMQUIT) S VALMBCK="Q" Q
 D HEADER^FSCLML
 Q
 ;
EMPTY ; from FSCLML, FSCLMPQA, FSCLMPQR, FSCLMPQS
 I '^TMP("FSC LIST CALLS",$J),'$O(^($J,0)) D
 .S ^TMP("FSC LIST CALLS",$J,1,0)=" "
 .S ^TMP("FSC LIST CALLS",$J,2,0)="     No calls on list."
 .S VALMCNT=2
 Q