source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LAMIV11.m@ 1586

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1LAMIV11 ;SLC/DLG/FHS/DAL - PROCESS VITEK GPS & YBC CARDS ;7/20/90 09:38 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 Q:$E(IN,1,2)'="01" ;No MIC results
4 ;Find the organism and mic results
5 S O=$E(IN,5,6),V=$E(IN,10),V=$S("0"[V:"0F","1"[V:"0FB",1:"") Q:V="" S TYPE=$O(^LAB(62.4,TSK,7,"B",V,0)) Q:TYPE<1
6 S V=$O(^LAB(62.4,TSK,7,TYPE,1,"C",O,0)) Q:V<1 S ORG(ISOL)=+^LAB(62.4,TSK,7,TYPE,1,V,0)
7 F I2=17:6:92 S V=$E(IN,I2) D MICF
8 S LRT=CARD,CARD=$O(^LAB(62.4,TSK,7,"B","10",0))
9 S RMK="",FL=$E(IN,3) F CODE=46,47 D MSG
10 I $E(IN,3)=1 S FL=$E(IN,8) F CODE=48,49 D MSG
11 I $E(IN,3)=1 S FL=$E(IN,9) F CODE=50,51 D MSG
12 S CARD=LRT K LRT Q
13MICF S O=$E(IN,(I2+4)),I4=$O(^LAB(62.4,TSK,7,CARD,2,"C",O,0)) Q:I4'>0 S I3=$P(^LAB(62.4,TSK,7,CARD,2,I4,0),U,2) X $P(^(0),U,3) S:V]"" MIC(ISOL,I3)=V
14 Q
15511 S C=0,U="^",I1=3,I2=7 Q:$E(IN,1,2)'="FF" ;0F, 5.11, Gram Pos ID card
16 ;CARD "OFB" is for the Catalase -/Non-Beta-Hemolytic or Catalase +/Coagulase + part
17 I $E(IN,3,4)="FF" S CARD=$O(^LAB(62.4,TSK,7,"B","0FB",0)) Q:CARD'>0 F I=11,15 S X1=$O(^LAB(62.4,TSK,7,CARD,1,"C",$E(IN,I,I+1),0)) D L2:X1>0 Q:$D(ORG)
18 I $E(IN,3,4)'="FF" S CARD=$O(^LAB(62.4,TSK,7,"B","0F",0)) Q:CARD'>0 F I=3,7 S X1=$O(^LAB(62.4,TSK,7,CARD,1,"C",$E(IN,I,I+1),0)) D L2:X1>0 Q:$D(ORG)
19 S RMK="",CODE=46,FL=$E(IN,90) D MSG S CODE=47,FL=$E(IN,91) D MSG
20 Q
21L2 N X2 S (X,X2)=$E(IN,I+2,I+3) D PROB I X>80 S ORG(ISOL,1)=X2,ORG(ISOL)=+^LAB(62.4,TSK,7,CARD,1,X1,0) ;accept if prob>80%
22 Q
23HEX S XX=X,X="" F II=1:1:$L(XX) S X=X*16+($F("0123456789ABCDEF",$E(XX,II))-2)
24 Q
2554 S C=0,U="^" ;05, 5.4, Yeast card
26 F I=1,5 S X1=$O(^LAB(62.4,TSK,7,CARD,1,"C",$E(IN,I,I+1),0)) D L2:X1>0
27 D RMK
28 Q
29RMK S RMK="" S CODE=41,FL=$E(IN,42) D MSG S CODE=42,FL=$E(IN,42) D MSG F CODE=44:1:46 S FL=$E(IN,CODE) D MSG
30 S CODE=41,FL=$E(IN,43) D MSG S CODE=42 D MSG
31 Q
32MSG F X1=0:0 S X1=$O(^LAB(62.4,TSK,7,CARD,4,"B",CODE,X1)) Q:X1'>0 D MS2
33 Q
34MS2 S X3=^LAB(62.4,TSK,7,CARD,4,X1,0)
35 S X4=$P(X3,U,2) I $L(X4),X4'=FL Q ;
36 S:$L(RMK) RMK=RMK_", " S RMK=RMK_$P(X3,U,3)
37 Q
38PROB D HEX I X>100 S X="" Q
39 S:X=0 X="<1" S X=X_"% Probability" Q
Note: See TracBrowser for help on using the repository browser.