source: FOIAVistA/trunk/r/NOIS-FSC/FSCLMPQU.m@ 914

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1FSCLMPQU ;SLC/STAFF-NOIS List Manager Protocol Query Utility ;9/6/98 21:08
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4SETUP(VALMCNT,CALL) ; from FSCELL, FSCLMPQA, FSCLMPQR, FSCLMPQS
5 N LISTNUM
6 S VALMCNT=VALMCNT+1
7 S LISTNUM=1+$G(^TMP("FSC LIST CALLS",$J)),^($J)=LISTNUM_U_VALMCNT
8 S ^TMP("FSC LIST CALLS",$J,VALMCNT,0)=$$SHORT^FSCGETS(CALL,LISTNUM)
9 S ^TMP("FSC LIST CALLS",$J,"CX",CALL)=""
10 S ^TMP("FSC LIST CALLS",$J,"ICX",VALMCNT,CALL)=""
11 S ^TMP("FSC LIST CALLS",$J,"IDX",LISTNUM,VALMCNT)=""
12 I $D(^TMP("FSC LIST CLEANUP",$J,CALL)) D
13 .S VALMCNT=VALMCNT+1
14 .S ^TMP("FSC LIST CALLS",$J,VALMCNT,0)=" "_^TMP("FSC LIST CLEANUP",$J,CALL)
15 Q
16 ;
17COUNT(VALMCNT) ; from FSCELL, FSCLMPQA, FSCLMPQR, FSCLMPQS
18 N LISTNUM,LNUM
19 S (LISTNUM,LNUM)=0 F S LISTNUM=$O(^TMP("FSC LIST CALLS",$J,"IDX",LISTNUM)) Q:LISTNUM<1 S LNUM=LNUM+1
20 S ^TMP("FSC LIST CALLS",$J)=LNUM_U_VALMCNT
21 D HDR
22 Q
23 ;
24HDR ; from FSCLMPQA, FSCLMPQQ, FSCLMPQR
25 S:FSCLNAME'["(MODIFIED)" FSCLNAME=FSCLNAME_" (MODIFIED)" D HEADER^FSCLML
26 Q
27 ;
28LIST(RLISTS,LIMITS,OK) ; from FSCLMPQA, FSCLMPQR, FSCLMPQS
29 N FIELD0,INDX,LNAME,LNUM,RLIST
30 S OK=1 F D Q:'$L(OK)
31 .N FSCLIMIT,LIST
32 .D LIST^FSCULOOK(.LIST,.FSCLIMIT,.OK)
33 .I LIST<1!'OK S OK="" Q
34 .S LNUM=+LIST,LNAME=$P(LIST,U,2)
35 .S L0=^FSC("LIST",LNUM,0)
36 .S RLIST="^FSCD(""LISTS"",""ALC"","_LNUM_")"
37 .I $L($P(L0,U,4)),'$P(L0,U,5) S RLIST="^FSCD(""CALL"","_$P(L0,U,4)_")"
38 .I $P(L0,U,5) D Q:'$G(INDX)
39 ..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
40 ..S DIC(0)="AEMOQ",DIC("A")="Select "_$P(FIELD0,U,2)_": "
41 ..I $E(LNAME,1,4)="MRE:"!($E(LNAME,1,4)="MRA:") S DIC("A")=" Select User: ",DIC("B")=DUZ
42 ..D ^DIC K DIC Q:Y<1
43 ..S INDX=+Y,LNAME=LNAME_" "_$P(Y,U,2),RLIST="^FSCD(""CALL"","_$P(L0,U,4)_","_INDX_")"
44 ..I INDX S LIST=+LIST_"."_INDX
45 .I $P(L0,U,3)="M" D
46 ..S RLIST="^TMP(""FSC MLC"","_$J_","_LNUM_")"
47 ..D MANUAL^FSCLP(LNUM)
48 ..M ^TMP("FSC MLC",$J,LNUM)=^TMP("FSC LIST",$J)
49 ..K ^TMP("FSC LIST",$J)
50 .S LISTNUM=+LIST
51 .S RLISTS(LISTNUM)=RLIST,LIMITS(LISTNUM)=FSCLIMIT
52 .D MRU^FSCMR(DUZ,+$P(LISTNUM,"."),+$P(LISTNUM,".",2))
53 I '$L(OK) S OK=1
54 Q
55 ;
56QUERY(TYPE) ; from FSCLMPQA, FSCLMPQR, FSCLMPQS
57 N CALL,MSG S MSG=1
58 K ^TMP("FSC LIST",$J)
59 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
60 D BROWSE^FSCQB("",FSCLNAME,.VALMCNT,.MSG,TYPE)
61 S FSCQUERY=1 S:FSCLNAME'["(MODIFIED)" FSCLNAME=FSCLNAME_" (MODIFIED)"
62 K VALMQUIT D ENTRY^FSCLML I $D(VALMQUIT) S VALMBCK="Q" Q
63 D HEADER^FSCLML
64 Q
65 ;
66EMPTY ; from FSCLML, FSCLMPQA, FSCLMPQR, FSCLMPQS
67 I '^TMP("FSC LIST CALLS",$J),'$O(^($J,0)) D
68 .S ^TMP("FSC LIST CALLS",$J,1,0)=" "
69 .S ^TMP("FSC LIST CALLS",$J,2,0)=" No calls on list."
70 .S VALMCNT=2
71 Q
Note: See TracBrowser for help on using the repository browser.