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

LROR2.m

Go to the documentation of this file.
LROR2 ;SLC/BA,DCM - PRINT THE DATA FOR OR REPORTS ;3/29/90  16:43 ;
 ;;5.2;LAB SERVICE;;Sep 27, 1994
 ;from LROR1
PRINT ;;
 S LRAAO=0 F I=0:0 S LRAAO=$O(^TMP("LR",$J,"TP",LRAAO)) Q:LRAAO=""  D ORDER Q:LREND
 K ^TMP("LR",$J,"TP")
 Q
ORDER S LRCDT=0 F I=0:0 S LRCDT=$O(^TMP("LR",$J,"TP",LRAAO,LRCDT)) Q:LRCDT=""  D TEST Q:LREND
 Q
TEST S LRIDT=9999999-LRCDT,LRSS=$P(^TMP("LR",$J,"TP",LRAAO),U,2),LR0=$S($D(^(LRAAO,LRCDT))#2:^(LRCDT),1:""),LRTC=$P(LR0,U,12)
 I LRSS="MI" S LRH=1,(LRONETST,LRONESPC)="",LREND=0 D EN^LROR4 S LRHF=1 K A,Z,LRH,LRONETST,LRONESPC S:LREND LREND=0,LREND=1 Q
 Q:'$P(LR0,U,3)
 S LRSPEC=+$P(LR0,U,5),X=$P(LR0,U,10) D DOC^LRX
 I $Y+LRTC+3>IOSL D C1 Q:LREND
 S Y=LRCDT D DD^LRX W !,?30,Y
 D HEAD
 S LRPO=0 F I=0:0 S LRPO=$O(^TMP("LR",$J,"TP",LRAAO,LRCDT,LRPO)) Q:LRPO=""  I $D(^(LRPO))#2 S LRDATA=^(LRPO) D DATA Q:LREND
 Q:LREND
 I $D(^TMP("LR",$J,"TP",LRAAO,LRCDT,"C")) W !,"Comment: " S LRCMNT=0 F I=0:0 S LRCMNT=+$O(^TMP("LR",$J,"TP",LRAAO,LRCDT,"C",LRCMNT)) Q:LRCMNT<1  W ^(LRCMNT) W:$O(^(LRCMNT)) !?9 D CONT Q:LREND
 W ! Q
DATA S LRTSTS=+LRDATA,LRPC=$P(LRDATA,U,5),LRSUB=$P(LRDATA,U,6),X=$P(LRDATA,U,7),LRFFLG=$P(LRDATA,U,8) Q:X=""
 W !?5,$S($L($P(LRDATA,U,2))>20:$P(LRDATA,U,3),1:$P(LRDATA,U,2)),?27,@$S(LRPC="":"$J(X,LRCW)",1:LRPC)," ",LRFFLG
 S X=$S($D(^LAB(60,LRTSTS,1,LRSPEC,0)):^(0),1:"") Q:'$L(X)  S LRTHER=$S($L($P(X,U,11,12))>1:1,1:0) S LRLO=$S(LRTHER:$P(X,U,11),1:$P(X,U,2)),LRHI=$S(LRTHER:$P(X,U,12),1:$P(X,U,3))
 S @("LRLO="_$S($L(LRLO):LRLO,1:"""""")),@("LRHI="_$S($L(LRHI):LRHI,1:""""""))
 W ?38,"  ",$P(X,U,7),?51,$J(LRLO,4),$S($L(LRHI):" - "_$J(LRHI,4),1:""),?63,$S(LRTHER:"(Ther. range)",1:"") D CONT Q:LREND
 I $O(^TMP("LR",$J,"TP",LRAAO,LRCDT,LRPO,0))>0 S LRINTP=0 F I=0:0 S LRINTP=+$O(^TMP("LR",$J,"TP",LRAAO,LRCDT,LRPO,LRINTP)) Q:LRINTP<1  W !?7,"Eval: ",^(LRINTP) D CONT Q:LREND
 Q
CONT Q:$Y+4'>IOSL  D C1,HEAD:'LREND
 Q
C1 F I=$Y:1:IOSL-5 W !
 W !?(IOM-26),"Continued on next page..." I IOST["C-" W !!,"Press return to continue or ""^"" to escape " R X:DTIME S:X="^^" DIROUT=1 I '$T!(X["^") S (OREND,LREND)=1 Q
 D EXT^ORUHDR Q:LREND  W !?20,">> CONTINUATION OF ",$P(LR0,U,6)," <<",!
 Q
 Q