source: WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUTMTPD.m@ 1150

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

initial load of WorldVistAEHR

File size: 2.2 KB
RevLine 
[613]1XUTMTPD ;SEA/RDS - TaskMan: ToolKit, Print For Delete ;01/31/96 11:34
2 ;;8.0;KERNEL;**20**;Jul 10, 1995
3 ;
4SCHED ;Lookup Tasks In Schedule File
5 N DIR,X,Y,ZT,ZT1,ZT2,ZT3,ZT4,ZT5,ZT6,ZTF,ZTIOSL,ZTS
6 K ^TMP($J,"XUTMTPD"),ZTSK S X=0,ZTIOSL=$Y,ZTSK=0
7 S ZT1="" F S ZT1=$O(^%ZTSCH(ZT1)),ZT2="" Q:'ZT1 F S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2="" S ZTS=ZT2 D DISPLAY G QUIT:$D(DIRUT)
8 S ZT1="" F S ZT1=$O(^%ZTSCH("IO",ZT1)),ZT2="" Q:ZT1="" F S ZT2=$O(^%ZTSCH("IO",ZT1,ZT2)),ZT3="" Q:ZT2="" F S ZT3=$O(^%ZTSCH("IO",ZT1,ZT2,ZT3)) Q:ZT3="" S ZTS=ZT3 D DISPLAY G QUIT:$D(DIRUT)
9 S ZT1="" F S ZT1=$O(^%ZTSCH("JOB",ZT1)),ZT2="" Q:ZT1="" F S ZT2=$O(^%ZTSCH("JOB",ZT1,ZT2)) Q:ZT2="" S ZTS=ZT2 D DISPLAY G QUIT:$D(DIRUT)
10 S ZT1="" F S ZT1=$O(^%ZTSCH("LINK",ZT1)),ZT2="" Q:ZT1="" F S ZT2=$O(^%ZTSCH("LINK",ZT1,ZT2)),ZT3="" Q:ZT2="" F S ZT3=$O(^%ZTSCH("LINK",ZT1,ZT2,ZT3)) Q:ZT3="" S ZTS=ZT3 D DISPLAY G QUIT:$D(DIRUT)
11 ;
12TASK ;Lookup Unscheduled Tasks In Task File
13 S ZT1="" F S ZT1=$O(^TMP($J,"XUTMT",ZT1)) Q:ZT1="" D RANGE:$D(^(ZT1))=10 G QUIT:$D(^(ZT1))=10&X I $D(^TMP($J,"XUTMT",ZT1))=1,$D(^%ZTSK(ZT1)) S ZTS=ZT1 D DISPLAY G QUIT:$D(DIRUT)
14 I ZTSK W !
15 ;
16QUIT ;Cleanup And Quit
17 K ^TMP($J,"XUTMTPD") Q
18 ;
19RANGE ;TASK--Process A Range
20 S ZT3=ZT1,(ZT2,ZTS)=$O(^TMP($J,"XUTMT",ZT1,"")) I $D(^%ZTSK(ZTS)) D DISPLAY Q:X
21 F ZT=0:0 S ZTS=$O(^%ZTSK(ZTS)) Q:ZTS>ZT3!'ZTS D DISPLAY Q:X
22 Q
23 ;
24DISPLAY ;SUB--Add Either One Or Zero To The Count Of Scheduled Tasks In List
25 ;
26D2 ;First Screen By Whether Task Has Already Been Counted
27 I $D(^TMP($J,"XUTMTPD",ZTS))#2 Q
28 ;
29D5 ;Then Screen by Whether Task Is Within Range
30 I '$D(^TMP($J,"XUTMT",ZTS)) S ZT5=$O(^TMP($J,"XUTMT",ZTS)) Q:ZT5="" S ZT6=$O(^(ZT5,"")) Q:ZT6>ZTS!'ZT6
31 ;
32D8 ;Finally Screen By Whether User Has Authority To Select Task
33 N X
34 I 'ZTKEY S X=$G(^%ZTSK(ZTS,0)) I $S(X="":1,$P(X,U,11)_","_$P(X,U,12)=XUTMUCI:DUZ'=$P(X,U,3),1:ZTNAME'=$P(X,U,10)) Q
35 L
36 ;
37D12 ;Display And Count Tasks Not Screened Out
38 S ^TMP($J,"XUTMTPD",ZTS)="",ZTSK=ZTSK+1
39 N XUTMT,ZTSK S X=0,ZTF=0 D EN^XUTMTP(ZTS)
40 W !,"-------------------------------------------------------------------------------"
41 I $Y-ZTIOSL>18 S ZTF=1,ZTIOSL=0,DIR(0)="E" D ^DIR Q:$D(DIRUT) W @IOF
42 Q
43 ;
Note: See TracBrowser for help on using the repository browser.