Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LRMISR1

LRMISR1.m

Go to the documentation of this file.
LRMISR1 ; IHS/DIR/FJE - INPUT TRANSFORM FOR ANTIBIOTIC SENSITIVITIES 7/14/87 09:34 ;DEC 09, 2008 8:30 AM
 ;;5.2;LAB SERVICE;**1013,1025**;NOV 01, 1997
 ;
 ;;5.2;LAB SERVICE;;Sep 27, 1994
STAR ;from LRMISR
 I $P(X,"*",3,4)["*" K X Q
 S LRSCREEN=$P(X,"*",3),LRISR=$P(X,"*",2),X=$P(X,"*") I '$L(X) K X Q
 I '$D(^LAB(62.06,C6,1,"B",X))!('$L(LRSCREEN)&'$L(LRISR)) K X Q
 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
 I $L(LRSCREEN),$L(LRSCREEN)'=1!("ARN"'[LRSCREEN) K X Q
 I '$L(LRISR) S LRR=X D INTRP
 I '$L(LRSCREEN) D SCREEN
 I LRSCREEN="A" S LRSCREEN=""
 Q
IS ;from LRMISR
 D INTRP,SCREEN S:LRISR=X LRISR="" S:LRSCREEN="A" LRSCREEN=""
 Q
INTRP ;from LRMISR
 S LRISR=$G(^LAB(62.06,"AI",LRBN,LRR)) Q:'$D(LRBG1)!'$D(LRSPEC)!('$L(LRISR))
 I $O(^LAB(62.06,"AI",LRBN,LRR,0))="" Q
 I $D(^LAB(62.06,"AI",LRBN,LRR,+LRBG1)) S C2=+LRBG1 D SPEC Q
 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
 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
 I $D(^LAB(62.06,"AI",LRBN,LRR,"ANY")) S C2="ANY" D SPEC
 Q
SPEC I $D(^LAB(62.06,"AI",LRBN,LRR,C2,LRSPEC)) S C4=LRSPEC D ALT Q
 I $D(^LAB(62.06,"AI",LRBN,LRR,C2,"ANY")) S C4="ANY" D ALT
 Q
ALT S LRISR=$P(^LAB(62.06,"AI",LRBN,LRR,C2,C4),U)
 Q
SCREEN ; S LRSCREEN=^LAB(62.06,"AS",LRBN) Q:'$D(LRBG1)!'$D(LRSPEC)
 ; ----- BEGIN IHS/OIT/MKK -- LR*5.2*1025 MODIFICATION -- Naked Reference can cause problem
 S LRSCREEN=$G(^LAB(62.06,"AS",LRBN))
 Q:'$D(LRBG1)!'$D(LRSPEC)
 ; ----- END IHS/OIT/MKK -- LR*5.2*1025 MODIFICATION
 I $O(^LAB(62.06,"AS",LRBN,0))="" Q
 I $D(^LAB(62.06,"AS",LRBN,+LRBG1)) S C2=+LRBG1 D SSPEC Q
 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
 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
 I $D(^LAB(62.06,"AS",LRBN,"ANY")) S C2="ANY" D SSPEC
 Q
SSPEC I $D(^LAB(62.06,"AS",LRBN,C2,LRSPEC)) S C4=LRSPEC D SALT Q
 I $D(^LAB(62.06,"AS",LRBN,C2,"ANY")) S C4="ANY" D SALT
 Q
SALT ; S LRSCREEN=^LAB(62.06,"AS",LRBN,C2,C4)
 ; ----- BEGIN IHS/OIT/MKK -- LR*5.2*1025 MODIFICATION -- Naked Reference can cause problem
 S LRSCREEN=$G(^LAB(62.06,"AS",LRBN,C2,C4))
 ; ----- END IHS/OIT/MKK -- LR*5.2*1025 MODIFICATION
 Q