source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LROR2.m@ 632

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1LROR2 ;SLC/BA,DCM - PRINT THE DATA FOR OR REPORTS ;3/29/90 16:43 ;
2 ;;5.2;LAB SERVICE;;Sep 27, 1994
3 ;from LROR1
4PRINT ;;
5 S LRAAO=0 F I=0:0 S LRAAO=$O(^TMP("LR",$J,"TP",LRAAO)) Q:LRAAO="" D ORDER Q:LREND
6 K ^TMP("LR",$J,"TP")
7 Q
8ORDER S LRCDT=0 F I=0:0 S LRCDT=$O(^TMP("LR",$J,"TP",LRAAO,LRCDT)) Q:LRCDT="" D TEST Q:LREND
9 Q
10TEST 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)
11 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
12 Q:'$P(LR0,U,3)
13 S LRSPEC=+$P(LR0,U,5),X=$P(LR0,U,10) D DOC^LRX
14 I $Y+LRTC+3>IOSL D C1 Q:LREND
15 S Y=LRCDT D DD^LRX W !,?30,Y
16 D HEAD
17 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
18 Q:LREND
19 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
20 W ! Q
21DATA 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=""
22 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
23 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))
24 S @("LRLO="_$S($L(LRLO):LRLO,1:"""""")),@("LRHI="_$S($L(LRHI):LRHI,1:""""""))
25 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
26 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
27 Q
28CONT Q:$Y+4'>IOSL D C1,HEAD:'LREND
29 Q
30C1 F I=$Y:1:IOSL-5 W !
31 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
32 D EXT^ORUHDR Q:LREND W !?20,">> CONTINUATION OF ",$P(LR0,U,6)," <<",!
33 Q
34HEAD W !?5,"Test name",?30,"Result units",?51,"Ref. range"
35 Q
Note: See TracBrowser for help on using the repository browser.