source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCLML.m@ 1638

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1FSCLML ;SLC/STAFF-NOIS List Manager - List ;1/13/98 12:36
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4ENTRY ; from list template - entry code, FSCLMPC, FSCLMPNF, FSCLMPQQ, FSCLMPQU, FSCRPTS
5 N CALL,DATEO,LIMIT,LIMITOK,LISTCALL,LNUM,SOURCE,TIME
6 K ^TMP("FSC LIST CALLS",$J)
7 S FSCLIMIT=$S($G(FSCLIMIT):FSCLIMIT,1:"1^"_$$MAXCALL^FSCUP)
8 S (LIMIT,LNUM,VALMCNT)=0,FSCUD=$$USERDEF^FSCU(DUZ),VALMCAP=$$CAP^FSCU("L")
9 I '$G(FSCDEV) W !
10 I '$G(FSCQUERY) D
11 .I $E(FSCLNAME,1,4)="MRE:" D Q
12 ..S TIME="" F S TIME=$O(^FSCD("MRE","AUTC",FSCINDX,TIME)) Q:TIME="" D Q:LIMIT
13 ...S CALL=0 F S CALL=$O(^FSCD("MRE","AUTC",FSCINDX,TIME,CALL)) Q:CALL<1 D SETUP Q:LIMIT
14 .I $E(FSCLNAME,1,4)="MRA:" D Q
15 ..S TIME="" F S TIME=$O(^FSCD("MRA","AUTC",FSCINDX,TIME)) Q:TIME="" D Q:LIMIT
16 ...S CALL=0 F S CALL=$O(^FSCD("MRA","AUTC",FSCINDX,TIME,CALL)) Q:CALL<1 D SETUP Q:LIMIT
17 .I $L($P(FSCL0,U,4)) D Q
18 ..S SOURCE="^FSCD(""CALL"","_$P(FSCL0,U,4)_$S($G(FSCINDX):","_FSCINDX,1:"")_")"
19 ..S CALL="A" F S CALL=$O(@SOURCE@(CALL),-1) Q:CALL<1 D SETUP Q:LIMIT I (VALMCNT#10)=0 D CHECK(.VALMQUIT) I $D(VALMQUIT) Q
20 .I $P(FSCL0,U,3)="M" D Q
21 ..D MANUAL^FSCLP(FSCLNUM)
22 ..S CALL="A" F S CALL=$O(^TMP("FSC LIST",$J,CALL),-1) Q:CALL<1 D SETUP Q:LIMIT I (VALMCNT#10)=0 D CHECK(.VALMQUIT) I $D(VALMQUIT) Q
23 .S LISTCALL="A" F S LISTCALL=$O(^FSCD("LISTS","L",FSCLNUM,LISTCALL),-1) Q:LISTCALL<1 D Q:LIMIT I (VALMCNT#10)=0 D CHECK(.VALMQUIT) I $D(VALMQUIT) Q
24 ..S CALL=+$G(^FSCD("LISTS",LISTCALL,0)) D SETUP
25 I $G(FSCQUERY) S CALL="A" F S CALL=$O(^TMP("FSC LIST",$J,CALL),-1) Q:CALL<1 D SETUP Q:LIMIT I (VALMCNT#10)=0 D CHECK(.VALMQUIT) I $D(VALMQUIT) Q
26 I $D(VALMQUIT) S FSCQUERY=0 Q
27 I $G(FSCLIMIT),FSCLNAME'["(MODIFIED)",LNUM=$P(FSCLIMIT,U,2)!$P(FSCLIMIT,U,3) S FSCLNAME=FSCLNAME_" (MODIFIED)"
28 S ^TMP("FSC LIST CALLS",$J)=LNUM_U_VALMCNT
29 D EMPTY^FSCLMPQU
30 S FSCQUERY=0
31 Q
32 ;
33SETUP ; from FSCUS
34 I $G(FSCLIMIT) S LIMITOK=1 D Q:'LIMITOK
35 .I $P(FSCLIMIT,U,2) D Q
36 ..I LNUM'<$P(FSCLIMIT,U,2) S LIMIT=1,LIMITOK=0 W !,"List is restricted to ",$P(FSCLIMIT,U,2)," entries.",$C(7) H 2
37 .S DATEO=$P(^FSCD("CALL",CALL,0),U,3)
38 .I DATEO<$P(FSCLIMIT,U,3) S LIMITOK=0 Q
39 .I DATEO>$P(FSCLIMIT,U,4) S LIMITOK=0 Q
40 S LNUM=LNUM+1,VALMCNT=VALMCNT+1
41 S ^TMP("FSC LIST CALLS",$J,VALMCNT,0)=$$SHORT^FSCGETS(CALL,LNUM)
42 S ^TMP("FSC LIST CALLS",$J,"IDX",LNUM,VALMCNT)=""
43 S ^TMP("FSC LIST CALLS",$J,"CX",CALL)=""
44 S ^TMP("FSC LIST CALLS",$J,"ICX",VALMCNT,CALL)=""
45 I $D(^TMP("FSC LIST CLEANUP",$J,CALL)) D
46 .S VALMCNT=VALMCNT+1
47 .S ^TMP("FSC LIST CALLS",$J,VALMCNT,0)=" "_^TMP("FSC LIST CLEANUP",$J,CALL)
48 Q
49 ;
50CHECK(VALMQUIT) ; from FSCLMPQA, FSCLMPQR, FSCLMPQS, FSCUS
51 I $G(FSCDEV) Q
52 I 'VALMCNT Q
53 N X
54 W "." K VALMQUIT
55 R X:0 I $T,X=U D
56 .N DIR,X,Y K DIR
57 .S DIR(0)="YAO",DIR("A")="Do you want to stop this action? ",DIR("B")="NO"
58 .S DIR("?",1)="Enter YES to stop processing this action."
59 .S DIR("?",2)="NOTE: stopping this process will not preserve your previous screen."
60 .S DIR("?",3)="Enter NO or '^' to continue processing."
61 .S DIR("?")="^D HELP^FSCU(.DIR)"
62 .S DIR("??")="FSC U 1 NOIS"
63 .D ^DIR K DIR
64 .I Y=1 S VALMQUIT=1
65 Q
66 ;
67HEADER ; from list template - header code, FSCLMPC, FSCLMPNF, FSCLMPQU
68 S VALMHDR(1)=$$SETSTR^VALM1("# of calls: "_+^TMP("FSC LIST CALLS",$J),"List: "_FSCLNAME,62,18)
69 Q
70 ;
71EXIT ; from list template - exit code
72 D CLEAR^VALM1
73 K ^TMP("FSC LIST",$J)
74 K ^TMP("FSC LIST CALLS",$J)
75 K ^TMP("FSC SELECT",$J)
76 K ^TMP("FSC STATS",$J)
77 Q
78 ;
79HELP ; from list template - help code
80 I $G(X)'["?" Q
81 S VALMBCK="R"
82 N XQH
83 I X="?" S XQH="FSC MENU LIST" D EN^XQH Q
84 I X="???" S VALMANS="?" D CLEAR^VALM1 S XQH="FSC U1 NOIS" D EN^XQH Q
85 Q
Note: See TracBrowser for help on using the repository browser.