source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LR7OSMZ4.m@ 1258

Last change on this file since 1258 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.8 KB
Line 
1LR7OSMZ4 ;slc/dcm - Silent Micro rpt - AFB, FUNGUS ;8/11/97
2 ;;5.2;LAB SERVICE;**121,244**;Sep 27, 1994
3TB ;from LR7OSMZ1
4 S X=^LR(LRDFN,"MI",LRIDT,11)
5 I '$L($P(X,U)) Q:'$D(LRWRDVEW) Q:LRSB'=11
6 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)
7 D D^LRU,LINE^LR7OSUM4
8 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"* MYCOBACTERIOLOGY "_$S(LRTUS="F":"FINAL",LRTUS="P":"PRELIMINARY",1:"")_" REPORT => "_Y_" TECH CODE: "_DZ)
9 S LRPRE=23
10 D PRE^LR7OSMZU
11 K LRTA
12 I $D(^LR(LRDFN,"MI",LRIDT,12,0)),$P(^(0),U,4)>0 S LRTA=0
13 D:LRAFS'=""!($D(LRTA)) AFS
14 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
15 . 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)
16 Q
17AFS ;
18 I LRAFS'="" D LINE^LR7OSUM4 D
19 . 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)_" ")
20 . I $L(LRAMT) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Quantity: "_LRAMT)
21 K ^TMP("LR",$J,"T"),LRTSTS
22 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
23 Q
24LIST ;
25 N CNT
26 D LINE^LR7OSUM4
27 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"Mycobacterium: "_LRTBC)
28 S:$D(^LR(LRDFN,"MI",LRIDT,12,LRTA,2)) LRTSTS=LRTSTS+1
29 I $L(LRQU) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Quantity: "_LRQU)
30 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
31 . F S B=+$O(^LR(LRDFN,"MI",LRIDT,12,LRTA,1,B)) Q:B<1 S X=^(B,0) D
32 .. I 'CNT S CNT=1,^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(13,CCNT,X) Q
33 .. D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(13,CCNT,X)
34SEN ;
35 S LRTB=2
36 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
37 . D LINE^LR7OSUM4
38 . S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,LRTBA)_$$S^LR7OS(20,CCNT,LRTBS)
39 K LRTB,LRTBA,LRTBS
40 Q
41FUNG ;from LR7OSMZ1
42 S X=^LR(LRDFN,"MI",LRIDT,8)
43 I '$L($P(X,U)) Q:'$D(LRWRDVEW) Q:LRSB'=8
44 S LRTUS=$P(X,U,2),DZ=$P(X,U,3),Y=$P(X,U)
45 D D^LRU,LINE^LR7OSUM4
46 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"* MYCOLOGY "_$S(LRTUS="F":"FINAL",LRTUS="P":"PRELIMINARY",1:"")_" REPORT => "_Y_" TECH CODE: "_DZ)
47 S LRPRE=22
48 D PRE^LR7OSMZU
49 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
50 . 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)
51 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
52 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
53 . 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)
54 Q
55SHOW ;
56 S LRTA=0
57 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
58 Q
59LIST1 ;
60 N B,C
61 D LINE^LR7OSUM4
62 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,LRTBC)
63 I $L(LRQU) D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"Quantity: "_LRQU)
64 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
65 . F S B=+$O(^LR(LRDFN,"MI",LRIDT,9,LRTA,1,B)) Q:B<1 S X=^(B,0) D
66 .. I 'C S C=1,^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(13,CCNT,X) Q
67 .. D LINE^LR7OSUM4 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(13,CCNT,X)
68 Q
Note: See TracBrowser for help on using the repository browser.