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

LRHYLS1.m

Go to the documentation of this file.
LRHYLS1 ;DALOI/HOAK - DISPLAY ORDERS 9/27/2005 ;10/15/10 11:25am
 ;;5.2;LAB SERVICE;**405,417**;Sep 27, 1994;Build 1
 ;
LST1 ;
 Q:$G(LRKUNKE)=1
 D CHKPAGE
 Q:$G(LRSTOP)=1
 S LRDX=^LRO(68,LRAA,1,LRAD,1,LRAN,0),LRCE=$S($D(^(.1)):^(.1),1:""),LRACC=$S($D(^(.2)):^(.2),1:"")
 Q:'$D(^LR(+LRDX,0))#2
 S LRDPF=$P(^LR(+LRDX,0),U,2),DFN=$P(^(0),U,3)
 D PT^LRX
 S (LRDLA,LRDLC,LRACO)=""
 I $D(^LRO(68,LRAA,1,LRAD,1,LRAN,3)) S Y=^(3),LRDLA=$P(Y,U,3),LRACO=$P(Y,U,6),Y=$P(Y,U) D
 . D:Y DD^LRX S LRDLC=Y,Y=LRDLA D:Y DD^LRX S LRDLA=Y
 S Y=$P(LRDX,U,4) D:Y DD^LRX S LRDTO=Y
 ; Patient:_______________ SSN:_________ DOB:________ PROVIDER:
 S LN=$G(LN)+4
 D CHKPAGE
 Q:$G(LRSTOP)
 W !,"UID: ",?11,$G(^LRO(68,LRAA,1,LRAD,1,LRAN,.3))
 W !,"ACCESSION: ",$E(^LRO(68,LRAA,0),1,4)," ",$E(LRAD,4,7)," ",LRAN
 W !,"ORDER #: ",?11,LRCE
 S LRUID=$P(^LRO(68,LRAA,1,LRAD,1,LRAN,.3),U)
 D DASH^LRX
 D BUILD^LRHYT2
 W "Patient: ",$E(PNM,1,12)
 W ?22,"SSN: ",$P(SSN,"-",3)
 W ?33,"DOB: ",$$DTF^LRAFUNC1(DOB)
 S LRPRAC=+$P(LRDX,"^",8)
 W ?50,"PROVIDER: ",$S($D(^VA(200,LRPRAC,0)):$P(^(0),"^"),1:LRPRAC)
 D DASH^LRX
 QUIT
 S LN=$G(LN)+6
 D CHKPAGE
 Q:$G(LRSTOP)=1
 N PRAC,PR D PRAC^LR7OMERG(LRAA,LRAD,LRAN,.PRAC) I $O(PRAC(0)) S PR=0 F  S PR=$O(PRAC(PR)) Q:PR<1  I $D(^VA(200,PR,0)) W !?16,$P(^(0),"^")
 S X1=+$P(LRDX,U,4),X2=+$P(LRDX,U,5)
 I $D(^LRO(69,X1,1,X2,6)) D
 . W !,"  Order Comment:" S LN=LN+1
 . S LRHYI=0
 .  S LRNX0=$G(^LRO(69,X1,1,X2,0))
 . F  S LRHYI=$O(^LRO(69,X1,1,X2,6,LRHYI)) Q:LRHYI<1  I LRHYI>1 W !?11,^(LRHYI,0) S LN=LN+1 D CHKPAGE Q:$G(LRSTOP)
TSTCOM ;
 Q:$G(LRSTOP)
 S LRHYI=0
 F  S LRHYI=$O(^LRO(69,X1,1,X2,2,LRHYI)) Q:LRHYI<1  S X=^(LRHYI,0) I $P(X,"^",11) D
 . W !,"  CANCELLED TEST: ",$S($D(^LAB(60,+X,0)):$P(^(0),"^"),1:"UNKNOWN")
 . N LRURG S LRURG=+$P(X,U,2)
 . I LRURG=1!(LRURG=51) D FLASH
 . I LRURG=51 D FLASH
 . E  W " "_$E($S($D(^LAB(62.05,LRURG,0)):$P(^(0),U),1:"ROUTINE"),1,15)
 . W " by: "_$P(^VA(200,$P(X,"^",11),0),"^")
 . S LRHYI(2)=0 F  S LRHYI(2)=$O(^LRO(69,X1,1,X2,2,LRHYI,1.1,LRHYI(2))) Q:LRHYI(2)<1  I $D(^(LRHYI(2),0)) W !?3,": "_^(0) D CHKPAGE Q:$G(LRSTOP)
 I $L(LRACO) W !,"  Accession Comment: ",LRACO S LN=LN+1
 W:$L($P(LRDX,U,6,7))>1 !
 Q
FLASH ;
 I $G(LRURG)=1!(LRURG=51) D SCRNON^LRHYUTL W IOBON
 ;
 W ?20,$S($D(^LAB(62.05,+LRURG,0)):$P(^(0),U),1:"")," "
 ;
 I $G(LRURG)=1 W IOBOFF D SCRNOFF^LRHYUTL
 ;
 QUIT
CHKPAGE ;
 Q:$G(LRSTOP)!($D(ZTQUEUED))!($E(IOST,1,2)'="C-")
 Q:$G(LN)<(IOSL-2)
 K DIR
 S DIR(0)="E"
 D ^DIR
 I $D(DUOUT)!($D(DIRUT)) S LRSTOP=1 Q
 S LREND=$G(LRSTOP)
 S LN=1
 W !
 Q
LEDI ; print LEDI information
 D LEDI^LRWRKLS1
 Q