ORSLTR ; slc/RWF - Print Big Letters ;4/30/92 14:47 ;
;;3.0;ORDER ENTRY/RESULTS REPORTING;**23**;Dec 17, 1997
Q:'$L($G(ORSLTR)) I '$D(^UTILITY("ORSLTR",$J,"A")) D ^ORSLTR2
B1 ; Setup for banner print
N ORSDIV,ORSLEN,ORSXXX,ORSBLNK,X
S ORSLEN=$L(ORSLTR),ORSDIV=60\ORSLEN,$P(ORSXXX,"X",(ORSDIV\5+1))=""
S $P(ORSBLNK," ",(ORSDIV\5+1))=""
S ORSLTY=$E(ORSLTR,1,$S(ORSLEN'>2:ORSLEN,1:(IOM\ORSDIV-1))),ORSLTX=""
F ORSLT1=1:1:$L(ORSLTY) D
. I $A(ORSLTY,ORSLT1)>32,$D(^UTILITY("ORSLTR",$J,$E(ORSLTY,ORSLT1))) D
. . S ORSLTX=ORSLTX_$E(ORSLTY,ORSLT1)
W:$E($G(IOST),1,2)="C-" @IOF
I $D(ORTIT) W ?(IOM-$L(ORTIT)\2),ORTIT,!
I $D(ORSPNM) W ?10,"Patient: ",ORSPNM,!
I $D(ORSWDN) W "Hospital Location: ",ORSWDN,!
I $D(DUZ) W ?13,"User: ",$P($G(^VA(200,DUZ,0)),U),!
W ! F ORSLT=1:1:4 D B2
W:$E($G(IOST),1,2)'="C-" @IOF K ORSLT1,ORSLT2,ORSLT3,ORSLTX,ORSLTY,ORSLT,^UTILITY("ORSLTR",$J) Q
B2 W !
F ORSLT1=9:-1:1 W ! F ORSLT3=1:1:$L(ORSLTX) S X=^UTILITY("ORSLTR",$J,$E(ORSLTX,ORSLT3)) W " " F ORSLT2=1:1:5 W $S($E(X,(ORSLT2-1*9+ORSLT1)):ORSXXX,1:ORSBLNK)
Q
ORSLTR ; slc/RWF - Print Big Letters ;4/30/92 14:47 ;
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**23**;Dec 17, 1997
+2 IF '$LENGTH($GET(ORSLTR))
QUIT
IF '$DATA(^UTILITY("ORSLTR",$JOB,"A"))
DO ^ORSLTR2
B1 ; Setup for banner print
+1 NEW ORSDIV,ORSLEN,ORSXXX,ORSBLNK,X
+2 SET ORSLEN=$LENGTH(ORSLTR)
SET ORSDIV=60\ORSLEN
SET $PIECE(ORSXXX,"X",(ORSDIV\5+1))=""
+3 SET $PIECE(ORSBLNK," ",(ORSDIV\5+1))=""
+4 SET ORSLTY=$EXTRACT(ORSLTR,1,$SELECT(ORSLEN'>2:ORSLEN,1:(IOM\ORSDIV-1)))
SET ORSLTX=""
+5 FOR ORSLT1=1:1:$LENGTH(ORSLTY)
Begin DoDot:1
+6 IF $ASCII(ORSLTY,ORSLT1)>32
IF $DATA(^UTILITY("ORSLTR",$JOB,$EXTRACT(ORSLTY,ORSLT1)))
Begin DoDot:2
+7 SET ORSLTX=ORSLTX_$EXTRACT(ORSLTY,ORSLT1)
End DoDot:2
End DoDot:1
+8 IF $EXTRACT($GET(IOST),1,2)="C-"
WRITE @IOF
+9 IF $DATA(ORTIT)
WRITE ?(IOM-$LENGTH(ORTIT)\2),ORTIT,!
+10 IF $DATA(ORSPNM)
WRITE ?10,"Patient: ",ORSPNM,!
+11 IF $DATA(ORSWDN)
WRITE "Hospital Location: ",ORSWDN,!
+12 IF $DATA(DUZ)
WRITE ?13,"User: ",$PIECE($GET(^VA(200,DUZ,0)),U),!
+13 WRITE !
FOR ORSLT=1:1:4
DO B2
+14 IF $EXTRACT($GET(IOST),1,2)'="C-"
WRITE @IOF
KILL ORSLT1,ORSLT2,ORSLT3,ORSLTX,ORSLTY,ORSLT,^UTILITY("ORSLTR",$JOB)
QUIT
B2 WRITE !
+1 FOR ORSLT1=9:-1:1
WRITE !
FOR ORSLT3=1:1:$LENGTH(ORSLTX)
SET X=^UTILITY("ORSLTR",$JOB,$EXTRACT(ORSLTX,ORSLT3))
WRITE " "
FOR ORSLT2=1:1:5
WRITE $SELECT($EXTRACT(X,(ORSLT2-1*9+ORSLT1)):ORSXXX,1:ORSBLNK)
+2 QUIT