source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LR7OSMZ2.m@ 1720

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

initial load of FOIAVistA 6/30/08 version

File size: 4.7 KB
Line 
1LR7OSMZ2 ;slc/dcm - Silent Micro rpt - BACTERIA, SIC/SBC, MIC ;8/11/97
2 ;;5.2;LAB SERVICE;**121,244**;Sep 27, 1994
3ANTI ;from LR7OSMZ1
4 I $P(^LR(LRDFN,"MI",LRIDT,14,0),U,4)>0 D LINE,LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(28,CCNT,"Antibiotic Level(s):") D
5 . D LINE
6 . S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"ANTIBIOTIC")_$$S^LR7OS(20,CCNT,"CONC RANGE (ug/ml)")_$$S^LR7OS(42,CCNT,"DRAW TIME")
7 . S B=0
8 . F S B=$O(^LR(LRDFN,"MI",LRIDT,14,B)) Q:B<1 S X=^(B,0) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,$P(X,U))_$$S^LR7OS(20,CCNT,$P(X,U,3))_$$S^LR7OS(42,CCNT,$S($P(X,U,2)="P":"PEAK",$P(X,U,2)="T":"TROUGH",1:""))
9 Q
10BACT ;from LR7OSMZ1
11 I '$L($P(^LR(LRDFN,"MI",LRIDT,1),U)) Q:'$D(LRWRDVEW) Q:LRSB'=1
12 D BUG
13 I $D(^LR(LRDFN,"MI",LRIDT,2,0)) D FH^LR7OSMZU Q:LREND D GRAM
14 I $D(^LR(LRDFN,"MI",LRIDT,25,0)) D FH^LR7OSMZU Q:LREND D BSMEAR
15 I $D(^LR(LRDFN,"MI",LRIDT,3,0)) D FH^LR7OSMZU Q:LREND D BRMK Q:LREND D BACT^LR7OSMZ5 Q:LREND
16 I $D(^LR(LRDFN,"MI",LRIDT,4,0)),$P(^(0),U,4)>0 D FH^LR7OSMZU Q:LREND D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"Bacteriology Remark(s):") S B=0 D
17 . F S B=+$O(^LR(LRDFN,"MI",LRIDT,4,B)) Q:B<1 D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,^LR(LRDFN,"MI",LRIDT,4,B,0))
18 Q
19BUG S X=^LR(LRDFN,"MI",LRIDT,1),LRTUS=$P(X,U,2),DZ=$P(X,U,3),LRUS=$P(X,U,6),LRNS=$P(X,U,5),Y=$P(X,U)
20 D D^LRU,LINE
21 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"* BACTERIOLOGY "_$S(LRTUS="F":"FINAL",LRTUS="P":"PRELIMINARY",1:"")_" REPORT => "_Y_" TECH CODE: "_DZ)
22 S LRPRE=19
23 D PRE^LR7OSMZU
24 I $L(LRUS) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"URINE SCREEN: "_$S(LRUS="N":"Negative",LRUS="P":"Positive",1:LRUS))
25 I $L(LRNS) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"SPUTUM SCREEN: "_LRNS)
26 Q
27GRAM ;
28 D LINE
29 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"GRAM STAIN:"),LRGRM=0
30 F S LRGRM=+$O(^LR(LRDFN,"MI",LRIDT,2,LRGRM)) Q:LRGRM<1 S X=^(LRGRM,0) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,X)
31 Q
32BSMEAR ;
33 D LINE
34 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"BACTERIOLOGY SMEAR/PREP:") S LRMYC=0
35 F S LRMYC=+$O(^LR(LRDFN,"MI",LRIDT,25,LRMYC)) Q:LRMYC<1 S X=^(LRMYC,0) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(5,CCNT,X)
36 Q
37BRMK ;
38 S (LRBUG,LR2ORMOR)=0
39 F LRAX=1,2 S LRBUG=+$O(^LR(LRDFN,"MI",LRIDT,3,LRBUG)) Q:LRBUG<1 S:LRAX=2 LR2ORMOR=1
40 I LRAX'=1 S (LRBUG,LRTSTS)=0 F LRAX=1:1 S LRBUG=+$O(^LR(LRDFN,"MI",LRIDT,3,LRBUG)) Q:LRBUG<1 D LST
41 Q
42LST ;
43 S (LRBUG(LRAX),LRORG)=$P(^LR(LRDFN,"MI",LRIDT,3,LRBUG,0),U),LRQU=$P(^(0),U,2),LRSSD=$P(^(0),U,3,8),LRORG=$P(^LAB(61.2,LRORG,0),U)
44 I LRSSD'?."^" S LRSIC1=$P(LRSSD,U),LRSBC1=$P(LRSSD,U,2),LRDRTM1=$P(LRSSD,U,3),LRSIC2=$P(LRSSD,U,4),LRSBC2=$P(LRSSD,U,5),LRDRTM2=$P(LRSSD,U,6),LRSSD=1
45 I LRAX=1 D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(1,CCNT,"CULTURE RESULTS: ")
46 I LRAX>1 D LN^LR7OSMZ1 S ^TMP("LRC",$J,GCNT,0)=""
47 S ^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(18,CCNT,$S(LR2ORMOR:LRBUG_". ",1:"")_LRQU_LRORG)
48 I LRSSD D FH^LR7OSMZU Q:LREND D SSD
49 S:$D(^LR(LRDFN,"MI",LRIDT,3,LRBUG,2)) LRTSTS=LRTSTS+1
50 I $D(^LR(LRDFN,"MI",LRIDT,3,LRBUG,3,0)),$P(^(0),U,4)>0 D MIC
51 I $D(^LR(LRDFN,"MI",LRIDT,3,LRBUG,1,0)),$P(^(0),U,4)>0 D CMNT
52 Q
53SSD ;
54 D LINE
55 S LRDRTM1=$S(LRDRTM1="P":"PEAK",LRDRTM1="T":"TROUGH",1:LRDRTM1),LRDRTM2=$S(LRDRTM2="P":"PEAK",LRDRTM2="T":"TROUGH",1:LRDRTM2)
56 I $L(LRSIC1) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(20,CCNT,"SIT ") S:$L(LRDRTM1) ^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(CCNT,CCNT,"("_LRDRTM1_")") S ^(0)=^(0)_$$S^LR7OS(CCNT,CCNT,": "_LRSIC1)
57 I $L(LRSBC1) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(20,CCNT,"SBT ") S:$L(LRDRTM1) ^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(CCNT,CCNT,"("_LRDRTM1_")") S ^(0)=^(0)_$$S^LR7OS(CCNT,CCNT,": "_LRSBC1)
58 I $L(LRSIC2) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(20,CCNT,"SIT ") S:$L(LRDRTM2) ^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(CCNT,CCNT,"("_LRDRTM2_")") S ^(0)=^(0)_$$S^LR7OS(CCNT,CCNT,": "_LRSIC2)
59 I $L(LRSBC2) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(20,CCNT,"SBT ") S:$L(LRDRTM2) ^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(CCNT,CCNT,"("_LRDRTM2_")") S ^(0)=^(0)_$$S^LR7OS(CCNT,CCNT,": "_LRSBC2)
60 Q
61MIC ;
62 D LINE
63 S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(18,CCNT,"Antibiotic"),B=0
64 F S B=+$O(^LR(LRDFN,"MI",LRIDT,3,LRBUG,3,B)) Q:B<1 I $L($P(^(B,0),U,2,3))>0 S ^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(35,CCNT,"MIC (ug/ml)")_$$S^LR7OS(50,CCNT,"MBC (ug/ml)") Q
65 S B=0
66 F S B=+$O(^LR(LRDFN,"MI",LRIDT,3,LRBUG,3,B)) Q:B<1 S X=^(B,0) D LINE S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(18,CCNT,$P(X,U))_$$S^LR7OS(35,CCNT,$J($P(X,U,2),7))_$$S^LR7OS(50,CCNT,$J($P(X,U,3),7))
67 Q
68CMNT ;
69 S LRPC=0
70 F A=0:1 S LRPC=+$O(^LR(LRDFN,"MI",LRIDT,3,LRBUG,1,LRPC)) Q:LRPC<1 S X=^(LRPC,0) D
71 . D LINE
72 . S ^TMP("LRC",$J,GCNT,0)=$$S^LR7OS(3,CCNT,"")
73 . S:A=0 ^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(CCNT,CCNT,"Comment: ")
74 . S ^(0)=^TMP("LRC",$J,GCNT,0)_$$S^LR7OS(12,CCNT,X)
75 Q
76LINE ;
77 D LINE^LR7OSUM4
78 Q
Note: See TracBrowser for help on using the repository browser.