source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRMISR1.m@ 1751

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1LRMISR1 ;SLC/BA - INPUT TRANSFORM FOR ANTIBIOTIC SENSITIVITIES ; 7/14/87 09:34 ;
2 ;;5.2;LAB SERVICE;;Sep 27, 1994
3STAR ;from LRMISR
4 I $P(X,"*",3,4)["*" K X Q
5 S LRSCREEN=$P(X,"*",3),LRISR=$P(X,"*",2),X=$P(X,"*") I '$L(X) K X Q
6 I '$D(^LAB(62.06,C6,1,"B",X))!('$L(LRSCREEN)&'$L(LRISR)) K X Q
7 S LRBN=+$P(DQ(DQ),U,4) Q:'LRBN I $L(LRISR),'$D(^LAB(62.06,"AJ",$P($P(DQ(DQ),U,4),";"),LRISR)) K X Q
8 I $L(LRSCREEN),$L(LRSCREEN)'=1!("ARN"'[LRSCREEN) K X Q
9 I '$L(LRISR) S LRR=X D INTRP
10 I '$L(LRSCREEN) D SCREEN
11 I LRSCREEN="A" S LRSCREEN=""
12 Q
13IS ;from LRMISR
14 D INTRP,SCREEN S:LRISR=X LRISR="" S:LRSCREEN="A" LRSCREEN=""
15 Q
16INTRP ;from LRMISR
17 S LRISR=$G(^LAB(62.06,"AI",LRBN,LRR)) Q:'$D(LRBG1)!'$D(LRSPEC)!('$L(LRISR))
18 I $O(^LAB(62.06,"AI",LRBN,LRR,0))="" Q
19 I $D(^LAB(62.06,"AI",LRBN,LRR,+LRBG1)) S C2=+LRBG1 D SPEC Q
20 I $P(^LAB(61.2,+LRBG1,0),U,3)="P",$D(^LAB(62.06,"AI",LRBN,LRR,"GRAM POS")) S C2="GRAM POS" D SPEC Q
21 I $P(^LAB(61.2,+LRBG1,0),U,3)="N",$D(^LAB(62.06,"AI",LRBN,LRR,"GRAM NEG")) S C2="GRAM NEG" D SPEC Q
22 I $D(^LAB(62.06,"AI",LRBN,LRR,"ANY")) S C2="ANY" D SPEC
23 Q
24SPEC I $D(^LAB(62.06,"AI",LRBN,LRR,C2,LRSPEC)) S C4=LRSPEC D ALT Q
25 I $D(^LAB(62.06,"AI",LRBN,LRR,C2,"ANY")) S C4="ANY" D ALT
26 Q
27ALT S LRISR=$P(^LAB(62.06,"AI",LRBN,LRR,C2,C4),U)
28 Q
29SCREEN S LRSCREEN=^LAB(62.06,"AS",LRBN) Q:'$D(LRBG1)!'$D(LRSPEC)
30 I $O(^LAB(62.06,"AS",LRBN,0))="" Q
31 I $D(^LAB(62.06,"AS",LRBN,+LRBG1)) S C2=+LRBG1 D SSPEC Q
32 I $P(^LAB(61.2,+LRBG1,0),U,3)="P",$D(^LAB(62.06,"AS",LRBN,"GRAM POS")) S C2="GRAM POS" D SSPEC Q
33 I $P(^LAB(61.2,+LRBG1,0),U,3)="N",$D(^LAB(62.06,"AS",LRBN,"GRAM NEG")) S C2="GRAM NEG" D SSPEC Q
34 I $D(^LAB(62.06,"AS",LRBN,"ANY")) S C2="ANY" D SSPEC
35 Q
36SSPEC I $D(^LAB(62.06,"AS",LRBN,C2,LRSPEC)) S C4=LRSPEC D SALT Q
37 I $D(^LAB(62.06,"AS",LRBN,C2,"ANY")) S C4="ANY" D SALT
38 Q
39SALT S LRSCREEN=^LAB(62.06,"AS",LRBN,C2,C4)
40 Q
Note: See TracBrowser for help on using the repository browser.