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

LROR4.m

Go to the documentation of this file.
LROR4 ;SLC/DCM - MICRO DETAILED DISPLAY ON ORDERS ;4/17/91  14:29 ;
 ;;5.2;LAB SERVICE;;Sep 27, 1994
 ;
EN ;from LROR2
 S LRLLT=^LR(LRDFN,"MI",LRIDT,0),LRACC=$P(LRLLT,U,6),LRAD=$E(LRLLT)_$P(LRACC," ",2)_"0000",X=$P(LRACC," "),DIC=68,DIC(0)="M"
 I $L(X) D ^DIC S LRAA=+Y,LRAN=+$P(LRACC," ",3),LRCMNT=$S($D(^LR(LRDFN,"MI",LRIDT,99)):^(99),1:""),LRPG=0 D A Q:LREND
 Q
A ;
 S LRSPEC=$P(LRLLT,U,5) I LRONESPC'="",LRSPEC'=LRONESPC Q
 D RPT
 K %,A8,A,AB,B,B1,B2,B3,C,DZ,IA,LR1PASS,LR2ORMOR,LRABCNT,LRACNT,LRADM,LRADX,LRAFS,LRAMT,LRAX,LRBN,LRBRR,LRBUG,LRCOMTAB,LRCS,LRDCOM,LRDOC,LRDRTM1,LRDRTM2,LREF,LRFLIP,LRFMT,LRGRM,LRHC,LRIFN,LRINT,LRPATLOC,LRMYC,LRNS,LRNUM
 K LRORG,LRPAR,LRPC,LRPRE,LRPRINT,LRQU,LRRC,LRRES,LRSBC1,LRSBC2,LRSET,LRSIC1,LRSIC2,LRSPEC,LRSSD,LRST,LRTA,LRTB,LRTBA,LRTBC,LRTBS,LRTK,LRTS,LRTSTS,LRTUS,LRUS,LRWRD,N
 Q
RPT S:'$D(LRSB) LRSB=0 S LRPRINT=$S($D(^LRO(68,LRAA,1,LRAD,1,LRAN,4)):"",1:1),LRHC=$S(IOST'["C-":1,1:0),LRFLIP=$S(LRHC:11,1:6)
 I $D(DUZ("AG")),$L(DUZ("AG")),"ARMYAFN"[DUZ("AG"),LRDPF=2 S LRFDT=9999999-LRIDT D REG^LRAC9 K LRFDT
 K DIC D DT^LRX S LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3) D PT^LRX S Y=DOB D:Y D^LRU S DOB=Y,LRPATLOC=$P(LRLLT,U,8)
 S (LRADM,LRADX)="",LRWRD=$S($D(LRWRD):LRWRD,1:"") I LRDPF=2 S N=$O(^DGPM("APID",DFN,0)) I N S N=$O(^(N,0)) I N S X=^DGPM(N,0) I $P(X,"^",14),$D(^DGPM($P(X,"^",14),0)) S X=^(0),Y=+X,LRADX=$P(^(0),"^",10) D:Y D^LRU S LRADM=Y ;MAS
 S LRCS=$S($D(^LAB(62,+$P(LRLLT,U,11),0)):$P(^(0),U),1:"")
 S LRTK=$P(LRLLT,U),LRRC=$P(LRLLT,U,10),LRST=$S(LRSPEC:$P(^LAB(61,LRSPEC,0),U),1:""),Y=LRTK D D^LRU S LRTK=Y,Y=LRRC D D^LRU S LRRC=Y
 S X=$P(LRLLT,U,7) D DOC^LRX
 K ^TMP("LR",$J,"T"),LRTSTS S LRBRR=0 F I=0:0 S LRBRR=+$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRBRR)) Q:LRBRR<1  D EN1
 I 'LRPRINT,LRONETST Q
 S LRPG=0 D HDR Q:LREND
 I $D(^TMP("LR",$J,"T")) W !?5,"Test(s) ordered:" S J="" F I=0:0 S J=$O(^TMP("LR",$J,"T",J)) Q:J=""  S X=^(J) W ?23,$P(X,U) S Y=$P(X,U,2) D:$L(Y) D^LRU W:$L(Y) ?43," completed: ",Y W !
 K ^TMP("LR",$J,"T"),LRTSTS W:LRHC !
 I $D(^LR(LRDFN,"MI",LRIDT,14)) D FH Q:LREND  D ANTI^LROR4A
 I $D(^LR(LRDFN,"MI",LRIDT,1)) D FH Q:LREND  D BACT^LROR4A Q:LREND  D REFS^LRMIPSU Q:LREND
 I $D(^LR(LRDFN,"MI",LRIDT,31)) D FH Q:LREND  D STER^LRMIPSZ3
 I $D(^LR(LRDFN,"MI",LRIDT,5)) D FH Q:LREND  D PARA^LRMIPSZ3,REFS^LRMIPSU Q:LREND
 I $D(^LR(LRDFN,"MI",LRIDT,16)) D FH Q:LREND  D VIR^LRMIPSZ3,REFS^LRMIPSU Q:LREND
 I $D(^LR(LRDFN,"MI",LRIDT,11)) D FH Q:LREND  D TB^LRMIPSZ4,REFS^LRMIPSU Q:LREND
 I $D(^LR(LRDFN,"MI",LRIDT,8)) D FH Q:LREND  D FUNG^LRMIPSZ4,REFS^LRMIPSU Q:LREND
 Q
EN1 S LRTS=+^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRBRR,0),LRTS(1)=$P(^(0),U,5)
 S:LRTS=LRONETST LRPRINT=1 S LRTSTS=$S($D(^LAB(60,LRTS,0)):$P(^(0),U),1:"deleted test"),^TMP("LR",$J,"T",$S($D(^LAB(60,LRTS,.1)):$P(^(.1),U,6),1:"")_","_LRBRR)=LRTSTS_U_LRTS(1)
 Q
FH D:$Y>(IOSL-LRFLIP) HDR
 Q
HDR ;
 S LRPG=LRPG+1 D WAIT Q:LREND  D EXT^ORUHDR
 W !?27,"----MICROBIOLOGY----"
 I $D(DUZ("AG")),$L(DUZ("AG")),"ARMYAFN"[DUZ("AG") D ^LRAIPRIV
 I '$D(LRH),LRHC W !?32,$S($D(^XUSEC("LRLAB",DUZ))&'$D(LRWRDVEW):"LAB",1:"CHART")," COPY"
 W:LRPG=1 !,"Accession: ",LRACC,?47,"Received: ",LRRC
 W !,"Collection sample: ",LRCS,?40,"Collection date: ",LRTK
 I LRCS'=LRST,LRPG=1 W !,"Site/Specimen: ",LRST
 I LRPG=1 W !,"Provider: ",LRDOC,! W:$L(LRCMNT) "Comment on specimen: ",LRCMNT,!
 W:LRPG>1 !?20,">> CONTINUATION OF ",LRACC," <<"
 Q
WAIT ;
 F I=$Y:1:IOSL-4 W !
 I 'LRHC D PGBRK^ORUHDR I OREND S LREND=1 Q
 Q