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

QAMAUTO5.m

Go to the documentation of this file.
QAMAUTO5 ;HISC/DAD-AUTO ENROLL MANUALLY QUEUE RUN ;9/14/92  11:26
 ;;1.0;Clinical Monitoring System;;09/13/1993
 K %ZIS,IOP S %ZIS="MQ" W ! D ^%ZIS G:POP EXIT I $D(IO("Q")) K IO("Q") S ZTDESC="Manually queued auto enroll run dates report",ZTRTN="ENTSK^QAMAUTO5",ZTSAVE("QAM*")="",ZTSAVE("QAQ*")="",ZTSAVE("^UTILITY($J,")="" D ^%ZTLOAD G EXIT
ENTSK ;
 U IO S QAMQUIT=0,PAGE=1,X="T",%DT="" D ^%DT X ^DD("DD") S TODAY=Y K UNDL S $P(UNDL,"-",80)="-" D HEAD
 I $O(^UTILITY($J,"QAMAUTO45",0))'>0 W !!,"NO DATA FOUND FOR THIS REPORT" G EXIT
 F QAMSTART=0:0 S QAMSTART=$O(^UTILITY($J,"QAMAUTO45",QAMSTART)) Q:QAMSTART'>0!QAMQUIT  D LOOP1
EXIT ;
 D ^%ZISC
 K DIR,PAGE,TODAY,UNDL,QA,QAMSTART,QAMQUIT,POP,^UTILITY($J,"QAMAUTO45")
 S:$D(ZTQUEUED) ZTREQ="@"
 Q
LOOP1 ;
 S QA=^UTILITY($J,"QAMAUTO45",QAMSTART),Y=+QA X ^DD("DD") S QA(1)=Y,Y=$P(QA,"^",2) X ^DD("DD") S QA(2)=Y,Y=$P(QA,"^",3) X ^DD("DD") S QA(3)=Y,QA(4)=$P(QA,"^",4) S:QA(4)]"" QA(4)=$J(QA(4),12,0)
 W !!,QA(1),?20,QA(2),?40,QA(3),?60,QA(4) I $Y>(IOSL-6) D:$E(IOST)="C" PAUSE Q:QAMQUIT  D:$O(^UTILITY($J,"QAMAUTO45",QAMSTART)) HEAD
 Q
PAUSE ;
 K DIR S DIR(0)="E" D ^DIR K DIR S QAMQUIT=$S(Y'>0:1,1:0)
 Q
 W:(PAGE>1)!($E(IOST)="C") @IOF
 W !!?21,"MANUALLY QUEUED AUTO ENROLL RUN DATES",?68,TODAY,!?QAQTART,QAQ2HED,?68,"PAGE: ",PAGE S PAGE=PAGE+1
 W !!,"START DATE",?20,"END DATE",?40,"QUEUED TO RUN",?61,"TASK NUMBER",!,UNDL
 Q