1 | XUTMTA ;SEA/RDS - TaskMan: ToolKit, Select ;12/12/94 15:21
|
---|
2 | ;;8.0;KERNEL;;Jul 10, 1995
|
---|
3 | ;
|
---|
4 | SELECT ;Main Section--Select Task
|
---|
5 | N DDH,DIR,DIRUT,DTOUT,DUOUT,X,Y,ZT
|
---|
6 | F D SETUP,^DIR Q:+Y=Y!$D(DIRUT)
|
---|
7 | K XUTMT,ZTSK S ZTSK=$S($D(DIRUT):"",'$D(^%ZTSK(Y,0))&$D(^TMP($J,0,Y)):$G(^TMP($J,0,Y)),1:Y) Q
|
---|
8 | ;
|
---|
9 | ;
|
---|
10 | SETUP ;SELECT--Setup Reader Input Parameters
|
---|
11 | S DIR(0)="NAO^1:9999999999:0^D XFORM^XUTMTA"
|
---|
12 | S DIR("A")=$S($D(XUTMT("A"))#2:XUTMT("A"),1:"Select TASK: ")
|
---|
13 | S DIR("?")=$S($D(XUTMT("?"))#2:XUTMT("?"),1:"^D HELP1^XUTMTA")
|
---|
14 | S DIR("??")=$S($D(XUTMT("??"))#2:XUTMT("??"),1:"^D HELP2^XUTMTA") I DIR("??")="@" K DIR("??")
|
---|
15 | I $D(XUTMT("B"))#2 S DIR("B")=XUTMT("B")
|
---|
16 | I $D(DTIME)[0 S DIR("T")=60
|
---|
17 | Q
|
---|
18 | ;
|
---|
19 | ;XFORM--Does task have an intact ^%ZTSK(#,0)
|
---|
20 | XFORM ;SELECT--Input Transform
|
---|
21 | I '$D(%ZTSK(X)),$D(^TMP($J,0,X)) S X=$G(^TMP($J,0,X)) ;Use index to get task number.
|
---|
22 | I '$D(^%ZTSK(X)),'$D(^%ZTSCH("TASK",X)) W !!?5,"Task # ",X," is not defined in this volume set's Task File." K X Q
|
---|
23 | I $D(^%ZTSK(X,0))[0,'$D(^%ZTSCH("TASK",X)) W !!?5,"While a record does exist for this task, most of the critical data is",!?5,"missing. Please select a different task." K X Q
|
---|
24 | I XUTMT(0)["U",$S($D(^%ZTSK(X,0))[0:0,1:$P(^(0),U,3)'=DUZ)!$S($D(^%ZTSCH("TASK",X))[0:0,$P(^(X),U,9)=DUZ:0,1:$P(^(X),U,9)'=ZTNAME) W !!?5,"You may only select a task that you created. Please select a different",!?5,"task." K X Q
|
---|
25 | W:$D(^%ZTSK(X,0))#2 " ",$S($G(^(.03))]"":$E(^(.03),1,75),1:$P(^(0),U,1,2))
|
---|
26 | W:$D(^%ZTSK(X,0))[0&($D(^%ZTSCH("TASK",X))#2) " ",$P(^%ZTSCH("TASK",X),U,1,2)
|
---|
27 | Q
|
---|
28 | ;
|
---|
29 | HELP1 ;SELECT--Default Help For '?'
|
---|
30 | W !!?5,"Select a task by its internal number: an integer between 1 and 999999999."
|
---|
31 | I $D(^TMP($J,0)) W !,"Or by the Index number."
|
---|
32 | Q
|
---|
33 | ;
|
---|
34 | HELP2 ;SELECT--Default Help For '??'
|
---|
35 | D HELP1
|
---|
36 | N DIR,DDH,DIRUT,DTOUT,DUOUT,X,Y D ^XUTMQ
|
---|
37 | Q
|
---|
38 | ;
|
---|