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

LRRS13.m

Go to the documentation of this file.
LRRS13 ;SLC/DCM,BA/DALISC/FHS/DRH - INTERIM REPORT BY LOCATION (MANUAL QUEUE) ;2/19/91  11:39 ;
 ;;5.2;LAB SERVICE;;Sep 27, 1994
 ;EXTENSION OF LRRS12
DQ ;dequeued
 S LRHOLD=LRODT
 S:$D(ZTQUEUED) ZTREQ="@" U IO D @$S(LRLOC="S":"IT",LRLOC="R":"IT",1:"ALL")
END ;
 D ^LRRK
 K LRLOCXY,LRX1,LRY1,OK
 Q
CHKDAT ;
 S LRHOLD=LRODT
 S LRCHK=""
 F  S LRODT=$O(^LRO(69,LRODT)) Q:LRODT=""!(LRODT>LRLAST)  D
 .  I $O(^LRO(69,LRODT,1,"AL",LRCHK))="" D NORPT
 S LRODT=LRHOLD K LRHOLD
 Q
IT ;
 S LRHOLD=LRODT
 S LRLLOC=""
 F  S LRLLOC=$O(LRLLOC(LRLLOC)) Q:LRLLOC=""!($G(LREND))  D
 .  S LRODT=LRDTXX-.5
 .  D BIG
 .  S LRANY=0
 .  F  S LRODT=$O(^LRO(69,LRODT)) Q:LRODT=""!(LRODT>LRLAST)!($G(LREND))  D
 ..  I $D(^LRO(69,LRODT,1,"AL",LRLLOC)) D PROCESS S LRANY=1
 .  I '$G(LRANY) D NORPT QUIT
 Q
NORPT ;
 W !!!
 W !?10,"No Reports from: ",LRLLOC," for this date range."
 W @IOF
 Q
ALL ;
 S LREND=0
 S LRODT=LRDTXX-.5
 F  S LRODT=$O(^LRO(69,LRODT)) Q:+LRODT'>0!(LRODT>LRLAST)!($G(LREND))  D
 . S LRLLOC="",LRANY=0
 . F  S LRLLOC=$O(^LRO(69,LRODT,1,"AL",LRLLOC)) Q:LRLLOC=""!($G(LREND))  D
 ..  D BIG,PROCESS S LRANY=1
 Q:LRLLOC=""  I '$G(LRANY) D NORPT QUIT
 Q
BIG ;
 ;Q:$G(LRANY)
 S LRXY98Z=1
 S LRLTR=$S(LRLLOC="":"UNK",1:LRLLOC)
 W !!
 I $E(IOST,1,2)'="C-" D ^LRLTR
 ;D ^LRLTR W @IOF
 K LRXY98Z
 Q
PROCESS ;
 S LREDT=9999999-LRODT,LRSDT=LRODT+.5
 S LRJ0=1
 D LNAME
 Q:LREND
 K LRHOLD
 Q
LNAME ;
 Q:$G(LREND)
 S LRNAME=""
 F  S LRNAME=$O(^LRO(69,LRODT,1,"AL",LRLLOC,LRNAME)) Q:LRNAME=""!($G(LREND))  D
 . D PAT Q:LREND
 Q
PAT ;
 Q:$G(LREND)
 S LRDFN=0
 F  S LRDFN=+$O(^LRO(69,LRODT,1,"AL",LRLLOC,LRNAME,LRDFN)) Q:LRDFN<1!($G(LREND))  D
 . S LRIDT=9999999-LRSDT D DS^LRRP2 S:LRSTOP LREND=1 Q:$G(LREND)
 Q
SINGLE ;from option LRRS BY LOC
 S LRSINGLE=1,LRLOC="S" D BEGIN^LRRS12
 Q
SHOW ;Display possible choices of locations
 W !?10,"Select from: " S I="",LREND=0 F A=0:0 S I=$O(^LRO(69,LRODT,1,"AL",I)) Q:I=""  D:$Y>(IOSL-4) WAIT Q:LREND  W ?25,I,!
 K A S (LROK,LREND)=0 W ! Q
WAIT R !!?10,"Press RETURN to continue or '^' to exit: ",X:DTIME S:'$T!($E(X)="^") LREND=1 Q:LREND
 W @IOF,!!?10,"Select from: " Q