LA7VOBX3 ;DALOI/JMC - LAB OBX Segment message builder (MI subscripts) cont'd ;Dec 4, 2008
;;5.2;AUTOMATED LAB INSTRUMENTS;**46,64,68,74**;Sep 27, 1994;Build 229
;
; Reference to ^DD supported by DBIA #999
;
MI ; Build OBX segments for results that are microbiology subscript.
; Called by LA7VOBX
;
N I,LA761,LA76305,LA7ALT,LA7CODE,LA7DIV,LA7IENS,LA7LOINC,LA7NLT,LA7OBX,LA7PARNT,LA7PLREF,LA7SAVID,LA7SUBFL,LA7VAL,LA7VERP
;
I $P(LRIDT,",",2) S LRIDT(2)=$P(LRIDT,",",2),LRIDT(3)=$P(LRIDT,",",3),LRIDT=$P(LRIDT,",")
;
I '$D(^LR(LRDFN,LRSS,LRIDT)) Q
;
S LA76305(0)=$G(^LR(LRDFN,LRSS,LRIDT,0))
S (LA7ALT,LA7CODE,LA7ISOID,LA7LOINC,LA7NLT,LA7SAVID,LA7SUBFL,LA7VAL,LA7VERP)=""
S LA7NLT=$G(LA("NLT")),LA7CODE=LA7NLT_"!"
;
; Specimen topography
S LA761=$P(LA76305(0),"^",5)
; Default codes
S LA7CODE=$$DEFCODE^LA7VHLU5(LRSS,LRSB,LA7CODE,LA761)
; Initialize performing lab reference
S LA7PLREF=""
;
D SEC
; Don't build segment if no value to send
I LA7VAL="" Q
D GEN^LA7VOBX4
Q
;
;
SEC ; Build section specific fields
N LA7X,LA7Y
;
; Bacteriology report
I $P(LRSB,",")=11 D Q
. N LA7ERR
. S LA76305(1)=$G(^LR(LRDFN,LRSS,LRIDT,1))
. S LA7VERP=$P(LA76305(1),"^",3)
. S LA7ORS=$P(LA76305(1),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.05,13)
. S LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(63.33,LA7IENS,.01,"","LA7ERR")
. S LA7Y="MI-"_$P(LRSB,",")_"^"_$$GET1^DID(63.33,.01,"","LABEL")_"^99VA63"
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",1"
;
; Urine screen
I LRSB=11.57 D Q
. N LA7ERR
. S LA76305(1)=$G(^LR(LRDFN,LRSS,LRIDT,1))
. S LA7VERP=$P(LA76305(1),"^",3),LA7ORS=$P(LA76305(1),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.05,11.57)
. S LA7IENS=LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(63.29,LA7IENS,11.57,"","LA7ERR")
. S LA7X=$P(^LR(LRDFN,LRSS,LRIDT,1),"^",6)
. S LA7Y=$S(LA7X="P":10828004,LA7X="N":260385009,1:"")
. I LA7Y S LA7X=LA7VAL D MTSCT^LA7VOBX4
. S LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.05,11.57,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",1;6"
;
; Sputum Screen
I LRSB=11.58 D Q
. N LA7ERR
. S LA76305(1)=$G(^LR(LRDFN,LRSS,LRIDT,1))
. S LA7VERP=$P(LA76305(1),"^",3)
. S LA7ORS=$P(LA76305(1),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.05,11.58)
. S LA7VAL=$P(^LR(LRDFN,LRSS,LRIDT,1),"^",5)
. S LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.05,11.58,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",1;5"
;
; Gram stain
I LRSB=11.6 D Q
. N LA7ERR
. S LA76305(1)=$G(^LR(LRDFN,LRSS,LRIDT,1))
. S LA7VERP=$P(LA76305(1),"^",3)
. S LA7ORS=$P(LA76305(1),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.05,11.6)
. S LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(63.29,LA7IENS,.01,"","LA7ERR")
. S LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.29,.01,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",2,"_LRIDT(2)_",0"
;
; Micro organism
I $P(LRSB,",")=12 D Q
. S LA76305(1)=$G(^LR(LRDFN,LRSS,LRIDT,1))
. S LA7VERP=$P(LA76305(1),"^",3)
. S LA7ORS=$P(LA76305(1),"^",2)
. S LA7SUBFL=63.3
. ; Working on colony count
. I $P(LRSB,",",2)=1 D CC^LA7VOBX4 Q
. ; Working on organism
. I $G(LRIDT(3))="" D ORG^LA7VOBX4 Q
. ; Working on susceptibilities
. I $P(LA76305(1),"^",4) S LA7VERP=$P(LA76305(1),"^",4)
. I $P(LRSB,",",2)<3 D MIC^LA7VOBX4 Q
. I $P(LRSB,",",2)=3 D MICA^LA7VOBX4 Q
;
; Parasitology report
I $P(LRSB,",")=14 D Q
. N LA7ERR
. S LA76305(5)=$G(^LR(LRDFN,LRSS,LRIDT,5))
. I $P(LA76305(5),"^",3) S LA7VERP=$P(LA76305(5),"^",3)
. S LA7ORS=$P(LA76305(5),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.36,.01)
. S LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(63.36,LA7IENS,.01,"","LA7ERR")
. S LA7Y="MI-"_$P(LRSB,",")_"^"_$$GET1^DID(63.36,.01,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",4"
;
; Parasite organism
I $P(LRSB,",")=16 D Q
. S LA76305(5)=$G(^LR(LRDFN,LRSS,LRIDT,5))
. S LA7ORS=$P(LA76305(5),"^",2)
. I $P(LA76305(5),"^",3) S LA7VERP=$P(LA76305(5),"^",3)
. ; Working on parasite
. I $G(LRIDT(3))="" S LA7SUBFL=63.34 D ORG^LA7VOBX4 Q
. ; Working on parasite's stages/quantity
. S LA7SUBFL=63.35
. I $P(LRSB,",",2)=.01 D PSTAGE^LA7VOBX4 Q
. I $P(LRSB,",",2)=1 D PQTY^LA7VOBX4 Q
;
; Mycology report
I $P(LRSB,",")=18 D Q
. N LA7ERR
. S LA76305(8)=$G(^LR(LRDFN,LRSS,LRIDT,8))
. S LA7VERP=$P(LA76305(8),"^",3)
. S LA7ORS=$P(LA76305(8),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.38,.01)
. S LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(63.38,LA7IENS,.01,"","LA7ERR")
. S LA7Y="MI-"_$P(LRSB,",")_"^"_$$GET1^DID(63.38,.01,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",8"
;
; Mycology organism
I $P(LRSB,",")=20 D Q
. S LA76305(8)=$G(^LR(LRDFN,LRSS,LRIDT,8))
. S LA7ORS=$P(LA76305(8),"^",2)
. S LA7VERP=$P(LA76305(8),"^",3)
. S LA7SUBFL=63.37
. ; Working on colony count
. I $P(LRSB,",",2)=1 D CC^LA7VOBX4 Q
. ; Working on organism
. D ORG^LA7VOBX4
;
; Mycobacterium report
I $P(LRSB,",")=22 D Q
. N LA7ERR
. S LA76305(11)=$G(^LR(LRDFN,LRSS,LRIDT,11))
. S LA7VERP=$P(LA76305(11),"^",3)
. S LA7ORS=$P(LA76305(11),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.41,.01)
. S LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(63.41,LA7IENS,.01,"","LA7ERR")
. S LA7Y="MI-"_$P(LRSB,",")_"^"_$$GET1^DID(63.41,.01,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",12"
;
; Acid Fast stain
I LRSB=24 D Q
. N LA7ERR
. S LA76305(11)=$G(^LR(LRDFN,LRSS,LRIDT,11))
. S LA7VERP=$P(LA76305(11),"^",3)
. S LA7ORS=$P(LA76305(11),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.05,24)
. S LA7IENS=LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(63.05,LA7IENS,24,"","LA7ERR")
. S LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.05,24,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",12;3"
;
; Acid Fast stain quantity
I LRSB=25 D Q
. N LA7ERR
. S LA76305(11)=$G(^LR(LRDFN,LRSS,LRIDT,11))
. S LA7VERP=$P(LA76305(11),"^",3)
. S LA7ORS=$P(LA76305(11),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.05,25)
. S LA7IENS=LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(63.05,LA7IENS,25,"","LA7ERR")
. S LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.05,25,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",12;3"
;
; TB organism
I $P(LRSB,",")=26 D Q
. S LA76305(11)=$G(^LR(LRDFN,LRSS,LRIDT,11))
. S LA7ORS=$P(LA76305(11),"^",2)
. S LA7VERP=$P(LA76305(11),"^",5)
. S LA7SUBFL=63.39
. ; Working on colony count
. I $P(LRSB,",",2)=1 D CC^LA7VOBX4 Q
. ; Working on organism
. I $G(LRIDT(3))="" D ORG^LA7VOBX4 Q
. ; Working on susceptibilities
. D MIC^LA7VOBX4
;
; Virology report
I $P(LRSB,",")=33 D Q
. N LA7ERR
. S LA76305(16)=$G(^LR(LRDFN,LRSS,LRIDT,16))
. S LA7VERP=$P(LA76305(16),"^",3)
. S LA7ORS=$P(LA76305(16),"^",2)
. S LA7OBX(2)=$$OBX2^LA7VOBX(63.44,.01)
. S LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(63.44,LA7IENS,.01,"","LA7ERR")
. S LA7Y="MI-"_$P(LRSB,",")_"^"_$$GET1^DID(63.44,.01,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",16"
;
; Virology virus
I $P(LRSB,",")=36 D Q
. S LA76305(16)=$G(^LR(LRDFN,LRSS,LRIDT,16))
. S LA7ORS=$P(LA76305(16),"^",2)
. S LA7VERP=$P(LA76305(16),"^",3)
. ; Working on virus
. S LA7SUBFL=63.43
. D ORG^LA7VOBX4
;
; Antibiotic levels
I $P(LRSB,",")=28 D Q
. S LA76305(1)=$G(^LR(LRDFN,LRSS,LRIDT,1))
. S LA7VERP=$P(LA76305(1),"^",3)
. S LA7ORS=$P(LA76305(1),"^",2)
. S LA7SUBFL=63.42
. S LA7OBX(2)="SN"
. S LA7X=$G(^LR(LRDFN,LRSS,LRIDT,14,LRIDT(2),0))
. S $P(LA7CODE,"!",2)="93978.0000"
. S $P(LA7CODE,"!",3)=$S($P(LA7X,"^",2)="P":44433,$P(LA7X,"^",2)="T":44434,1:23816)
. S LA7VAL=$P(LA7X,"^",3)
. S LA7Y="MI-"_$P(LRSB,",")_"-"_$P(LRSB,",",2)_"^"_$P(LA7X,"^")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",14"
;
; Sterility report
I LRSB=11.52 D Q
. N LA7ERR
. S LA76305(1)=$G(^LR(LRDFN,LRSS,LRIDT,1))
. S LA7VERP=$P(LA76305(1),"^",3)
. S LA7ORS=$P(LA76305(1),"^",2)
. S LA7SUBFL=63.292
. S LA7OBX(2)=$$OBX2^LA7VOBX(LA7SUBFL,.01)
. S LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
. S LA7VAL=$$GET1^DIQ(LA7SUBFL,LA7IENS,.01,"","LA7ERR")
. S LA7Y="MI-"_$P(LRSB,",")_"^"_$$GET1^DID(63.292,.01,"","LABEL")_"^99VA63"
. S LA7ALT=LA7Y_"^"_LA7Y
. S LA7PLREF=LRDFN_",MI,"_LRIDT_",31"
;
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLA7VOBX3 8603 printed Dec 13, 2024@01:40:52 Page 2
LA7VOBX3 ;DALOI/JMC - LAB OBX Segment message builder (MI subscripts) cont'd ;Dec 4, 2008
+1 ;;5.2;AUTOMATED LAB INSTRUMENTS;**46,64,68,74**;Sep 27, 1994;Build 229
+2 ;
+3 ; Reference to ^DD supported by DBIA #999
+4 ;
MI ; Build OBX segments for results that are microbiology subscript.
+1 ; Called by LA7VOBX
+2 ;
+3 NEW I,LA761,LA76305,LA7ALT,LA7CODE,LA7DIV,LA7IENS,LA7LOINC,LA7NLT,LA7OBX,LA7PARNT,LA7PLREF,LA7SAVID,LA7SUBFL,LA7VAL,LA7VERP
+4 ;
+5 IF $PIECE(LRIDT,",",2)
SET LRIDT(2)=$PIECE(LRIDT,",",2)
SET LRIDT(3)=$PIECE(LRIDT,",",3)
SET LRIDT=$PIECE(LRIDT,",")
+6 ;
+7 IF '$DATA(^LR(LRDFN,LRSS,LRIDT))
QUIT
+8 ;
+9 SET LA76305(0)=$GET(^LR(LRDFN,LRSS,LRIDT,0))
+10 SET (LA7ALT,LA7CODE,LA7ISOID,LA7LOINC,LA7NLT,LA7SAVID,LA7SUBFL,LA7VAL,LA7VERP)=""
+11 SET LA7NLT=$GET(LA("NLT"))
SET LA7CODE=LA7NLT_"!"
+12 ;
+13 ; Specimen topography
+14 SET LA761=$PIECE(LA76305(0),"^",5)
+15 ; Default codes
+16 SET LA7CODE=$$DEFCODE^LA7VHLU5(LRSS,LRSB,LA7CODE,LA761)
+17 ; Initialize performing lab reference
+18 SET LA7PLREF=""
+19 ;
+20 DO SEC
+21 ; Don't build segment if no value to send
+22 IF LA7VAL=""
QUIT
+23 DO GEN^LA7VOBX4
+24 QUIT
+25 ;
+26 ;
SEC ; Build section specific fields
+1 NEW LA7X,LA7Y
+2 ;
+3 ; Bacteriology report
+4 IF $PIECE(LRSB,",")=11
Begin DoDot:1
+5 NEW LA7ERR
+6 SET LA76305(1)=$GET(^LR(LRDFN,LRSS,LRIDT,1))
+7 SET LA7VERP=$PIECE(LA76305(1),"^",3)
+8 SET LA7ORS=$PIECE(LA76305(1),"^",2)
+9 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.05,13)
+10 SET LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
+11 SET LA7VAL=$$GET1^DIQ(63.33,LA7IENS,.01,"","LA7ERR")
+12 SET LA7Y="MI-"_$PIECE(LRSB,",")_"^"_$$GET1^DID(63.33,.01,"","LABEL")_"^99VA63"
+13 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",1"
End DoDot:1
QUIT
+14 ;
+15 ; Urine screen
+16 IF LRSB=11.57
Begin DoDot:1
+17 NEW LA7ERR
+18 SET LA76305(1)=$GET(^LR(LRDFN,LRSS,LRIDT,1))
+19 SET LA7VERP=$PIECE(LA76305(1),"^",3)
SET LA7ORS=$PIECE(LA76305(1),"^",2)
+20 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.05,11.57)
+21 SET LA7IENS=LRIDT_","_LRDFN_","
+22 SET LA7VAL=$$GET1^DIQ(63.29,LA7IENS,11.57,"","LA7ERR")
+23 SET LA7X=$PIECE(^LR(LRDFN,LRSS,LRIDT,1),"^",6)
+24 SET LA7Y=$SELECT(LA7X="P":10828004,LA7X="N":260385009,1:"")
+25 IF LA7Y
SET LA7X=LA7VAL
DO MTSCT^LA7VOBX4
+26 SET LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.05,11.57,"","LABEL")_"^99VA63"
+27 SET LA7ALT=LA7Y_"^"_LA7Y
+28 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",1;6"
End DoDot:1
QUIT
+29 ;
+30 ; Sputum Screen
+31 IF LRSB=11.58
Begin DoDot:1
+32 NEW LA7ERR
+33 SET LA76305(1)=$GET(^LR(LRDFN,LRSS,LRIDT,1))
+34 SET LA7VERP=$PIECE(LA76305(1),"^",3)
+35 SET LA7ORS=$PIECE(LA76305(1),"^",2)
+36 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.05,11.58)
+37 SET LA7VAL=$PIECE(^LR(LRDFN,LRSS,LRIDT,1),"^",5)
+38 SET LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.05,11.58,"","LABEL")_"^99VA63"
+39 SET LA7ALT=LA7Y_"^"_LA7Y
+40 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",1;5"
End DoDot:1
QUIT
+41 ;
+42 ; Gram stain
+43 IF LRSB=11.6
Begin DoDot:1
+44 NEW LA7ERR
+45 SET LA76305(1)=$GET(^LR(LRDFN,LRSS,LRIDT,1))
+46 SET LA7VERP=$PIECE(LA76305(1),"^",3)
+47 SET LA7ORS=$PIECE(LA76305(1),"^",2)
+48 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.05,11.6)
+49 SET LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
+50 SET LA7VAL=$$GET1^DIQ(63.29,LA7IENS,.01,"","LA7ERR")
+51 SET LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.29,.01,"","LABEL")_"^99VA63"
+52 SET LA7ALT=LA7Y_"^"_LA7Y
+53 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",2,"_LRIDT(2)_",0"
End DoDot:1
QUIT
+54 ;
+55 ; Micro organism
+56 IF $PIECE(LRSB,",")=12
Begin DoDot:1
+57 SET LA76305(1)=$GET(^LR(LRDFN,LRSS,LRIDT,1))
+58 SET LA7VERP=$PIECE(LA76305(1),"^",3)
+59 SET LA7ORS=$PIECE(LA76305(1),"^",2)
+60 SET LA7SUBFL=63.3
+61 ; Working on colony count
+62 IF $PIECE(LRSB,",",2)=1
DO CC^LA7VOBX4
QUIT
+63 ; Working on organism
+64 IF $GET(LRIDT(3))=""
DO ORG^LA7VOBX4
QUIT
+65 ; Working on susceptibilities
+66 IF $PIECE(LA76305(1),"^",4)
SET LA7VERP=$PIECE(LA76305(1),"^",4)
+67 IF $PIECE(LRSB,",",2)<3
DO MIC^LA7VOBX4
QUIT
+68 IF $PIECE(LRSB,",",2)=3
DO MICA^LA7VOBX4
QUIT
End DoDot:1
QUIT
+69 ;
+70 ; Parasitology report
+71 IF $PIECE(LRSB,",")=14
Begin DoDot:1
+72 NEW LA7ERR
+73 SET LA76305(5)=$GET(^LR(LRDFN,LRSS,LRIDT,5))
+74 IF $PIECE(LA76305(5),"^",3)
SET LA7VERP=$PIECE(LA76305(5),"^",3)
+75 SET LA7ORS=$PIECE(LA76305(5),"^",2)
+76 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.36,.01)
+77 SET LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
+78 SET LA7VAL=$$GET1^DIQ(63.36,LA7IENS,.01,"","LA7ERR")
+79 SET LA7Y="MI-"_$PIECE(LRSB,",")_"^"_$$GET1^DID(63.36,.01,"","LABEL")_"^99VA63"
+80 SET LA7ALT=LA7Y_"^"_LA7Y
+81 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",4"
End DoDot:1
QUIT
+82 ;
+83 ; Parasite organism
+84 IF $PIECE(LRSB,",")=16
Begin DoDot:1
+85 SET LA76305(5)=$GET(^LR(LRDFN,LRSS,LRIDT,5))
+86 SET LA7ORS=$PIECE(LA76305(5),"^",2)
+87 IF $PIECE(LA76305(5),"^",3)
SET LA7VERP=$PIECE(LA76305(5),"^",3)
+88 ; Working on parasite
+89 IF $GET(LRIDT(3))=""
SET LA7SUBFL=63.34
DO ORG^LA7VOBX4
QUIT
+90 ; Working on parasite's stages/quantity
+91 SET LA7SUBFL=63.35
+92 IF $PIECE(LRSB,",",2)=.01
DO PSTAGE^LA7VOBX4
QUIT
+93 IF $PIECE(LRSB,",",2)=1
DO PQTY^LA7VOBX4
QUIT
End DoDot:1
QUIT
+94 ;
+95 ; Mycology report
+96 IF $PIECE(LRSB,",")=18
Begin DoDot:1
+97 NEW LA7ERR
+98 SET LA76305(8)=$GET(^LR(LRDFN,LRSS,LRIDT,8))
+99 SET LA7VERP=$PIECE(LA76305(8),"^",3)
+100 SET LA7ORS=$PIECE(LA76305(8),"^",2)
+101 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.38,.01)
+102 SET LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
+103 SET LA7VAL=$$GET1^DIQ(63.38,LA7IENS,.01,"","LA7ERR")
+104 SET LA7Y="MI-"_$PIECE(LRSB,",")_"^"_$$GET1^DID(63.38,.01,"","LABEL")_"^99VA63"
+105 SET LA7ALT=LA7Y_"^"_LA7Y
+106 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",8"
End DoDot:1
QUIT
+107 ;
+108 ; Mycology organism
+109 IF $PIECE(LRSB,",")=20
Begin DoDot:1
+110 SET LA76305(8)=$GET(^LR(LRDFN,LRSS,LRIDT,8))
+111 SET LA7ORS=$PIECE(LA76305(8),"^",2)
+112 SET LA7VERP=$PIECE(LA76305(8),"^",3)
+113 SET LA7SUBFL=63.37
+114 ; Working on colony count
+115 IF $PIECE(LRSB,",",2)=1
DO CC^LA7VOBX4
QUIT
+116 ; Working on organism
+117 DO ORG^LA7VOBX4
End DoDot:1
QUIT
+118 ;
+119 ; Mycobacterium report
+120 IF $PIECE(LRSB,",")=22
Begin DoDot:1
+121 NEW LA7ERR
+122 SET LA76305(11)=$GET(^LR(LRDFN,LRSS,LRIDT,11))
+123 SET LA7VERP=$PIECE(LA76305(11),"^",3)
+124 SET LA7ORS=$PIECE(LA76305(11),"^",2)
+125 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.41,.01)
+126 SET LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
+127 SET LA7VAL=$$GET1^DIQ(63.41,LA7IENS,.01,"","LA7ERR")
+128 SET LA7Y="MI-"_$PIECE(LRSB,",")_"^"_$$GET1^DID(63.41,.01,"","LABEL")_"^99VA63"
+129 SET LA7ALT=LA7Y_"^"_LA7Y
+130 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",12"
End DoDot:1
QUIT
+131 ;
+132 ; Acid Fast stain
+133 IF LRSB=24
Begin DoDot:1
+134 NEW LA7ERR
+135 SET LA76305(11)=$GET(^LR(LRDFN,LRSS,LRIDT,11))
+136 SET LA7VERP=$PIECE(LA76305(11),"^",3)
+137 SET LA7ORS=$PIECE(LA76305(11),"^",2)
+138 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.05,24)
+139 SET LA7IENS=LRIDT_","_LRDFN_","
+140 SET LA7VAL=$$GET1^DIQ(63.05,LA7IENS,24,"","LA7ERR")
+141 SET LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.05,24,"","LABEL")_"^99VA63"
+142 SET LA7ALT=LA7Y_"^"_LA7Y
+143 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",12;3"
End DoDot:1
QUIT
+144 ;
+145 ; Acid Fast stain quantity
+146 IF LRSB=25
Begin DoDot:1
+147 NEW LA7ERR
+148 SET LA76305(11)=$GET(^LR(LRDFN,LRSS,LRIDT,11))
+149 SET LA7VERP=$PIECE(LA76305(11),"^",3)
+150 SET LA7ORS=$PIECE(LA76305(11),"^",2)
+151 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.05,25)
+152 SET LA7IENS=LRIDT_","_LRDFN_","
+153 SET LA7VAL=$$GET1^DIQ(63.05,LA7IENS,25,"","LA7ERR")
+154 SET LA7Y="MI-"_LRSB_"^"_$$GET1^DID(63.05,25,"","LABEL")_"^99VA63"
+155 SET LA7ALT=LA7Y_"^"_LA7Y
+156 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",12;3"
End DoDot:1
QUIT
+157 ;
+158 ; TB organism
+159 IF $PIECE(LRSB,",")=26
Begin DoDot:1
+160 SET LA76305(11)=$GET(^LR(LRDFN,LRSS,LRIDT,11))
+161 SET LA7ORS=$PIECE(LA76305(11),"^",2)
+162 SET LA7VERP=$PIECE(LA76305(11),"^",5)
+163 SET LA7SUBFL=63.39
+164 ; Working on colony count
+165 IF $PIECE(LRSB,",",2)=1
DO CC^LA7VOBX4
QUIT
+166 ; Working on organism
+167 IF $GET(LRIDT(3))=""
DO ORG^LA7VOBX4
QUIT
+168 ; Working on susceptibilities
+169 DO MIC^LA7VOBX4
End DoDot:1
QUIT
+170 ;
+171 ; Virology report
+172 IF $PIECE(LRSB,",")=33
Begin DoDot:1
+173 NEW LA7ERR
+174 SET LA76305(16)=$GET(^LR(LRDFN,LRSS,LRIDT,16))
+175 SET LA7VERP=$PIECE(LA76305(16),"^",3)
+176 SET LA7ORS=$PIECE(LA76305(16),"^",2)
+177 SET LA7OBX(2)=$$OBX2^LA7VOBX(63.44,.01)
+178 SET LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
+179 SET LA7VAL=$$GET1^DIQ(63.44,LA7IENS,.01,"","LA7ERR")
+180 SET LA7Y="MI-"_$PIECE(LRSB,",")_"^"_$$GET1^DID(63.44,.01,"","LABEL")_"^99VA63"
+181 SET LA7ALT=LA7Y_"^"_LA7Y
+182 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",16"
End DoDot:1
QUIT
+183 ;
+184 ; Virology virus
+185 IF $PIECE(LRSB,",")=36
Begin DoDot:1
+186 SET LA76305(16)=$GET(^LR(LRDFN,LRSS,LRIDT,16))
+187 SET LA7ORS=$PIECE(LA76305(16),"^",2)
+188 SET LA7VERP=$PIECE(LA76305(16),"^",3)
+189 ; Working on virus
+190 SET LA7SUBFL=63.43
+191 DO ORG^LA7VOBX4
End DoDot:1
QUIT
+192 ;
+193 ; Antibiotic levels
+194 IF $PIECE(LRSB,",")=28
Begin DoDot:1
+195 SET LA76305(1)=$GET(^LR(LRDFN,LRSS,LRIDT,1))
+196 SET LA7VERP=$PIECE(LA76305(1),"^",3)
+197 SET LA7ORS=$PIECE(LA76305(1),"^",2)
+198 SET LA7SUBFL=63.42
+199 SET LA7OBX(2)="SN"
+200 SET LA7X=$GET(^LR(LRDFN,LRSS,LRIDT,14,LRIDT(2),0))
+201 SET $PIECE(LA7CODE,"!",2)="93978.0000"
+202 SET $PIECE(LA7CODE,"!",3)=$SELECT($PIECE(LA7X,"^",2)="P":44433,$PIECE(LA7X,"^",2)="T":44434,1:23816)
+203 SET LA7VAL=$PIECE(LA7X,"^",3)
+204 SET LA7Y="MI-"_$PIECE(LRSB,",")_"-"_$PIECE(LRSB,",",2)_"^"_$PIECE(LA7X,"^")_"^99VA63"
+205 SET LA7ALT=LA7Y_"^"_LA7Y
+206 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",14"
End DoDot:1
QUIT
+207 ;
+208 ; Sterility report
+209 IF LRSB=11.52
Begin DoDot:1
+210 NEW LA7ERR
+211 SET LA76305(1)=$GET(^LR(LRDFN,LRSS,LRIDT,1))
+212 SET LA7VERP=$PIECE(LA76305(1),"^",3)
+213 SET LA7ORS=$PIECE(LA76305(1),"^",2)
+214 SET LA7SUBFL=63.292
+215 SET LA7OBX(2)=$$OBX2^LA7VOBX(LA7SUBFL,.01)
+216 SET LA7IENS=LRIDT(2)_","_LRIDT_","_LRDFN_","
+217 SET LA7VAL=$$GET1^DIQ(LA7SUBFL,LA7IENS,.01,"","LA7ERR")
+218 SET LA7Y="MI-"_$PIECE(LRSB,",")_"^"_$$GET1^DID(63.292,.01,"","LABEL")_"^99VA63"
+219 SET LA7ALT=LA7Y_"^"_LA7Y
+220 SET LA7PLREF=LRDFN_",MI,"_LRIDT_",31"
End DoDot:1
QUIT
+221 ;
+222 ;
+223 QUIT