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

BLRALBM2.m

Go to the documentation of this file.
BLRALBM2 ;DAOU/ALA-Build Micro results for STERILITY, PARASITES, VIRUS 
 ;;5.2T9;LR;**1013,1015,1018**;Nov 17, 2004
 ;;5.2;LR;**1013,1015**;Nov 18, 2002
 ;
 ;
 ;
STER ;EP
 I $L($P($G(^LR(LRDFN,"MI",LRIDT,1)),U,7)) D
 . S BLRAZ="STERILITY CONTROL: "_$S($P(^(1),U,7)="N":"NEGATIVE",1:"POSITIVE")
 . S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=BLRAZ
 ;
 ;S DIC="^LR("_LRDFN_",""MI"",",DA=LRIDT,DR=31 D EN^DIQ S:$D(DTOUT)!($D(DUOUT)) LREND=1
 Q
 ;
PARA ;EP
 I '$L($P($G(^LR(LRDFN,"MI",LRIDT,5)),U)) Q:'$D(LRWRDVEW)  Q:LRSB'=5
 S LRTUS=$P($G(^LR(LRDFN,"MI",LRIDT,5)),U,2),DZ=$P($G(^(5)),U,3),Y=$P($G(^(5)),U) D D^LRU
 S BLRAZ="* PARASITOLOGY "_$S(LRTUS="F":"FINAL",LRTUS="P":"PRELIMINARY",1:"")_" REPORT => "_Y_"   TECH CODE: "_DZ
 S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=BLRAZ
 S LRPRE=21 D PRE^BLRALBM1
 I $D(^LR(LRDFN,"MI",LRIDT,24)) D
 . S BLRAZ="PARASITOLOGY SMEAR/PREP:"
 . S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=BLRAZ
 . S LRMYC=0 F  S LRMYC=+$O(^LR(LRDFN,"MI",LRIDT,24,LRMYC)) Q:LRMYC<1  D
 .. ;----- BEGIN IHS MODIFICATIONS LR*5.2*1018 -- BLRBLKS should be BLRABLKS (MKK)
 .. ; S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=$E(BLRBLKS,1,5)_$G(^LR(LRDFN,"MI",LRIDT,24,LRMYC,0))
 .. S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=$E(BLRABLKS,1,5)_$G(^LR(LRDFN,"MI",LRIDT,24,LRMYC,0))
 .. ;----- END IHS MODIFICATIONS LR*5.2*1018 -- BLRBLKS should be BLRABLKS (MKK)
 S LRPAR=0 F  S LRPAR=+$O(^LR(LRDFN,"MI",LRIDT,6,LRPAR)) Q:LRPAR<1  D
 . S BLRAPAR=$G(^LR(LRDFN,"MI",LRIDT,6,LRPAR,0))
 . S BLRAZ="Parasite: "_$E($P($G(^LAB(61.2,BLRAPAR,0)),U),1,25)
 . S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=BLRAZ
 . S BLRAZ1=30 D Z1 D STG
 I $D(^LR(LRDFN,"MI",LRIDT,7,0)),$P($G(^(0)),U,4)>0 D
 . S BLRAZ="Parasitology Remark(s):"
 . S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=BLRAZ
 . S LRPAR=0 F  S LRPAR=+$O(^LR(LRDFN,"MI",LRIDT,7,LRPAR)) Q:LRPAR<1  D
 .. S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=$E(BLRABLKS,1,3)_$G(^LR(LRDFN,"MI",LRIDT,7,LRPAR,0))
 Q
 ;
STG S LRBUG(LRPAR)=$G(^LR(LRDFN,"MI",LRIDT,6,LRPAR,0)),S1=6,LRTA=LRPAR
 I $D(^LR(LRDFN,"MI",LRIDT,S1,LRTA,1,0)) D
 . S B=0 F  S B=+$O(^LR(LRDFN,"MI",LRIDT,S1,LRTA,1,B)) Q:B<1  D
 .. S Y=$G(^LR(LRDFN,"MI",LRIDT,S1,LRTA,1,B,0)),Y1=$P(Y,U,2)
 .. S BLRAZ="   Stage: " D SET
 .. S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=BLRAZ
 .. I $L(Y1) S BLRAZ="   Quantity: "_Y1
 .. S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=BLRAZ
 .. D LIST1
 Q
 ;
SET S LRSET=$P($G(^DD(63.35,.01,0)),U,3)
 S %=$P($P(";"_LRSET,";"_$P(Y,U)_":",2),";") I %]"" S BLRAZ=BLRAZ_%
 Q
 ;
LIST1 S BLRAZ="   Comment: "
 S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=BLRAZ
 S C=0 F  S C=+$O(^LR(LRDFN,"MI",LRIDT,S1,LRTA,1,B,1,C)) Q:C<1  D
 . S BLRAZ1=13 D Z1 S BLRAZ=BLRAZ_$G(^LR(LRDFN,"MI",LRIDT,S1,LRTA,1,B,1,C,0))
 . S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=BLRAZ,BLRAZ=$E(BLRABLKS,1,13)
 Q
 ;
VIR ;EP
 I '$L($P($G(^LR(LRDFN,"MI",LRIDT,16)),U)) Q:'$D(LRWRDVEW)  Q:LRSB'=16
 S LRTUS=$P($G(^LR(LRDFN,"MI",LRIDT,16)),U,2),DZ=$P($G(^(16)),U,3),Y=$P($G(^(16)),U) D D^LRU
 S BLRAZ="* VIROLOGY "_$S(LRTUS="F":"FINAL",LRTUS="P":"PRELIMINARY",1:"")_" REPORT => "_Y_"   TECH CODE: "_DZ
 S LRPRE=20 D PRE^BLRALBM1
 S LRPAR=0 F  S LRPAR=+$O(^LR(LRDFN,"MI",LRIDT,17,LRPAR)) Q:LRPAR<1  D
 .;----- BEGIN IHS MODIFICATIONS LR*5.2*1018
 .S BLRAZ="Virus: "_$P($G(^LAB(61.2,$P($G(^(LRPAR,0)),U),0)),U)
 .S LRBUG(LRPAR)=$G(^LR(LRDFN,"MI",LRIDT,17,LRPAR,0))
 .;----- END IHS MODIFICATIONS ERROR REPORTED AT AIH
 .;----- ADDED "." TO PREVIOUS TWO LINES
 I $D(^LR(LRDFN,"MI",LRIDT,18,0)),$P(^(0),U,4)>0 D
 . S BLRAZ="Virology Remark(s):" S LRPAR=0
 . F  S LRPAR=+$O(^LR(LRDFN,"MI",LRIDT,18,LRPAR)) Q:LRPAR<1  D
 .. S BLRADSP=BLRADSP+1,^TMP($J,"BLRA",BLRADSP,0)=$E(BLRABLKS,1,3)_$G(^LR(LRDFN,"MI",LRIDT,18,LRPAR,0))
 Q
 ;
Z1 ;  Pad with trailing spaces
 F BLRAI=1:1:(BLRAZ1-$L(BLRAZ)) S BLRAZ=BLRAZ_" "
 Q