69 lines
3.8 KiB
Mathematica
69 lines
3.8 KiB
Mathematica
|
LR7OSMZ4 ;slc/dcm - Silent Micro rpt - AFB, FUNGUS ;8/11/97
|
||
|
;;5.2;LAB SERVICE;**121,244**;Sep 27, 1994
|
||
|
TB ;from LR7OSMZ1
|
||
|
S X=^LR(LRDFN,"MI",LRIDT,11)
|
||
|
I '$L($P(X,U)) Q:'$D(LRWRDVEW) Q:LRSB'=11
|
||
|
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)
|
||
|
D D^LRU,LINE^LR7OSUM4
|
||
|
S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"* MYCOBACTERIOLOGY "_$S(LRTUS="F":"FINAL",LRTUS="P":"PRELIMINARY",1:"")_" REPORT => "_Y_" TECH CODE: "_DZ)
|
||
|
S LRPRE=23
|
||
|
D PRE^LR7OSMZU
|
||
|
K LRTA
|
||
|
I $D(^LR(LRDFN,"MI",LRIDT,12,0)),$P(^(0),U,4)>0 S LRTA=0
|
||
|
D:LRAFS'=""!($D(LRTA)) AFS
|
||
|
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
|
||
|
. 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)
|
||
|
Q
|
||
|
AFS ;
|
||
|
I LRAFS'="" D LINE^LR7OSUM4 D
|
||
|
. 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)_" ")
|
||
|
. I $L(LRAMT) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Quantity: "_LRAMT)
|
||
|
K ^TMP("LR",$J,"T"),LRTSTS
|
||
|
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
|
||
|
Q
|
||
|
LIST ;
|
||
|
N CNT
|
||
|
D LINE^LR7OSUM4
|
||
|
S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"Mycobacterium: "_LRTBC)
|
||
|
S:$D(^LR(LRDFN,"MI",LRIDT,12,LRTA,2)) LRTSTS=LRTSTS+1
|
||
|
I $L(LRQU) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Quantity: "_LRQU)
|
||
|
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
|
||
|
. F S B=+$O(^LR(LRDFN,"MI",LRIDT,12,LRTA,1,B)) Q:B<1 S X=^(B,0) D
|
||
|
.. I 'CNT S CNT=1,^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(13,CCNT,X) Q
|
||
|
.. D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(13,CCNT,X)
|
||
|
SEN ;
|
||
|
S LRTB=2
|
||
|
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
|
||
|
. D LINE^LR7OSUM4
|
||
|
. S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,LRTBA)_$$S^LR7OS(20,CCNT,LRTBS)
|
||
|
K LRTB,LRTBA,LRTBS
|
||
|
Q
|
||
|
FUNG ;from LR7OSMZ1
|
||
|
S X=^LR(LRDFN,"MI",LRIDT,8)
|
||
|
I '$L($P(X,U)) Q:'$D(LRWRDVEW) Q:LRSB'=8
|
||
|
S LRTUS=$P(X,U,2),DZ=$P(X,U,3),Y=$P(X,U)
|
||
|
D D^LRU,LINE^LR7OSUM4
|
||
|
S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"* MYCOLOGY "_$S(LRTUS="F":"FINAL",LRTUS="P":"PRELIMINARY",1:"")_" REPORT => "_Y_" TECH CODE: "_DZ)
|
||
|
S LRPRE=22
|
||
|
D PRE^LR7OSMZU
|
||
|
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
|
||
|
. 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)
|
||
|
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
|
||
|
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
|
||
|
. 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)
|
||
|
Q
|
||
|
SHOW ;
|
||
|
S LRTA=0
|
||
|
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
|
||
|
Q
|
||
|
LIST1 ;
|
||
|
N B,C
|
||
|
D LINE^LR7OSUM4
|
||
|
S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,LRTBC)
|
||
|
I $L(LRQU) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Quantity: "_LRQU)
|
||
|
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
|
||
|
. F S B=+$O(^LR(LRDFN,"MI",LRIDT,9,LRTA,1,B)) Q:B<1 S X=^(B,0) D
|
||
|
.. I 'C S C=1,^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(13,CCNT,X) Q
|
||
|
.. D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(13,CCNT,X)
|
||
|
Q
|