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

LR7OSMZ4.m

Go to the documentation of this file.
  1. LR7OSMZ4 ;slc/dcm - Silent Micro rpt - AFB, FUNGUS ;8/11/97
  1. ;;5.2T9;LR;**1018**;Nov 17, 2004
  1. ;;5.2;LAB SERVICE;**121,244**;Sep 27, 1994
  1. TB ;from LR7OSMZ1
  1. S X=^LR(LRDFN,"MI",LRIDT,11)
  1. I '$L($P(X,U)) Q:'$D(LRWRDVEW) Q:LRSB'=11
  1. S LRTUS=$P(X,U,2),DZ=$P(X,U,5),LRAFS=$P(X,U,3),LRAMT=$P(X,U,4),Y=$P(X,U)
  1. D D^LRU,LINE^LR7OSUM4
  1. S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"* MYCOBACTERIOLOGY "_$S(LRTUS="F":"FINAL",LRTUS="P":"PRELIMINARY",1:"")_" REPORT => "_Y_" TECH CODE: "_DZ)
  1. S LRPRE=23
  1. D PRE^LR7OSMZU
  1. K LRTA
  1. I $D(^LR(LRDFN,"MI",LRIDT,12,0)),$P(^(0),U,4)>0 S LRTA=0
  1. D:LRAFS'=""!($D(LRTA)) AFS
  1. I $D(^LR(LRDFN,"MI",LRIDT,13,0)),$P(^(0),U,4)>0 D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"Mycobacteriology Remark(s):") S B=0 D
  1. . F S B=+$O(^LR(LRDFN,"MI",LRIDT,13,B)) Q:B<1 S X=^(B,0) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,X)
  1. Q
  1. AFS ;
  1. I LRAFS'="" D LINE^LR7OSUM4 D
  1. . S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,$S(LRAFS["D":"Direct",LRAFS["C":"Concentrate",1:"")_" Acid Fast Stain: "_$S(LRAFS["P":"Positive",LRAFS["N":"Negative",1:LRAFS)_" ")
  1. . I $L(LRAMT) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Quantity: "_LRAMT)
  1. K ^TMP("LR",$J,"T"),LRTSTS
  1. I $D(LRTA) S LRTSTS=0 F A=0:1 S LRTA=+$O(^LR(LRDFN,"MI",LRIDT,12,LRTA)) Q:LRTA<1 S (LRBUG(LRTA),LRTBC)=$P(^(LRTA,0),U),LRQU=$P(^(0),U,2),LRTBC=$P(^LAB(61.2,LRTBC,0),U) D LIST
  1. Q
  1. LIST ;
  1. N CNT
  1. D LINE^LR7OSUM4
  1. S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"Mycobacterium: "_LRTBC)
  1. S:$D(^LR(LRDFN,"MI",LRIDT,12,LRTA,2)) LRTSTS=LRTSTS+1
  1. I $L(LRQU) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Quantity: "_LRQU)
  1. I $D(^LR(LRDFN,"MI",LRIDT,12,LRTA,1,0)) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT," Comment: ") S (CNT,B)=0 D
  1. . F S B=+$O(^LR(LRDFN,"MI",LRIDT,12,LRTA,1,B)) Q:B<1 S X=^(B,0) D
  1. .. I 'CNT S CNT=1,^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(13,CCNT,X) Q
  1. .. D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(13,CCNT,X)
  1. SEN ;
  1. S LRTB=2
  1. F S LRTB=+$O(^LR(LRDFN,"MI",LRIDT,12,LRTA,LRTB)) Q:LRTB'["2."!(LRTB="") S LRTBA=$O(^DD(63.39,"GL",LRTB,1,0)),LRTBA=$P(^DD(63.39,LRTBA,0),U),LRTBS=^LR(LRDFN,"MI",LRIDT,12,LRTA,LRTB) D
  1. . D LINE^LR7OSUM4
  1. . S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,LRTBA)_$$S^LR7OS(20,CCNT,LRTBS)
  1. K LRTB,LRTBA,LRTBS
  1. Q
  1. FUNG ;from LR7OSMZ1
  1. S X=^LR(LRDFN,"MI",LRIDT,8)
  1. I '$L($P(X,U)) Q:'$D(LRWRDVEW) Q:LRSB'=8
  1. S LRTUS=$P(X,U,2),DZ=$P(X,U,3),Y=$P(X,U)
  1. D D^LRU,LINE^LR7OSUM4
  1. S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"* MYCOLOGY "_$S(LRTUS="F":"FINAL",LRTUS="P":"PRELIMINARY",1:"")_" REPORT => "_Y_" TECH CODE: "_DZ)
  1. S LRPRE=22
  1. D PRE^LR7OSMZU
  1. I $D(^LR(LRDFN,"MI",LRIDT,15)) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"MYCOLOGY SMEAR/PREP:") S LRMYC=0 D
  1. . F S LRMYC=+$O(^LR(LRDFN,"MI",LRIDT,15,LRMYC)) Q:LRMYC<1 S X=^(LRMYC,0) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(5,CCNT,X)
  1. I $D(^LR(LRDFN,"MI",LRIDT,9,0)),$P(^(0),U,4)>0 D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"Fungus/Yeast: ") D SHOW
  1. I $D(^LR(LRDFN,"MI",LRIDT,10,0)),$P(^(0),U,4)>0 D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"Mycology Remark(s):") S LRMYC=0 D
  1. . F S LRMYC=+$O(^LR(LRDFN,"MI",LRIDT,10,LRMYC)) Q:LRMYC<1 S X=^(LRMYC,0) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,X)
  1. Q
  1. SHOW ;
  1. S LRTA=0
  1. F S LRTA=+$O(^LR(LRDFN,"MI",LRIDT,9,LRTA)) Q:LRTA<1 S (LRBUG(LRTA),LRTBC)=$P(^(LRTA,0),U),LRQU=$P(^(0),U,2),LRTBC=$P(^LAB(61.2,LRTBC,0),U) D LIST1
  1. Q
  1. LIST1 ;
  1. N B,C
  1. D LINE^LR7OSUM4
  1. S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,LRTBC)
  1. I $L(LRQU) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Quantity: "_LRQU)
  1. I $D(^LR(LRDFN,"MI",LRIDT,9,LRTA,1,0)) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Comment:") S (B,C)=0 D
  1. . F S B=+$O(^LR(LRDFN,"MI",LRIDT,9,LRTA,1,B)) Q:B<1 S X=^(B,0) D
  1. .. I 'C S C=1,^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(13,CCNT,X) Q
  1. .. D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(13,CCNT,X)
  1. Q